impaktapps-ui-builder 1.0.64-alpha.112 → 1.0.64-alpha.114
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 +18 -29
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +29 -29
|
@@ -12560,6 +12560,18 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12560
12560
|
};
|
|
12561
12561
|
elements = buildBasicUiSchema(config2);
|
|
12562
12562
|
}
|
|
12563
|
+
const getCommonProperties = (cellElem, sizeMap) => {
|
|
12564
|
+
return {
|
|
12565
|
+
accessorKey: cellElem.name,
|
|
12566
|
+
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
12567
|
+
header: cellElem.label || cellElem.name,
|
|
12568
|
+
size: sizeMap[cellElem.name] || 180,
|
|
12569
|
+
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
12570
|
+
columnFilterModeOptions: cellElem.filteringOptions,
|
|
12571
|
+
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
12572
|
+
columnKey: cellElem.columnKey
|
|
12573
|
+
};
|
|
12574
|
+
};
|
|
12563
12575
|
if (config2 == null ? void 0 : config2.elements) {
|
|
12564
12576
|
if ((config2 == null ? void 0 : config2.type) === "LeaderBoard") {
|
|
12565
12577
|
return elements;
|
|
@@ -12571,26 +12583,13 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12571
12583
|
});
|
|
12572
12584
|
}
|
|
12573
12585
|
elements.elements = config2.elements.map((cellElem, elemInd) => {
|
|
12574
|
-
|
|
12586
|
+
return {
|
|
12575
12587
|
accessorKey: cellElem.name,
|
|
12576
|
-
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
12577
12588
|
header: cellElem.label || cellElem.name,
|
|
12578
12589
|
size: sizeMap[cellElem.name] || 180,
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
12582
|
-
columnKey: cellElem.columnKey
|
|
12590
|
+
type: cellElem.columnFormat,
|
|
12591
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => getCommonProperties(childCellElem, sizeMap)) : []
|
|
12583
12592
|
};
|
|
12584
|
-
if (cellElem.type) {
|
|
12585
|
-
const tableElem = {
|
|
12586
|
-
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
|
|
12587
|
-
...commonProperties,
|
|
12588
|
-
...cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store2) : {}
|
|
12589
|
-
};
|
|
12590
|
-
return tableElem;
|
|
12591
|
-
} else {
|
|
12592
|
-
return { ...commonProperties };
|
|
12593
|
-
}
|
|
12594
12593
|
});
|
|
12595
12594
|
} else if (config2.type == "Table") {
|
|
12596
12595
|
const sizeMap = {};
|
|
@@ -12603,16 +12602,6 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12603
12602
|
const tableActionElement = [];
|
|
12604
12603
|
const rowElements = [];
|
|
12605
12604
|
config2.elements.filter((cellElem, elemInd) => {
|
|
12606
|
-
const commonProperties = {
|
|
12607
|
-
accessorKey: cellElem.name,
|
|
12608
|
-
type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
|
|
12609
|
-
header: cellElem.label || cellElem.name,
|
|
12610
|
-
size: sizeMap[cellElem.name] || 180,
|
|
12611
|
-
enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
|
|
12612
|
-
columnFilterModeOptions: cellElem.filteringOptions,
|
|
12613
|
-
enableSorting: cellElem.enableSorting === "No" ? false : true,
|
|
12614
|
-
columnKey: cellElem.columnKey
|
|
12615
|
-
};
|
|
12616
12605
|
if (cellElem.type) {
|
|
12617
12606
|
if (cellElem.elementType == "action") {
|
|
12618
12607
|
const actionElem = buildUiSchema(cellElem, store2);
|
|
@@ -12626,12 +12615,12 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12626
12615
|
}
|
|
12627
12616
|
const tableElem = {
|
|
12628
12617
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
|
|
12629
|
-
|
|
12630
|
-
...
|
|
12618
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => getCommonProperties(childCellElem, sizeMap)) : [],
|
|
12619
|
+
...getCommonProperties(cellElem, sizeMap)
|
|
12631
12620
|
};
|
|
12632
12621
|
rowElements.push(tableElem);
|
|
12633
12622
|
} else {
|
|
12634
|
-
rowElements.push({ ...
|
|
12623
|
+
rowElements.push({ ...getCommonProperties(cellElem, sizeMap) });
|
|
12635
12624
|
}
|
|
12636
12625
|
});
|
|
12637
12626
|
elements.elements = rowElements;
|