import React from 'react'; import { IFormStore, IFormItemStore } from '../../store/form'; import { RendererProps } from '../../factory'; import { IIRendererStore } from '../../store'; import hoistNonReactStatic from 'hoist-non-react-statics'; export interface ControlOutterProps extends RendererProps { formStore?: IFormStore; name?: string; value?: any; id?: string; type?: string; required?: boolean; validations: string | { [propsName: string]: any; }; validationErrors: { [propsName: string]: any; }; validateOnChange: boolean; multiple?: boolean; delimiter?: string; joinValues?: boolean; extractValue?: boolean; valueField?: string; labelField?: string; unique?: boolean; selectFirst?: boolean; autoFill?: any; clearValueOnHidden?: boolean; submitOnChange?: boolean; validate?: (value: any, values: any, name: string) => any; formItem?: IFormItemStore; addHook?: (fn: () => any, type?: 'validate' | 'init' | 'flush') => void; removeHook?: (fn: () => any, type?: 'validate' | 'init' | 'flush') => void; $schema: { pipeIn?: (value: any, data: any) => any; pipeOut?: (value: any, originValue: any, data: any) => any; [propName: string]: any; }; store?: IIRendererStore; onChange?: (value: any, name: string, submit?: boolean, changePristine?: boolean) => void; } export interface ControlProps { onBulkChange?: (values: Object) => void; onChange?: (value: any, name: string, submit: boolean) => void; store: IIRendererStore; } export declare function wrapControl & ControlProps>>(ComposedComponent: T): { new (props: Pick | Readonly>): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; }; new (props: Pick, context: any): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context<{ storeType: string; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly fetcher: any; readonly notify: any; readonly isCancel: (value: any) => boolean; readonly __: import("../../locale").TranslateFn; getStoreById(id: string): { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; readonly stores: { [propName: string]: { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; }; } & { addStore(store: { [propName: string]: any; storeType: string; id: string; path: string; parentId?: string | undefined; }): { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; removeStore(store: { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void; } & import("mobx-state-tree").IStateTreeNode; }, { readonly fetcher: any; readonly notify: any; readonly isCancel: (value: any) => boolean; readonly __: import("../../locale").TranslateFn; getStoreById(id: string): { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; readonly stores: { [propName: string]: { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; }; } & { addStore(store: { [propName: string]: any; storeType: string; id: string; path: string; parentId?: string | undefined; }): { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>; removeStore(store: { id: string; path: string; storeType: string; disposed: boolean; parentId: string; childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>; } & import("mobx-state-tree/dist/internal").NonEmptyObject & { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; } & import("mobx-state-tree").IStateTreeNode; path: import("mobx-state-tree").IType; storeType: import("mobx-state-tree").ISimpleType; disposed: import("mobx-state-tree").IType; parentId: import("mobx-state-tree").IType; childrenIds: import("mobx-state-tree").IOptionalIType>, [undefined]>; }, { readonly parentStore: any; readonly __: any; readonly hasChildren: boolean; readonly children: any[]; } & { onChildStoreDispose(child: any): void; syncProps(props: any, prevProps: any, list?: string[]): void; dispose: (callback?: (() => void) | undefined) => void; addChildId: (id: string) => void; removeChildId: (id: string) => void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void; }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>; ComposedComponent: any; } & hoistNonReactStatic.NonReactStatics & { ComposedComponent: any; } & hoistNonReactStatic.NonReactStatics & { ComposedComponent: T; };