import React from 'react'; import PropTypes from 'prop-types'; import Body from './Body'; import Cell from './Cell'; import Head from './Head'; import HeadCell, { HeadCellSortDir, HeadCellSortHandler } from './HeadCell'; import Row, { RowActionPrimaryClickHandler, RowActionSecondaryClickHandler, RowRequestExpandHandler, RowRequestToggleHandler } from './Row'; import { ComponentProps } from '../utils/types'; interface TreeGridPropsBase { /** * Adds table-level actions. */ actions?: React.ReactElement[]; /** * Specifies the width of the actions column. Adds an empty header for row actions if no * table-level actions are present. */ actionsColumnWidth?: number; /** * Must be `TreeGrid.Head` or `TreeGrid.Body`. */ children?: React.ReactNode; /** * A React ref which is set to the DOM element when the component mounts and null when it * unmounts. */ elementRef?: React.Ref; /** * The column id that should render hierarchy indentation and disclosure controls. */ hierarchyColumnId: string; /** * Style specification for the inner container, which is the scrolling container. */ innerStyle?: React.CSSProperties; /** * Callback invoked when a user clicks the row selection toggle in the header. */ onRequestToggleAllRows?: () => void; /** * Style specification for the outer container. */ outerStyle?: React.CSSProperties; /** * Header row selection state. */ rowSelection?: 'all' | 'some' | 'none'; /** * Adds alternating background styles to visible rows. */ stripeRows?: boolean; /** * The style attribute for the grid. This is primarily useful for setting the CSS * `table-layout` property. */ tableStyle?: React.CSSProperties; } type TreeGridProps = ComponentProps; declare function TreeGrid({ actions, actionsColumnWidth, children, elementRef, hierarchyColumnId, innerStyle, onRequestToggleAllRows, outerStyle, rowSelection, stripeRows, tableStyle, ...otherProps }: TreeGridProps): React.JSX.Element; declare namespace TreeGrid { var propTypes: { actions: PropTypes.Requireable<(PropTypes.ReactElementLike | null | undefined)[]>; actionsColumnWidth: PropTypes.Requireable; children: PropTypes.Requireable; elementRef: PropTypes.Requireable; hierarchyColumnId: PropTypes.Validator; innerStyle: PropTypes.Requireable; onRequestToggleAllRows: PropTypes.Requireable<(...args: any[]) => any>; outerStyle: PropTypes.Requireable; rowSelection: PropTypes.Requireable; stripeRows: PropTypes.Requireable; tableStyle: PropTypes.Requireable; }; var Body: typeof import("./Body").default; var Cell: typeof import("./Cell").default; var Head: typeof import("./Head").default; var HeadCell: typeof import("./HeadCell").default; var Row: typeof import("./Row").default; } export default TreeGrid; export { Body, Cell, Head, HeadCell, Row }; export type { HeadCellSortDir, HeadCellSortHandler, RowActionPrimaryClickHandler, RowActionSecondaryClickHandler, RowRequestExpandHandler, RowRequestToggleHandler, };