///
import React from 'react';
import { RendererEnv, RendererProps } from 'amis-core';
import { Api } from 'amis-core';
import { BaseSchema, SchemaApi, SchemaTokenizeableString, SchemaTpl } from '../Schema';
import { Instance } from 'mobx-state-tree';
/**
* Mapping 映射展示控件。
* 文档:https://baidu.gitee.io/amis/docs/components/mapping
*/
export interface MappingSchema extends BaseSchema {
/**
* 指定为映射展示控件
*/
type: 'map' | 'mapping';
/**
* 关联字段名。
*/
name?: string;
/**
* 配置映射规则,值可以使用模板语法。当 key 为 * 时表示 else,也就是说值没有映射到任何规则时用 * 对应的值展示。
*/
map?: {
[propName: string]: SchemaTpl;
};
/**
* 如果想远程拉取字典,请配置 source 为接口。
*/
source?: SchemaApi | SchemaTokenizeableString;
/**
* 占位符
*/
placeholder?: string;
}
export declare const Store: import("mobx-state-tree").IModelType<{
id: import("mobx-state-tree").ISimpleType;
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]>;
} & {
fetching: import("mobx-state-tree").IType;
errorMsg: import("mobx-state-tree").IType;
map: import("mobx-state-tree").IType<{
[propName: string]: any;
} | null | undefined, {
[propName: string]: any;
}, {
[propName: string]: any;
}>;
}, {
readonly parentStore: any;
readonly __: any;
readonly hasChildren: boolean;
readonly children: any[];
} & {
onChildStoreDispose(child: any): void;
syncProps(props: any, prevProps: any, list?: string[] | undefined): void;
dispose: (callback?: (() => void) | undefined) => void;
addChildId: (id: string) => void;
removeChildId: (id: string) => void;
} & {
load: (env: RendererEnv, api: Api, data: any) => Promise;
setMap(options: any): void;
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
export declare type IStore = Instance;
export interface MappingProps extends Omit, Omit {
store: IStore;
}
export declare const MappingField: {
new (props: Omit | Readonly>): {
ref: any;
store?: ({
id: string;
path: string;
storeType: string;
disposed: boolean;
parentId: string;
childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>;
fetching: boolean;
errorMsg: string;
map: {
[propName: string]: any;
} & import("mobx-state-tree").IStateTreeNode>;
} & 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[] | undefined): void;
dispose: (callback?: (() => void) | undefined) => void;
addChildId: (id: string) => void;
removeChildId: (id: string) => void;
} & {
load: (env: RendererEnv, api: Api, data: any) => Promise;
setMap(options: any): 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]>;
} & {
fetching: import("mobx-state-tree").IType;
errorMsg: import("mobx-state-tree").IType;
map: import("mobx-state-tree").IType<{
[propName: string]: any;
} | null | undefined, {
[propName: string]: any;
}, {
[propName: string]: any;
}>;
}, {
readonly parentStore: any;
readonly __: any;
readonly hasChildren: boolean;
readonly children: any[];
} & {
onChildStoreDispose(child: any): void;
syncProps(props: any, prevProps: any, list?: string[] | undefined): void;
dispose: (callback?: (() => void) | undefined) => void;
addChildId: (id: string) => void;
removeChildId: (id: string) => void;
} & {
load: (env: RendererEnv, api: Api, data: any) => Promise;
setMap(options: any): void;
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
refFn: (ref: any) => void;
componentWillUnmount(): void;
getWrappedInstance(): any;
render(): JSX.Element;
context: any;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | 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;
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: Omit, context: any): {
ref: any;
store?: ({
id: string;
path: string;
storeType: string;
disposed: boolean;
parentId: string;
childrenIds: import("mobx-state-tree").IMSTArray> & import("mobx-state-tree").IStateTreeNode>, [undefined]>>;
fetching: boolean;
errorMsg: string;
map: {
[propName: string]: any;
} & import("mobx-state-tree").IStateTreeNode>;
} & 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[] | undefined): void;
dispose: (callback?: (() => void) | undefined) => void;
addChildId: (id: string) => void;
removeChildId: (id: string) => void;
} & {
load: (env: RendererEnv, api: Api, data: any) => Promise;
setMap(options: any): 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]>;
} & {
fetching: import("mobx-state-tree").IType;
errorMsg: import("mobx-state-tree").IType;
map: import("mobx-state-tree").IType<{
[propName: string]: any;
} | null | undefined, {
[propName: string]: any;
}, {
[propName: string]: any;
}>;
}, {
readonly parentStore: any;
readonly __: any;
readonly hasChildren: boolean;
readonly children: any[];
} & {
onChildStoreDispose(child: any): void;
syncProps(props: any, prevProps: any, list?: string[] | undefined): void;
dispose: (callback?: (() => void) | undefined) => void;
addChildId: (id: string) => void;
removeChildId: (id: string) => void;
} & {
load: (env: RendererEnv, api: Api, data: any) => Promise;
setMap(options: any): void;
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
refFn: (ref: any) => void;
componentWillUnmount(): void;
getWrappedInstance(): any;
render(): JSX.Element;
context: any;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K_1_1> | null) | Pick<{}, K_1_1> | 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;
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;
ComposedComponent: React.ComponentType<{
new (props: MappingProps): {
componentDidMount(): void;
componentDidUpdate(prevProps: MappingProps): void;
reload(): void;
renderSingleValue(key: any, reactKey?: number): JSX.Element;
render(): JSX.Element;
context: any;
setState(state: object | ((prevState: object, props: Readonly) => object | Pick