///
import { ColumnType } from 'antd/es/table';
import { LocalSettingsType } from '../../table/types';
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
export declare type OperationItem = {
label?: string;
openMode: 'modal' | 'drawer' | 'custom';
openContentSize: 'small' | 'middle' | 'large';
openTitle: string;
actionType: 'detail' | 'edit' | 'delete' | 'custom';
key: string;
buttonProps?: any;
onClick?: (record: any) => void;
afterClose?: () => void;
};
export interface DataSourceTableProps {
__id?: string;
currentComponentId?: string;
currentSettingKey?: string;
title?: string | React.ReactNode | (() => React.ReactNode);
subTitle?: string | React.ReactNode | (() => React.ReactNode);
titleButtons?: {
show: boolean;
maxCount: number;
items: OperationItem[];
};
tableButtons?: {
show: boolean;
maxCount: number;
items: OperationItem[];
};
buttons?: any[];
operation?: {
show: boolean;
title: string;
width: number;
align: 'left' | 'center' | 'right';
fixed: 'left' | 'right' | false;
type: 'link' | 'button';
items: OperationItem[];
};
operationContent?: {
[key: string]: React.ReactNode;
};
dataSource: DataSourceType;
columns: ColumnType[];
filter: any;
search?: {
show: boolean;
placeholder: string;
};
__designMode: string;
componentId: string;
clickToDetail?: {
show: boolean;
useCustomAction: boolean;
actionType: string;
openMode: 'modal' | 'drawer';
openContentSize: 'small' | 'middle' | 'large';
openTitle: string;
key: string;
};
onRow?: any;
filterBy?: Record;
sortBy: string;
tabs?: {
show: boolean;
type: string;
items: {
name: string;
filterBy: Record;
sortBy: string;
}[];
};
onValuesChange?: (changedValues: any, values: any) => void;
extraParams?: {
list?: Record;
get?: Record;
update?: Record;
create?: Record;
destroy?: Record;
};
localSettings?: LocalSettingsType;
}