@paygreen/pgui 3.0.9 → 3.0.10

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.
@@ -27,8 +27,12 @@ export interface DataTableProps<TData> {
27
27
  onSortingChange?: (sorting: SortingState) => void;
28
28
  onRowClick?: (row: TData) => void;
29
29
  paginationButtonProps?: Partial<IconButtonProps>;
30
+ countLabel?: {
31
+ singular: string;
32
+ plural: string;
33
+ };
30
34
  }
31
- declare function DataTable<TData>({ data, columns, pagination, variant, enableFiltering, enableSorting, emptyState, responsive, mobileView, isMobile, isLoading, onFilterChange, onSortingChange, onRowClick, paginationButtonProps, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
35
+ declare function DataTable<TData>({ data, columns, pagination, variant, enableFiltering, enableSorting, emptyState, responsive, mobileView, isMobile, isLoading, onFilterChange, onSortingChange, onRowClick, paginationButtonProps, countLabel, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
32
36
  declare namespace DataTable {
33
37
  var displayName: string;
34
38
  }
@@ -0,0 +1,8 @@
1
+ import { Cell } from '@tanstack/react-table';
2
+ /**
3
+ * Render cell content, showing a fallback for empty values (null, undefined, empty string, false, empty array).
4
+ * For display columns, only checks rendered content since getValue() is always undefined.
5
+ * @param cell The cell to render
6
+ * @param emptyState The content to display if the cell is empty (defaults to '-')
7
+ */
8
+ export declare const renderCell: <TData>(cell: Cell<TData, unknown>, emptyState?: React.ReactNode) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined;