import * as React from 'react'; import { ColumnsType, TablePaginationConfig, TableProps } from '../table'; import { SearchProps } from '../search/Search'; export type TransferDirection = 'left' | 'right'; export type SelectAllLabel = React.ReactNode | ((info: { selectedCount: number; totalCount: number; }) => React.ReactNode); export type RenderResult = React.ReactNode | string | null; export type TransferRender = (item: RecordType) => RenderResult; export interface TransferLocale { sourceTitle: React.ReactNode; targetTitle: React.ReactNode; searchPlaceholder: string; sourceNoData: React.ReactNode; sourceNoSearchData: React.ReactNode; targetNoData: React.ReactNode; targetNoSearchData: React.ReactNode; clearAll: string; workerLoadingTip: string; } export interface TransferItem { key?: string; title?: string; description?: string; disabled?: boolean; children?: TransferItem[]; childrenKeys?: string[]; [name: string]: any; } export interface TransferProps { prefixCls?: string; className?: string; displayType?: 'single' | 'table'; dataSource: RecordType[]; targetKeys?: string[]; render?: TransferRender; onChange?: (targetKeys: string[]) => void; onSourceExpandChange?: (key: string, isOpen: boolean) => void; leftStyle?: React.CSSProperties; rightStyle?: React.CSSProperties; showSearch?: boolean | 'left' | 'right'; showSearchClear?: boolean; searchMode?: 'fe' | 'api'; filterOption?: (inputValue: string, item: RecordType) => boolean; locale?: Partial; rowKey?: (record: RecordType) => string; onSearch?: (searchPosition: 'left' | 'right', value: string) => void; onScroll?: (direction: TransferDirection, e: React.SyntheticEvent) => void; showSelectAll?: boolean; showClearAll?: boolean; selectAllLabels?: SelectAllLabel[]; defaultExpandGroupKey?: string[] | string | number[] | number | boolean; virtual?: boolean; useWorker?: boolean; workerLimit?: number; workerLoading?: boolean; columns?: ColumnsType; leftColumns?: ColumnsType; rightColumns?: ColumnsType; leftPagination?: TablePaginationConfig; rightPagination?: TablePaginationConfig; targetDataSelf?: boolean; targetData?: any[]; onTargetDataChange?: (targetData: any[]) => void; tableLeftProps?: TableProps; tableRightProps?: TableProps; searchLeftProps?: SearchProps; searchRightProps?: SearchProps; dataSourceCustom?: (dataSource: any[]) => any[]; labelRender?: React.ReactNode | ((selectedCount: number, totalCount: number) => React.ReactNode); } declare const Transfer: (props: TransferProps) => React.JSX.Element; export default Transfer;