@bluemarble/bm-components 0.0.76 → 0.0.78
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/esm/index.js
CHANGED
|
@@ -15032,21 +15032,27 @@ const GridPagination = ({ currentPage, totalNumberOfPages, onPageChange, rowsPer
|
|
|
15032
15032
|
React__default.createElement(MdArrowForwardIos, { size: 8 * 2 })))));
|
|
15033
15033
|
};
|
|
15034
15034
|
|
|
15035
|
-
function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense = true, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions }) {
|
|
15035
|
+
function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense = true, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, isLoading }) {
|
|
15036
15036
|
return (React__default.createElement(Paper, Object.assign({}, paperProps, { sx: Object.assign({ 'tr td': {
|
|
15037
|
-
py: dense ? 0.23 : 0.7
|
|
15038
|
-
|
|
15037
|
+
py: dense ? 0.23 : 0.7
|
|
15038
|
+
}, 'tr td:not(:last-child), tr th:not(:last-child)': {
|
|
15039
|
+
borderRight: bordered ? '1px solid' : '',
|
|
15039
15040
|
borderColor: 'divider'
|
|
15040
15041
|
}, 'tr:nth-of-type(even)': {
|
|
15041
15042
|
transition: 'background-color ease 200ms',
|
|
15042
15043
|
bgcolor: striped ? 'divider' : 'initial'
|
|
15043
|
-
},
|
|
15044
|
+
}, 'tbody tr:last-child td': {
|
|
15045
|
+
borderBottomWidth: hideFooter ? 0 : 1
|
|
15046
|
+
} }, paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx) }),
|
|
15044
15047
|
React__default.createElement(Table, Object.assign({ size: "small", stickyHeader: true }, tableProps, { sx: Object.assign({}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) }),
|
|
15045
15048
|
React__default.createElement(TableHead, Object.assign({}, tableHeadProps),
|
|
15046
15049
|
React__default.createElement(TableRow, null, columns.map((column) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? 'none' : 'normal', sx: Object.assign({ pl: 2 }, column === null || column === void 0 ? void 0 : column.sx) },
|
|
15047
|
-
React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false
|
|
15050
|
+
React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false }, column.label))))),
|
|
15051
|
+
isLoading && (React__default.createElement(TableRow, null,
|
|
15052
|
+
React__default.createElement(TableCell, { colSpan: columns.length, sx: { p: 0, border: 'none' } },
|
|
15053
|
+
React__default.createElement(LinearProgress, null))))),
|
|
15048
15054
|
React__default.createElement(TableBody, Object.assign({}, tableBodyProps), children)),
|
|
15049
|
-
React__default.createElement(GridPagination, { rowsPerPageOptions: rowsPerPageOptions, currentPage: currentPage, totalNumberOfPages: totalNumberOfPages, onPageChange: onPageChange, setRowsPerPage: setRowsPerPage, rowsPerPage: rowsPerPage, dense: dense })));
|
|
15055
|
+
!hideFooter && (React__default.createElement(GridPagination, { rowsPerPageOptions: rowsPerPageOptions, currentPage: currentPage, totalNumberOfPages: totalNumberOfPages, onPageChange: onPageChange, setRowsPerPage: setRowsPerPage, rowsPerPage: rowsPerPage, dense: dense }))));
|
|
15050
15056
|
}
|
|
15051
15057
|
|
|
15052
15058
|
function getObjectValue(obj) {
|