impaktapps-ui-builder 0.0.385 → 0.0.387
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 +244 -26
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +13 -13
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +0 -6
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +0 -6
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +51 -0
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +46 -0
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +5 -2
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +24 -8
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +96 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +37 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +40 -42
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +24 -8
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -0
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/events.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -22,13 +22,6 @@ const PageMasterSchema = {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
template: {
|
|
26
|
-
oneOf: [
|
|
27
|
-
{ const: "template1", title: "template1" },
|
|
28
|
-
{ const: "template2", title: "template2" },
|
|
29
|
-
{ const: "template3", title: "template3" }
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
25
|
sectionLabels: {
|
|
33
26
|
type: "array",
|
|
34
27
|
items: {
|
|
@@ -41,7 +34,7 @@ const PageMasterSchema = {
|
|
|
41
34
|
}
|
|
42
35
|
}
|
|
43
36
|
},
|
|
44
|
-
required: ["
|
|
37
|
+
required: ["label", "name"]
|
|
45
38
|
};
|
|
46
39
|
const PageMasterUiSchema = {
|
|
47
40
|
type: "HorizontalLayout",
|
|
@@ -121,19 +114,14 @@ const PageMasterUiSchema = {
|
|
|
121
114
|
},
|
|
122
115
|
{
|
|
123
116
|
type: "Control",
|
|
124
|
-
scope: "#/properties/
|
|
117
|
+
scope: "#/properties/label",
|
|
125
118
|
options: {
|
|
126
|
-
widget: "
|
|
119
|
+
widget: "InputField"
|
|
127
120
|
},
|
|
128
121
|
config: {
|
|
129
122
|
layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
|
|
130
123
|
main: {
|
|
131
|
-
label: "
|
|
132
|
-
options: [
|
|
133
|
-
{ const: "template1", title: "template1" },
|
|
134
|
-
{ const: "template2", title: "template2" },
|
|
135
|
-
{ const: "template3", title: "template3" }
|
|
136
|
-
],
|
|
124
|
+
label: "label",
|
|
137
125
|
color: "secondary",
|
|
138
126
|
required: true
|
|
139
127
|
}
|
|
@@ -5882,11 +5870,13 @@ const ComponentSchema = {
|
|
|
5882
5870
|
{ title: "Card", const: "card" },
|
|
5883
5871
|
{ title: "CheckBox", const: "CheckBox" },
|
|
5884
5872
|
{ title: "Container", const: "WrapperSection" },
|
|
5873
|
+
{ title: "DataGrid", const: "DataGrid" },
|
|
5885
5874
|
{ title: "Date", const: "Date" },
|
|
5886
5875
|
{ title: "Download File", const: "DownloadFile" },
|
|
5887
5876
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
5888
5877
|
{ title: "File", const: "FileInput" },
|
|
5889
5878
|
{ title: "Graph", const: "Graph" },
|
|
5879
|
+
{ title: "Input Slider", const: "InputSlider" },
|
|
5890
5880
|
{ title: "Label", const: "Box" },
|
|
5891
5881
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5892
5882
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
@@ -5943,6 +5933,24 @@ const ComponentSchema = {
|
|
|
5943
5933
|
}
|
|
5944
5934
|
}
|
|
5945
5935
|
},
|
|
5936
|
+
cardLayout: {
|
|
5937
|
+
type: "array",
|
|
5938
|
+
items: {
|
|
5939
|
+
type: "object",
|
|
5940
|
+
properties: {
|
|
5941
|
+
key: {
|
|
5942
|
+
type: "string",
|
|
5943
|
+
oneOf: [
|
|
5944
|
+
{ title: "Extra Small", const: "xs" },
|
|
5945
|
+
{ title: "Small", const: "sm" },
|
|
5946
|
+
{ title: "Medium", const: "md" },
|
|
5947
|
+
{ title: "Large", const: "lg" }
|
|
5948
|
+
]
|
|
5949
|
+
},
|
|
5950
|
+
value: {}
|
|
5951
|
+
}
|
|
5952
|
+
}
|
|
5953
|
+
},
|
|
5946
5954
|
value: {
|
|
5947
5955
|
type: "array",
|
|
5948
5956
|
items: {
|
|
@@ -6010,6 +6018,20 @@ const ComponentSchema = {
|
|
|
6010
6018
|
}
|
|
6011
6019
|
}
|
|
6012
6020
|
},
|
|
6021
|
+
sizeHolder: {
|
|
6022
|
+
type: "array",
|
|
6023
|
+
items: {
|
|
6024
|
+
type: "object",
|
|
6025
|
+
properties: {
|
|
6026
|
+
keyName: {
|
|
6027
|
+
type: "string"
|
|
6028
|
+
},
|
|
6029
|
+
value: {
|
|
6030
|
+
type: "string"
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6013
6035
|
legendLabels: {
|
|
6014
6036
|
type: "array",
|
|
6015
6037
|
items: {
|
|
@@ -6667,6 +6689,57 @@ const EmptyBox = {
|
|
|
6667
6689
|
main: {}
|
|
6668
6690
|
}
|
|
6669
6691
|
};
|
|
6692
|
+
const cardLayout = {
|
|
6693
|
+
type: "Control",
|
|
6694
|
+
scope: "#/properties/cardLayout",
|
|
6695
|
+
layout: 11.5,
|
|
6696
|
+
options: {
|
|
6697
|
+
detail: {
|
|
6698
|
+
type: "HorizontalLayout",
|
|
6699
|
+
elements: [
|
|
6700
|
+
{
|
|
6701
|
+
type: "Control",
|
|
6702
|
+
scope: "#/properties/key",
|
|
6703
|
+
options: {
|
|
6704
|
+
widget: "SelectInputField"
|
|
6705
|
+
},
|
|
6706
|
+
config: {
|
|
6707
|
+
layout: {
|
|
6708
|
+
xs: 11,
|
|
6709
|
+
sm: 11,
|
|
6710
|
+
md: 5.5,
|
|
6711
|
+
lg: 5.5
|
|
6712
|
+
},
|
|
6713
|
+
main: {
|
|
6714
|
+
label: "Screen Size"
|
|
6715
|
+
}
|
|
6716
|
+
}
|
|
6717
|
+
},
|
|
6718
|
+
{
|
|
6719
|
+
type: "Control",
|
|
6720
|
+
scope: "#/properties/value",
|
|
6721
|
+
options: {
|
|
6722
|
+
widget: "InputField"
|
|
6723
|
+
},
|
|
6724
|
+
config: {
|
|
6725
|
+
layout: {
|
|
6726
|
+
xs: 11,
|
|
6727
|
+
sm: 11,
|
|
6728
|
+
md: 5.5,
|
|
6729
|
+
lg: 5.5
|
|
6730
|
+
},
|
|
6731
|
+
main: {
|
|
6732
|
+
label: "Value",
|
|
6733
|
+
type: "number",
|
|
6734
|
+
helperText: "Number should be in range of 0 to 12",
|
|
6735
|
+
errorMessage: "Number Can't be greater than 12 and can't be less than 0."
|
|
6736
|
+
}
|
|
6737
|
+
}
|
|
6738
|
+
}
|
|
6739
|
+
]
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6670
6743
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6671
6744
|
return {
|
|
6672
6745
|
type: "Control",
|
|
@@ -6701,6 +6774,25 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
|
6701
6774
|
}
|
|
6702
6775
|
};
|
|
6703
6776
|
};
|
|
6777
|
+
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
6778
|
+
sizeHolder.options.detail.elements[1] = {
|
|
6779
|
+
type: "Control",
|
|
6780
|
+
scope: `#/properties/value`,
|
|
6781
|
+
options: {
|
|
6782
|
+
widget: "InputField"
|
|
6783
|
+
},
|
|
6784
|
+
config: {
|
|
6785
|
+
layout: {
|
|
6786
|
+
xs: 11,
|
|
6787
|
+
sm: 11,
|
|
6788
|
+
md: 5.5,
|
|
6789
|
+
lg: 5.5
|
|
6790
|
+
},
|
|
6791
|
+
main: {
|
|
6792
|
+
label: "Size"
|
|
6793
|
+
}
|
|
6794
|
+
}
|
|
6795
|
+
};
|
|
6704
6796
|
const getInputField = (scope, label) => {
|
|
6705
6797
|
return {
|
|
6706
6798
|
type: "Control",
|
|
@@ -6792,13 +6884,30 @@ const GraphSection = {
|
|
|
6792
6884
|
const buildPropertiesSection = function(type) {
|
|
6793
6885
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6794
6886
|
switch (type) {
|
|
6887
|
+
case "InputSlider":
|
|
6888
|
+
uiSchema.elements = [
|
|
6889
|
+
getInputField("max", "Max Limit"),
|
|
6890
|
+
getInputField("step", "Step"),
|
|
6891
|
+
getInputField("min", "Min Limit"),
|
|
6892
|
+
getRadioInputField("limitToMax", "Applly Max. Limit", ["YES", "NO"])
|
|
6893
|
+
];
|
|
6894
|
+
break;
|
|
6895
|
+
case "DataGrid":
|
|
6896
|
+
uiSchema.elements = [
|
|
6897
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
6898
|
+
getInputField("elevation", "Card Elevation"),
|
|
6899
|
+
getInputField("height", "Grid height"),
|
|
6900
|
+
getInputField("justifyContent", "justifyContent"),
|
|
6901
|
+
cardLayout
|
|
6902
|
+
];
|
|
6903
|
+
break;
|
|
6795
6904
|
case "Stepper":
|
|
6796
6905
|
uiSchema.elements = [
|
|
6797
6906
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6907
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
6798
6908
|
getInputField("resetText", "Reset Text"),
|
|
6799
6909
|
getInputField("completeText", "Complete Text"),
|
|
6800
6910
|
getSelectField("orientation", "Orientation Type"),
|
|
6801
|
-
EmptyBox,
|
|
6802
6911
|
getArrayControl("sectionLabels", "label")
|
|
6803
6912
|
];
|
|
6804
6913
|
break;
|
|
@@ -6911,7 +7020,8 @@ const buildPropertiesSection = function(type) {
|
|
|
6911
7020
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
6912
7021
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
6913
7022
|
getInputField("selectKey", "Selection Key"),
|
|
6914
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7023
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
7024
|
+
sizeHolder
|
|
6915
7025
|
];
|
|
6916
7026
|
break;
|
|
6917
7027
|
case "Radio":
|
|
@@ -7290,8 +7400,9 @@ const getFormdataFromLocalStorage = (path) => {
|
|
|
7290
7400
|
return returnValue || pageFormdata;
|
|
7291
7401
|
};
|
|
7292
7402
|
async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
7293
|
-
var _a;
|
|
7294
|
-
|
|
7403
|
+
var _a, _b;
|
|
7404
|
+
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7405
|
+
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7295
7406
|
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7296
7407
|
const config = JSON.parse(localStorage.getItem("pageFormdata"));
|
|
7297
7408
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
@@ -7363,7 +7474,9 @@ const sectionLabels = {
|
|
|
7363
7474
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7364
7475
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7365
7476
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7366
|
-
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7477
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7478
|
+
DataGrid: ["Core", "Components", "Properties", "Event", "style"],
|
|
7479
|
+
InputSlider: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7367
7480
|
};
|
|
7368
7481
|
const refreshPage = (type, store2) => {
|
|
7369
7482
|
var _a;
|
|
@@ -8305,7 +8418,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8305
8418
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8306
8419
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8307
8420
|
}
|
|
8308
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8421
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
|
|
8309
8422
|
}
|
|
8310
8423
|
async function executeCustomHandler(params) {
|
|
8311
8424
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8353,7 +8466,8 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8353
8466
|
} else {
|
|
8354
8467
|
if (handlerResponse) {
|
|
8355
8468
|
store2.setFormdata((pre) => {
|
|
8356
|
-
|
|
8469
|
+
var _a;
|
|
8470
|
+
return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
|
|
8357
8471
|
});
|
|
8358
8472
|
await asyncOperation();
|
|
8359
8473
|
}
|
|
@@ -9464,6 +9578,9 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9464
9578
|
if (config.style) {
|
|
9465
9579
|
wrapper.config.style = JSON.parse(config.style);
|
|
9466
9580
|
}
|
|
9581
|
+
if (config.layout) {
|
|
9582
|
+
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9583
|
+
}
|
|
9467
9584
|
return wrapper;
|
|
9468
9585
|
};
|
|
9469
9586
|
var TextInputField = {
|
|
@@ -9647,7 +9764,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9647
9764
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9648
9765
|
}
|
|
9649
9766
|
if (config.ColumnResizingAvailable) {
|
|
9650
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9767
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
|
|
9651
9768
|
}
|
|
9652
9769
|
if (config.DragAvailable) {
|
|
9653
9770
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10370,11 +10487,14 @@ const buildStepper = (config, componentScope) => {
|
|
|
10370
10487
|
const stepper = _.cloneDeep(Stepper);
|
|
10371
10488
|
stepper.scope = componentScope;
|
|
10372
10489
|
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10490
|
+
if (config.defaultButtonAvailable) {
|
|
10491
|
+
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10492
|
+
}
|
|
10373
10493
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10374
10494
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10375
10495
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10376
10496
|
if (config.sectionLabels) {
|
|
10377
|
-
stepper.config.main.
|
|
10497
|
+
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
10378
10498
|
return { label: e.label, id: i };
|
|
10379
10499
|
});
|
|
10380
10500
|
}
|
|
@@ -10425,6 +10545,90 @@ const buildPopUp = (config, componentScope) => {
|
|
|
10425
10545
|
}
|
|
10426
10546
|
return popup;
|
|
10427
10547
|
};
|
|
10548
|
+
const dataGrid = {
|
|
10549
|
+
"type": "Control",
|
|
10550
|
+
"scope": "#/properties/dataGrid",
|
|
10551
|
+
"layout": 12,
|
|
10552
|
+
"options": {
|
|
10553
|
+
"widget": "DataGrid"
|
|
10554
|
+
},
|
|
10555
|
+
elements: [],
|
|
10556
|
+
"config": {
|
|
10557
|
+
"main": {
|
|
10558
|
+
elevation: 0,
|
|
10559
|
+
useWrapper: false
|
|
10560
|
+
},
|
|
10561
|
+
style: {}
|
|
10562
|
+
}
|
|
10563
|
+
};
|
|
10564
|
+
const buildDataGrid = (config, componentScope) => {
|
|
10565
|
+
const DataGrid = _.cloneDeep(dataGrid);
|
|
10566
|
+
DataGrid.scope = componentScope;
|
|
10567
|
+
if (config.elevation) {
|
|
10568
|
+
DataGrid.config.main.elevation = +config.elevation;
|
|
10569
|
+
}
|
|
10570
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10571
|
+
if (config.height) {
|
|
10572
|
+
DataGrid.config.main.height = `${config.height}px`;
|
|
10573
|
+
}
|
|
10574
|
+
if (config.justifyContent) {
|
|
10575
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10576
|
+
}
|
|
10577
|
+
if (config.label) {
|
|
10578
|
+
DataGrid.config.main.label = config.label;
|
|
10579
|
+
}
|
|
10580
|
+
if (config.layout) {
|
|
10581
|
+
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10582
|
+
}
|
|
10583
|
+
if (config.cardLayout) {
|
|
10584
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10585
|
+
}
|
|
10586
|
+
if (config.style) {
|
|
10587
|
+
DataGrid.config.style = JSON.parse(config.style);
|
|
10588
|
+
}
|
|
10589
|
+
return DataGrid;
|
|
10590
|
+
};
|
|
10591
|
+
const InputSlider = {
|
|
10592
|
+
type: "Control",
|
|
10593
|
+
scope: "#/properties/inputSlider",
|
|
10594
|
+
options: {
|
|
10595
|
+
widget: "InputSlider"
|
|
10596
|
+
},
|
|
10597
|
+
config: {
|
|
10598
|
+
layout: 12,
|
|
10599
|
+
main: {
|
|
10600
|
+
limitToMax: false,
|
|
10601
|
+
max: 1e4,
|
|
10602
|
+
step: 1e3,
|
|
10603
|
+
min: 0,
|
|
10604
|
+
label: "Slider"
|
|
10605
|
+
}
|
|
10606
|
+
}
|
|
10607
|
+
};
|
|
10608
|
+
const buildInputSlider = (config, componentScope) => {
|
|
10609
|
+
const inputSlider = _.cloneDeep(InputSlider);
|
|
10610
|
+
inputSlider.scope = componentScope;
|
|
10611
|
+
inputSlider.config.main.label = config.label;
|
|
10612
|
+
if (config.layout) {
|
|
10613
|
+
inputSlider.config.layout = createLayoutFormat(config.layout);
|
|
10614
|
+
}
|
|
10615
|
+
if (config.limitToMax) {
|
|
10616
|
+
inputSlider.config.main.limitToMax = config.limitToMax === "YES" ? true : false;
|
|
10617
|
+
}
|
|
10618
|
+
if (config.max) {
|
|
10619
|
+
inputSlider.config.main.max = config.max;
|
|
10620
|
+
}
|
|
10621
|
+
if (config.step) {
|
|
10622
|
+
inputSlider.config.main.step = config.step;
|
|
10623
|
+
}
|
|
10624
|
+
if (config.min) {
|
|
10625
|
+
inputSlider.config.main.min = config.min;
|
|
10626
|
+
}
|
|
10627
|
+
if (config.style) {
|
|
10628
|
+
inputSlider.config.main.defaultStyle = JSON.parse(config.style);
|
|
10629
|
+
}
|
|
10630
|
+
return inputSlider;
|
|
10631
|
+
};
|
|
10428
10632
|
let schema = {
|
|
10429
10633
|
type: "object",
|
|
10430
10634
|
properties: {},
|
|
@@ -10543,6 +10747,12 @@ const buildUiSchema = (config) => {
|
|
|
10543
10747
|
let elements = {};
|
|
10544
10748
|
const componentScope = `#/properties/${config.name}`;
|
|
10545
10749
|
switch (config.type) {
|
|
10750
|
+
case "InputSlider":
|
|
10751
|
+
elements = buildInputSlider(config, componentScope);
|
|
10752
|
+
break;
|
|
10753
|
+
case "DataGrid":
|
|
10754
|
+
elements = buildDataGrid(config, componentScope);
|
|
10755
|
+
break;
|
|
10546
10756
|
case "Stepper":
|
|
10547
10757
|
elements = buildStepper(config, componentScope);
|
|
10548
10758
|
break;
|
|
@@ -10668,17 +10878,25 @@ const buildUiSchema = (config) => {
|
|
|
10668
10878
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10669
10879
|
return elements;
|
|
10670
10880
|
} else if (config.type == "Table") {
|
|
10881
|
+
const sizeMap = {};
|
|
10882
|
+
if (config.sizeHolder) {
|
|
10883
|
+
config.sizeHolder.map((e, i) => {
|
|
10884
|
+
sizeMap[e.keyName] = e.value;
|
|
10885
|
+
});
|
|
10886
|
+
}
|
|
10671
10887
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10672
10888
|
if (e.type) {
|
|
10673
10889
|
return {
|
|
10674
10890
|
accessorKey: e.name,
|
|
10675
10891
|
header: e.label || e.name,
|
|
10892
|
+
size: sizeMap[e.name] || 180,
|
|
10676
10893
|
widget: buildUiSchema(e)
|
|
10677
10894
|
};
|
|
10678
10895
|
}
|
|
10679
10896
|
return {
|
|
10680
10897
|
accessorKey: e.name,
|
|
10681
|
-
header: e.label || e.name
|
|
10898
|
+
header: e.label || e.name,
|
|
10899
|
+
size: sizeMap[e.name] || 180
|
|
10682
10900
|
};
|
|
10683
10901
|
});
|
|
10684
10902
|
} else if (config.type == "Array") {
|