impaktapps-ui-builder 1.0.64-alpha.109 → 1.0.64-alpha.111
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/package.json
CHANGED
|
@@ -333,13 +333,28 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
336
|
-
|
|
336
|
+
const rowElements = []
|
|
337
|
+
const commonProperties = {
|
|
337
338
|
accessorKey: cellElem.name,
|
|
339
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
338
340
|
header: cellElem.label || cellElem.name,
|
|
339
341
|
size: sizeMap[cellElem.name] || 180,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
343
|
+
columnFilterModeOptions: cellElem.filteringOptions,
|
|
344
|
+
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
345
|
+
columnKey: cellElem.columnKey
|
|
346
|
+
}
|
|
347
|
+
if (cellElem.type) {
|
|
348
|
+
const tableElem = {
|
|
349
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
350
|
+
...commonProperties,
|
|
351
|
+
...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
|
|
352
|
+
}
|
|
353
|
+
rowElements.push(tableElem)
|
|
354
|
+
} else {
|
|
355
|
+
rowElements.push({ ...commonProperties })
|
|
342
356
|
}
|
|
357
|
+
return rowElements
|
|
343
358
|
})
|
|
344
359
|
} else if (config.type == "Table") {
|
|
345
360
|
const sizeMap = {}
|
|
@@ -374,27 +389,10 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
374
389
|
tableHeaderElements.push({widget:headerElem});
|
|
375
390
|
return false;
|
|
376
391
|
}
|
|
377
|
-
|
|
378
|
-
// elements: cellElem.type == "ColumnGroup" ? cellElem.elements : [],
|
|
379
|
-
// widget: buildUiSchema(cellElem, store),
|
|
392
|
+
const tableElem = {
|
|
380
393
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
// (childCellElem) => {
|
|
384
|
-
// if(childCellElem.type){
|
|
385
|
-
// return {widget: buildUiSchema(childCellElem, store),
|
|
386
|
-
// ...commonProperties
|
|
387
|
-
// }
|
|
388
|
-
// }
|
|
389
|
-
// else{
|
|
390
|
-
// return {...commonProperties}
|
|
391
|
-
// }
|
|
392
|
-
// })
|
|
393
|
-
// : [],
|
|
394
|
-
...commonProperties
|
|
395
|
-
}
|
|
396
|
-
if(cellElem.type === "ColumnGroup"){
|
|
397
|
-
tableElem = {...tableElem, ...buildUiSchema(cellElem, store)}
|
|
394
|
+
...commonProperties,
|
|
395
|
+
...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
|
|
398
396
|
}
|
|
399
397
|
rowElements.push(tableElem)
|
|
400
398
|
} else {
|