UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

49 lines (48 loc) 2.57 kB
import React from 'react'; import type { ActionObject, IScopedContext, SchemaNode } from 'jamis-core'; import { ScopedContext } from 'jamis-core'; import type { DialogProps, DialogSchema } from '../types'; export default class Dialog extends React.Component<DialogProps> { static propsList: Array<string>; static defaultProps: Partial<DialogProps>; reaction: any; isDead: boolean; modalBodyDom: React.RefObject<HTMLDivElement>; $$id: string; constructor(props: DialogProps); componentWillUnmount(): void; buildActions(): DialogSchema['actions']; handleSelfClose(e?: any, confirmed?: boolean): Promise<void>; handleActionSensor(p: Promise<any>): void; handleAction(e: React.UIEvent<any>, action: ActionObject, data: object): void; handleDialogConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDialogClose(...args: Array<any>): void; handleDrawerConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDrawerClose(...args: Array<any>): void; handleEntered(): void; handleExited(): void; handleFormInit(data: any): void; handleFormChange(data: any, name?: string): void; handleFormSaved(data: any, response: any): void; handleChildFinished(value: any, action: ActionObject): void; openFeedback(dialog: any, ctx: any): Promise<unknown>; getPopOverContainer(): Element | null; renderBody(body: SchemaNode, key?: any): React.ReactNode; renderFooter(): JSX.Element | null; render(): JSX.Element; } export declare class DialogRenderer extends Dialog { static contextType: React.Context<IScopedContext<import("jamis-core").ScopedComponentType>>; context: React.ContextType<typeof ScopedContext>; constructor(props: DialogProps, context: IScopedContext); componentWillUnmount(): void; tryChildrenToHandle(action: ActionObject, ctx: object, rawAction?: ActionObject): boolean; doAction(action: ActionObject, data: object, throwErrors: boolean): any; handleAction(e: React.UIEvent<any> | void, action: ActionObject, data: object, throwErrors?: boolean, delegate?: IScopedContext): Promise<false | void>; handleChildFinished(value: any, action: ActionObject): void; handleDialogConfirm(values: object[], action: ActionObject, ...rest: Array<any>): void; handleDrawerConfirm(values: object[], action: ActionObject, ...rest: Array<any>): void; reloadTarget(target: string, data?: any): void; closeTarget(target: string, data: any): void; setData(values: object): void; }