@stella-source/stellasource-dsl 5.1.0 → 5.1.1
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/cjs/index.js
CHANGED
|
@@ -22115,6 +22115,7 @@ const HeaderRow = styled.tr `
|
|
|
22115
22115
|
background-color: ${Styles.color.grey.pale};
|
|
22116
22116
|
min-height: 50px;
|
|
22117
22117
|
height: 50px;
|
|
22118
|
+
display: ${({ $isEmpty }) => ($isEmpty ? "none" : "table-row")};
|
|
22118
22119
|
`;
|
|
22119
22120
|
const CellRow = styled.tr `
|
|
22120
22121
|
min-height: 50px;
|
|
@@ -22328,6 +22329,7 @@ const LoadingShimmer = styled.div `
|
|
|
22328
22329
|
`;
|
|
22329
22330
|
const CustomPagination = styled(Pagination) `
|
|
22330
22331
|
border-top: ${({ $hasData }) => $hasData ? "0px" : `1px solid ${Styles.color.grey.light}`};
|
|
22332
|
+
display: ${({ $isEmpty }) => ($isEmpty ? "none" : "flex")};
|
|
22331
22333
|
`;
|
|
22332
22334
|
const KebabAlign = styled.div `
|
|
22333
22335
|
display: flex;
|
|
@@ -22344,12 +22346,8 @@ const EmptyTableSection = styled.section `
|
|
|
22344
22346
|
flex-direction: column;
|
|
22345
22347
|
justify-content: center;
|
|
22346
22348
|
align-items: center;
|
|
22347
|
-
position: absolute;
|
|
22348
22349
|
gap: 20px;
|
|
22349
|
-
|
|
22350
|
-
left: 0;
|
|
22351
|
-
right: 0;
|
|
22352
|
-
margin: 80px auto 0;
|
|
22350
|
+
margin: 0 auto;
|
|
22353
22351
|
`;
|
|
22354
22352
|
const EmptyTableHeader = styled.p `
|
|
22355
22353
|
display: flex;
|
|
@@ -23001,7 +22999,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
23001
22999
|
}, key: index + "loading-row" }, Array.from({
|
|
23002
23000
|
length: 10,
|
|
23003
23001
|
}).map((_, i) => (a$n.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a$n.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
|
|
23004
|
-
a$n.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a$n.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
|
|
23002
|
+
a$n.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a$n.createElement(HeaderRow, { key: headerGroup.id, "$isEmpty": table.getRowModel().rows.length === 0 }, headerGroup.headers.map((header, i) => {
|
|
23005
23003
|
return (a$n.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
|
|
23006
23004
|
setFilterMenuOpen((prev) => ({
|
|
23007
23005
|
...prev,
|
|
@@ -23067,7 +23065,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
23067
23065
|
renderExpandedRow &&
|
|
23068
23066
|
!!renderExpandedRow(row) && (a$n.createElement(ExpandedContentRow, null,
|
|
23069
23067
|
a$n.createElement(ExpandedContentCell, { colSpan: table.getVisibleLeafColumns().length }, renderExpandedRow(row))))))))))),
|
|
23070
|
-
showPagination && paginationDetails?.totalRows > 0 && (a$n.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
|
|
23068
|
+
showPagination && paginationDetails?.totalRows > 0 && (a$n.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, "$isEmpty": table.getRowModel().rows.length === 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
|
|
23071
23069
|
table.toggleAllRowsSelected(false);
|
|
23072
23070
|
setPageIndex(page);
|
|
23073
23071
|
setPagination((prev) => ({
|