import { Component, ReactElement } from "react"; import { ColumnProps } from "./columns/Column"; import BestReactGridProps from "./BestReactGridProps"; import { FilterProps } from "./FilterProps"; import { DataStoreProps } from "./DataStoreProps"; import { ItemRippleProps } from "./ItemRippleProps"; import { SelectableProps } from "./SelectableProps"; /** * This is used for tracking the internal rendering state of the grid. */ interface BestReactGridState { /** * The columns have rendered. */ renderColumns: boolean; /** * The grid has been rendered. */ renderedGrid: boolean; } export declare class BestReactGrid extends Component { private gridRef; private grid; private columns; private childrenRefs; private reactToExtListnersMap; private listenerFnMap; private licenseKey; constructor(props: BestReactGridProps); static setLicense(license: string): void; static getLicense(): any; componentDidMount(): void; /** * Create the references for columns and subcolumns */ private getColumnReference; /** * Render the Grid with properties used. */ private renderGrid; setDefaultFilter(): void; componentDidUpdate(prevProps: BestReactGridProps): void; /** * Add the events dynamically to the grid depends on the React Events. */ private addEventlistners; private getProperty; componentWillUnmount(): void; /** * Add the reference to the columns. */ private getColumnsWithRef; render(): ReactElement; /** * Get the columnsn from jsx children or config.columns. * @param props ColumnProps[] */ private getColumnsFromConfig; /** * Get the column and its children config from jsx children or config.columns. */ private getNestedColumnConfig; /** * Clear all the selected rows */ clearSelection(): void; /** * Set the columns configurations. * @param columns set using ColumnProps[] array */ setColumns(columns: ColumnProps[]): void; /** * Returns columns configurations. * @returns ColumnProps[] */ getColumns(): ColumnProps[]; /** * Set the data array of models which the grid will use to render the data. */ setData(data: any[]): void; /** * Set the filters configuration. */ setFilters(filters?: FilterProps[]): void; /** * Get the data store. */ getStore(): any; /** * Set the Grid data store. */ setStore(store: DataStoreProps): void; /** * Get the filters configuration. */ getFilters(): any; /** * Display a shadow. */ setShadow(shadow: boolean): void; /** * Display column lines. */ setColumnLines(columnLines: boolean): void; /** * Turning on the grouping features. */ setGrouped(grouped: boolean): void; /** * Allow the grid to display variable heights in rows. */ setVariableHeights(variableHeights: boolean): void; /** * Allow the grid to be sorted. */ setSortable(sortable: boolean): void; /** * Set the grid sort configuration. * TODO define sorter data type */ setSorter(sorter: any): void; /** * Display row numbers on the left. */ setRowNumbers(rowNumbers: boolean): void; /** * Display the grid header. */ setHideHeaders(hideHeaders: boolean): void; /** * Display or customize the item ripple or material inkwell animation when clicking on the grid. */ setItemRipple(itemRipple: boolean | ItemRippleProps): void; /** * Set the CSS.properties of the outer grid div. */ setStyle(style: any): void; /** * Allow the grid to be selectable and how it will be selectable. */ setSelectable(selectable: SelectableProps): void; setEnableDarkTheme(themeFlg: boolean): void; setEnableColumnMove(columnMove: boolean): void; /** * Ask the grid to go to the next page. */ gotoNextPage(): void; /** * Ask the grid to go to the previous page. */ gotoPrevPage(): void; /** * Ask the grid to go to a specific page. */ gotoPage(page: number): void; /** * Ask the grid to go to the last page. */ gotoLastPage(): void; /** * Ask the grid to go to the first page. */ gotoFirstPage(): void; setPageSize(size: number): void; getPageSize(): any; clearFilter(): any; } export default BestReactGrid;