amis-core 6.0.0 → 6.1.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.
Files changed (293) hide show
  1. package/esm/Root.js +2 -2
  2. package/esm/RootRenderer.js +4 -3
  3. package/esm/SchemaRenderer.js +5 -2
  4. package/esm/Scoped.d.ts +6 -0
  5. package/esm/Scoped.js +45 -8
  6. package/esm/StatusScoped.js +2 -2
  7. package/esm/WithRootStore.js +2 -2
  8. package/esm/WithStore.js +4 -6
  9. package/esm/actions/Action.js +2 -2
  10. package/esm/actions/AjaxAction.js +2 -2
  11. package/esm/actions/BreakAction.js +2 -2
  12. package/esm/actions/BroadcastAction.js +2 -2
  13. package/esm/actions/CmptAction.js +2 -2
  14. package/esm/actions/ContinueAction.js +2 -2
  15. package/esm/actions/CopyAction.js +2 -2
  16. package/esm/actions/CustomAction.js +3 -3
  17. package/esm/actions/DialogAction.js +2 -2
  18. package/esm/actions/DrawerAction.js +2 -2
  19. package/esm/actions/EmailAction.js +2 -2
  20. package/esm/actions/LinkAction.js +10 -5
  21. package/esm/actions/LoopAction.js +2 -2
  22. package/esm/actions/PageAction.js +2 -2
  23. package/esm/actions/ParallelAction.js +2 -2
  24. package/esm/actions/StatusAction.js +2 -2
  25. package/esm/actions/SwitchAction.js +2 -2
  26. package/esm/actions/ToastAction.js +2 -2
  27. package/esm/components/CustomStyle.d.ts +1 -2
  28. package/esm/components/CustomStyle.js +20 -7
  29. package/esm/components/ErrorBoundary.js +2 -2
  30. package/esm/components/LazyComponent.js +2 -2
  31. package/esm/components/Overlay.js +11 -9
  32. package/esm/components/PopOver.js +7 -5
  33. package/esm/env.d.ts +4 -0
  34. package/esm/env.js +2 -2
  35. package/esm/envOverwrite.js +2 -2
  36. package/esm/factory.js +15 -2
  37. package/esm/index.d.ts +2 -2
  38. package/esm/index.js +13 -8
  39. package/esm/locale.js +2 -2
  40. package/esm/polyfills.js +2 -2
  41. package/esm/renderers/Form.d.ts +4 -3
  42. package/esm/renderers/Form.js +94 -42
  43. package/esm/renderers/Item.d.ts +1 -0
  44. package/esm/renderers/Item.js +15 -16
  45. package/esm/renderers/Options.d.ts +5 -0
  46. package/esm/renderers/Options.js +27 -10
  47. package/esm/renderers/Placeholder.js +2 -2
  48. package/esm/renderers/builtin.js +2 -2
  49. package/esm/renderers/register.js +2 -2
  50. package/esm/renderers/wrapControl.js +37 -29
  51. package/esm/store/app.js +3 -3
  52. package/esm/store/combo.d.ts +48 -24
  53. package/esm/store/combo.js +2 -2
  54. package/esm/store/crud.js +2 -2
  55. package/esm/store/form.d.ts +20 -10
  56. package/esm/store/form.js +2 -2
  57. package/esm/store/formItem.d.ts +2 -1
  58. package/esm/store/formItem.js +4 -3
  59. package/esm/store/iRenderer.js +5 -3
  60. package/esm/store/index.js +2 -2
  61. package/esm/store/list.js +2 -2
  62. package/esm/store/manager.js +2 -2
  63. package/esm/store/modal.js +2 -2
  64. package/esm/store/node.js +2 -2
  65. package/esm/store/pagination.js +2 -2
  66. package/esm/store/root.js +3 -3
  67. package/esm/store/service.js +2 -2
  68. package/esm/store/status.js +2 -2
  69. package/esm/store/table.d.ts +42 -20
  70. package/esm/store/table.js +33 -19
  71. package/esm/store/table2.js +2 -2
  72. package/esm/theme.js +2 -2
  73. package/esm/utils/Animation.js +2 -2
  74. package/esm/utils/ColorScale.js +2 -2
  75. package/esm/utils/DataSchema.js +2 -2
  76. package/esm/utils/DataScope.js +2 -2
  77. package/esm/utils/RootClose.js +2 -2
  78. package/esm/utils/SimpleMap.js +2 -2
  79. package/esm/utils/api.js +2 -2
  80. package/esm/utils/arraySlice.js +2 -2
  81. package/esm/utils/attachmentAdpator.js +2 -2
  82. package/esm/utils/autobind.js +2 -2
  83. package/esm/utils/browser.js +2 -2
  84. package/esm/utils/columnsSplit.js +2 -2
  85. package/esm/utils/concatData.js +2 -2
  86. package/esm/utils/dataMapping.js +2 -2
  87. package/esm/utils/date.js +2 -2
  88. package/esm/utils/debug.js +2 -2
  89. package/esm/utils/decodeEntity.js +2 -2
  90. package/esm/utils/dom.js +2 -2
  91. package/esm/utils/errors.js +2 -2
  92. package/esm/utils/escapeHtml.js +2 -2
  93. package/esm/utils/filter-schema.js +2 -2
  94. package/esm/utils/filter.js +2 -2
  95. package/esm/utils/formatDuration.js +2 -2
  96. package/esm/utils/formula.js +2 -2
  97. package/esm/utils/getVariable.js +2 -2
  98. package/esm/utils/grammar.js +2 -2
  99. package/esm/utils/handleAction.js +2 -2
  100. package/esm/utils/helper.d.ts +8 -1
  101. package/esm/utils/helper.js +28 -10
  102. package/esm/utils/highlight.js +4 -3
  103. package/esm/utils/icon.js +2 -2
  104. package/esm/utils/image.js +2 -2
  105. package/esm/utils/index.d.ts +1 -0
  106. package/esm/utils/isPureVariable.js +2 -2
  107. package/esm/utils/json-schema-2-amis-schema.js +2 -2
  108. package/esm/utils/keyToPath.js +2 -2
  109. package/esm/utils/labelToString.d.ts +1 -0
  110. package/esm/utils/labelToString.js +38 -0
  111. package/esm/utils/makeSorter.js +2 -2
  112. package/esm/utils/math.js +2 -2
  113. package/esm/utils/memoryParse.js +2 -2
  114. package/esm/utils/normalizeLink.js +2 -2
  115. package/esm/utils/normalizeOptions.js +2 -2
  116. package/esm/utils/object.js +2 -2
  117. package/esm/utils/offset.js +2 -2
  118. package/esm/utils/offsetParent.js +2 -2
  119. package/esm/utils/optionValueCompare.js +2 -2
  120. package/esm/utils/position.js +2 -2
  121. package/esm/utils/prettyBytes.js +2 -2
  122. package/esm/utils/renderer-event.js +2 -2
  123. package/esm/utils/replaceText.js +10 -12
  124. package/esm/utils/resize-sensor.js +2 -2
  125. package/esm/utils/resolveCondition.js +2 -2
  126. package/esm/utils/resolveVariable.js +2 -2
  127. package/esm/utils/resolveVariableAndFilter.js +2 -2
  128. package/esm/utils/resolveVariableAndFilterForAsync.js +2 -2
  129. package/esm/utils/scrollPosition.js +2 -2
  130. package/esm/utils/string2regExp.d.ts +1 -1
  131. package/esm/utils/string2regExp.js +5 -4
  132. package/esm/utils/stripNumber.js +2 -2
  133. package/esm/utils/style-helper.d.ts +24 -5
  134. package/esm/utils/style-helper.js +47 -17
  135. package/esm/utils/style.js +2 -2
  136. package/esm/utils/toNumber.js +2 -2
  137. package/esm/utils/tokenize.d.ts +1 -0
  138. package/esm/utils/tokenize.js +11 -4
  139. package/esm/utils/tpl-builtin.js +2 -2
  140. package/esm/utils/tpl-lodash.js +2 -2
  141. package/esm/utils/tpl.js +7 -9
  142. package/esm/utils/uncontrollable.js +2 -2
  143. package/esm/utils/validateId.d.ts +16 -0
  144. package/esm/utils/validateId.js +154 -0
  145. package/esm/utils/validations.js +17 -9
  146. package/lib/Root.js +2 -2
  147. package/lib/RootRenderer.d.ts +1 -1
  148. package/lib/RootRenderer.js +4 -3
  149. package/lib/SchemaRenderer.js +5 -2
  150. package/lib/Scoped.d.ts +6 -0
  151. package/lib/Scoped.js +45 -7
  152. package/lib/StatusScoped.js +2 -2
  153. package/lib/WithRootStore.js +2 -2
  154. package/lib/WithStore.js +4 -6
  155. package/lib/actions/Action.js +2 -2
  156. package/lib/actions/AjaxAction.js +2 -2
  157. package/lib/actions/BreakAction.js +2 -2
  158. package/lib/actions/BroadcastAction.js +2 -2
  159. package/lib/actions/CmptAction.js +2 -2
  160. package/lib/actions/ContinueAction.js +2 -2
  161. package/lib/actions/CopyAction.js +2 -2
  162. package/lib/actions/CustomAction.js +3 -3
  163. package/lib/actions/DialogAction.js +2 -2
  164. package/lib/actions/DrawerAction.js +2 -2
  165. package/lib/actions/EmailAction.js +2 -2
  166. package/lib/actions/LinkAction.js +10 -5
  167. package/lib/actions/LoopAction.js +2 -2
  168. package/lib/actions/PageAction.js +2 -2
  169. package/lib/actions/ParallelAction.js +2 -2
  170. package/lib/actions/StatusAction.js +2 -2
  171. package/lib/actions/SwitchAction.js +2 -2
  172. package/lib/actions/ToastAction.js +2 -2
  173. package/lib/components/CustomStyle.d.ts +1 -2
  174. package/lib/components/CustomStyle.js +20 -7
  175. package/lib/components/ErrorBoundary.js +2 -2
  176. package/lib/components/LazyComponent.js +2 -2
  177. package/lib/components/Overlay.js +10 -8
  178. package/lib/components/PopOver.js +7 -5
  179. package/lib/env.d.ts +4 -0
  180. package/lib/env.js +2 -2
  181. package/lib/envOverwrite.js +2 -2
  182. package/lib/factory.js +15 -2
  183. package/lib/index.d.ts +2 -2
  184. package/lib/index.js +16 -5
  185. package/lib/locale.js +2 -2
  186. package/lib/polyfills.js +2 -2
  187. package/lib/renderers/Form.d.ts +4 -3
  188. package/lib/renderers/Form.js +94 -42
  189. package/lib/renderers/Item.d.ts +1 -0
  190. package/lib/renderers/Item.js +15 -16
  191. package/lib/renderers/Options.d.ts +5 -0
  192. package/lib/renderers/Options.js +27 -10
  193. package/lib/renderers/Placeholder.js +2 -2
  194. package/lib/renderers/builtin.js +2 -2
  195. package/lib/renderers/register.js +2 -2
  196. package/lib/renderers/wrapControl.js +36 -28
  197. package/lib/store/app.js +3 -3
  198. package/lib/store/combo.d.ts +72 -49
  199. package/lib/store/combo.js +2 -2
  200. package/lib/store/crud.js +2 -2
  201. package/lib/store/form.d.ts +30 -21
  202. package/lib/store/form.js +2 -2
  203. package/lib/store/formItem.d.ts +2 -1
  204. package/lib/store/formItem.js +4 -3
  205. package/lib/store/iRenderer.js +5 -3
  206. package/lib/store/index.js +2 -2
  207. package/lib/store/list.js +2 -2
  208. package/lib/store/manager.js +2 -2
  209. package/lib/store/modal.js +2 -2
  210. package/lib/store/node.js +2 -2
  211. package/lib/store/pagination.js +2 -2
  212. package/lib/store/root.js +3 -3
  213. package/lib/store/service.js +2 -2
  214. package/lib/store/status.js +2 -2
  215. package/lib/store/table.d.ts +62 -41
  216. package/lib/store/table.js +33 -19
  217. package/lib/store/table2.js +2 -2
  218. package/lib/theme.js +2 -2
  219. package/lib/utils/Animation.js +2 -2
  220. package/lib/utils/ColorScale.js +2 -2
  221. package/lib/utils/DataSchema.js +2 -2
  222. package/lib/utils/DataScope.js +2 -2
  223. package/lib/utils/RootClose.js +2 -2
  224. package/lib/utils/SimpleMap.js +2 -2
  225. package/lib/utils/api.js +2 -2
  226. package/lib/utils/arraySlice.js +2 -2
  227. package/lib/utils/attachmentAdpator.js +2 -2
  228. package/lib/utils/autobind.js +2 -2
  229. package/lib/utils/browser.js +2 -2
  230. package/lib/utils/columnsSplit.js +2 -2
  231. package/lib/utils/concatData.js +2 -2
  232. package/lib/utils/dataMapping.js +2 -2
  233. package/lib/utils/date.js +2 -2
  234. package/lib/utils/debug.js +2 -2
  235. package/lib/utils/decodeEntity.js +2 -2
  236. package/lib/utils/dom.js +2 -2
  237. package/lib/utils/errors.js +2 -2
  238. package/lib/utils/escapeHtml.js +2 -2
  239. package/lib/utils/filter-schema.js +2 -2
  240. package/lib/utils/filter.js +2 -2
  241. package/lib/utils/formatDuration.js +2 -2
  242. package/lib/utils/formula.js +2 -2
  243. package/lib/utils/getVariable.js +2 -2
  244. package/lib/utils/grammar.js +2 -2
  245. package/lib/utils/handleAction.js +2 -2
  246. package/lib/utils/helper.d.ts +8 -1
  247. package/lib/utils/helper.js +29 -8
  248. package/lib/utils/highlight.js +4 -3
  249. package/lib/utils/icon.js +2 -2
  250. package/lib/utils/image.js +2 -2
  251. package/lib/utils/index.d.ts +1 -0
  252. package/lib/utils/isPureVariable.js +2 -2
  253. package/lib/utils/json-schema-2-amis-schema.js +2 -2
  254. package/lib/utils/keyToPath.js +2 -2
  255. package/lib/utils/labelToString.d.ts +1 -0
  256. package/lib/utils/labelToString.js +46 -0
  257. package/lib/utils/makeSorter.js +2 -2
  258. package/lib/utils/math.js +2 -2
  259. package/lib/utils/memoryParse.js +2 -2
  260. package/lib/utils/normalizeLink.js +2 -2
  261. package/lib/utils/normalizeOptions.js +2 -2
  262. package/lib/utils/object.js +2 -2
  263. package/lib/utils/offset.js +2 -2
  264. package/lib/utils/offsetParent.js +2 -2
  265. package/lib/utils/optionValueCompare.js +2 -2
  266. package/lib/utils/position.js +2 -2
  267. package/lib/utils/prettyBytes.js +2 -2
  268. package/lib/utils/renderer-event.js +2 -2
  269. package/lib/utils/replaceText.js +9 -15
  270. package/lib/utils/resize-sensor.js +2 -2
  271. package/lib/utils/resolveCondition.js +2 -2
  272. package/lib/utils/resolveVariable.js +2 -2
  273. package/lib/utils/resolveVariableAndFilter.js +2 -2
  274. package/lib/utils/resolveVariableAndFilterForAsync.js +2 -2
  275. package/lib/utils/scrollPosition.js +2 -2
  276. package/lib/utils/string2regExp.d.ts +1 -1
  277. package/lib/utils/string2regExp.js +5 -4
  278. package/lib/utils/stripNumber.js +2 -2
  279. package/lib/utils/style-helper.d.ts +24 -5
  280. package/lib/utils/style-helper.js +47 -17
  281. package/lib/utils/style.js +2 -2
  282. package/lib/utils/toNumber.js +2 -2
  283. package/lib/utils/tokenize.d.ts +1 -0
  284. package/lib/utils/tokenize.js +11 -3
  285. package/lib/utils/tpl-builtin.js +2 -2
  286. package/lib/utils/tpl-lodash.js +2 -2
  287. package/lib/utils/tpl.js +6 -8
  288. package/lib/utils/uncontrollable.js +2 -2
  289. package/lib/utils/validateId.d.ts +16 -0
  290. package/lib/utils/validateId.js +160 -0
  291. package/lib/utils/validations.js +17 -9
  292. package/package.json +3 -3
  293. package/LICENSE +0 -201
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __extends, __rest, __assign, __decorate, __metadata } from 'tslib';
@@ -28,12 +28,12 @@ import '../utils/image.js';
28
28
  import 'lodash/isEqual';
