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