amis-core 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Root.js +94 -0
- package/dist/RootRenderer.js +288 -0
- package/dist/SchemaRenderer.js +323 -0
- package/dist/Scoped.js +252 -0
- package/dist/WithRootStore.js +44 -0
- package/dist/WithStore.js +179 -0
- package/dist/__tests__/compat.test.d.ts +1 -0
- package/dist/__tests__/factory.test.d.ts +1 -0
- package/dist/__tests__/filter.test.d.ts +1 -0
- package/dist/__tests__/helper.d.ts +13 -0
- package/dist/__tests__/tokenize.test.d.ts +1 -0
- package/dist/actions/Action.js +119 -0
- package/dist/actions/AjaxAction.js +96 -0
- package/dist/actions/BreakAction.js +35 -0
- package/dist/actions/BroadcastAction.js +49 -0
- package/dist/actions/CmptAction.js +60 -0
- package/dist/actions/ContinueAction.js +35 -0
- package/dist/actions/CopyAction.js +43 -0
- package/dist/actions/CustomAction.js +49 -0
- package/dist/actions/DialogAction.js +104 -0
- package/dist/actions/DrawerAction.js +66 -0
- package/dist/actions/EmailAction.js +48 -0
- package/dist/actions/LinkAction.js +52 -0
- package/dist/actions/LoopAction.js +107 -0
- package/dist/actions/PageAction.js +80 -0
- package/dist/actions/ParallelAction.js +40 -0
- package/dist/actions/SwitchAction.js +52 -0
- package/dist/actions/ToastAction.js +35 -0
- package/dist/components/LazyComponent.js +99 -0
- package/dist/env.js +20 -0
- package/dist/envOverwrite.js +43 -0
- package/dist/factory.js +308 -0
- package/dist/index.js +218 -0
- package/dist/index2.js +255 -0
- package/dist/locale.js +114 -0
- package/dist/renderers/Form.js +1162 -0
- package/dist/renderers/Item.js +636 -0
- package/dist/renderers/Options.js +881 -0
- package/dist/renderers/Placeholder.js +31 -0
- package/dist/renderers/builtin.js +27 -0
- package/dist/renderers/wrapControl.js +507 -0
- package/dist/src/Root.d.ts +37 -0
- package/dist/src/RootRenderer.d.ts +27 -0
- package/dist/src/SchemaRenderer.d.ts +37 -0
- package/dist/src/Scoped.d.ts +38 -0
- package/dist/src/WithRootStore.d.ts +737 -0
- package/dist/src/WithStore.d.ts +5 -0
- package/dist/src/actions/Action.d.ts +38 -0
- package/dist/src/actions/AjaxAction.d.ts +25 -0
- package/dist/src/actions/BreakAction.d.ts +15 -0
- package/dist/src/actions/BroadcastAction.d.ts +16 -0
- package/dist/src/actions/CmptAction.d.ts +20 -0
- package/dist/src/actions/ContinueAction.d.ts +15 -0
- package/dist/src/actions/CopyAction.d.ts +20 -0
- package/dist/src/actions/CustomAction.d.ts +17 -0
- package/dist/src/actions/Decorators.d.ts +25 -0
- package/dist/src/actions/DialogAction.d.ts +57 -0
- package/dist/src/actions/DrawerAction.d.ts +30 -0
- package/dist/src/actions/EmailAction.d.ts +23 -0
- package/dist/src/actions/LinkAction.d.ts +24 -0
- package/dist/src/actions/LoopAction.d.ts +19 -0
- package/dist/src/actions/PageAction.d.ts +39 -0
- package/dist/src/actions/ParallelAction.d.ts +8 -0
- package/dist/src/actions/SwitchAction.d.ts +11 -0
- package/dist/src/actions/ToastAction.d.ts +19 -0
- package/dist/src/actions/index.d.ts +21 -0
- package/dist/src/components/LazyComponent.d.ts +32 -0
- package/dist/src/env.d.ts +172 -0
- package/dist/src/envOverwrite.d.ts +4 -0
- package/dist/src/factory.d.ts +78 -0
- package/dist/src/index.d.ts +25 -0
- package/dist/src/locale.d.ts +82 -0
- package/dist/src/renderers/Form.d.ts +352 -0
- package/dist/src/renderers/Item.d.ts +795 -0
- package/dist/src/renderers/Options.d.ts +150 -0
- package/dist/src/renderers/Placeholder.d.ts +6 -0
- package/dist/src/renderers/builtin.d.ts +1 -0
- package/dist/src/renderers/wrapControl.d.ts +446 -0
- package/dist/src/schema.d.ts +369 -0
- package/dist/src/store/app.d.ts +89 -0
- package/dist/src/store/combo.d.ts +8504 -0
- package/dist/src/store/crud.d.ts +124 -0
- package/dist/src/store/form.d.ts +3394 -0
- package/dist/src/store/formItem.d.ts +130 -0
- package/dist/src/store/iRenderer.d.ts +46 -0
- package/dist/src/store/index.d.ts +105 -0
- package/dist/src/store/list.d.ts +270 -0
- package/dist/src/store/manager.d.ts +115 -0
- package/dist/src/store/modal.d.ts +84 -0
- package/dist/src/store/node.d.ts +22 -0
- package/dist/src/store/pagination.d.ts +58 -0
- package/dist/src/store/root.d.ts +79 -0
- package/dist/src/store/service.d.ts +71 -0
- package/dist/src/store/table-v2.d.ts +309 -0
- package/dist/src/store/table.d.ts +8334 -0
- package/dist/src/theme.d.ts +83 -0
- package/dist/src/types.d.ts +217 -0
- package/dist/src/utils/Animation.d.ts +22 -0
- package/dist/src/utils/ColorScale.d.ts +19 -0
- package/dist/src/utils/DataSchema.d.ts +25 -0
- package/dist/src/utils/DataScope.d.ts +23 -0
- package/dist/src/utils/RootClose.d.ts +4 -0
- package/dist/src/utils/SimpleMap.d.ts +8 -0
- package/dist/src/utils/api.d.ts +27 -0
- package/dist/src/utils/attachmentAdpator.d.ts +7 -0
- package/dist/src/utils/autobind.d.ts +7 -0
- package/dist/src/utils/columnsSplit.d.ts +1 -0
- package/dist/src/utils/dataMapping.d.ts +3 -0
- package/dist/src/utils/date.d.ts +4 -0
- package/dist/src/utils/debug.d.ts +26 -0
- package/dist/src/utils/dom.d.ts +13 -0
- package/dist/src/utils/errors.d.ts +6 -0
- package/dist/src/utils/escapeHtml.d.ts +1 -0
- package/dist/src/utils/filter-schema.d.ts +12 -0
- package/dist/src/utils/filter.d.ts +1 -0
- package/dist/src/utils/formatDuration.d.ts +1 -0
- package/dist/src/utils/formula.d.ts +16 -0
- package/dist/src/utils/getVariable.d.ts +3 -0
- package/dist/src/utils/grammar.d.ts +4 -0
- package/dist/src/utils/handleAction.d.ts +6 -0
- package/dist/src/utils/helper.d.ts +286 -0
- package/dist/src/utils/icon.d.ts +12 -0
- package/dist/src/utils/image.d.ts +17 -0
- package/dist/src/utils/index.d.ts +12 -0
- package/dist/src/utils/isPureVariable.d.ts +1 -0
- package/dist/src/utils/json-schema-2-amis-schema.d.ts +6 -0
- package/dist/src/utils/keyToPath.d.ts +6 -0
- package/dist/src/utils/makeSorter.d.ts +1 -0
- package/dist/src/utils/markdown.d.ts +5 -0
- package/dist/src/utils/normalizeLink.d.ts +1 -0
- package/dist/src/utils/normalizeOptions.d.ts +7 -0
- package/dist/src/utils/object.d.ts +15 -0
- package/dist/src/utils/offset.d.ts +14 -0
- package/dist/src/utils/offsetParent.d.ts +4 -0
- package/dist/src/utils/optionValueCompare.d.ts +3 -0
- package/dist/src/utils/position.d.ts +15 -0
- package/dist/src/utils/prettyBytes.d.ts +1 -0
- package/dist/src/utils/renderer-event.d.ts +44 -0
- package/dist/src/utils/replaceText.d.ts +6 -0
- package/dist/src/utils/resize-sensor.d.ts +6 -0
- package/dist/src/utils/resolveVariable.d.ts +1 -0
- package/dist/src/utils/resolveVariableAndFilter.d.ts +1 -0
- package/dist/src/utils/scrollPosition.d.ts +6 -0
- package/dist/src/utils/string2regExp.d.ts +1 -0
- package/dist/src/utils/stripNumber.d.ts +1 -0
- package/dist/src/utils/style.d.ts +10 -0
- package/dist/src/utils/tokenize.d.ts +1 -0
- package/dist/src/utils/tpl-builtin.d.ts +18 -0
- package/dist/src/utils/tpl-lodash.d.ts +4 -0
- package/dist/src/utils/tpl.d.ts +11 -0
- package/dist/src/utils/validations.d.ts +39 -0
- package/dist/store/app.js +190 -0
- package/dist/store/combo.js +154 -0
- package/dist/store/crud.js +413 -0
- package/dist/store/form.js +579 -0
- package/dist/store/formItem.js +846 -0
- package/dist/store/iRenderer.js +189 -0
- package/dist/store/index.js +103 -0
- package/dist/store/list.js +248 -0
- package/dist/store/manager.js +56 -0
- package/dist/store/modal.js +54 -0
- package/dist/store/node.js +93 -0
- package/dist/store/pagination.js +60 -0
- package/dist/store/root.js +45 -0
- package/dist/store/service.js +415 -0
- package/dist/store/table-v2.js +471 -0
- package/dist/store/table.js +1105 -0
- package/dist/theme.js +93 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/Animation.js +290 -0
- package/dist/utils/DataSchema.js +120 -0
- package/dist/utils/DataScope.js +151 -0
- package/dist/utils/SimpleMap.js +46 -0
- package/dist/utils/api.js +555 -0
- package/dist/utils/autobind.js +94 -0
- package/dist/utils/dataMapping.js +136 -0
- package/dist/utils/date.js +90 -0
- package/dist/utils/debug.js +343 -0
- package/dist/utils/errors.js +23 -0
- package/dist/utils/escapeHtml.js +24 -0
- package/dist/utils/filter-schema.js +75 -0
- package/dist/utils/filter.js +481 -0
- package/dist/utils/formatDuration.js +27 -0
- package/dist/utils/formula.js +165 -0
- package/dist/utils/getVariable.js +29 -0
- package/dist/utils/grammar.js +54 -0
- package/dist/utils/helper.js +1283 -0
- package/dist/utils/isPureVariable.js +16 -0
- package/dist/utils/keyToPath.js +34 -0
- package/dist/utils/makeSorter.js +30 -0
- package/dist/utils/normalizeLink.js +47 -0
- package/dist/utils/normalizeOptions.js +92 -0
- package/dist/utils/object.js +156 -0
- package/dist/utils/offset.js +36 -0
- package/dist/utils/offsetParent.js +27 -0
- package/dist/utils/optionValueCompare.js +25 -0
- package/dist/utils/position.js +50 -0
- package/dist/utils/prettyBytes.js +28 -0
- package/dist/utils/renderer-event.js +131 -0
- package/dist/utils/replaceText.js +35 -0
- package/dist/utils/resize-sensor.js +177 -0
- package/dist/utils/resolveVariable.js +39 -0
- package/dist/utils/resolveVariableAndFilter.js +37 -0
- package/dist/utils/string2regExp.js +18 -0
- package/dist/utils/stripNumber.js +20 -0
- package/dist/utils/tokenize.js +33 -0
- package/dist/utils/tpl-builtin.js +71 -0
- package/dist/utils/tpl-lodash.js +71 -0
- package/dist/utils/tpl.js +140 -0
- package/dist/utils/validations.js +377 -0
- package/package.json +121 -0
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import hoistNonReactStatic from 'hoist-non-react-statics';
|
|
3
|
+
import { IFormItemStore, IFormStore } from '../store/form';
|
|
4
|
+
import { RendererProps, TestFunc, RendererConfig } from '../factory';
|
|
5
|
+
import { FormHorizontal, FormSchema, FormSchemaHorizontal } from './Form';
|
|
6
|
+
import { Schema } from '../types';
|
|
7
|
+
import { BaseSchema, SchemaApi, SchemaClassName, SchemaExpression, SchemaObject, SchemaRemark, SchemaType } from '../schema';
|
|
8
|
+
export declare type LabelAlign = 'right' | 'left';
|
|
9
|
+
export declare type FormControlSchemaAlias = SchemaObject;
|
|
10
|
+
export interface FormBaseControl extends Omit<BaseSchema, 'type'> {
|
|
11
|
+
/**
|
|
12
|
+
* 表单项类型
|
|
13
|
+
*/
|
|
14
|
+
type: SchemaType;
|
|
15
|
+
/**
|
|
16
|
+
* 表单项大小
|
|
17
|
+
*/
|
|
18
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
19
|
+
/**
|
|
20
|
+
* 描述标题
|
|
21
|
+
*/
|
|
22
|
+
label?: string | false;
|
|
23
|
+
/**
|
|
24
|
+
* 描述标题
|
|
25
|
+
*/
|
|
26
|
+
labelAlign?: LabelAlign;
|
|
27
|
+
/**
|
|
28
|
+
* 配置 label className
|
|
29
|
+
*/
|
|
30
|
+
labelClassName?: SchemaClassName;
|
|
31
|
+
/**
|
|
32
|
+
* 字段名,表单提交时的 key,支持多层级,用.连接,如: a.b.c
|
|
33
|
+
*/
|
|
34
|
+
name?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
37
|
+
*/
|
|
38
|
+
remark?: SchemaRemark;
|
|
39
|
+
/**
|
|
40
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
41
|
+
*/
|
|
42
|
+
labelRemark?: SchemaRemark;
|
|
43
|
+
/**
|
|
44
|
+
* 输入提示,聚焦的时候显示
|
|
45
|
+
*/
|
|
46
|
+
hint?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 当修改完的时候是否提交表单。
|
|
49
|
+
*/
|
|
50
|
+
submitOnChange?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 是否只读
|
|
53
|
+
*/
|
|
54
|
+
readOnly?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 只读条件
|
|
57
|
+
*/
|
|
58
|
+
readOnlyOn?: SchemaExpression;
|
|
59
|
+
/**
|
|
60
|
+
* 不设置时,当表单提交过后表单项每次修改都会触发重新验证,
|
|
61
|
+
* 如果设置了,则由此配置项来决定要不要每次修改都触发验证。
|
|
62
|
+
*/
|
|
63
|
+
validateOnChange?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 描述内容,支持 Html 片段。
|
|
66
|
+
*/
|
|
67
|
+
description?: string;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated 用 description 代替
|
|
70
|
+
*/
|
|
71
|
+
desc?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 配置描述上的 className
|
|
74
|
+
*/
|
|
75
|
+
descriptionClassName?: SchemaClassName;
|
|
76
|
+
/**
|
|
77
|
+
* 配置当前表单项展示模式
|
|
78
|
+
*/
|
|
79
|
+
mode?: 'normal' | 'inline' | 'horizontal';
|
|
80
|
+
/**
|
|
81
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
82
|
+
*/
|
|
83
|
+
horizontal?: FormSchemaHorizontal;
|
|
84
|
+
/**
|
|
85
|
+
* 表单 control 是否为 inline 模式。
|
|
86
|
+
*/
|
|
87
|
+
inline?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 配置 input className
|
|
90
|
+
*/
|
|
91
|
+
inputClassName?: SchemaClassName;
|
|
92
|
+
/**
|
|
93
|
+
* 占位符
|
|
94
|
+
*/
|
|
95
|
+
placeholder?: string;
|
|
96
|
+
/**
|
|
97
|
+
* 是否为必填
|
|
98
|
+
*/
|
|
99
|
+
required?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 验证失败的提示信息
|
|
102
|
+
*/
|
|
103
|
+
validationErrors?: {
|
|
104
|
+
isAlpha?: string;
|
|
105
|
+
isAlphanumeric?: string;
|
|
106
|
+
isEmail?: string;
|
|
107
|
+
isFloat?: string;
|
|
108
|
+
isInt?: string;
|
|
109
|
+
isJson?: string;
|
|
110
|
+
isLength?: string;
|
|
111
|
+
isNumeric?: string;
|
|
112
|
+
isRequired?: string;
|
|
113
|
+
isUrl?: string;
|
|
114
|
+
matchRegexp?: string;
|
|
115
|
+
matchRegexp2?: string;
|
|
116
|
+
matchRegexp3?: string;
|
|
117
|
+
matchRegexp4?: string;
|
|
118
|
+
matchRegexp5?: string;
|
|
119
|
+
maxLength?: string;
|
|
120
|
+
maximum?: string;
|
|
121
|
+
minLength?: string;
|
|
122
|
+
minimum?: string;
|
|
123
|
+
[propName: string]: any;
|
|
124
|
+
};
|
|
125
|
+
validations?: string | {
|
|
126
|
+
/**
|
|
127
|
+
* 是否是字母
|
|
128
|
+
*/
|
|
129
|
+
isAlpha?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 是否为字母数字
|
|
132
|
+
*/
|
|
133
|
+
isAlphanumeric?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* 是否为邮箱地址
|
|
136
|
+
*/
|
|
137
|
+
isEmail?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* 是否为浮点型
|
|
140
|
+
*/
|
|
141
|
+
isFloat?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* 是否为整型
|
|
144
|
+
*/
|
|
145
|
+
isInt?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* 是否为 json
|
|
148
|
+
*/
|
|
149
|
+
isJson?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* 长度等于指定值
|
|
152
|
+
*/
|
|
153
|
+
isLength?: number;
|
|
154
|
+
/**
|
|
155
|
+
* 是否为数字
|
|
156
|
+
*/
|
|
157
|
+
isNumeric?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 是否为必填
|
|
160
|
+
*/
|
|
161
|
+
isRequired?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* 是否为 URL 地址
|
|
164
|
+
*/
|
|
165
|
+
isUrl?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* 内容命中指定正则
|
|
168
|
+
*/
|
|
169
|
+
matchRegexp?: string;
|
|
170
|
+
/**
|
|
171
|
+
* 内容命中指定正则
|
|
172
|
+
*/
|
|
173
|
+
matchRegexp1?: string;
|
|
174
|
+
/**
|
|
175
|
+
* 内容命中指定正则
|
|
176
|
+
*/
|
|
177
|
+
matchRegexp2?: string;
|
|
178
|
+
/**
|
|
179
|
+
* 内容命中指定正则
|
|
180
|
+
*/
|
|
181
|
+
matchRegexp3?: string;
|
|
182
|
+
/**
|
|
183
|
+
* 内容命中指定正则
|
|
184
|
+
*/
|
|
185
|
+
matchRegexp4?: string;
|
|
186
|
+
/**
|
|
187
|
+
* 内容命中指定正则
|
|
188
|
+
*/
|
|
189
|
+
matchRegexp5?: string;
|
|
190
|
+
/**
|
|
191
|
+
* 最大长度为指定值
|
|
192
|
+
*/
|
|
193
|
+
maxLength?: number;
|
|
194
|
+
/**
|
|
195
|
+
* 最大值为指定值
|
|
196
|
+
*/
|
|
197
|
+
maximum?: number;
|
|
198
|
+
/**
|
|
199
|
+
* 最小长度为指定值
|
|
200
|
+
*/
|
|
201
|
+
minLength?: number;
|
|
202
|
+
/**
|
|
203
|
+
* 最小值为指定值
|
|
204
|
+
*/
|
|
205
|
+
minimum?: number;
|
|
206
|
+
[propName: string]: any;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* 默认值,切记只能是静态值,不支持取变量,跟数据关联是通过设置 name 属性来实现的。
|
|
210
|
+
*/
|
|
211
|
+
value?: any;
|
|
212
|
+
/**
|
|
213
|
+
* 表单项隐藏时,是否在当前 Form 中删除掉该表单项值。注意同名的未隐藏的表单项值也会删掉
|
|
214
|
+
*/
|
|
215
|
+
clearValueOnHidden?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* 远端校验表单项接口
|
|
218
|
+
*/
|
|
219
|
+
validateApi?: SchemaApi;
|
|
220
|
+
}
|
|
221
|
+
export interface FormItemBasicConfig extends Partial<RendererConfig> {
|
|
222
|
+
type?: string;
|
|
223
|
+
wrap?: boolean;
|
|
224
|
+
renderLabel?: boolean;
|
|
225
|
+
renderDescription?: boolean;
|
|
226
|
+
test?: RegExp | TestFunc;
|
|
227
|
+
storeType?: string;
|
|
228
|
+
validations?: string;
|
|
229
|
+
strictMode?: boolean;
|
|
230
|
+
shouldComponentUpdate?: (props: any, prevProps: any) => boolean;
|
|
231
|
+
descriptionClassName?: string;
|
|
232
|
+
storeExtendsData?: boolean;
|
|
233
|
+
sizeMutable?: boolean;
|
|
234
|
+
weight?: number;
|
|
235
|
+
extendsData?: boolean;
|
|
236
|
+
showErrorMsg?: boolean;
|
|
237
|
+
validate?: (values: any, value: any) => string | boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface FormItemProps extends RendererProps {
|
|
240
|
+
name?: string;
|
|
241
|
+
formStore?: IFormStore;
|
|
242
|
+
formItem?: IFormItemStore;
|
|
243
|
+
formInited: boolean;
|
|
244
|
+
formMode: 'normal' | 'horizontal' | 'inline' | 'row' | 'default';
|
|
245
|
+
formHorizontal: FormHorizontal;
|
|
246
|
+
formLabelAlign: LabelAlign;
|
|
247
|
+
defaultSize?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
248
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
249
|
+
labelAlign?: LabelAlign;
|
|
250
|
+
disabled?: boolean;
|
|
251
|
+
btnDisabled: boolean;
|
|
252
|
+
defaultValue: any;
|
|
253
|
+
value?: any;
|
|
254
|
+
prinstine: any;
|
|
255
|
+
setPrinstineValue: (value: any) => void;
|
|
256
|
+
onChange: (value: any, submitOnChange?: boolean, changeImmediately?: boolean) => void;
|
|
257
|
+
onBulkChange?: (values: {
|
|
258
|
+
[propName: string]: any;
|
|
259
|
+
}, submitOnChange?: boolean) => void;
|
|
260
|
+
addHook: (fn: Function, mode?: 'validate' | 'init' | 'flush') => () => void;
|
|
261
|
+
removeHook: (fn: Function, mode?: 'validate' | 'init' | 'flush') => void;
|
|
262
|
+
renderFormItems: (schema: Partial<FormSchema>, region: string, props: any) => JSX.Element;
|
|
263
|
+
onFocus: (e: any) => void;
|
|
264
|
+
onBlur: (e: any) => void;
|
|
265
|
+
formItemValue: any;
|
|
266
|
+
getValue: () => any;
|
|
267
|
+
setValue: (value: any, key: string) => void;
|
|
268
|
+
inputClassName?: string;
|
|
269
|
+
renderControl?: (props: FormControlProps) => JSX.Element;
|
|
270
|
+
inputOnly?: boolean;
|
|
271
|
+
renderLabel?: boolean;
|
|
272
|
+
renderDescription?: boolean;
|
|
273
|
+
sizeMutable?: boolean;
|
|
274
|
+
wrap?: boolean;
|
|
275
|
+
hint?: string;
|
|
276
|
+
description?: string;
|
|
277
|
+
descriptionClassName?: string;
|
|
278
|
+
errors?: {
|
|
279
|
+
[propName: string]: string;
|
|
280
|
+
};
|
|
281
|
+
error?: string;
|
|
282
|
+
showErrorMsg?: boolean;
|
|
283
|
+
}
|
|
284
|
+
export declare type FormControlProps = RendererProps & {
|
|
285
|
+
onOpenDialog: (schema: Schema, data: any) => Promise<any>;
|
|
286
|
+
} & Exclude<FormItemProps, 'inputClassName' | 'renderControl' | 'defaultSize' | 'size' | 'error' | 'errors' | 'hint' | 'descriptionClassName' | 'inputOnly' | 'renderLabel' | 'renderDescription' | 'sizeMutable' | 'wrap'>;
|
|
287
|
+
export declare type FormItemComponent = React.ComponentType<FormItemProps>;
|
|
288
|
+
export declare type FormControlComponent = React.ComponentType<FormControlProps>;
|
|
289
|
+
export interface FormItemConfig extends FormItemBasicConfig {
|
|
290
|
+
component: FormControlComponent;
|
|
291
|
+
}
|
|
292
|
+
export declare class FormItemWrap extends React.Component<FormItemProps> {
|
|
293
|
+
reaction: Array<() => void>;
|
|
294
|
+
lastSearchTerm: any;
|
|
295
|
+
constructor(props: FormItemProps);
|
|
296
|
+
componentWillUnmount(): void;
|
|
297
|
+
handleFocus(e: any): void;
|
|
298
|
+
handleBlur(e: any): void;
|
|
299
|
+
syncAutoFill: import("lodash").DebouncedFunc<(term: any) => void>;
|
|
300
|
+
handleOpenDialog(schema: Schema, data: any): Promise<unknown>;
|
|
301
|
+
handleDialogConfirm([values]: Array<any>): void;
|
|
302
|
+
handleDialogClose(confirmed?: boolean): void;
|
|
303
|
+
renderControl(): JSX.Element | null;
|
|
304
|
+
/**
|
|
305
|
+
* 布局扩充点,可以自己扩充表单项的布局方式
|
|
306
|
+
*/
|
|
307
|
+
static layoutRenderers: {
|
|
308
|
+
[propsName: string]: (props: FormItemProps, renderControl: () => JSX.Element | null) => JSX.Element;
|
|
309
|
+
};
|
|
310
|
+
render(): JSX.Element | null;
|
|
311
|
+
}
|
|
312
|
+
export declare const detectProps: string[];
|
|
313
|
+
export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (Control: FormControlComponent) => {
|
|
314
|
+
new (props: Omit<any, "rootStore"> | Readonly<Omit<any, "rootStore">>): {
|
|
315
|
+
render(): JSX.Element;
|
|
316
|
+
context: any;
|
|
317
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, "rootStore">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
318
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
319
|
+
readonly props: Readonly<Omit<any, "rootStore">> & Readonly<{
|
|
320
|
+
children?: React.ReactNode;
|
|
321
|
+
}>;
|
|
322
|
+
state: Readonly<{}>;
|
|
323
|
+
refs: {
|
|
324
|
+
[key: string]: React.ReactInstance;
|
|
325
|
+
};
|
|
326
|
+
componentDidMount?(): void;
|
|
327
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
328
|
+
componentWillUnmount?(): void;
|
|
329
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
330
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>): any;
|
|
331
|
+
componentDidUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
332
|
+
componentWillMount?(): void;
|
|
333
|
+
UNSAFE_componentWillMount?(): void;
|
|
334
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
335
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
336
|
+
componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
337
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
338
|
+
};
|
|
339
|
+
new (props: Omit<any, "rootStore">, context: any): {
|
|
340
|
+
render(): JSX.Element;
|
|
341
|
+
context: any;
|
|
342
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, "rootStore">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
343
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
344
|
+
readonly props: Readonly<Omit<any, "rootStore">> & Readonly<{
|
|
345
|
+
children?: React.ReactNode;
|
|
346
|
+
}>;
|
|
347
|
+
state: Readonly<{}>;
|
|
348
|
+
refs: {
|
|
349
|
+
[key: string]: React.ReactInstance;
|
|
350
|
+
};
|
|
351
|
+
componentDidMount?(): void;
|
|
352
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
353
|
+
componentWillUnmount?(): void;
|
|
354
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
355
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>): any;
|
|
356
|
+
componentDidUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
357
|
+
componentWillMount?(): void;
|
|
358
|
+
UNSAFE_componentWillMount?(): void;
|
|
359
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
360
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
361
|
+
componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
362
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
363
|
+
};
|
|
364
|
+
displayName: string;
|
|
365
|
+
contextType: React.Context<{
|
|
366
|
+
storeType: string;
|
|
367
|
+
visibleState: any;
|
|
368
|
+
disableState: any;
|
|
369
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
370
|
+
readonly fetcher: any;
|
|
371
|
+
readonly notify: any;
|
|
372
|
+
readonly isCancel: (value: any) => boolean; /**
|
|
373
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
374
|
+
*/
|
|
375
|
+
readonly __: import("..").TranslateFn<any>;
|
|
376
|
+
getStoreById(id: string): {
|
|
377
|
+
id: string;
|
|
378
|
+
path: string;
|
|
379
|
+
storeType: string;
|
|
380
|
+
disposed: boolean;
|
|
381
|
+
parentId: string;
|
|
382
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
383
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
384
|
+
readonly parentStore: any;
|
|
385
|
+
readonly __: any;
|
|
386
|
+
readonly hasChildren: boolean;
|
|
387
|
+
readonly children: any[];
|
|
388
|
+
} & {
|
|
389
|
+
/**
|
|
390
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
391
|
+
*/
|
|
392
|
+
onChildStoreDispose(child: any): void;
|
|
393
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
394
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
395
|
+
*/
|
|
396
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
397
|
+
addChildId: (id: string) => void;
|
|
398
|
+
removeChildId: (id: string) => void;
|
|
399
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
400
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
401
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
402
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
403
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
404
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
405
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
406
|
+
}, {
|
|
407
|
+
readonly parentStore: any;
|
|
408
|
+
readonly __: any;
|
|
409
|
+
readonly hasChildren: boolean;
|
|
410
|
+
readonly children: any[];
|
|
411
|
+
} & {
|
|
412
|
+
/**
|
|
413
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
414
|
+
*/
|
|
415
|
+
onChildStoreDispose(child: any): void;
|
|
416
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
417
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
418
|
+
*/
|
|
419
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
420
|
+
addChildId: (id: string) => void;
|
|
421
|
+
removeChildId: (id: string) => void;
|
|
422
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
423
|
+
readonly stores: {
|
|
424
|
+
[propName: string]: {
|
|
425
|
+
id: string;
|
|
426
|
+
path: string;
|
|
427
|
+
storeType: string;
|
|
428
|
+
disposed: boolean;
|
|
429
|
+
parentId: string;
|
|
430
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
431
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
432
|
+
readonly parentStore: any;
|
|
433
|
+
readonly __: any;
|
|
434
|
+
readonly hasChildren: boolean;
|
|
435
|
+
readonly children: any[];
|
|
436
|
+
} & {
|
|
437
|
+
/**
|
|
438
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
439
|
+
*/
|
|
440
|
+
onChildStoreDispose(child: any): void;
|
|
441
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
442
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
443
|
+
*/
|
|
444
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
445
|
+
addChildId: (id: string) => void;
|
|
446
|
+
removeChildId: (id: string) => void;
|
|
447
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
448
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
449
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
450
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
451
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
452
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
453
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
454
|
+
}, {
|
|
455
|
+
readonly parentStore: any;
|
|
456
|
+
readonly __: any;
|
|
457
|
+
readonly hasChildren: boolean;
|
|
458
|
+
readonly children: any[];
|
|
459
|
+
} & {
|
|
460
|
+
/**
|
|
461
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
462
|
+
*/
|
|
463
|
+
onChildStoreDispose(child: any): void;
|
|
464
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
465
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
466
|
+
*/
|
|
467
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
468
|
+
addChildId: (id: string) => void;
|
|
469
|
+
removeChildId: (id: string) => void;
|
|
470
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
471
|
+
};
|
|
472
|
+
} & {
|
|
473
|
+
addStore(store: {
|
|
474
|
+
[propName: string]: any;
|
|
475
|
+
storeType: string;
|
|
476
|
+
id: string;
|
|
477
|
+
path: string;
|
|
478
|
+
parentId?: string | undefined;
|
|
479
|
+
}): {
|
|
480
|
+
id: string;
|
|
481
|
+
path: string;
|
|
482
|
+
storeType: string;
|
|
483
|
+
disposed: boolean;
|
|
484
|
+
parentId: string;
|
|
485
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
486
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
487
|
+
readonly parentStore: any;
|
|
488
|
+
readonly __: any;
|
|
489
|
+
readonly hasChildren: boolean;
|
|
490
|
+
readonly children: any[];
|
|
491
|
+
} & {
|
|
492
|
+
/**
|
|
493
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
494
|
+
*/
|
|
495
|
+
onChildStoreDispose(child: any): void;
|
|
496
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
497
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
498
|
+
*/
|
|
499
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
500
|
+
addChildId: (id: string) => void;
|
|
501
|
+
removeChildId: (id: string) => void;
|
|
502
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
503
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
504
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
505
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
506
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
507
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
508
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
509
|
+
}, {
|
|
510
|
+
readonly parentStore: any;
|
|
511
|
+
readonly __: any;
|
|
512
|
+
readonly hasChildren: boolean;
|
|
513
|
+
readonly children: any[];
|
|
514
|
+
} & {
|
|
515
|
+
/**
|
|
516
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
517
|
+
*/
|
|
518
|
+
onChildStoreDispose(child: any): void;
|
|
519
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
520
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
521
|
+
*/
|
|
522
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
523
|
+
addChildId: (id: string) => void;
|
|
524
|
+
removeChildId: (id: string) => void;
|
|
525
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
526
|
+
removeStore(store: {
|
|
527
|
+
id: string;
|
|
528
|
+
path: string;
|
|
529
|
+
storeType: string;
|
|
530
|
+
disposed: boolean;
|
|
531
|
+
parentId: string;
|
|
532
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
533
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
534
|
+
readonly parentStore: any;
|
|
535
|
+
readonly __: any;
|
|
536
|
+
readonly hasChildren: boolean;
|
|
537
|
+
readonly children: any[];
|
|
538
|
+
} & {
|
|
539
|
+
/**
|
|
540
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
541
|
+
*/
|
|
542
|
+
onChildStoreDispose(child: any): void;
|
|
543
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
544
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
545
|
+
*/
|
|
546
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
547
|
+
addChildId: (id: string) => void;
|
|
548
|
+
removeChildId: (id: string) => void;
|
|
549
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
550
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
551
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
552
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
553
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
554
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
555
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
556
|
+
}, {
|
|
557
|
+
readonly parentStore: any;
|
|
558
|
+
readonly __: any;
|
|
559
|
+
readonly hasChildren: boolean;
|
|
560
|
+
readonly children: any[];
|
|
561
|
+
} & {
|
|
562
|
+
/**
|
|
563
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
564
|
+
*/
|
|
565
|
+
onChildStoreDispose(child: any): void;
|
|
566
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
567
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
568
|
+
*/
|
|
569
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
570
|
+
addChildId: (id: string) => void;
|
|
571
|
+
removeChildId: (id: string) => void;
|
|
572
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
573
|
+
setVisible(id: string, value: boolean): void;
|
|
574
|
+
setDisable(id: string, value: boolean): void;
|
|
575
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
576
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
577
|
+
} & {
|
|
578
|
+
visibleState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
579
|
+
disableState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
|
|
580
|
+
}, {
|
|
581
|
+
readonly fetcher: any;
|
|
582
|
+
readonly notify: any;
|
|
583
|
+
readonly isCancel: (value: any) => boolean; /**
|
|
584
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
585
|
+
*/
|
|
586
|
+
readonly __: import("..").TranslateFn<any>;
|
|
587
|
+
getStoreById(id: string): {
|
|
588
|
+
id: string;
|
|
589
|
+
path: string;
|
|
590
|
+
storeType: string;
|
|
591
|
+
disposed: boolean;
|
|
592
|
+
parentId: string;
|
|
593
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
594
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
595
|
+
readonly parentStore: any;
|
|
596
|
+
readonly __: any;
|
|
597
|
+
readonly hasChildren: boolean;
|
|
598
|
+
readonly children: any[];
|
|
599
|
+
} & {
|
|
600
|
+
/**
|
|
601
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
602
|
+
*/
|
|
603
|
+
onChildStoreDispose(child: any): void;
|
|
604
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
605
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
606
|
+
*/
|
|
607
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
608
|
+
addChildId: (id: string) => void;
|
|
609
|
+
removeChildId: (id: string) => void;
|
|
610
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
611
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
612
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
613
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
614
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
615
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
616
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
617
|
+
}, {
|
|
618
|
+
readonly parentStore: any;
|
|
619
|
+
readonly __: any;
|
|
620
|
+
readonly hasChildren: boolean;
|
|
621
|
+
readonly children: any[];
|
|
622
|
+
} & {
|
|
623
|
+
/**
|
|
624
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
625
|
+
*/
|
|
626
|
+
onChildStoreDispose(child: any): void;
|
|
627
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
628
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
629
|
+
*/
|
|
630
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
631
|
+
addChildId: (id: string) => void;
|
|
632
|
+
removeChildId: (id: string) => void;
|
|
633
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
634
|
+
readonly stores: {
|
|
635
|
+
[propName: string]: {
|
|
636
|
+
id: string;
|
|
637
|
+
path: string;
|
|
638
|
+
storeType: string;
|
|
639
|
+
disposed: boolean;
|
|
640
|
+
parentId: string;
|
|
641
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
642
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
643
|
+
readonly parentStore: any;
|
|
644
|
+
readonly __: any;
|
|
645
|
+
readonly hasChildren: boolean;
|
|
646
|
+
readonly children: any[];
|
|
647
|
+
} & {
|
|
648
|
+
/**
|
|
649
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
650
|
+
*/
|
|
651
|
+
onChildStoreDispose(child: any): void;
|
|
652
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
653
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
654
|
+
*/
|
|
655
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
656
|
+
addChildId: (id: string) => void;
|
|
657
|
+
removeChildId: (id: string) => void;
|
|
658
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
659
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
660
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
661
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
662
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
663
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
664
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
665
|
+
}, {
|
|
666
|
+
readonly parentStore: any;
|
|
667
|
+
readonly __: any;
|
|
668
|
+
readonly hasChildren: boolean;
|
|
669
|
+
readonly children: any[];
|
|
670
|
+
} & {
|
|
671
|
+
/**
|
|
672
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
673
|
+
*/
|
|
674
|
+
onChildStoreDispose(child: any): void;
|
|
675
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
676
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
677
|
+
*/
|
|
678
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
679
|
+
addChildId: (id: string) => void;
|
|
680
|
+
removeChildId: (id: string) => void;
|
|
681
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
682
|
+
};
|
|
683
|
+
} & {
|
|
684
|
+
addStore(store: {
|
|
685
|
+
[propName: string]: any;
|
|
686
|
+
storeType: string;
|
|
687
|
+
id: string;
|
|
688
|
+
path: string;
|
|
689
|
+
parentId?: string | undefined;
|
|
690
|
+
}): {
|
|
691
|
+
id: string;
|
|
692
|
+
path: string;
|
|
693
|
+
storeType: string;
|
|
694
|
+
disposed: boolean;
|
|
695
|
+
parentId: string;
|
|
696
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
697
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
698
|
+
readonly parentStore: any;
|
|
699
|
+
readonly __: any;
|
|
700
|
+
readonly hasChildren: boolean;
|
|
701
|
+
readonly children: any[];
|
|
702
|
+
} & {
|
|
703
|
+
/**
|
|
704
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
705
|
+
*/
|
|
706
|
+
onChildStoreDispose(child: any): void;
|
|
707
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
708
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
709
|
+
*/
|
|
710
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
711
|
+
addChildId: (id: string) => void;
|
|
712
|
+
removeChildId: (id: string) => void;
|
|
713
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
714
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
715
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
716
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
717
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
718
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
719
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
720
|
+
}, {
|
|
721
|
+
readonly parentStore: any;
|
|
722
|
+
readonly __: any;
|
|
723
|
+
readonly hasChildren: boolean;
|
|
724
|
+
readonly children: any[];
|
|
725
|
+
} & {
|
|
726
|
+
/**
|
|
727
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
728
|
+
*/
|
|
729
|
+
onChildStoreDispose(child: any): void;
|
|
730
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
731
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
732
|
+
*/
|
|
733
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
734
|
+
addChildId: (id: string) => void;
|
|
735
|
+
removeChildId: (id: string) => void;
|
|
736
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
737
|
+
removeStore(store: {
|
|
738
|
+
id: string;
|
|
739
|
+
path: string;
|
|
740
|
+
storeType: string;
|
|
741
|
+
disposed: boolean;
|
|
742
|
+
parentId: string;
|
|
743
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
744
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
745
|
+
readonly parentStore: any;
|
|
746
|
+
readonly __: any;
|
|
747
|
+
readonly hasChildren: boolean;
|
|
748
|
+
readonly children: any[];
|
|
749
|
+
} & {
|
|
750
|
+
/**
|
|
751
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
752
|
+
*/
|
|
753
|
+
onChildStoreDispose(child: any): void;
|
|
754
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
755
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
756
|
+
*/
|
|
757
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
758
|
+
addChildId: (id: string) => void;
|
|
759
|
+
removeChildId: (id: string) => void;
|
|
760
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
761
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
762
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
763
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
764
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
765
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
766
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
767
|
+
}, {
|
|
768
|
+
readonly parentStore: any;
|
|
769
|
+
readonly __: any;
|
|
770
|
+
readonly hasChildren: boolean;
|
|
771
|
+
readonly children: any[];
|
|
772
|
+
} & {
|
|
773
|
+
/**
|
|
774
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容, 这个小图标跟 label 在一起
|
|
775
|
+
*/
|
|
776
|
+
onChildStoreDispose(child: any): void;
|
|
777
|
+
syncProps(props: any, prevProps: any, list?: string[]): void; /**
|
|
778
|
+
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
779
|
+
*/
|
|
780
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
781
|
+
addChildId: (id: string) => void;
|
|
782
|
+
removeChildId: (id: string) => void;
|
|
783
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
784
|
+
setVisible(id: string, value: boolean): void;
|
|
785
|
+
setDisable(id: string, value: boolean): void;
|
|
786
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
787
|
+
ComposedComponent: React.ComponentType<any>;
|
|
788
|
+
} & hoistNonReactStatic.NonReactStatics<any, {}> & {
|
|
789
|
+
ComposedComponent: any;
|
|
790
|
+
} & {
|
|
791
|
+
ComposedComponent: any;
|
|
792
|
+
};
|
|
793
|
+
export declare function registerFormItem(config: FormItemConfig): RendererConfig;
|
|
794
|
+
export declare function FormItem(config: FormItemBasicConfig): (component: FormControlComponent) => any;
|
|
795
|
+
export default FormItem;
|