29
29
  import '../actions/Action.js';
30
30
  import 'lodash/debounce';
31
- import 'lodash/cloneDeep';
32
31
  import '../utils/resize-sensor.js';
33
32
  import 'react-overlays/useRootClose';
34
33
  import '../utils/SimpleMap.js';
35
34
  import 'lodash/mapValues';
36
35
  import 'lodash/camelCase';
36
+ import 'lodash/cloneDeep';
37
37
  import 'lodash/map';
38
38
  import 'lodash/isEmpty';
39
39
  import 'lodash/kebabCase';
@@ -103,7 +103,9 @@ var PopOver = /** @class */ (function (_super) {
103
103
  closeOnOutside &&
104
104
  target &&
105
105
  this.wrapperRef.current &&
106
- !this.wrapperRef.current.getAttribute(SubPopoverDisplayedID) &&
106
+ !this.wrapperRef.current
107
+ .getAttributeNames()
108
+ .find(function (n) { return n.startsWith(SubPopoverDisplayedID); }) &&
107
109
  ((!this.wrapperRef.current.contains(target) &&
108
110
  !target.closest('[role=dialog]')) ||
109
111
  (target.matches(".".concat(ns, "Modal")) && target === this.wrapperRef.current))); // 干脆过滤掉来自弹框里面的点击
@@ -149,7 +151,7 @@ var PopOver = /** @class */ (function (_super) {
149
151
  });
150
152
  };
