amis 1.8.0-beta.1 → 1.8.0-beta.13

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 (426) hide show
  1. package/lib/Schema.d.ts +9 -2
  2. package/lib/Schema.js.map +1 -1
  3. package/lib/SchemaRenderer.js +19 -3
  4. package/lib/SchemaRenderer.js.map +2 -2
  5. package/lib/WithRootStore.d.ts +18 -0
  6. package/lib/WithStore.js +2 -1
  7. package/lib/WithStore.js.map +2 -2
  8. package/lib/actions/CmptAction.js +26 -4
  9. package/lib/actions/CmptAction.js.map +2 -2
  10. package/lib/actions/PageAction.d.ts +32 -0
  11. package/lib/actions/PageAction.js +72 -0
  12. package/lib/actions/PageAction.js.map +13 -0
  13. package/lib/actions/index.d.ts +1 -0
  14. package/lib/actions/index.js +1 -0
  15. package/lib/actions/index.js.map +2 -2
  16. package/lib/components/AssociatedSelection.js +9 -2
  17. package/lib/components/AssociatedSelection.js.map +2 -2
  18. package/lib/components/BarCode.js +1 -1
  19. package/lib/components/BarCode.js.map +2 -2
  20. package/lib/components/CalendarMobile.d.ts +84 -84
  21. package/lib/components/Cascader.d.ts +2 -0
  22. package/lib/components/Cascader.js +28 -12
  23. package/lib/components/Cascader.js.map +2 -2
  24. package/lib/components/Checkbox.d.ts +24 -23
  25. package/lib/components/Checkbox.js +5 -1
  26. package/lib/components/Checkbox.js.map +2 -2
  27. package/lib/components/Collapse.d.ts +20 -20
  28. package/lib/components/DatePicker.d.ts +84 -84
  29. package/lib/components/DatePicker.js +8 -5
  30. package/lib/components/DatePicker.js.map +2 -2
  31. package/lib/components/DateRangePicker.d.ts +285 -171
  32. package/lib/components/DateRangePicker.js +471 -66
  33. package/lib/components/DateRangePicker.js.map +2 -2
  34. package/lib/components/Drawer.js +1 -1
  35. package/lib/components/Drawer.js.map +2 -2
  36. package/lib/components/ListGroup.d.ts +21 -21
  37. package/lib/components/Modal.js +1 -1
  38. package/lib/components/Modal.js.map +2 -2
  39. package/lib/components/MonthRangePicker.d.ts +84 -84
  40. package/lib/components/Overlay.d.ts +1 -0
  41. package/lib/components/Overlay.js +4 -3
  42. package/lib/components/Overlay.js.map +2 -2
  43. package/lib/components/Progress.d.ts +29 -24
  44. package/lib/components/Progress.js +44 -16
  45. package/lib/components/Progress.js.map +2 -2
  46. package/lib/components/PullRefresh.d.ts +86 -0
  47. package/lib/components/PullRefresh.js +135 -0
  48. package/lib/components/PullRefresh.js.map +13 -0
  49. package/lib/components/Radios.d.ts +22 -22
  50. package/lib/components/Radios.js +3 -5
  51. package/lib/components/Radios.js.map +2 -2
  52. package/lib/components/Range.d.ts +2 -2
  53. package/lib/components/Range.js +24 -11
  54. package/lib/components/Range.js.map +2 -2
  55. package/lib/components/Spinner.d.ts +200 -107
  56. package/lib/components/Spinner.js +30 -26
  57. package/lib/components/Spinner.js.map +2 -2
  58. package/lib/components/Steps.d.ts +6 -0
  59. package/lib/components/Steps.js +13 -9
  60. package/lib/components/Steps.js.map +2 -2
  61. package/lib/components/Tooltip.d.ts +4 -0
  62. package/lib/components/Tooltip.js +6 -4
  63. package/lib/components/Tooltip.js.map +2 -2
  64. package/lib/components/TooltipWrapper.d.ts +66 -4
  65. package/lib/components/TooltipWrapper.js +40 -8
  66. package/lib/components/TooltipWrapper.js.map +2 -2
  67. package/lib/components/Transfer.d.ts +84 -84
  68. package/lib/components/TransferDropDown.d.ts +84 -84
  69. package/lib/components/Tree.d.ts +87 -85
  70. package/lib/components/Tree.js +13 -5
  71. package/lib/components/Tree.js.map +2 -2
  72. package/lib/components/TreeSelection.d.ts +84 -84
  73. package/lib/components/calendar/Calendar.js +0 -13
  74. package/lib/components/calendar/Calendar.js.map +2 -2
  75. package/lib/components/calendar/TimeView.d.ts +1 -0
  76. package/lib/components/calendar/TimeView.js +7 -0
  77. package/lib/components/calendar/TimeView.js.map +2 -2
  78. package/lib/components/calendar/YearsView.js +3 -3
  79. package/lib/components/calendar/YearsView.js.map +2 -2
  80. package/lib/components/condition-builder/Expression.d.ts +1 -0
  81. package/lib/components/condition-builder/Expression.js +4 -4
  82. package/lib/components/condition-builder/Expression.js.map +2 -2
  83. package/lib/components/condition-builder/Field.d.ts +1 -0
  84. package/lib/components/condition-builder/Field.js +3 -2
  85. package/lib/components/condition-builder/Field.js.map +2 -2
  86. package/lib/components/condition-builder/Group.d.ts +1 -0
  87. package/lib/components/condition-builder/Group.js +2 -2
  88. package/lib/components/condition-builder/Group.js.map +2 -2
  89. package/lib/components/condition-builder/GroupOrItem.d.ts +1 -0
  90. package/lib/components/condition-builder/GroupOrItem.js +2 -2
  91. package/lib/components/condition-builder/GroupOrItem.js.map +2 -2
  92. package/lib/components/condition-builder/InputSwitch.d.ts +2 -1
  93. package/lib/components/condition-builder/InputSwitch.js +2 -2
  94. package/lib/components/condition-builder/InputSwitch.js.map +2 -2
  95. package/lib/components/condition-builder/Item.d.ts +1 -0
  96. package/lib/components/condition-builder/Item.js +9 -8
  97. package/lib/components/condition-builder/Item.js.map +2 -2
  98. package/lib/components/condition-builder/Value.d.ts +1 -0
  99. package/lib/components/condition-builder/Value.js +5 -5
  100. package/lib/components/condition-builder/Value.js.map +2 -2
  101. package/lib/components/condition-builder/index.d.ts +1 -0
  102. package/lib/components/condition-builder/index.js +2 -2
  103. package/lib/components/condition-builder/index.js.map +2 -2
  104. package/lib/components/formula/Editor.d.ts +87 -85
  105. package/lib/components/formula/Editor.js +10 -6
  106. package/lib/components/formula/Editor.js.map +2 -2
  107. package/lib/components/formula/Picker.js +3 -1
  108. package/lib/components/formula/Picker.js.map +2 -2
  109. package/lib/factory.d.ts +5 -0
  110. package/lib/factory.js +22 -1
  111. package/lib/factory.js.map +2 -2
  112. package/lib/index.js +1 -1
  113. package/lib/locale/de-DE.js +18 -1
  114. package/lib/locale/de-DE.js.map +2 -2
  115. package/lib/locale/en-US.js +18 -1
  116. package/lib/locale/en-US.js.map +2 -2
  117. package/lib/locale/zh-CN.js +18 -1
  118. package/lib/locale/zh-CN.js.map +2 -2
  119. package/lib/renderers/Action.d.ts +2 -0
  120. package/lib/renderers/Action.js +23 -5
  121. package/lib/renderers/Action.js.map +2 -2
  122. package/lib/renderers/App.d.ts +1 -0
  123. package/lib/renderers/App.js +3 -0
  124. package/lib/renderers/App.js.map +2 -2
  125. package/lib/renderers/CRUD.d.ts +8 -0
  126. package/lib/renderers/CRUD.js +12 -5
  127. package/lib/renderers/CRUD.js.map +2 -2
  128. package/lib/renderers/Carousel.d.ts +1 -0
  129. package/lib/renderers/Carousel.js +13 -1
  130. package/lib/renderers/Carousel.js.map +2 -2
  131. package/lib/renderers/Chart.d.ts +1 -0
  132. package/lib/renderers/Chart.js +3 -0
  133. package/lib/renderers/Chart.js.map +2 -2
  134. package/lib/renderers/Dialog.d.ts +1 -0
  135. package/lib/renderers/Dialog.js +3 -0
  136. package/lib/renderers/Dialog.js.map +2 -2
  137. package/lib/renderers/Drawer.d.ts +1 -0
  138. package/lib/renderers/Drawer.js +6 -1
  139. package/lib/renderers/Drawer.js.map +2 -2
  140. package/lib/renderers/Form/Checkbox.d.ts +5 -2
  141. package/lib/renderers/Form/Checkbox.js +2 -2
  142. package/lib/renderers/Form/Checkbox.js.map +2 -2
  143. package/lib/renderers/Form/Checkboxes.d.ts +7 -2
  144. package/lib/renderers/Form/Checkboxes.js +101 -12
  145. package/lib/renderers/Form/Checkboxes.js.map +2 -2
  146. package/lib/renderers/Form/Combo.d.ts +2 -1
  147. package/lib/renderers/Form/Combo.js +54 -16
  148. package/lib/renderers/Form/Combo.js.map +2 -2
  149. package/lib/renderers/Form/DiffEditor.d.ts +3 -2
  150. package/lib/renderers/Form/Editor.d.ts +2 -2
  151. package/lib/renderers/Form/InputCity.d.ts +87 -84
  152. package/lib/renderers/Form/InputCity.js +44 -2
  153. package/lib/renderers/Form/InputCity.js.map +2 -2
  154. package/lib/renderers/Form/InputDate.js +10 -3
  155. package/lib/renderers/Form/InputDate.js.map +2 -2
  156. package/lib/renderers/Form/InputDateRange.d.ts +5 -0
  157. package/lib/renderers/Form/InputDateRange.js +12 -3
  158. package/lib/renderers/Form/InputDateRange.js.map +2 -2
  159. package/lib/renderers/Form/InputFile.js +19 -8
  160. package/lib/renderers/Form/InputFile.js.map +2 -2
  161. package/lib/renderers/Form/InputImage.js +18 -7
  162. package/lib/renderers/Form/InputImage.js.map +2 -2
  163. package/lib/renderers/Form/InputMonthRange.js +5 -1
  164. package/lib/renderers/Form/InputMonthRange.js.map +2 -2
  165. package/lib/renderers/Form/InputRange.js +13 -14
  166. package/lib/renderers/Form/InputRange.js.map +2 -2
  167. package/lib/renderers/Form/InputText.d.ts +1 -1
  168. package/lib/renderers/Form/InputText.js +8 -10
  169. package/lib/renderers/Form/InputText.js.map +2 -2
  170. package/lib/renderers/Form/InputTree.d.ts +5 -0
  171. package/lib/renderers/Form/InputTree.js +51 -2
  172. package/lib/renderers/Form/InputTree.js.map +2 -2
  173. package/lib/renderers/Form/Item.d.ts +79 -76
  174. package/lib/renderers/Form/Item.js +3 -1
  175. package/lib/renderers/Form/Item.js.map +2 -2
  176. package/lib/renderers/Form/NestedSelect.d.ts +4 -0
  177. package/lib/renderers/Form/NestedSelect.js +14 -5
  178. package/lib/renderers/Form/NestedSelect.js.map +2 -2
  179. package/lib/renderers/Form/Options.js +61 -27
  180. package/lib/renderers/Form/Options.js.map +2 -2
  181. package/lib/renderers/Form/Select.js +4 -2
  182. package/lib/renderers/Form/Select.js.map +2 -2
  183. package/lib/renderers/Form/Textarea.js +2 -1
  184. package/lib/renderers/Form/Textarea.js.map +2 -2
  185. package/lib/renderers/Form/TreeSelect.d.ts +11 -2
  186. package/lib/renderers/Form/TreeSelect.js +56 -10
  187. package/lib/renderers/Form/TreeSelect.js.map +2 -2
  188. package/lib/renderers/Form/index.d.ts +3 -0
  189. package/lib/renderers/Form/index.js +53 -16
  190. package/lib/renderers/Form/index.js.map +2 -2
  191. package/lib/renderers/Form/wrapControl.d.ts +10 -0
  192. package/lib/renderers/Form/wrapControl.js +41 -19
  193. package/lib/renderers/Form/wrapControl.js.map +2 -2
  194. package/lib/renderers/Nav.d.ts +82 -67
  195. package/lib/renderers/Nav.js +49 -13
  196. package/lib/renderers/Nav.js.map +2 -2
  197. package/lib/renderers/Page.d.ts +21 -0
  198. package/lib/renderers/Page.js +54 -14
  199. package/lib/renderers/Page.js.map +2 -2
  200. package/lib/renderers/Progress.d.ts +3 -6
  201. package/lib/renderers/Progress.js +2 -2
  202. package/lib/renderers/Progress.js.map +2 -2
  203. package/lib/renderers/Service.d.ts +3 -0
  204. package/lib/renderers/Service.js +55 -20
  205. package/lib/renderers/Service.js.map +2 -2
  206. package/lib/renderers/Spinner.d.ts +58 -2
  207. package/lib/renderers/Spinner.js +8 -1
  208. package/lib/renderers/Spinner.js.map +2 -2
  209. package/lib/renderers/Steps.d.ts +8 -0
  210. package/lib/renderers/Steps.js +2 -2
  211. package/lib/renderers/Steps.js.map +2 -2
  212. package/lib/renderers/Table/ColumnToggler.d.ts +4 -0
  213. package/lib/renderers/Table/ColumnToggler.js +11 -6
  214. package/lib/renderers/Table/ColumnToggler.js.map +2 -2
  215. package/lib/renderers/Table/TableCell.js +27 -1
  216. package/lib/renderers/Table/TableCell.js.map +2 -2
  217. package/lib/renderers/Table/index.d.ts +2 -0
  218. package/lib/renderers/Table/index.js +23 -10
  219. package/lib/renderers/Table/index.js.map +2 -2
  220. package/lib/renderers/Tabs.d.ts +4 -0
  221. package/lib/renderers/Tabs.js +22 -6
  222. package/lib/renderers/Tabs.js.map +2 -2
  223. package/lib/renderers/TooltipWrapper.d.ts +35 -6
  224. package/lib/renderers/TooltipWrapper.js +19 -8
  225. package/lib/renderers/TooltipWrapper.js.map +2 -2
  226. package/lib/renderers/Wizard.d.ts +7 -3
  227. package/lib/renderers/Wizard.js +269 -152
  228. package/lib/renderers/Wizard.js.map +2 -2
  229. package/lib/store/combo.d.ts +2 -2
  230. package/lib/store/crud.d.ts +1 -0
  231. package/lib/store/crud.js +55 -19
  232. package/lib/store/crud.js.map +2 -2
  233. package/lib/store/form.d.ts +1 -1
  234. package/lib/store/form.js +5 -1
  235. package/lib/store/form.js.map +2 -2
  236. package/lib/store/formItem.js +1 -1
  237. package/lib/store/formItem.js.map +2 -2
  238. package/lib/store/index.d.ts +5 -0
  239. package/lib/store/index.js +14 -0
  240. package/lib/store/index.js.map +2 -2
  241. package/lib/store/table.d.ts +2 -2
  242. package/lib/store/table.js +2 -2
  243. package/lib/store/table.js.map +2 -2
  244. package/lib/themes/ang-ie11.css +768 -199
  245. package/lib/themes/ang.css +723 -142
  246. package/lib/themes/ang.css.map +1 -1
  247. package/lib/themes/antd-ie11.css +851 -282
  248. package/lib/themes/antd.css +724 -143
  249. package/lib/themes/antd.css.map +1 -1
  250. package/lib/themes/cxd-ie11.css +879 -310
  251. package/lib/themes/cxd.css +727 -146
  252. package/lib/themes/cxd.css.map +1 -1
  253. package/lib/themes/dark-ie11.css +769 -200
  254. package/lib/themes/dark.css +723 -142
  255. package/lib/themes/dark.css.map +1 -1
  256. package/lib/themes/default-ie11.css +879 -310
  257. package/lib/themes/default.css +727 -146
  258. package/lib/themes/default.css.map +1 -1
  259. package/lib/types.d.ts +3 -1
  260. package/lib/types.js.map +1 -1
  261. package/lib/utils/ColorScale.d.ts +19 -0
  262. package/lib/utils/ColorScale.js +104 -0
  263. package/lib/utils/ColorScale.js.map +13 -0
  264. package/lib/utils/api.js +20 -4
  265. package/lib/utils/api.js.map +2 -2
  266. package/lib/utils/columnsSplit.d.ts +1 -0
  267. package/lib/utils/columnsSplit.js +40 -0
  268. package/lib/utils/columnsSplit.js.map +13 -0
  269. package/lib/utils/debug.d.ts +1 -1
  270. package/lib/utils/debug.js +16 -22
  271. package/lib/utils/debug.js.map +2 -2
  272. package/lib/utils/dom.d.ts +1 -1
  273. package/lib/utils/dom.js +7 -5
  274. package/lib/utils/dom.js.map +2 -2
  275. package/lib/utils/position.js +0 -1
  276. package/lib/utils/position.js.map +2 -2
  277. package/lib/utils/scrollPosition.d.ts +6 -0
  278. package/lib/utils/scrollPosition.js +31 -0
  279. package/lib/utils/scrollPosition.js.map +13 -0
  280. package/package.json +3 -2
  281. package/schema.json +29681 -28936
  282. package/scss/_properties.scss +44 -13
  283. package/scss/components/_barcode.scss +1 -1
  284. package/scss/components/_carousel.scss +1 -0
  285. package/scss/components/_column-toggler.scss +21 -11
  286. package/scss/components/_debug.scss +3 -3
  287. package/scss/components/_formula.scss +1 -1
  288. package/scss/components/_nav.scss +51 -6
  289. package/scss/components/_progress.scss +4 -6
  290. package/scss/components/_pull-refresh.scss +25 -0
  291. package/scss/components/_spinner.scss +134 -56
  292. package/scss/components/_steps.scss +199 -8
  293. package/scss/components/_tooltip.scss +4 -9
  294. package/scss/components/form/_checks.scss +125 -2
  295. package/scss/components/form/_combo.scss +13 -1
  296. package/scss/components/form/_date-range.scss +27 -2
  297. package/scss/components/form/_date.scss +13 -1
  298. package/scss/components/form/_editor.scss +2 -1
  299. package/scss/components/form/_file.scss +4 -0
  300. package/scss/components/form/_form.scss +31 -8
  301. package/scss/components/form/_number.scss +3 -2
  302. package/scss/components/form/_select.scss +0 -1
  303. package/scss/components/form/_textarea.scss +1 -23
  304. package/scss/components/form/_transfer.scss +3 -2
  305. package/scss/themes/_antd-variables.scss +1 -1
  306. package/scss/themes/_common.scss +1 -0
  307. package/scss/themes/_cxd-variables.scss +4 -4
  308. package/sdk/ang-ie11.css +816 -182
  309. package/sdk/ang.css +775 -129
  310. package/sdk/antd-ie11.css +896 -262
  311. package/sdk/antd.css +776 -130
  312. package/sdk/barcode.js +51 -51
  313. package/sdk/charts.js +14 -14
  314. package/sdk/codemirror.js +7 -7
  315. package/sdk/color-picker.js +65 -65
  316. package/sdk/cropperjs.js +2 -2
  317. package/sdk/cxd-ie11.css +907 -273
  318. package/sdk/cxd.css +779 -133
  319. package/sdk/dark-ie11.css +817 -183
  320. package/sdk/dark.css +775 -129
  321. package/sdk/exceljs.js +1 -1
  322. package/sdk/locale/de-DE.js +18 -1
  323. package/sdk/markdown.js +69 -69
  324. package/sdk/papaparse.js +1 -1
  325. package/sdk/renderers/Form/CityDB.js +1 -1
  326. package/sdk/rest.js +17 -17
  327. package/sdk/rich-text.js +62 -62
  328. package/sdk/sdk-ie11.css +907 -273
  329. package/sdk/sdk.css +779 -133
  330. package/sdk/sdk.js +1317 -1273
  331. package/sdk/thirds/hls.js/hls.js +1 -1
  332. package/sdk/thirds/mpegts.js/mpegts.js +1 -1
  333. package/sdk/tinymce.js +57 -57
  334. package/src/Schema.ts +10 -0
  335. package/src/SchemaRenderer.tsx +32 -14
  336. package/src/WithStore.tsx +3 -1
  337. package/src/actions/CmptAction.ts +28 -0
  338. package/src/actions/PageAction.ts +62 -0
  339. package/src/actions/index.ts +1 -0
  340. package/src/components/AssociatedSelection.tsx +9 -3
  341. package/src/components/BarCode.tsx +2 -2
  342. package/src/components/Cascader.tsx +37 -11
  343. package/src/components/Checkbox.tsx +11 -5
  344. package/src/components/DatePicker.tsx +12 -4
  345. package/src/components/DateRangePicker.tsx +551 -88
  346. package/src/components/Drawer.tsx +1 -0
  347. package/src/components/Modal.tsx +1 -0
  348. package/src/components/Overlay.tsx +6 -3
  349. package/src/components/Progress.tsx +57 -22
  350. package/src/components/PullRefresh.tsx +197 -0
  351. package/src/components/Radios.tsx +6 -17
  352. package/src/components/Range.tsx +26 -12
  353. package/src/components/Spinner.tsx +77 -42
  354. package/src/components/Steps.tsx +28 -27
  355. package/src/components/Tooltip.tsx +12 -3
  356. package/src/components/TooltipWrapper.tsx +137 -33
  357. package/src/components/Tree.tsx +19 -5
  358. package/src/components/calendar/Calendar.tsx +0 -14
  359. package/src/components/calendar/TimeView.tsx +12 -0
  360. package/src/components/calendar/YearsView.tsx +3 -4
  361. package/src/components/condition-builder/Expression.tsx +6 -1
  362. package/src/components/condition-builder/Field.tsx +5 -1
  363. package/src/components/condition-builder/Group.tsx +4 -1
  364. package/src/components/condition-builder/GroupOrItem.tsx +4 -1
  365. package/src/components/condition-builder/InputSwitch.tsx +4 -1
  366. package/src/components/condition-builder/Item.tsx +28 -4
  367. package/src/components/condition-builder/Value.tsx +7 -1
  368. package/src/components/condition-builder/index.tsx +4 -2
  369. package/src/components/formula/Editor.tsx +20 -15
  370. package/src/components/formula/Picker.tsx +9 -5
  371. package/src/factory.tsx +29 -1
  372. package/src/locale/de-DE.ts +18 -1
  373. package/src/locale/en-US.ts +18 -1
  374. package/src/locale/zh-CN.ts +18 -1
  375. package/src/renderers/Action.tsx +22 -1
  376. package/src/renderers/App.tsx +4 -0
  377. package/src/renderers/CRUD.tsx +23 -5
  378. package/src/renderers/Carousel.tsx +8 -0
  379. package/src/renderers/Chart.tsx +4 -0
  380. package/src/renderers/Dialog.tsx +4 -0
  381. package/src/renderers/Drawer.tsx +14 -2
  382. package/src/renderers/Form/Checkbox.tsx +11 -2
  383. package/src/renderers/Form/Checkboxes.tsx +106 -23
  384. package/src/renderers/Form/Combo.tsx +104 -49
  385. package/src/renderers/Form/InputCity.tsx +33 -4
  386. package/src/renderers/Form/InputDate.tsx +18 -4
  387. package/src/renderers/Form/InputDateRange.tsx +27 -3
  388. package/src/renderers/Form/InputFile.tsx +23 -7
  389. package/src/renderers/Form/InputImage.tsx +22 -6
  390. package/src/renderers/Form/InputMonthRange.tsx +7 -1
  391. package/src/renderers/Form/InputRange.tsx +18 -16
  392. package/src/renderers/Form/InputText.tsx +14 -4
  393. package/src/renderers/Form/InputTree.tsx +40 -2
  394. package/src/renderers/Form/Item.tsx +7 -0
  395. package/src/renderers/Form/NestedSelect.tsx +23 -4
  396. package/src/renderers/Form/Options.tsx +26 -7
  397. package/src/renderers/Form/Select.tsx +5 -3
  398. package/src/renderers/Form/Textarea.tsx +3 -1
  399. package/src/renderers/Form/TreeSelect.tsx +47 -9
  400. package/src/renderers/Form/index.tsx +56 -25
  401. package/src/renderers/Form/wrapControl.tsx +23 -12
  402. package/src/renderers/Nav.tsx +231 -33
  403. package/src/renderers/Page.tsx +96 -33
  404. package/src/renderers/Progress.tsx +7 -9
  405. package/src/renderers/Service.tsx +66 -27
  406. package/src/renderers/Spinner.tsx +85 -3
  407. package/src/renderers/Steps.tsx +14 -0
  408. package/src/renderers/Table/ColumnToggler.tsx +36 -11
  409. package/src/renderers/Table/TableCell.tsx +39 -1
  410. package/src/renderers/Table/index.tsx +43 -19
  411. package/src/renderers/Tabs.tsx +75 -28
  412. package/src/renderers/TooltipWrapper.tsx +71 -28
  413. package/src/renderers/Wizard.tsx +169 -93
  414. package/src/store/crud.ts +50 -5
  415. package/src/store/form.ts +8 -3
  416. package/src/store/formItem.ts +1 -2
  417. package/src/store/index.ts +20 -0
  418. package/src/store/table.ts +2 -2
  419. package/src/types.ts +8 -1
  420. package/src/utils/ColorScale.ts +138 -0
  421. package/src/utils/api.ts +26 -4
  422. package/src/utils/columnsSplit.tsx +57 -0
  423. package/src/utils/debug.tsx +17 -24
  424. package/src/utils/dom.tsx +7 -6
  425. package/src/utils/position.ts +0 -1
  426. package/src/utils/scrollPosition.ts +29 -0
