impaktapps-ui-builder 1.0.146 → 1.0.147-test.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.
- package/dist/impaktapps-ui-builder.es.js +823 -881
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +149 -198
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +14 -13
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -1
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +130 -185
- package/src/impaktapps-ui-builder/builder/build/uischema/cardOld.tsx +219 -0
|
@@ -7968,9 +7968,10 @@ const buildPropertiesSection = function(type) {
|
|
|
7968
7968
|
uiSchema.elements = [
|
|
7969
7969
|
getInputField("url", "Image Url"),
|
|
7970
7970
|
getInputField("label", "Label"),
|
|
7971
|
+
getInputField("value", "Value"),
|
|
7971
7972
|
getInputField("titleIcon", "Unicode of Icon for title"),
|
|
7972
7973
|
getInputField("description", "Description"),
|
|
7973
|
-
emptyBox$1("cardEmpty", { xs:
|
|
7974
|
+
emptyBox$1("cardEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
7974
7975
|
];
|
|
7975
7976
|
break;
|
|
7976
7977
|
case "Button":
|
|
@@ -8115,8 +8116,7 @@ const buildPropertiesSection = function(type) {
|
|
|
8115
8116
|
getRadioInputField("disableDelete", "Disable Delete", ["YES", "NO"]),
|
|
8116
8117
|
getRadioInputField("disableDownload", "Disable Download", ["YES", "NO"]),
|
|
8117
8118
|
getInputField("description", "Enter description"),
|
|
8118
|
-
|
|
8119
|
-
emptyBox$1("FileInputEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
8119
|
+
emptyBox$1("FileInputEmpty", { xs: 6, sm: 6, md: 8, lg: 9 })
|
|
8120
8120
|
];
|
|
8121
8121
|
break;
|
|
8122
8122
|
}
|
|
@@ -8480,12 +8480,12 @@ const createLayoutFormat = (layout, type) => {
|
|
|
8480
8480
|
});
|
|
8481
8481
|
return data;
|
|
8482
8482
|
};
|
|
8483
|
-
const flatObjectValueInArray = (
|
|
8484
|
-
if (
|
|
8483
|
+
const flatObjectValueInArray = (config = []) => {
|
|
8484
|
+
if (config.length < 1) {
|
|
8485
8485
|
return;
|
|
8486
8486
|
}
|
|
8487
|
-
const keyName = Object.keys(
|
|
8488
|
-
const data =
|
|
8487
|
+
const keyName = Object.keys(config[0])[0];
|
|
8488
|
+
const data = config.map((e) => {
|
|
8489
8489
|
return e[keyName];
|
|
8490
8490
|
});
|
|
8491
8491
|
return data;
|
|
@@ -8493,9 +8493,9 @@ const flatObjectValueInArray = (config2 = []) => {
|
|
|
8493
8493
|
const clearFromSessionStorage = () => {
|
|
8494
8494
|
sessionStorage.removeItem("pageFormdata");
|
|
8495
8495
|
};
|
|
8496
|
-
const getNavigationHistory = (
|
|
8496
|
+
const getNavigationHistory = (config, path) => {
|
|
8497
8497
|
if (path) {
|
|
8498
|
-
let urlRoutes =
|
|
8498
|
+
let urlRoutes = config.name;
|
|
8499
8499
|
const pathArrayAll = path.split(".");
|
|
8500
8500
|
const arr = [];
|
|
8501
8501
|
pathArrayAll.map((e, i) => {
|
|
@@ -8506,7 +8506,7 @@ const getNavigationHistory = (config2, path) => {
|
|
|
8506
8506
|
arr.push(`${arr[i - 1]}.${e}`);
|
|
8507
8507
|
});
|
|
8508
8508
|
arr.map((e) => {
|
|
8509
|
-
const data = _.get(
|
|
8509
|
+
const data = _.get(config, e);
|
|
8510
8510
|
if (data) {
|
|
8511
8511
|
urlRoutes = urlRoutes + ` > ${(data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType)}`;
|
|
8512
8512
|
} else {
|
|
@@ -8545,10 +8545,10 @@ async function saveHandler(store2, service2, submitHandler) {
|
|
|
8545
8545
|
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
8546
8546
|
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
8547
8547
|
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8548
|
-
const
|
|
8548
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
8549
8549
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
8550
8550
|
try {
|
|
8551
|
-
const saveReturn = await submitHandler(store2, service2,
|
|
8551
|
+
const saveReturn = await submitHandler(store2, service2, config);
|
|
8552
8552
|
navigateHandler(store2, true, "/PageMasterRecords");
|
|
8553
8553
|
} catch (err) {
|
|
8554
8554
|
navigateHandler(store2, false);
|
|
@@ -8792,10 +8792,10 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8792
8792
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8793
8793
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
8794
8794
|
}
|
|
8795
|
-
const
|
|
8795
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
8796
8796
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8797
8797
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
8798
|
-
let pathArray = [{ label: (_c =
|
|
8798
|
+
let pathArray = [{ label: (_c = config.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
|
|
8799
8799
|
if (path) {
|
|
8800
8800
|
const pathArrayAll = path.split(".");
|
|
8801
8801
|
const arr = [];
|
|
@@ -8807,7 +8807,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8807
8807
|
arr.push(`${arr[i - 1]}.${e}`);
|
|
8808
8808
|
});
|
|
8809
8809
|
arr.map((e) => {
|
|
8810
|
-
const data = _.get(
|
|
8810
|
+
const data = _.get(config, e);
|
|
8811
8811
|
pathArray.push({
|
|
8812
8812
|
label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
|
|
8813
8813
|
path: `/Component?path=${e}${id ? `&id=${id}` : ""}`
|
|
@@ -9034,13 +9034,13 @@ var pageMaster = (funcParams) => {
|
|
|
9034
9034
|
getFormdata: async function() {
|
|
9035
9035
|
var _a;
|
|
9036
9036
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
9037
|
-
const
|
|
9037
|
+
const config = await funcParams.pageConfigProvider(id);
|
|
9038
9038
|
const formData = getFormdataFromSessionStorage();
|
|
9039
9039
|
if (formData) {
|
|
9040
9040
|
return formData;
|
|
9041
9041
|
}
|
|
9042
|
-
saveFormdataInSessionStorage(
|
|
9043
|
-
return { ...
|
|
9042
|
+
saveFormdataInSessionStorage(config);
|
|
9043
|
+
return { ...config, type: "page" };
|
|
9044
9044
|
},
|
|
9045
9045
|
getUiSchema: function() {
|
|
9046
9046
|
const UiSchema = _.cloneDeep(PageMasterUiSchema(store2.theme.myTheme));
|
|
@@ -10000,10 +10000,10 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10000
10000
|
);
|
|
10001
10001
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
10002
10002
|
}
|
|
10003
|
-
const
|
|
10003
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
10004
10004
|
const path = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
|
|
10005
10005
|
const id = (_b = store22.searchParams) == null ? void 0 : _b.get("id");
|
|
10006
|
-
let pathArray = [{ label: (_c =
|
|
10006
|
+
let pathArray = [{ label: (_c = config.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
|
|
10007
10007
|
if (path) {
|
|
10008
10008
|
const pathArrayAll = path.split(".");
|
|
10009
10009
|
const arr = [];
|
|
@@ -10015,7 +10015,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10015
10015
|
arr.push(`${arr[i - 1]}.${e}`);
|
|
10016
10016
|
});
|
|
10017
10017
|
arr.map((e) => {
|
|
10018
|
-
const data = _.get(
|
|
10018
|
+
const data = _.get(config, e);
|
|
10019
10019
|
pathArray.push({
|
|
10020
10020
|
label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
|
|
10021
10021
|
path: (data == null ? void 0 : data.eventType) ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ""}` : `/Component?path=${e}${id ? `&id=${id}` : ""}`
|
|
@@ -10036,10 +10036,10 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10036
10036
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
10037
10037
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
10038
10038
|
}
|
|
10039
|
-
const
|
|
10039
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
10040
10040
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
10041
10041
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
10042
|
-
let pathArray = [{ label: (_c =
|
|
10042
|
+
let pathArray = [{ label: (_c = config.name) != null ? _c : "NewPage", path: `/PageMaster${id ? `?id=${id}` : ""}` }];
|
|
10043
10043
|
if (path) {
|
|
10044
10044
|
const pathArrayAll = path.split(".");
|
|
10045
10045
|
const arr = [];
|
|
@@ -10051,7 +10051,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
10051
10051
|
arr.push(`${arr[i - 1]}.${e}`);
|
|
10052
10052
|
});
|
|
10053
10053
|
arr.map((e) => {
|
|
10054
|
-
const data = _.get(
|
|
10054
|
+
const data = _.get(config, e);
|
|
10055
10055
|
pathArray.push({
|
|
10056
10056
|
label: (data == null ? void 0 : data.name) || (data == null ? void 0 : data.eventType) || "NewComponent",
|
|
10057
10057
|
path: (data == null ? void 0 : data.eventType) ? `/ComponentEvents?path=${e}${id ? `&id=${id}` : ""}` : `/Component?path=${e}${id ? `&id=${id}` : ""}`
|
|
@@ -10518,15 +10518,15 @@ var service = (funcParams) => {
|
|
|
10518
10518
|
funcParams.store.newData = {};
|
|
10519
10519
|
eventGroups = {};
|
|
10520
10520
|
pageData = await funcParams.pageDataProvider();
|
|
10521
|
-
const
|
|
10521
|
+
const config = pageData == null ? void 0 : pageData.config;
|
|
10522
10522
|
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
10523
10523
|
const event2 = new CustomEvent("pageNameChanged", {
|
|
10524
|
-
detail: { pageName:
|
|
10524
|
+
detail: { pageName: config.label, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
|
|
10525
10525
|
});
|
|
10526
10526
|
window.dispatchEvent(event2);
|
|
10527
10527
|
(_b = (_a = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _a.theme) == null ? void 0 : _b.myTheme;
|
|
10528
10528
|
const schema2 = (_c = pageData == null ? void 0 : pageData.schema) != null ? _c : { type: "object", properties: {} };
|
|
10529
|
-
eventGroups = extractEvents(
|
|
10529
|
+
eventGroups = extractEvents(config);
|
|
10530
10530
|
executeEventsParameters = {
|
|
10531
10531
|
config: {},
|
|
10532
10532
|
componentName: "",
|
|
@@ -10757,10 +10757,10 @@ var leaderBoard = {
|
|
|
10757
10757
|
main: {}
|
|
10758
10758
|
}
|
|
10759
10759
|
};
|
|
10760
|
-
const buildLeaderBoard = (
|
|
10760
|
+
const buildLeaderBoard = (config) => {
|
|
10761
10761
|
const LeaderBoard = _.cloneDeep(leaderBoard);
|
|
10762
|
-
if (
|
|
10763
|
-
const modifyColumns =
|
|
10762
|
+
if (config.elements) {
|
|
10763
|
+
const modifyColumns = config.elements.map((e, i) => {
|
|
10764
10764
|
if (!e.type) {
|
|
10765
10765
|
return { accessorKey: e.name, header: e.label || e.name };
|
|
10766
10766
|
}
|
|
@@ -10769,36 +10769,36 @@ const buildLeaderBoard = (config2) => {
|
|
|
10769
10769
|
});
|
|
10770
10770
|
LeaderBoard.elements = modifyColumns;
|
|
10771
10771
|
}
|
|
10772
|
-
LeaderBoard.config.main.label =
|
|
10773
|
-
if (
|
|
10774
|
-
LeaderBoard.scope = `#/properties/${
|
|
10772
|
+
LeaderBoard.config.main.label = config.label;
|
|
10773
|
+
if (config.name) {
|
|
10774
|
+
LeaderBoard.scope = `#/properties/${config.name}`;
|
|
10775
10775
|
}
|
|
10776
|
-
if (
|
|
10777
|
-
LeaderBoard.config.main.firstImage =
|
|
10776
|
+
if (config.firstImage) {
|
|
10777
|
+
LeaderBoard.config.main.firstImage = config.firstImage;
|
|
10778
10778
|
}
|
|
10779
|
-
if (
|
|
10780
|
-
LeaderBoard.config.main.secondImage =
|
|
10779
|
+
if (config.secondImage) {
|
|
10780
|
+
LeaderBoard.config.main.secondImage = config.secondImage;
|
|
10781
10781
|
}
|
|
10782
|
-
if (
|
|
10783
|
-
LeaderBoard.config.main.thirdImage =
|
|
10782
|
+
if (config.thirdImage) {
|
|
10783
|
+
LeaderBoard.config.main.thirdImage = config.thirdImage;
|
|
10784
10784
|
}
|
|
10785
|
-
if (
|
|
10786
|
-
LeaderBoard.config.main.nameKey =
|
|
10785
|
+
if (config.nameKey) {
|
|
10786
|
+
LeaderBoard.config.main.nameKey = config.nameKey;
|
|
10787
10787
|
}
|
|
10788
|
-
if (
|
|
10789
|
-
LeaderBoard.config.main.imageKey =
|
|
10788
|
+
if (config.imageKey) {
|
|
10789
|
+
LeaderBoard.config.main.imageKey = config.imageKey;
|
|
10790
10790
|
}
|
|
10791
|
-
if (
|
|
10792
|
-
LeaderBoard.config.main.scoreKey =
|
|
10791
|
+
if (config.scoreKey) {
|
|
10792
|
+
LeaderBoard.config.main.scoreKey = config.scoreKey;
|
|
10793
10793
|
}
|
|
10794
|
-
if (
|
|
10795
|
-
LeaderBoard.config.main.isScoreAmount =
|
|
10794
|
+
if (config.isScoreAmount) {
|
|
10795
|
+
LeaderBoard.config.main.isScoreAmount = config.isScoreAmount === "YES" ? true : false;
|
|
10796
10796
|
}
|
|
10797
|
-
if (
|
|
10798
|
-
LeaderBoard.config.layout = createLayoutFormat(
|
|
10797
|
+
if (config.layout) {
|
|
10798
|
+
LeaderBoard.config.layout = createLayoutFormat(config.layout, config.type);
|
|
10799
10799
|
}
|
|
10800
|
-
if (
|
|
10801
|
-
LeaderBoard.config.style = JSON.parse(
|
|
10800
|
+
if (config.style) {
|
|
10801
|
+
LeaderBoard.config.style = JSON.parse(config.style);
|
|
10802
10802
|
}
|
|
10803
10803
|
return LeaderBoard;
|
|
10804
10804
|
};
|
|
@@ -10817,44 +10817,44 @@ var progressBar = {
|
|
|
10817
10817
|
}
|
|
10818
10818
|
}
|
|
10819
10819
|
};
|
|
10820
|
-
const buildProgressBarCard = (
|
|
10820
|
+
const buildProgressBarCard = (config, myScope) => {
|
|
10821
10821
|
const progressBarCard = _.cloneDeep(progressBar);
|
|
10822
10822
|
progressBarCard.scope = myScope;
|
|
10823
|
-
if (
|
|
10824
|
-
progressBarCard.config.main.heading =
|
|
10823
|
+
if (config.heading) {
|
|
10824
|
+
progressBarCard.config.main.heading = config.heading;
|
|
10825
10825
|
}
|
|
10826
|
-
if (
|
|
10827
|
-
progressBarCard.config.main.bottomLabel_3 =
|
|
10826
|
+
if (config.bottomLabel_3) {
|
|
10827
|
+
progressBarCard.config.main.bottomLabel_3 = config.bottomLabel_3;
|
|
10828
10828
|
}
|
|
10829
|
-
if (
|
|
10830
|
-
progressBarCard.config.main.bottomLabel_2 =
|
|
10829
|
+
if (config.bottomLabel_2) {
|
|
10830
|
+
progressBarCard.config.main.bottomLabel_2 = config.bottomLabel_2;
|
|
10831
10831
|
}
|
|
10832
|
-
if (
|
|
10833
|
-
progressBarCard.elements[0].config.main.bottomLabel_1 =
|
|
10832
|
+
if (config.bottomLabel_1) {
|
|
10833
|
+
progressBarCard.elements[0].config.main.bottomLabel_1 = config.bottomLabel_1;
|
|
10834
10834
|
}
|
|
10835
|
-
if (
|
|
10836
|
-
progressBarCard.config.layout = createLayoutFormat(
|
|
10835
|
+
if (config.layout) {
|
|
10836
|
+
progressBarCard.config.layout = createLayoutFormat(config.layout);
|
|
10837
10837
|
}
|
|
10838
10838
|
return progressBarCard;
|
|
10839
10839
|
};
|
|
10840
|
-
const buildProgressBar = (
|
|
10840
|
+
const buildProgressBar = (config, componentScope) => {
|
|
10841
10841
|
const ProgressBar = _.cloneDeep(progressBar);
|
|
10842
|
-
ProgressBar.scope =
|
|
10843
|
-
if (
|
|
10844
|
-
ProgressBar.config.layout =
|
|
10842
|
+
ProgressBar.scope = componentScope;
|
|
10843
|
+
if (config.layout) {
|
|
10844
|
+
ProgressBar.config.layout = config.layout;
|
|
10845
10845
|
}
|
|
10846
|
-
ProgressBar.config.main.heading =
|
|
10847
|
-
if (
|
|
10848
|
-
ProgressBar.config.main.bottomLabel_3 =
|
|
10846
|
+
ProgressBar.config.main.heading = config.label;
|
|
10847
|
+
if (config.bottomLabel_3) {
|
|
10848
|
+
ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
|
|
10849
10849
|
}
|
|
10850
|
-
if (
|
|
10851
|
-
ProgressBar.config.layout = createLayoutFormat(
|
|
10850
|
+
if (config.layout) {
|
|
10851
|
+
ProgressBar.config.layout = createLayoutFormat(config.layout);
|
|
10852
10852
|
}
|
|
10853
|
-
if (
|
|
10854
|
-
ProgressBar.config.main.bottomLabel_2 =
|
|
10853
|
+
if (config.bottomLabel_2) {
|
|
10854
|
+
ProgressBar.config.main.bottomLabel_2 = config.bottomLabel_2;
|
|
10855
10855
|
}
|
|
10856
|
-
if (
|
|
10857
|
-
ProgressBar.config.main.bottomLabel_1 =
|
|
10856
|
+
if (config.bottomLabel_1) {
|
|
10857
|
+
ProgressBar.config.main.bottomLabel_1 = config.bottomLabel_1;
|
|
10858
10858
|
}
|
|
10859
10859
|
return ProgressBar;
|
|
10860
10860
|
};
|
|
@@ -10918,49 +10918,49 @@ const HorizontalBarGraph = {
|
|
|
10918
10918
|
style: { containerStyle: {}, labelStyle: { margin: {} }, barStyle: {} }
|
|
10919
10919
|
}
|
|
10920
10920
|
};
|
|
10921
|
-
const buildHorizontalBarGraph = (
|
|
10921
|
+
const buildHorizontalBarGraph = (config, componentScope) => {
|
|
10922
10922
|
const horizontalBarGraph = _.cloneDeep(HorizontalBarGraph);
|
|
10923
|
-
horizontalBarGraph.scope =
|
|
10924
|
-
if (
|
|
10925
|
-
horizontalBarGraph.config.layout = createLayoutFormat(
|
|
10923
|
+
horizontalBarGraph.scope = componentScope;
|
|
10924
|
+
if (config.layout) {
|
|
10925
|
+
horizontalBarGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
10926
10926
|
}
|
|
10927
|
-
horizontalBarGraph.config.main.type =
|
|
10928
|
-
horizontalBarGraph.scope =
|
|
10929
|
-
horizontalBarGraph.config.main.header =
|
|
10930
|
-
if (
|
|
10931
|
-
horizontalBarGraph.config.main.legendAvailable =
|
|
10927
|
+
horizontalBarGraph.config.main.type = config.graphType;
|
|
10928
|
+
horizontalBarGraph.scope = componentScope;
|
|
10929
|
+
horizontalBarGraph.config.main.header = config.heading;
|
|
10930
|
+
if (config.legendHide) {
|
|
10931
|
+
horizontalBarGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
10932
10932
|
}
|
|
10933
|
-
if (
|
|
10934
|
-
horizontalBarGraph.config.main.bottomAxisAngle =
|
|
10933
|
+
if (config.bottomAxisAngle) {
|
|
10934
|
+
horizontalBarGraph.config.main.bottomAxisAngle = config.bottomAxisAngle === "YES" ? true : false;
|
|
10935
10935
|
}
|
|
10936
|
-
if (
|
|
10937
|
-
horizontalBarGraph.config.main.legendLabels = flatObjectValueInArray(
|
|
10936
|
+
if (config.legendLabels) {
|
|
10937
|
+
horizontalBarGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
10938
10938
|
}
|
|
10939
|
-
if (
|
|
10940
|
-
horizontalBarGraph.config.main.legendDirection =
|
|
10939
|
+
if (config.legendDirection) {
|
|
10940
|
+
horizontalBarGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
10941
10941
|
}
|
|
10942
|
-
if (
|
|
10943
|
-
horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(
|
|
10942
|
+
if (config.pieArcColors) {
|
|
10943
|
+
horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
10944
10944
|
}
|
|
10945
|
-
if (
|
|
10946
|
-
horizontalBarGraph.config.main.xAxisValue =
|
|
10945
|
+
if (config.xAxisValue) {
|
|
10946
|
+
horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
|
|
10947
10947
|
}
|
|
10948
|
-
if (
|
|
10949
|
-
horizontalBarGraph.config.style.containerStyle.height =
|
|
10948
|
+
if (config.height) {
|
|
10949
|
+
horizontalBarGraph.config.style.containerStyle.height = config.height;
|
|
10950
10950
|
}
|
|
10951
|
-
if (
|
|
10951
|
+
if (config.leftMargin) {
|
|
10952
10952
|
horizontalBarGraph.config.style.labelStyle.margin = {
|
|
10953
|
-
left:
|
|
10953
|
+
left: config.leftMargin
|
|
10954
10954
|
};
|
|
10955
10955
|
}
|
|
10956
|
-
if (
|
|
10957
|
-
horizontalBarGraph.config.main.bottomLabel =
|
|
10956
|
+
if (config.bottomLabel) {
|
|
10957
|
+
horizontalBarGraph.config.main.bottomLabel = config.bottomLabel;
|
|
10958
10958
|
}
|
|
10959
|
-
if (
|
|
10960
|
-
horizontalBarGraph.config.main.leftLabel =
|
|
10959
|
+
if (config.leftLabel) {
|
|
10960
|
+
horizontalBarGraph.config.main.leftLabel = config.leftLabel;
|
|
10961
10961
|
}
|
|
10962
|
-
if (
|
|
10963
|
-
horizontalBarGraph.config.main.disableLeftLabel =
|
|
10962
|
+
if (config.disableLeftLabel) {
|
|
10963
|
+
horizontalBarGraph.config.main.disableLeftLabel = config.disableLeftLabel === "YES" ? true : false;
|
|
10964
10964
|
}
|
|
10965
10965
|
return horizontalBarGraph;
|
|
10966
10966
|
};
|
|
@@ -11010,20 +11010,20 @@ var SpeedoMeter = {
|
|
|
11010
11010
|
}
|
|
11011
11011
|
}
|
|
11012
11012
|
};
|
|
11013
|
-
const buildSpeedoMeter = (
|
|
11013
|
+
const buildSpeedoMeter = (config, componentScope) => {
|
|
11014
11014
|
const speedoMeter = _.cloneDeep(SpeedoMeter);
|
|
11015
|
-
speedoMeter.scope =
|
|
11016
|
-
if (
|
|
11017
|
-
speedoMeter.config.layout = createLayoutFormat(
|
|
11015
|
+
speedoMeter.scope = componentScope;
|
|
11016
|
+
if (config.layout) {
|
|
11017
|
+
speedoMeter.config.layout = createLayoutFormat(config.layout);
|
|
11018
11018
|
}
|
|
11019
|
-
if (
|
|
11020
|
-
speedoMeter.config.main.header =
|
|
11019
|
+
if (config.heading) {
|
|
11020
|
+
speedoMeter.config.main.header = config.heading;
|
|
11021
11021
|
}
|
|
11022
|
-
if (
|
|
11023
|
-
speedoMeter.config.main.segments =
|
|
11022
|
+
if (config.segments) {
|
|
11023
|
+
speedoMeter.config.main.segments = config.segments;
|
|
11024
11024
|
}
|
|
11025
|
-
if (
|
|
11026
|
-
const styleObj = JSON.parse(
|
|
11025
|
+
if (config.style) {
|
|
11026
|
+
const styleObj = JSON.parse(config.style);
|
|
11027
11027
|
if (styleObj == null ? void 0 : styleObj.style) {
|
|
11028
11028
|
speedoMeter.config.style = { ...speedoMeter.config.style, ...styleObj.style };
|
|
11029
11029
|
}
|
|
@@ -11031,104 +11031,104 @@ const buildSpeedoMeter = (config2, componentScope2) => {
|
|
|
11031
11031
|
speedoMeter.config.style.containerStyle = { ...speedoMeter.config.style.containerStyle, ...styleObj.containerStyle };
|
|
11032
11032
|
}
|
|
11033
11033
|
}
|
|
11034
|
-
if (
|
|
11035
|
-
speedoMeter.config.main.width =
|
|
11034
|
+
if (config.width) {
|
|
11035
|
+
speedoMeter.config.main.width = config.width;
|
|
11036
11036
|
}
|
|
11037
|
-
if (
|
|
11038
|
-
speedoMeter.config.main.currentValueText =
|
|
11037
|
+
if (config.speedoCaption) {
|
|
11038
|
+
speedoMeter.config.main.currentValueText = config.speedoCaption;
|
|
11039
11039
|
}
|
|
11040
|
-
if (
|
|
11041
|
-
speedoMeter.config.main.data =
|
|
11040
|
+
if (config.data) {
|
|
11041
|
+
speedoMeter.config.main.data = config.data;
|
|
11042
11042
|
}
|
|
11043
|
-
if (
|
|
11044
|
-
speedoMeter.config.style.needleColor =
|
|
11043
|
+
if (config.needleColor) {
|
|
11044
|
+
speedoMeter.config.style.needleColor = config.needleColor;
|
|
11045
11045
|
}
|
|
11046
|
-
if (
|
|
11047
|
-
speedoMeter.config.style.segments =
|
|
11046
|
+
if (config.segments) {
|
|
11047
|
+
speedoMeter.config.style.segments = config.segments;
|
|
11048
11048
|
}
|
|
11049
|
-
if (
|
|
11050
|
-
speedoMeter.config.style.endColor =
|
|
11049
|
+
if (config.endColor) {
|
|
11050
|
+
speedoMeter.config.style.endColor = config.endColor;
|
|
11051
11051
|
}
|
|
11052
|
-
if (
|
|
11053
|
-
speedoMeter.config.style.startColor =
|
|
11052
|
+
if (config.startColor) {
|
|
11053
|
+
speedoMeter.config.style.startColor = config.startColor;
|
|
11054
11054
|
}
|
|
11055
|
-
if (
|
|
11056
|
-
speedoMeter.config.style.segmentColors =
|
|
11055
|
+
if (config.segmentColors) {
|
|
11056
|
+
speedoMeter.config.style.segmentColors = config.segmentColors;
|
|
11057
11057
|
}
|
|
11058
11058
|
return speedoMeter;
|
|
11059
11059
|
};
|
|
11060
|
-
const buildPieGraph = (
|
|
11060
|
+
const buildPieGraph = (config, componentScope) => {
|
|
11061
11061
|
const pieGraph = _.cloneDeep(PieGraph);
|
|
11062
|
-
if (
|
|
11063
|
-
pieGraph.config.layout = createLayoutFormat(
|
|
11062
|
+
if (config.layout) {
|
|
11063
|
+
pieGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11064
11064
|
}
|
|
11065
|
-
if (
|
|
11066
|
-
pieGraph.config.style.containerStyle.height =
|
|
11065
|
+
if (config.height) {
|
|
11066
|
+
pieGraph.config.style.containerStyle.height = config.height;
|
|
11067
11067
|
}
|
|
11068
|
-
if (
|
|
11069
|
-
pieGraph.config.main.legendAvailable =
|
|
11068
|
+
if (config.legendHide) {
|
|
11069
|
+
pieGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
11070
11070
|
}
|
|
11071
|
-
if (
|
|
11072
|
-
pieGraph.config.main.legendDirection =
|
|
11071
|
+
if (config.legendDirection) {
|
|
11072
|
+
pieGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
11073
11073
|
}
|
|
11074
|
-
pieGraph.scope =
|
|
11075
|
-
pieGraph.config.main.header =
|
|
11076
|
-
if (
|
|
11077
|
-
pieGraph.config.main.legendLabels = flatObjectValueInArray(
|
|
11074
|
+
pieGraph.scope = componentScope;
|
|
11075
|
+
pieGraph.config.main.header = config.heading;
|
|
11076
|
+
if (config.legendLabels) {
|
|
11077
|
+
pieGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
11078
11078
|
}
|
|
11079
|
-
if (
|
|
11080
|
-
pieGraph.config.main.xAxisValue =
|
|
11079
|
+
if (config.xAxisValue) {
|
|
11080
|
+
pieGraph.config.main.xAxisValue = config.xAxisValue;
|
|
11081
11081
|
}
|
|
11082
|
-
if (
|
|
11083
|
-
pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(
|
|
11082
|
+
if (config.pieArcColors) {
|
|
11083
|
+
pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
11084
11084
|
}
|
|
11085
11085
|
return pieGraph;
|
|
11086
11086
|
};
|
|
11087
|
-
const buildStackbarGraph = (
|
|
11087
|
+
const buildStackbarGraph = (config, componentScope) => {
|
|
11088
11088
|
var _a;
|
|
11089
11089
|
const barGraph = _.cloneDeep(BarGraph);
|
|
11090
|
-
if (
|
|
11091
|
-
barGraph.config.layout = createLayoutFormat(
|
|
11090
|
+
if (config.layout) {
|
|
11091
|
+
barGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11092
11092
|
}
|
|
11093
|
-
if (
|
|
11094
|
-
barGraph.config.main.legendAvailable =
|
|
11095
|
-
barGraph.config.main.legendAvailable =
|
|
11093
|
+
if (config.legendHide) {
|
|
11094
|
+
barGraph.config.main.legendAvailable = config.legendHide;
|
|
11095
|
+
barGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
11096
11096
|
}
|
|
11097
|
-
if (
|
|
11098
|
-
barGraph.config.main.legendDirection =
|
|
11097
|
+
if (config.legendDirection) {
|
|
11098
|
+
barGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
11099
11099
|
}
|
|
11100
|
-
if (
|
|
11101
|
-
barGraph.config.main.bottomAxisAngle =
|
|
11100
|
+
if (config.bottomAxisAngle) {
|
|
11101
|
+
barGraph.config.main.bottomAxisAngle = config.bottomAxisAngle === "YES" ? true : false;
|
|
11102
11102
|
}
|
|
11103
|
-
barGraph.config.main.type = (_a =
|
|
11104
|
-
barGraph.config.main.header =
|
|
11105
|
-
if (
|
|
11106
|
-
barGraph.config.main.legendLabels = flatObjectValueInArray(
|
|
11103
|
+
barGraph.config.main.type = (_a = config == null ? void 0 : config.graphType) != null ? _a : "BarGraph";
|
|
11104
|
+
barGraph.config.main.header = config.heading;
|
|
11105
|
+
if (config.legendLabels) {
|
|
11106
|
+
barGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
11107
11107
|
}
|
|
11108
|
-
if (
|
|
11109
|
-
barGraph.config.style.barStyle.colorRange = flatObjectValueInArray(
|
|
11108
|
+
if (config.pieArcColors) {
|
|
11109
|
+
barGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
11110
11110
|
}
|
|
11111
|
-
if (
|
|
11112
|
-
barGraph.config.main.xAxisValue =
|
|
11111
|
+
if (config.xAxisValue) {
|
|
11112
|
+
barGraph.config.main.xAxisValue = config.xAxisValue;
|
|
11113
11113
|
}
|
|
11114
|
-
if (
|
|
11115
|
-
barGraph.config.style.containerStyle.height =
|
|
11114
|
+
if (config.height) {
|
|
11115
|
+
barGraph.config.style.containerStyle.height = config.height;
|
|
11116
11116
|
}
|
|
11117
|
-
if (
|
|
11117
|
+
if (config.leftMargin) {
|
|
11118
11118
|
barGraph.config.style.labelStyle.margin = {
|
|
11119
|
-
left:
|
|
11119
|
+
left: config.leftMargin
|
|
11120
11120
|
};
|
|
11121
11121
|
}
|
|
11122
|
-
if (
|
|
11123
|
-
barGraph.config.main.bottomLabel =
|
|
11122
|
+
if (config.bottomLabel) {
|
|
11123
|
+
barGraph.config.main.bottomLabel = config.bottomLabel;
|
|
11124
11124
|
}
|
|
11125
|
-
if (
|
|
11126
|
-
barGraph.config.main.leftLabel =
|
|
11125
|
+
if (config.leftLabel) {
|
|
11126
|
+
barGraph.config.main.leftLabel = config.leftLabel;
|
|
11127
11127
|
}
|
|
11128
|
-
if (
|
|
11129
|
-
barGraph.config.main.disableLeftLabel =
|
|
11128
|
+
if (config.disableLeftLabel) {
|
|
11129
|
+
barGraph.config.main.disableLeftLabel = config.disableLeftLabel === "YES" ? true : false;
|
|
11130
11130
|
}
|
|
11131
|
-
barGraph.scope =
|
|
11131
|
+
barGraph.scope = componentScope;
|
|
11132
11132
|
return barGraph;
|
|
11133
11133
|
};
|
|
11134
11134
|
var RunnerBoyProgressBar = {
|
|
@@ -11142,11 +11142,11 @@ var RunnerBoyProgressBar = {
|
|
|
11142
11142
|
main: {}
|
|
11143
11143
|
}
|
|
11144
11144
|
};
|
|
11145
|
-
const RunnerBoyProgressbar = (
|
|
11145
|
+
const RunnerBoyProgressbar = (config, componentScope) => {
|
|
11146
11146
|
const RunnerBoy = _.cloneDeep(RunnerBoyProgressBar);
|
|
11147
|
-
RunnerBoy.scope =
|
|
11148
|
-
if (
|
|
11149
|
-
RunnerBoy.config.layout = createLayoutFormat(
|
|
11147
|
+
RunnerBoy.scope = componentScope;
|
|
11148
|
+
if (config.layout) {
|
|
11149
|
+
RunnerBoy.config.layout = createLayoutFormat(config.layout);
|
|
11150
11150
|
}
|
|
11151
11151
|
return RunnerBoy;
|
|
11152
11152
|
};
|
|
@@ -11161,22 +11161,22 @@ var Tabsection = {
|
|
|
11161
11161
|
},
|
|
11162
11162
|
elements: []
|
|
11163
11163
|
};
|
|
11164
|
-
const buildTabSection = (
|
|
11164
|
+
const buildTabSection = (config, componentScope) => {
|
|
11165
11165
|
const tab = _.cloneDeep(Tabsection);
|
|
11166
|
-
tab.scope =
|
|
11167
|
-
if (
|
|
11168
|
-
tab.config.main.lazyLoad =
|
|
11166
|
+
tab.scope = componentScope;
|
|
11167
|
+
if (config.lazyLoad) {
|
|
11168
|
+
tab.config.main.lazyLoad = config.lazyLoad === "YES" ? true : false;
|
|
11169
11169
|
}
|
|
11170
|
-
if (
|
|
11171
|
-
tab.config.main.orientation =
|
|
11170
|
+
if (config.orientation) {
|
|
11171
|
+
tab.config.main.orientation = config.orientation === "YES" ? "vertical" : "horizontal";
|
|
11172
11172
|
}
|
|
11173
|
-
if (
|
|
11174
|
-
tab.config.main.tabLabels =
|
|
11173
|
+
if (config.sectionLabels) {
|
|
11174
|
+
tab.config.main.tabLabels = config.sectionLabels.map((e) => e.label);
|
|
11175
11175
|
}
|
|
11176
|
-
if (
|
|
11177
|
-
tab.config.style = JSON.parse(
|
|
11176
|
+
if (config.style) {
|
|
11177
|
+
tab.config.style = JSON.parse(config.style);
|
|
11178
11178
|
}
|
|
11179
|
-
tab.config.main.id =
|
|
11179
|
+
tab.config.main.id = config.name;
|
|
11180
11180
|
return tab;
|
|
11181
11181
|
};
|
|
11182
11182
|
var WrapperSection = {
|
|
@@ -11192,20 +11192,20 @@ var WrapperSection = {
|
|
|
11192
11192
|
},
|
|
11193
11193
|
elements: []
|
|
11194
11194
|
};
|
|
11195
|
-
const buildWrapperSection = (
|
|
11195
|
+
const buildWrapperSection = (config, componentScope) => {
|
|
11196
11196
|
const wrapper = _.cloneDeep(WrapperSection);
|
|
11197
|
-
wrapper.scope =
|
|
11198
|
-
wrapper.config.main.label =
|
|
11199
|
-
wrapper.config.main.divider =
|
|
11200
|
-
wrapper.config.main.isAccordion =
|
|
11201
|
-
if (
|
|
11202
|
-
wrapper.config.defaultStyle =
|
|
11197
|
+
wrapper.scope = componentScope;
|
|
11198
|
+
wrapper.config.main.label = config.label;
|
|
11199
|
+
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
11200
|
+
wrapper.config.main.isAccordion = config.isAccordion === "No" ? false : true;
|
|
11201
|
+
if (config.defaultStyle) {
|
|
11202
|
+
wrapper.config.defaultStyle = config.defaultStyle === "YES" ? true : false;
|
|
11203
11203
|
}
|
|
11204
|
-
if (
|
|
11205
|
-
wrapper.config.style = JSON.parse(
|
|
11204
|
+
if (config.style) {
|
|
11205
|
+
wrapper.config.style = JSON.parse(config.style);
|
|
11206
11206
|
}
|
|
11207
|
-
if (
|
|
11208
|
-
wrapper.config.layout = createLayoutFormat(
|
|
11207
|
+
if (config.layout) {
|
|
11208
|
+
wrapper.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11209
11209
|
}
|
|
11210
11210
|
return wrapper;
|
|
11211
11211
|
};
|
|
@@ -11223,32 +11223,32 @@ var TextInputField = {
|
|
|
11223
11223
|
style: {}
|
|
11224
11224
|
}
|
|
11225
11225
|
};
|
|
11226
|
-
const buildTextField = (
|
|
11226
|
+
const buildTextField = (config, componentScope) => {
|
|
11227
11227
|
const inputField = _.cloneDeep(TextInputField);
|
|
11228
|
-
inputField.config.main.label =
|
|
11229
|
-
if (
|
|
11230
|
-
inputField.config.style = JSON.parse(
|
|
11228
|
+
inputField.config.main.label = config.label;
|
|
11229
|
+
if (config.style) {
|
|
11230
|
+
inputField.config.style = JSON.parse(config.style);
|
|
11231
11231
|
}
|
|
11232
|
-
if (
|
|
11233
|
-
inputField.config.main.multiline =
|
|
11232
|
+
if (config.multiline) {
|
|
11233
|
+
inputField.config.main.multiline = config.multiline === "YES" ? true : false;
|
|
11234
11234
|
}
|
|
11235
|
-
if (
|
|
11236
|
-
inputField.config.main.keyName =
|
|
11235
|
+
if (config.keyName) {
|
|
11236
|
+
inputField.config.main.keyName = config.keyName;
|
|
11237
11237
|
}
|
|
11238
|
-
if (
|
|
11239
|
-
inputField.config.main.formatStrArray =
|
|
11238
|
+
if (config.InputFormatingAndMasking) {
|
|
11239
|
+
inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map((e) => e.formatElement);
|
|
11240
11240
|
}
|
|
11241
|
-
if (
|
|
11242
|
-
inputField.config.main.placeholder =
|
|
11241
|
+
if (config.placeholder) {
|
|
11242
|
+
inputField.config.main.placeholder = config.placeholder;
|
|
11243
11243
|
}
|
|
11244
|
-
if (
|
|
11245
|
-
inputField.config.main.variant =
|
|
11244
|
+
if (config.variant) {
|
|
11245
|
+
inputField.config.main.variant = config.variant;
|
|
11246
11246
|
}
|
|
11247
|
-
if (
|
|
11248
|
-
inputField.config.layout = createLayoutFormat(
|
|
11247
|
+
if (config.layout) {
|
|
11248
|
+
inputField.config.layout = createLayoutFormat(config.layout);
|
|
11249
11249
|
}
|
|
11250
|
-
inputField.config.main.errorMessage = `${
|
|
11251
|
-
inputField.scope =
|
|
11250
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
11251
|
+
inputField.scope = componentScope;
|
|
11252
11252
|
return inputField;
|
|
11253
11253
|
};
|
|
11254
11254
|
var SelectInputField = {
|
|
@@ -11266,25 +11266,28 @@ var SelectInputField = {
|
|
|
11266
11266
|
}
|
|
11267
11267
|
}
|
|
11268
11268
|
};
|
|
11269
|
-
const buildSelect = (
|
|
11269
|
+
const buildSelect = (config, componentScope) => {
|
|
11270
11270
|
const selectInputField = _.cloneDeep(SelectInputField);
|
|
11271
|
-
selectInputField.config.main.label =
|
|
11272
|
-
if (
|
|
11273
|
-
selectInputField.config.main.options =
|
|
11271
|
+
selectInputField.config.main.label = config.label;
|
|
11272
|
+
if (config.value) {
|
|
11273
|
+
selectInputField.config.main.options = config.value;
|
|
11274
|
+
}
|
|
11275
|
+
if (config.freeSolo) {
|
|
11276
|
+
selectInputField.config.main.freeSolo = config.freeSolo === "YES" ? true : false;
|
|
11274
11277
|
}
|
|
11275
|
-
if (
|
|
11276
|
-
selectInputField.config.main.
|
|
11278
|
+
if (config.lazyLoading) {
|
|
11279
|
+
selectInputField.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
11277
11280
|
}
|
|
11278
|
-
if (
|
|
11279
|
-
selectInputField.config.main.
|
|
11281
|
+
if (config.variant) {
|
|
11282
|
+
selectInputField.config.main.variant = config.variant;
|
|
11280
11283
|
}
|
|
11281
|
-
if (
|
|
11282
|
-
selectInputField.config.
|
|
11284
|
+
if (config.layout) {
|
|
11285
|
+
selectInputField.config.layout = createLayoutFormat(config.layout);
|
|
11283
11286
|
}
|
|
11284
|
-
if (
|
|
11285
|
-
selectInputField.config.
|
|
11287
|
+
if (config.style) {
|
|
11288
|
+
selectInputField.config.style = JSON.parse(config.style);
|
|
11286
11289
|
}
|
|
11287
|
-
selectInputField.scope =
|
|
11290
|
+
selectInputField.scope = componentScope;
|
|
11288
11291
|
return selectInputField;
|
|
11289
11292
|
};
|
|
11290
11293
|
var Button = {
|
|
@@ -11308,37 +11311,37 @@ var Button = {
|
|
|
11308
11311
|
style: {}
|
|
11309
11312
|
}
|
|
11310
11313
|
};
|
|
11311
|
-
const buildButton = (
|
|
11314
|
+
const buildButton = (config, componentScope) => {
|
|
11312
11315
|
const button = _.cloneDeep(Button);
|
|
11313
|
-
if (
|
|
11314
|
-
button.options.widget =
|
|
11315
|
-
|
|
11316
|
+
if (config.buttonType) {
|
|
11317
|
+
button.options.widget = config.buttonType === "IconButton" ? "IconButton" : "Button";
|
|
11318
|
+
config.buttonType === "ButtonWithIconAndText" ? button.config.main.startIcon = config.iconName : button.config.main.icon = config.iconName;
|
|
11316
11319
|
}
|
|
11317
|
-
if (
|
|
11318
|
-
button.config.layout = createLayoutFormat(
|
|
11320
|
+
if (config.layout) {
|
|
11321
|
+
button.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11319
11322
|
}
|
|
11320
|
-
if (
|
|
11321
|
-
button.config.main.tooltipMessage =
|
|
11323
|
+
if (config.tooltipMessage) {
|
|
11324
|
+
button.config.main.tooltipMessage = config.tooltipMessage;
|
|
11322
11325
|
}
|
|
11323
|
-
if (
|
|
11324
|
-
if (
|
|
11325
|
-
button.config.main.styleDefault =
|
|
11326
|
+
if (config.defaultStyle) {
|
|
11327
|
+
if (config.buttonType === "IconButton") {
|
|
11328
|
+
button.config.main.styleDefault = config.defaultStyle === "true" ? true : false;
|
|
11326
11329
|
} else {
|
|
11327
|
-
button.config.main.enableDefaultStyle =
|
|
11330
|
+
button.config.main.enableDefaultStyle = config.defaultStyle === "true" ? false : true;
|
|
11328
11331
|
}
|
|
11329
11332
|
}
|
|
11330
|
-
button.scope =
|
|
11331
|
-
if (
|
|
11332
|
-
button.config.style = JSON.parse(
|
|
11333
|
+
button.scope = componentScope;
|
|
11334
|
+
if (config.style) {
|
|
11335
|
+
button.config.style = JSON.parse(config.style);
|
|
11333
11336
|
}
|
|
11334
|
-
if (
|
|
11335
|
-
button.config.main.size =
|
|
11337
|
+
if (config.size) {
|
|
11338
|
+
button.config.main.size = config.size;
|
|
11336
11339
|
}
|
|
11337
|
-
if (
|
|
11338
|
-
button.config.main.color =
|
|
11340
|
+
if (config.color) {
|
|
11341
|
+
button.config.main.color = config.color;
|
|
11339
11342
|
}
|
|
11340
|
-
if (
|
|
11341
|
-
button.config.main.name =
|
|
11343
|
+
if (config.label) {
|
|
11344
|
+
button.config.main.name = config.label;
|
|
11342
11345
|
}
|
|
11343
11346
|
return button;
|
|
11344
11347
|
};
|
|
@@ -11364,83 +11367,83 @@ var Table = {
|
|
|
11364
11367
|
}
|
|
11365
11368
|
}
|
|
11366
11369
|
};
|
|
11367
|
-
const buildTable = (
|
|
11370
|
+
const buildTable = (config, componentScope) => {
|
|
11368
11371
|
const table = _.cloneDeep(Table);
|
|
11369
|
-
table.scope =
|
|
11370
|
-
if (
|
|
11371
|
-
table.config.style = JSON.parse(
|
|
11372
|
+
table.scope = componentScope;
|
|
11373
|
+
if (config.style) {
|
|
11374
|
+
table.config.style = JSON.parse(config.style);
|
|
11372
11375
|
}
|
|
11373
|
-
if (
|
|
11374
|
-
table.config.main.lazyLoading =
|
|
11376
|
+
if (config.lazyLoading) {
|
|
11377
|
+
table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
11375
11378
|
}
|
|
11376
|
-
if (
|
|
11377
|
-
table.config.main.defaultColumnSize =
|
|
11379
|
+
if (config.defaultColumnSize) {
|
|
11380
|
+
table.config.main.defaultColumnSize = config.defaultColumnSize;
|
|
11378
11381
|
}
|
|
11379
|
-
if (
|
|
11380
|
-
table.config.main.enableRowMovement =
|
|
11382
|
+
if (config.enableRowMovement) {
|
|
11383
|
+
table.config.main.enableRowMovement = config.enableRowMovement === "YES" ? true : false;
|
|
11381
11384
|
}
|
|
11382
|
-
if (
|
|
11383
|
-
table.config.main.enableExpanding =
|
|
11385
|
+
if (config.enableExpanding) {
|
|
11386
|
+
table.config.main.enableExpanding = config.enableExpanding === "YES" ? true : false;
|
|
11384
11387
|
}
|
|
11385
|
-
if (
|
|
11386
|
-
table.config.main.enableExpandAll =
|
|
11388
|
+
if (config.enableExpandAll) {
|
|
11389
|
+
table.config.main.enableExpandAll = config.enableExpandAll === "YES" ? true : false;
|
|
11387
11390
|
}
|
|
11388
|
-
if (
|
|
11389
|
-
table.config.main.filterFromLeafRows =
|
|
11391
|
+
if (config.filterFromLeafRows) {
|
|
11392
|
+
table.config.main.filterFromLeafRows = config.filterFromLeafRows === "YES" ? true : false;
|
|
11390
11393
|
}
|
|
11391
|
-
if (
|
|
11392
|
-
table.config.main.paginateExpandedRows =
|
|
11394
|
+
if (config.paginateExpandedRows) {
|
|
11395
|
+
table.config.main.paginateExpandedRows = config.paginateExpandedRows === "YES" ? true : false;
|
|
11393
11396
|
}
|
|
11394
|
-
if (
|
|
11395
|
-
table.config.main.treeStructure =
|
|
11397
|
+
if (config.treeStructure) {
|
|
11398
|
+
table.config.main.treeStructure = config.treeStructure === "YES" ? "flatTreeMap" : false;
|
|
11396
11399
|
}
|
|
11397
|
-
if (
|
|
11398
|
-
table.config.main.Selection =
|
|
11400
|
+
if (config.SelectionAvailable) {
|
|
11401
|
+
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
11399
11402
|
}
|
|
11400
|
-
if (
|
|
11401
|
-
table.config.main.disableColumnResizing =
|
|
11403
|
+
if (config.ColumnResizingAvailable) {
|
|
11404
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
|
|
11402
11405
|
}
|
|
11403
|
-
if (
|
|
11404
|
-
table.config.main.enableDrag =
|
|
11406
|
+
if (config.DragAvailable) {
|
|
11407
|
+
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
11405
11408
|
}
|
|
11406
|
-
if (
|
|
11407
|
-
table.config.main.downloadAllData =
|
|
11409
|
+
if (config.downloadAllData) {
|
|
11410
|
+
table.config.main.downloadAllData = config.downloadAllData === "YES" ? true : false;
|
|
11408
11411
|
}
|
|
11409
|
-
if (
|
|
11410
|
-
table.config.main.disableGlobalSearch =
|
|
11412
|
+
if (config.disableGlobalSearch) {
|
|
11413
|
+
table.config.main.disableGlobalSearch = config.disableGlobalSearch === "YES" ? true : false;
|
|
11411
11414
|
}
|
|
11412
|
-
if (
|
|
11413
|
-
table.config.main.disableColumnFilter =
|
|
11415
|
+
if (config.disableColumnFilter) {
|
|
11416
|
+
table.config.main.disableColumnFilter = config.disableColumnFilter === "YES" ? true : false;
|
|
11414
11417
|
}
|
|
11415
|
-
if (
|
|
11416
|
-
table.config.main.disableSorting =
|
|
11418
|
+
if (config.disableSorting) {
|
|
11419
|
+
table.config.main.disableSorting = config.disableSorting === "YES" ? true : false;
|
|
11417
11420
|
}
|
|
11418
|
-
if (
|
|
11419
|
-
table.config.main.disableEditColumn =
|
|
11421
|
+
if (config.disableEditColumn) {
|
|
11422
|
+
table.config.main.disableEditColumn = config.disableEditColumn === "YES" ? true : false;
|
|
11420
11423
|
}
|
|
11421
|
-
if (
|
|
11422
|
-
table.config.main.disableFullScreenToggle =
|
|
11424
|
+
if (config.disableFullScreenToggle) {
|
|
11425
|
+
table.config.main.disableFullScreenToggle = config.disableFullScreenToggle === "YES" ? true : false;
|
|
11423
11426
|
}
|
|
11424
|
-
if (
|
|
11425
|
-
table.config.main.disableDensityToggle =
|
|
11427
|
+
if (config.disableDensityToggle) {
|
|
11428
|
+
table.config.main.disableDensityToggle = config.disableDensityToggle === "YES" ? true : false;
|
|
11426
11429
|
}
|
|
11427
|
-
if (
|
|
11428
|
-
table.config.main.disableDownloadFile =
|
|
11430
|
+
if (config.disableDownloadFile) {
|
|
11431
|
+
table.config.main.disableDownloadFile = config.disableDownloadFile === "YES" ? true : false;
|
|
11429
11432
|
}
|
|
11430
|
-
if (
|
|
11431
|
-
table.config.main.disablePagination =
|
|
11433
|
+
if (config.disablePagination) {
|
|
11434
|
+
table.config.main.disablePagination = config.disablePagination === "YES" ? true : false;
|
|
11432
11435
|
}
|
|
11433
|
-
if (
|
|
11434
|
-
table.config.main.TableDownloadKeysName =
|
|
11436
|
+
if (config.Table_Download_Keys_Name) {
|
|
11437
|
+
table.config.main.TableDownloadKeysName = config.Table_Download_Keys_Name.map((e) => e.KeyName);
|
|
11435
11438
|
}
|
|
11436
|
-
if (
|
|
11437
|
-
table.config.main.selectKey =
|
|
11439
|
+
if (config.selectKey) {
|
|
11440
|
+
table.config.main.selectKey = config.selectKey;
|
|
11438
11441
|
}
|
|
11439
|
-
if (
|
|
11440
|
-
table.config.main.maxPageSize =
|
|
11442
|
+
if (config.maxPageSize) {
|
|
11443
|
+
table.config.main.maxPageSize = config.maxPageSize;
|
|
11441
11444
|
}
|
|
11442
|
-
if (
|
|
11443
|
-
table.config.main.initialDensity =
|
|
11445
|
+
if (config.initialDensity) {
|
|
11446
|
+
table.config.main.initialDensity = config.initialDensity;
|
|
11444
11447
|
}
|
|
11445
11448
|
return table;
|
|
11446
11449
|
};
|
|
@@ -11458,18 +11461,18 @@ const Box = {
|
|
|
11458
11461
|
style: {}
|
|
11459
11462
|
}
|
|
11460
11463
|
};
|
|
11461
|
-
const buildLabel = (
|
|
11464
|
+
const buildLabel = (config, componentScope) => {
|
|
11462
11465
|
const box = _.cloneDeep(Box);
|
|
11463
|
-
box.scope =
|
|
11464
|
-
box.config.main.heading =
|
|
11465
|
-
if (
|
|
11466
|
-
box.config.layout = createLayoutFormat(
|
|
11466
|
+
box.scope = componentScope;
|
|
11467
|
+
box.config.main.heading = config.label;
|
|
11468
|
+
if (config.layout) {
|
|
11469
|
+
box.config.layout = createLayoutFormat(config.layout);
|
|
11467
11470
|
}
|
|
11468
|
-
if (
|
|
11469
|
-
box.config.main.iconName =
|
|
11471
|
+
if (config.iconName) {
|
|
11472
|
+
box.config.main.iconName = config.iconName;
|
|
11470
11473
|
}
|
|
11471
|
-
if (
|
|
11472
|
-
box.config.style = JSON.parse(
|
|
11474
|
+
if (config.style) {
|
|
11475
|
+
box.config.style = JSON.parse(config.style);
|
|
11473
11476
|
}
|
|
11474
11477
|
return box;
|
|
11475
11478
|
};
|
|
@@ -11509,40 +11512,40 @@ const downloadFile = {
|
|
|
11509
11512
|
"widget": "DownloadFile"
|
|
11510
11513
|
}
|
|
11511
11514
|
};
|
|
11512
|
-
const buildUploadFile = (
|
|
11515
|
+
const buildUploadFile = (config, componentScope) => {
|
|
11513
11516
|
const UploadFile = _.cloneDeep(uploadFile);
|
|
11514
|
-
UploadFile.scope =
|
|
11515
|
-
UploadFile.config.main.label =
|
|
11516
|
-
if (
|
|
11517
|
-
UploadFile.config.layout = createLayoutFormat(
|
|
11517
|
+
UploadFile.scope = componentScope;
|
|
11518
|
+
UploadFile.config.main.label = config.label;
|
|
11519
|
+
if (config.layout) {
|
|
11520
|
+
UploadFile.config.layout = createLayoutFormat(config.layout);
|
|
11518
11521
|
}
|
|
11519
|
-
if (
|
|
11520
|
-
UploadFile.config.style =
|
|
11522
|
+
if (config.style) {
|
|
11523
|
+
UploadFile.config.style = config.style;
|
|
11521
11524
|
}
|
|
11522
|
-
if (
|
|
11525
|
+
if (config.required) {
|
|
11523
11526
|
UploadFile.config.main.required = true;
|
|
11524
11527
|
}
|
|
11525
|
-
UploadFile.config.main.errorMessage =
|
|
11528
|
+
UploadFile.config.main.errorMessage = config.errorMessage;
|
|
11526
11529
|
return UploadFile;
|
|
11527
11530
|
};
|
|
11528
|
-
const buildDownloadFile = (
|
|
11531
|
+
const buildDownloadFile = (config, componentScope) => {
|
|
11529
11532
|
const DownloadFile = _.cloneDeep(downloadFile);
|
|
11530
|
-
DownloadFile.scope =
|
|
11531
|
-
DownloadFile.config.main.label =
|
|
11532
|
-
if (
|
|
11533
|
-
DownloadFile.config.layout =
|
|
11533
|
+
DownloadFile.scope = componentScope;
|
|
11534
|
+
DownloadFile.config.main.label = config.label;
|
|
11535
|
+
if (config.layout) {
|
|
11536
|
+
DownloadFile.config.layout = config.layout;
|
|
11534
11537
|
}
|
|
11535
|
-
if (
|
|
11536
|
-
DownloadFile.config.style =
|
|
11538
|
+
if (config.style) {
|
|
11539
|
+
DownloadFile.config.style = config.style;
|
|
11537
11540
|
}
|
|
11538
|
-
if (
|
|
11541
|
+
if (config.required) {
|
|
11539
11542
|
DownloadFile.config.main.required = true;
|
|
11540
11543
|
}
|
|
11541
|
-
if (
|
|
11542
|
-
DownloadFile.config.layout = createLayoutFormat(
|
|
11544
|
+
if (config.layout) {
|
|
11545
|
+
DownloadFile.config.layout = createLayoutFormat(config.layout);
|
|
11543
11546
|
}
|
|
11544
|
-
if (
|
|
11545
|
-
DownloadFile.config.main.errorMessage =
|
|
11547
|
+
if (config.errorMessage) {
|
|
11548
|
+
DownloadFile.config.main.errorMessage = config.errorMessage;
|
|
11546
11549
|
}
|
|
11547
11550
|
return DownloadFile;
|
|
11548
11551
|
};
|
|
@@ -11551,184 +11554,34 @@ function Card(theme) {
|
|
|
11551
11554
|
type: "WrapperLayout",
|
|
11552
11555
|
config: {
|
|
11553
11556
|
main: {},
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
color: "white"
|
|
11557
|
+
style: {
|
|
11558
|
+
wrapperStyle: {
|
|
11559
|
+
position: "relative",
|
|
11560
|
+
top: "50%",
|
|
11561
|
+
transform: "translateY(-50%)",
|
|
11562
|
+
marginBottom: 0,
|
|
11563
|
+
borderRadius: "0px"
|
|
11564
|
+
},
|
|
11565
|
+
componentsBoxStyle: {
|
|
11566
|
+
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
|
|
11567
|
+
flexDirection: "column",
|
|
11568
|
+
flexWrap: "nowrap",
|
|
11569
|
+
width: "100% !important",
|
|
11570
|
+
background: "transparent",
|
|
11571
|
+
borderRadius: "8px",
|
|
11572
|
+
padding: "20px 20px 20px 14px",
|
|
11573
|
+
height: "100%",
|
|
11574
|
+
minHeight: "140px",
|
|
11575
|
+
position: "relative",
|
|
11576
|
+
marginLeft: "0px",
|
|
11577
|
+
"&: hover": {
|
|
11578
|
+
background: `${theme.palette.primary.main}`
|
|
11577
11579
|
}
|
|
11578
11580
|
}
|
|
11579
11581
|
},
|
|
11580
|
-
layout: { xs: 12, sm: 12, md: 6, lg:
|
|
11582
|
+
layout: { xs: 12, sm: 12, md: 6, lg: 3 }
|
|
11581
11583
|
},
|
|
11582
11584
|
elements: [
|
|
11583
|
-
{
|
|
11584
|
-
type: "HorizontalLayout",
|
|
11585
|
-
config: {
|
|
11586
|
-
layout: 9
|
|
11587
|
-
},
|
|
11588
|
-
elements: [
|
|
11589
|
-
{
|
|
11590
|
-
type: "WrapperLayout",
|
|
11591
|
-
config: {
|
|
11592
|
-
main: {
|
|
11593
|
-
columnSpacing: 0,
|
|
11594
|
-
gap: 0
|
|
11595
|
-
},
|
|
11596
|
-
wrapperStyle: {
|
|
11597
|
-
background: "transparent",
|
|
11598
|
-
marginBottom: 0
|
|
11599
|
-
},
|
|
11600
|
-
componentsBoxStyle: {
|
|
11601
|
-
flexDirection: "column",
|
|
11602
|
-
flexWrap: "nowrap",
|
|
11603
|
-
width: "100%",
|
|
11604
|
-
height: "inherit",
|
|
11605
|
-
background: "transparent",
|
|
11606
|
-
borderRadius: "0px",
|
|
11607
|
-
paddingRight: 0
|
|
11608
|
-
},
|
|
11609
|
-
layout: 12
|
|
11610
|
-
},
|
|
11611
|
-
elements: [
|
|
11612
|
-
{
|
|
11613
|
-
type: "WrapperLayout",
|
|
11614
|
-
config: {
|
|
11615
|
-
main: {
|
|
11616
|
-
columnSpacing: 0,
|
|
11617
|
-
gap: 0
|
|
11618
|
-
},
|
|
11619
|
-
wrapperStyle: {
|
|
11620
|
-
background: "transparent",
|
|
11621
|
-
marginBottom: 0
|
|
11622
|
-
},
|
|
11623
|
-
componentsBoxStyle: {
|
|
11624
|
-
flexDirection: "row",
|
|
11625
|
-
flexWrap: "nowrap",
|
|
11626
|
-
width: "100%",
|
|
11627
|
-
height: "0",
|
|
11628
|
-
background: "transparent",
|
|
11629
|
-
borderRadius: "0px",
|
|
11630
|
-
marginLeft: "-10px",
|
|
11631
|
-
marginTop: "-8px",
|
|
11632
|
-
justifyContent: "start",
|
|
11633
|
-
position: "relative"
|
|
11634
|
-
},
|
|
11635
|
-
layout: 12
|
|
11636
|
-
},
|
|
11637
|
-
elements: [
|
|
11638
|
-
{
|
|
11639
|
-
type: "Control",
|
|
11640
|
-
scope: "#/properties/programType",
|
|
11641
|
-
config: {
|
|
11642
|
-
main: {
|
|
11643
|
-
heading: ""
|
|
11644
|
-
},
|
|
11645
|
-
style: {
|
|
11646
|
-
color: "black",
|
|
11647
|
-
display: "flex",
|
|
11648
|
-
fontSize: { xs: "24px", md: "28px" },
|
|
11649
|
-
fontWeight: "bold",
|
|
11650
|
-
background: "inherit",
|
|
11651
|
-
justifyContent: "flex-start",
|
|
11652
|
-
width: "auto",
|
|
11653
|
-
margin: "-8px",
|
|
11654
|
-
marginLeft: "-24px",
|
|
11655
|
-
height: 0
|
|
11656
|
-
}
|
|
11657
|
-
},
|
|
11658
|
-
options: {
|
|
11659
|
-
widget: "Box"
|
|
11660
|
-
}
|
|
11661
|
-
},
|
|
11662
|
-
{
|
|
11663
|
-
type: "Control",
|
|
11664
|
-
scope: "#/properties/programType",
|
|
11665
|
-
config: {
|
|
11666
|
-
main: {
|
|
11667
|
-
heading: "5000.00"
|
|
11668
|
-
},
|
|
11669
|
-
style: {
|
|
11670
|
-
color: "black",
|
|
11671
|
-
display: "flex",
|
|
11672
|
-
fontSize: { xs: "24px", md: "25px" },
|
|
11673
|
-
fontWeight: "bold",
|
|
11674
|
-
background: "inherit",
|
|
11675
|
-
justifyContent: "flex-start",
|
|
11676
|
-
width: "auto",
|
|
11677
|
-
margin: "-8px",
|
|
11678
|
-
marginTop: "-6px",
|
|
11679
|
-
position: "absolute",
|
|
11680
|
-
left: "7px",
|
|
11681
|
-
whiteSpace: "nowrap",
|
|
11682
|
-
overflowX: "auto",
|
|
11683
|
-
overflowY: "hidden",
|
|
11684
|
-
scrollbarWidth: "none",
|
|
11685
|
-
msOverflowStyle: "none",
|
|
11686
|
-
maxWidth: "calc(100% + 20px)",
|
|
11687
|
-
"&::-webkit-scrollbar": {
|
|
11688
|
-
display: "none"
|
|
11689
|
-
}
|
|
11690
|
-
}
|
|
11691
|
-
},
|
|
11692
|
-
options: {
|
|
11693
|
-
widget: "Box"
|
|
11694
|
-
}
|
|
11695
|
-
}
|
|
11696
|
-
]
|
|
11697
|
-
},
|
|
11698
|
-
{
|
|
11699
|
-
type: "Control",
|
|
11700
|
-
scope: "#/properties/programType",
|
|
11701
|
-
config: {
|
|
11702
|
-
main: {
|
|
11703
|
-
heading: "Total Earnings"
|
|
11704
|
-
},
|
|
11705
|
-
style: {
|
|
11706
|
-
color: "black",
|
|
11707
|
-
fontSize: "16px",
|
|
11708
|
-
justifyContent: "center",
|
|
11709
|
-
whiteSpace: "nowrap",
|
|
11710
|
-
overflowX: "auto",
|
|
11711
|
-
overflowY: "hidden",
|
|
11712
|
-
scrollbarWidth: "none",
|
|
11713
|
-
msOverflowStyle: "none",
|
|
11714
|
-
background: "inherit",
|
|
11715
|
-
width: "calc(100% + 8px)",
|
|
11716
|
-
margin: "-8px",
|
|
11717
|
-
marginTop: { xs: "16px", md: "20px" },
|
|
11718
|
-
"&::-webkit-scrollbar": {
|
|
11719
|
-
display: "none"
|
|
11720
|
-
}
|
|
11721
|
-
},
|
|
11722
|
-
layout: 12
|
|
11723
|
-
},
|
|
11724
|
-
options: {
|
|
11725
|
-
widget: "Box"
|
|
11726
|
-
}
|
|
11727
|
-
}
|
|
11728
|
-
]
|
|
11729
|
-
}
|
|
11730
|
-
]
|
|
11731
|
-
},
|
|
11732
11585
|
{
|
|
11733
11586
|
type: "Control",
|
|
11734
11587
|
scope: "#/properties/programType",
|
|
@@ -11738,51 +11591,140 @@ function Card(theme) {
|
|
|
11738
11591
|
},
|
|
11739
11592
|
style: {
|
|
11740
11593
|
containerStyle: {
|
|
11741
|
-
|
|
11594
|
+
position: "absolute",
|
|
11595
|
+
top: "12px",
|
|
11596
|
+
right: "12px",
|
|
11742
11597
|
display: "flex",
|
|
11743
|
-
justifyContent: "end"
|
|
11598
|
+
justifyContent: "flex-end",
|
|
11599
|
+
alignItems: "flex-start"
|
|
11744
11600
|
},
|
|
11745
11601
|
imageStyle: {
|
|
11746
|
-
width: "
|
|
11747
|
-
|
|
11748
|
-
padding: "
|
|
11749
|
-
margin: "0px
|
|
11750
|
-
height: "64px"
|
|
11602
|
+
width: "48px",
|
|
11603
|
+
height: "48px",
|
|
11604
|
+
padding: "0px",
|
|
11605
|
+
margin: "0px"
|
|
11751
11606
|
}
|
|
11752
|
-
}
|
|
11753
|
-
layout: 3
|
|
11607
|
+
}
|
|
11754
11608
|
},
|
|
11755
11609
|
options: {
|
|
11756
11610
|
widget: "Image"
|
|
11757
11611
|
}
|
|
11612
|
+
},
|
|
11613
|
+
{
|
|
11614
|
+
type: "Control",
|
|
11615
|
+
scope: "#/properties/programType",
|
|
11616
|
+
config: {
|
|
11617
|
+
main: {
|
|
11618
|
+
heading: "Total Earnings"
|
|
11619
|
+
},
|
|
11620
|
+
style: {
|
|
11621
|
+
color: "black",
|
|
11622
|
+
fontSize: "17px",
|
|
11623
|
+
fontWeight: "200",
|
|
11624
|
+
justifyContent: "flex-start",
|
|
11625
|
+
background: "inherit",
|
|
11626
|
+
margin: "0px",
|
|
11627
|
+
marginTop: "-8px",
|
|
11628
|
+
marginBottom: "12px",
|
|
11629
|
+
maxWidth: "160px",
|
|
11630
|
+
whiteSpace: "nowrap",
|
|
11631
|
+
overflowX: "auto",
|
|
11632
|
+
scrollbarWidth: "none",
|
|
11633
|
+
"&::-webkit-scrollbar": {
|
|
11634
|
+
display: "none"
|
|
11635
|
+
}
|
|
11636
|
+
}
|
|
11637
|
+
},
|
|
11638
|
+
options: {
|
|
11639
|
+
widget: "Box"
|
|
11640
|
+
}
|
|
11641
|
+
},
|
|
11642
|
+
{
|
|
11643
|
+
type: "Control",
|
|
11644
|
+
scope: "#/properties/programType",
|
|
11645
|
+
config: {
|
|
11646
|
+
main: {
|
|
11647
|
+
heading: "5000.00"
|
|
11648
|
+
},
|
|
11649
|
+
style: {
|
|
11650
|
+
color: "black",
|
|
11651
|
+
display: "flex",
|
|
11652
|
+
fontSize: { xs: "22px", md: "30px" },
|
|
11653
|
+
fontWeight: "450",
|
|
11654
|
+
background: "inherit",
|
|
11655
|
+
justifyContent: "flex-start",
|
|
11656
|
+
width: "100%",
|
|
11657
|
+
margin: "0px",
|
|
11658
|
+
marginBottom: "8px",
|
|
11659
|
+
lineHeight: "1",
|
|
11660
|
+
maxWidth: "200px",
|
|
11661
|
+
whiteSpace: "nowrap",
|
|
11662
|
+
overflowX: "auto",
|
|
11663
|
+
scrollbarWidth: "none",
|
|
11664
|
+
"&::-webkit-scrollbar": {
|
|
11665
|
+
display: "none"
|
|
11666
|
+
}
|
|
11667
|
+
}
|
|
11668
|
+
},
|
|
11669
|
+
options: {
|
|
11670
|
+
widget: "Box"
|
|
11671
|
+
}
|
|
11672
|
+
},
|
|
11673
|
+
{
|
|
11674
|
+
type: "Control",
|
|
11675
|
+
scope: "#/properties/programType",
|
|
11676
|
+
config: {
|
|
11677
|
+
main: {
|
|
11678
|
+
heading: "Increased from last month"
|
|
11679
|
+
},
|
|
11680
|
+
style: {
|
|
11681
|
+
color: "#767677ff",
|
|
11682
|
+
fontSize: "11px",
|
|
11683
|
+
fontWeight: "400",
|
|
11684
|
+
justifyContent: "flex-start",
|
|
11685
|
+
background: "inherit",
|
|
11686
|
+
margin: "0px",
|
|
11687
|
+
paddingLeft: "2px",
|
|
11688
|
+
maxWidth: "200px",
|
|
11689
|
+
whiteSpace: "nowrap",
|
|
11690
|
+
overflowX: "auto",
|
|
11691
|
+
scrollbarWidth: "none",
|
|
11692
|
+
"&::-webkit-scrollbar": {
|
|
11693
|
+
display: "none"
|
|
11694
|
+
}
|
|
11695
|
+
}
|
|
11696
|
+
},
|
|
11697
|
+
options: {
|
|
11698
|
+
widget: "Box"
|
|
11699
|
+
}
|
|
11758
11700
|
}
|
|
11759
11701
|
]
|
|
11760
11702
|
};
|
|
11761
11703
|
return uiSchema;
|
|
11762
11704
|
}
|
|
11763
|
-
const buildCard = (config, componentScope,
|
|
11764
|
-
const card = _.cloneDeep(Card(
|
|
11705
|
+
const buildCard = (config, componentScope, store2) => {
|
|
11706
|
+
const card = _.cloneDeep(Card(store2.theme.myTheme));
|
|
11765
11707
|
if (config.style) {
|
|
11766
11708
|
card.config.wrapperStyle = JSON.parse(config.style);
|
|
11767
11709
|
}
|
|
11768
|
-
card.elements[
|
|
11769
|
-
card.elements[
|
|
11770
|
-
card.elements[
|
|
11710
|
+
card.elements[2].scope = `#/properties/${config.name}/properties/value`;
|
|
11711
|
+
card.elements[0].scope = `#/properties/${config.name}/properties/url`;
|
|
11712
|
+
card.elements[3].scope = `#/properties/${config.name}/properties/description`;
|
|
11713
|
+
card.elements[1].scope = `#/properties/${config.name}/properties/label`;
|
|
11771
11714
|
if (config.layout) {
|
|
11772
11715
|
card.config.layout = createLayoutFormat(config.layout);
|
|
11773
11716
|
}
|
|
11774
|
-
if (config == null ? void 0 : config.titleIcon) {
|
|
11775
|
-
card.elements[0].elements[0].elements[0].elements[0].config.main.heading = eval(`'\\${config.titleIcon}'`);
|
|
11776
|
-
card.elements[0].elements[0].elements[0].elements[1].config.style.left = "24px";
|
|
11777
|
-
}
|
|
11778
11717
|
if (config.label) {
|
|
11779
|
-
card.elements[
|
|
11718
|
+
card.elements[1].config.main.heading = config.label;
|
|
11780
11719
|
}
|
|
11781
11720
|
if (config.url) {
|
|
11782
|
-
card.elements[
|
|
11721
|
+
card.elements[0].config.main.url = config.url;
|
|
11783
11722
|
}
|
|
11784
11723
|
if (config.description) {
|
|
11785
|
-
card.elements[
|
|
11724
|
+
card.elements[3].config.main.heading = config.description;
|
|
11725
|
+
}
|
|
11726
|
+
if (config.value) {
|
|
11727
|
+
card.elements[2].config.main.heading = config.value;
|
|
11786
11728
|
}
|
|
11787
11729
|
return card;
|
|
11788
11730
|
};
|
|
@@ -11814,29 +11756,29 @@ const DateTime = {
|
|
|
11814
11756
|
}
|
|
11815
11757
|
}
|
|
11816
11758
|
};
|
|
11817
|
-
const buildDate = (
|
|
11759
|
+
const buildDate = (config, componentScope) => {
|
|
11818
11760
|
const dateInputField = _.cloneDeep(DateInputField);
|
|
11819
|
-
dateInputField.config.main.label =
|
|
11820
|
-
dateInputField.config.main.errorMessage = `${
|
|
11821
|
-
dateInputField.scope =
|
|
11822
|
-
if (
|
|
11823
|
-
dateInputField.config.layout = createLayoutFormat(
|
|
11761
|
+
dateInputField.config.main.label = config.label;
|
|
11762
|
+
dateInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
11763
|
+
dateInputField.scope = componentScope;
|
|
11764
|
+
if (config.layout) {
|
|
11765
|
+
dateInputField.config.layout = createLayoutFormat(config.layout);
|
|
11824
11766
|
}
|
|
11825
|
-
if (
|
|
11826
|
-
dateInputField.config.main.variant =
|
|
11767
|
+
if (config.variant) {
|
|
11768
|
+
dateInputField.config.main.variant = config.variant;
|
|
11827
11769
|
}
|
|
11828
11770
|
return dateInputField;
|
|
11829
11771
|
};
|
|
11830
|
-
const buildDateTime = (
|
|
11772
|
+
const buildDateTime = (config, componentScope) => {
|
|
11831
11773
|
const dateTimeInputField = _.cloneDeep(DateTime);
|
|
11832
|
-
dateTimeInputField.config.main.label =
|
|
11833
|
-
dateTimeInputField.config.main.errorMessage = `${
|
|
11834
|
-
dateTimeInputField.scope =
|
|
11835
|
-
if (
|
|
11836
|
-
dateTimeInputField.config.layout = createLayoutFormat(
|
|
11774
|
+
dateTimeInputField.config.main.label = config.label;
|
|
11775
|
+
dateTimeInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
11776
|
+
dateTimeInputField.scope = componentScope;
|
|
11777
|
+
if (config.layout) {
|
|
11778
|
+
dateTimeInputField.config.layout = createLayoutFormat(config.layout);
|
|
11837
11779
|
}
|
|
11838
|
-
if (
|
|
11839
|
-
dateTimeInputField.config.main.variant =
|
|
11780
|
+
if (config.variant) {
|
|
11781
|
+
dateTimeInputField.config.main.variant = config.variant;
|
|
11840
11782
|
}
|
|
11841
11783
|
return dateTimeInputField;
|
|
11842
11784
|
};
|
|
@@ -11851,17 +11793,17 @@ var RankCard = {
|
|
|
11851
11793
|
main: {}
|
|
11852
11794
|
}
|
|
11853
11795
|
};
|
|
11854
|
-
const buildRankCard = (
|
|
11796
|
+
const buildRankCard = (config, componentScope) => {
|
|
11855
11797
|
const rankCard = _.cloneDeep(RankCard);
|
|
11856
|
-
rankCard.scope =
|
|
11857
|
-
if (
|
|
11858
|
-
rankCard.config.main.rank = `${
|
|
11798
|
+
rankCard.scope = componentScope;
|
|
11799
|
+
if (config.rank) {
|
|
11800
|
+
rankCard.config.main.rank = `${config.rank}`;
|
|
11859
11801
|
}
|
|
11860
|
-
if (
|
|
11861
|
-
rankCard.config.main.height = `${
|
|
11802
|
+
if (config.height) {
|
|
11803
|
+
rankCard.config.main.height = `${config.height}px`;
|
|
11862
11804
|
}
|
|
11863
|
-
if (
|
|
11864
|
-
rankCard.config.layout = createLayoutFormat(
|
|
11805
|
+
if (config.layout) {
|
|
11806
|
+
rankCard.config.layout = createLayoutFormat(config.layout);
|
|
11865
11807
|
}
|
|
11866
11808
|
return rankCard;
|
|
11867
11809
|
};
|
|
@@ -11876,13 +11818,13 @@ var RollAndDice = {
|
|
|
11876
11818
|
main: {}
|
|
11877
11819
|
}
|
|
11878
11820
|
};
|
|
11879
|
-
const buildRollAndDice = (
|
|
11821
|
+
const buildRollAndDice = (config, componentScope) => {
|
|
11880
11822
|
const rank = _.cloneDeep(RollAndDice);
|
|
11881
|
-
if (
|
|
11882
|
-
rank.scope =
|
|
11823
|
+
if (config.name) {
|
|
11824
|
+
rank.scope = componentScope;
|
|
11883
11825
|
}
|
|
11884
|
-
if (
|
|
11885
|
-
rank.config.layout = createLayoutFormat(
|
|
11826
|
+
if (config.layout) {
|
|
11827
|
+
rank.config.layout = createLayoutFormat(config.layout);
|
|
11886
11828
|
}
|
|
11887
11829
|
return rank;
|
|
11888
11830
|
};
|
|
@@ -11903,14 +11845,14 @@ var Timer = {
|
|
|
11903
11845
|
style: {}
|
|
11904
11846
|
}
|
|
11905
11847
|
};
|
|
11906
|
-
const buildTimer = (
|
|
11848
|
+
const buildTimer = (config, componentScope) => {
|
|
11907
11849
|
const timer = _.cloneDeep(Timer);
|
|
11908
|
-
timer.scope =
|
|
11909
|
-
if (
|
|
11910
|
-
timer.config.main.label =
|
|
11850
|
+
timer.scope = componentScope;
|
|
11851
|
+
if (config.label) {
|
|
11852
|
+
timer.config.main.label = config.label;
|
|
11911
11853
|
}
|
|
11912
|
-
if (
|
|
11913
|
-
timer.config.layout = createLayoutFormat(
|
|
11854
|
+
if (config.layout) {
|
|
11855
|
+
timer.config.layout = createLayoutFormat(config.layout);
|
|
11914
11856
|
}
|
|
11915
11857
|
return timer;
|
|
11916
11858
|
};
|
|
@@ -11931,33 +11873,36 @@ var MultipleSelect = {
|
|
|
11931
11873
|
}
|
|
11932
11874
|
}
|
|
11933
11875
|
};
|
|
11934
|
-
const buildMultiSelect = (
|
|
11876
|
+
const buildMultiSelect = (config, componentScope) => {
|
|
11935
11877
|
const multipleSelect = _.cloneDeep(MultipleSelect);
|
|
11936
|
-
multipleSelect.scope =
|
|
11937
|
-
if (
|
|
11938
|
-
multipleSelect.config.main.label =
|
|
11878
|
+
multipleSelect.scope = componentScope;
|
|
11879
|
+
if (config.label) {
|
|
11880
|
+
multipleSelect.config.main.label = config.label;
|
|
11881
|
+
}
|
|
11882
|
+
if (config.layout) {
|
|
11883
|
+
multipleSelect.config.layout = createLayoutFormat(config.layout);
|
|
11939
11884
|
}
|
|
11940
|
-
if (
|
|
11941
|
-
multipleSelect.config.
|
|
11885
|
+
if (config.value) {
|
|
11886
|
+
multipleSelect.config.main.options = config.value;
|
|
11942
11887
|
}
|
|
11943
|
-
if (
|
|
11944
|
-
multipleSelect.config.main.
|
|
11888
|
+
if (config.variant) {
|
|
11889
|
+
multipleSelect.config.main.variant = config.variant;
|
|
11945
11890
|
}
|
|
11946
|
-
if (
|
|
11947
|
-
multipleSelect.config.main.
|
|
11891
|
+
if (config.lazyLoading) {
|
|
11892
|
+
multipleSelect.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
11948
11893
|
}
|
|
11949
|
-
if (
|
|
11950
|
-
multipleSelect.config.
|
|
11894
|
+
if (config.style) {
|
|
11895
|
+
multipleSelect.config.style = JSON.parse(config.style);
|
|
11951
11896
|
}
|
|
11952
11897
|
return multipleSelect;
|
|
11953
11898
|
};
|
|
11954
|
-
const buildBasicUiSchema = (
|
|
11899
|
+
const buildBasicUiSchema = (config) => {
|
|
11955
11900
|
return {
|
|
11956
11901
|
"type": "HorizontalLayout",
|
|
11957
|
-
pageName:
|
|
11958
|
-
name:
|
|
11959
|
-
accessorKey:
|
|
11960
|
-
heading:
|
|
11902
|
+
pageName: config.name,
|
|
11903
|
+
name: config.name,
|
|
11904
|
+
accessorKey: config.name,
|
|
11905
|
+
heading: config.label || config.name,
|
|
11961
11906
|
"elements": []
|
|
11962
11907
|
};
|
|
11963
11908
|
};
|
|
@@ -11988,25 +11933,25 @@ const TextArea = {
|
|
|
11988
11933
|
}
|
|
11989
11934
|
}
|
|
11990
11935
|
};
|
|
11991
|
-
const buildTextArea = (
|
|
11936
|
+
const buildTextArea = (config, componentScope) => {
|
|
11992
11937
|
const textArea = _.cloneDeep(TextArea);
|
|
11993
|
-
textArea.config.main.heading =
|
|
11994
|
-
if (
|
|
11995
|
-
textArea.config.layout = createLayoutFormat(
|
|
11938
|
+
textArea.config.main.heading = config.label;
|
|
11939
|
+
if (config.layout) {
|
|
11940
|
+
textArea.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11996
11941
|
}
|
|
11997
|
-
if (
|
|
11998
|
-
textArea.config.style = JSON.parse(
|
|
11942
|
+
if (config.style) {
|
|
11943
|
+
textArea.config.style = JSON.parse(config.style);
|
|
11999
11944
|
}
|
|
12000
|
-
if (
|
|
12001
|
-
textArea.config.main.placeholder =
|
|
11945
|
+
if (config.placeholder) {
|
|
11946
|
+
textArea.config.main.placeholder = config.placeholder;
|
|
12002
11947
|
}
|
|
12003
|
-
if (
|
|
12004
|
-
textArea.config.main.enableCodeEditor =
|
|
11948
|
+
if (config.enableCodeEditor) {
|
|
11949
|
+
textArea.config.main.enableCodeEditor = config.enableCodeEditor === "YES" ? true : false;
|
|
12005
11950
|
}
|
|
12006
|
-
if (
|
|
12007
|
-
textArea.config.main.codeEditorLanguage =
|
|
11951
|
+
if (config.codeEditorLanguage) {
|
|
11952
|
+
textArea.config.main.codeEditorLanguage = config.codeEditorLanguage;
|
|
12008
11953
|
}
|
|
12009
|
-
textArea.scope =
|
|
11954
|
+
textArea.scope = componentScope;
|
|
12010
11955
|
return textArea;
|
|
12011
11956
|
};
|
|
12012
11957
|
var cardSlider = {
|
|
@@ -12021,13 +11966,13 @@ var cardSlider = {
|
|
|
12021
11966
|
main: {}
|
|
12022
11967
|
}
|
|
12023
11968
|
};
|
|
12024
|
-
const buildSlider = (
|
|
11969
|
+
const buildSlider = (config, componentScope) => {
|
|
12025
11970
|
const slider = _.cloneDeep(cardSlider);
|
|
12026
|
-
if (
|
|
12027
|
-
slider.scope =
|
|
11971
|
+
if (config.name) {
|
|
11972
|
+
slider.scope = componentScope;
|
|
12028
11973
|
}
|
|
12029
|
-
if (
|
|
12030
|
-
slider.config.layout = createLayoutFormat(
|
|
11974
|
+
if (config.layout) {
|
|
11975
|
+
slider.config.layout = createLayoutFormat(config.layout);
|
|
12031
11976
|
}
|
|
12032
11977
|
return slider;
|
|
12033
11978
|
};
|
|
@@ -12044,63 +11989,63 @@ const Checkbox = {
|
|
|
12044
11989
|
}
|
|
12045
11990
|
}
|
|
12046
11991
|
};
|
|
12047
|
-
const buildCheckbox = (
|
|
11992
|
+
const buildCheckbox = (config, componentScope) => {
|
|
12048
11993
|
const check = _.cloneDeep(Checkbox);
|
|
12049
|
-
check.scope =
|
|
12050
|
-
check.config.main.label =
|
|
12051
|
-
if (
|
|
12052
|
-
check.config.layout = createLayoutFormat(
|
|
11994
|
+
check.scope = componentScope;
|
|
11995
|
+
check.config.main.label = config.label;
|
|
11996
|
+
if (config.layout) {
|
|
11997
|
+
check.config.layout = createLayoutFormat(config.layout);
|
|
12053
11998
|
}
|
|
12054
|
-
if (
|
|
12055
|
-
check.config.style = JSON.parse(
|
|
11999
|
+
if (config.style) {
|
|
12000
|
+
check.config.style = JSON.parse(config.style);
|
|
12056
12001
|
}
|
|
12057
12002
|
return check;
|
|
12058
12003
|
};
|
|
12059
|
-
const buildLineGraph = (
|
|
12004
|
+
const buildLineGraph = (config, componentScope) => {
|
|
12060
12005
|
const lineGraph = _.cloneDeep(LineGraph);
|
|
12061
|
-
if (
|
|
12062
|
-
lineGraph.config.layout = createLayoutFormat(
|
|
12006
|
+
if (config.layout) {
|
|
12007
|
+
lineGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12063
12008
|
}
|
|
12064
|
-
lineGraph.config.main.header =
|
|
12065
|
-
if (
|
|
12066
|
-
lineGraph.config.style.containerStyle.height =
|
|
12009
|
+
lineGraph.config.main.header = config.heading;
|
|
12010
|
+
if (config.height) {
|
|
12011
|
+
lineGraph.config.style.containerStyle.height = config.height;
|
|
12067
12012
|
}
|
|
12068
|
-
if (
|
|
12013
|
+
if (config.leftMargin) {
|
|
12069
12014
|
lineGraph.config.style.labelStyle.margin = {
|
|
12070
|
-
left:
|
|
12015
|
+
left: config.leftMargin
|
|
12071
12016
|
};
|
|
12072
12017
|
}
|
|
12073
|
-
if (
|
|
12074
|
-
lineGraph.config.main.bottomLabel =
|
|
12018
|
+
if (config.bottomLabel) {
|
|
12019
|
+
lineGraph.config.main.bottomLabel = config.bottomLabel;
|
|
12075
12020
|
}
|
|
12076
|
-
if (
|
|
12077
|
-
lineGraph.config.main.yAxisValue =
|
|
12021
|
+
if (config.yAxisValue) {
|
|
12022
|
+
lineGraph.config.main.yAxisValue = config.yAxisValue;
|
|
12078
12023
|
}
|
|
12079
|
-
if (
|
|
12080
|
-
lineGraph.config.main.xAxisValue =
|
|
12024
|
+
if (config.xAxisValue) {
|
|
12025
|
+
lineGraph.config.main.xAxisValue = config.xAxisValue;
|
|
12081
12026
|
}
|
|
12082
|
-
if (
|
|
12083
|
-
lineGraph.config.main.leftLabel =
|
|
12027
|
+
if (config.leftLabel) {
|
|
12028
|
+
lineGraph.config.main.leftLabel = config.leftLabel;
|
|
12084
12029
|
}
|
|
12085
|
-
if (
|
|
12086
|
-
lineGraph.config.main.disableLeftLabel =
|
|
12030
|
+
if (config.disableLeftLabel) {
|
|
12031
|
+
lineGraph.config.main.disableLeftLabel = config.disableLeftLabel === "YES" ? true : false;
|
|
12087
12032
|
}
|
|
12088
|
-
if (
|
|
12089
|
-
lineGraph.config.main.legendAvailable =
|
|
12033
|
+
if (config.legendHide) {
|
|
12034
|
+
lineGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
12090
12035
|
}
|
|
12091
|
-
if (
|
|
12092
|
-
lineGraph.config.main.legendDirection =
|
|
12036
|
+
if (config.legendDirection) {
|
|
12037
|
+
lineGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
12093
12038
|
}
|
|
12094
|
-
if (
|
|
12095
|
-
lineGraph.config.main.bottomAxisAngle =
|
|
12039
|
+
if (config.bottomAxisAngle) {
|
|
12040
|
+
lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle === "YES" ? true : false;
|
|
12096
12041
|
}
|
|
12097
|
-
if (
|
|
12098
|
-
lineGraph.config.main.legendLabels = flatObjectValueInArray(
|
|
12042
|
+
if (config.legendLabels) {
|
|
12043
|
+
lineGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
12099
12044
|
}
|
|
12100
|
-
if (
|
|
12101
|
-
lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(
|
|
12045
|
+
if (config.pieArcColors) {
|
|
12046
|
+
lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
12102
12047
|
}
|
|
12103
|
-
lineGraph.scope =
|
|
12048
|
+
lineGraph.scope = componentScope;
|
|
12104
12049
|
return lineGraph;
|
|
12105
12050
|
};
|
|
12106
12051
|
const RadioUiSchema = {
|
|
@@ -12117,21 +12062,21 @@ const RadioUiSchema = {
|
|
|
12117
12062
|
}
|
|
12118
12063
|
}
|
|
12119
12064
|
};
|
|
12120
|
-
const buildRadio = (
|
|
12065
|
+
const buildRadio = (config, componentScope) => {
|
|
12121
12066
|
const Radio = _.cloneDeep(RadioUiSchema);
|
|
12122
|
-
Radio.scope =
|
|
12123
|
-
Radio.config.main.label =
|
|
12124
|
-
if (
|
|
12125
|
-
Radio.config.layout = createLayoutFormat(
|
|
12067
|
+
Radio.scope = componentScope;
|
|
12068
|
+
Radio.config.main.label = config.label;
|
|
12069
|
+
if (config.layout) {
|
|
12070
|
+
Radio.config.layout = createLayoutFormat(config.layout);
|
|
12126
12071
|
}
|
|
12127
|
-
if (
|
|
12128
|
-
Radio.config.main.options =
|
|
12072
|
+
if (config.sectionLabels) {
|
|
12073
|
+
Radio.config.main.options = config.sectionLabels.map((e) => e.label || e.Options);
|
|
12129
12074
|
}
|
|
12130
|
-
if (
|
|
12131
|
-
Radio.config.style = JSON.parse(
|
|
12075
|
+
if (config.style) {
|
|
12076
|
+
Radio.config.style = JSON.parse(config.style);
|
|
12132
12077
|
}
|
|
12133
|
-
if (
|
|
12134
|
-
Radio.config.main.errorMessage =
|
|
12078
|
+
if (config.errorMessage) {
|
|
12079
|
+
Radio.config.main.errorMessage = config.errorMessage;
|
|
12135
12080
|
}
|
|
12136
12081
|
return Radio;
|
|
12137
12082
|
};
|
|
@@ -12147,10 +12092,10 @@ var emptyBox = {
|
|
|
12147
12092
|
style: {}
|
|
12148
12093
|
}
|
|
12149
12094
|
};
|
|
12150
|
-
const buildEmptyBox = (
|
|
12095
|
+
const buildEmptyBox = (config, componentScope) => {
|
|
12151
12096
|
const EmptyBox = _.cloneDeep(emptyBox);
|
|
12152
|
-
if (
|
|
12153
|
-
EmptyBox.config.layout = createLayoutFormat(
|
|
12097
|
+
if (config.layout) {
|
|
12098
|
+
EmptyBox.config.layout = createLayoutFormat(config.layout);
|
|
12154
12099
|
}
|
|
12155
12100
|
return EmptyBox;
|
|
12156
12101
|
};
|
|
@@ -12163,26 +12108,26 @@ const ArrayUiSchema = {
|
|
|
12163
12108
|
main: {}
|
|
12164
12109
|
}
|
|
12165
12110
|
};
|
|
12166
|
-
const buildArray = (
|
|
12111
|
+
const buildArray = (config, componentScope) => {
|
|
12167
12112
|
const array = _.cloneDeep(ArrayUiSchema);
|
|
12168
|
-
if (
|
|
12169
|
-
array.config.main.allExpanded =
|
|
12113
|
+
if (config.allExpanded) {
|
|
12114
|
+
array.config.main.allExpanded = config.allExpanded === "YES" ? true : false;
|
|
12170
12115
|
}
|
|
12171
|
-
if (
|
|
12172
|
-
array.config.main.disableAddButton =
|
|
12116
|
+
if (config.disableAddButton) {
|
|
12117
|
+
array.config.main.disableAddButton = config.disableAddButton === "YES" ? true : false;
|
|
12173
12118
|
}
|
|
12174
|
-
if (
|
|
12175
|
-
array.config.main.disableExpandAllButton =
|
|
12119
|
+
if (config.disableExpandAllButton) {
|
|
12120
|
+
array.config.main.disableExpandAllButton = config.disableExpandAllButton === "YES" ? true : false;
|
|
12176
12121
|
}
|
|
12177
|
-
if (
|
|
12178
|
-
array.config.main.disableRowActions =
|
|
12122
|
+
if (config.disableRowActions) {
|
|
12123
|
+
array.config.main.disableRowActions = config.disableRowActions === "YES" ? true : false;
|
|
12179
12124
|
}
|
|
12180
|
-
if (
|
|
12181
|
-
array.config.style = JSON.parse(
|
|
12125
|
+
if (config.style) {
|
|
12126
|
+
array.config.style = JSON.parse(config.style);
|
|
12182
12127
|
}
|
|
12183
|
-
array.config.main.childElementLabel =
|
|
12184
|
-
array.config.main.label =
|
|
12185
|
-
array.scope =
|
|
12128
|
+
array.config.main.childElementLabel = config.childElementLabel;
|
|
12129
|
+
array.config.main.label = config.label;
|
|
12130
|
+
array.scope = componentScope;
|
|
12186
12131
|
return array;
|
|
12187
12132
|
};
|
|
12188
12133
|
const TextField = {
|
|
@@ -12201,17 +12146,17 @@ const TextField = {
|
|
|
12201
12146
|
}
|
|
12202
12147
|
}
|
|
12203
12148
|
};
|
|
12204
|
-
const buildAdhaarField = (
|
|
12149
|
+
const buildAdhaarField = (config, componentScope) => {
|
|
12205
12150
|
const inputField = _.cloneDeep(TextField);
|
|
12206
|
-
inputField.config.main.label =
|
|
12207
|
-
if (
|
|
12208
|
-
inputField.config.style = JSON.parse(
|
|
12151
|
+
inputField.config.main.label = config.label;
|
|
12152
|
+
if (config.style) {
|
|
12153
|
+
inputField.config.style = JSON.parse(config.style);
|
|
12209
12154
|
}
|
|
12210
|
-
if (
|
|
12211
|
-
inputField.config.layout = createLayoutFormat(
|
|
12155
|
+
if (config.layout) {
|
|
12156
|
+
inputField.config.layout = createLayoutFormat(config.layout);
|
|
12212
12157
|
}
|
|
12213
|
-
inputField.config.main.errorMessage = `${
|
|
12214
|
-
inputField.scope =
|
|
12158
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
12159
|
+
inputField.scope = componentScope;
|
|
12215
12160
|
return inputField;
|
|
12216
12161
|
};
|
|
12217
12162
|
const PanField = {
|
|
@@ -12230,17 +12175,17 @@ const PanField = {
|
|
|
12230
12175
|
}
|
|
12231
12176
|
}
|
|
12232
12177
|
};
|
|
12233
|
-
const buildPanField = (
|
|
12178
|
+
const buildPanField = (config, componentScope) => {
|
|
12234
12179
|
const inputField = _.cloneDeep(PanField);
|
|
12235
|
-
inputField.config.main.label =
|
|
12236
|
-
if (
|
|
12237
|
-
inputField.config.style = JSON.parse(
|
|
12180
|
+
inputField.config.main.label = config.label;
|
|
12181
|
+
if (config.style) {
|
|
12182
|
+
inputField.config.style = JSON.parse(config.style);
|
|
12238
12183
|
}
|
|
12239
|
-
if (
|
|
12240
|
-
inputField.config.layout = createLayoutFormat(
|
|
12184
|
+
if (config.layout) {
|
|
12185
|
+
inputField.config.layout = createLayoutFormat(config.layout);
|
|
12241
12186
|
}
|
|
12242
|
-
inputField.config.main.errorMessage = `${
|
|
12243
|
-
inputField.scope =
|
|
12187
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
12188
|
+
inputField.scope = componentScope;
|
|
12244
12189
|
return inputField;
|
|
12245
12190
|
};
|
|
12246
12191
|
const FileInput = {
|
|
@@ -12262,33 +12207,30 @@ const FileInput = {
|
|
|
12262
12207
|
}
|
|
12263
12208
|
}
|
|
12264
12209
|
};
|
|
12265
|
-
const buildFileInput = (
|
|
12210
|
+
const buildFileInput = (config, componentScope) => {
|
|
12266
12211
|
const box = _.cloneDeep(FileInput);
|
|
12267
|
-
box.scope =
|
|
12268
|
-
box.config.main.label =
|
|
12269
|
-
if (
|
|
12270
|
-
box.config.layout = createLayoutFormat(
|
|
12271
|
-
}
|
|
12272
|
-
if (config2.style) {
|
|
12273
|
-
box.config.style = JSON.parse(config2.style);
|
|
12212
|
+
box.scope = componentScope;
|
|
12213
|
+
box.config.main.label = config.label;
|
|
12214
|
+
if (config.layout) {
|
|
12215
|
+
box.config.layout = createLayoutFormat(config.layout);
|
|
12274
12216
|
}
|
|
12275
|
-
if (
|
|
12276
|
-
box.config.
|
|
12217
|
+
if (config.style) {
|
|
12218
|
+
box.config.style = JSON.parse(config.style);
|
|
12277
12219
|
}
|
|
12278
|
-
if (
|
|
12279
|
-
box.config.main.
|
|
12220
|
+
if (config.variant) {
|
|
12221
|
+
box.config.main.variant = config.variant;
|
|
12280
12222
|
}
|
|
12281
|
-
if (
|
|
12282
|
-
box.config.main.
|
|
12223
|
+
if (config.disableUpload) {
|
|
12224
|
+
box.config.main.disableUpload = config.disableUpload === "YES" ? true : false;
|
|
12283
12225
|
}
|
|
12284
|
-
if (
|
|
12285
|
-
box.config.main.
|
|
12226
|
+
if (config.disableDownload) {
|
|
12227
|
+
box.config.main.disableDownload = config.disableDownload === "YES" ? true : false;
|
|
12286
12228
|
}
|
|
12287
|
-
if (
|
|
12288
|
-
box.config.main.
|
|
12229
|
+
if (config.disableDelete) {
|
|
12230
|
+
box.config.main.disableDelete = config.disableDelete === "YES" ? true : false;
|
|
12289
12231
|
}
|
|
12290
|
-
if (
|
|
12291
|
-
box.config.main.
|
|
12232
|
+
if (config.description) {
|
|
12233
|
+
box.config.main.description = config.description;
|
|
12292
12234
|
}
|
|
12293
12235
|
return box;
|
|
12294
12236
|
};
|
|
@@ -12308,26 +12250,26 @@ const Stepper = {
|
|
|
12308
12250
|
},
|
|
12309
12251
|
"elements": []
|
|
12310
12252
|
};
|
|
12311
|
-
const buildStepper = (
|
|
12253
|
+
const buildStepper = (config, componentScope) => {
|
|
12312
12254
|
const stepper = _.cloneDeep(Stepper);
|
|
12313
|
-
stepper.scope =
|
|
12314
|
-
stepper.config.main.resetButton =
|
|
12315
|
-
if (
|
|
12316
|
-
stepper.config.main.defaultButtonAvailable =
|
|
12317
|
-
}
|
|
12318
|
-
stepper.config.main.resetText =
|
|
12319
|
-
stepper.config.main.completeText =
|
|
12320
|
-
stepper.config.main.orientation =
|
|
12321
|
-
if (
|
|
12322
|
-
stepper.config.main.steps =
|
|
12255
|
+
stepper.scope = componentScope;
|
|
12256
|
+
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
12257
|
+
if (config.defaultButtonAvailable) {
|
|
12258
|
+
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
12259
|
+
}
|
|
12260
|
+
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
12261
|
+
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
12262
|
+
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
12263
|
+
if (config.sectionLabels) {
|
|
12264
|
+
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
12323
12265
|
return { label: e.label, id: i };
|
|
12324
12266
|
});
|
|
12325
12267
|
}
|
|
12326
|
-
if (
|
|
12327
|
-
stepper.config.layout = createLayoutFormat(
|
|
12268
|
+
if (config.layout) {
|
|
12269
|
+
stepper.config.layout = createLayoutFormat(config.layout);
|
|
12328
12270
|
}
|
|
12329
|
-
if (
|
|
12330
|
-
stepper.config.style = JSON.parse(
|
|
12271
|
+
if (config.style) {
|
|
12272
|
+
stepper.config.style = JSON.parse(config.style);
|
|
12331
12273
|
}
|
|
12332
12274
|
return stepper;
|
|
12333
12275
|
};
|
|
@@ -12355,18 +12297,18 @@ const PopUP = {
|
|
|
12355
12297
|
style: {}
|
|
12356
12298
|
}
|
|
12357
12299
|
};
|
|
12358
|
-
const buildPopUp = (
|
|
12300
|
+
const buildPopUp = (config, componentScope) => {
|
|
12359
12301
|
const popup = _.cloneDeep(PopUP);
|
|
12360
|
-
popup.scope =
|
|
12361
|
-
popup.config.main.title =
|
|
12362
|
-
popup.config.main.fullScreen =
|
|
12363
|
-
popup.config.main.fullWidth =
|
|
12364
|
-
popup.config.main.maxWidth =
|
|
12365
|
-
if (
|
|
12366
|
-
popup.config.layout = createLayoutFormat(
|
|
12302
|
+
popup.scope = componentScope;
|
|
12303
|
+
popup.config.main.title = config.label;
|
|
12304
|
+
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
12305
|
+
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
12306
|
+
popup.config.main.maxWidth = config.maxWidth || false;
|
|
12307
|
+
if (config.layout) {
|
|
12308
|
+
popup.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12367
12309
|
}
|
|
12368
|
-
if (
|
|
12369
|
-
popup.config.style = JSON.parse(
|
|
12310
|
+
if (config.style) {
|
|
12311
|
+
popup.config.style = JSON.parse(config.style);
|
|
12370
12312
|
}
|
|
12371
12313
|
return popup;
|
|
12372
12314
|
};
|
|
@@ -12386,30 +12328,30 @@ const dataGrid = {
|
|
|
12386
12328
|
style: {}
|
|
12387
12329
|
}
|
|
12388
12330
|
};
|
|
12389
|
-
const buildDataGrid = (
|
|
12331
|
+
const buildDataGrid = (config, componentScope) => {
|
|
12390
12332
|
const DataGrid = _.cloneDeep(dataGrid);
|
|
12391
|
-
DataGrid.scope =
|
|
12392
|
-
if (
|
|
12393
|
-
DataGrid.config.main.elevation = +
|
|
12333
|
+
DataGrid.scope = componentScope;
|
|
12334
|
+
if (config.elevation) {
|
|
12335
|
+
DataGrid.config.main.elevation = +config.elevation;
|
|
12394
12336
|
}
|
|
12395
|
-
DataGrid.config.main.divider =
|
|
12396
|
-
if (
|
|
12397
|
-
DataGrid.config.main.height = `${
|
|
12337
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
12338
|
+
if (config.height) {
|
|
12339
|
+
DataGrid.config.main.height = `${config.height}px`;
|
|
12398
12340
|
}
|
|
12399
|
-
if (
|
|
12400
|
-
DataGrid.config.main.justifyContent =
|
|
12341
|
+
if (config.justifyContent) {
|
|
12342
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
12401
12343
|
}
|
|
12402
|
-
if (
|
|
12403
|
-
DataGrid.config.main.label =
|
|
12344
|
+
if (config.label) {
|
|
12345
|
+
DataGrid.config.main.label = config.label;
|
|
12404
12346
|
}
|
|
12405
|
-
if (
|
|
12406
|
-
DataGrid.config.layout = createLayoutFormat(
|
|
12347
|
+
if (config.layout) {
|
|
12348
|
+
DataGrid.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12407
12349
|
}
|
|
12408
|
-
if (
|
|
12409
|
-
DataGrid.config.cardLayout = createLayoutFormat(
|
|
12350
|
+
if (config.cardLayout) {
|
|
12351
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout, config.type);
|
|
12410
12352
|
}
|
|
12411
|
-
if (
|
|
12412
|
-
DataGrid.config.style = JSON.parse(
|
|
12353
|
+
if (config.style) {
|
|
12354
|
+
DataGrid.config.style = JSON.parse(config.style);
|
|
12413
12355
|
}
|
|
12414
12356
|
return DataGrid;
|
|
12415
12357
|
};
|
|
@@ -12430,27 +12372,27 @@ const InputSlider = {
|
|
|
12430
12372
|
}
|
|
12431
12373
|
}
|
|
12432
12374
|
};
|
|
12433
|
-
const buildInputSlider = (
|
|
12375
|
+
const buildInputSlider = (config, componentScope) => {
|
|
12434
12376
|
const inputSlider = _.cloneDeep(InputSlider);
|
|
12435
|
-
inputSlider.scope =
|
|
12436
|
-
inputSlider.config.main.label =
|
|
12437
|
-
if (
|
|
12438
|
-
inputSlider.config.layout = createLayoutFormat(
|
|
12377
|
+
inputSlider.scope = componentScope;
|
|
12378
|
+
inputSlider.config.main.label = config.label;
|
|
12379
|
+
if (config.layout) {
|
|
12380
|
+
inputSlider.config.layout = createLayoutFormat(config.layout);
|
|
12439
12381
|
}
|
|
12440
|
-
if (
|
|
12441
|
-
inputSlider.config.main.limitToMax =
|
|
12382
|
+
if (config.limitToMax) {
|
|
12383
|
+
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
12442
12384
|
}
|
|
12443
|
-
if (
|
|
12444
|
-
inputSlider.config.main.max =
|
|
12385
|
+
if (config.max) {
|
|
12386
|
+
inputSlider.config.main.max = config.max;
|
|
12445
12387
|
}
|
|
12446
|
-
if (
|
|
12447
|
-
inputSlider.config.main.step =
|
|
12388
|
+
if (config.step) {
|
|
12389
|
+
inputSlider.config.main.step = config.step;
|
|
12448
12390
|
}
|
|
12449
|
-
if (
|
|
12450
|
-
inputSlider.config.main.min =
|
|
12391
|
+
if (config.min) {
|
|
12392
|
+
inputSlider.config.main.min = config.min;
|
|
12451
12393
|
}
|
|
12452
|
-
if (
|
|
12453
|
-
inputSlider.config.main.defaultStyle = JSON.parse(
|
|
12394
|
+
if (config.style) {
|
|
12395
|
+
inputSlider.config.main.defaultStyle = JSON.parse(config.style);
|
|
12454
12396
|
}
|
|
12455
12397
|
return inputSlider;
|
|
12456
12398
|
};
|
|
@@ -12477,35 +12419,35 @@ const TreeMap = {
|
|
|
12477
12419
|
},
|
|
12478
12420
|
elements: []
|
|
12479
12421
|
};
|
|
12480
|
-
const buildTreeMap = (
|
|
12422
|
+
const buildTreeMap = (config, componentScope) => {
|
|
12481
12423
|
const treMap = _.cloneDeep(TreeMap);
|
|
12482
|
-
treMap.scope =
|
|
12483
|
-
if (
|
|
12484
|
-
treMap.config.main.header =
|
|
12424
|
+
treMap.scope = componentScope;
|
|
12425
|
+
if (config.label) {
|
|
12426
|
+
treMap.config.main.header = config.label;
|
|
12485
12427
|
}
|
|
12486
|
-
if (
|
|
12487
|
-
treMap.config.layout = createLayoutFormat(
|
|
12428
|
+
if (config.layout) {
|
|
12429
|
+
treMap.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12488
12430
|
}
|
|
12489
|
-
if (
|
|
12490
|
-
treMap.config.main.orientation =
|
|
12431
|
+
if (config.orientation) {
|
|
12432
|
+
treMap.config.main.orientation = config.orientation;
|
|
12491
12433
|
}
|
|
12492
|
-
if (
|
|
12493
|
-
treMap.config.main.linkType =
|
|
12434
|
+
if (config.linkType) {
|
|
12435
|
+
treMap.config.main.linkType = config.linkType;
|
|
12494
12436
|
}
|
|
12495
|
-
if (
|
|
12496
|
-
treMap.config.main.graphHeight =
|
|
12437
|
+
if (config.graphHeight) {
|
|
12438
|
+
treMap.config.main.graphHeight = config.graphHeight;
|
|
12497
12439
|
}
|
|
12498
|
-
if (
|
|
12499
|
-
treMap.config.main.graphWidth =
|
|
12440
|
+
if (config.graphWidth) {
|
|
12441
|
+
treMap.config.main.graphWidth = config.graphWidth;
|
|
12500
12442
|
}
|
|
12501
|
-
if (
|
|
12502
|
-
treMap.config.main.graphZoomHeight =
|
|
12443
|
+
if (config.graphZoomHeight) {
|
|
12444
|
+
treMap.config.main.graphZoomHeight = config.graphZoomHeight;
|
|
12503
12445
|
}
|
|
12504
|
-
if (
|
|
12505
|
-
treMap.config.main.graphZoomWidth =
|
|
12446
|
+
if (config.graphZoomWidth) {
|
|
12447
|
+
treMap.config.main.graphZoomWidth = config.graphZoomWidth;
|
|
12506
12448
|
}
|
|
12507
|
-
if (
|
|
12508
|
-
treMap.config.style = JSON.parse(
|
|
12449
|
+
if (config.style) {
|
|
12450
|
+
treMap.config.style = JSON.parse(config.style);
|
|
12509
12451
|
}
|
|
12510
12452
|
return treMap;
|
|
12511
12453
|
};
|
|
@@ -12520,20 +12462,20 @@ var Thought = {
|
|
|
12520
12462
|
main: {}
|
|
12521
12463
|
}
|
|
12522
12464
|
};
|
|
12523
|
-
const buildThoughtOfTheDay = (
|
|
12465
|
+
const buildThoughtOfTheDay = (config, componentScope) => {
|
|
12524
12466
|
const thought = _.cloneDeep(Thought);
|
|
12525
|
-
thought.scope =
|
|
12526
|
-
if (
|
|
12527
|
-
thought.config.main.thought = `${
|
|
12467
|
+
thought.scope = componentScope;
|
|
12468
|
+
if (config.thought) {
|
|
12469
|
+
thought.config.main.thought = `${config.thought}`;
|
|
12528
12470
|
}
|
|
12529
|
-
if (
|
|
12530
|
-
thought.config.layout = createLayoutFormat(
|
|
12471
|
+
if (config.layout) {
|
|
12472
|
+
thought.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12531
12473
|
}
|
|
12532
|
-
if (
|
|
12533
|
-
thought.config.main.label =
|
|
12474
|
+
if (config.label) {
|
|
12475
|
+
thought.config.main.label = config.label;
|
|
12534
12476
|
}
|
|
12535
|
-
if (
|
|
12536
|
-
thought.config.style = JSON.parse(
|
|
12477
|
+
if (config.style) {
|
|
12478
|
+
thought.config.style = JSON.parse(config.style);
|
|
12537
12479
|
}
|
|
12538
12480
|
return thought;
|
|
12539
12481
|
};
|
|
@@ -12549,14 +12491,14 @@ var horizontalLayout = {
|
|
|
12549
12491
|
},
|
|
12550
12492
|
elements: []
|
|
12551
12493
|
};
|
|
12552
|
-
const buildHorizontalLayout = (
|
|
12494
|
+
const buildHorizontalLayout = (config, componentScope) => {
|
|
12553
12495
|
const horizontal = _.cloneDeep(horizontalLayout);
|
|
12554
|
-
horizontal.scope =
|
|
12555
|
-
if (
|
|
12556
|
-
horizontal.config.style = JSON.parse(
|
|
12496
|
+
horizontal.scope = componentScope;
|
|
12497
|
+
if (config.style) {
|
|
12498
|
+
horizontal.config.style = JSON.parse(config.style);
|
|
12557
12499
|
}
|
|
12558
|
-
if (
|
|
12559
|
-
horizontal.config.layout = createLayoutFormat(
|
|
12500
|
+
if (config.layout) {
|
|
12501
|
+
horizontal.config.layout = createLayoutFormat(config.layout, config.type);
|
|
12560
12502
|
}
|
|
12561
12503
|
return horizontal;
|
|
12562
12504
|
};
|
|
@@ -12574,18 +12516,18 @@ const imageUiSchema = {
|
|
|
12574
12516
|
style: {}
|
|
12575
12517
|
}
|
|
12576
12518
|
};
|
|
12577
|
-
const buildImage = (
|
|
12519
|
+
const buildImage = (config, componentScope) => {
|
|
12578
12520
|
const image = _.cloneDeep(imageUiSchema);
|
|
12579
|
-
image.scope =
|
|
12580
|
-
image.config.main.url =
|
|
12581
|
-
if (
|
|
12582
|
-
image.config.layout = createLayoutFormat(
|
|
12521
|
+
image.scope = componentScope;
|
|
12522
|
+
image.config.main.url = config.imageUrl;
|
|
12523
|
+
if (config.layout) {
|
|
12524
|
+
image.config.layout = createLayoutFormat(config.layout);
|
|
12583
12525
|
}
|
|
12584
|
-
if (
|
|
12585
|
-
image.config.style = JSON.parse(
|
|
12526
|
+
if (config.style) {
|
|
12527
|
+
image.config.style = JSON.parse(config.style);
|
|
12586
12528
|
}
|
|
12587
|
-
if (
|
|
12588
|
-
image.config.style.imageStyle = { ...image.config.style.imageStyle, height:
|
|
12529
|
+
if (config.height) {
|
|
12530
|
+
image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config.height };
|
|
12589
12531
|
}
|
|
12590
12532
|
return image;
|
|
12591
12533
|
};
|
|
@@ -12594,12 +12536,12 @@ let schema = {
|
|
|
12594
12536
|
properties: {},
|
|
12595
12537
|
required: []
|
|
12596
12538
|
};
|
|
12597
|
-
function buildSchemaFromConfig(
|
|
12539
|
+
function buildSchemaFromConfig(config, parentSchema) {
|
|
12598
12540
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
12599
|
-
if (
|
|
12600
|
-
if (
|
|
12541
|
+
if (config.elements) {
|
|
12542
|
+
if (config.type === "Array") {
|
|
12601
12543
|
(_a = parentSchema.properties) != null ? _a : parentSchema.properties = {};
|
|
12602
|
-
(_d = (_b = parentSchema.properties)[_c =
|
|
12544
|
+
(_d = (_b = parentSchema.properties)[_c = config.name]) != null ? _d : _b[_c] = {
|
|
12603
12545
|
type: "array",
|
|
12604
12546
|
items: {
|
|
12605
12547
|
type: "object",
|
|
@@ -12607,26 +12549,26 @@ function buildSchemaFromConfig(config2, parentSchema) {
|
|
|
12607
12549
|
required: []
|
|
12608
12550
|
}
|
|
12609
12551
|
};
|
|
12610
|
-
const arrayItemSchema = parentSchema.properties[
|
|
12611
|
-
(_e =
|
|
12552
|
+
const arrayItemSchema = parentSchema.properties[config.name].items;
|
|
12553
|
+
(_e = config.elements) == null ? void 0 : _e.forEach(
|
|
12612
12554
|
(child) => buildSchemaFromConfig(child, arrayItemSchema)
|
|
12613
12555
|
);
|
|
12614
12556
|
return;
|
|
12615
12557
|
} else {
|
|
12616
|
-
(_f =
|
|
12558
|
+
(_f = config.elements) == null ? void 0 : _f.forEach(
|
|
12617
12559
|
(child) => buildSchemaFromConfig(child, parentSchema)
|
|
12618
12560
|
);
|
|
12619
12561
|
return;
|
|
12620
12562
|
}
|
|
12621
12563
|
}
|
|
12622
12564
|
(_g = parentSchema.properties) != null ? _g : parentSchema.properties = {};
|
|
12623
|
-
(_j = (_h = parentSchema.properties)[_i =
|
|
12624
|
-
const fieldSchema = parentSchema.properties[
|
|
12625
|
-
(_k =
|
|
12565
|
+
(_j = (_h = parentSchema.properties)[_i = config.name]) != null ? _j : _h[_i] = {};
|
|
12566
|
+
const fieldSchema = parentSchema.properties[config.name];
|
|
12567
|
+
(_k = config.validation) == null ? void 0 : _k.forEach((v) => {
|
|
12626
12568
|
var _a2;
|
|
12627
12569
|
if (v.validationType === "required") {
|
|
12628
12570
|
(_a2 = parentSchema.required) != null ? _a2 : parentSchema.required = [];
|
|
12629
|
-
parentSchema.required.push(
|
|
12571
|
+
parentSchema.required.push(config.name);
|
|
12630
12572
|
} else if (v.validationType === "readOnly") {
|
|
12631
12573
|
fieldSchema.type = "string";
|
|
12632
12574
|
fieldSchema.disabled = true;
|
|
@@ -12635,171 +12577,171 @@ function buildSchemaFromConfig(config2, parentSchema) {
|
|
|
12635
12577
|
fieldSchema[v.validationType] = isNaN(v.validationValue) ? v.validationValue : Number(v.validationValue);
|
|
12636
12578
|
}
|
|
12637
12579
|
});
|
|
12638
|
-
if (
|
|
12639
|
-
fieldSchema.oneOf =
|
|
12580
|
+
if (config.type === "Select" && ((_l = config.value) == null ? void 0 : _l.length)) {
|
|
12581
|
+
fieldSchema.oneOf = config.value.map((v) => ({
|
|
12640
12582
|
const: v.value,
|
|
12641
12583
|
title: v.label
|
|
12642
12584
|
}));
|
|
12643
12585
|
}
|
|
12644
|
-
if (
|
|
12586
|
+
if (config.type === "MultipleSelect" && ((_m = config.value) == null ? void 0 : _m.length)) {
|
|
12645
12587
|
fieldSchema.type = "array";
|
|
12646
12588
|
fieldSchema.items = {
|
|
12647
|
-
oneOf:
|
|
12589
|
+
oneOf: config.value.map((v) => ({
|
|
12648
12590
|
const: v.value,
|
|
12649
12591
|
title: v.label
|
|
12650
12592
|
}))
|
|
12651
12593
|
};
|
|
12652
12594
|
}
|
|
12653
12595
|
}
|
|
12654
|
-
const buildSchema = (
|
|
12655
|
-
buildSchemaFromConfig(
|
|
12596
|
+
const buildSchema = (config) => {
|
|
12597
|
+
buildSchemaFromConfig(config, schema);
|
|
12656
12598
|
return schema;
|
|
12657
12599
|
};
|
|
12658
|
-
const buildUiSchema = (
|
|
12600
|
+
const buildUiSchema = (config, store2) => {
|
|
12659
12601
|
let elements = {};
|
|
12660
|
-
const
|
|
12661
|
-
switch (
|
|
12602
|
+
const componentScope = `#/properties/${config.name}`;
|
|
12603
|
+
switch (config.type) {
|
|
12662
12604
|
case "TreeMap":
|
|
12663
|
-
elements = buildTreeMap(
|
|
12605
|
+
elements = buildTreeMap(config, componentScope);
|
|
12664
12606
|
break;
|
|
12665
12607
|
case "DateTime":
|
|
12666
|
-
elements = buildDateTime(
|
|
12608
|
+
elements = buildDateTime(config, componentScope);
|
|
12667
12609
|
break;
|
|
12668
12610
|
case "InputSlider":
|
|
12669
|
-
elements = buildInputSlider(
|
|
12611
|
+
elements = buildInputSlider(config, componentScope);
|
|
12670
12612
|
break;
|
|
12671
12613
|
case "DataGrid":
|
|
12672
|
-
elements = buildDataGrid(
|
|
12614
|
+
elements = buildDataGrid(config, componentScope);
|
|
12673
12615
|
break;
|
|
12674
12616
|
case "Stepper":
|
|
12675
|
-
elements = buildStepper(
|
|
12617
|
+
elements = buildStepper(config, componentScope);
|
|
12676
12618
|
break;
|
|
12677
12619
|
case "PopUp":
|
|
12678
|
-
elements = buildPopUp(
|
|
12620
|
+
elements = buildPopUp(config, componentScope);
|
|
12679
12621
|
break;
|
|
12680
12622
|
case "FileInput":
|
|
12681
|
-
elements = buildFileInput(
|
|
12623
|
+
elements = buildFileInput(config, componentScope);
|
|
12682
12624
|
break;
|
|
12683
12625
|
case "AadharcardText":
|
|
12684
|
-
elements = buildAdhaarField(
|
|
12626
|
+
elements = buildAdhaarField(config, componentScope);
|
|
12685
12627
|
break;
|
|
12686
12628
|
case "PanCardText":
|
|
12687
|
-
elements = buildPanField(
|
|
12629
|
+
elements = buildPanField(config, componentScope);
|
|
12688
12630
|
break;
|
|
12689
12631
|
case "TabSection":
|
|
12690
|
-
elements = buildTabSection(
|
|
12632
|
+
elements = buildTabSection(config, componentScope);
|
|
12691
12633
|
break;
|
|
12692
12634
|
case "RunnerBoyProgressBar":
|
|
12693
|
-
elements = RunnerBoyProgressbar(
|
|
12635
|
+
elements = RunnerBoyProgressbar(config, componentScope);
|
|
12694
12636
|
break;
|
|
12695
12637
|
case "WrapperSection":
|
|
12696
|
-
elements = buildWrapperSection(
|
|
12638
|
+
elements = buildWrapperSection(config, componentScope);
|
|
12697
12639
|
break;
|
|
12698
12640
|
case "HorizontalLayout":
|
|
12699
|
-
elements = buildHorizontalLayout(
|
|
12641
|
+
elements = buildHorizontalLayout(config, componentScope);
|
|
12700
12642
|
break;
|
|
12701
12643
|
case "Text":
|
|
12702
|
-
elements = buildTextField(
|
|
12644
|
+
elements = buildTextField(config, componentScope);
|
|
12703
12645
|
break;
|
|
12704
12646
|
case "TextArea":
|
|
12705
|
-
elements = buildTextArea(
|
|
12647
|
+
elements = buildTextArea(config, componentScope);
|
|
12706
12648
|
break;
|
|
12707
12649
|
case "Date":
|
|
12708
|
-
elements = buildDate(
|
|
12650
|
+
elements = buildDate(config, componentScope);
|
|
12709
12651
|
break;
|
|
12710
12652
|
case "Select":
|
|
12711
|
-
elements = buildSelect(
|
|
12653
|
+
elements = buildSelect(config, componentScope);
|
|
12712
12654
|
break;
|
|
12713
12655
|
case "Radio":
|
|
12714
|
-
elements = buildRadio(
|
|
12656
|
+
elements = buildRadio(config, componentScope);
|
|
12715
12657
|
break;
|
|
12716
12658
|
case "Button":
|
|
12717
|
-
elements = buildButton(
|
|
12659
|
+
elements = buildButton(config, componentScope);
|
|
12718
12660
|
break;
|
|
12719
12661
|
case "Table":
|
|
12720
|
-
elements = buildTable(
|
|
12662
|
+
elements = buildTable(config, componentScope);
|
|
12721
12663
|
break;
|
|
12722
12664
|
case "Array":
|
|
12723
|
-
elements = buildArray(
|
|
12665
|
+
elements = buildArray(config, componentScope);
|
|
12724
12666
|
break;
|
|
12725
12667
|
case "Box":
|
|
12726
|
-
elements = buildLabel(
|
|
12668
|
+
elements = buildLabel(config, componentScope);
|
|
12727
12669
|
break;
|
|
12728
12670
|
case "CheckBox":
|
|
12729
|
-
elements = buildCheckbox(
|
|
12671
|
+
elements = buildCheckbox(config, componentScope);
|
|
12730
12672
|
break;
|
|
12731
12673
|
case "UploadFile":
|
|
12732
|
-
elements = buildUploadFile(
|
|
12674
|
+
elements = buildUploadFile(config, componentScope);
|
|
12733
12675
|
break;
|
|
12734
12676
|
case "DownloadFile":
|
|
12735
|
-
elements = buildDownloadFile(
|
|
12677
|
+
elements = buildDownloadFile(config, componentScope);
|
|
12736
12678
|
break;
|
|
12737
12679
|
case "EmptyBox":
|
|
12738
|
-
elements = buildEmptyBox(
|
|
12680
|
+
elements = buildEmptyBox(config);
|
|
12739
12681
|
break;
|
|
12740
12682
|
case "card":
|
|
12741
|
-
elements = buildCard(
|
|
12683
|
+
elements = buildCard(config, componentScope, store2);
|
|
12742
12684
|
break;
|
|
12743
12685
|
case "Graph":
|
|
12744
|
-
switch (
|
|
12686
|
+
switch (config.graphType) {
|
|
12745
12687
|
case "BarGraph":
|
|
12746
12688
|
case "StackBarGraph":
|
|
12747
|
-
elements = buildStackbarGraph(
|
|
12689
|
+
elements = buildStackbarGraph(config, componentScope);
|
|
12748
12690
|
break;
|
|
12749
12691
|
case "LineGraph":
|
|
12750
|
-
elements = buildLineGraph(
|
|
12692
|
+
elements = buildLineGraph(config, componentScope);
|
|
12751
12693
|
break;
|
|
12752
12694
|
case "PieGraph":
|
|
12753
|
-
elements = buildPieGraph(
|
|
12695
|
+
elements = buildPieGraph(config, componentScope);
|
|
12754
12696
|
break;
|
|
12755
12697
|
case "HorizontalBarGraph":
|
|
12756
12698
|
case "HorizontalStackBarGraph":
|
|
12757
|
-
elements = buildHorizontalBarGraph(
|
|
12699
|
+
elements = buildHorizontalBarGraph(config, componentScope);
|
|
12758
12700
|
break;
|
|
12759
12701
|
default:
|
|
12760
|
-
elements = buildStackbarGraph(
|
|
12702
|
+
elements = buildStackbarGraph(config, componentScope);
|
|
12761
12703
|
break;
|
|
12762
12704
|
}
|
|
12763
12705
|
break;
|
|
12764
12706
|
case "ProgressBar":
|
|
12765
|
-
elements = buildProgressBar(
|
|
12707
|
+
elements = buildProgressBar(config, componentScope);
|
|
12766
12708
|
break;
|
|
12767
12709
|
case "SpeedoMeter":
|
|
12768
|
-
elements = buildSpeedoMeter(
|
|
12710
|
+
elements = buildSpeedoMeter(config, componentScope);
|
|
12769
12711
|
break;
|
|
12770
12712
|
case "ProgressBarCard":
|
|
12771
|
-
elements = buildProgressBarCard(
|
|
12713
|
+
elements = buildProgressBarCard(config, componentScope);
|
|
12772
12714
|
break;
|
|
12773
12715
|
case "RankCard":
|
|
12774
|
-
elements = buildRankCard(
|
|
12716
|
+
elements = buildRankCard(config, componentScope);
|
|
12775
12717
|
break;
|
|
12776
12718
|
case "Rank":
|
|
12777
|
-
elements = buildRollAndDice(
|
|
12719
|
+
elements = buildRollAndDice(config, componentScope);
|
|
12778
12720
|
break;
|
|
12779
12721
|
case "Slider":
|
|
12780
|
-
elements = buildSlider(
|
|
12722
|
+
elements = buildSlider(config, componentScope);
|
|
12781
12723
|
break;
|
|
12782
12724
|
case "Timer":
|
|
12783
|
-
elements = buildTimer(
|
|
12725
|
+
elements = buildTimer(config, componentScope);
|
|
12784
12726
|
break;
|
|
12785
12727
|
case "ColumnGroup":
|
|
12786
12728
|
elements = {
|
|
12787
|
-
accessorKey:
|
|
12788
|
-
header:
|
|
12729
|
+
accessorKey: config.name,
|
|
12730
|
+
header: config.label || config.name,
|
|
12789
12731
|
elements: []
|
|
12790
12732
|
};
|
|
12791
12733
|
break;
|
|
12792
12734
|
case "MultipleSelect":
|
|
12793
|
-
elements = buildMultiSelect(
|
|
12735
|
+
elements = buildMultiSelect(config, componentScope);
|
|
12794
12736
|
break;
|
|
12795
12737
|
case "LeaderBoard":
|
|
12796
|
-
elements = buildLeaderBoard(
|
|
12738
|
+
elements = buildLeaderBoard(config);
|
|
12797
12739
|
break;
|
|
12798
12740
|
case "Thought":
|
|
12799
|
-
elements = buildThoughtOfTheDay(
|
|
12741
|
+
elements = buildThoughtOfTheDay(config, componentScope);
|
|
12800
12742
|
break;
|
|
12801
12743
|
case "Image":
|
|
12802
|
-
elements = buildImage(
|
|
12744
|
+
elements = buildImage(config, componentScope);
|
|
12803
12745
|
break;
|
|
12804
12746
|
default:
|
|
12805
12747
|
schema = {
|
|
@@ -12807,12 +12749,12 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12807
12749
|
properties: {},
|
|
12808
12750
|
required: []
|
|
12809
12751
|
};
|
|
12810
|
-
elements = buildBasicUiSchema(
|
|
12752
|
+
elements = buildBasicUiSchema(config);
|
|
12811
12753
|
}
|
|
12812
|
-
if (
|
|
12813
|
-
if ((
|
|
12754
|
+
if (config == null ? void 0 : config.elements) {
|
|
12755
|
+
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
12814
12756
|
const rowElements = [];
|
|
12815
|
-
|
|
12757
|
+
config.elements.map((cellElem) => {
|
|
12816
12758
|
const commonProperties = {
|
|
12817
12759
|
accessorKey: cellElem.name,
|
|
12818
12760
|
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
@@ -12822,14 +12764,14 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12822
12764
|
rowElements.push({ ...commonProperties });
|
|
12823
12765
|
});
|
|
12824
12766
|
elements.elements = rowElements;
|
|
12825
|
-
} else if (
|
|
12767
|
+
} else if (config.type == "ColumnGroup") {
|
|
12826
12768
|
const sizeMap = {};
|
|
12827
|
-
if (
|
|
12828
|
-
|
|
12769
|
+
if (config.sizeHolder) {
|
|
12770
|
+
config.sizeHolder.map((e, i) => {
|
|
12829
12771
|
sizeMap[e.keyName] = e.value;
|
|
12830
12772
|
});
|
|
12831
12773
|
}
|
|
12832
|
-
elements.elements =
|
|
12774
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
12833
12775
|
const commonProperties = {
|
|
12834
12776
|
accessorKey: cellElem.name,
|
|
12835
12777
|
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
@@ -12852,17 +12794,17 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12852
12794
|
return { ...commonProperties };
|
|
12853
12795
|
}
|
|
12854
12796
|
});
|
|
12855
|
-
} else if (
|
|
12797
|
+
} else if (config.type == "Table") {
|
|
12856
12798
|
const sizeMap = {};
|
|
12857
|
-
if (
|
|
12858
|
-
|
|
12799
|
+
if (config.sizeHolder) {
|
|
12800
|
+
config.sizeHolder.map((e, i) => {
|
|
12859
12801
|
sizeMap[e.keyName] = e.value;
|
|
12860
12802
|
});
|
|
12861
12803
|
}
|
|
12862
12804
|
const tableHeaderElements = [];
|
|
12863
12805
|
const tableActionElement = [];
|
|
12864
12806
|
const rowElements = [];
|
|
12865
|
-
|
|
12807
|
+
config.elements.filter((cellElem, elemInd) => {
|
|
12866
12808
|
const commonProperties = {
|
|
12867
12809
|
accessorKey: cellElem.name,
|
|
12868
12810
|
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
@@ -12899,7 +12841,7 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12899
12841
|
elements.config.action = tableActionElement;
|
|
12900
12842
|
elements.config.main.headerIcons.elements = tableHeaderElements;
|
|
12901
12843
|
} else {
|
|
12902
|
-
elements.elements =
|
|
12844
|
+
elements.elements = config.elements.map((e, elemInd) => {
|
|
12903
12845
|
return buildUiSchema(e, store2);
|
|
12904
12846
|
});
|
|
12905
12847
|
}
|