151
153
  PopOver.prototype.render = function () {
152
- var _a = this.props; _a.placement; var activePlacement = _a.activePlacement, positionTop = _a.positionTop, positionLeft = _a.positionLeft; _a.arrowOffsetLeft; _a.arrowOffsetTop; var style = _a.style, children = _a.children; _a.offset; var overlay = _a.overlay, onHide = _a.onHide, ns = _a.classPrefix, cx = _a.classnames, className = _a.className, rest = __rest(_a, ["placement", "activePlacement", "positionTop", "positionLeft", "arrowOffsetLeft", "arrowOffsetTop", "style", "children", "offset", "overlay", "onHide", "classPrefix", "classnames", "className"]);
154
+ var _a = this.props; _a.placement; var activePlacement = _a.activePlacement, positionTop = _a.positionTop, positionLeft = _a.positionLeft; _a.arrowOffsetLeft; _a.arrowOffsetTop; var style = _a.style, children = _a.children; _a.offset; var overlay = _a.overlay, onHide = _a.onHide, ns = _a.classPrefix, cx = _a.classnames, className = _a.className; _a.componentId; var rest = __rest(_a, ["placement", "activePlacement", "positionTop", "positionLeft", "arrowOffsetLeft", "arrowOffsetTop", "style", "children", "offset", "overlay", "onHide", "classPrefix", "classnames", "className", "componentId"]);
153
155
  var _b = this.state, xOffset = _b.xOffset, yOffset = _b.yOffset;
154
156
  var outerStyle = __assign(__assign({ display: 'block' }, style), { top: positionTop + yOffset, left: positionLeft + xOffset });
155
157
  var placements = typeof activePlacement === 'string' ? activePlacement.split('-') : [];
package/esm/env.d.ts CHANGED
@@ -86,6 +86,10 @@ export interface RendererEnv {
86
86
  * 是否开启 amis 调试
87
87
  */
88
88
  enableAMISDebug?: boolean;
89
+ /**
90
+ * 是否开启 testid 定位
91
+ */
92
+ enableTestid?: boolean;
89
93
  /**
90
94
  * 替换文本,用于实现 URL 替换、语言替换等
91
95
  */
package/esm/env.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import 'tslib';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { JSONValueMap } from './utils/helper.js';
package/esm/factory.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __assign } from 'tslib';
@@ -151,6 +151,19 @@ var defaultOptions = {
151
151
  action.blank === false ? (window.location.href = to) : window.open(to);
152
152
  return;
153
153
  }
154
+ // link动作新增了targetType属性,默认是内容区打开(page),在新窗口打开(blank);在当前页签打开(self)
155
+ if ((action === null || action === void 0 ? void 0 : action.actionType) === 'link' &&
156
+ ['blank', 'self'].includes(action === null || action === void 0 ? void 0 : action.targetType)) {
157
+ if (action.targetType === 'self') {
158
+ // 当前页签打开,需要刷新页面
159
+ window.history.pushState(null, '', to);
160
+ location.reload();
161
+ }
162
+ else {
163
+ window.open(to);
164
+ }
165
+ return;
166
+ }
154
167
  if (/^https?:\/\//.test(to)) {
155
168
  window.location.replace(to);
156
169
  }
package/esm/index.d.ts CHANGED
@@ -19,7 +19,7 @@ import { RegisterStore } from './store';
19
19
  import type { IColumn, IColumn2, IRow, IRow2 } from './store';
20
20
  import { setDefaultLocale, getDefaultLocale, makeTranslator, register as registerLocale, extendLocale, removeLocaleData, localeable } from './locale';
21
21
  import type { LocaleProps, TranslateFn } from './locale';
22
- import Scoped, { ScopedContext, filterTarget } from './Scoped';
22
+ import Scoped, { ScopedContext, filterTarget, splitTarget } from './Scoped';
23
23
  import type { ScopedComponentType, IScopedContext } from './Scoped';
24
24
  import { classnames, getClassPrefix, setDefaultTheme, theme, getTheme, themeable, makeClassnames } from './theme';
25
25
  import type { ClassNamesFn, ThemeProps } from './theme';
@@ -50,5 +50,5 @@ import type { IItem } from './store/list';
50
50
  import CustomStyle from './components/CustomStyle';
51
51
  import { StatusScoped } from './StatusScoped';
52
52
  export declare const version = "__buildVersion";
53
- export { clearStoresCache, updateEnv, Renderer, RendererProps, RenderOptions, RendererEnv, EnvContext, RegisterStore, FormItem, FormItemWrap, FormItemProps, OptionsControl, FormRenderer, FormHorizontal, utils, getRendererByName, registerRenderer, unRegisterRenderer, getRenderers, registerFormItem, getFormItemByName, registerOptionsControl, resolveRenderer, filterSchema, Scoped, ScopedContext, IScopedContext, StatusScoped, setDefaultTheme, theme, themeable, ThemeProps, getTheme, classPrefix, getClassPrefix, classnames, makeClassnames, getDefaultLocale, setDefaultLocale, registerLocale, makeTranslator, extendLocale, removeLocaleData, localeable, LocaleProps, TranslateFn, ClassNamesFn, parse, lexer, Evaluator, AsyncEvaluator, FilterContext, filters, getFilters, registerFilter, extendsFilters, registerFunction, evaluate, evaluateForAsync, LazyComponent, Overlay, PopOver, ErrorBoundary, addSchemaFilter, OptionsControlProps, FormOptionsControl, FormControlProps, FormBaseControl, extendDefaultEnv, addRootWrapper, RendererConfig, styleMap, RENDERER_TRANSMISSION_OMIT_PROPS, ScopedComponentType, IItem, IColumn, IRow, IColumn2, IRow2, OnEventProps, FormSchemaBase, filterTarget, CustomStyle, enableDebug, disableDebug };
53
+ export { clearStoresCache, updateEnv, Renderer, RendererProps, RenderOptions, RendererEnv, EnvContext, RegisterStore, FormItem, FormItemWrap, FormItemProps, OptionsControl, FormRenderer, FormHorizontal, utils, getRendererByName, registerRenderer, unRegisterRenderer, getRenderers, registerFormItem, getFormItemByName, registerOptionsControl, resolveRenderer, filterSchema, Scoped, ScopedContext, IScopedContext, StatusScoped, setDefaultTheme, theme, themeable, ThemeProps, getTheme, classPrefix, getClassPrefix, classnames, makeClassnames, getDefaultLocale, setDefaultLocale, registerLocale, makeTranslator, extendLocale, removeLocaleData, localeable, LocaleProps, TranslateFn, ClassNamesFn, parse, lexer, Evaluator, AsyncEvaluator, FilterContext, filters, getFilters, registerFilter, extendsFilters, registerFunction, evaluate, evaluateForAsync, LazyComponent, Overlay, PopOver, ErrorBoundary, addSchemaFilter, OptionsControlProps, FormOptionsControl, FormControlProps, FormBaseControl, extendDefaultEnv, addRootWrapper, RendererConfig, styleMap, RENDERER_TRANSMISSION_OMIT_PROPS, ScopedComponentType, IItem, IColumn, IRow, IColumn2, IRow2, OnEventProps, FormSchemaBase, filterTarget, splitTarget, CustomStyle, enableDebug, disableDebug };
54
54
  export declare function render(schema: Schema, props?: RootRenderProps, options?: RenderOptions, pathPrefix?: string): JSX.Element;
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __assign, __rest } from 'tslib';
@@ -36,13 +36,14 @@ export { handleAction } from './utils/handleAction.js';
36
36
  import { promisify } from './utils/helper.js';
