impaktapps-ui-builder 0.0.101-alpha.35 → 0.0.101-alpha.351
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.
- package/dist/impaktapps-ui-builder.es.js +329 -113
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +6 -0
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +6 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +14 -10
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +4 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +48 -14
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +21 -14
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +13 -31
- package/src/impaktapps-ui-builder/builder/services/component.ts +127 -11
- package/src/impaktapps-ui-builder/builder/services/event.ts +159 -58
- package/src/impaktapps-ui-builder/runtime/services/events.ts +8 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +14 -110
|
@@ -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: "
|
|
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: "
|
|
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
|
|
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
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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
|
-
|
|
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,16 +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
|
|
8447
|
-
const
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
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
|
+
}
|
|
8456
8530
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8457
8531
|
this.ElementPathSetter(UiSchema);
|
|
8458
8532
|
}
|
|
@@ -8474,10 +8548,34 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8474
8548
|
return getFormdataFromSessionStorage(path);
|
|
8475
8549
|
},
|
|
8476
8550
|
getSchema: function() {
|
|
8551
|
+
var _a, _b, _c;
|
|
8477
8552
|
const schema2 = _.cloneDeep(ComponentSchema);
|
|
8478
8553
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8479
8554
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
8480
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;
|
|
8481
8579
|
return schema2;
|
|
8482
8580
|
},
|
|
8483
8581
|
okHandler: () => okHandler(store2),
|
|
@@ -8590,6 +8688,10 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8590
8688
|
const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
|
|
8591
8689
|
this.ElementPathSetter(uiSchema, copiedFormData);
|
|
8592
8690
|
sessionStorage.setItem("copiedConfig", JSON.stringify(copiedFormData));
|
|
8691
|
+
store2.setNotify({
|
|
8692
|
+
SuccessMessage: `${elementType} Copied Successfully`,
|
|
8693
|
+
Success: true
|
|
8694
|
+
});
|
|
8593
8695
|
store2.setSchema(schema2);
|
|
8594
8696
|
store2.setUiSchema(uiSchema);
|
|
8595
8697
|
},
|
|
@@ -8649,8 +8751,18 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8649
8751
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
8650
8752
|
},
|
|
8651
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;
|
|
8652
8755
|
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8653
|
-
uiSchema.elements[
|
|
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
|
+
}
|
|
8654
8766
|
}
|
|
8655
8767
|
};
|
|
8656
8768
|
};
|
|
@@ -8849,6 +8961,9 @@ const EventSchema = {
|
|
|
8849
8961
|
},
|
|
8850
8962
|
RemoveItemButton: {
|
|
8851
8963
|
disabled: true
|
|
8964
|
+
},
|
|
8965
|
+
pageName: {
|
|
8966
|
+
path: [{ label: "defaultLabel", path: "defaultPath" }]
|
|
8852
8967
|
}
|
|
8853
8968
|
},
|
|
8854
8969
|
required: ["eventType", "Handler"]
|
|
@@ -9160,15 +9275,17 @@ const EventUiSchema = (theme) => {
|
|
|
9160
9275
|
config: {
|
|
9161
9276
|
layout: 11,
|
|
9162
9277
|
main: {
|
|
9163
|
-
heading: "Are you sure you want to delete ?"
|
|
9278
|
+
heading: "Are you sure you want to delete this Event ?"
|
|
9164
9279
|
},
|
|
9165
9280
|
style: {
|
|
9166
|
-
marginTop: "-20px",
|
|
9167
9281
|
fontSize: "20px",
|
|
9168
9282
|
"&.MuiTypography-root": {
|
|
9169
|
-
padding: "
|
|
9283
|
+
padding: "0px 20px",
|
|
9170
9284
|
textAlign: "center",
|
|
9171
|
-
lineHeight: "1"
|
|
9285
|
+
lineHeight: "1.2",
|
|
9286
|
+
fontWeight: "normal",
|
|
9287
|
+
fontSize: "18px",
|
|
9288
|
+
marginBottom: theme.spacing(5)
|
|
9172
9289
|
}
|
|
9173
9290
|
}
|
|
9174
9291
|
}
|
|
@@ -9192,13 +9309,14 @@ const EventUiSchema = (theme) => {
|
|
|
9192
9309
|
name: "No",
|
|
9193
9310
|
startIcon: "ApproveIcon",
|
|
9194
9311
|
variant: "contained",
|
|
9195
|
-
color: "info",
|
|
9196
9312
|
type: "text",
|
|
9197
9313
|
onClick: "deletePopUpEvent",
|
|
9198
9314
|
size: "large"
|
|
9199
9315
|
},
|
|
9200
9316
|
style: {
|
|
9201
9317
|
position: "absolute",
|
|
9318
|
+
padding: "8px 0px",
|
|
9319
|
+
fontSize: "16px",
|
|
9202
9320
|
bottom: 0,
|
|
9203
9321
|
left: 0,
|
|
9204
9322
|
width: "50%",
|
|
@@ -9226,7 +9344,6 @@ const EventUiSchema = (theme) => {
|
|
|
9226
9344
|
layout: 6,
|
|
9227
9345
|
main: {
|
|
9228
9346
|
name: "Yes",
|
|
9229
|
-
startIcon: "ApproveIcon",
|
|
9230
9347
|
variant: "contained",
|
|
9231
9348
|
color: "error",
|
|
9232
9349
|
type: "text",
|
|
@@ -9235,6 +9352,8 @@ const EventUiSchema = (theme) => {
|
|
|
9235
9352
|
},
|
|
9236
9353
|
style: {
|
|
9237
9354
|
position: "absolute",
|
|
9355
|
+
padding: "8px 0px",
|
|
9356
|
+
fontSize: "16px",
|
|
9238
9357
|
bottom: 0,
|
|
9239
9358
|
right: 0,
|
|
9240
9359
|
width: "50%",
|
|
@@ -9259,23 +9378,20 @@ const EventUiSchema = (theme) => {
|
|
|
9259
9378
|
type: "Control",
|
|
9260
9379
|
scope: "#/properties/pageName",
|
|
9261
9380
|
options: {
|
|
9262
|
-
widget: "
|
|
9381
|
+
widget: "Breadcrumb"
|
|
9263
9382
|
},
|
|
9264
9383
|
config: {
|
|
9265
9384
|
layout: 12,
|
|
9266
|
-
main: {
|
|
9267
|
-
heading: ""
|
|
9268
|
-
},
|
|
9385
|
+
main: {},
|
|
9269
9386
|
style: {
|
|
9270
9387
|
paddingLeft: theme.spacing(3),
|
|
9271
|
-
width: "100%",
|
|
9272
|
-
fontSize: "10px",
|
|
9273
9388
|
color: theme.palette.grey[600],
|
|
9389
|
+
fontSize: "10px",
|
|
9274
9390
|
position: "fixed",
|
|
9275
9391
|
bottom: "24px",
|
|
9276
|
-
backgroundColor: theme.palette.background.default,
|
|
9277
9392
|
borderBottom: `1px solid ${theme.palette.common.black}29`,
|
|
9278
|
-
borderTop: `1px solid ${theme.palette.common.black}29
|
|
9393
|
+
borderTop: `1px solid ${theme.palette.common.black}29`,
|
|
9394
|
+
backgroundColor: theme.palette.background.default
|
|
9279
9395
|
}
|
|
9280
9396
|
}
|
|
9281
9397
|
},
|
|
@@ -9566,15 +9682,21 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9566
9682
|
const formdata = await this.getFormData();
|
|
9567
9683
|
store2.setFormdata(formdata);
|
|
9568
9684
|
const schema2 = await this.getSchema();
|
|
9685
|
+
console.log("SettingSchema>>", schema2);
|
|
9569
9686
|
store2.setSchema(schema2);
|
|
9570
9687
|
this.refreshPage(formdata.Handler, store2);
|
|
9571
9688
|
},
|
|
9572
9689
|
refreshPage: (handlerType, store22) => {
|
|
9690
|
+
var _a, _b, _c;
|
|
9573
9691
|
const uiSchema = _.cloneDeep(EventUiSchema(store22.theme.myTheme));
|
|
9574
9692
|
const schema2 = _.cloneDeep(EventSchema);
|
|
9575
9693
|
if (handlerType) {
|
|
9576
9694
|
if (handlerType === "custom") {
|
|
9577
|
-
uiSchema.elements[0].elements[0].elements[2] = getRadioInputField(
|
|
9695
|
+
uiSchema.elements[0].elements[0].elements[2] = getRadioInputField(
|
|
9696
|
+
"isSync",
|
|
9697
|
+
"Run in Sync",
|
|
9698
|
+
["Yes", "No"]
|
|
9699
|
+
);
|
|
9578
9700
|
uiSchema.elements[0].elements[0].elements[3] = {
|
|
9579
9701
|
type: "Control",
|
|
9580
9702
|
scope: "#/properties/emptyBox",
|
|
@@ -9587,14 +9709,26 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9587
9709
|
style: {}
|
|
9588
9710
|
}
|
|
9589
9711
|
};
|
|
9590
|
-
uiSchema.elements[0].elements[0].elements[4] = getTextArea(
|
|
9712
|
+
uiSchema.elements[0].elements[0].elements[4] = getTextArea(
|
|
9713
|
+
"eventCode",
|
|
9714
|
+
"Write Custom Code",
|
|
9715
|
+
false
|
|
9716
|
+
);
|
|
9591
9717
|
schema2.required = ["eventType", "Handler", "eventCode"];
|
|
9592
9718
|
} else if (handlerType === "api") {
|
|
9593
|
-
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
9719
|
+
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
9720
|
+
xs: 0,
|
|
9721
|
+
sm: 0,
|
|
9722
|
+
md: 4,
|
|
9723
|
+
lg: 6
|
|
9724
|
+
});
|
|
9594
9725
|
uiSchema.elements[0].elements[0].elements[3] = APISection;
|
|
9595
9726
|
schema2.required = ["eventType", "Handler", "method", "path"];
|
|
9596
9727
|
} else if (handlerType === "inBuiltFunction") {
|
|
9597
|
-
uiSchema.elements[0].elements[0].elements[2] = getSelectField(
|
|
9728
|
+
uiSchema.elements[0].elements[0].elements[2] = getSelectField(
|
|
9729
|
+
"inBuiltFunctionType",
|
|
9730
|
+
"Function Name"
|
|
9731
|
+
);
|
|
9598
9732
|
uiSchema.elements[0].elements[0].elements[3] = {
|
|
9599
9733
|
type: "Control",
|
|
9600
9734
|
scope: "#/properties/emptyBox",
|
|
@@ -9607,10 +9741,19 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9607
9741
|
style: {}
|
|
9608
9742
|
}
|
|
9609
9743
|
};
|
|
9610
|
-
uiSchema.elements[0].elements[0].elements[4] = getTextArea(
|
|
9744
|
+
uiSchema.elements[0].elements[0].elements[4] = getTextArea(
|
|
9745
|
+
"funcParametersCode",
|
|
9746
|
+
"Write Custom Code for Functions Parameter",
|
|
9747
|
+
true
|
|
9748
|
+
);
|
|
9611
9749
|
schema2.required = ["eventType", "Handler", "inBuiltFunctionType"];
|
|
9612
9750
|
} else if (handlerType === "refresh") {
|
|
9613
|
-
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
9751
|
+
uiSchema.elements[0].elements[0].elements[2] = emptyBox$1("emptyBox", {
|
|
9752
|
+
xs: 0,
|
|
9753
|
+
sm: 0,
|
|
9754
|
+
md: 4,
|
|
9755
|
+
lg: 6
|
|
9756
|
+
});
|
|
9614
9757
|
uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
|
|
9615
9758
|
schema2.properties.refreshElements.required = ["value"];
|
|
9616
9759
|
schema2.properties.refreshElements.items.required = ["value"];
|
|
@@ -9624,9 +9767,34 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9624
9767
|
];
|
|
9625
9768
|
}
|
|
9626
9769
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
9627
|
-
Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(
|
|
9770
|
+
Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(
|
|
9771
|
+
uiSchema
|
|
9772
|
+
);
|
|
9628
9773
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
9629
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;
|
|
9630
9798
|
store22.setSchema(schema2);
|
|
9631
9799
|
store22.setUiSchema(uiSchema);
|
|
9632
9800
|
},
|
|
@@ -9635,10 +9803,34 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9635
9803
|
return EventUiSchema;
|
|
9636
9804
|
},
|
|
9637
9805
|
getSchema: () => {
|
|
9806
|
+
var _a, _b, _c;
|
|
9638
9807
|
const schema2 = _.cloneDeep(EventSchema);
|
|
9639
9808
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
9640
9809
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
9641
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);
|
|
9642
9834
|
return schema2;
|
|
9643
9835
|
},
|
|
9644
9836
|
okHandler: () => okHandler(store2),
|
|
@@ -9646,7 +9838,10 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9646
9838
|
onChange: function() {
|
|
9647
9839
|
var _a, _b, _c;
|
|
9648
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) {
|
|
9649
|
-
this.refreshPage(
|
|
9841
|
+
this.refreshPage(
|
|
9842
|
+
store2.newData.Handler || store2.formdata.Handler,
|
|
9843
|
+
store2
|
|
9844
|
+
);
|
|
9650
9845
|
}
|
|
9651
9846
|
},
|
|
9652
9847
|
addEvent: function() {
|
|
@@ -9672,7 +9867,9 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9672
9867
|
this.setPage();
|
|
9673
9868
|
},
|
|
9674
9869
|
deleteEvent: async function() {
|
|
9675
|
-
await Component(store2, dynamicData2, submitHandler, service2).deleteEvent(
|
|
9870
|
+
await Component(store2, dynamicData2, submitHandler, service2).deleteEvent(
|
|
9871
|
+
false
|
|
9872
|
+
);
|
|
9676
9873
|
store2.updateDialog("popUpEvent");
|
|
9677
9874
|
},
|
|
9678
9875
|
backHandler: function() {
|
|
@@ -9684,10 +9881,15 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9684
9881
|
store2.updateDialog("popUpEvent");
|
|
9685
9882
|
},
|
|
9686
9883
|
copyPasteElement: function() {
|
|
9687
|
-
Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(
|
|
9884
|
+
Component(store2, dynamicData2, submitHandler, service2).copyPasteElement(
|
|
9885
|
+
store2,
|
|
9886
|
+
this.setPage.bind(this)
|
|
9887
|
+
);
|
|
9688
9888
|
},
|
|
9689
9889
|
RemoveItemButton: function() {
|
|
9690
|
-
Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(
|
|
9890
|
+
Component(store2, dynamicData2, submitHandler, service2).RemoveItemButton(
|
|
9891
|
+
store2
|
|
9892
|
+
);
|
|
9691
9893
|
}
|
|
9692
9894
|
};
|
|
9693
9895
|
};
|
|
@@ -9858,16 +10060,17 @@ function executeCustomHandler(params) {
|
|
|
9858
10060
|
}
|
|
9859
10061
|
}
|
|
9860
10062
|
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
|
|
10063
|
+
var _a, _b, _c;
|
|
9861
10064
|
if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9862
10065
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9863
10066
|
store2.setSchema((pre) => {
|
|
9864
|
-
var
|
|
10067
|
+
var _a2;
|
|
9865
10068
|
return {
|
|
9866
10069
|
...pre,
|
|
9867
10070
|
properties: {
|
|
9868
10071
|
...pre.properties,
|
|
9869
10072
|
[componentName]: {
|
|
9870
|
-
...(
|
|
10073
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9871
10074
|
oneOf: handlerResponse.data
|
|
9872
10075
|
}
|
|
9873
10076
|
}
|
|
@@ -9877,13 +10080,13 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9877
10080
|
} else if (eventConfig.type === "MultipleSelect" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9878
10081
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9879
10082
|
store2.setSchema((pre) => {
|
|
9880
|
-
var
|
|
10083
|
+
var _a2;
|
|
9881
10084
|
return {
|
|
9882
10085
|
...pre,
|
|
9883
10086
|
properties: {
|
|
9884
10087
|
...pre.properties,
|
|
9885
10088
|
[componentName]: {
|
|
9886
|
-
...(
|
|
10089
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9887
10090
|
type: "array",
|
|
9888
10091
|
items: {
|
|
9889
10092
|
oneOf: handlerResponse == null ? void 0 : handlerResponse.data
|
|
@@ -9903,6 +10106,14 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9903
10106
|
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
9904
10107
|
});
|
|
9905
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
|
+
}
|
|
9906
10117
|
} else {
|
|
9907
10118
|
if (handlerResponse) {
|
|
9908
10119
|
formDataHolder[componentName] = handlerResponse.data;
|
|
@@ -10059,7 +10270,7 @@ var service = (funcParams) => {
|
|
|
10059
10270
|
};
|
|
10060
10271
|
return {
|
|
10061
10272
|
setPage: async function() {
|
|
10062
|
-
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;
|
|
10063
10274
|
funcParams.store.setFormdata({});
|
|
10064
10275
|
funcParams.store.newData = {};
|
|
10065
10276
|
const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData");
|
|
@@ -10074,12 +10285,19 @@ var service = (funcParams) => {
|
|
|
10074
10285
|
}));
|
|
10075
10286
|
}
|
|
10076
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 == null ? void 0 : pathParts[1]) === "page") {
|
|
10291
|
+
if (programId !== "programID") {
|
|
10292
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, programId }));
|
|
10293
|
+
}
|
|
10294
|
+
}
|
|
10077
10295
|
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
10078
10296
|
const event2 = new CustomEvent("pageNameChanged", {
|
|
10079
10297
|
detail: { pageName: config2.label }
|
|
10080
10298
|
});
|
|
10081
10299
|
window.dispatchEvent(event2);
|
|
10082
|
-
const theme = (
|
|
10300
|
+
const theme = (_c = (_b = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _b.theme) == null ? void 0 : _c.myTheme;
|
|
10083
10301
|
uiSchema.elements.push(
|
|
10084
10302
|
{
|
|
10085
10303
|
type: "HorizontalLayout",
|
|
@@ -10109,7 +10327,7 @@ var service = (funcParams) => {
|
|
|
10109
10327
|
heading: "Copywriter@ACT21.IO"
|
|
10110
10328
|
},
|
|
10111
10329
|
style: {
|
|
10112
|
-
color: ((
|
|
10330
|
+
color: ((_e = (_d = theme == null ? void 0 : theme.palette) == null ? void 0 : _d.text) == null ? void 0 : _e.disabled) || "#AFAFAF",
|
|
10113
10331
|
fontSize: "11px",
|
|
10114
10332
|
textAlign: "center",
|
|
10115
10333
|
lineHeight: 2,
|
|
@@ -10136,7 +10354,7 @@ var service = (funcParams) => {
|
|
|
10136
10354
|
width: "fit-content"
|
|
10137
10355
|
},
|
|
10138
10356
|
style: {
|
|
10139
|
-
fill: (
|
|
10357
|
+
fill: (_g = (_f = theme == null ? void 0 : theme.palette) == null ? void 0 : _f.primary) == null ? void 0 : _g.main,
|
|
10140
10358
|
width: 20,
|
|
10141
10359
|
height: 0,
|
|
10142
10360
|
top: 0,
|
|
@@ -10145,7 +10363,7 @@ var service = (funcParams) => {
|
|
|
10145
10363
|
fontSize: "12px",
|
|
10146
10364
|
cursor: "pointer",
|
|
10147
10365
|
":hover": {
|
|
10148
|
-
fill: (
|
|
10366
|
+
fill: (_i = (_h = theme == null ? void 0 : theme.palette) == null ? void 0 : _h.primary) == null ? void 0 : _i.dark
|
|
10149
10367
|
},
|
|
10150
10368
|
marginRight: "20px"
|
|
10151
10369
|
}
|
|
@@ -10168,7 +10386,7 @@ var service = (funcParams) => {
|
|
|
10168
10386
|
lineHeight: 1,
|
|
10169
10387
|
height: 0,
|
|
10170
10388
|
width: "fit-content",
|
|
10171
|
-
color: (
|
|
10389
|
+
color: (_k = (_j = theme == null ? void 0 : theme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main,
|
|
10172
10390
|
fontSize: "12px",
|
|
10173
10391
|
cursor: "pointer",
|
|
10174
10392
|
marginLeft: "2px",
|
|
@@ -10176,7 +10394,7 @@ var service = (funcParams) => {
|
|
|
10176
10394
|
right: "12px",
|
|
10177
10395
|
position: "absolute",
|
|
10178
10396
|
":hover": {
|
|
10179
|
-
color: (
|
|
10397
|
+
color: (_m = (_l = theme == null ? void 0 : theme.palette) == null ? void 0 : _l.primary) == null ? void 0 : _m.dark
|
|
10180
10398
|
},
|
|
10181
10399
|
marginRight: "4px"
|
|
10182
10400
|
}
|
|
@@ -10185,7 +10403,7 @@ var service = (funcParams) => {
|
|
|
10185
10403
|
]
|
|
10186
10404
|
}
|
|
10187
10405
|
);
|
|
10188
|
-
const schema2 = (
|
|
10406
|
+
const schema2 = (_n = pageData == null ? void 0 : pageData.schema) != null ? _n : { type: "object", properties: {} };
|
|
10189
10407
|
eventGroups = extractEvents(config2);
|
|
10190
10408
|
executeEventsParameters = {
|
|
10191
10409
|
config: {},
|
|
@@ -10208,7 +10426,7 @@ var service = (funcParams) => {
|
|
|
10208
10426
|
service: funcParams.service,
|
|
10209
10427
|
serviceHolder: this,
|
|
10210
10428
|
eventGroups,
|
|
10211
|
-
formDataHolder
|
|
10429
|
+
formDataHolder: {}
|
|
10212
10430
|
});
|
|
10213
10431
|
funcParams.store.setSchema(
|
|
10214
10432
|
(pre) => {
|
|
@@ -10223,11 +10441,11 @@ var service = (funcParams) => {
|
|
|
10223
10441
|
funcParams.store.setUiSchema(uiSchema);
|
|
10224
10442
|
},
|
|
10225
10443
|
onCellRenderer: (cellParams) => {
|
|
10226
|
-
var _a, _b, _c;
|
|
10444
|
+
var _a, _b, _c, _d;
|
|
10227
10445
|
if (eventGroups.onCellRenderer) {
|
|
10228
10446
|
let finalResponse = {};
|
|
10229
10447
|
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]);
|
|
10230
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
|
|
10448
|
+
for (const eventConfig of (_d = eventGroups == null ? void 0 : eventGroups.onCellRenderer) == null ? void 0 : _d[path]) {
|
|
10231
10449
|
executeEventsParameters.store.functionParameters = cellParams;
|
|
10232
10450
|
finalResponse = executeEvents({
|
|
10233
10451
|
...executeEventsParameters,
|
|
@@ -10831,6 +11049,9 @@ const buildTextField = (config2, componentScope2) => {
|
|
|
10831
11049
|
if (config2.style) {
|
|
10832
11050
|
inputField.config.style = JSON.parse(config2.style);
|
|
10833
11051
|
}
|
|
11052
|
+
if (config2.multiline) {
|
|
11053
|
+
inputField.config.main.multiline = config2.multiline === "YES" ? true : false;
|
|
11054
|
+
}
|
|
10834
11055
|
if (config2.InputFormatingAndMasking) {
|
|
10835
11056
|
inputField.config.main.formatStrArray = config2.InputFormatingAndMasking.map((e) => e.formatElement);
|
|
10836
11057
|
}
|
|
@@ -12356,19 +12577,12 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12356
12577
|
});
|
|
12357
12578
|
} else if (config2.type == "Table") {
|
|
12358
12579
|
const sizeMap = {};
|
|
12359
|
-
const filterMap = {};
|
|
12360
12580
|
if (config2.sizeHolder) {
|
|
12361
12581
|
config2.sizeHolder.map((e, i) => {
|
|
12362
12582
|
sizeMap[e.keyName] = e.value;
|
|
12363
12583
|
});
|
|
12364
12584
|
}
|
|
12365
|
-
if (config2.enableColumnFilter) {
|
|
12366
|
-
config2.enableColumnFilter.map((e) => {
|
|
12367
|
-
filterMap[e.keyName] = true;
|
|
12368
|
-
});
|
|
12369
|
-
}
|
|
12370
12585
|
elements.elements = config2.elements.map((cellElem, elemInd) => {
|
|
12371
|
-
var _a, _b;
|
|
12372
12586
|
if (cellElem.type) {
|
|
12373
12587
|
return {
|
|
12374
12588
|
accessorKey: cellElem.name,
|
|
@@ -12377,8 +12591,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12377
12591
|
type: cellElem.columnFormat,
|
|
12378
12592
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
|
|
12379
12593
|
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store2)) : [],
|
|
12380
|
-
|
|
12381
|
-
|
|
12594
|
+
columnFilterModeOptions: cellElem.filteringOptions,
|
|
12595
|
+
enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
|
|
12596
|
+
enableSorting: cellElem.enableSorting === "Yes" ? true : false
|
|
12382
12597
|
};
|
|
12383
12598
|
} else {
|
|
12384
12599
|
return {
|
|
@@ -12386,8 +12601,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12386
12601
|
type: cellElem.columnFormat,
|
|
12387
12602
|
header: cellElem.label || cellElem.name,
|
|
12388
12603
|
size: sizeMap[cellElem.name] || 180,
|
|
12389
|
-
|
|
12390
|
-
|
|
12604
|
+
columnFilterModeOptions: cellElem.filteringOptions,
|
|
12605
|
+
enableColumnFilter: cellElem.enableFilter === "Yes" ? true : false,
|
|
12606
|
+
enableSorting: cellElem.enableSorting === "Yes" ? true : false
|
|
12391
12607
|
};
|
|
12392
12608
|
}
|
|
12393
12609
|
});
|