UNPKG

antd-meck

Version:

An enterprise-class UI design language and React-based implementation

102 lines (101 loc) 3.75 kB
/// <reference types="react" /> import * as React from 'react'; import List, { TransferListProps } from './list'; import Operation from './operation'; import Search from './search'; export { TransferListProps } from './list'; export { TransferOperationProps } from './operation'; export { SearchProps } 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) => React.ReactNode; onChange?: (targetKeys: string[], direction: string, moveKeys: any) => void; onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void; style?: React.CSSProperties; listStyle?: React.CSSProperties; titles?: string[]; operations?: string[]; showSearch?: boolean; filterOption?: (inputValue: any, item: any) => boolean; searchPlaceholder?: string; notFoundContent?: React.ReactNode; footer?: (props: TransferListProps) => React.ReactNode; body?: (props: TransferListProps) => React.ReactNode; rowKey?: (record: TransferItem) => string; onSearchChange?: (direction: 'left' | 'right', e: Event) => void; lazy?: {} | boolean; onScroll?: (direction: 'left' | 'right', e: Event) => void; } export default class Transfer extends React.Component<TransferProps, any> { static List: typeof List; static Operation: typeof Operation; static Search: typeof Search; static defaultProps: { dataSource: never[]; render: () => void; showSearch: boolean; }; static propTypes: { prefixCls: any; dataSource: any; render: any; targetKeys: any; onChange: any; height: any; listStyle: any; className: any; titles: any; operations: any; showSearch: any; filterOption: any; searchPlaceholder: any; notFoundContent: any; body: any; footer: any; rowKey: any; lazy: any; }; splitedDataSource: { leftDataSource: TransferItem[]; rightDataSource: TransferItem[]; } | null; constructor(props: TransferProps); componentWillReceiveProps(nextProps: TransferProps): void; splitDataSource(props: TransferProps): { leftDataSource: TransferItem[]; rightDataSource: TransferItem[]; }; moveTo: (direction: any) => void; moveToLeft: () => void; moveToRight: () => void; handleSelectChange(direction: string, holder: string[]): void; handleSelectAll: (direction: any, filteredDataSource: any, checkAll: any) => void; handleLeftSelectAll: (filteredDataSource: any, checkAll: any) => void; handleRightSelectAll: (filteredDataSource: any, checkAll: any) => void; handleFilter: (direction: any, e: any) => void; handleLeftFilter: (e: any) => void; handleRightFilter: (e: any) => void; handleClear: (direction: any) => void; handleLeftClear: () => void; handleRightClear: () => void; handleSelect: (direction: any, selectedItem: any, checked: any) => void; handleLeftSelect: (selectedItem: any, checked: any) => void; handleRightSelect: (selectedItem: any, checked: any) => void; handleScroll: (direction: any, e: any) => void; handleLeftScroll: (e: any) => void; handleRightScroll: (e: any) => void; getTitles(transferLocale: any): string[]; getSelectedKeysName(direction: any): "sourceSelectedKeys" | "targetSelectedKeys"; renderTransfer: (locale: any) => JSX.Element; render(): JSX.Element; }