37
37
  import * as helper from './utils/helper.js';
38
38
  export { helper as utils };
39
- export { JSONTraverse, JSONValueMap, SkipOperation, ValidateError, __uri, anyChanged, autobind, buildTrackExpression, bulkBindFunctions, camel, chainEvents, chainFunctions, changedEffect, convertArrayValueToMoment, countTree, detectPropValueChanged, difference, differenceFromAll, eachTree, evalTrackExpression, everyTree, filterTree, findIndex, findObjectsWithKey, findTree, findTreeAll, findTreeIndex, flattenTree, flattenTreeWithLeafNodes, getLevelFromClassName, getPropValue, getRange, getScrollParent, getScrollbarWidth, getTree, getTreeAncestors, getTreeDepth, getTreeParent, getWidthRate, guid, hasAbility, hasFile, hasOwnPropertyInPath, hasVisibleExpression, hashCode, immutableExtends, importLazyComponent, injectPropsToObject, isArrayChildrenModified, isBreakpoint, isClickOnInput, isDisabled, isEmpty, isMobile, isNumeric, isObjectShallowModified, isSuperDataModified, isUnfolded, isVisible, lcFirst, loadScript, loadStyle, makeColumnClassBuild, makeHorizontalDeeper, mapObject, mapTree, noop, normalizeNodePath, object2formData, omitControls, padArr, parsePrimitiveQueryString, parseQuery, pickEventsProps, preventDefault, promisify, qsparse, qsstringify, range, removeHTMLTag, repeatCount, replaceUrlParams, rmUndefined, someTree, sortArray, spliceTree, syncDataFromSuper, ucFirst, until, uuid, uuidv4, visibilityFilter } from './utils/helper.js';
39
+ export { JSONTraverse, JSONValueMap, SkipOperation, TEST_ID_KEY, ValidateError, __uri, anyChanged, autobind, buildTestId, buildTrackExpression, bulkBindFunctions, camel, chainEvents, chainFunctions, changedEffect, convertArrayValueToMoment, countTree, detectPropValueChanged, difference, differenceFromAll, eachTree, evalTrackExpression, everyTree, filterTree, findIndex, findObjectsWithKey, findTree, findTreeAll, findTreeIndex, flattenTree, flattenTreeWithLeafNodes, getLevelFromClassName, getPropValue, getRange, getScrollParent, getScrollbarWidth, getTestId, getTree, getTreeAncestors, getTreeDepth, getTreeParent, getWidthRate, guid, hasAbility, hasFile, hasOwnPropertyInPath, hasVisibleExpression, hashCode, immutableExtends, importLazyComponent, injectPropsToObject, isArrayChildrenModified, isBreakpoint, isClickOnInput, isDisabled, isEmpty, isMobile, isNumeric, isObjectShallowModified, isSuperDataModified, isUnfolded, isVisible, lcFirst, loadScript, loadStyle, makeColumnClassBuild, makeHorizontalDeeper, mapObject, mapTree, noop, normalizeNodePath, object2formData, omitControls, padArr, parsePrimitiveQueryString, parseQuery, pickEventsProps, preventDefault, promisify, qsparse, qsstringify, range, removeHTMLTag, repeatCount, replaceUrlParams, rmUndefined, someTree, sortArray, spliceTree, syncDataFromSuper, ucFirst, until, uuid, uuidv4, visibilityFilter } from './utils/helper.js';
40
40
  export { highlight } from './utils/highlight.js';
