import { Component } from "react";
import { ColumnProps, TableComponents, TableProps } from "antd/lib/table";
import PropTypes from "prop-types";
import Column from "antd/lib/table/Column";
import "antd/lib/table/style";
import "@whalecloud/fdx-theme-fdx/table.less";
interface IColumnProps extends ColumnProps<object> {
    editable?: boolean;
    editType?: string;
    editRules?: any;
    editOptions?: any;
    optionsLabel?: string;
    optionsValue?: string;
    editInitValue?: any;
    relationKey?: string;
    editContent?: () => string;
    saveContent?: () => string;
    cancelContent?: () => string;
}
interface FTableProps extends TableProps<object> {
    editingKey?: string;
    highlightRow?: object;
    rowKey?: string | ((record: object, index?: number) => string);
    onSaveCellEdit?: (record: object, index: number) => void;
    onSaveRowEdit?: (record: object, data: object[]) => void;
    onCancelRowEdit?: (record: object) => void;
    onRowEditing?: (record: object) => void;
    afterRowDrag?: (record: object) => void;
    onSortChange?: (sortField: string, sortOrder: string) => void;
    onSelectRows?: (selectedKeys: string[]) => void;
    dragable?: boolean;
    editRow?: boolean;
    selectType?: string;
    saveAddRowMsg?: string;
}
interface SortProp {
    field?: string;
    order?: string;
}
interface FTableState {
    columns: IColumnProps[];
    dataSource: object[];
    copyDataSource: object[];
    editingKey: string;
    update: boolean;
    highlightRow: object;
    tableWidth: number;
    currentSortInfo: SortProp;
    currentPage: number;
    freezAddRow: boolean;
}
interface IChangeObj {
    editingKey?: string;
    update?: boolean;
    columns?: ColumnProps<object>[];
    highlightRow?: object;
    dataSource?: object[];
    copyDataSource?: object[];
    currentPage?: number;
    freezAddRow?: boolean;
}
declare class Table extends Component<FTableProps, FTableState> {
    static componentName: string;
    static Column: typeof Column;
    static propTypes: {
        dragable: PropTypes.Requireable<boolean>;
        editRow: PropTypes.Requireable<boolean>;
        onSaveCellEdit: PropTypes.Requireable<(...args: any[]) => any>;
        onSaveRowEdit: PropTypes.Requireable<(...args: any[]) => any>;
        editingKey: PropTypes.Requireable<string>;
        highlightRow: PropTypes.Requireable<object>;
        onCancelRowEdit: PropTypes.Requireable<(...args: any[]) => any>;
        onRowEditing: PropTypes.Requireable<(...args: any[]) => any>;
        afterRowDrag: PropTypes.Requireable<(...args: any[]) => any>;
        onSortChange: PropTypes.Requireable<(...args: any[]) => any>;
        onSelectRows: PropTypes.Requireable<(...args: any[]) => any>;
    };
    static defaultProps: {
        pagination: boolean;
        dragable: boolean;
        bordered: boolean;
        editRow: boolean;
        rowKey: string;
        size: string;
        update: boolean;
        highlightRow: {};
        editingKey: string;
        onSaveCellEdit: () => void;
        onSaveRowEdit: () => void;
        onCancelRowEdit: () => void;
        onRowEditing: () => void;
        afterRowDrag: () => void;
    };
    components: TableComponents;
    table: any;
    constructor(props: any);
    static getDerivedStateFromProps(nextProps: any, prevState: any): IChangeObj | null;
    componentDidMount(): void;
    handleSave: (row: any, type: any) => void;
    moveRow: (dragIndex: any, hoverIndex: any) => void;
    handleResize: (index: any) => (_e: any, { size }: {
        size: any;
    }) => void;
    isEditing: (record: any) => boolean;
    toggleEditRow: (key: string | undefined, record: {} | undefined, method: any) => void;
    judgeCellEdit: (columns: any) => any;
    selectRow: (record: any) => void;
    handleSelectRow: (selectedRowKeys: string[], selectedRows: Array<any>, onChange: Function) => void;
    handleRowSelection: (selection: any) => any;
    handleTableChange: (pagination: any, filters: any, sorter: any, extra: any) => void;
    handlePageChange: (currentPage: number, pageSize: number) => void;
    render(): JSX.Element;
}
export default Table;
