import { GridOptions, RowDragCallback } from 'ag-grid-community';
import { Awaitable, Recordable } from '../type';
import { EditableAgGridFormItemProps } from './editable/interface';
import { AgGridColumnType, AgGridPluginType, AgGridProps } from './interface';
export declare function mergeProps(...options: GridOptions[]): GridOptions<any>;
/**
 * 将尺寸单位px去掉
 * @param value
 * @param defaultValue
 * @returns
 */
export declare function pxToNumber(value?: string | number, defaultValue?: number): number;
/**
 * 获取字符串的key
 * @param key
 * @returns
 */
export declare function getStringKey(key?: string | number): string | undefined;
export declare function getShadowName(name: EditableAgGridFormItemProps['name']): string;
/**
 * 运行副作用钩子
 * @param plugins
 * @param pick
 * @param args
 */
export declare function runEffectHooks<T extends any[]>(plugins: AgGridPluginType[], pick: (p: AgGridPluginType) => ((...args: T) => Awaitable<void>) | undefined, ...args: T): Promise<void>;
/**
 * 串形运行钩子
 * @param plugins
 * @param initialValue
 * @param pick
 * @param args
 * @returns
 */
export declare function runPipelineHooks<T, TArgs extends any[]>(plugins: AgGridPluginType[], initialValue: Awaited<T>, pick: (p: AgGridPluginType) => ((value: Awaited<T>, ...args: TArgs) => Awaitable<Awaited<T> | void>) | undefined, ...args: TArgs): Promise<Awaited<T>>;
/**
 * 获取某一个列配置并返回一个对象
 * @param columns
 * @param key
 * @returns
 */
export declare function pickColumnConfig(columns: AgGridColumnType[], key: keyof AgGridColumnType, valueFallback?: any): Recordable;
/**
 * 扁平化列配置
 * @param columns
 * @returns
 */
export declare function flatColumnConfig(columns: AgGridColumnType[]): AgGridColumnType[];
export declare function getRowDragConfig(conf: AgGridProps['rowDrag']): {
    colKey?: string | number;
    rowDragCallback?: RowDragCallback;
    rowDragEntireRow?: boolean;
    suppressMoveWhenRowDragging?: boolean;
    rowDragText?: GridOptions["rowDragText"];
    onRowDragEnd?: GridOptions["onRowDragEnd"];
};
type ExcelColumnSingle = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
type ExcelColumn = ExcelColumnSingle | `${ExcelColumnSingle}${ExcelColumnSingle}`;
export type DataKeyMap<RecordType> = Partial<Record<ExcelColumn, keyof RecordType>>;
/**
 * 将excel文件解析为表格数据源
 * @param file
 * @param dataKeyMap
 * @returns
 */
export declare function excelToDataSource<RecordType = Recordable>(file: File | string, dataKeyMap: DataKeyMap<RecordType>): Promise<RecordType[]>;
export {};