41
41
  export { generateIcon } from './utils/icon.js';
42
42
  export { getImageDimensions, toDataURL } from './utils/image.js';
43
43
  export { isPureVariable } from './utils/isPureVariable.js';
44
44
  export { JSONSchme2AMisSchema } from './utils/json-schema-2-amis-schema.js';
45
45
  export { keyToPath } from './utils/keyToPath.js';
46
+ export { labelToString } from './utils/labelToString.js';
46
47
  export { makeSorter } from './utils/makeSorter.js';
47
48
  export { normalizeLink } from './utils/normalizeLink.js';
48
49
  export { normalizeOptions } from './utils/normalizeOptions.js';
@@ -64,7 +65,7 @@ export { scrollPosition } from './utils/scrollPosition.js';
64
65
  export { SimpleMap } from './utils/SimpleMap.js';
65
66
  export { string2regExp } from './utils/string2regExp.js';
66
67
  export { buildStyle } from './utils/style.js';
67
- export { tokenize } from './utils/tokenize.js';
68
+ export { memoParse, tokenize } from './utils/tokenize.js';
68
69
  export { register } from './utils/tpl-builtin.js';
69
70
  export { asyncFilter, evalExpression, evalExpressionWithConditionBuilder, evalJS, filter, registerTplEnginer, setCustomEvalExpression, setCustomEvalJs } from './utils/tpl.js';