@@ -454,10 +454,10 @@ export function registerOptionsControl(config: OptionsConfig) {
454
454
  this.toDispose = [];
455
455
  }
456
456
 
457
- async dispatchChangeEvent(eventData: any = '') {
457
+ async dispatchOptionEvent(eventName: string, eventData: any = '') {
458
458
  const {dispatchEvent, options, data} = this.props;
459
459
  const rendererEvent = await dispatchEvent(
460
- 'change',
460
+ eventName,
461
461
  createObject(data, {
462
462
  value: eventData,
463
463
  options,
@@ -599,7 +599,7 @@ export function registerOptionsControl(config: OptionsConfig) {
599
599
  value
600
600
  );
601
601
 
602
- const isPrevented = await this.dispatchChangeEvent(newValue);
602
+ const isPrevented = await this.dispatchOptionEvent('change', newValue);
603
603
  isPrevented || (onChange && onChange(newValue, submitOnChange, changeImmediately));
604
604
  }
605
605
 
@@ -667,7 +667,7 @@ export function registerOptionsControl(config: OptionsConfig) {
667
667
  ? []
668
668
  : formItem.filteredOptions.concat();
669
669
  const newValue = this.formatValueArray(valueArray);
670
- const isPrevented = await this.dispatchChangeEvent(newValue);
670
+ const isPrevented = await this.dispatchOptionEvent('change', newValue);
671
671
  isPrevented || (onChange && onChange(newValue));
672
672
  }
673
673
 
@@ -767,7 +767,7 @@ export function registerOptionsControl(config: OptionsConfig) {
767
767
  }
768
768
 
769
769
  @autobind
770
- deferLoad(option: Option) {
770
+ async deferLoad(option: Option) {
771
771
  const {deferApi, source, env, formItem, data} = this.props;
772
772
  const api = option.deferApi || deferApi || source;
773
773
 
@@ -779,7 +779,9 @@ export function registerOptionsControl(config: OptionsConfig) {
779
779
  return;
780
780
  }
781
781
 
782
- formItem?.deferLoadOptions(option, api, createObject(data, option));
782
+ const json = await formItem?.deferLoadOptions(option, api, createObject(data, option));
783
+ // 触发事件通知,加载完成
784
+ this.dispatchOptionEvent('loadFinished',json);
783
785
  }
784
786
 
785
787
  @autobind
@@ -992,10 +994,15 @@ export function registerOptionsControl(config: OptionsConfig) {
992
994
  [valueField || 'value']: result[labelField || 'label']
993
995
  };
994
996
  }
997
+ // 触发事件通知
998
+ const isPrevented = await this.dispatchOptionEvent('add', {...result, idx});
999
+ if (isPrevented) {
1000
+ return;
1001
+ }
995
1002
 
996
1003
  // 如果是懒加载的,只懒加载当前节点。
997
1004
  if (parent?.defer) {
998
- this.deferLoad(parent);
1005
+ await this.deferLoad(parent);
999
1006
  } else if (source && addApi) {
1000
1007
  // 如果配置了 source 且配置了 addApi 直接重新拉取接口就够了
1001
1008
  // 不能不判断 addApi 就刷新,因为有些场景就是临时添加的。
@@ -1095,6 +1102,12 @@ export function registerOptionsControl(config: OptionsConfig) {
1095
1102
  return;
1096
1103
  }
1097
1104
 
1105
+ // 触发事件通知
1106
+ const isPrevented = await this.dispatchOptionEvent('edit', result);
1107
+ if (isPrevented) {
1108
+ return;
1109
+ }
1110
+
1098
1111
  if (source && editApi) {
1099
1112
  this.reload();
1100
1113
  } else {
@@ -1141,6 +1154,12 @@ export function registerOptionsControl(config: OptionsConfig) {
1141
1154
  return;
1142
1155
  }
1143
1156
 
1157
+ // 触发事件通知
1158
+ const isPrevented = await this.dispatchOptionEvent('delete', ctx);
1159
+ if (isPrevented) {
1160
+ return;
1161
+ }
1162
+
1144
1163
  // 通过 deleteApi 删除。
1145
1164
  try {
1146
1165
  if (!deleteApi) {
@@ -228,7 +228,7 @@ export default class SelectControl extends React.Component<SelectProps, any> {
228
228
  'change',
229
229
  createObject(data, {
230
230
  value: newValue,
231
- options,
231
+ options
232
232
  })
233
233
  );
234
234
  if (rendererEvent?.prevented) {
@@ -409,8 +409,10 @@ export default class SelectControl extends React.Component<SelectProps, any> {
409
409
  onBlur={(e: any) => this.dispatchEvent('blur', e)}
410
410
  onFocus={(e: any) => this.dispatchEvent('focus', e)}
411
411
  onAdd={() => this.dispatchEvent('add')}
412
- onEdit={(item: any) => this.dispatchEvent('edit', item)}
413
- onDelete={(item: any) => this.dispatchEvent('delete', item)}
412
+ onEdit={(item: any) => this.dispatchEvent('edit', {value: item})}
413
+ onDelete={(item: any) =>
414
+ this.dispatchEvent('delete', {value: item})
415
+ }
414
416
  loading={loading}
415
417
  noResultsText={noResultsText}
416
418
  renderMenu={menuTpl ? this.renderMenu : undefined}
@@ -211,12 +211,14 @@ export default class TextAreaControl extends React.Component<
211
211
  `TextareaControl`,
212
212
  {
213
213
  [`TextareaControl--border${ucFirst(borderMode)}`]: borderMode,
214
- 'is-focused': this.state.focused
214
+ 'is-focused': this.state.focused,
215
+ 'is-disabled': disabled
215
216
  },
216
217
  className
217
218
  )}
218
219
  >
219
220
  <Textarea
221
+ className={cx(`TextareaControl-input`)}
220
222
  autoComplete="off"
221
223
  ref={this.inputRef}
222
224
  name={name}
@@ -18,9 +18,10 @@ import {Api} from '../../types';
18
18
  import {isEffectiveApi} from '../../utils/api';
19
19
  import Spinner from '../../components/Spinner';
20
20
  import ResultBox from '../../components/ResultBox';
21
- import {autobind, getTreeAncestors, isMobile} from '../../utils/helper';
21
+ import {autobind, getTreeAncestors, isMobile, createObject} from '../../utils/helper';
22
22
  import {findDOMNode} from 'react-dom';
23
23
  import {normalizeOptions} from '../../components/Select';
24
+ import {Action} from '../../types';
24
25
 
25
26
  /**
26
27
  * Tree 下拉选择框。
@@ -64,6 +65,11 @@ export interface TreeSelectControlSchema extends FormOptionsControl {
64
65
  */
65
66
  onlyChildren?: boolean;
66
67
 
68
+ /**
69
+ * 单选时,只运行选择叶子节点
70
+ */
71
+ onlyLeaf?: boolean;
72
+
67
73
  /**
68
74
  * 顶级节点是否可以创建子节点
69
75
  */
@@ -121,6 +127,8 @@ export default class TreeSelectControl extends React.Component<
121
127
  pathSeparator: '/'
122
128
  };
123
129
 
130
+ treeRef: any
131
+
124
132
  container: React.RefObject<HTMLDivElement> = React.createRef();
125
133
 
126
134
  input: React.RefObject<any> = React.createRef();
@@ -185,16 +193,20 @@ export default class TreeSelectControl extends React.Component<
185
193
  );
186
194
  }
187
195
 
188
- handleFocus() {
196
+ handleFocus(e: any) {
197
+ const {dispatchEvent} = this.props;
189
198
  this.setState({
190
199
  isFocused: true
191
200
  });
201
+ dispatchEvent('focus', e);
192
202
  }
193
203
 
194
- handleBlur() {
204
+ handleBlur(e: any) {
205
+ const {dispatchEvent} = this.props;
195
206
  this.setState({
196
207
  isFocused: false
197
208
  });
209
+ dispatchEvent('blur', e);
198
210
  }
199
211
 
200
212
  handleKeyPress(e: React.KeyboardEvent) {
@@ -257,19 +269,19 @@ export default class TreeSelectControl extends React.Component<
257
269
  }
258
270
 
259
271
  handleChange(value: any) {
260
- const {onChange, multiple} = this.props;
272
+ const {multiple} = this.props;
261
273
 
262
274
  if (!multiple) {
263
275
  this.close();
264
276
  }
265
277
 
266
278
  multiple || !this.state.inputValue
267
- ? onChange(value)
279
+ ? this.resultChangeEvent(value)
268
280
  : this.setState(
269
281
  {
270
282
  inputValue: ''
271
283
  },
272
- () => onChange(value)
284
+ () => this.resultChangeEvent(value)
273
285
  );
274
286
  }
275
287
 
@@ -410,14 +422,13 @@ export default class TreeSelectControl extends React.Component<
410
422
  extractValue,
411
423
  delimiter,
412
424
  valueField,
413
- onChange,
414
425
  multiple
415
426
  } = this.props;
416
427
 
417
428
  let newValue: any = Array.isArray(value) ? value.concat() : [];
418
429
 
419
430
  if (!multiple && !newValue.length) {
420
- onChange('');
431
+ this.resultChangeEvent('');
421
432
  return;
422
433
  }
423
434
 
@@ -428,8 +439,27 @@ export default class TreeSelectControl extends React.Component<
428
439
  if (joinValues) {
429
440
  newValue = newValue.join(delimiter || ',');
430
441
  }
442
+ this.resultChangeEvent(newValue);
443
+ }
431
444
 
432
- onChange(newValue);
445
+ doAction(action: Action, data: any, throwErrors: boolean) {
446
+ if (action.actionType && ['clear', 'reset'].includes(action.actionType)) {
447
+ this.clearValue();
448
+ }
449
+ }
450
+
451
+ @autobind
452
+ async resultChangeEvent(value: any) {
453
+ const {onChange, dispatchEvent, data} = this.props;
454
+
455
+ const rendererEvent = await dispatchEvent('change', createObject(data, {
456
+ value
457
+ }));
458
+
459
+ if (rendererEvent?.prevented) {
460
+ return;
461
+ }
462
+ onChange && onChange(value);
433
463
  }
434
464
 
435
465
  @autobind
@@ -449,6 +479,11 @@ export default class TreeSelectControl extends React.Component<
449
479
  }`;
450
480
  }
451
481
 
482
+ @autobind
483
+ domRef(ref: any) {
484
+ this.treeRef = ref;
485
+ }
486
+
452
487
  renderOuter() {
453
488
  const {
454
489
  value,
@@ -472,6 +507,7 @@ export default class TreeSelectControl extends React.Component<
472
507
  showRadio,
473
508
  popOverContainer,
474
509
  onlyChildren,
510
+ onlyLeaf,
475
511
  classPrefix: ns,
476
512
  optionsPlaceholder,
477
513
  searchable,
@@ -506,7 +542,9 @@ export default class TreeSelectControl extends React.Component<
506
542
  return (
507
543
  <TreeSelector
508
544
  classPrefix={ns}
545
+ onRef={this.domRef}
509
546
  onlyChildren={onlyChildren}
547
+ onlyLeaf={onlyLeaf}
510
548
  labelField={labelField}
511
549
  valueField={valueField}
512
550
  disabled={disabled}
@@ -20,7 +20,8 @@ import {
20
20
  getVariable,
21
21
  isObjectShallowModified,
22
22
  qsparse,
23
- repeatCount
23
+ repeatCount,
24
+ createObject
24
25
  } from '../../utils/helper';
25
26
  import debouce from 'lodash/debounce';
26
27
  import flatten from 'lodash/flatten';
@@ -61,6 +62,7 @@ export interface FormSchemaHorizontal {
61
62
  left?: number;
62
63
  right?: number;
63
64
  leftFixed?: boolean | number | 'xs' | 'sm' | 'md' | 'lg';
65
+ justify?: boolean; // 两端对齐
64
66
  }
65
67
 
66
68
  /**
@@ -624,7 +626,7 @@ export default class Form extends React.Component<FormProps, object> {
624
626
  }
625
627
 
626
628
  async onInit() {
627
- const {onInit, store, persistData, submitOnInit} = this.props;
629
+ const {onInit, store, persistData, submitOnInit, dispatchEvent} = this.props;
628
630
  if (!isAlive(store)) {
629
631
  return;
630
632
  }
@@ -656,8 +658,11 @@ export default class Form extends React.Component<FormProps, object> {
656
658
 
657
659
  persistData && store.getLocalPersistData();
658
660
 
659
- onInit && onInit(data, this.props);
660
-
661
+ // 派发init事件,参数为初始化数据
662
+ const dispatcher = dispatchEvent('inited', createObject(this.props.data, {formData: data}));
663
+ if (!dispatcher?.prevented) {
664
+ onInit && onInit(data, this.props);
665
+ }
661
666
  submitOnInit &&
662
667
  this.handleAction(
663
668
  undefined,
@@ -746,10 +751,17 @@ export default class Form extends React.Component<FormProps, object> {
746
751
  }
747
752
 
748
753
  validate(forceValidate?: boolean): Promise<boolean> {
749
- const {store} = this.props;
754
+ const {store, dispatchEvent, data} = this.props;
750
755
 
751
756
  this.flush();
752
- return store.validate(this.hooks['validate'] || [], forceValidate);
757
+ return store.validate(this.hooks['validate'] || [], forceValidate).then((result: boolean) => {
758
+ if (result) {
759
+ dispatchEvent('validateSucc', data);
760
+ } else {
761
+ dispatchEvent('validateFail', data);
762
+ }
763
+ return result;
764
+ });
753
765
  }
754
766
 
755
767
  clearErrors() {
@@ -771,13 +783,16 @@ export default class Form extends React.Component<FormProps, object> {
771
783
  }
772
784
 
773
785
  submit(fn?: (values: object) => Promise<any>): Promise<any> {
774
- const {store, messages, translate: __} = this.props;
786
+ const {store, messages, translate: __, dispatchEvent, data} = this.props;
775
787
  this.flush();
776
-
788
+ const validateErrCb = () => {
789
+ dispatchEvent('validateFail', data);
790
+ };
777
791
  return store.submit(
778
792
  fn,
779
793
  this.hooks['validate'] || [],
780
- __(messages && messages.validateFailed)
794
+ __(messages && messages.validateFailed),
795
+ validateErrCb,
781
796
  );
782
797
  }
783
798
 
@@ -827,13 +842,10 @@ export default class Form extends React.Component<FormProps, object> {
827
842
  changePristine = false
828
843
  ) {
829
844
  const {store, formLazyChange} = this.props;
830
-
831
845
  if (typeof name !== 'string') {
832
846
  return;
833
847
  }
834
-
835
848
  store.changeValue(name, value, changePristine);
836
-
837
849
  if (!changePristine) {
838
850
  (formLazyChange === false ? this.emitChange : this.lazyEmitChange)(
839
851
  submit
@@ -844,19 +856,24 @@ export default class Form extends React.Component<FormProps, object> {
844
856
  store.setLocalPersistData();
845
857
  }
846
858
  }
859
+ formItemDispatchEvent(dispatchEvent: any) {
860
+ return (type: string, data: any) => {
861
+ dispatchEvent(type, data);
862
+ }
863
+ }
847
864
 
848
865
  emitChange(submit: boolean) {
849
- const {onChange, store, submitOnChange} = this.props;
866
+ const {onChange, store, submitOnChange, dispatchEvent, data} = this.props;
850
867
 
851
868
  if (!isAlive(store)) {
852
869
  return;
853
870
  }
854
-
855
- onChange &&
856
- onChange(store.data, difference(store.data, store.pristine), this.props);
871
+ const dispatcher = dispatchEvent('change', createObject(data, {formData: store.data}));
872
+ if (!dispatcher?.prevented) {
873
+ onChange && onChange(store.data, difference(store.data, store.pristine), this.props);
874
+ }
857
875
 
858
876
  store.clearRestError();
859
-
860
877
  (submit || (submitOnChange && store.inited)) &&
861
878
  this.handleAction(
862
879
  undefined,
@@ -933,6 +950,7 @@ export default class Form extends React.Component<FormProps, object> {
933
950
  onChange,
934
951
  clearPersistDataAfterSubmit,
935
952
  trimValues,
953
+ dispatchEvent,
936
954
  translate: __
937
955
  } = this.props;
938
956
 
@@ -947,12 +965,13 @@ export default class Form extends React.Component<FormProps, object> {
947
965
  if (data === this.props.data) {
948
966
  data = store.data;
949
967
  }
950
-
951
968
  if (Array.isArray(action.required) && action.required.length) {
952
969
  return store.validateFields(action.required).then(result => {
953
970
  if (!result) {
971
+ dispatchEvent('validateError', this.props.data);
954
972
  env.notify('error', __('Form.validateFailed'));
955
973
  } else {
974
+ dispatchEvent('validateSucc', this.props.data);
956
975
  this.handleAction(
957
976
  e,
958
977
  {...action, required: undefined},
@@ -963,7 +982,6 @@ export default class Form extends React.Component<FormProps, object> {
963
982
  }
964
983
  });
965
984
  }
966
-
967
985
  if (
968
986
  action.type === 'submit' ||
969
987
  action.actionType === 'submit' ||
@@ -983,6 +1001,8 @@ export default class Form extends React.Component<FormProps, object> {
983
1001
  if (onSubmit && onSubmit(values, action) === false) {
984
1002
  return Promise.resolve(false);
985
1003
  }
1004
+ // 走到这里代表校验成功了
1005
+ dispatchEvent('validateSucc', this.props.data);
986
1006
 
987
1007
  if (target) {
988
1008
  this.submitToTarget(target, values);
@@ -1004,20 +1024,24 @@ export default class Form extends React.Component<FormProps, object> {
1004
1024
  .saveRemote(action.api || (api as Api), values, {
1005
1025
  successMessage: saveSuccess,
1006
1026
  errorMessage: saveFailed,
1007
- onSuccess: () => {
1027
+ onSuccess: (result: Payload) => {
1028
+ // result为提交接口返回的内容
1029
+ dispatchEvent('submitSucc', createObject(this.props.data, {result}));
1008
1030
  if (
1009
1031
  !isEffectiveApi(finnalAsyncApi, store.data) ||
1010
1032
  store.data[finishedField || 'finished']
1011
1033
  ) {
1012
1034
  return;
1013
1035
  }
1014
-
1015
1036
  return until(
1016
1037
  () => store.checkRemote(finnalAsyncApi as Api, store.data),
1017
1038
  (ret: any) => ret && ret[finishedField || 'finished'],
1018
1039
  cancel => (this.asyncCancel = cancel),
1019
1040
  checkInterval
1020
1041
  );
1042
+ },
1043
+ onFailed: (result: Payload) => {
1044
+ dispatchEvent('submitFail', createObject(this.props.data, {error: result}));
1021
1045
  }
1022
1046
  })
1023
1047
  .then(async response => {
@@ -1086,6 +1110,9 @@ export default class Form extends React.Component<FormProps, object> {
1086
1110
  } else if (action.actionType === 'clear') {
1087
1111
  store.setCurrentAction(action);
1088
1112
  store.clear(onReset);
1113
+ } else if (action.actionType === 'validate') {
1114
+ store.setCurrentAction(action);
1115
+ this.validate(true);
1089
1116
  } else if (action.actionType === 'dialog') {
1090
1117
  store.setCurrentAction(action);
1091
1118
  store.openDialog(data);
@@ -1141,7 +1168,6 @@ export default class Form extends React.Component<FormProps, object> {
1141
1168
  if (action.target) {
1142
1169
  this.reloadTarget(action.target, data);
1143
1170
  } else {
1144
- // 刷自己
1145
1171
  this.receive(data);
1146
1172
  }
1147
1173
  // action.target && this.reloadTarget(action.target, data);
@@ -1395,7 +1421,8 @@ export default class Form extends React.Component<FormProps, object> {
1395
1421
  controlWidth,
1396
1422
  resolveDefinitions,
1397
1423
  lazyChange,
1398
- formLazyChange
1424
+ formLazyChange,
1425
+ dispatchEvent
1399
1426
  } = props;
1400
1427
 
1401
1428
  const subProps = {
@@ -1410,7 +1437,7 @@ export default class Form extends React.Component<FormProps, object> {
1410
1437
  formHorizontal: horizontal,
1411
1438
  controlWidth,
1412
1439
  disabled: disabled || (control as Schema).disabled || form.loading,
1413
- btnDisabled: form.loading || form.validating,
1440
+ btnDisabled: disabled || form.loading || form.validating,
1414
1441
  onAction: this.handleAction,
1415
1442
  onQuery: this.handleQuery,
1416
1443
  onChange: this.handleChange,
@@ -1418,6 +1445,7 @@ export default class Form extends React.Component<FormProps, object> {
1418
1445
  addHook: this.addHook,
1419
1446
  removeHook: this.removeHook,
1420
1447
  renderFormItems: this.renderFormItems,
1448
+ formItemDispatchEvent: this.formItemDispatchEvent(dispatchEvent),
1421
1449
  formPristine: form.pristine
1422
1450
  // value: (control as any)?.name
1423
1451
  // ? getVariable(form.data, (control as any)?.name, canAccessSuperData)
@@ -1674,7 +1702,6 @@ export class FormRenderer extends Form {
1674
1702
  // if (this.props.disabled) {
1675
1703
  // return;
1676
1704
  // }
1677
-
1678
1705
  if (action.target && action.actionType !== 'reload') {
1679
1706
  const scoped = this.context as IScopedContext;
1680
1707
 
@@ -1792,4 +1819,8 @@ export class FormRenderer extends Form {
1792
1819
 
1793
1820
  return super.receive(values);
1794
1821
  }
1822
+
1823
+ setData(values: object) {
1824
+ return super.setValues(values);
1825
+ }
1795
1826
  }
@@ -11,7 +11,8 @@ import {
11
11
  guid,
12
12
  isEmpty,
13
13
  autobind,
14
- getVariable
14
+ getVariable,
15
+ createObject
15
16
  } from '../../utils/helper';
16
17
  import {IIRendererStore, IRendererStore} from '../../store';
17
18
  import {ScopedContext, IScopedContext} from '../../Scoped';
@@ -63,6 +64,7 @@ export interface ControlOutterProps extends RendererProps {
63
64
  submit?: boolean,
64
65
  changePristine?: boolean
65
66
  ) => void;
67
+ formItemDispatchEvent: (type: string, data: any) => void;
66
68
  }
67
69
 
68
70
  export interface ControlProps {
@@ -353,7 +355,7 @@ export function wrapControl<
353
355
  this.model.clearValueOnHidden &&
354
356
  this.model.form?.deleteValueByName(this.model.name);
355
357
 
356
- rootStore.removeStore(this.model);
358
+ isAlive(rootStore) && rootStore.removeStore(this.model);
357
359
  }
358
360
  delete this.model;
359
361
  }
@@ -410,9 +412,9 @@ export function wrapControl<
410
412
  }
411
413
  }
412
414
 
413
- validate() {
414
- const {formStore: form, data} = this.props;
415
-
415
+ async validate() {
416
+ const {formStore: form, data, formItemDispatchEvent} = this.props;
417
+ let result;
416
418
  if (this.model) {
417
419
  if (
418
420
  this.model.unique &&
@@ -423,12 +425,21 @@ export function wrapControl<
423
425
  const group = combo.uniques.get(
424
426
  this.model.name
425
427
  ) as IUniqueGroup;
426
- group.items.forEach(item => item.validate(data));
428
+ const validPromises = group.items.map(item => item.validate(data));
429
+ result = await Promise.all(validPromises);
430
+ } else {
431
+ const validPromises = form?.getItemsByName(this.model.name)
432
+ .map(item => item.validate(data));
433
+ if (validPromises && validPromises.length) {
434
+ result = await Promise.all(validPromises);
435
+ }
436
+ }
437
+ }
438
+ if (result && result.length){
439
+ if (result.indexOf(false) > -1) {
440
+ formItemDispatchEvent('formItemValidateError', data);
427
441
  } else {
428
- this.model.validate(data, this.hook);
429
- form
430
- ?.getItemsByName(this.model.name)
431
- .forEach(item => item !== this.model && item.validate(data));
442
+ formItemDispatchEvent('formItemValidateSucc', data);
432
443
  }
433
444
  }
434
445
  }
@@ -539,8 +550,8 @@ export function wrapControl<
539
550
 
540
551
  if (
541
552
  // 如果配置了 minLength 或者 maxLength 就切成及时验证
542
- this.model.rules.minLength ||
543
- this.model.rules.maxLength ||
553
+ // this.model.rules.minLength ||
554
+ // this.model.rules.maxLength ||
544
555
  validateOnChange === true ||
545
556
  (validateOnChange !== false && (formSubmited || validated))
546
557
  ) {