amis-core 2.3.1 → 2.4.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 (323) hide show
  1. package/esm/Root.js +1 -1
  2. package/esm/RootRenderer.js +1 -1
  3. package/esm/SchemaRenderer.js +10 -3
  4. package/esm/Scoped.js +1 -1
  5. package/esm/WithRootStore.js +1 -1
  6. package/esm/WithStore.js +1 -1
  7. package/esm/_virtual/index.js +1 -1
  8. package/esm/actions/Action.d.ts +2 -1
  9. package/esm/actions/Action.js +90 -19
  10. package/esm/actions/AjaxAction.js +2 -3
  11. package/esm/actions/BreakAction.js +1 -1
  12. package/esm/actions/BroadcastAction.d.ts +4 -1
  13. package/esm/actions/BroadcastAction.js +8 -8
  14. package/esm/actions/CmptAction.d.ts +1 -1
  15. package/esm/actions/CmptAction.js +5 -2
  16. package/esm/actions/ContinueAction.js +1 -1
  17. package/esm/actions/CopyAction.js +1 -1
  18. package/esm/actions/CustomAction.d.ts +6 -1
  19. package/esm/actions/CustomAction.js +7 -7
  20. package/esm/actions/DialogAction.d.ts +4 -1
  21. package/esm/actions/DialogAction.js +9 -5
  22. package/esm/actions/DrawerAction.d.ts +4 -1
  23. package/esm/actions/DrawerAction.js +9 -5
  24. package/esm/actions/EmailAction.js +1 -1
  25. package/esm/actions/LinkAction.js +5 -6
  26. package/esm/actions/LoopAction.js +1 -1
  27. package/esm/actions/PageAction.js +1 -1
  28. package/esm/actions/ParallelAction.js +1 -1
  29. package/esm/actions/SwitchAction.js +1 -1
  30. package/esm/actions/ToastAction.js +1 -1
  31. package/esm/actions/index.d.ts +0 -2
  32. package/esm/components/LazyComponent.js +1 -1
  33. package/esm/components/Overlay.js +3 -2
  34. package/esm/components/PopOver.js +2 -3
  35. package/esm/env.js +1 -1
  36. package/esm/envOverwrite.js +1 -1
  37. package/esm/factory.d.ts +1 -1
  38. package/esm/factory.js +2 -2
  39. package/esm/index.d.ts +20 -9
  40. package/esm/index.js +6 -4
  41. package/esm/locale.js +1 -1
  42. package/esm/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
  43. package/esm/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
  44. package/esm/node_modules/dom-helpers/esm/addEventListener.js +1 -1
  45. package/esm/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
  46. package/esm/node_modules/dom-helpers/esm/contains.js +1 -1
  47. package/esm/node_modules/dom-helpers/esm/listen.js +1 -1
  48. package/esm/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
  49. package/esm/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
  50. package/esm/node_modules/prop-types/factoryWithThrowingShims.js +51 -60
  51. package/esm/node_modules/prop-types/index.js +4 -13
  52. package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +4 -13
  53. package/esm/node_modules/react-overlays/esm/Portal.js +1 -1
  54. package/esm/node_modules/react-overlays/esm/ownerDocument.js +1 -1
  55. package/esm/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
  56. package/esm/node_modules/react-overlays/esm/useRootClose.js +1 -3
  57. package/esm/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
  58. package/esm/renderers/Form.d.ts +7 -1
  59. package/esm/renderers/Form.js +17 -6
  60. package/esm/renderers/Item.d.ts +6 -6
  61. package/esm/renderers/Item.js +24 -16
  62. package/esm/renderers/Options.d.ts +1 -1
  63. package/esm/renderers/Options.js +28 -7
  64. package/esm/renderers/Placeholder.js +1 -1
  65. package/esm/renderers/builtin.js +1 -1
  66. package/esm/renderers/wrapControl.js +1 -1
  67. package/esm/store/app.js +1 -1
  68. package/esm/store/combo.js +1 -1
  69. package/esm/store/crud.js +1 -1
  70. package/esm/store/form.js +2 -2
  71. package/esm/store/formItem.js +1 -1
  72. package/esm/store/iRenderer.js +1 -1
  73. package/esm/store/index.d.ts +26 -13
  74. package/esm/store/index.js +2 -2
  75. package/esm/store/list.js +1 -1
  76. package/esm/store/manager.js +1 -1
  77. package/esm/store/modal.js +1 -1
  78. package/esm/store/node.js +1 -1
  79. package/esm/store/pagination.js +1 -1
  80. package/esm/store/root.d.ts +2 -0
  81. package/esm/store/root.js +10 -4
  82. package/esm/store/service.js +1 -1
  83. package/esm/store/table.d.ts +6 -6
  84. package/esm/store/table.js +3 -11
  85. package/esm/store/table2.js +1 -1
  86. package/esm/theme.js +1 -1
  87. package/esm/types.d.ts +27 -0
  88. package/esm/utils/Animation.js +1 -1
  89. package/esm/utils/ColorScale.js +1 -1
  90. package/esm/utils/DataSchema.js +1 -1
  91. package/esm/utils/DataScope.js +1 -1
  92. package/esm/utils/RootClose.js +1 -1
  93. package/esm/utils/SimpleMap.js +1 -1
  94. package/esm/utils/api.d.ts +1 -1
  95. package/esm/utils/api.js +17 -5
  96. package/esm/utils/attachmentAdpator.js +1 -1
  97. package/esm/utils/autobind.js +1 -1
  98. package/esm/utils/columnsSplit.js +1 -1
  99. package/esm/utils/dataMapping.js +1 -1
  100. package/esm/utils/date.js +1 -1
  101. package/esm/utils/debug.js +1 -1
  102. package/esm/utils/decodeEntity.d.ts +5 -0
  103. package/esm/utils/decodeEntity.js +16 -0
  104. package/esm/utils/dom.js +1 -1
  105. package/esm/utils/errors.js +1 -1
  106. package/esm/utils/escapeHtml.js +1 -1
  107. package/esm/utils/filter-schema.js +1 -1
  108. package/esm/utils/filter.js +7 -5
  109. package/esm/utils/formatDuration.js +1 -1
  110. package/esm/utils/formula.js +1 -1
  111. package/esm/utils/getVariable.js +1 -1
  112. package/esm/utils/grammar.js +1 -1
  113. package/esm/utils/handleAction.js +1 -1
  114. package/esm/utils/helper.js +6 -1
  115. package/esm/utils/highlight.js +1 -1
  116. package/esm/utils/icon.d.ts +5 -1
  117. package/esm/utils/icon.js +11 -1
  118. package/esm/utils/image.js +1 -1
  119. package/esm/utils/index.d.ts +1 -0
  120. package/esm/utils/isPureVariable.js +1 -1
  121. package/esm/utils/json-schema-2-amis-schema.js +1 -1
  122. package/esm/utils/keyToPath.js +1 -1
  123. package/esm/utils/makeSorter.js +1 -1
  124. package/esm/utils/normalizeLink.js +1 -1
  125. package/esm/utils/normalizeOptions.js +1 -1
  126. package/esm/utils/object.js +1 -1
  127. package/esm/utils/offset.js +1 -1
  128. package/esm/utils/offsetParent.js +1 -1
  129. package/esm/utils/optionValueCompare.js +1 -1
  130. package/esm/utils/position.js +1 -1
  131. package/esm/utils/prettyBytes.js +1 -1
  132. package/esm/utils/renderer-event.d.ts +7 -0
  133. package/esm/utils/renderer-event.js +15 -3
  134. package/esm/utils/replaceText.js +1 -1
  135. package/esm/utils/resize-sensor.js +1 -1
  136. package/esm/utils/resolveVariable.js +1 -1
  137. package/esm/utils/resolveVariableAndFilter.js +1 -1
  138. package/esm/utils/scrollPosition.js +1 -1
  139. package/esm/utils/string2regExp.js +1 -1
  140. package/esm/utils/stripNumber.js +1 -1
  141. package/esm/utils/style.js +1 -1
  142. package/esm/utils/toNumber.js +1 -1
  143. package/esm/utils/tokenize.js +1 -1
  144. package/esm/utils/tpl-builtin.js +1 -1
  145. package/esm/utils/tpl-lodash.js +1 -1
  146. package/esm/utils/tpl.js +1 -1
  147. package/esm/utils/uncontrollable.js +1 -1
  148. package/esm/utils/validations.js +1 -1
  149. package/lib/Root.js +1 -1
  150. package/lib/RootRenderer.js +1 -1
  151. package/lib/SchemaRenderer.js +10 -3
  152. package/lib/Scoped.js +1 -1
  153. package/lib/WithRootStore.js +1 -1
  154. package/lib/WithStore.js +1 -1
  155. package/lib/_virtual/index.js +1 -1
  156. package/lib/actions/Action.d.ts +2 -1
  157. package/lib/actions/Action.js +94 -19
  158. package/lib/actions/AjaxAction.js +2 -7
  159. package/lib/actions/BreakAction.js +1 -1
  160. package/lib/actions/BroadcastAction.d.ts +4 -1
  161. package/lib/actions/BroadcastAction.js +8 -8
  162. package/lib/actions/CmptAction.d.ts +1 -1
  163. package/lib/actions/CmptAction.js +5 -2
  164. package/lib/actions/ContinueAction.js +1 -1
  165. package/lib/actions/CopyAction.js +1 -1
  166. package/lib/actions/CustomAction.d.ts +6 -1
  167. package/lib/actions/CustomAction.js +7 -7
  168. package/lib/actions/DialogAction.d.ts +4 -1
  169. package/lib/actions/DialogAction.js +9 -5
  170. package/lib/actions/DrawerAction.d.ts +4 -1
  171. package/lib/actions/DrawerAction.js +9 -5
  172. package/lib/actions/EmailAction.js +1 -1
  173. package/lib/actions/LinkAction.js +5 -10
  174. package/lib/actions/LoopAction.js +1 -1
  175. package/lib/actions/PageAction.js +1 -1
  176. package/lib/actions/ParallelAction.js +1 -1
  177. package/lib/actions/SwitchAction.js +1 -1
  178. package/lib/actions/ToastAction.js +1 -1
  179. package/lib/actions/index.d.ts +0 -2
  180. package/lib/components/LazyComponent.js +1 -1
  181. package/lib/components/Overlay.js +3 -2
  182. package/lib/components/PopOver.js +2 -3
  183. package/lib/env.js +1 -1
  184. package/lib/envOverwrite.js +1 -1
  185. package/lib/factory.d.ts +1 -1
  186. package/lib/factory.js +2 -2
  187. package/lib/index.d.ts +20 -9
  188. package/lib/index.js +7 -4
  189. package/lib/locale.js +1 -1
  190. package/lib/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
  191. package/lib/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
  192. package/lib/node_modules/dom-helpers/esm/addEventListener.js +1 -1
  193. package/lib/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
  194. package/lib/node_modules/dom-helpers/esm/contains.js +1 -1
  195. package/lib/node_modules/dom-helpers/esm/listen.js +1 -1
  196. package/lib/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
  197. package/lib/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
  198. package/lib/node_modules/prop-types/factoryWithThrowingShims.js +51 -60
  199. package/lib/node_modules/prop-types/index.js +3 -12
  200. package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +4 -13
  201. package/lib/node_modules/react-overlays/esm/Portal.js +1 -1
  202. package/lib/node_modules/react-overlays/esm/ownerDocument.js +1 -1
  203. package/lib/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
  204. package/lib/node_modules/react-overlays/esm/useRootClose.js +1 -3
  205. package/lib/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
  206. package/lib/renderers/Form.d.ts +7 -1
  207. package/lib/renderers/Form.js +17 -6
  208. package/lib/renderers/Item.d.ts +6 -6
  209. package/lib/renderers/Item.js +24 -16
  210. package/lib/renderers/Options.d.ts +1 -1
  211. package/lib/renderers/Options.js +30 -9
  212. package/lib/renderers/Placeholder.js +1 -1
  213. package/lib/renderers/builtin.js +1 -1
  214. package/lib/renderers/wrapControl.js +1 -1
  215. package/lib/store/app.js +1 -1
  216. package/lib/store/combo.js +1 -1
  217. package/lib/store/crud.js +1 -1
  218. package/lib/store/form.js +2 -2
  219. package/lib/store/formItem.js +1 -1
  220. package/lib/store/iRenderer.js +1 -1
  221. package/lib/store/index.d.ts +26 -13
  222. package/lib/store/index.js +2 -2
  223. package/lib/store/list.js +1 -1
  224. package/lib/store/manager.js +1 -1
  225. package/lib/store/modal.js +1 -1
  226. package/lib/store/node.js +1 -1
  227. package/lib/store/pagination.js +1 -1
  228. package/lib/store/root.d.ts +2 -0
  229. package/lib/store/root.js +9 -3
  230. package/lib/store/service.js +1 -1
  231. package/lib/store/table.d.ts +6 -6
  232. package/lib/store/table.js +3 -11
  233. package/lib/store/table2.js +1 -1
  234. package/lib/theme.js +1 -1
  235. package/lib/types.d.ts +27 -0
  236. package/lib/utils/Animation.js +1 -1
  237. package/lib/utils/ColorScale.js +1 -1
  238. package/lib/utils/DataSchema.js +1 -1
  239. package/lib/utils/DataScope.js +1 -1
  240. package/lib/utils/RootClose.js +1 -1
  241. package/lib/utils/SimpleMap.js +1 -1
  242. package/lib/utils/api.d.ts +1 -1
  243. package/lib/utils/api.js +16 -4
  244. package/lib/utils/attachmentAdpator.js +1 -1
  245. package/lib/utils/autobind.js +1 -1
  246. package/lib/utils/columnsSplit.js +1 -1
  247. package/lib/utils/dataMapping.js +1 -1
  248. package/lib/utils/date.js +1 -1
  249. package/lib/utils/debug.js +1 -1
  250. package/lib/utils/decodeEntity.d.ts +5 -0
  251. package/lib/utils/decodeEntity.js +20 -0
  252. package/lib/utils/dom.js +1 -1
  253. package/lib/utils/errors.js +1 -1
  254. package/lib/utils/escapeHtml.js +1 -1
  255. package/lib/utils/filter-schema.js +1 -1
  256. package/lib/utils/filter.js +7 -5
  257. package/lib/utils/formatDuration.js +1 -1
  258. package/lib/utils/formula.js +1 -1
  259. package/lib/utils/getVariable.js +1 -1
  260. package/lib/utils/grammar.js +1 -1
  261. package/lib/utils/handleAction.js +1 -1
  262. package/lib/utils/helper.js +6 -1
  263. package/lib/utils/highlight.js +1 -1
  264. package/lib/utils/icon.d.ts +5 -1
  265. package/lib/utils/icon.js +11 -1
  266. package/lib/utils/image.js +1 -1
  267. package/lib/utils/index.d.ts +1 -0
  268. package/lib/utils/isPureVariable.js +1 -1
  269. package/lib/utils/json-schema-2-amis-schema.js +1 -1
  270. package/lib/utils/keyToPath.js +1 -1
  271. package/lib/utils/makeSorter.js +1 -1
  272. package/lib/utils/normalizeLink.js +1 -1
  273. package/lib/utils/normalizeOptions.js +1 -1
  274. package/lib/utils/object.js +1 -1
  275. package/lib/utils/offset.js +1 -1
  276. package/lib/utils/offsetParent.js +1 -1
  277. package/lib/utils/optionValueCompare.js +1 -1
  278. package/lib/utils/position.js +1 -1
  279. package/lib/utils/prettyBytes.js +1 -1
  280. package/lib/utils/renderer-event.d.ts +7 -0
  281. package/lib/utils/renderer-event.js +14 -1
  282. package/lib/utils/replaceText.js +1 -1
  283. package/lib/utils/resize-sensor.js +1 -1
  284. package/lib/utils/resolveVariable.js +1 -1
  285. package/lib/utils/resolveVariableAndFilter.js +1 -1
  286. package/lib/utils/scrollPosition.js +1 -1
  287. package/lib/utils/string2regExp.js +1 -1
  288. package/lib/utils/stripNumber.js +1 -1
  289. package/lib/utils/style.js +1 -1
  290. package/lib/utils/toNumber.js +1 -1
  291. package/lib/utils/tokenize.js +1 -1
  292. package/lib/utils/tpl-builtin.js +1 -1
  293. package/lib/utils/tpl-lodash.js +1 -1
  294. package/lib/utils/tpl.js +1 -1
  295. package/lib/utils/uncontrollable.js +1 -1
  296. package/lib/utils/validations.js +1 -1
  297. package/package.json +4 -3
  298. package/esm/_virtual/index2.js +0 -8
  299. package/esm/_virtual/react-is.development.js +0 -8
  300. package/esm/_virtual/react-is.production.min.js +0 -8
  301. package/esm/actions/Decorators.d.ts +0 -25
  302. package/esm/actions/Decorators.js +0 -83
  303. package/esm/node_modules/object-assign/index.js +0 -104
  304. package/esm/node_modules/prop-types/checkPropTypes.js +0 -120
  305. package/esm/node_modules/prop-types/factoryWithTypeCheckers.js +0 -630
  306. package/esm/node_modules/prop-types/lib/has.js +0 -16
  307. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -195
  308. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -31
  309. package/esm/node_modules/prop-types/node_modules/react-is/index.js +0 -26
  310. package/esm/node_modules/warning/warning.js +0 -67
  311. package/lib/_virtual/index2.js +0 -12
  312. package/lib/_virtual/react-is.development.js +0 -12
  313. package/lib/_virtual/react-is.production.min.js +0 -12
  314. package/lib/actions/Decorators.d.ts +0 -25
  315. package/lib/actions/Decorators.js +0 -88
  316. package/lib/node_modules/object-assign/index.js +0 -108
  317. package/lib/node_modules/prop-types/checkPropTypes.js +0 -124
  318. package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +0 -634
  319. package/lib/node_modules/prop-types/lib/has.js +0 -20
  320. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -199
  321. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -35
  322. package/lib/node_modules/prop-types/node_modules/react-is/index.js +0 -30
  323. package/lib/node_modules/warning/warning.js +0 -71
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -25,8 +25,8 @@ import '../utils/filter.js';
25
25
  import 'lodash/isObject';
