import { TableLayoutType, ToolbarConfig } from "./DataTable.types.js"; import { ComponentSize } from "@lumeweb/portal-framework-ui-core"; import { BaseRecord } from "@refinedev/core"; import React from "react"; import { Cell, ColumnDef, Row, Table as Table$1 } from "@tanstack/react-table"; import { UseTableReturnType } from "@refinedev/react-table"; //#region src/components/data-table/BaseTable.d.ts interface ActionColumnCellProps { row: Row; } type ActionColumnDef = ColumnDef & { /** Function to render cell content */cell: (props: ActionColumnCellProps) => React.ReactNode; }; interface BaseTableRefineProps { /** Refine table instance */ refineTable?: UseTableReturnType["refineCore"]; } interface BaseTableCommonProps { /** Whether table is in loading state */ isLoading?: boolean; /** Toolbar configuration */ toolbarConfig?: ToolbarConfig; } type BaseTableCommonPropsType = TableInteractionProps & TablePaginationConfigProps & TableStateProps & TableStylingProps & BaseTableRefineProps & BaseTableCommonProps; type BaseTablePaginationConfig = boolean | TablePaginationProps; type BaseTableProps = BaseTableWithDataProps | BaseTableWithTableProps; type BaseTableWithDataProps = BaseTableCommonPropsType & TableDataProps & { table?: never; }; type BaseTableWithTableProps = BaseTableCommonPropsType & TableInstanceProps & { actionColumn?: never; columns?: never; data?: never; }; interface TableDataProps { /** Optional action column configuration */ actionColumn?: ActionColumnDef; columns: ColumnDef[]; data: TData[]; } interface TableInstanceProps { table: Table$1; refineTable?: UseTableReturnType["refineCore"]; } interface TableInteractionProps { getCellProps?: (cell: Cell) => React.HTMLAttributes; getRowProps?: (row: Row) => React.HTMLAttributes; onRowClick?: (row: Row) => void; } interface TablePaginationConfigProps { /** Pagination configuration */ pagination?: BaseTablePaginationConfig; } interface TablePaginationProps { /** Custom pagination component */ component?: React.ReactNode; /** Whether pagination is enabled */ enabled?: boolean; } interface TableStateProps { emptyState?: ((colSpan: number) => React.ReactNode) | React.ReactNode; emptyStateMessage?: string; loadingState?: ((colSpan: number) => React.ReactNode) | React.ReactNode; loadingStateMessage?: string; } interface TableResponsiveProps { responsive?: boolean; layoutType?: TableLayoutType; hideColumnsOnMobile?: string[]; mobileBreakpoint?: ComponentSize | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; } interface TableHeaderFooterProps { header?: React.ReactNode; footer?: React.ReactNode; } interface TableStylingProps extends TableResponsiveProps, TableHeaderFooterProps { className?: string; } interface BaseTableLayoutPropsBase extends TableInteractionProps, TableStateProps, TableHeaderFooterProps, TableStylingProps, BaseTableCommonProps, TablePaginationConfigProps { table: Table$1; } declare function BaseTable(props: BaseTableProps): React.JSX.Element; //#endregion export { ActionColumnCellProps, ActionColumnDef, BaseTable, BaseTableCommonProps, BaseTableCommonPropsType, BaseTableLayoutPropsBase, BaseTablePaginationConfig, BaseTableProps, BaseTableRefineProps, BaseTableWithDataProps, BaseTableWithTableProps, TableDataProps, TableHeaderFooterProps, TableInstanceProps, TableInteractionProps, TablePaginationConfigProps, TablePaginationProps, TableResponsiveProps, TableStateProps, TableStylingProps }; //# sourceMappingURL=BaseTable.d.ts.map