import React, { Component, ReactNode } 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";
export 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;
    colModel?: boolean;
}
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;
    defaultColumns: IColumnProps[];
}
interface IChangeObj {
    editingKey?: string;
    update?: boolean;
    columns?: ColumnProps<object>[];
    highlightRow?: object;
    dataSource?: object[];
    copyDataSource?: object[];
    currentPage?: number;
    freezAddRow?: boolean;
    defaultColumns?: IColumnProps[];
}
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;
    ResizeableTitle: (props: any) => JSX.Element;
    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;
    renderColTitle: (title: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (({ sortOrder, sortColumn, filters }: {
        sortOrder: any;
        sortColumn: any;
        filters: any;
    }) => ReactNode) | null | undefined) => {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | (({ sortOrder, sortColumn, filters }: {
        sortOrder: any;
        sortColumn: any;
        filters: any;
    }) => ReactNode);
    handleColModelMenu: (cols: any[]) => void;
    render(): JSX.Element;
}
export default Table;
