/**
 * 可编辑table
 * @author 施阳 2021-6-26
 * @description
 * 1、可编辑table通常业务场景中可编辑项需要做必填校验，故结合form实现此功能；
 * 2、组件对外暴露新增、移除、拖拽排序、设置编辑态等方法，满足定制化业务场景；
 * 3、内置拖拽排序table的原因是我们必须调用Form.List暴露的move方法，而不是在上层操作dataSource；
 */
import React from 'react';
import { FormInstance, FormItemProps } from 'antd/lib/form';
import { FormListOperation } from 'antd/lib/form/FormList';
import { TableProps, ColumnType } from 'antd/lib/table';
import './index.less';
export declare type ActionProps = {
    activeIndex?: number;
    editable: boolean;
    onConfirm: (fn?: (record: any, index: number) => Promise<any> | any) => void;
    onCancel: () => void;
    onEdit: () => void;
    onDelete: () => void;
};
export declare type ExportProps = FormListOperation;
export interface EditColumnsProps<T = IObject> extends Omit<ColumnType<T>, 'render' | 'dataIndex'> {
    dataIndex: string | number;
    fieldType?: 'input' | 'textarea' | 'inputNumber';
    fieldProps?: IObject;
    formItemProps?: FormItemProps;
    editable?: boolean | ((value: any, record: T, index: number) => boolean);
    render?: (value: any, record: T, index: number, action: ActionProps) => React.ReactNode;
}
export interface EditTableProps<T = IObject> extends Omit<TableProps<T>, 'columns' | 'rowKey' | 'footer'> {
    name?: string;
    columns: EditColumnsProps<T>[];
    form?: FormInstance;
    rowKey?: string;
    placeholder?: React.ReactNode;
    dragger?: boolean;
    onSort?: (afterSortData: IObject[]) => void;
    footer?: (data: readonly T[], action: ExportProps) => React.ReactNode;
}
declare const EditTable: React.ForwardRefExoticComponent<EditTableProps<IObject<any>> & React.RefAttributes<unknown>>;
export default EditTable;
