impaktapps-ui-builder 0.0.101-alpha.34 → 0.0.101-alpha.341

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.
@@ -184,7 +184,8 @@ const PageMasterUiSchema = (theme) => {
184
184
  size: "small",
185
185
  icon: "TablePaste",
186
186
  iconLabel: "Paste",
187
- styleDefault: true
187
+ styleDefault: true,
188
+ title: ""
188
189
  },
189
190
  style: {
190
191
  mt: "6px",
@@ -524,15 +525,17 @@ const PageMasterUiSchema = (theme) => {
524
525
  config: {
525
526
  layout: 11,
526
527
  main: {
527
- heading: "Are you sure you want to delete ?"
528
+ heading: "Are you sure you want to delete this Component ?"
528
529
  },
529
530
  style: {
530
- marginTop: "-20px",
531
531
  fontSize: "20px",
532
532
  "&.MuiTypography-root": {
533
- padding: "10px 30px 20px 30px",
533
+ padding: "0px 20px",
534
534
  textAlign: "center",
535
- lineHeight: "1"
535
+ lineHeight: "1.2",
536
+ fontWeight: "normal",
537
+ fontSize: "18px",
538
+ marginBottom: theme.spacing(5)
536
539
  }
537
540
  }
538
541
  }
@@ -554,15 +557,15 @@ const PageMasterUiSchema = (theme) => {
554
557
  layout: 6,
555
558
  main: {
556
559
  name: "No",
557
- startIcon: "ApproveIcon",
558
560
  variant: "contained",
559
- color: "info",
560
561
  type: "text",
561
562
  onClick: "deletePopUpComponent",
562
563
  size: "large"
563
564
  },
564
565
  style: {
565
566
  position: "absolute",
567
+ padding: "8px 0px",
568
+ fontSize: "16px",
566
569
  bottom: 0,
567
570
  left: 0,
568
571
  width: "50%",
@@ -590,7 +593,6 @@ const PageMasterUiSchema = (theme) => {
590
593
  layout: 6,
591
594
  main: {
592
595
  name: "Yes",
593
- startIcon: "ApproveIcon",
594
596
  variant: "contained",
595
597
  color: "error",
596
598
  type: "text",
@@ -599,6 +601,8 @@ const PageMasterUiSchema = (theme) => {
599
601
  },
600
602
  style: {
601
603
  position: "absolute",
604
+ padding: "8px 0px",
605
+ fontSize: "16px",
602
606
  bottom: 0,
603
607
  right: 0,
604
608
  width: "50%",
@@ -647,15 +651,17 @@ const PageMasterUiSchema = (theme) => {
647
651
  config: {
648
652
  layout: 11,
649
653
  main: {
650
- heading: "Are you sure you want to delete ?"
654
+ heading: "Are you sure you want to delete this Event ?"
651
655
  },
652
656
  style: {
653
- marginTop: "-20px",
654
657
  fontSize: "20px",
655
658
  "&.MuiTypography-root": {
656
- padding: "10px 30px 20px 30px",
659
+ padding: "0px 20px",
657
660
  textAlign: "center",
658
- lineHeight: "1"
661
+ lineHeight: "1.2",
662
+ fontWeight: "normal",
663
+ fontSize: "18px",
664
+ marginBottom: theme.spacing(5)
659
665
  }
660
666
  }
661
667
  }
@@ -677,15 +683,15 @@ const PageMasterUiSchema = (theme) => {
677
683
  layout: 6,
678
684
  main: {
679
685
  name: "No",
680
- startIcon: "ApproveIcon",
681
686
  variant: "contained",
682
- color: "info",
683
687
  type: "text",
684
688
  onClick: "deletePopUpEvent",
685
689
  size: "large"
686
690
  },
687
691
  style: {
688
692
  position: "absolute",
693
+ padding: "8px 0px",
694
+ fontSize: "16px",
689
695
  bottom: 0,
690
696
  left: 0,
691
697
  width: "50%",
@@ -713,7 +719,6 @@ const PageMasterUiSchema = (theme) => {
713
719
  layout: 6,
714
720
  main: {
715
721
  name: "Yes",
716
- startIcon: "ApproveIcon",
717
722
  variant: "contained",
718
723
  color: "error",
719
724
  type: "text",
@@ -722,6 +727,8 @@ const PageMasterUiSchema = (theme) => {
722
727
  },
723
728
  style: {
724
729
  position: "absolute",
730
+ padding: "8px 0px",
731
+ fontSize: "16px",
725
732
  bottom: 0,
726
733
  right: 0,
727
734
  width: "50%",
@@ -6243,7 +6250,7 @@ const ComponentSchema = {
6243
6250
  properties: {
6244
6251
  type: {
6245
6252
  oneOf: [
6246
- { title: "Masked Aadhaar", const: "AadharcardText" },
6253
+ { title: "Masked Aadhar Card", const: "AadharcardText" },
6247
6254
  { title: "Array", const: "Array" },
6248
6255
  { title: "Button", const: "Button" },
6249
6256
  { title: "Data Card", const: "card" },
@@ -6435,23 +6442,20 @@ const ComponentSchema = {
6435
6442
  }
6436
6443
  },
6437
6444
  filteringOptions: {
6438
- type: "array",
6439
- items: {
6440
- oneOf: [
6441
- { const: "fuzzy", title: "Fuzzy" },
6442
- { const: "contains", title: "Contain" },
6443
- { const: "startsWith", title: "Starts with" },
6444
- { const: "endsWith", title: "Ends with" },
6445
- { const: "equals", title: "Equals" },
6446
- { const: "notEquals", title: "Not Equals" },
6447
- { const: "between", title: "Between" },
6448
- { const: "betweenInclusive", title: "Between inclusive" },
6449
- { const: "greaterThan", title: "Greater than" },
6450
- { const: "greaterThanOrEqualTo", title: "Greater than or equal to" },
6451
- { const: "lessThan", title: "Less than" },
6452
- { const: "lessThanOrEqualTo", title: "Less than or equal to" }
6453
- ]
6454
- }
6445
+ oneOf: [
6446
+ { const: "fuzzy", title: "Fuzzy" },
6447
+ { const: "contains", title: "Contain" },
6448
+ { const: "startsWith", title: "Starts with" },
6449
+ { const: "endsWith", title: "Ends with" },
6450
+ { const: "equals", title: "Equals" },
6451
+ { const: "notEquals", title: "Not Equals" },
6452
+ { const: "between", title: "Between" },
6453
+ { const: "betweenInclusive", title: "Between inclusive" },
6454
+ { const: "greaterThan", title: "Greater than" },
6455
+ { const: "greaterThanOrEqualTo", title: "Greater than or equal to" },
6456
+ { const: "lessThan", title: "Less than" },
6457
+ { const: "lessThanOrEqualTo", title: "Less than or equal to" }
6458
+ ]
6455
6459
  },
6456
6460
  legendLabels: {
6457
6461
  type: "array",
@@ -6567,6 +6571,9 @@ const ComponentSchema = {
6567
6571
  { title: "Info", const: "info" }
6568
6572
  ]
6569
6573
  },
6574
+ pageName: {
6575
+ path: []
6576
+ },
6570
6577
  name: {
6571
6578
  type: "string"
6572
6579
  },
@@ -6828,15 +6835,16 @@ const componentBasicUiSchema = (theme) => {
6828
6835
  config: {
6829
6836
  layout: 11,
6830
6837
  main: {
6831
- heading: "Are you sure you want to delete ?"
6838
+ heading: "Are you sure you want to delete this Component ?"
6832
6839
  },
6833
6840
  style: {
6834
- marginTop: "-20px",
6835
- fontSize: "20px",
6836
6841
  "&.MuiTypography-root": {
6837
- padding: "10px 30px 20px 30px",
6842
+ padding: "0px 20px",
6838
6843
  textAlign: "center",
6839
- lineHeight: "1"
6844
+ lineHeight: "1.2",
6845
+ fontWeight: "normal",
6846
+ fontSize: "18px",
6847
+ marginBottom: theme.spacing(5)
6840
6848
  }
6841
6849
  }
6842
6850
  }
@@ -6865,6 +6873,8 @@ const componentBasicUiSchema = (theme) => {
6865
6873
  },
6866
6874
  style: {
6867
6875
  position: "absolute",
6876
+ padding: "8px 0px",
6877
+ fontSize: "16px",
6868
6878
  bottom: 0,
6869
6879
  left: 0,
6870
6880
  width: "50%",
@@ -6900,6 +6910,8 @@ const componentBasicUiSchema = (theme) => {
6900
6910
  },
6901
6911
  style: {
6902
6912
  position: "absolute",
6913
+ padding: "8px 0px",
6914
+ fontSize: "16px",
6903
6915
  bottom: 0,
6904
6916
  right: 0,
6905
6917
  width: "50%",
@@ -6948,15 +6960,17 @@ const componentBasicUiSchema = (theme) => {
6948
6960
  config: {
6949
6961
  layout: 11,
6950
6962
  main: {
6951
- heading: "Are you sure you want to delete ?"
6963
+ heading: "Are you sure you want to delete this Event ?"
6952
6964
  },
6953
6965
  style: {
6954
- marginTop: "-20px",
6955
6966
  fontSize: "20px",
6956
6967
  "&.MuiTypography-root": {
6957
- padding: "10px 30px 20px 30px",
6968
+ padding: "0px 20px",
6958
6969
  textAlign: "center",
6959
- lineHeight: "1"
6970
+ lineHeight: "1.2",
6971
+ fontWeight: "normal",
6972
+ fontSize: "18px",
6973
+ marginBottom: theme.spacing(5)
6960
6974
  }
6961
6975
  }
6962
6976
  }
@@ -6985,6 +6999,8 @@ const componentBasicUiSchema = (theme) => {
6985
6999
  },
6986
7000
  style: {
6987
7001
  position: "absolute",
7002
+ padding: "8px 0px",
7003
+ fontSize: "16px",
6988
7004
  bottom: 0,
6989
7005
  left: 0,
6990
7006
  width: "50%",
@@ -7020,6 +7036,8 @@ const componentBasicUiSchema = (theme) => {
7020
7036
  },
7021
7037
  style: {
7022
7038
  position: "absolute",
7039
+ padding: "8px 0px",
7040
+ fontSize: "16px",
7023
7041
  bottom: 0,
7024
7042
  right: 0,
7025
7043
  width: "50%",
@@ -7044,23 +7062,20 @@ const componentBasicUiSchema = (theme) => {
7044
7062
  type: "Control",
7045
7063
  scope: "#/properties/pageName",
7046
7064
  options: {
7047
- widget: "Box"
7065
+ widget: "Breadcrumb"
7048
7066
  },
7049
7067
  config: {
7050
7068
  layout: 12,
7051
- main: {
7052
- heading: ""
7053
- },
7069
+ main: {},
7054
7070
  style: {
7055
7071
  paddingLeft: theme.spacing(3),
7056
- width: "100%",
7057
- fontSize: "10px",
7058
7072
  color: theme.palette.grey[600],
7073
+ fontSize: "10px",
7059
7074
  position: "fixed",
7060
7075
  bottom: "24px",
7061
- backgroundColor: theme.palette.background.default,
7062
7076
  borderBottom: `1px solid ${theme.palette.common.black}29`,
7063
- borderTop: `1px solid ${theme.palette.common.black}29`
7077
+ borderTop: `1px solid ${theme.palette.common.black}29`,
7078
+ backgroundColor: theme.palette.background.default
7064
7079
  }
7065
7080
  }
7066
7081
  },
@@ -7724,7 +7739,7 @@ const buildPropertiesSection = function(type) {
7724
7739
  case "Text":
7725
7740
  uiSchema.elements = [
7726
7741
  getInputField("placeholder", "Placeholder"),
7727
- emptyBox$1("TextEmpty1", { xs: 6, sm: 6, md: 4, lg: 4 }),
7742
+ getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
7728
7743
  emptyBox$1("TextEmpty1", { xs: 0, sm: 0, md: 4, lg: 4 }),
7729
7744
  getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
7730
7745
  ];
@@ -8428,6 +8443,7 @@ const sectionLabels = {
8428
8443
  function refreshPage(type, store2) {
8429
8444
  var _a, _b;
8430
8445
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
8446
+ const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
8431
8447
  if (type) {
8432
8448
  const sectionUiSchema = {
8433
8449
  Core: CoreSection,
@@ -8443,15 +8459,74 @@ function refreshPage(type, store2) {
8443
8459
  UiSchema.elements[0].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
8444
8460
  }
8445
8461
  const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
8446
- const pathArrayAll = path.split(".");
8447
- const parentObj = pathArrayAll.reduce((currObj, path2) => {
8448
- var _a2;
8449
- const currElemIndexWithBracket = path2.split("[")[1];
8450
- const currElemIndex = parseInt(currElemIndexWithBracket.slice(0, -1));
8451
- console.log(currObj);
8452
- return (_a2 = currObj == null ? void 0 : currObj["elements"]) == null ? void 0 : _a2[currElemIndex];
8453
- }, UiSchema);
8454
- console.log("parentObj", parentObj);
8462
+ const lastDotIndex = path.lastIndexOf(".");
8463
+ const parentPath = path.slice(0, lastDotIndex);
8464
+ const parentObj = _.get(currentConfig, parentPath);
8465
+ if ((parentObj == null ? void 0 : parentObj.type) === "Table") {
8466
+ UiSchema.elements[0].elements[0].elements[4] = {
8467
+ type: "Control",
8468
+ scope: "#/properties/columnFormat",
8469
+ options: {
8470
+ widget: "SelectInputField"
8471
+ },
8472
+ config: {
8473
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
8474
+ main: {
8475
+ label: "Column Format"
8476
+ }
8477
+ }
8478
+ };
8479
+ UiSchema.elements[0].elements[0].elements[6] = {
8480
+ type: "Control",
8481
+ scope: "#/properties/filteringOptions",
8482
+ options: {
8483
+ widget: "SelectInputField"
8484
+ },
8485
+ config: {
8486
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
8487
+ main: {
8488
+ label: "Filter Mode",
8489
+ multiple: true
8490
+ }
8491
+ }
8492
+ };
8493
+ UiSchema.elements[0].elements[0].elements[5] = {
8494
+ type: "Control",
8495
+ scope: "#/properties/enableFilter",
8496
+ options: {
8497
+ widget: "RadioInputField"
8498
+ },
8499
+ config: {
8500
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
8501
+ main: {
8502
+ label: "Enable Filter",
8503
+ options: ["Yes", "No"]
8504
+ }
8505
+ }
8506
+ }, UiSchema.elements[0].elements[0].elements[7] = {
8507
+ type: "Control",
8508
+ scope: "#/properties/enableSorting",
8509
+ options: {
8510
+ widget: "RadioInputField"
8511
+ },
8512
+ config: {
8513
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
8514
+ main: {
8515
+ label: "Enable Sorting",
8516
+ options: ["Yes", "No"]
8517
+ }
8518
+ }
8519
+ }, UiSchema.elements[0].elements[0].elements[8] = {
8520
+ type: "Control",
8521
+ scope: "#/properties/proc",
8522
+ config: {
8523
+ layout: { xs: 6, sm: 6, md: 8, lg: 3 }
8524
+ },
8525
+ options: {
8526
+ widget: "EmptyBox"
8527
+ }
8528
+ };
8529
+ }
8455
8530
  if (sessionStorage.getItem("copiedConfig")) {
8456
8531
  this.ElementPathSetter(UiSchema);
8457
8532
  }
@@ -8473,10 +8548,34 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8473
8548
  return getFormdataFromSessionStorage(path);
8474
8549
  },
8475
8550
  getSchema: function() {
8551
+ var _a, _b, _c;
8476
8552
  const schema2 = _.cloneDeep(ComponentSchema);
8477
8553
  if (sessionStorage.getItem("copiedConfig")) {
8478
8554
  schema2.properties.RemoveItemButton.disabled = false;
8479
8555
  }
8556
+ const config2 = JSON.parse(sessionStorage.getItem("pageFormdata"));
8557
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8558
+ const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
8559
+ let pathArray = [{ label: (_c = config2.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
8560
+ if (path) {
8561
+ const pathArrayAll = path.split(".");
8562
+ const arr = [];
8563
+ pathArrayAll.map((e, i) => {
8564
+ if (i === 0) {
8565
+ arr.push(e);
8566
+ return;
8567
+ }
8568
+ arr.push(`${arr[i - 1]}.${e}`);
8569
+ });
8570
+ arr.map((e) => {
8571
+ const data = _.get(config2, e);
8572
+ pathArray.push({
8573
+ label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
8574
+ path: `/Component?path=${e}${id ? `&id=${id}` : ""}`
8575
+ });
8576
+ });
8577
+ }
8578
+ schema2.properties.pageName.path = pathArray;
8480
8579
  return schema2;
8481
8580
  },
8482
8581
  okHandler: () => okHandler(store2),
@@ -8589,6 +8688,10 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8589
8688
  const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
8590
8689
  this.ElementPathSetter(uiSchema, copiedFormData);
8591
8690
  sessionStorage.setItem("copiedConfig", JSON.stringify(copiedFormData));
8691
+ store2.setNotify({
8692
+ SuccessMessage: `${elementType} Copied Successfully`,
8693
+ Success: true
8694
+ });
8592
8695
  store2.setSchema(schema2);
8593
8696
  store2.setUiSchema(uiSchema);
8594
8697
  },
@@ -8648,8 +8751,18 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8648
8751
  return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
8649
8752
  },
8650
8753
  ElementPathSetter: function(uiSchema, copiedFormData) {
8754
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
8651
8755
  const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
8652
- uiSchema.elements[2].elements[1].config.main.heading = `Copied Path: ${formData.pageName}`;
8756
+ if ((_f = (_e = (_d = (_c = (_b = (_a = uiSchema == null ? void 0 : uiSchema.elements) == null ? void 0 : _a[1]) == null ? void 0 : _b.elements) == null ? void 0 : _c[0]) == null ? void 0 : _d.config) == null ? void 0 : _e.main) == null ? void 0 : _f.headerIcons) {
8757
+ uiSchema.elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
8758
+ } else if ((_n = (_m = (_l = (_k = (_j = (_i = (_h = (_g = uiSchema == null ? void 0 : uiSchema.elements) == null ? void 0 : _g[0]) == null ? void 0 : _h.elements) == null ? void 0 : _i[1]) == null ? void 0 : _j.elements) == null ? void 0 : _k[0]) == null ? void 0 : _l.config) == null ? void 0 : _m.main) == null ? void 0 : _n.headerIcons) {
8759
+ uiSchema.elements[0].elements[1].elements[0].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.name}`;
8760
+ }
8761
+ if ((_t = (_s = (_r = (_q = (_p = (_o = uiSchema == null ? void 0 : uiSchema.elements) == null ? void 0 : _o[1]) == null ? void 0 : _p.elements) == null ? void 0 : _q[1]) == null ? void 0 : _r.config) == null ? void 0 : _s.main) == null ? void 0 : _t.headerIcons) {
8762
+ uiSchema.elements[1].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Event: ${formData.eventType}`;
8763
+ } else if ((_z = (_y = (_x = (_w = (_v = (_u = uiSchema == null ? void 0 : uiSchema.elements) == null ? void 0 : _u[0]) == null ? void 0 : _v.elements) == null ? void 0 : _w[1]) == null ? void 0 : _x.config) == null ? void 0 : _y.main) == null ? void 0 : _z.headerIcons) {
8764
+ uiSchema.elements[0].elements[1].config.main.headerIcons.elements[1].widget.config.main.tooltipMessage = `Copied Component: ${formData.eventType}`;
8765
+ }
8653
8766
  }
8654
8767
  };
8655
8768
  };
@@ -8848,6 +8961,9 @@ const EventSchema = {
8848
8961
  },
8849
8962
  RemoveItemButton: {
8850
8963
  disabled: true
8964
+ },
8965
+ pageName: {
8966
+ path: [{ label: "defaultLabel", path: "defaultPath" }]
8851
8967
  }
8852
8968
  },
8853
8969
  required: ["eventType", "Handler"]
@@ -9159,15 +9275,17 @@ const EventUiSchema = (theme) => {
9159
9275
  config: {
9160
9276
  layout: 11,
9161
9277
  main: {
9162
- heading: "Are you sure you want to delete ?"
9278
+ heading: "Are you sure you want to delete this Event ?"
9163
9279
  },
9164
9280
  style: {
9165
- marginTop: "-20px",
9166
9281
  fontSize: "20px",
9167
9282
  "&.MuiTypography-root": {
9168
- padding: "10px 30px 20px 30px",
9283
+ padding: "0px 20px",
9169
9284
  textAlign: "center",
9170
- lineHeight: "1"
9285
+ lineHeight: "1.2",
9286
+ fontWeight: "normal",
9287
+ fontSize: "18px",
9288
+ marginBottom: theme.spacing(5)
9171
9289
  }
9172
9290
  }
9173
9291
  }
@@ -9191,13 +9309,14 @@ const EventUiSchema = (theme) => {
9191
9309
  name: "No",
9192
9310
  startIcon: "ApproveIcon",
9193
9311
  variant: "contained",
9194
- color: "info",
9195
9312
  type: "text",
9196
9313
  onClick: "deletePopUpEvent",
9197
9314
  size: "large"
9198
9315
  },
9199
9316
  style: {
9200
9317
  position: "absolute",
9318
+ padding: "8px 0px",
9319
+ fontSize: "16px",
9201
9320
  bottom: 0,
9202
9321
  left: 0,
9203
9322
  width: "50%",
@@ -9225,7 +9344,6 @@ const EventUiSchema = (theme) => {
9225
9344
  layout: 6,
9226
9345
  main: {
9227
9346
  name: "Yes",
9228
- startIcon: "ApproveIcon",
9229
9347
  variant: "contained",
9230
9348
  color: "error",
9231
9349
  type: "text",
@@ -9234,6 +9352,8 @@ const EventUiSchema = (theme) => {
9234
9352
  },
9235
9353
  style: {
9236
9354
  position: "absolute",
9355
+ padding: "8px 0px",
9356
+ fontSize: "16px",
9237
9357
  bottom: 0,
9238
9358
  right: 0,
9239
9359
  width: "50%",
@@ -9258,23 +9378,20 @@ const EventUiSchema = (theme) => {
9258
9378
  type: "Control",
9259
9379
  scope: "#/properties/pageName",
9260
9380
  options: {
9261
- widget: "Box"
9381
+ widget: "Breadcrumb"
9262
9382
  },
9263
9383
  config: {
9264
9384
  layout: 12,
9265
- main: {
9266
- heading: ""
9267
- },
9385
+ main: {},
9268
9386
  style: {
9269
9387
  paddingLeft: theme.spacing(3),
9270
- width: "100%",
9271
- fontSize: "10px",
9272
9388
  color: theme.palette.grey[600],
9389
+ fontSize: "10px",
9273
9390
  position: "fixed",
9274
9391
  bottom: "24px",
9275
- backgroundColor: theme.palette.background.default,
9276
9392
  borderBottom: `1px solid ${theme.palette.common.black}29`,
9277
- borderTop: `1px solid ${theme.palette.common.black}29`
9393
+ borderTop: `1px solid ${theme.palette.common.black}29`,
9394
+ backgroundColor: theme.palette.background.default
9278
9395
  }
9279
9396
  }
9280
9397
  },
@@ -9565,15 +9682,21 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9565
9682
  const formdata = await this.getFormData();
9566
9683
  store2.setFormdata(formdata);
9567
9684
  const schema2 = await this.getSchema();
9685
+ console.log("SettingSchema>>", schema2);
9568
9686
  store2.setSchema(schema2);
9569
9687
  this.refreshPage(formdata.Handler, store2);
9570
9688
  },
9571
9689
  refreshPage: (handlerType, store22) => {
9690
+ var _a, _b, _c;
9572
9691
  const uiSchema = _.cloneDeep(EventUiSchema(store22.theme.myTheme));
9573
9692
  const schema2 = _.cloneDeep(EventSchema);
9574
9693
  if (handlerType) {
9575
9694
  if (handlerType === "custom") {
9576
- uiSchema.elements[0].elements[0].elements[2] = getRadioInputField("isSync", "Run in Sync", ["Yes", "No"]);
9695
+ uiSchema.elements[0].elements[0].elements[2] = getRadioInputField(
9696
+ "isSync",
9697
+ "Run in Sync",
9698
+ ["Yes", "No"]
9699
+ );
9577
9700
  uiSchema.elements[0].elements[0].elements[3] = {
9578
9701
  type: "Control",
9579
9702
  scope: "#/properties/emptyBox",
@@ -9586,14 +9709,26 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9586
9709
  style: {}
9587
9710
  }
9588
9711
  };
9589
- uiSchema.elements[0].elements[0].elements[4] = getTextArea("eventCode", "Write Custom Code", false);
9712
+ uiSchema.elements[0].elements[0].elements[4] = getTextArea(
9713
+ "eventCode",
9714
+ "Write Custom Code",
9715
+ false
9716
+ );
9590
9717
  schema2.required = ["eventType", "Handler", "eventCode"];
9591
9718
  } else if (handlerType === "api") {
9592
- uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", { xs: 0, sm: 0, md: 4, lg: 6 });
9719
+ uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
9720
+ xs: 0,
9721
+ sm: 0,
9722
+ md: 4,
9723
+ lg: 6
9724
+ });
9593
9725
  uiSchema.elements[0].elements[0].elements[3] = APISection;
9594
9726
  schema2.required = ["eventType", "Handler", "method", "path"];
9595
9727
  } else if (handlerType === "inBuiltFunction") {
9596
- uiSchema.elements[0].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name");
9728
+ uiSchema.elements[0].elements[0].elements[2] = getSelectField(
9729
+ "inBuiltFunctionType",
9730
+ "Function Name"
9731
+ );
9597
9732
  uiSchema.elements[0].elements[0].elements[3] = {
9598
9733
  type: "Control",
9599
9734
  scope: "#/properties/emptyBox",
@@ -9606,10 +9741,19 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9606
9741
  style: {}
9607
9742
  }
9608
9743
  };
9609
- uiSchema.elements[0].elements[0].elements[4] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
9744
+ uiSchema.elements[0].elements[0].elements[4] = getTextArea(
9745
+ "funcParametersCode",
9746
+ "Write Custom Code for Functions Parameter",
9747
+ true
9748
+ );
9610
9749
  schema2.required = ["eventType", "Handler", "inBuiltFunctionType"];
9611
9750
  } else if (handlerType === "refresh") {
9612
- uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", { xs: 0, sm: 0, md: 4, lg: 6 });
9751
+ uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
9752
+ xs: 0,
9753
+ sm: 0,
9754
+ md: 4,
9755
+ lg: 6
9756
+ });
9613
9757
  uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
9614
9758
  schema2.properties.refreshElements.required = ["value"];
9615
9759
  schema2.properties.refreshElements.items.required = ["value"];
@@ -9623,9 +9767,34 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9623
9767
  ];
9624
9768
  }
9625
9769
  if (sessionStorage.getItem("copiedConfig")) {
9626
- Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(uiSchema);
9770
+ Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(
9771
+ uiSchema
9772
+ );
9627
9773
  schema2.properties.RemoveItemButton.disabled = false;
9628
9774
  }
9775
+ const config2 = JSON.parse(sessionStorage.getItem("pageFormdata"));
9776
+ const path = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
9777
+ const id = (_b = store22.searchParams) == null ? void 0 : _b.get("id");
9778
+ let pathArray = [{ label: (_c = config2.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
9779
+ if (path) {
9780
+ const pathArrayAll = path.split(".");
9781
+ const arr = [];
9782
+ pathArrayAll.map((e, i) => {
9783
+ if (i === 0) {
9784
+ arr.push(e);
9785
+ return;
9786
+ }
9787
+ arr.push(`${arr[i - 1]}.${e}`);
9788
+ });
9789
+ arr.map((e) => {
9790
+ const data = _.get(config2, e);
9791
+ pathArray.push({
9792
+ label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
9793
+ path: (data == null ? void 0 : data.eventType) ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ""}` : `/Component?path=${e}${id ? `&id=${id}` : ""}`
9794
+ });
9795
+ });
9796
+ }
9797
+ schema2.properties.pageName.path = pathArray;
9629
9798
  store22.setSchema(schema2);
9630
9799
  store22.setUiSchema(uiSchema);
9631
9800
  },
@@ -9634,10 +9803,34 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9634
9803
  return EventUiSchema;
9635
9804
  },
9636
9805
  getSchema: () => {
9806
+ var _a, _b, _c;
9637
9807
  const schema2 = _.cloneDeep(EventSchema);
9638
9808
  if (sessionStorage.getItem("copiedConfig")) {
9639
9809
  schema2.properties.RemoveItemButton.disabled = false;
9640
9810
  }
9811
+ const config2 = JSON.parse(sessionStorage.getItem("pageFormdata"));
9812
+ const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
9813
+ const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
9814
+ let pathArray = [{ label: (_c = config2.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
9815
+ if (path) {
9816
+ const pathArrayAll = path.split(".");
9817
+ const arr = [];
9818
+ pathArrayAll.map((e, i) => {
9819
+ if (i === 0) {
9820
+ arr.push(e);
9821
+ return;
9822
+ }
9823
+ arr.push(`${arr[i - 1]}.${e}`);
9824
+ });
9825
+ arr.map((e) => {
9826
+ const data = _.get(config2, e);
9827
+ pathArray.push({
9828
+ label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
9829
+ path: (data == null ? void 0 : data.eventType) ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ""}` : `/Component?path=${e}${id ? `&id=${id}` : ""}`
9830
+ });
9831
+ });
9832
+ }
9833
+ schema2.properties.pageName.path = _.cloneDeep(pathArray);
9641
9834
  return schema2;
9642
9835
  },
9643
9836
  okHandler: () => okHandler(store2),
@@ -9645,7 +9838,10 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9645
9838
  onChange: function() {
9646
9839
  var _a, _b, _c;
9647
9840
  if (((_a = store2 == null ? void 0 : store2.formData) == null ? void 0 : _a.Handler) !== ((_b = store2 == null ? void 0 : store2.newData) == null ? void 0 : _b.Handler) && ((_c = store2 == null ? void 0 : store2.newData) == null ? void 0 : _c.Handler) !== void 0) {
9648
- this.refreshPage(store2.newData.Handler || store2.formdata.Handler, store2);
9841
+ this.refreshPage(
9842
+ store2.newData.Handler || store2.formdata.Handler,
9843
+ store2
9844
+ );
9649
9845
  }
9650
9846
  },
9651
9847
  addEvent: function() {
@@ -9671,7 +9867,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9671
9867
  this.setPage();
9672
9868
  },
9673
9869
  deleteEvent: async function() {
9674
- await Component(store2, dynamicData2, submitHandler, service2).deleteEvent(false);
9870
+ await Component(store2, dynamicData2, submitHandler, service2).deleteEvent(
9871
+ false
9872
+ );
9675
9873
  store2.updateDialog("popUpEvent");
9676
9874
  },
9677
9875
  backHandler: function() {
@@ -9683,10 +9881,15 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
9683
9881
  store2.updateDialog("popUpEvent");
9684
9882
  },
9685
9883
  copyPasteElement: function() {
9686
- Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(store2, this.setPage.bind(this));
9884
+ Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(
9885
+ store2,
9886
+ this.setPage.bind(this)
9887
+ );
9687
9888
  },
9688
9889
  RemoveItemButton: function() {
9689
- Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(store2);
9890
+ Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(
9891
+ store2
9892
+ );
9690
9893
  }
9691
9894
  };
9692
9895
  };
@@ -9857,16 +10060,17 @@ function executeCustomHandler(params) {
9857
10060
  }
9858
10061
  }
9859
10062
  function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
10063
+ var _a, _b, _c;
9860
10064
  if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
9861
10065
  if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
9862
10066
  store2.setSchema((pre) => {
9863
- var _a;
10067
+ var _a2;
9864
10068
  return {
9865
10069
  ...pre,
9866
10070
  properties: {
9867
10071
  ...pre.properties,
9868
10072
  [componentName]: {
9869
- ...(_a = pre.properties) == null ? void 0 : _a[componentName],
10073
+ ...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
9870
10074
  oneOf: handlerResponse.data
9871
10075
  }
9872
10076
  }
@@ -9876,13 +10080,13 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
9876
10080
  } else if (eventConfig.type === "MultipleSelect" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
9877
10081
  if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
9878
10082
  store2.setSchema((pre) => {
9879
- var _a;
10083
+ var _a2;
9880
10084
  return {
9881
10085
  ...pre,
9882
10086
  properties: {
9883
10087
  ...pre.properties,
9884
10088
  [componentName]: {
9885
- ...(_a = pre.properties) == null ? void 0 : _a[componentName],
10089
+ ...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
9886
10090
  type: "array",
9887
10091
  items: {
9888
10092
  oneOf: handlerResponse == null ? void 0 : handlerResponse.data
@@ -9902,6 +10106,14 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
9902
10106
  return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
9903
10107
  });
9904
10108
  }
10109
+ } else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
10110
+ if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10111
+ formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
10112
+ formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
10113
+ store2.setFormdata((pre) => {
10114
+ return { ...pre, ...formDataHolder };
10115
+ });
10116
+ }
9905
10117
  } else {
9906
10118
  if (handlerResponse) {
9907
10119
  formDataHolder[componentName] = handlerResponse.data;
@@ -10058,7 +10270,7 @@ var service = (funcParams) => {
10058
10270
  };
10059
10271
  return {
10060
10272
  setPage: async function() {
10061
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
10273
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
10062
10274
  funcParams.store.setFormdata({});
10063
10275
  funcParams.store.newData = {};
10064
10276
  const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData");
@@ -10073,12 +10285,21 @@ var service = (funcParams) => {
10073
10285
  }));
10074
10286
  }
10075
10287
  const config2 = pageData == null ? void 0 : pageData.config;
10288
+ const pathParts = funcParams.store.location.pathname.split("/");
10289
+ const programId = ((_a = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")) == null ? void 0 : _a.value) || "programID";
10290
+ if (pathParts.length >= 2) {
10291
+ if (pathParts[2] !== programId + "") {
10292
+ pathParts[2] = programId;
10293
+ const newPath = pathParts.slice(0, 3).join("/");
10294
+ funcParams.store.navigate(newPath);
10295
+ }
10296
+ }
10076
10297
  const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
10077
10298
  const event2 = new CustomEvent("pageNameChanged", {
10078
10299
  detail: { pageName: config2.label }
10079
10300
  });
10080
10301
  window.dispatchEvent(event2);
10081
- const theme = (_b = (_a = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _a.theme) == null ? void 0 : _b.myTheme;
10302
+ const theme = (_c = (_b = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _b.theme) == null ? void 0 : _c.myTheme;
10082
10303
  uiSchema.elements.push(
10083
10304
  {
10084
10305
  type: "HorizontalLayout",
@@ -10108,7 +10329,7 @@ var service = (funcParams) => {
10108
10329
  heading: "Copywriter@ACT21.IO"
10109
10330
  },
10110
10331
  style: {
10111
- color: ((_d = (_c = theme == null ? void 0 : theme.palette) == null ? void 0 : _c.text) == null ? void 0 : _d.disabled) || "#AFAFAF",
10332
+ color: ((_e = (_d = theme == null ? void 0 : theme.palette) == null ? void 0 : _d.text) == null ? void 0 : _e.disabled) || "#AFAFAF",
10112
10333
  fontSize: "11px",
10113
10334
  textAlign: "center",
10114
10335
  lineHeight: 2,
@@ -10135,7 +10356,7 @@ var service = (funcParams) => {
10135
10356
  width: "fit-content"
10136
10357
  },
10137
10358
  style: {
10138
- fill: (_f = (_e = theme == null ? void 0 : theme.palette) == null ? void 0 : _e.primary) == null ? void 0 : _f.main,
10359
+ fill: (_g = (_f = theme == null ? void 0 : theme.palette) == null ? void 0 : _f.primary) == null ? void 0 : _g.main,
10139
10360
  width: 20,
10140
10361
  height: 0,
10141
10362
  top: 0,
@@ -10144,7 +10365,7 @@ var service = (funcParams) => {
10144
10365
  fontSize: "12px",
10145
10366
  cursor: "pointer",
10146
10367
  ":hover": {
10147
- fill: (_h = (_g = theme == null ? void 0 : theme.palette) == null ? void 0 : _g.primary) == null ? void 0 : _h.dark
10368
+ fill: (_i = (_h = theme == null ? void 0 : theme.palette) == null ? void 0 : _h.primary) == null ? void 0 : _i.dark
10148
10369
  },
10149
10370
  marginRight: "20px"
10150
10371
  }
@@ -10167,7 +10388,7 @@ var service = (funcParams) => {
10167
10388
  lineHeight: 1,
10168
10389
  height: 0,
10169
10390
  width: "fit-content",
10170
- color: (_j = (_i = theme == null ? void 0 : theme.palette) == null ? void 0 : _i.primary) == null ? void 0 : _j.main,
10391
+ color: (_k = (_j = theme == null ? void 0 : theme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main,
10171
10392
  fontSize: "12px",
10172
10393
  cursor: "pointer",
10173
10394
  marginLeft: "2px",
@@ -10175,7 +10396,7 @@ var service = (funcParams) => {
10175
10396
  right: "12px",
10176
10397
  position: "absolute",
10177
10398
  ":hover": {
10178
- color: (_l = (_k = theme == null ? void 0 : theme.palette) == null ? void 0 : _k.primary) == null ? void 0 : _l.dark
10399
+ color: (_m = (_l = theme == null ? void 0 : theme.palette) == null ? void 0 : _l.primary) == null ? void 0 : _m.dark
10179
10400
  },
10180
10401
  marginRight: "4px"
10181
10402
  }
@@ -10184,7 +10405,7 @@ var service = (funcParams) => {
10184
10405
  ]
10185
10406
  }
10186
10407
  );
10187
- const schema2 = (_m = pageData == null ? void 0 : pageData.schema) != null ? _m : { type: "object", properties: {} };
10408
+ const schema2 = (_n = pageData == null ? void 0 : pageData.schema) != null ? _n : { type: "object", properties: {} };
10188
10409
  eventGroups = extractEvents(config2);
10189
10410
  executeEventsParameters = {
10190
10411
  config: {},
@@ -10207,7 +10428,7 @@ var service = (funcParams) => {
10207
10428
  service: funcParams.service,
10208
10429
  serviceHolder: this,
10209
10430
  eventGroups,
10210
- formDataHolder
10431
+ formDataHolder: {}
10211
10432
  });
10212
10433
  funcParams.store.setSchema(
10213
10434
  (pre) => {
@@ -10222,11 +10443,11 @@ var service = (funcParams) => {
10222
10443
  funcParams.store.setUiSchema(uiSchema);
10223
10444
  },
10224
10445
  onCellRenderer: (cellParams) => {
10225
- var _a, _b, _c;
10446
+ var _a, _b, _c, _d;
10226
10447
  if (eventGroups.onCellRenderer) {
10227
10448
  let finalResponse = {};
10228
10449
  const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || ((_c = (_b = funcParams == null ? void 0 : funcParams.dynamicData) == null ? void 0 : _b.path) == null ? void 0 : _c.split(".")[0]);
10229
- for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
10450
+ for (const eventConfig of (_d = eventGroups == null ? void 0 : eventGroups.onCellRenderer) == null ? void 0 : _d[path]) {
10230
10451
  executeEventsParameters.store.functionParameters = cellParams;
10231
10452
  finalResponse = executeEvents({
10232
10453
  ...executeEventsParameters,
@@ -10830,6 +11051,9 @@ const buildTextField = (config2, componentScope2) => {
10830
11051
  if (config2.style) {
10831
11052
  inputField.config.style = JSON.parse(config2.style);
10832
11053
  }
11054
+ if (config2.multiline) {
11055
+ inputField.config.main.multiline = config2.multiline === "YES" ? true : false;
11056
+ }
10833
11057
  if (config2.InputFormatingAndMasking) {
10834
11058
  inputField.config.main.formatStrArray = config2.InputFormatingAndMasking.map((e) => e.formatElement);
10835
11059
  }
@@ -12355,19 +12579,12 @@ const buildUiSchema = (config2, store2) => {
12355
12579
  });
12356
12580
  } else if (config2.type == "Table") {
12357
12581
  const sizeMap = {};
12358
- const filterMap = {};
12359
12582
  if (config2.sizeHolder) {
12360
12583
  config2.sizeHolder.map((e, i) => {
12361
12584
  sizeMap[e.keyName] = e.value;
12362
12585
  });
12363
12586
  }
12364
- if (config2.enableColumnFilter) {
12365
- config2.enableColumnFilter.map((e) => {
12366
- filterMap[e.keyName] = true;
12367
- });
12368
- }
12369
12587
  elements.elements = config2.elements.map((cellElem, elemInd) => {
12370
- var _a, _b;
12371
12588
  if (cellElem.type) {
12372
12589
  return {
12373
12590
  accessorKey: cellElem.name,
@@ -12376,8 +12593,9 @@ const buildUiSchema = (config2, store2) => {
12376
12593
  type: cellElem.columnFormat,
12377
12594
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
12378
12595
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store2)) : [],
12379
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_a = filterMap[cellElem.name]) != null ? _a : false,
12380
- columnFilterModeOptions: config2.filteringOptions
12596
+ columnFilterModeOptions: cellElem.filteringOptions,
12597
+ enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
12598
+ enableSorting: cellElem.enableSorting === "Yes" ? true : false
12381
12599
  };
12382
12600
  } else {
12383
12601
  return {
@@ -12385,8 +12603,9 @@ const buildUiSchema = (config2, store2) => {
12385
12603
  type: cellElem.columnFormat,
12386
12604
  header: cellElem.label || cellElem.name,
12387
12605
  size: sizeMap[cellElem.name] || 180,
12388
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_b = filterMap[cellElem.name]) != null ? _b : false,
12389
- columnFilterModeOptions: config2.filteringOptions
12606
+ columnFilterModeOptions: cellElem.filteringOptions,
12607
+ enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
12608
+ enableSorting: cellElem.enableSorting === "Yes" ? true : false
12390
12609
  };
12391
12610
  }
12392
12611
  });