UNPKG

jamis

Version:

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

54 lines (53 loc) 2.66 kB
import React from 'react'; import type { ActionObject, IScopedContext, SchemaNode } from 'jamis-core'; import { ScopedContext } from 'jamis-core'; import type { DrawerRendererProps, DrawerSchema } from '../types'; interface DrawerState { entered: boolean; resizeCoord: number; [propName: string]: any; } export default class Drawer extends React.Component<DrawerRendererProps, DrawerState> { static propsList: Array<string>; static defaultProps: Partial<DrawerRendererProps>; reaction: any; $$id: string; drawer: any; constructor(props: DrawerRendererProps); componentWillUnmount(): void; buildActions(): DrawerSchema['actions']; handleSelfClose(): Promise<void>; handleActionSensor(p: Promise<any>): void; handleAction(e: React.UIEvent<any>, action: ActionObject, data: object): void; handleDrawerConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDrawerClose(...args: Array<any>): void; handleDialogConfirm(values: object[], action: ActionObject, ...args: Array<any>): void; handleDialogClose(...args: Array<any>): void; handleChildFinished(value: any, action: ActionObject): void; handleFormInit(data: any): void; handleFormChange(data: any, name?: string): void; handleFormSaved(data: any, response: any): void; handleEntered(): void; handleExited(): void; getPopOverContainer(): Element | null; renderBody(body: SchemaNode, key?: any): React.ReactNode; renderFooter(): JSX.Element | null; openFeedback(dialog: any, ctx: any): Promise<unknown>; render(): JSX.Element; } export declare class DrawerRenderer extends Drawer { static contextType: React.Context<IScopedContext<import("jamis-core").ScopedComponentType>>; context: React.ContextType<typeof ScopedContext>; constructor(props: DrawerRendererProps, 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; } export {};