70
71
  export { uncontrollable } from './utils/uncontrollable.js';
@@ -81,7 +82,7 @@ export { RegisterStore, RendererStore } from './store/index.js';
81
82
  import { getEnv } from 'mobx-state-tree';
82
83
  import { getDefaultLocale, makeTranslator } from './locale.js';
83
84
  export { extendLocale, getDefaultLocale, localeable, makeTranslator, register as registerLocale, removeLocaleData, setDefaultLocale } from './locale.js';
84
- export { HocScoped as Scoped, ScopedContext, filterTarget } from './Scoped.js';
85
+ export { HocScoped as Scoped, ScopedContext, filterTarget, splitTarget } from './Scoped.js';
85
86
  import { getClassPrefix, getTheme } from './theme.js';
86
87
  export { classnames, getClassPrefix, getTheme, makeClassnames, setDefaultTheme, theme, themeable } from './theme.js';
87
88
  import './actions/LoopAction.js';
@@ -143,7 +144,7 @@ export { StoreNode } from './store/node.js';
143
144
  */
144
145
  var classPrefix = getClassPrefix();
145
146
  // @ts-ignore
146
- var version = '6.0.0';
147
+ var version = '6.1.0';
147
148
  function render(schema, props, options, pathPrefix) {
148
149
  if (props === void 0) { props = {}; }
149
150
  if (options === void 0) { options = {}; }
@@ -202,8 +203,12 @@ function AMISRenderer(_a) {
202
203
  props.mobileUI = env.isMobile();
203
204
  }
204
205
  // 根据环境覆盖 schema,这个要在最前面做,不然就无法覆盖 validations
205
- schema = envOverwrite(schema, locale);
206
- schema = replaceText(schema, options.replaceText, env.replaceTextIgnoreKeys);
206
+ schema = React.useMemo(function () {
207
+ schema = envOverwrite(schema, locale);
208
+ // todo 和 envOverwrite 一起处理,减少循环次数
209
+ schema = replaceText(schema, options.replaceText, env.replaceTextIgnoreKeys);
210
+ return schema;
211
+ }, [schema, locale]);
207
212
  return (React.createElement(EnvContext.Provider, { value: env },
208
213
  React.createElement(ScopedRootRenderer, __assign({}, props, { schema: schema, pathPrefix: pathPrefix, rootStore: store, env: env, theme: theme, locale: locale, translate: translate }))));
209
214
  }
package/esm/locale.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __assign, __extends, __spreadArray, __read } from 'tslib';
package/esm/polyfills.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  /**
@@ -341,15 +341,16 @@ export default class Form extends React.Component<FormProps, object> {
341
341
  silentReload(target?: string, query?: any): void;
342
342
  initInterval(value: any): any;
343
343
  isValidated(): boolean;
344
- validate(forceValidate?: boolean, throwErrors?: boolean, toastErrors?: boolean): Promise<boolean>;
344
+ validate(forceValidate?: boolean, throwErrors?: boolean, toastErrors?: boolean, skipFlush?: boolean): Promise<boolean>;
345
345
  setErrors(errors: {
346
346
  [propName: string]: string;
347
347
  }, tag?: string): void;
348
348
  clearErrors(): void;
349
349
  getValues(): any;
350
350
  setValues(value: any, replace?: boolean): void;
351
- submit(fn?: (values: object) => Promise<any>, throwErrors?: boolean): Promise<any>;
352
- flush(): void;
351
+ submit(fn?: (values: object) => Promise<any>, throwErrors?: boolean, skipFlush?: boolean): Promise<any>;
352
+ flushing: boolean;
353
+ flush(): Promise<void>;
353
354
  reset(): void;
354
355
  addHook(fn: () => any, type?: 'validate' | 'init' | 'flush'): () => void;
355
356
  removeHook(fn: () => any, type?: string): void;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * amis-core v6.0.0
3
- * Copyright 2018-2023 fex
2
+ * amis-core v6.1.0
3
+ * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __extends, __awaiter, __generator, __assign, __decorate, __metadata } from 'tslib';
@@ -37,12 +37,12 @@ import '../utils/image.js';
37
37
  import 'lodash/isPlainObject';
38
38
  import 'lodash/isEqual';
39
39
  import '../actions/Action.js';
40
- import 'lodash/cloneDeep';
41
40
  import '../utils/resize-sensor.js';
42
41
  import 'react-overlays/useRootClose';
43
42
  import '../utils/SimpleMap.js';
44
43
  import 'lodash/mapValues';
45
44
  import 'lodash/camelCase';
45
+ import 'lodash/cloneDeep';
46
46
  import 'lodash/map';
47
47
  import 'lodash/isEmpty';
48
48
  import 'lodash/kebabCase';
@@ -64,6 +64,8 @@ var Form = /** @class */ (function (_super) {
64
64
  trailing: true,
65
65
  leading: false
66
66
  });
67
+ // 如果开启了 lazyChange,需要一个 flush 方法把队列中值应用上。
68
+ _this.flushing = false;
67
69
  _this.onInit = _this.onInit.bind(_this);
68
70
  _this.handleAction = _this.handleAction.bind(_this);
69
71
  _this.handleQuery = _this.handleQuery.bind(_this);
