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
@@ -4,7 +4,8 @@ import {ClassNamesFn, themeable, ThemeProps} from '../../theme';
4
4
  import Spinner from '../../components/Spinner';
5
5
  import Select from '../../components/Select';
6
6
  import CityArea from '../../components/CityArea';
7
- import {autobind, isMobile} from '../../utils/helper';
7
+ import {autobind, isMobile, createObject} from '../../utils/helper';
8
+ import {Action} from '../../types';
8
9
  import {Option} from './Options';
9
10
  import {localeable, LocaleProps} from '../../locale';
10
11
 
@@ -432,10 +433,38 @@ export interface LocationControlProps extends FormControlProps {
432
433
  allowStreet?: boolean;
433
434
  }
434
435
  export class LocationControl extends React.Component<LocationControlProps> {
436
+
437
+ @autobind
438
+ doAction(action: Action, data: object, throwErrors: boolean) {
439
+ const {resetValue, onChange} = this.props;
440
+ const actionType = action?.actionType as string;
441
+
442
+ if (!!~['clear', 'reset'].indexOf(actionType)) {
443
+ onChange(resetValue ?? '');
444
+ }
445
+ }
446
+
447
+ @autobind
448
+ async handleChange(value: number | string) {
449
+ const {dispatchEvent, data, onChange} = this.props;
450
+
451
+ const rendererEvent = await dispatchEvent(
452
+ 'change',
453
+ createObject(data, {
454
+ value
455
+ })
456
+ );
457
+
458
+ if (rendererEvent?.prevented) {
459
+ return;
460
+ }
461
+
462
+ onChange(value);
463
+ }
464
+
435
465
  render() {
436
466
  const {
437
467
  value,
438
- onChange,
439
468
  allowCity,
440
469
  allowDistrict,
441
470
  extractValue,
@@ -453,7 +482,7 @@ export class LocationControl extends React.Component<LocationControlProps> {
453
482
  popOverContainer={
454
483
  env && env.getModalContainer ? env.getModalContainer : undefined
455
484
  }
456
- onChange={onChange}
485
+ onChange={this.handleChange}
457
486
  allowCity={allowCity}
458
487
  allowDistrict={allowDistrict}
459
488
  extractValue={extractValue}
@@ -466,7 +495,7 @@ export class LocationControl extends React.Component<LocationControlProps> {
466
495
  <ThemedCity
467
496
  searchable={searchable}
468
497
  value={value}
469
- onChange={onChange}
498
+ onChange={this.handleChange}
470
499
  allowCity={allowCity}
471
500
  allowDistrict={allowDistrict}
472
501
  extractValue={extractValue}
@@ -423,8 +423,14 @@ export default class DateControl extends React.PureComponent<
423
423
  // 动作
424
424
  doAction(action: Action, data: object, throwErrors: boolean) {
425
425
  const {resetValue, onChange} = this.props;
426
+
426
427
  if (action.actionType === 'clear') {
427
- onChange(resetValue ?? '');
428
+ onChange('');
429
+ return;
430
+ }
431
+
432
+ if (action.actionType === 'reset' && resetValue) {
433
+ onChange(resetValue);
428
434
  }
429
435
  }
430
436
 
@@ -457,15 +463,23 @@ export default class DateControl extends React.PureComponent<
457
463
  useMobileUI,
458
464
  ...rest
459
465
  } = this.props;
466
+ const mobileUI = useMobileUI && isMobile();
460
467
 
461
468
  if (type === 'time' && timeFormat) {
462
469
  format = timeFormat;
463
470
  }
464
471
 
465
- const mobileUI = useMobileUI && isMobile();
466
-
467
472
  return (
468
- <div className={cx(`DateControl`, className)}>
473
+ <div
474
+ className={cx(
475
+ `DateControl`,
476
+ {
477
+ 'is-date': /date$/.test(type),
478
+ 'is-datetime': /datetime$/.test(type)
479
+ },
480
+ className
481
+ )}
482
+ >
469
483
  <DatePicker
470
484
  {...rest}
471
485
  useMobileUI={useMobileUI}
@@ -7,9 +7,11 @@ import includes from 'lodash/includes';
7
7
  import DateRangePicker, {
8
8
  DateRangePicker as BaseDateRangePicker
9
9
  } from '../../components/DateRangePicker';
10
- import { isMobile, createObject, autobind } from '../../utils/helper';
10
+ import {isMobile, createObject, autobind} from '../../utils/helper';
11
11
  import {Action} from '../../types';
12
12
 
13
+ import type {ShortCuts} from '../../components/DatePicker';
14
+
13
15
  /**
14
16
  * DateRange 日期范围控件
15
17
  * 文档:https://baidu.gitee.io/amis/docs/components/form/date-range
@@ -75,6 +77,11 @@ export interface DateRangeControlSchema extends FormBaseControl {
75
77
  * 开启后变成非弹出模式,即内联模式。
76
78
  */
77
79
  embed?: boolean;
80
+
81
+ /**
82
+ * 日期范围快捷键
83
+ */
84
+ ranges?: string | Array<ShortCuts>;
78
85
  }
79
86
 
80
87
  export interface DateRangeProps
@@ -173,8 +180,14 @@ export default class DateRangeControl extends React.Component<DateRangeProps> {
173
180
  // 动作
174
181
  doAction(action: Action, data: object, throwErrors: boolean) {
175
182
  const {resetValue, onChange} = this.props;
183
+
176
184
  if (action.actionType === 'clear') {
177
- onChange(resetValue ?? '');
185
+ onChange('');
186
+ return;
187
+ }
188
+
189
+ if (action.actionType === 'reset' && resetValue) {
190
+ onChange(resetValue);
178
191
  }
179
192
  }
180
193
 
@@ -206,8 +219,19 @@ export default class DateRangeControl extends React.Component<DateRangeProps> {
206
219
  ...rest
207
220
  } = this.props;
208
221
  const mobileUI = useMobileUI && isMobile();
222
+ const comptType = this.props?.type;
223
+
209
224
  return (
210
- <div className={cx(`${ns}DateRangeControl`, className)}>
225
+ <div
226
+ className={cx(
227
+ `${ns}DateRangeControl`,
228
+ {
229
+ 'is-date': /date-/.test(comptType),
230
+ 'is-datetime': /datetime-/.test(comptType)
231
+ },
232
+ className
233
+ )}
234
+ >
211
235
  <DateRangePicker
212
236
  {...rest}
213
237
  useMobileUI={useMobileUI}
@@ -28,6 +28,7 @@ import {
28
28
  SchemaUrlPath
29
29
  } from '../../Schema';
30
30
  import merge from 'lodash/merge';
31
+ import omit from 'lodash/omit';
31
32
 
32
33
  /**
33
34
  * File 文件上传控件
@@ -817,7 +818,11 @@ export default class FileControl extends React.Component<FileProps, FileState> {
817
818
  let value =
818
819
  (ret.data as any).value || (ret.data as any).url || ret.data;
819
820
 
820
- const dispatcher = await this.dispatchEvent('success', file);
821
+ const dispatcher = await this.dispatchEvent('success', {
822
+ ...file,
823
+ value,
824
+ state: 'uploaded'
825
+ });
821
826
  if (dispatcher?.prevented) {
822
827
  return;
823
828
  }
@@ -913,13 +918,16 @@ export default class FileControl extends React.Component<FileProps, FileState> {
913
918
  }
914
919
 
915
920
  syncAutoFill() {
916
- const {autoFill, multiple, onBulkChange, data} = this.props;
917
- if (!isEmpty(autoFill) && onBulkChange) {
921
+ const {autoFill, multiple, onBulkChange, data, name} = this.props;
922
+ // 排除自身的字段,否则会无限更新state
923
+ const excludeSelfAutoFill = omit(autoFill, name || '');
924
+
925
+ if (!isEmpty(excludeSelfAutoFill) && onBulkChange) {
918
926
  const files = this.state.files.filter(
919
927
  file => ~['uploaded', 'init', 'ready'].indexOf(file.state as string)
920
928
  );
921
929
  const toSync = dataMapping(
922
- autoFill,
930
+ excludeSelfAutoFill,
923
931
  multiple
924
932
  ? {
925
933
  items: files
@@ -1216,11 +1224,19 @@ export default class FileControl extends React.Component<FileProps, FileState> {
1216
1224
 
1217
1225
  async dispatchEvent(e: string, data?: Record<string, any>) {
1218
1226
  const {dispatchEvent} = this.props;
1219
- data = data || this.state.files;
1227
+ const getEventData = (item: Record<string, any>) => ({
1228
+ name: item.path || item.name,
1229
+ value: item.value,
1230
+ state: item.state,
1231
+ error: item.error
1232
+ });
1233
+ const value = data
1234
+ ? getEventData(data)
1235
+ : this.state.files.map(item => getEventData(item));
1220
1236
  return dispatchEvent(
1221
1237
  e,
1222
1238
  createObject(this.props.data, {
1223
- file: data
1239
+ file: value
1224
1240
  })
1225
1241
  );
1226
1242
  }
@@ -1312,7 +1328,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
1312
1328
  >
1313
1329
  <input disabled={disabled} {...getInputProps()} />
1314
1330
 
1315
- {drag ? (
1331
+ {drag || isDragActive ? (
1316
1332
  <div
1317
1333
  className={cx('FileControl-acceptTip')}
1318
1334
  onClick={this.handleSelect}
@@ -31,6 +31,7 @@ import {
31
31
  import {filter} from '../../utils/tpl';
32
32
  import isPlainObject from 'lodash/isPlainObject';
33
33
  import merge from 'lodash/merge';
34
+ import omit from 'lodash/omit';
34
35
 
35
36
  /**
36
37
  * Image 图片上传控件
@@ -817,13 +818,16 @@ export default class ImageControl extends React.Component<
817
818
  }
818
819
 
819
820
  syncAutoFill() {
820
- const {autoFill, multiple, onBulkChange, data} = this.props;
821
- if (!isEmpty(autoFill) && onBulkChange && this.initAutoFill) {
821
+ const {autoFill, multiple, onBulkChange, data, name} = this.props;
822
+ // 排除自身的字段,否则会无限更新state
823
+ const excludeSelfAutoFill = omit(autoFill, name || '');
824
+
825
+ if (!isEmpty(excludeSelfAutoFill) && onBulkChange && this.initAutoFill) {
822
826
  const files = this.state.files.filter(
823
827
  file => ~['uploaded', 'init', 'ready'].indexOf(file.state as string)
824
828
  );
825
829
  const toSync = dataMapping(
826
- autoFill,
830
+ excludeSelfAutoFill,
827
831
  multiple
828
832
  ? {
829
833
  items: files
@@ -1077,7 +1081,11 @@ export default class ImageControl extends React.Component<
1077
1081
  };
1078
1082
  obj.value = obj.value || obj.url;
1079
1083
 
1080
- const dispatcher = await this.dispatchEvent('success', obj);
1084
+ const dispatcher = await this.dispatchEvent('success', {
1085
+ ...file,
1086
+ value: obj.value,
1087
+ state: 'uploaded'
1088
+ });
1081
1089
  if (dispatcher?.prevented) {
1082
1090
  return;
1083
1091
  }
@@ -1248,8 +1256,16 @@ export default class ImageControl extends React.Component<
1248
1256
 
1249
1257
  async dispatchEvent(e: string, data?: Record<string, any>) {
1250
1258
  const {dispatchEvent} = this.props;
1251
- data = data ? data : this.files;
1252
- return dispatchEvent(e, createObject(this.props.data, {file: data}));
1259
+ const getEventData = (item: Record<string, any>) => ({
1260
+ name: item.path || item.name,
1261
+ value: item.value,
1262
+ state: item.state,
1263
+ error: item.error
1264
+ });
1265
+ const value = data
1266
+ ? getEventData(data)
1267
+ : this.files.map(item => getEventData(item));
1268
+ return dispatchEvent(e, createObject(this.props.data, {file: value}));
1253
1269
  }
1254
1270
 
1255
1271
  // 动作
@@ -170,8 +170,14 @@ export default class MonthRangeControl extends React.Component<MonthRangeProps>
170
170
  // 动作
171
171
  doAction(action: Action, data: object, throwErrors: boolean) {
172
172
  const {resetValue, onChange} = this.props;
173
+
173
174
  if (action.actionType === 'clear') {
174
- onChange(resetValue ?? '');
175
+ onChange('');
176
+ return;
177
+ }
178
+
179
+ if (action.actionType === 'reset' && resetValue) {
180
+ onChange(resetValue);
175
181
  }
176
182
  }
177
183
 
@@ -271,7 +271,7 @@ export function formatValue(
271
271
  max: max === undefined || max > props.max ? props.max : max
272
272
  };
273
273
  }
274
- return +value ?? props.min;
274
+ return +value < props.min ? props.min : Math.min(+value, props.max);
275
275
  }
276
276
 
277
277
  /**
@@ -284,11 +284,13 @@ export class Input extends React.Component<RangeItemProps, any> {
284
284
  */
285
285
  @autobind
286
286
  onChange(value: number) {
287
- const {multiple, value: originValue, type} = this.props;
287
+ const {multiple, value: originValue, type, min} = this.props;
288
288
  const _value = this.getValue(value, type);
289
289
 
290
290
  this.props.updateValue(
291
- multiple ? {...(originValue as MultipleValue), [type]: _value} : value
291
+ multiple
292
+ ? {...(originValue as MultipleValue), [type]: _value}
293
+ : value ?? min
292
294
  );
293
295
  }
294
296
 
@@ -334,7 +336,8 @@ export class Input extends React.Component<RangeItemProps, any> {
334
336
  */
335
337
  getValue(value: string | number, type?: string) {
336
338
  const {max, min, step, value: stateValue} = this.props as RangeItemProps;
337
-
339
+ // value为null、undefined时,取对应的min/max
340
+ value = value ?? (type === 'min' ? min : max);
338
341
  // 校正value为step的倍数
339
342
  let _value = Math.round(parseFloat(value + '') / step) * step;
340
343
  // 同步value与步长小数位数
@@ -457,21 +460,26 @@ export default class RangeControl extends React.PureComponent<
457
460
  }
458
461
 
459
462
  componentDidUpdate(prevProps: RangeProps) {
460
- const {value} = prevProps;
463
+ const {value, min, max} = prevProps;
461
464
  const {
462
465
  value: nextPropsValue,
463
466
  multiple,
464
467
  delimiter,
465
- min,
466
- max,
468
+ min: nextPropsMin,
469
+ max: nextPropsMax,
467
470
  onChange
468
471
  } = this.props;
469
- if (value !== nextPropsValue) {
472
+
473
+ if (
474
+ value !== nextPropsValue ||
475
+ min !== nextPropsMin ||
476
+ max !== nextPropsMax
477
+ ) {
470
478
  const value = formatValue(nextPropsValue, {
471
479
  multiple,
472
480
  delimiter,
473
- min,
474
- max
481
+ min: nextPropsMin,
482
+ max: nextPropsMax
475
483
  });
476
484
  this.setState({
477
485
  value: this.getValue(value)
@@ -584,12 +592,6 @@ export default class RangeControl extends React.PureComponent<
584
592
  region
585
593
  } = props;
586
594
 
587
- // 指定parts -> 重新计算步长
588
- if (parts > 1) {
589
- props.step = (props.max - props.min) / props.parts;
590
- props.showSteps = true;
591
- }
592
-
593
595
  // 处理自定义json配置
594
596
  let renderMarks:
595
597
  | MarksType
@@ -93,7 +93,6 @@ export type InputTextRendererEvent =
93
93
  | 'focus'
94
94
  | 'click'
95
95
  | 'change'
96
- | 'clear'
97
96
  | 'enter';
98
97
 
99
98
  export interface TextProps extends OptionsControlProps {
@@ -179,7 +178,7 @@ export default class TextControl extends React.PureComponent<
179
178
  term: ''
180
179
  })
181
180
  );
182
- } else {
181
+ } else if (addHook) {
183
182
  this.unHook = addHook(async (data: any) => {
184
183
  await formItem.loadOptions(
185
184
  autoComplete,
@@ -239,7 +238,6 @@ export default class TextControl extends React.PureComponent<
239
238
  len && this.input.setSelectionRange(len, len);
240
239
  }
241
240
 
242
- @bindRendererEvent<TextProps, InputTextRendererEvent>('clear')
243
241
  clearValue() {
244
242
  const {onChange, resetValue} = this.props;
245
243
 
@@ -546,6 +544,8 @@ export default class TextControl extends React.PureComponent<
546
544
  multiple,
547
545
  creatable,
548
546
  borderMode,
547
+ showCounter,
548
+ maxLength,
549
549
  translate: __
550
550
  } = this.props;
551
551
  let type = this.props.type?.replace(/^(?:native|input)\-/, '');
@@ -664,6 +664,16 @@ export default class TextControl extends React.PureComponent<
664
664
  </a>
665
665
  ) : null}
666
666
 
667
+ {showCounter ? (
668
+ <span className={cx('TextControl-counter')}>
669
+ {`${this.valueToString(value)?.length}${
670
+ typeof maxLength === 'number' && maxLength
671
+ ? `/${maxLength}`
672
+ : ''
673
+ }`}
674
+ </span>
675
+ ) : null}
676
+
667
677
  {loading ? (
668
678
  <Spinner
669
679
  show
@@ -832,8 +842,8 @@ export default class TextControl extends React.PureComponent<
832
842
  </div>
833
843
  ) : (
834
844
  <div className={cx(`${ns}TextControl-addOn`, addOn.className)}>
835
- {addOn.label ? filter(addOn.label, data) : null}
836
845
  {iconElement}
846
+ {addOn.label ? filter(addOn.label, data) : null}
837
847
  </div>
838
848
  )
839
849
  ) : null;
@@ -8,6 +8,8 @@ import {
8
8
  } from './Options';
9
9
  import {Spinner} from '../../components';
10
10
  import {SchemaApi} from '../../Schema';
11
+ import {autobind, createObject} from '../../utils/helper';
12
+ import {Action} from '../../types';
11
13
 
12
14
  /**
13
15
  * Tree 下拉选择框。
@@ -98,12 +100,48 @@ export default class TreeControl extends React.Component<TreeProps> {
98
100
  enableNodePath: false,
99
101
  pathSeparator: '/'
100
102
  };
103
+ treeRef: any
101
104
 
102
105
  reload() {
103
106
  const reload = this.props.reloadOptions;
104
107
  reload && reload();
105
108
  }
106
109
 
110
+ doAction(action: Action, data: any, throwErrors: boolean) {
111
+ const {resetValue, onChange, options} = this.props;
112
+ if (action.actionType && ['clear', 'reset'].includes(action.actionType)) {
113
+ onChange && onChange(resetValue ?? '');
114
+ }
115
+ if (action.actionType === 'expand') {
116
+ this.treeRef.syncUnFolded(this.props, action.openLevel);
117
+ }
118
+ if (action.actionType === 'collapse') {
119
+ this.treeRef.syncUnFolded(this.props, 0);
120
+ }
121
+ }
122
+
123
+
124
+
125
+ @autobind
126
+ async handleChange(value: any) {
127
+ const {onChange, dispatchEvent, data} = this.props;
128
+
129
+ const rendererEvent = await dispatchEvent('change', createObject(data, {
130
+ value
131
+ }));
132
+
133
+ if (rendererEvent?.prevented) {
134
+ return;
135
+ }
136
+
137
+ onChange && onChange(value);
138
+ }
139
+
140
+ @autobind
141
+ domRef(ref: any) {
142
+ this.treeRef = ref;
143
+ }
144
+
107
145
  render() {
108
146
  const {
109
147
  className,
@@ -112,7 +150,6 @@ export default class TreeControl extends React.Component<TreeProps> {
112
150
  value,
113
151
  enableNodePath,
114
152
  pathSeparator = '/',
115
- onChange,
116
153
  disabled,
117
154
  joinValues,
118
155
  extractValue,
@@ -162,11 +199,12 @@ export default class TreeControl extends React.Component<TreeProps> {
162
199
  {loading ? null : (
163
200
  <TreeSelector
164
201
  classPrefix={ns}
202
+ onRef={this.domRef}
165
203
  labelField={labelField}
166
204
  valueField={valueField}
167
205
  iconField={iconField}
168
206
  disabled={disabled}
169
- onChange={onChange}
207
+ onChange={this.handleChange}
170
208
  joinValues={joinValues}
171
209
  extractValue={extractValue}
172
210
  delimiter={delimiter}
@@ -25,6 +25,7 @@ import {
25
25
  BaseSchema,
26
26
  SchemaApi,
27
27
  SchemaClassName,
28
+ SchemaExpression,
28
29
  SchemaObject,
29
30
  SchemaType
30
31
  } from '../../Schema';
@@ -87,6 +88,11 @@ export interface FormBaseControl
87
88
  */
88
89
  readOnly?: boolean;
89
90
 
91
+ /**
92
+ * 只读条件
93
+ */
94
+ readOnlyOn?: SchemaExpression;
95
+
90
96
  /**
91
97
  * 不设置时,当表单提交过后表单项每次修改都会触发重新验证,
92
98
  * 如果设置了,则由此配置项来决定要不要每次修改都触发验证。
@@ -552,6 +558,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
552
558
  `Form-item Form-item--horizontal`,
553
559
  className,
554
560
  {
561
+ 'Form-item--horizontal-justify': horizontal.justify,
555
562
  [`is-error`]: model && !model.valid,
556
563
  [`is-required`]: required
557
564
  },
@@ -61,6 +61,11 @@ export interface NestedSelectControlSchema extends FormOptionsControl {
61
61
  */
62
62
  onlyChildren?: boolean;
63
63
 
64
+ /**
65
+ * 单选时只允许选择叶子节点
66
+ */
67
+ onlyLeaf?: boolean;
68
+
64
69
  /**
65
70
  * 是否隐藏选择框中已选中节点的祖先节点的文本信息
66
71
  */
@@ -91,6 +96,7 @@ export default class NestedSelectControl extends React.Component<
91
96
  cascade: false,
92
97
  withChildren: false,
93
98
  onlyChildren: false,
99
+ onlyLeaf: false,
94
100
  searchPromptText: 'Select.searchPromptText',
95
101
  noResultsText: 'noResult',
96
102
  checkAll: true,
@@ -241,7 +247,7 @@ export default class NestedSelectControl extends React.Component<
241
247
  );
242
248
  })
243
249
  : label}
244
- {!isEnd && '>'}
250
+ {!isEnd && ' > '}
245
251
  </span>
246
252
  );
247
253
  })
@@ -252,7 +258,7 @@ export default class NestedSelectControl extends React.Component<
252
258
 
253
259
  @autobind
254
260
  async handleOptionClick(option: Option) {
255
- const {multiple, onChange, joinValues, extractValue, valueField} =
261
+ const {multiple, onChange, joinValues, extractValue, valueField, onlyLeaf} =
256
262
  this.props;
257
263
 
258
264
  if (multiple) {
@@ -265,10 +271,21 @@ export default class NestedSelectControl extends React.Component<
265
271
  ? option[valueField || 'value']
266
272
  : option;
267
273
 
274
+ if (value === undefined) {
275
+ return;
276
+ }
277
+
278
+ if (onlyLeaf && option.children) {
279
+ return;
280
+ }
281
+
268
282
  const isPrevented = await this.dispatchEvent('change', {
269
283
  value
270
284
  });
271
285
  isPrevented || onChange(value);
286
+
287
+ isPrevented || this.handleResultClear();
288
+
272
289
  !multiple && this.close();
273
290
  }
274
291
 
@@ -383,6 +400,8 @@ export default class NestedSelectControl extends React.Component<
383
400
  value: newValue
384
401
  });
385
402
  isPrevented || onChange(newValue);
403
+
404
+ isPrevented || this.handleResultClear();
386
405
  }
387
406
 
388
407
  allChecked(options: Options): boolean {
@@ -421,7 +440,7 @@ export default class NestedSelectControl extends React.Component<
421
440
  });
422
441
 
423
442
  const isPrevented = await this.dispatchEvent('focus', e);
424
- isPrevented || onFocus && onFocus(e);
443
+ isPrevented || (onFocus && onFocus(e));
425
444
  }
426
445
  }
427
446
 
@@ -434,7 +453,7 @@ export default class NestedSelectControl extends React.Component<
434
453
  });
435
454
 
436
455
  const isPrevented = await this.dispatchEvent('blur', e);
437
- isPrevented || onBlur && onBlur(e);
456
+ isPrevented || (onBlur && onBlur(e));
438
457
  }
439
458
 
440
459
  @autobind