@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.
@@ -5,6 +5,7 @@ interface HeaderIconButtonProps {
5
5
  }
6
6
  interface PaginationProps {
7
7
  $hasData?: boolean;
8
+ $isEmpty: boolean;
8
9
  }
9
10
  declare const HeaderCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "$isPinnedLeft" | "$isPinnedRight" | "$columnInfo" | "$filterMenuOpen"> & {
10
11
  $isPinnedLeft?: boolean;
@@ -33,7 +34,11 @@ declare const SortButton: import("styled-components/dist/types").IStyledComponen
33
34
  as?: import("styled-components").WebTarget | undefined;
34
35
  forwardedAs?: import("styled-components").WebTarget | undefined;
35
36
  }, keyof HeaderIconButtonProps> & HeaderIconButtonProps, never>>> & string;
36
- declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>>> & string;
37
+ declare const HeaderRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isEmpty"> & {
38
+ $isEmpty: boolean;
39
+ }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isEmpty"> & {
40
+ $isEmpty: boolean;
41
+ }, never>>> & string;
37
42
  declare const CellRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isClickable"> & {
38
43
  $isClickable: boolean;
39
44
  }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "$isClickable"> & {
@@ -69,7 +74,7 @@ declare const LoadingShimmer: import("styled-components/dist/types").IStyledComp
69
74
  $width?: string;
70
75
  $height?: string;
71
76
  }, never>>> & string;
72
- declare const CustomPagination: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, "$hasData"> & PaginationProps, never> & Partial<Pick<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, "$hasData"> & PaginationProps, never>>> & string & Omit<({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: import("../Pagination/types").PaginationProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
77
+ declare const CustomPagination: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, keyof PaginationProps> & PaginationProps, never> & Partial<Pick<import("styled-components").FastOmit<import("../Pagination/types").PaginationProps, keyof PaginationProps> & PaginationProps, never>>> & string & Omit<({ isLoading, rowsPerPage, totalRows, ariaLabel, onPageChange, startingPage, id, className, htmlProps, }: import("../Pagination/types").PaginationProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
73
78
  declare const KebabAlign: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
74
79
  declare const EmptyTableCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, never>>> & string;
75
80
  declare const EmptyTableSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "$size"> & {
@@ -22095,6 +22095,7 @@ const HeaderRow = styled.tr `
22095
22095
  background-color: ${Styles.color.grey.pale};
22096
22096
  min-height: 50px;
22097
22097
  height: 50px;
22098
+ display: ${({ $isEmpty }) => ($isEmpty ? "none" : "table-row")};
22098
22099
  `;
22099
22100
  const CellRow = styled.tr `
22100
22101
  min-height: 50px;
@@ -22308,6 +22309,7 @@ const LoadingShimmer = styled.div `
22308
22309
  `;
22309
22310
  const CustomPagination = styled(Pagination) `
22310
22311
  border-top: ${({ $hasData }) => $hasData ? "0px" : `1px solid ${Styles.color.grey.light}`};
22312
+ display: ${({ $isEmpty }) => ($isEmpty ? "none" : "flex")};
22311
22313
  `;
22312
22314
  const KebabAlign = styled.div `
22313
22315
  display: flex;
@@ -22324,12 +22326,8 @@ const EmptyTableSection = styled.section `
22324
22326
  flex-direction: column;
22325
22327
  justify-content: center;
22326
22328
  align-items: center;
22327
- position: absolute;
22328
22329
  gap: 20px;
22329
- top: 50px;
22330
- left: 0;
22331
- right: 0;
22332
- margin: 80px auto 0;
22330
+ margin: 0 auto;
22333
22331
  `;
22334
22332
  const EmptyTableHeader = styled.p `
22335
22333
  display: flex;
@@ -22981,7 +22979,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22981
22979
  }, key: index + "loading-row" }, Array.from({
22982
22980
  length: 10,
22983
22981
  }).map((_, i) => (a__default.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a__default.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
22984
- a__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a__default.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
22982
+ a__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a__default.createElement(HeaderRow, { key: headerGroup.id, "$isEmpty": table.getRowModel().rows.length === 0 }, headerGroup.headers.map((header, i) => {
22985
22983
  return (a__default.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
22986
22984
  setFilterMenuOpen((prev) => ({
22987
22985
  ...prev,
@@ -23047,7 +23045,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
23047
23045
  renderExpandedRow &&
23048
23046
  !!renderExpandedRow(row) && (a__default.createElement(ExpandedContentRow, null,
23049
23047
  a__default.createElement(ExpandedContentCell, { colSpan: table.getVisibleLeafColumns().length }, renderExpandedRow(row))))))))))),
23050
- showPagination && paginationDetails?.totalRows > 0 && (a__default.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) => {
23048
+ showPagination && paginationDetails?.totalRows > 0 && (a__default.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) => {
23051
23049
  table.toggleAllRowsSelected(false);
23052
23050
  setPageIndex(page);
23053
23051
  setPagination((prev) => ({