impaktapps-ui-builder 0.0.409-n → 0.0.409-p
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 +125 -133
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +4 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +0 -30
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +8 -7
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +9 -6
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +26 -47
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -22
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +0 -23
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +88 -44
|
@@ -1128,7 +1128,7 @@ var lodash = { exports: {} };
|
|
|
1128
1128
|
}
|
|
1129
1129
|
var runInContext = function runInContext2(context) {
|
|
1130
1130
|
context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps));
|
|
1131
|
-
var Array2 = context.Array, Date = context.Date,
|
|
1131
|
+
var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
|
|
1132
1132
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
1133
1133
|
var coreJsData = context["__core-js_shared__"];
|
|
1134
1134
|
var funcToString = funcProto.toString;
|
|
@@ -1613,7 +1613,7 @@ var lodash = { exports: {} };
|
|
|
1613
1613
|
if (typeof func != "function") {
|
|
1614
1614
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1615
1615
|
}
|
|
1616
|
-
return
|
|
1616
|
+
return setTimeout(function() {
|
|
1617
1617
|
func.apply(undefined$1, args);
|
|
1618
1618
|
}, wait);
|
|
1619
1619
|
}
|
|
@@ -3444,7 +3444,7 @@ var lodash = { exports: {} };
|
|
|
3444
3444
|
return object[key];
|
|
3445
3445
|
}
|
|
3446
3446
|
var setData = shortOut(baseSetData);
|
|
3447
|
-
var
|
|
3447
|
+
var setTimeout = ctxSetTimeout || function(func, wait) {
|
|
3448
3448
|
return root.setTimeout(func, wait);
|
|
3449
3449
|
};
|
|
3450
3450
|
var setToString = shortOut(baseSetToString);
|
|
@@ -4236,7 +4236,7 @@ var lodash = { exports: {} };
|
|
|
4236
4236
|
}
|
|
4237
4237
|
function leadingEdge(time) {
|
|
4238
4238
|
lastInvokeTime = time;
|
|
4239
|
-
timerId =
|
|
4239
|
+
timerId = setTimeout(timerExpired, wait);
|
|
4240
4240
|
return leading ? invokeFunc(time) : result2;
|
|
4241
4241
|
}
|
|
4242
4242
|
function remainingWait(time) {
|
|
@@ -4252,7 +4252,7 @@ var lodash = { exports: {} };
|
|
|
4252
4252
|
if (shouldInvoke(time)) {
|
|
4253
4253
|
return trailingEdge(time);
|
|
4254
4254
|
}
|
|
4255
|
-
timerId =
|
|
4255
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
4256
4256
|
}
|
|
4257
4257
|
function trailingEdge(time) {
|
|
4258
4258
|
timerId = undefined$1;
|
|
@@ -4283,12 +4283,12 @@ var lodash = { exports: {} };
|
|
|
4283
4283
|
}
|
|
4284
4284
|
if (maxing) {
|
|
4285
4285
|
clearTimeout(timerId);
|
|
4286
|
-
timerId =
|
|
4286
|
+
timerId = setTimeout(timerExpired, wait);
|
|
4287
4287
|
return invokeFunc(lastCallTime);
|
|
4288
4288
|
}
|
|
4289
4289
|
}
|
|
4290
4290
|
if (timerId === undefined$1) {
|
|
4291
|
-
timerId =
|
|
4291
|
+
timerId = setTimeout(timerExpired, wait);
|
|
4292
4292
|
}
|
|
4293
4293
|
return result2;
|
|
4294
4294
|
}
|
|
@@ -4531,7 +4531,7 @@ var lodash = { exports: {} };
|
|
|
4531
4531
|
}
|
|
4532
4532
|
function isNative(value) {
|
|
4533
4533
|
if (isMaskable(value)) {
|
|
4534
|
-
throw new
|
|
4534
|
+
throw new Error(CORE_ERROR_TEXT);
|
|
4535
4535
|
}
|
|
4536
4536
|
return baseIsNative(value);
|
|
4537
4537
|
}
|
|
@@ -5072,7 +5072,7 @@ var lodash = { exports: {} };
|
|
|
5072
5072
|
if (!variable) {
|
|
5073
5073
|
source = "with (obj) {\n" + source + "\n}\n";
|
|
5074
5074
|
} else if (reForbiddenIdentifierChars.test(variable)) {
|
|
5075
|
-
throw new
|
|
5075
|
+
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
5076
5076
|
}
|
|
5077
5077
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
|
5078
5078
|
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
|
@@ -5191,7 +5191,7 @@ var lodash = { exports: {} };
|
|
|
5191
5191
|
try {
|
|
5192
5192
|
return apply(func, undefined$1, args);
|
|
5193
5193
|
} catch (e) {
|
|
5194
|
-
return isError(e) ? e : new
|
|
5194
|
+
return isError(e) ? e : new Error(e);
|
|
5195
5195
|
}
|
|
5196
5196
|
});
|
|
5197
5197
|
var bindAll = flatRest(function(object, methodNames) {
|
|
@@ -5913,7 +5913,8 @@ const ComponentSchema = {
|
|
|
5913
5913
|
{ title: "Upload File", const: "UploadFile" },
|
|
5914
5914
|
{ title: "Timer", const: "Timer" },
|
|
5915
5915
|
{ title: "Upload File", const: "UploadFile" },
|
|
5916
|
-
{ title: "TreeMap", const: "TreeMap" }
|
|
5916
|
+
{ title: "TreeMap", const: "TreeMap" },
|
|
5917
|
+
{ title: "ColumnGroup", const: "ColumnGroup" }
|
|
5917
5918
|
]
|
|
5918
5919
|
},
|
|
5919
5920
|
columnFormat: {
|
|
@@ -6314,27 +6315,6 @@ const componentBasicUiSchema = {
|
|
|
6314
6315
|
}
|
|
6315
6316
|
}
|
|
6316
6317
|
},
|
|
6317
|
-
{
|
|
6318
|
-
type: "Control",
|
|
6319
|
-
scope: "#/properties/parent",
|
|
6320
|
-
options: {
|
|
6321
|
-
widget: "InputField"
|
|
6322
|
-
},
|
|
6323
|
-
config: {
|
|
6324
|
-
layout: {
|
|
6325
|
-
xs: 12,
|
|
6326
|
-
sm: 12,
|
|
6327
|
-
md: 6,
|
|
6328
|
-
lg: 6
|
|
6329
|
-
},
|
|
6330
|
-
main: {
|
|
6331
|
-
label: "parent",
|
|
6332
|
-
options: [],
|
|
6333
|
-
color: "secondary",
|
|
6334
|
-
required: true
|
|
6335
|
-
}
|
|
6336
|
-
}
|
|
6337
|
-
},
|
|
6338
6318
|
{
|
|
6339
6319
|
type: "Control",
|
|
6340
6320
|
scope: "#/properties/columnFormat",
|
|
@@ -6547,27 +6527,6 @@ const CoreSection = {
|
|
|
6547
6527
|
}
|
|
6548
6528
|
}
|
|
6549
6529
|
},
|
|
6550
|
-
{
|
|
6551
|
-
type: "Control",
|
|
6552
|
-
scope: "#/properties/parent",
|
|
6553
|
-
options: {
|
|
6554
|
-
widget: "InputField"
|
|
6555
|
-
},
|
|
6556
|
-
config: {
|
|
6557
|
-
layout: {
|
|
6558
|
-
xs: 12,
|
|
6559
|
-
sm: 12,
|
|
6560
|
-
md: 6,
|
|
6561
|
-
lg: 6
|
|
6562
|
-
},
|
|
6563
|
-
main: {
|
|
6564
|
-
label: "parent",
|
|
6565
|
-
options: [],
|
|
6566
|
-
color: "secondary",
|
|
6567
|
-
required: true
|
|
6568
|
-
}
|
|
6569
|
-
}
|
|
6570
|
-
},
|
|
6571
6530
|
{
|
|
6572
6531
|
type: "Control",
|
|
6573
6532
|
scope: "#/properties/columnFormat",
|
|
@@ -7598,7 +7557,8 @@ const sectionLabels = {
|
|
|
7598
7557
|
Stepper: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7599
7558
|
DataGrid: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7600
7559
|
InputSlider: ["Core", "Properties", "Event", "Style", "Validation"],
|
|
7601
|
-
TreeMap: ["Core", "Components", "Properties", "Event", "Style"]
|
|
7560
|
+
TreeMap: ["Core", "Components", "Properties", "Event", "Style"],
|
|
7561
|
+
ColumnGroup: ["Core", "Components"]
|
|
7602
7562
|
};
|
|
7603
7563
|
const refreshPage = (type, store2) => {
|
|
7604
7564
|
var _a;
|
|
@@ -8742,16 +8702,6 @@ function buildApiPayload(compConfig, body, headers, store, dynamicData, userValu
|
|
|
8742
8702
|
}
|
|
8743
8703
|
return promiseChain;
|
|
8744
8704
|
}
|
|
8745
|
-
function asyncOperation() {
|
|
8746
|
-
return new Promise((resolve, reject) => {
|
|
8747
|
-
setTimeout(() => {
|
|
8748
|
-
{
|
|
8749
|
-
resolve("Operation completed successfully!");
|
|
8750
|
-
reject(new Error("Operation failed!"));
|
|
8751
|
-
}
|
|
8752
|
-
}, 50);
|
|
8753
|
-
});
|
|
8754
|
-
}
|
|
8755
8705
|
let compType;
|
|
8756
8706
|
let eventGroups = {};
|
|
8757
8707
|
const notifyUiSchema = {
|
|
@@ -8796,8 +8746,6 @@ const extractEvents = (eventConfig) => {
|
|
|
8796
8746
|
return eventGroups;
|
|
8797
8747
|
};
|
|
8798
8748
|
var service = (funcParams) => {
|
|
8799
|
-
eventGroups = {};
|
|
8800
|
-
eventGroups = extractEvents(funcParams.config);
|
|
8801
8749
|
let executeEventsParameters = {
|
|
8802
8750
|
config: {},
|
|
8803
8751
|
componentName: "",
|
|
@@ -8805,23 +8753,47 @@ var service = (funcParams) => {
|
|
|
8805
8753
|
dynamicData: funcParams.dynamicData,
|
|
8806
8754
|
userValue: funcParams.userValue,
|
|
8807
8755
|
service: funcParams.service,
|
|
8808
|
-
serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
|
|
8809
|
-
eventGroups
|
|
8756
|
+
serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
|
|
8757
|
+
eventGroups,
|
|
8758
|
+
functionsProvider: funcParams.functionsProvider
|
|
8810
8759
|
};
|
|
8811
8760
|
return {
|
|
8812
8761
|
setPage: async function() {
|
|
8762
|
+
var _a, _b;
|
|
8813
8763
|
funcParams.store.setFormdata({});
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8764
|
+
const data = JSON.stringify({
|
|
8765
|
+
pageName: funcParams.store.pageName
|
|
8766
|
+
});
|
|
8767
|
+
let pageData;
|
|
8768
|
+
const pageBasicDetailString = localStorage.getItem("pagemasterMetaData");
|
|
8769
|
+
if (pageBasicDetailString) {
|
|
8770
|
+
pageData = JSON.parse(pageBasicDetailString);
|
|
8771
|
+
} else {
|
|
8772
|
+
const pageId = await funcParams.service.post("/page/getByName", data, {
|
|
8773
|
+
headers: {
|
|
8774
|
+
"Content-Type": "application/json"
|
|
8775
|
+
}
|
|
8776
|
+
});
|
|
8777
|
+
const response = await funcParams.service.get(
|
|
8778
|
+
`/page/getById?id=${(_a = pageId == null ? void 0 : pageId.data) == null ? void 0 : _a.id}`,
|
|
8779
|
+
{
|
|
8780
|
+
headers: {
|
|
8781
|
+
"Content-Type": "application/json"
|
|
8782
|
+
}
|
|
8783
|
+
}
|
|
8784
|
+
);
|
|
8785
|
+
pageData = response.data;
|
|
8786
|
+
localStorage.setItem("pagemasterMetaData", JSON.stringify({
|
|
8787
|
+
schema: pageData == null ? void 0 : pageData.schema,
|
|
8788
|
+
uiSchema: pageData == null ? void 0 : pageData.uiSchema,
|
|
8789
|
+
config: pageData == null ? void 0 : pageData.config
|
|
8790
|
+
}));
|
|
8791
|
+
}
|
|
8792
|
+
const config = pageData == null ? void 0 : pageData.config;
|
|
8793
|
+
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
8794
|
+
const schema2 = (_b = pageData == null ? void 0 : pageData.schema) != null ? _b : { type: "object", properties: {} };
|
|
8795
|
+
eventGroups = {};
|
|
8796
|
+
eventGroups = extractEvents(config);
|
|
8825
8797
|
executeEventsParameters = {
|
|
8826
8798
|
config: {},
|
|
8827
8799
|
componentName: "",
|
|
@@ -8829,6 +8801,7 @@ var service = (funcParams) => {
|
|
|
8829
8801
|
dynamicData: funcParams.dynamicData,
|
|
8830
8802
|
userValue: funcParams.userValue,
|
|
8831
8803
|
service: funcParams.service,
|
|
8804
|
+
functionsProvider: funcParams.functionsProvider,
|
|
8832
8805
|
serviceHolder: this,
|
|
8833
8806
|
eventGroups
|
|
8834
8807
|
};
|
|
@@ -8842,15 +8815,46 @@ var service = (funcParams) => {
|
|
|
8842
8815
|
serviceHolder: this,
|
|
8843
8816
|
eventGroups
|
|
8844
8817
|
});
|
|
8818
|
+
funcParams.store.setSchema(
|
|
8819
|
+
(pre) => {
|
|
8820
|
+
return {
|
|
8821
|
+
...schema2,
|
|
8822
|
+
properties: { ...schema2.properties, ...pre.properties }
|
|
8823
|
+
};
|
|
8824
|
+
}
|
|
8825
|
+
);
|
|
8826
|
+
uiSchema.elements.push(notifyUiSchema);
|
|
8827
|
+
funcParams.store.setUiSchema(uiSchema);
|
|
8828
|
+
},
|
|
8829
|
+
onCellRenderer: (cellParams) => {
|
|
8830
|
+
var _a;
|
|
8831
|
+
let finalResponse = {};
|
|
8832
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8833
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
|
|
8834
|
+
executeEventsParameters.store.functionParameters = cellParams;
|
|
8835
|
+
finalResponse = executeEvents({
|
|
8836
|
+
...executeEventsParameters,
|
|
8837
|
+
config: eventConfig,
|
|
8838
|
+
componentName: path
|
|
8839
|
+
});
|
|
8840
|
+
}
|
|
8841
|
+
console.log("finalResponse >> >> >> ", finalResponse);
|
|
8842
|
+
return finalResponse;
|
|
8845
8843
|
},
|
|
8846
|
-
onClick:
|
|
8847
|
-
|
|
8844
|
+
onClick: function() {
|
|
8845
|
+
this.callHandler("onClick");
|
|
8848
8846
|
},
|
|
8849
|
-
|
|
8850
|
-
|
|
8847
|
+
onMount: function() {
|
|
8848
|
+
this.callHandler("onMount");
|
|
8851
8849
|
},
|
|
8852
|
-
|
|
8853
|
-
|
|
8850
|
+
onFileDownload: function() {
|
|
8851
|
+
this.callHandler("onDownload");
|
|
8852
|
+
},
|
|
8853
|
+
onFileUpload: function() {
|
|
8854
|
+
this.callHandler("onUpload");
|
|
8855
|
+
},
|
|
8856
|
+
backHandler: function() {
|
|
8857
|
+
funcParams.store.navigate(-1);
|
|
8854
8858
|
},
|
|
8855
8859
|
onPaginationChange: async function(paginationValues) {
|
|
8856
8860
|
var _a;
|
|
@@ -8870,7 +8874,8 @@ var service = (funcParams) => {
|
|
|
8870
8874
|
{ key: "searchValue", value: param.serachValue },
|
|
8871
8875
|
{ key: "currentValue", value: param.currentValue }
|
|
8872
8876
|
];
|
|
8873
|
-
|
|
8877
|
+
const response = await this.updateConfigApiBody(param, apiBody);
|
|
8878
|
+
return response == null ? void 0 : response.data;
|
|
8874
8879
|
}
|
|
8875
8880
|
},
|
|
8876
8881
|
onChange: async function() {
|
|
@@ -8944,7 +8949,7 @@ var service = (funcParams) => {
|
|
|
8944
8949
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8945
8950
|
for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
|
|
8946
8951
|
executeEventsParameters.store.functionParameters = functionParameters;
|
|
8947
|
-
|
|
8952
|
+
executeEvents({
|
|
8948
8953
|
...executeEventsParameters,
|
|
8949
8954
|
config: eventConfig,
|
|
8950
8955
|
componentName: path
|
|
@@ -8953,7 +8958,8 @@ var service = (funcParams) => {
|
|
|
8953
8958
|
}
|
|
8954
8959
|
},
|
|
8955
8960
|
downloadFile: downloadFile$1,
|
|
8956
|
-
download: doDownload
|
|
8961
|
+
download: doDownload,
|
|
8962
|
+
...funcParams.functionsProvider
|
|
8957
8963
|
};
|
|
8958
8964
|
};
|
|
8959
8965
|
var leaderBoard = {
|
|
@@ -10439,8 +10445,10 @@ const buildMultiSelect = (config, componentScope) => {
|
|
|
10439
10445
|
const buildBasicUiSchema = (config) => {
|
|
10440
10446
|
return {
|
|
10441
10447
|
"type": "HorizontalLayout",
|
|
10442
|
-
pageName:
|
|
10443
|
-
|
|
10448
|
+
pageName: config.name,
|
|
10449
|
+
name: config.name,
|
|
10450
|
+
accessorKey: config.name,
|
|
10451
|
+
header: config.label || config.name,
|
|
10444
10452
|
"elements": []
|
|
10445
10453
|
};
|
|
10446
10454
|
};
|
|
@@ -11156,6 +11164,13 @@ const buildUiSchema = (config) => {
|
|
|
11156
11164
|
case "Timer":
|
|
11157
11165
|
elements = buildTimer(config, componentScope);
|
|
11158
11166
|
break;
|
|
11167
|
+
case "ColumnGroup":
|
|
11168
|
+
elements = {
|
|
11169
|
+
accessorKey: config.name,
|
|
11170
|
+
header: config.label || config.name,
|
|
11171
|
+
elements: []
|
|
11172
|
+
};
|
|
11173
|
+
break;
|
|
11159
11174
|
case "MultipleSelect":
|
|
11160
11175
|
elements = buildMultiSelect(config, componentScope);
|
|
11161
11176
|
break;
|
|
@@ -11173,55 +11188,32 @@ const buildUiSchema = (config) => {
|
|
|
11173
11188
|
if (config == null ? void 0 : config.elements) {
|
|
11174
11189
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
11175
11190
|
return elements;
|
|
11176
|
-
} else if (config.type == "Table") {
|
|
11177
|
-
let nodeProvider2 = function(element) {
|
|
11178
|
-
if (element.type) {
|
|
11179
|
-
return {
|
|
11180
|
-
accessorKey: element.name,
|
|
11181
|
-
type: element.columnFormat,
|
|
11182
|
-
header: element.label || element.name,
|
|
11183
|
-
size: sizeMap[element.name] || 180,
|
|
11184
|
-
widget: buildUiSchema(element)
|
|
11185
|
-
};
|
|
11186
|
-
}
|
|
11187
|
-
return {
|
|
11188
|
-
accessorKey: element.name,
|
|
11189
|
-
type: element.columnFormat,
|
|
11190
|
-
header: element.label || element.name,
|
|
11191
|
-
size: sizeMap[element.name] || 180
|
|
11192
|
-
};
|
|
11193
|
-
}, buildHierarchy2 = function(elements2, parentName = null) {
|
|
11194
|
-
const result = [];
|
|
11195
|
-
for (const element of elements2) {
|
|
11196
|
-
if ((element == null ? void 0 : element.parent) === parentName) {
|
|
11197
|
-
const children = buildHierarchy2(elements2, element.name);
|
|
11198
|
-
const node = nodeProvider2(element);
|
|
11199
|
-
if (children.length > 0) {
|
|
11200
|
-
node.columns = children;
|
|
11201
|
-
node.type = "group";
|
|
11202
|
-
}
|
|
11203
|
-
result.push(node);
|
|
11204
|
-
}
|
|
11205
|
-
}
|
|
11206
|
-
return result;
|
|
11207
|
-
}, transformConfigToOutput2 = function(config2) {
|
|
11208
|
-
const output = [];
|
|
11209
|
-
const hierarchy = buildHierarchy2(config2.elements, config2.name);
|
|
11210
|
-
for (const element of config2.elements) {
|
|
11211
|
-
const parentExists = config2.elements.some((e) => e.name === element.parent);
|
|
11212
|
-
if (!parentExists && element.parent !== config2.name) {
|
|
11213
|
-
output.push(nodeProvider2(element));
|
|
11214
|
-
}
|
|
11215
|
-
}
|
|
11216
|
-
return [...hierarchy, ...output];
|
|
11217
|
-
};
|
|
11191
|
+
} else if (config.type == "Table" || config.type == "ColumnGroup") {
|
|
11218
11192
|
const sizeMap = {};
|
|
11219
11193
|
if (config.sizeHolder) {
|
|
11220
11194
|
config.sizeHolder.map((e, i) => {
|
|
11221
11195
|
sizeMap[e.keyName] = e.value;
|
|
11222
11196
|
});
|
|
11223
11197
|
}
|
|
11224
|
-
elements.elements =
|
|
11198
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
11199
|
+
if (cellElem.type) {
|
|
11200
|
+
return {
|
|
11201
|
+
accessorKey: cellElem.name,
|
|
11202
|
+
header: cellElem.label || cellElem.name,
|
|
11203
|
+
size: sizeMap[cellElem.name] || 180,
|
|
11204
|
+
type: cellElem.columnFormat,
|
|
11205
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem) : void 0,
|
|
11206
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
11207
|
+
};
|
|
11208
|
+
} else {
|
|
11209
|
+
return {
|
|
11210
|
+
accessorKey: cellElem.name,
|
|
11211
|
+
type: cellElem.columnFormat,
|
|
11212
|
+
header: cellElem.label || cellElem.name,
|
|
11213
|
+
size: sizeMap[cellElem.name] || 180
|
|
11214
|
+
};
|
|
11215
|
+
}
|
|
11216
|
+
});
|
|
11225
11217
|
} else if (config.type == "Array") {
|
|
11226
11218
|
elements.options.detail.elements = config.elements.map((e, elemInd) => {
|
|
11227
11219
|
return buildUiSchema(e);
|