@@ -376,22 +378,27 @@ var Form = /** @class */ (function (_super) {
376
378
  Form.prototype.isValidated = function () {
377
379
  return this.props.store.validated;
378
380
  };
379
- Form.prototype.validate = function (forceValidate, throwErrors, toastErrors) {
381
+ Form.prototype.validate = function (forceValidate, throwErrors, toastErrors, skipFlush) {
380
382
  if (throwErrors === void 0) { throwErrors = false; }
381
383
  if (toastErrors === void 0) { toastErrors = true; }
384
+ if (skipFlush === void 0) { skipFlush = false; }
382
385
  return __awaiter(this, void 0, void 0, function () {
383
386
  var _a, store, dispatchEvent, data, messages, __, result;
384
387
  return __generator(this, function (_b) {
385
388
  switch (_b.label) {
386
389
  case 0:
387
390
  _a = this.props, store = _a.store, dispatchEvent = _a.dispatchEvent, data = _a.data, messages = _a.messages, __ = _a.translate;
388
- this.flush();
389
- return [4 /*yield*/, store.validate(this.hooks['validate'] || [], forceValidate, throwErrors, toastErrors === false
390
- ? ''
391
- : typeof (messages === null || messages === void 0 ? void 0 : messages.validateFailed) === 'string'
392
- ? __(filter(messages.validateFailed, store.data))
393
- : undefined)];
391
+ if (!!skipFlush) return [3 /*break*/, 2];
392
+ return [4 /*yield*/, this.flush()];
394
393
  case 1:
394
+ _b.sent();
395
+ _b.label = 2;
396
+ case 2: return [4 /*yield*/, store.validate(this.hooks['validate'] || [], forceValidate, throwErrors, toastErrors === false
397
+ ? ''
398
+ : typeof (messages === null || messages === void 0 ? void 0 : messages.validateFailed) === 'string'
399
+ ? __(filter(messages.validateFailed, store.data))
400
+ : undefined)];
401
+ case 3:
395
402
  result = _b.sent();
396
403
  dispatchEvent(result ? 'validateSucc' : 'validateError', data);
397
404
  return [2 /*return*/, result];
@@ -418,20 +425,55 @@ var Form = /** @class */ (function (_super) {
418
425
  this.flush();
419
426
  store.setValues(value, undefined, replace);
420
427
  };
421
- Form.prototype.submit = function (fn, throwErrors) {
428
+ Form.prototype.submit = function (fn, throwErrors, skipFlush) {
422
429
  if (throwErrors === void 0) { throwErrors = false; }
423
- var _a = this.props, store = _a.store, messages = _a.messages, __ = _a.translate, dispatchEvent = _a.dispatchEvent, data = _a.data;
424
- this.flush();
425
- var validateErrCb = function () { return dispatchEvent('validateError', data); };
426
- return store.submit(fn, this.hooks['validate'] || [], typeof (messages === null || messages === void 0 ? void 0 : messages.validateFailed) === 'string'
427
- ? __(filter(messages.validateFailed, store.data))
428
- : undefined, validateErrCb, throwErrors);
430
+ if (skipFlush === void 0) { skipFlush = false; }
431
+ return __awaiter(this, void 0, void 0, function () {
432
+ var _a, store, messages, __, dispatchEvent, data, validateErrCb;
433
+ return __generator(this, function (_b) {
434
+ switch (_b.label) {
435
+ case 0:
436
+ _a = this.props, store = _a.store, messages = _a.messages, __ = _a.translate, dispatchEvent = _a.dispatchEvent, data = _a.data;
437
+ if (!!skipFlush) return [3 /*break*/, 2];
438
+ return [4 /*yield*/, this.flush()];
439
+ case 1:
440
+ _b.sent();
441
+ _b.label = 2;
442
+ case 2:
443
+ validateErrCb = function () { return dispatchEvent('validateError', data); };
444
+ return [2 /*return*/, store.submit(fn, this.hooks['validate'] || [], typeof (messages === null || messages === void 0 ? void 0 : messages.validateFailed) === 'string'
445
+ ? __(filter(messages.validateFailed, store.data))
446
+ : undefined, validateErrCb, throwErrors)];
447
+ }
448
+ });
449
+ });
429
450
  };
430
- // 如果开启了 lazyChange,需要一个 flush 方法把队列中值应用上。
431
451
  Form.prototype.flush = function () {
432
- var hooks = this.hooks['flush'] || [];
433
- hooks.forEach(function (fn) { return fn(); });
434
- this.lazyEmitChange.flush();
452
+ return __awaiter(this, void 0, void 0, function () {
453
+ var hooks;
454
+ return __generator(this, function (_a) {
455
+ switch (_a.label) {
456
+ case 0:
457
+ _a.trys.push([0, , 3, 4]);
458
+ if (this.flushing) {
459
+ return [2 /*return*/];
460
+ }
461
+ this.flushing = true;
462
+ hooks = this.hooks['flush'] || [];
463
+ return [4 /*yield*/, Promise.all(hooks.map(function (fn) { return fn(); }))];
464
+ case 1:
465
+ _a.sent();
466
+ return [4 /*yield*/, this.lazyEmitChange.flush()];
467
+ case 2:
468
+ _a.sent();
469
+ return [3 /*break*/, 4];
470
+ case 3:
471
+ this.flushing = false;
472
+ return [7 /*endfinally*/];
473
+ case 4: return [2 /*return*/];
474
+ }
475
+ });
476
+ });
435
477
  };
436
478
  Form.prototype.reset = function () {
437
479
  var _a = this.props, store = _a.store, onReset = _a.onReset;
@@ -503,11 +545,17 @@ var Form = /** @class */ (function (_super) {
503
545
  onChange && onChange.apply(null, changeProps);
504
546
  }
505
547
  store.clearRestError();
506
- (submit || (submitOnChange && store.inited)) &&
507
- this.handleAction(undefined, {
508
- type: 'submit'
509
- }, store.data);
510
- return [2 /*return*/];
548
+ if (!(submit || (submitOnChange && store.inited))) return [3 /*break*/, 3];
549
+ return [4 /*yield*/, this.handleAction(undefined, {
550
+ type: 'submit',
551
+ // 如果这里不跳过,会相互依赖死循环,flush 会 让 emiteChange 立即执行
552
+ // handleAction 里面又会调用 flush
553
+ skipFormFlush: true
554
+ }, store.data)];
555
+ case 2:
556
+ _b.sent();
557
+ _b.label = 3;
558
+ case 3: return [2 /*return*/];
511
559
  }
512
560
  });
513
561
  });
@@ -558,8 +606,12 @@ var Form = /** @class */ (function (_super) {
558
606
  switch (_f.label) {
559
607
  case 0:
560
608
  _c = this.props, store = _c.store, onSubmit = _c.onSubmit, api = _c.api, asyncApi = _c.asyncApi, finishedField = _c.finishedField, checkInterval = _c.checkInterval, _d = _c.messages, saveSuccess = _d.saveSuccess, saveFailed = _d.saveFailed, resetAfterSubmit = _c.resetAfterSubmit, clearAfterSubmit = _c.clearAfterSubmit, onAction = _c.onAction, onSaved = _c.onSaved, onReset = _c.onReset, onFinished = _c.onFinished, onFailed = _c.onFailed, redirect = _c.redirect, reload = _c.reload, target = _c.target, env = _c.env, onChange = _c.onChange, clearPersistDataAfterSubmit = _c.clearPersistDataAfterSubmit, trimValues = _c.trimValues, dispatchEvent = _c.dispatchEvent, __ = _c.translate;
561
- // 做动作之前,先把数据同步一下。
562
- this.flush();
609
+ if (!!action.skipFormFlush) return [3 /*break*/, 2];
610
+ return [4 /*yield*/, this.flush()];
611
+ case 1:
612
+ _f.sent();
613
+ _f.label = 2;
614
+ case 2:
563
615
  if (trimValues) {
564
616
  store.trimValues();
565
617
  }
@@ -567,7 +619,7 @@ var Form = /** @class */ (function (_super) {
567
619
  if (data === this.props.data) {
568
620
  data = store.data;
569
621
  }
570
- if (!(Array.isArray(action.required) && action.required.length)) return [3 /*break*/, 4];
622
+ if (!(Array.isArray(action.required) && action.required.length)) return [3 /*break*/, 6];
571
623
  /** 如果是按钮指定了required,则校验前先清空一下遗留的校验报错 */
572
624
  store.clearErrors();
573
625
  fields = action.required.map(function (item) { return ({
@@ -575,31 +627,31 @@ var Form = /** @class */ (function (_super) {
575
627
  rules: { isRequired: true }
576
628
  }); });
577
629
  return [4 /*yield*/, store.validateFields(fields)];
578
- case 1:
630
+ case 3:
579
631
  validationRes = _f.sent();
580
- if (!!validationRes) return [3 /*break*/, 3];
632
+ if (!!validationRes) return [3 /*break*/, 5];
581
633
  return [4 /*yield*/, dispatchEvent('validateError', this.props.data)];
582
- case 2:
634
+ case 4:
583
635
  dispatcher = _f.sent();
584
636
  if (!(dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.prevented)) {
585
637
  env.notify('error', __('Form.validateFailed'));
586
638
  }
587
639
  /** 抛异常是为了在dialog中catch这个错误,避免弹窗直接关闭 */
588
640
  return [2 /*return*/, Promise.reject(__('Form.validateFailed'))];
589
- case 3:
641
+ case 5:
590
642
  /** 重置validated状态,保证submit时触发表单中的校验项 */
591
643
  store.clearErrors();
592
- _f.label = 4;
593
- case 4:
644
+ _f.label = 6;
645
+ case 6:
594
646
  if (!(action.type === 'submit' ||
595
647
  action.actionType === 'submit' ||
596
648
  action.actionType === 'confirm' ||
597
649
  action.actionType === 'reset-and-submit' ||
598
- action.actionType === 'clear-and-submit')) return [3 /*break*/, 6];
650
+ action.actionType === 'clear-and-submit')) return [3 /*break*/, 8];
599
651
  _e = this.props, dispatchEvent_1 = _e.dispatchEvent, onEvent = _e.onEvent;
600
652
  submitEvent = (_b = (_a = onEvent === null || onEvent === void 0 ? void 0 : onEvent.submit) === null || _a === void 0 ? void 0 : _a.actions) === null || _b === void 0 ? void 0 : _b.length;
601
653
  return [4 /*yield*/, dispatchEvent_1('submit', this.props.data)];
602
- case 5:
654
+ case 7:
603
655
  dispatcher = _f.sent();
604
656
  if ((dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.prevented) || submitEvent) {
605
657
  return [2 /*return*/];
@@ -736,7 +788,7 @@ var Form = /** @class */ (function (_super) {
736
788
  return [2 /*return*/, Promise.resolve(null)];
737
789
  }
738
790
  });
739
- }); }, throwErrors)
791
+ }); }, throwErrors, true)
740
792
  .then(function (values) {
741
793
  // 有可能 onSubmit return false 了,那么后面的就不应该再执行了。
742
794
  if (values === false) {
@@ -764,7 +816,7 @@ var Form = /** @class */ (function (_super) {
764
816
  throw reason;
765
817
  }
766
818
  })];
767
- case 6:
819
+ case 8:
768
820
  if (action.type === 'reset' || action.actionType === 'reset') {
769
821
  store.setCurrentAction(action);
770
822
  store.reset(onReset);
@@ -775,7 +827,7 @@ var Form = /** @class */ (function (_super) {
775
827
  }
776
828
  else if (action.actionType === 'validate') {
777
829
  store.setCurrentAction(action);
778
- return [2 /*return*/, this.validate(true, throwErrors)];
830
+ return [2 /*return*/, this.validate(true, throwErrors, true, true)];
779
831
  }
780
832
  else if (action.actionType === 'dialog') {
781
833
  store.setCurrentAction(action);
@@ -851,8 +903,8 @@ var Form = /** @class */ (function (_super) {
851
903
  // 不识别的丢给上层去处理。
852
904
  return [2 /*return*/, onAction(e, action, data, throwErrors, delegate || this.context)];
853
905
  }
854
- _f.label = 7;
855
- case 7: return [2 /*return*/];
906
+ _f.label = 9;
907
+ case 9: return [2 /*return*/];
856
908
  }
857
909
  });
858
910
  });
@@ -361,6 +361,7 @@ export interface FormItemProps extends RendererProps {
361
361
  };
362
362
  error?: string;
363
363
  showErrorMsg?: boolean;
364
+ testid?: string;
364
365
  }
365
366
  export type FormControlProps = RendererProps & {
366
367
  onOpenDialog: (schema: Schema, data: any) => Promise<any>;