import React from 'react'; export declare type ACTION_TYPE = 'link' | 'ajax' | 'dialog' | 'drawer' | 'custom'; export interface DialogOptionBody { type: 'alert' | 'plain' | 'common'; content: any; $payloadFields?: any; $extraPayload?: any; $onBeforeDialogOpen?: (payload: any) => any; } export interface DialogOption { body: DialogOptionBody; className?: string; title?: string; width?: number; maskClosable?: boolean; foot?: boolean; okText?: string; cancelText?: string; cancelWithSuccess?: boolean; fromTable?: boolean; } export interface DrawerOptionBody { content: any; $payloadFields?: any; $extraPayload?: any; $onBeforeOpen?: (payload: any) => any; } export interface DrawerOption { body: DrawerOptionBody; className?: string; title?: string; width?: number; maskClosable?: boolean; foot?: boolean; okText?: string; cancelText?: string; cancelWithSuccess?: boolean; fromTable?: boolean; } export declare type ConfirmType = 'warning' | 'info' | 'error' | 'sucess'; export interface AjaxOption { apiAction: string; $toastMessage?: string; confirmTitle?: string; confirmText?: string; confirmType?: ConfirmType; $onRequest?: (requestPayload: any) => any; $onResponse?: (response: any, requestPayload: any) => any; $onError?: (error: any, requestPayload: any) => void; $payloadFields?: string[]; $extraPayload?: any; } export interface BulkItem { position?: string; id: string; text: string; type?: 'button' | 'checkbox'; icon?: React.ReactNode; skin?: 'primary' | 'dashed' | 'danger'; select?: boolean; disabled?: boolean; actionType: ACTION_TYPE; link?: string; ajax?: AjaxOption; dialog?: DialogOption; drawer?: DrawerOption; action?: string; } export interface FilterControl { type: 'textbox' | 'search' | 'select' | 'rangecalendar' | 'tagselect' | 'radio'; name: string; width?: number; defaultValue?: any; value?: any; label?: string; multi?: boolean; options?: any[]; time?: boolean; range?: any; acudProps?: any; } export interface FilterConfig { position?: string; submitText?: string; controls: FilterControl[]; } export interface TableCommand { [actionName: string]: { actionType: ACTION_TYPE; link?: string; $payloadFields?: any[]; ajax?: AjaxOption; dialog?: DialogOption; drawer?: DrawerOption; action?: string; }; } export interface EditComp { row: React.ComponentType; cell: React.ComponentType; } export interface ListOptions { title?: any; className?: string; fetchListAction: string; rowKey?: string; pageSize?: number; pageSizeOptions?: string[]; select?: 'multi' | 'single' | 'none'; interval?: number; emptyText?: string; bulkPosition?: 'left' | 'right'; bulkConfig?: BulkItem[]; bulkComp?: React.ComponentType; editComp?: EditComp; filterConfig?: FilterConfig; filterComp?: React.ComponentType; filterProps?: any; tableConfig?: any; tableComp?: React.ComponentType; card?: React.ComponentType; commands?: TableCommand; requestAbort?: boolean; $onRequest?: (payload: any) => any; $onResponse?: (page: any, requestPayload?: any) => any; $onError?: (error: any) => void; } export declare type ConfigOptions = (...args: any) => ListOptions; export interface ListPageProps { actions?: any; [pageKey: string]: any; }