/// import type { ButtonProps } from 'antd'; import type { INodeConfig, IGroupConfig } from 'oflow-client-core'; type IDndNodeConfig = Omit; type IDndGroupConfig = Omit; type IDndElementConfig = IDndNodeConfig | IDndGroupConfig; export type IResourcePanelSize = 's' | 'm' | 'l' | 'xl'; type IDndElementConfigList = (IDndNodeConfig | IDndGroupConfig)[]; export interface ICardResourcePanelComponentProps { dataSource?: IDndElementConfigList | { label: string; children: IDndElementConfigList; }[]; size?: IResourcePanelSize; } export interface ICategory { label: string; isCategory: boolean; children?: (ICategory | IDndElementConfig)[]; } export type ITabDataSource = { tabIcon: string | React.ReactElement; tabKey: string; children?: IDataSource; showSearch?: boolean; searchPlaceholder?: string; }[]; export type IDataSource = (ICategory | IDndElementConfig)[]; export interface IListResourcePanelComponentProps { size?: IResourcePanelSize; dataSource?: ITabDataSource | IDataSource; showSearch?: boolean; searchPlaceholder?: string; tabDirection?: 'vertical' | 'horizon'; onLoadChildren?: (item?: ICategory | { tabKey: string; }, searchKeyword?: string) => Promise; unExpandedIcon?: string | React.ReactElement; expandedIcon?: string | React.ReactElement; defaultExpandAll?: boolean; actionsRender?: (props: { item: (ICategory | IDndElementConfig); reload: () => void; }) => (ButtonProps & { type: 'icon' | 'more'; })[] | null | undefined; } export type ITreeDataSource = { label: string; subLabel?: string; key: string; children?: IDataSource; showSearch?: boolean; searchPlaceholder?: string; }[]; export interface ITreeResourcePanelComponentProps { size?: IResourcePanelSize; dataSource?: ITreeDataSource; unExpandedIcon?: string | React.ReactElement; showSearch?: boolean; expandedIcon?: string | React.ReactElement; onLoadChildren?: (item: ICategory | { label: string; subLabel?: string; key?: string; }, searchKeyword?: string) => Promise; } export {};