26
26
  import 'lodash/isString';
27
27
  import 'lodash/isBoolean';
28
- import '../utils/image.js';
29
28
  import 'lodash';
29
+ import '../utils/image.js';
30
30
  import '../actions/Action.js';
31
31
  import { getComputedStyle, resizeSensor } from '../utils/resize-sensor.js';
32
32
  import { RootClose } from '../utils/RootClose.js';
@@ -137,6 +137,7 @@ var Position = /** @class */ (function (_super) {
137
137
  // and `props.style`.
138
138
  positionLeft: positionLeft, positionTop: positionTop, className: cx(className, child.props.className), style: __assign(__assign({}, child.props.style), { left: positionLeft, top: positionTop }) }));
139
139
  };
140
+ // setState: (state: any) => void;
140
141
  Position.defaultProps = {
141
142
  containerPadding: 0,
142
143
  placement: 'right',
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -24,12 +24,11 @@ import '../utils/filter.js';
24
24
  import 'lodash/isObject';
25
25
  import 'lodash/isString';
26
26
  import 'lodash/isBoolean';
27
- import '../utils/image.js';
28
27
  import 'lodash';
28
+ import '../utils/image.js';
29
29
  import '../actions/Action.js';
30
30
  import '../utils/resize-sensor.js';
31
31
  import '../node_modules/dom-helpers/esm/addEventListener.js';
32
- import '../node_modules/warning/warning.js';
33
32
  import '../utils/SimpleMap.js';
34
33
  import 'lodash/mapValues';
35
34
  import 'lodash/camelCase';
package/esm/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
package/esm/factory.d.ts CHANGED
@@ -3,7 +3,7 @@ import { IRendererStore, IIRendererStore } from './store/index';
3
3
  import { fetcherResult, SchemaNode, Schema, PlainObject } from './types';
4
4
  import { ThemeProps } from './theme';
5
5
  import { LocaleProps } from './locale';
6
- import { RendererEnv } from './env';
6
+ import type { RendererEnv } from './env';
7
7
  import { OnEventProps } from './utils/renderer-event';
8
8
  export interface TestFunc {
9
9
  (path: string, schema?: Schema, resolveRenderer?: (path: string, schema?: Schema, props?: any) => null | RendererConfig): boolean;
package/esm/factory.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -253,7 +253,7 @@ function resolveRenderer(path, schema) {
253
253
  else if (cache[path]) {
254
254
  return cache[path];
255
255
  }
256
- else if (path && path.length > 1024) {
256
+ else if (path && path.length > 3072) {
257
257
  throw new Error('Path太长是不是死循环了?');
258
258
  }
259
259
  var renderer = null;
package/esm/index.d.ts CHANGED
@@ -6,27 +6,38 @@
6
6
  * This source code is licensed under the Apache license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { Renderer, getRendererByName, getRenderers, registerRenderer, unRegisterRenderer, resolveRenderer, filterSchema, clearStoresCache, updateEnv, RenderOptions, addSchemaFilter, RendererProps, extendDefaultEnv, RendererConfig } from './factory';
9
+ import { Renderer, getRendererByName, getRenderers, registerRenderer, unRegisterRenderer, resolveRenderer, filterSchema, clearStoresCache, updateEnv, addSchemaFilter, extendDefaultEnv } from './factory';
10
+ import type { RenderOptions, RendererConfig, RendererProps } from './factory';
10
11
  import './renderers/builtin';
11
12
  export * from './utils/index';
12
13
  export * from './types';
13
14
  export * from './store';
14
15
  import * as utils from './utils/helper';
15
16
  import { RegisterStore } from './store';
16
- import { setDefaultLocale, getDefaultLocale, makeTranslator, register as registerLocale, extendLocale, localeable, LocaleProps, TranslateFn } from './locale';
17
- import Scoped, { IScopedContext, ScopedContext } from './Scoped';
18
- import { classnames, getClassPrefix, setDefaultTheme, theme, getTheme, ThemeProps, themeable, ClassNamesFn, makeClassnames } from './theme';
17
+ import { setDefaultLocale, getDefaultLocale, makeTranslator, register as registerLocale, extendLocale, localeable } from './locale';
18
+ import type { LocaleProps, TranslateFn } from './locale';
19
+ import Scoped, { ScopedContext } from './Scoped';
20
+ import type { IScopedContext } from './Scoped';
21
+ import { classnames, getClassPrefix, setDefaultTheme, theme, getTheme, themeable, makeClassnames } from './theme';
22
+ import type { ClassNamesFn, ThemeProps } from './theme';
19
23
  declare const classPrefix: string | undefined;
20
24
  export * from './actions';
21
- import FormItem, { FormBaseControl, FormControlProps, FormItemWrap, FormItemProps, registerFormItem, getFormItemByName } from './renderers/Item';
22
- import { FormOptionsControl, OptionsControl, OptionsControlProps, registerOptionsControl } from './renderers/Options';
25
+ import FormItem, { FormItemWrap, registerFormItem, getFormItemByName } from './renderers/Item';
26
+ import type { FormBaseControl, FormControlProps, FormItemProps } from './renderers/Item';
27
+ import { OptionsControl, registerOptionsControl } from './renderers/Options';
28
+ import type { OptionsControlProps } from './renderers/Options';
29
+ import type { FormOptionsControl } from './renderers/Options';
23
30
  import { Schema } from './types';
24
31
  import { addRootWrapper, RootRenderProps } from './Root';
25
- import { EnvContext, RendererEnv } from './env';
26
- import { evaluate, Evaluator, extendsFilters, FilterContext, filters, getFilters, lexer, parse, registerFilter } from 'amis-formula';
32
+ import { EnvContext } from './env';
33
+ import type { RendererEnv } from './env';
34
+ import { evaluate, Evaluator, extendsFilters, filters, getFilters, lexer, parse, registerFilter } from 'amis-formula';
35
+ import type { FilterContext } from 'amis-formula';
27
36
  import LazyComponent from './components/LazyComponent';
28
37
  import Overlay from './components/Overlay';
29
38
  import PopOver from './components/PopOver';
30
- import { FormHorizontal, FormRenderer } from './renderers/Form';
39
+ import { FormRenderer } from './renderers/Form';
40
+ import type { FormHorizontal } from './renderers/Form';
41
+ export declare const version: any;
31
42
  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, setDefaultTheme, theme, themeable, ThemeProps, getTheme, classPrefix, getClassPrefix, classnames, makeClassnames, getDefaultLocale, setDefaultLocale, registerLocale, makeTranslator, extendLocale, localeable, LocaleProps, TranslateFn, ClassNamesFn, parse, lexer, Evaluator, FilterContext, filters, getFilters, registerFilter, extendsFilters, evaluate, LazyComponent, Overlay, PopOver, addSchemaFilter, OptionsControlProps, FormOptionsControl, FormControlProps, FormBaseControl, extendDefaultEnv, addRootWrapper, RendererConfig };
32
43
  export declare function render(schema: Schema, props?: RootRenderProps, options?: RenderOptions, pathPrefix?: string): JSX.Element;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -48,7 +48,7 @@ export { offsetParent } from './utils/offsetParent.js';
48
48
  export { matchOptionValue, optionValueCompare } from './utils/optionValueCompare.js';
49
49
  export { position } from './utils/position.js';
50
50
  export { prettyBytes } from './utils/prettyBytes.js';
51
- export { bindEvent, createRendererEvent, dispatchEvent, getRendererEventListeners } from './utils/renderer-event.js';
51
+ export { bindEvent, createRendererEvent, dispatchEvent, getRendererEventListeners, resolveEventData } from './utils/renderer-event.js';
52
52
  import { replaceText } from './utils/replaceText.js';
53
53
  export { replaceText } from './utils/replaceText.js';
54
54
  export { getComputedStyle, resizeSensor } from './utils/resize-sensor.js';
@@ -65,6 +65,7 @@ export { evalExpression, evalJS, filter, registerTplEnginer, setCustomEvalExpres
65
65
  export { uncontrollable } from './utils/uncontrollable.js';
66
66
  export { addRule, str2rules, validate, validateMessages, validateObject, validations } from './utils/validations.js';
67
67
  export { toNumber } from './utils/toNumber.js';
68
+ export { decodeEntity } from './utils/decodeEntity.js';
68
69
  export { default as animation } from './utils/Animation.js';
69
70
  import { RendererStore } from './store/index.js';
70
71
  export { RegisterStore, RendererStore } from './store/index.js';
@@ -90,7 +91,6 @@ import './actions/EmailAction.js';
90
91
  import './actions/LinkAction.js';
91
92
  import './actions/ToastAction.js';
92
93
  import './actions/PageAction.js';
93
- export { bindRendererEvent, rendererEventDispatcher } from './actions/Decorators.js';
94
94
  export { LoopStatus, getActionByType, registerAction, runAction, runActions } from './actions/Action.js';
95
95
  export { FormItem, FormItemWrap, getFormItemByName, registerFormItem } from './renderers/Item.js';
96
96
  export { OptionsControl, registerOptionsControl } from './renderers/Options.js';
@@ -121,6 +121,8 @@ export { AppStore } from './store/app.js';
121
121
  export { StoreNode } from './store/node.js';
122
122
 
123
123
  var classPrefix = getClassPrefix();
124
+ // @ts-ignore
125
+ var version = "2.4.0";
124
126
  function render(schema, props, options, pathPrefix) {
125
127
  if (props === void 0) { props = {}; }
126
128
  if (options === void 0) { options = {}; }
@@ -168,4 +170,4 @@ function render(schema, props, options, pathPrefix) {
168
170
  React.createElement(ScopedRootRenderer, __assign({}, props, { schema: schema, pathPrefix: pathPrefix, rootStore: store, env: env, theme: theme, locale: locale, translate: translate }))));
169
171
  }
170
172
 
171
- export { classPrefix, render };
173
+ export { classPrefix, render, version };
package/esm/locale.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,9 +1,9 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
6
- import { __require as requireReactPropTypesSecret } from './lib/ReactPropTypesSecret.js';
6
+ import ReactPropTypesSecret_1 from './lib/ReactPropTypesSecret.js';
7
7
 
8
8
  /**
9
9
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -12,68 +12,59 @@ import { __require as requireReactPropTypesSecret } from './lib/ReactPropTypesSe
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
14
 
15
- var factoryWithThrowingShims;
16
- var hasRequiredFactoryWithThrowingShims;
15
+ var ReactPropTypesSecret = ReactPropTypesSecret_1;
17
16
 
18
- function requireFactoryWithThrowingShims () {
19
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
20
- hasRequiredFactoryWithThrowingShims = 1;
17
+ function emptyFunction() {}
18
+ function emptyFunctionWithReset() {}
19
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
21
20
 
22
- var ReactPropTypesSecret = requireReactPropTypesSecret();
21
+ var factoryWithThrowingShims = function() {
22
+ function shim(props, propName, componentName, location, propFullName, secret) {
23
+ if (secret === ReactPropTypesSecret) {
24
+ // It is still safe when called from React.
25
+ return;
26
+ }
27
+ var err = new Error(
28
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
29
+ 'Use PropTypes.checkPropTypes() to call them. ' +
30
+ 'Read more at http://fb.me/use-check-prop-types'
31
+ );
32
+ err.name = 'Invariant Violation';
33
+ throw err;
34
+ } shim.isRequired = shim;
35
+ function getShim() {
36
+ return shim;
37
+ } // Important!
38
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
39
+ var ReactPropTypes = {
40
+ array: shim,
41
+ bigint: shim,
42
+ bool: shim,
43
+ func: shim,
44
+ number: shim,
45
+ object: shim,
46
+ string: shim,
47
+ symbol: shim,
23
48
 
24
- function emptyFunction() {}
25
- function emptyFunctionWithReset() {}
26
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
49
+ any: shim,
50
+ arrayOf: getShim,
51
+ element: shim,
52
+ elementType: shim,
53
+ instanceOf: getShim,
54
+ node: shim,
55
+ objectOf: getShim,
56
+ oneOf: getShim,
57
+ oneOfType: getShim,
58
+ shape: getShim,
59
+ exact: getShim,
27
60
 
28
- factoryWithThrowingShims = function() {
29
- function shim(props, propName, componentName, location, propFullName, secret) {
30
- if (secret === ReactPropTypesSecret) {
31
- // It is still safe when called from React.
32
- return;
33
- }
34
- var err = new Error(
35
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
36
- 'Use PropTypes.checkPropTypes() to call them. ' +
37
- 'Read more at http://fb.me/use-check-prop-types'
38
- );
39
- err.name = 'Invariant Violation';
40
- throw err;
41
- } shim.isRequired = shim;
42
- function getShim() {
43
- return shim;
44
- } // Important!
45
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
46
- var ReactPropTypes = {
47
- array: shim,
48
- bigint: shim,
49
- bool: shim,
50
- func: shim,
51
- number: shim,
52
- object: shim,
53
- string: shim,
54
- symbol: shim,
61
+ checkPropTypes: emptyFunctionWithReset,
62
+ resetWarningCache: emptyFunction
63
+ };
55
64
 
56
- any: shim,
57
- arrayOf: getShim,
58
- element: shim,
59
- elementType: shim,
60
- instanceOf: getShim,
61
- node: shim,
62
- objectOf: getShim,
63
- oneOf: getShim,
64
- oneOfType: getShim,
65
- shape: getShim,
66
- exact: getShim,
65
+ ReactPropTypes.PropTypes = ReactPropTypes;
67
66
 
68
- checkPropTypes: emptyFunctionWithReset,
69
- resetWarningCache: emptyFunction
70
- };
67
+ return ReactPropTypes;
68
+ };
71
69
 
72
- ReactPropTypes.PropTypes = ReactPropTypes;
73
-
74
- return ReactPropTypes;
75
- };
76
- return factoryWithThrowingShims;
77
- }
78
-
79
- export { requireFactoryWithThrowingShims as __require };
70
+ export { factoryWithThrowingShims as default };
@@ -1,12 +1,10 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
6
6
  import { p as propTypes } from '../../_virtual/index.js';
7
- import { __require as requireReactIs } from './node_modules/react-is/index.js';
8
- import { __require as requireFactoryWithTypeCheckers } from './factoryWithTypeCheckers.js';
9
- import { __require as requireFactoryWithThrowingShims } from './factoryWithThrowingShims.js';
7
+ import factoryWithThrowingShims from './factoryWithThrowingShims.js';
10
8
 
11
9
  /**
12
10
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -15,17 +13,10 @@ import { __require as requireFactoryWithThrowingShims } from './factoryWithThrow
15
13
  * LICENSE file in the root directory of this source tree.
16
14
  */
17
15
 
18
- if (process.env.NODE_ENV !== 'production') {
19
- var ReactIs = requireReactIs();
20
-
21
- // By explicitly using `prop-types` you are opting into new development behavior.
22
- // http://fb.me/prop-types-in-prod
23
- var throwOnDirectAccess = true;
24
- propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
25
- } else {
16
+ {
26
17
  // By explicitly using `prop-types` you are opting into new production behavior.
27
18
  // http://fb.me/prop-types-in-prod
28
- propTypes.exports = requireFactoryWithThrowingShims()();
19
+ propTypes.exports = factoryWithThrowingShims();
29
20
  }
30
21
 
31
22
  var exports = propTypes.exports;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -10,17 +10,8 @@
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
 
13
- var ReactPropTypesSecret_1;
14
- var hasRequiredReactPropTypesSecret;
13
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
15
14
 
16
- function requireReactPropTypesSecret () {
17
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
18
- hasRequiredReactPropTypesSecret = 1;
15
+ var ReactPropTypesSecret_1 = ReactPropTypesSecret;
19
16
 
20
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
21
-
22
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
23
- return ReactPropTypesSecret_1;
24
- }
25
-
26
- export { requireReactPropTypesSecret as __require };
17
+ export { ReactPropTypesSecret_1 as default };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -7,7 +7,6 @@ import contains from '../../dom-helpers/esm/contains.js';
7
7
  import listen from '../../dom-helpers/esm/listen.js';
8
8
  import { useRef, useCallback, useEffect } from 'react';
9
9
  import useEventCallback from '../../@restart/hooks/esm/useEventCallback.js';
10
- import warning_1 from '../../warning/warning.js';
11
10
  import ownerDocument from './ownerDocument.js';
12
11
 
13
12
  var escapeKeyCode = 27;
@@ -48,7 +47,6 @@ function useRootClose(ref, onRootClose, _temp) {
48
47
  var onClose = onRootClose || noop;
49
48
  var handleMouseCapture = useCallback(function (e) {
50
49
  var currentTarget = getRefTarget(ref);
51
- warning_1(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node');
52
50
  preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, e.target);
53
51
  }, [ref]);
54
52
  var handleMouse = useEventCallback(function (e) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { RendererProps } from '../factory';
4
4
  import { IFormStore } from '../store/form';
5
- import { SchemaNode, ActionObject, ClassName, BaseApiObject } from '../types';
5
+ import { SchemaNode, ActionObject, ClassName, BaseApiObject, SchemaExpression, SchemaClassName } from '../types';
6
6
  import { IScopedContext } from '../Scoped';
7
7
  import type { LabelAlign } from './Item';
8
8
  export interface FormHorizontal {
@@ -236,6 +236,12 @@ export interface FormSchemaBase {
236
236
  * label自定义宽度,默认单位为px
237
237
  */
238
238
  labelWidth?: number | string;
239
+ /**
240
+ * 展示态时的className
241
+ */
242
+ static?: boolean;
243
+ staticOn?: SchemaExpression;
244
+ staticClassName?: SchemaClassName;
239
245
  }
240
246
  export declare type FormGroup = FormSchemaBase & {
241
247
  title?: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-core v2.3.1
2
+ * amis-core v2.4.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -854,7 +854,7 @@ var Form = /** @class */ (function (_super) {
854
854
  }
855
855
  var props = __assign(__assign({}, this.props), otherProps);
856
856
  var form = this.props.store;
857
- var render = props.render, mode = props.mode, horizontal = props.horizontal, store = props.store, disabled = props.disabled, controlWidth = props.controlWidth, resolveDefinitions = props.resolveDefinitions, lazyChange = props.lazyChange; props.formLazyChange; var dispatchEvent = props.dispatchEvent, labelAlign = props.labelAlign, labelWidth = props.labelWidth;
857
+ var render = props.render, mode = props.mode, horizontal = props.horizontal, store = props.store, disabled = props.disabled, controlWidth = props.controlWidth, resolveDefinitions = props.resolveDefinitions, lazyChange = props.lazyChange; props.formLazyChange; var dispatchEvent = props.dispatchEvent, labelAlign = props.labelAlign, labelWidth = props.labelWidth, _a = props.static, isStatic = _a === void 0 ? false : _a;
858
858
  var subProps = {
859
859
  formStore: form,
860
860
  data: store.data,
@@ -873,6 +873,13 @@ var Form = /** @class */ (function (_super) {
873
873
  disabled: disabled ||
874
874
  control.disabled ||
875
875
  (form.loading ? true : undefined),
876
+ /**
877
+ * 静态展示 优先级逻辑
878
+ * 1. 表单子项 static: true 始终保持静态
879
+ * 2. 表单子项 static: false 或 不配置,跟随父表单
880
+ * 3. 动作控制 表单子项 时,无视配置,优先级最高
881
+ */
882
+ static: control.static || isStatic,
876
883
  btnDisabled: disabled || form.loading || form.validating,
877
884
  onAction: this.handleAction,
878
885
  onQuery: this.handleQuery,
@@ -896,14 +903,14 @@ var Form = /** @class */ (function (_super) {
896
903
  return render("".concat(region ? "".concat(region, "/") : '').concat(key), subSchema, subProps);
897
904
  };
898
905
  Form.prototype.renderBody = function () {
899
- var _a = this.props, body = _a.body, mode = _a.mode, className = _a.className, cx = _a.classnames, debug = _a.debug, debugConfig = _a.debugConfig, $path = _a.$path, store = _a.store, columnCount = _a.columnCount, render = _a.render;
906
+ var _a = this.props, body = _a.body, mode = _a.mode, className = _a.className, cx = _a.classnames, debug = _a.debug, debugConfig = _a.debugConfig, $path = _a.$path, store = _a.store, columnCount = _a.columnCount, render = _a.render, staticClassName = _a.staticClassName, _b = _a.static, isStatic = _b === void 0 ? false : _b;
900
907
  var restError = store.restError;
901
908
  var WrapperComponent = this.props.wrapperComponent ||
902
909
  (/(?:\/|^)form\//.test($path) ? 'div' : 'form');
903
910
  var padDom = repeatCount(columnCount && Array.isArray(body)
904
911
  ? columnCount - (body.length % columnCount)
905
912
  : 0, function (index) { return (React.createElement("div", { className: cx("Form-item Form-item--".concat(mode, " is-placeholder")), key: index })); });
906
- return (React.createElement(WrapperComponent, { className: cx("Form", "Form--".concat(mode || 'normal'), columnCount ? "Form--column Form--column-".concat(columnCount) : null, className), onSubmit: this.handleFormSubmit, noValidate: true },
913
+ return (React.createElement(WrapperComponent, { className: cx("Form", "Form--".concat(mode || 'normal'), columnCount ? "Form--column Form--column-".concat(columnCount) : null, staticClassName && isStatic ? staticClassName : className, isStatic ? 'Form--isStatic' : null), onSubmit: this.handleFormSubmit, noValidate: true },
907
914
  React.createElement("input", { type: "submit", style: { display: 'none' } }),
908
915
  debug
909
916
  ? render('form-debug-json', extend({
@@ -942,7 +949,7 @@ var Form = /** @class */ (function (_super) {
942
949
  })));
943
950
  };
944
951
  Form.prototype.render = function () {
945
- var _a = this.props; _a.$path; _a.$schema; var wrapWithPanel = _a.wrapWithPanel, render = _a.render, title = _a.title, store = _a.store, panelClassName = _a.panelClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, footerWrapClassName = _a.footerWrapClassName, actionsClassName = _a.actionsClassName, bodyClassName = _a.bodyClassName, cx = _a.classnames, affixFooter = _a.affixFooter, lazyLoad = _a.lazyLoad, __ = _a.translate, footer = _a.footer; _a.formStore;
952
+ var _a = this.props; _a.$path; _a.$schema; var wrapWithPanel = _a.wrapWithPanel, render = _a.render, title = _a.title, store = _a.store, panelClassName = _a.panelClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, footerWrapClassName = _a.footerWrapClassName, actionsClassName = _a.actionsClassName, bodyClassName = _a.bodyClassName, cx = _a.classnames, affixFooter = _a.affixFooter, lazyLoad = _a.lazyLoad, __ = _a.translate, footer = _a.footer;
946
953
  var body = this.renderBody();
947
954
  if (wrapWithPanel) {
948
955
  body = render('body', {
@@ -1155,7 +1162,11 @@ var FormRenderer = /** @class */ (function (_super) {
1155
1162
  return _super.prototype.receive.call(this, values, undefined, replace);
1156
1163
  };
1157
1164
  FormRenderer.prototype.setData = function (values, replace) {
1158
- return _super.prototype.setValues.call(this, values);
1165
+ var _a = this.props, onChange = _a.onChange, store = _a.store;
1166
+ _super.prototype.setValues.call(this, values);
1167
+ // 触发表单change
1168
+ onChange &&
1169
+ onChange(store.data, difference(store.data, store.pristine), this.props);
1159
1170
  };
1160
1171
  FormRenderer.contextType = ScopedContext;
1161
1172
  FormRenderer = __decorate([
@@ -516,9 +516,6 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
516
516
  readonly fetcher: any;
517
517
  readonly notify: any;
518
518
  readonly isCancel: (value: any) => boolean;
519
- /**
520
- * 输入提示,聚焦的时候显示
521
- */
522
519
  readonly __: import("..").TranslateFn<any>;
523
520
  getStoreById(id: string): {
524
521
  id: string;
@@ -612,6 +609,9 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
612
609
  addStore(store: {
613
610
  [propName: string]: any;
614
611
  storeType: string;
612
+ /**
613
+ * 表单 control 是否为 inline 模式。
614
+ */
615
615
  id: string;
616
616
  path: string;
617
617
  parentId?: string | undefined;
@@ -707,9 +707,6 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
707
707
  readonly fetcher: any;
708
708
  readonly notify: any;
709
709
  readonly isCancel: (value: any) => boolean;
710
- /**
711
- * 输入提示,聚焦的时候显示
712
- */
713
710
  readonly __: import("..").TranslateFn<any>;
714
711
  getStoreById(id: string): {
715
712
  id: string;
@@ -803,6 +800,9 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
803
800
  addStore(store: {
804
801
  [propName: string]: any;
805
802
  storeType: string;
803
+ /**
804
+ * 表单 control 是否为 inline 模式。
805
+ */
806
806
  id: string;
807
807
  path: string;
808
808
  parentId?: string | undefined;