import React, { ChangeEvent, Component, CSSProperties, ReactNode, SyntheticEvent } from 'react'; import PropTypes from 'prop-types'; import noop from 'lodash/noop'; import List, { TransferListProps } from './list'; import Search from './search'; import { TransferDirection } from './enum'; export { TransferListProps } from './list'; export { TransferOperationProps } from './operation'; export { TransferSearchProps } from './search'; export interface TransferItem { key: string; title: string; description?: string; disabled?: boolean; } export interface TransferProps { prefixCls?: string; className?: string; dataSource: TransferItem[]; targetKeys?: string[]; selectedKeys?: string[]; render?: (record: TransferItem) => ReactNode; onChange?: (targetKeys: string[], direction: string, moveKeys: any) => void; onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void; style?: CSSProperties; listStyle?: CSSProperties; titles?: string[]; operations?: string[]; showSearch?: boolean; filterOption?: (inputValue: any, item: any) => boolean; searchPlaceholder?: string; notFoundContent?: ReactNode; footer?: (props: TransferListProps) => ReactNode; body?: (props: TransferListProps) => ReactNode; rowKey?: (record: TransferItem) => string; onSearchChange?: (direction: TransferDirection, e: ChangeEvent) => void; lazy?: {} | boolean; onScroll?: (direction: TransferDirection, e: SyntheticEvent) => void; } export interface TransferLocale { titles: string[]; notFoundContent: string; searchPlaceholder: string; itemUnit: string; itemsUnit: string; } export default class Transfer extends Component { static displayName: string; static List: typeof List; static Operation: React.FunctionComponent; static Search: typeof Search; static defaultProps: { dataSource: never[]; render: typeof noop; showSearch: boolean; }; static propTypes: { prefixCls: PropTypes.Requireable; dataSource: PropTypes.Requireable; render: PropTypes.Requireable<(...args: any[]) => any>; targetKeys: PropTypes.Requireable; onChange: PropTypes.Requireable<(...args: any[]) => any>; listStyle: PropTypes.Requireable; className: PropTypes.Requireable; titles: PropTypes.Requireable; operations: PropTypes.Requireable; showSearch: PropTypes.Requireable; filterOption: PropTypes.Requireable<(...args: any[]) => any>; searchPlaceholder: PropTypes.Requireable; notFoundContent: PropTypes.Requireable; body: PropTypes.Requireable<(...args: any[]) => any>; footer: PropTypes.Requireable<(...args: any[]) => any>; rowKey: PropTypes.Requireable<(...args: any[]) => any>; lazy: PropTypes.Requireable; }; splitedDataSource: { leftDataSource: TransferItem[]; rightDataSource: TransferItem[]; } | null; constructor(props: TransferProps); componentWillReceiveProps(nextProps: TransferProps): void; splitDataSource(): { leftDataSource: TransferItem[]; rightDataSource: TransferItem[]; }; moveTo: (direction: TransferDirection) => void; moveToLeft: () => void; moveToRight: () => void; handleSelectChange(direction: TransferDirection, holder: string[]): void; handleSelectAll: (direction: TransferDirection, filteredDataSource: TransferItem[], checkAll: boolean) => void; handleLeftSelectAll: (filteredDataSource: TransferItem[], checkAll: boolean) => void; handleRightSelectAll: (filteredDataSource: TransferItem[], checkAll: boolean) => void; handleFilter: (direction: TransferDirection, e: React.ChangeEvent) => void; handleLeftFilter: (e: React.ChangeEvent) => void; handleRightFilter: (e: React.ChangeEvent) => void; handleClear: (direction: string) => void; handleLeftClear: () => void; handleRightClear: () => void; handleSelect: (direction: TransferDirection, selectedItem: TransferItem, checked: boolean) => void; handleLeftSelect: (selectedItem: TransferItem, checked: boolean) => void; handleRightSelect: (selectedItem: TransferItem, checked: boolean) => void; handleScroll: (direction: TransferDirection, e: React.SyntheticEvent) => void; handleLeftScroll: (e: React.SyntheticEvent) => void; handleRightScroll: (e: React.SyntheticEvent) => void; getTitles(transferLocale: TransferLocale): string[]; getSelectedKeysName(direction: TransferDirection): "sourceSelectedKeys" | "targetSelectedKeys"; renderTransfer: (locale: TransferLocale) => JSX.Element; render(): JSX.Element; }