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