import * as React from 'react'; import type { QAProps } from '@gravity-ui/uikit'; import type { Table } from '@tanstack/react-table'; import type { Virtualizer } from '@tanstack/react-virtual'; import type { HeaderGroup } from "../../types/base.js"; import type { BaseFooterRowProps } from "../BaseFooterRow/index.js"; import type { BaseHeaderRowProps } from "../BaseHeaderRow/index.js"; import type { BaseRowProps } from "../BaseRow/index.js"; import type { CanDeferOffscreenCellContent } from "./types.js"; import "./BaseTable.css"; export interface BaseTableProps extends QAProps { /** The table instance returned from the `useTable` hook */ table: Table; /** HTML attributes for the `` element */ attributes?: React.TableHTMLAttributes; /** HTML attributes for the `` element */ bodyAttributes?: React.HTMLAttributes; /** CSS classes for the `` element */ bodyClassName?: string; /** Ref for the `` element */ bodyRef?: React.Ref; /** * Allows first-paint deferral for horizontally offscreen cell content while adaptive row * virtualization realizes a row. Return `true` only for passive content whose delayed mount * cannot affect row or column geometry, focus, accessibility, or application side effects. */ canDeferOffscreenCellContent?: CanDeferOffscreenCellContent; /** HTML attributes for the `` */ cellAttributes?: BaseRowProps['cellAttributes']; /** CSS classes for the `` */ cellClassName?: BaseRowProps['cellClassName']; /** CSS classes for the `
` elements inside `
` elements inside `
` element */ className?: string; /** Should be used together with `renderCustomFooterContent` to set the correct `aria-rowcount` */ customFooterRowCount?: number; /** Content displayed when the table has no data rows */ emptyContent?: React.ReactNode | (() => React.ReactNode); /** HTML attributes for the `` element */ footerAttributes?: React.HTMLAttributes; /** HTML attributes for the `` */ footerCellAttributes?: BaseFooterRowProps['cellAttributes']; /** CSS classes for the `` */ footerCellClassName?: BaseFooterRowProps['cellClassName']; /** CSS classes for the `` element */ footerClassName?: string; /** HTML attributes for the `` elements inside `` */ footerRowAttributes?: BaseFooterRowProps['attributes']; /** CSS classes for the `` elements inside `` */ footerRowClassName?: BaseFooterRowProps['className']; /** Returns the title for a group header row */ getGroupTitle?: BaseRowProps['getGroupTitle']; /** Checks if the row is custom and should be rendered using `renderCustomRowContent` */ getIsCustomRow?: BaseRowProps['getIsCustomRow']; /** Checks if the row should be rendered as a group header */ getIsGroupHeaderRow?: BaseRowProps['getIsGroupHeaderRow']; /** CSS classes for the group header elements */ groupHeaderClassName?: BaseRowProps['groupHeaderClassName']; /** HTML attributes for the `` element */ headerAttributes?: React.HTMLAttributes; /** HTML attributes for the `` */ headerCellAttributes?: BaseHeaderRowProps['cellAttributes']; /** CSS classes for the `` */ headerCellClassName?: BaseHeaderRowProps['cellClassName']; /** CSS classes for the `` element */ headerClassName?: string; /** HTML attributes for the `` elements inside `` */ headerRowAttributes?: BaseHeaderRowProps['attributes']; /** CSS classes for the `` elements inside `` */ headerRowClassName?: BaseHeaderRowProps['className']; /** Click handler for rows inside `` */ onRowClick?: BaseRowProps['onClick']; /** Function to render custom footer content */ renderCustomFooterContent?: (props: { cellClassName: string; footerGroups: HeaderGroup[]; rowClassName: string; rowIndex: number; }) => React.ReactNode; /** Function to render custom rows */ renderCustomRowContent?: BaseRowProps['renderCustomRowContent']; /** Function to override the default rendering of group headers */ renderGroupHeader?: BaseRowProps['renderGroupHeader']; /** Function to override the default rendering of the entire group header row */ renderGroupHeaderRowContent?: BaseRowProps['renderGroupHeaderRowContent']; /** Function to override the default rendering of header cell content */ renderHeaderCellContent?: BaseHeaderRowProps['renderHeaderCellContent']; /** Function to override the default rendering of resize handles */ renderResizeHandle?: BaseHeaderRowProps['renderResizeHandle']; /** Function to override the default rendering of sort indicators */ renderSortIndicator?: BaseHeaderRowProps['renderSortIndicator']; /** CSS classes for resize handles in `` elements inside `` */ rowAttributes?: BaseRowProps['attributes']; /** CSS classes for `` elements inside `` */ rowClassName?: BaseRowProps['className']; /** The row virtualizer instance returned from `useRowVirtualizer` or `useWindowRowVirtualizer` hooks */ rowVirtualizer?: Virtualizer; /** CSS classes for the sort indicator inside `` element sticky */ stickyFooter?: boolean; /** Makes the `` element sticky */ stickyHeader?: boolean; /** Determines whether the `` element should be rendered */ withFooter?: boolean; /** Determines whether the `` element should be rendered */ withHeader?: boolean; } export declare const BaseTable: ((props: BaseTableProps & { ref?: React.Ref; }) => React.ReactElement) & { displayName: string; };
` elements inside `
` elements inside `
` elements inside `
` elements inside `
` elements */ resizeHandleClassName?: BaseHeaderRowProps['resizeHandleClassName']; /** HTML attributes for `
` elements */ sortIndicatorClassName?: BaseHeaderRowProps['sortIndicatorClassName']; /** Makes the `