import React from 'react'; import type { ListProps } from 'infrad'; import type { ProTableProps, ProColumnType } from 'infrad-pro-table'; import type { LabelTooltipType } from 'infrad/lib/form/FormItemLabel'; import './index.less'; import type { ItemProps } from './Item'; import type { ProCardProps } from 'infrad-pro-card'; export declare type AntdListProps = Omit, 'rowKey'>; export declare type ProListMeta = Pick, 'dataIndex' | 'valueType' | 'render' | 'search' | 'title' | 'valueEnum' | 'editable' | 'fieldProps' | 'formItemProps'>; export declare type ProListMetas = { [key: string]: any; type?: ProListMeta; title?: ProListMeta; subTitle?: ProListMeta; description?: ProListMeta; avatar?: ProListMeta; content?: ProListMeta; actions?: ProListMeta & { /** * @example * `cardActionProps = 'actions';`; * * @name 选择映射到 card 上的 props,默认为extra */ cardActionProps?: 'extra' | 'actions'; }; }; export declare type GetComponentProps = (record: RecordType, index: number) => React.HTMLAttributes; export declare type ProListProps, ValueType = 'text'> = Omit, 'size' | 'footer'> & AntdListProps & { tooltip?: LabelTooltipType | string; metas?: ProListMetas; showActions?: 'hover' | 'always'; showExtra?: 'hover' | 'always'; onRow?: GetComponentProps; onItem?: GetComponentProps; itemCardProps?: ProCardProps; rowClassName?: string | ((item: RecordType, index: number) => string); itemHeaderRender?: ItemProps['itemHeaderRender']; itemTitleRender?: ItemProps['itemTitleRender']; }; export declare type Key = React.Key; export declare type TriggerEventHandler = (record: RecordType) => void; declare function ProList, U extends Record = Record>(props: ProListProps): JSX.Element; declare function BaseProList, U extends Record = Record>(props: ProListProps): JSX.Element; export { BaseProList }; export default ProList;