import { ColumnProps, TableRowSelection } from 'antd/lib/table'; import React from 'react'; import { Addon } from '../../aop'; import { ReactControl } from '../../react/base'; import { ValueEditor } from '../../react/editor'; import { Style } from '../../react/style'; import { Pagination } from './pagination'; export declare type CompareFunc = (firstEl: any, second: any) => boolean; export declare type SelectionSelectFn = (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => void; export declare const RowSelectionType: { checkbox: string; radio: string; }; export declare type TableSelectWay = 'onSelect' | 'onSelectMultiple' | 'onSelectAll' | 'onSelectInvert'; export declare type SelectionItemSelectFn = (key: string[]) => void; export declare class SelectionItem extends Addon { key?: string; text?: React.ReactNode; onSelect?: SelectionItemSelectFn; } export declare class RowSelection extends Addon { type?: keyof typeof RowSelectionType; selections?: SelectionItem[] | boolean; hideDefaultSelections?: boolean; fixed?: boolean; columnWidth?: string | number; columnTitle?: ReactControl; onChange?: (selectedRowKeys: string[] | number[], selectedRows: any[]) => void; getCheckboxProps?: (record: T) => Object; onSelect?: SelectionSelectFn; onSelectMultiple?: (selected: boolean, selectedRows: T[], changeRows: T[]) => void; onSelectAll?: (selected: boolean, selectedRows: T[], changeRows: T[]) => void; onSelectInvert?: (selectedRowKeys: string[] | number[]) => void; createRowSelection?: (() => TableRowSelection) | undefined; } export declare const ColumnAlign: { left: string; center: string; right: string; }; export declare const SortOrder: { ascend: string; descend: string; }; export declare const ColumnFixed: { left: string; right: string; }; export declare class TableColumn extends Addon { key?: string; title?: ReactControl; dataIndex?: string; cellControl?: ReactControl; align?: keyof typeof ColumnAlign; ellipsis?: boolean; filters?: any[]; filterMultiple?: boolean; filterDropdown?: ReactControl; filterDropdownVisible?: boolean; colSpan?: number; width?: string | number; fixed?: keyof typeof ColumnFixed; filterIcon?: ReactControl; filteredValue?: any[]; sorter?: boolean | string | CompareFunc; defaultSortOrder?: keyof typeof SortOrder; children?: TableColumn[]; sortOrder?: keyof typeof SortOrder | boolean; sortDirections?: keyof typeof SortOrder[]; onFilter?: (value: any, record: any) => boolean; onFilterDropdownVisibleChange?: (visible: boolean) => void; onCellClick?: (record: any, event: Event) => void; onCell?: (record: any, rowIndex: number) => any; onHeaderCell?: (props: any) => any; createColumn?: (() => ColumnProps) | undefined; } export declare class TableScroll extends Addon { x?: string | number | boolean; y?: string | number | boolean; scrollToFirstRowOnChange?: boolean; } export declare const TableLayout: { auto: string; fixed: string; }; export declare const TableSize: { default: string; middle: string; small: string; }; export declare class Table extends ValueEditor { tableLayout?: keyof typeof TableLayout; borderd?: boolean; childrenColumnName?: string; columns?: TableColumn[]; defaultExpandAllRows?: boolean; defaultExpandedRowKeys?: string[]; expandedRowKeys?: string[]; expandRowByClick?: boolean; indentSize?: number; locale?: object; rowKey?: string; showHeader?: boolean; size?: keyof typeof TableSize; title?: string; titleControl?: ReactControl; footer?: ReactControl; expandedRow?: ReactControl; scroll?: TableScroll; rowSelection?: RowSelection; pagination?: Pagination; bodyStyle?: Style; rowClassName?: (record: T, index: number) => string; expandedRowRender?: (record: T, index: number, indent: number, expanded: boolean) => React.ReactNode; expandIcon?: (props: any) => React.ReactNode; onTableChange?: (pagination: any, filers: any, sorters: any, extra: { currentDataSource: T[]; }) => void; onExpand?: (expanded: boolean, recode: T) => void; onExpandedRowsChange?: (expandedRows: string[] | number[]) => void; onHeaderRow?: (columns: any[]) => any; onRow?: (column: any, index: number) => any; getPopupContainer?: (triggerNode: any) => HTMLElement; onRender?: (() => JSX.Element) | undefined; } export declare const TableControl: any;