import React from 'react'; import { ParamConfig } from '../interface'; import { CCMSConfig, CCMSProps, PageListItem } from '../main'; export declare type OperationConfig = CCMSOperationConfig; export interface IOperationModal { title: string; content: React.ReactNode; onClose: () => void; } /** CCMS内部操作 */ interface _CCMSOperationConfig { /** 操作类型:CCMS内部操作 */ type: 'ccms'; /** 目标资源 */ page: any; /** 参数 */ data: { [key: string]: ParamConfig; }; params?: { field: string; data: ParamConfig; }[]; } /** CCMS模态窗口操作 */ interface CCMSPopupOperationConfig extends _CCMSOperationConfig { mode: 'popup'; label: string; } /** CCMS重定向操作 */ interface CCMSRedirectOperationConfig extends _CCMSOperationConfig { mode: 'redirect'; } /** CCMS新标签页操作 */ interface CCMSWindowOperationConfig extends _CCMSOperationConfig { mode: 'window'; } /** CCMS无界面操作 */ interface CCMSInvisibleOperationConfig extends _CCMSOperationConfig { mode: 'invisible'; } declare type CCMSOperationConfig = CCMSPopupOperationConfig | CCMSRedirectOperationConfig | CCMSWindowOperationConfig | CCMSInvisibleOperationConfig; interface OperationHelperProps { config?: OperationConfig; datas: { record?: object; data: object[]; step: { [field: string]: any; }; }; checkPageAuth: (pageID: any) => Promise; loadPageURL: (pageID: any) => Promise; loadPageFrameURL: (pageID: any) => Promise; loadPageConfig: (pageID: any) => Promise; loadPageList: () => Promise>; baseRoute: string; loadDomain: (domain: string) => Promise; handlePageRedirect?: (path: string, replaceHistory: boolean) => void; children?: (handleOperation: () => void) => React.ReactNode; callback?: (success: boolean) => void; } interface OperationHelperState { operationConfig: CCMSConfig | null; sourceData?: any; } export default class OperationHelper extends React.Component { constructor(props: OperationHelperProps); protected renderModal(props: IOperationModal): JSX.Element; protected renderCCMS(props: CCMSProps): JSX.Element; private handleCCMS; render(): JSX.Element; } export {};