amis-ui 2.2.0 → 2.3.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 (617) hide show
  1. package/esm/components/404.js +1 -1
  2. package/esm/components/Alert.js +1 -1
  3. package/esm/components/Alert2.js +1 -1
  4. package/esm/components/AnchorNav.js +2 -2
  5. package/esm/components/ArrayInput.js +1 -1
  6. package/esm/components/AsideNav.d.ts +11 -11
  7. package/esm/components/AsideNav.js +1 -1
  8. package/esm/components/AssociatedSelection.d.ts +40 -40
  9. package/esm/components/AssociatedSelection.js +3 -3
  10. package/esm/components/Avatar.js +1 -1
  11. package/esm/components/Badge.js +1 -1
  12. package/esm/components/BaiduMapPicker.js +1 -1
  13. package/esm/components/BarCode.js +1 -1
  14. package/esm/components/Breadcrumb.js +1 -1
  15. package/esm/components/Button.js +4 -5
  16. package/esm/components/CalendarMobile.js +1 -1
  17. package/esm/components/Card.js +1 -1
  18. package/esm/components/Cascader.js +1 -1
  19. package/esm/components/ChainedSelection.d.ts +40 -40
  20. package/esm/components/ChainedSelection.js +7 -5
  21. package/esm/components/Checkbox.js +1 -1
  22. package/esm/components/CityArea.js +1 -1
  23. package/esm/components/CityDB.js +1 -1
  24. package/esm/components/CodeMirror.js +1 -1
  25. package/esm/components/Collapse.js +1 -1
  26. package/esm/components/CollapseGroup.js +1 -1
  27. package/esm/components/ColorPicker.js +1 -1
  28. package/esm/components/ContextMenu.js +1 -1
  29. package/esm/components/DatePicker.js +1 -1
  30. package/esm/components/DateRangePicker.js +4 -2
  31. package/esm/components/Drawer.js +1 -1
  32. package/esm/components/Editor.js +1 -1
  33. package/esm/components/Form.js +1 -1
  34. package/esm/components/FormField.js +1 -1
  35. package/esm/components/GridNav.js +1 -1
  36. package/esm/components/GroupedSelection.d.ts +41 -41
  37. package/esm/components/GroupedSelection.js +12 -5
  38. package/esm/components/Html.js +1 -1
  39. package/esm/components/ImageGallery.d.ts +10 -3
  40. package/esm/components/ImageGallery.js +18 -6
  41. package/esm/components/Input.js +1 -1
  42. package/esm/components/InputBox.js +1 -1
  43. package/esm/components/InputBoxWithSuggestion.js +1 -1
  44. package/esm/components/Layout.js +1 -1
  45. package/esm/components/Link.js +1 -1
  46. package/esm/components/ListGroup.js +1 -1
  47. package/esm/components/ListMenu.js +1 -1
  48. package/esm/components/LocationPicker.js +1 -1
  49. package/esm/components/Markdown.js +1 -1
  50. package/esm/components/Modal.d.ts +18 -18
  51. package/esm/components/Modal.js +1 -1
  52. package/esm/components/ModalManager.js +1 -1
  53. package/esm/components/NumberInput.d.ts +19 -10
  54. package/esm/components/NumberInput.js +38 -9
  55. package/esm/components/Pagination.js +2 -2
  56. package/esm/components/Picker.js +1 -1
  57. package/esm/components/PickerColumn.js +1 -1
  58. package/esm/components/PickerContainer.js +1 -1
  59. package/esm/components/PopOverContainer.js +1 -1
  60. package/esm/components/PopUp.js +1 -1
  61. package/esm/components/Progress.js +1 -1
  62. package/esm/components/PullRefresh.js +1 -1
  63. package/esm/components/Radios.js +1 -1
  64. package/esm/components/Range.js +5 -3
  65. package/esm/components/Rating.js +1 -1
  66. package/esm/components/ResultBox.js +1 -1
  67. package/esm/components/ResultList.d.ts +45 -42
  68. package/esm/components/ResultList.js +10 -8
  69. package/esm/components/ResultTableList.d.ts +41 -40
  70. package/esm/components/ResultTableList.js +3 -3
  71. package/esm/components/ResultTreeList.d.ts +41 -40
  72. package/esm/components/ResultTreeList.js +4 -4
  73. package/esm/components/RichText.js +1 -1
  74. package/esm/components/SearchBox.js +1 -1
  75. package/esm/components/Select.d.ts +193 -193
  76. package/esm/components/Select.js +1 -1
  77. package/esm/components/Selection.d.ts +42 -40
  78. package/esm/components/Selection.js +6 -3
  79. package/esm/components/SparkLine.js +1 -1
  80. package/esm/components/Spinner.d.ts +12 -0
  81. package/esm/components/Spinner.js +111 -23
  82. package/esm/components/Steps.js +1 -1
  83. package/esm/components/Switch.js +1 -1
  84. package/esm/components/TableSelection.d.ts +40 -40
  85. package/esm/components/TableSelection.js +1 -1
  86. package/esm/components/Tabs.js +1 -1
  87. package/esm/components/TabsTransfer.js +1 -1
  88. package/esm/components/TabsTransferPicker.js +1 -1
  89. package/esm/components/Tag.js +1 -1
  90. package/esm/components/Textarea.js +2 -2
  91. package/esm/components/Timeline.js +1 -1
  92. package/esm/components/TimelineItem.js +1 -1
  93. package/esm/components/Tinymce.js +2 -2
  94. package/esm/components/TitleBar.js +1 -1
  95. package/esm/components/Toast.js +1 -1
  96. package/esm/components/Tooltip.js +1 -1
  97. package/esm/components/TooltipWrapper.js +1 -1
  98. package/esm/components/Transfer.d.ts +50 -50
  99. package/esm/components/Transfer.js +12 -12
  100. package/esm/components/TransferDropDown.d.ts +40 -40
  101. package/esm/components/TransferDropDown.js +1 -1
  102. package/esm/components/TransferPicker.js +1 -1
  103. package/esm/components/TransferSearch.d.ts +40 -42
  104. package/esm/components/TransferSearch.js +2 -8
  105. package/esm/components/Tree.js +3 -2
  106. package/esm/components/TreeSelection.d.ts +40 -40
  107. package/esm/components/TreeSelection.js +1 -1
  108. package/esm/components/UserSelect.d.ts +5 -1
  109. package/esm/components/UserSelect.js +87 -28
  110. package/esm/components/UserTabSelect.d.ts +4 -3
  111. package/esm/components/UserTabSelect.js +64 -18
  112. package/esm/components/WithRemoteConfig.js +1 -1
  113. package/esm/components/WithStore.js +1 -1
  114. package/esm/components/calendar/Calendar.js +1 -1
  115. package/esm/components/calendar/CalendarContainer.js +1 -1
  116. package/esm/components/calendar/DaysView.js +1 -1
  117. package/esm/components/calendar/MonthsView.js +1 -1
  118. package/esm/components/calendar/QuartersView.js +1 -1
  119. package/esm/components/calendar/TimeView.js +1 -1
  120. package/esm/components/calendar/YearsView.js +1 -1
  121. package/esm/components/condition-builder/Expression.d.ts +1 -0
  122. package/esm/components/condition-builder/Expression.js +3 -3
  123. package/esm/components/condition-builder/Field.d.ts +2 -1
  124. package/esm/components/condition-builder/Field.js +9 -5
  125. package/esm/components/condition-builder/Formula.js +1 -1
  126. package/esm/components/condition-builder/Func.js +1 -1
  127. package/esm/components/condition-builder/Group.d.ts +1 -0
  128. package/esm/components/condition-builder/Group.js +3 -3
  129. package/esm/components/condition-builder/GroupOrItem.d.ts +1 -0
  130. package/esm/components/condition-builder/GroupOrItem.js +3 -3
  131. package/esm/components/condition-builder/InputSwitch.js +1 -1
  132. package/esm/components/condition-builder/Item.d.ts +1 -0
  133. package/esm/components/condition-builder/Item.js +3 -3
  134. package/esm/components/condition-builder/Value.js +1 -1
  135. package/esm/components/condition-builder/config.js +1 -1
  136. package/esm/components/condition-builder/index.d.ts +1 -0
  137. package/esm/components/condition-builder/index.js +3 -3
  138. package/esm/components/formula/Editor.d.ts +2 -0
  139. package/esm/components/formula/Editor.js +17 -6
  140. package/esm/components/formula/FuncList.js +1 -1
  141. package/esm/components/formula/Picker.d.ts +65 -54
  142. package/esm/components/formula/Picker.js +22 -9
  143. package/esm/components/formula/VariableList.js +1 -1
  144. package/esm/components/formula/plugin.d.ts +1 -1
  145. package/esm/components/formula/plugin.js +6 -4
  146. package/esm/components/icons.js +1 -1
  147. package/esm/components/json-schema/Array.js +1 -1
  148. package/esm/components/json-schema/Item.js +1 -1
  149. package/esm/components/json-schema/Object.js +1 -1
  150. package/esm/components/json-schema/index.js +1 -1
  151. package/esm/components/schema-editor/Array.js +1 -1
  152. package/esm/components/schema-editor/Common.js +1 -1
  153. package/esm/components/schema-editor/Item.js +1 -1
  154. package/esm/components/schema-editor/Object.js +1 -1
  155. package/esm/components/schema-editor/SchemaVariableList.js +1 -1
  156. package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
  157. package/esm/components/schema-editor/index.js +1 -1
  158. package/esm/components/table/Cell.js +1 -1
  159. package/esm/components/table/HeadCellDropDown.js +1 -1
  160. package/esm/components/table/HeadCellFilter.js +1 -1
  161. package/esm/components/table/HeadCellSelect.js +1 -1
  162. package/esm/components/table/HeadCellSort.js +1 -1
  163. package/esm/components/table/ItemActionsWrapper.js +1 -1
  164. package/esm/components/table/index.d.ts +49 -43
  165. package/esm/components/table/index.js +98 -51
  166. package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
  167. package/esm/components/virtual-list/constants.js +1 -1
  168. package/esm/components/virtual-list/index.js +1 -1
  169. package/esm/hooks/use-set-state.js +1 -1
  170. package/esm/hooks/use-touch.js +1 -1
  171. package/esm/hooks/use-update-effect.js +1 -1
  172. package/esm/hooks/use-validation-resolver.js +1 -1
  173. package/esm/icons/alert-danger.svg.js +1 -1
  174. package/esm/icons/alert-info.svg.js +1 -1
  175. package/esm/icons/alert-success.svg.js +1 -1
  176. package/esm/icons/alert-warning.svg.js +1 -1
  177. package/esm/icons/back.svg.js +1 -1
  178. package/esm/icons/calendar.svg.js +1 -1
  179. package/esm/icons/caret.svg.js +1 -1
  180. package/esm/icons/check-circle.svg.js +1 -1
  181. package/esm/icons/check.svg.js +1 -1
  182. package/esm/icons/clock.svg.js +1 -1
  183. package/esm/icons/close-small.svg.js +1 -1
  184. package/esm/icons/close.svg.js +1 -1
  185. package/esm/icons/cloud-upload.svg.js +1 -1
  186. package/esm/icons/column-filter.svg.js +1 -1
  187. package/esm/icons/columns.svg.js +1 -1
  188. package/esm/icons/compress-alt.svg.js +1 -1
  189. package/esm/icons/copy.svg.js +1 -1
  190. package/esm/icons/date.svg.js +1 -1
  191. package/esm/icons/department.svg.js +1 -1
  192. package/esm/icons/desk-empty.svg.js +1 -1
  193. package/esm/icons/dot.svg.js +1 -1
  194. package/esm/icons/down-arrow-bold.svg.js +1 -1
  195. package/esm/icons/down.svg.js +1 -1
  196. package/esm/icons/download.svg.js +1 -1
  197. package/esm/icons/drag-bar.svg.js +1 -1
  198. package/esm/icons/drag.svg.js +1 -1
  199. package/esm/icons/edit.svg.js +1 -1
  200. package/esm/icons/ellipsis-v.svg.js +1 -1
  201. package/esm/icons/enter.svg.js +1 -1
  202. package/esm/icons/exchange.svg.js +1 -1
  203. package/esm/icons/expand-alt.svg.js +1 -1
  204. package/esm/icons/fail.svg.js +1 -1
  205. package/esm/icons/file.svg.js +1 -1
  206. package/esm/icons/filter.svg.js +1 -1
  207. package/esm/icons/folder.svg.js +1 -1
  208. package/esm/icons/function.svg.js +1 -1
  209. package/esm/icons/home.svg.js +1 -1
  210. package/esm/icons/image.svg.js +1 -1
  211. package/esm/icons/info-circle.svg.js +1 -1
  212. package/esm/icons/info.svg.js +1 -1
  213. package/esm/icons/input-clear.svg.js +1 -1
  214. package/esm/icons/invisible.svg.js +1 -1
  215. package/esm/icons/left-arrow.svg.js +1 -1
  216. package/esm/icons/loading-outline.svg.js +1 -1
  217. package/esm/icons/location.svg.js +1 -1
  218. package/esm/icons/menu.svg.js +1 -1
  219. package/esm/icons/minus.svg.js +1 -1
  220. package/esm/icons/move.svg.js +1 -1
  221. package/esm/icons/mute.svg.js +1 -1
  222. package/esm/icons/new-edit.svg.js +1 -1
  223. package/esm/icons/pause.svg.js +1 -1
  224. package/esm/icons/pencil.svg.js +1 -1
  225. package/esm/icons/play.svg.js +1 -1
  226. package/esm/icons/plus-cicle.svg.js +1 -1
  227. package/esm/icons/plus-fine.svg.js +1 -1
  228. package/esm/icons/plus.svg.js +1 -1
  229. package/esm/icons/post.svg.js +1 -1
  230. package/esm/icons/question-mark.svg.js +1 -1
  231. package/esm/icons/question.svg.js +1 -1
  232. package/esm/icons/redo.svg.js +1 -1
  233. package/esm/icons/refresh.svg.js +1 -1
  234. package/esm/icons/reload.svg.js +1 -1
  235. package/esm/icons/remove.svg.js +1 -1
  236. package/esm/icons/retry.svg.js +1 -1
  237. package/esm/icons/right-arrow-bold.svg.js +1 -1
  238. package/esm/icons/right-arrow.svg.js +1 -1
  239. package/esm/icons/right-double-arrow.svg.js +1 -1
  240. package/esm/icons/role.svg.js +1 -1
  241. package/esm/icons/rotate-left.svg.js +1 -1
  242. package/esm/icons/rotate-right.svg.js +1 -1
  243. package/esm/icons/scale-origin.svg.js +1 -1
  244. package/esm/icons/schedule.svg.js +1 -1
  245. package/esm/icons/search.svg.js +1 -1
  246. package/esm/icons/setting.svg.js +1 -1
  247. package/esm/icons/slider-handle-icon.svg.js +1 -1
  248. package/esm/icons/sort-asc.svg.js +1 -1
  249. package/esm/icons/sort-default.svg.js +1 -1
  250. package/esm/icons/sort-desc.svg.js +1 -1
  251. package/esm/icons/star.svg.js +1 -1
  252. package/esm/icons/status-close.svg.js +1 -1
  253. package/esm/icons/status-fail.svg.js +1 -1
  254. package/esm/icons/status-info.svg.js +1 -1
  255. package/esm/icons/status-success.svg.js +1 -1
  256. package/esm/icons/status-warning.svg.js +1 -1
  257. package/esm/icons/steps-finsh.svg.js +1 -1
  258. package/esm/icons/success.svg.js +1 -1
  259. package/esm/icons/transparent.svg.js +1 -1
  260. package/esm/icons/trash.svg.js +1 -1
  261. package/esm/icons/tree-down.svg.js +1 -1
  262. package/esm/icons/undo.svg.js +1 -1
  263. package/esm/icons/upload.svg.js +1 -1
  264. package/esm/icons/user-remove.svg.js +1 -1
  265. package/esm/icons/view.svg.js +1 -1
  266. package/esm/icons/volume.svg.js +1 -1
  267. package/esm/icons/warning-mark.svg.js +1 -1
  268. package/esm/icons/warning.svg.js +1 -1
  269. package/esm/icons/window-restore.svg.js +1 -1
  270. package/esm/icons/zoom-in.svg.js +1 -1
  271. package/esm/icons/zoom-out.svg.js +1 -1
  272. package/esm/index.js +1 -1
  273. package/esm/locale/de-DE.js +7 -2
  274. package/esm/locale/en-US.js +7 -3
  275. package/esm/locale/zh-CN.js +7 -3
  276. package/esm/themes/ang.js +1 -1
  277. package/esm/themes/antd.js +1 -1
  278. package/esm/themes/cxd.js +1 -1
  279. package/esm/themes/dark.js +1 -1
  280. package/lib/components/404.js +1 -1
  281. package/lib/components/Alert.js +1 -1
  282. package/lib/components/Alert2.d.ts +10 -10
  283. package/lib/components/Alert2.js +1 -1
  284. package/lib/components/AnchorNav.d.ts +10 -10
  285. package/lib/components/AnchorNav.js +2 -2
  286. package/lib/components/ArrayInput.d.ts +40 -40
  287. package/lib/components/ArrayInput.js +1 -1
  288. package/lib/components/AsideNav.d.ts +11 -11
  289. package/lib/components/AsideNav.js +1 -1
  290. package/lib/components/AssociatedSelection.d.ts +40 -40
  291. package/lib/components/AssociatedSelection.js +3 -3
  292. package/lib/components/Avatar.d.ts +10 -10
  293. package/lib/components/Avatar.js +1 -1
  294. package/lib/components/Badge.js +1 -1
  295. package/lib/components/BaiduMapPicker.js +1 -1
  296. package/lib/components/BarCode.js +1 -1
  297. package/lib/components/Breadcrumb.js +1 -1
  298. package/lib/components/Button.d.ts +10 -10
  299. package/lib/components/Button.js +4 -5
  300. package/lib/components/CalendarMobile.d.ts +40 -40
  301. package/lib/components/CalendarMobile.js +1 -1
  302. package/lib/components/Card.d.ts +10 -10
  303. package/lib/components/Card.js +1 -1
  304. package/lib/components/Cascader.js +1 -1
  305. package/lib/components/ChainedSelection.d.ts +40 -40
  306. package/lib/components/ChainedSelection.js +7 -5
  307. package/lib/components/Checkbox.d.ts +10 -10
  308. package/lib/components/Checkbox.js +1 -1
  309. package/lib/components/CityArea.js +1 -1
  310. package/lib/components/CityDB.js +1 -1
  311. package/lib/components/CodeMirror.js +1 -1
  312. package/lib/components/Collapse.d.ts +10 -10
  313. package/lib/components/Collapse.js +1 -1
  314. package/lib/components/CollapseGroup.js +1 -1
  315. package/lib/components/ColorPicker.d.ts +40 -40
  316. package/lib/components/ColorPicker.js +1 -1
  317. package/lib/components/ContextMenu.js +1 -1
  318. package/lib/components/DatePicker.d.ts +40 -40
  319. package/lib/components/DatePicker.js +1 -1
  320. package/lib/components/DateRangePicker.d.ts +40 -40
  321. package/lib/components/DateRangePicker.js +4 -2
  322. package/lib/components/Drawer.d.ts +10 -10
  323. package/lib/components/Drawer.js +1 -1
  324. package/lib/components/Editor.d.ts +40 -40
  325. package/lib/components/Editor.js +1 -1
  326. package/lib/components/Form.js +1 -1
  327. package/lib/components/FormField.js +1 -1
  328. package/lib/components/GridNav.js +1 -1
  329. package/lib/components/GroupedSelection.d.ts +41 -41
  330. package/lib/components/GroupedSelection.js +12 -5
  331. package/lib/components/Html.js +1 -1
  332. package/lib/components/ImageGallery.d.ts +10 -3
  333. package/lib/components/ImageGallery.js +18 -6
  334. package/lib/components/Input.js +1 -1
  335. package/lib/components/InputBox.d.ts +10 -10
  336. package/lib/components/InputBox.js +1 -1
  337. package/lib/components/InputBoxWithSuggestion.js +1 -1
  338. package/lib/components/Layout.js +1 -1
  339. package/lib/components/Link.js +1 -1
  340. package/lib/components/ListGroup.d.ts +10 -10
  341. package/lib/components/ListGroup.js +1 -1
  342. package/lib/components/ListMenu.d.ts +40 -40
  343. package/lib/components/ListMenu.js +1 -1
  344. package/lib/components/LocationPicker.d.ts +40 -40
  345. package/lib/components/LocationPicker.js +1 -1
  346. package/lib/components/Markdown.js +1 -1
  347. package/lib/components/Modal.d.ts +58 -58
  348. package/lib/components/Modal.js +1 -1
  349. package/lib/components/ModalManager.js +1 -1
  350. package/lib/components/MonthRangePicker.d.ts +40 -40
  351. package/lib/components/NumberInput.d.ts +19 -10
  352. package/lib/components/NumberInput.js +38 -9
  353. package/lib/components/Pagination.js +2 -2
  354. package/lib/components/Picker.js +1 -1
  355. package/lib/components/PickerColumn.js +1 -1
  356. package/lib/components/PickerContainer.js +1 -1
  357. package/lib/components/PopOverContainer.js +1 -1
  358. package/lib/components/PopUp.js +1 -1
  359. package/lib/components/Progress.d.ts +10 -10
  360. package/lib/components/Progress.js +1 -1
  361. package/lib/components/PullRefresh.js +1 -1
  362. package/lib/components/Radios.d.ts +10 -10
  363. package/lib/components/Radios.js +1 -1
  364. package/lib/components/Range.js +5 -3
  365. package/lib/components/Rating.d.ts +10 -10
  366. package/lib/components/Rating.js +1 -1
  367. package/lib/components/ResultBox.d.ts +40 -40
  368. package/lib/components/ResultBox.js +1 -1
  369. package/lib/components/ResultList.d.ts +45 -42
  370. package/lib/components/ResultList.js +10 -8
  371. package/lib/components/ResultTableList.d.ts +41 -40
  372. package/lib/components/ResultTableList.js +3 -3
  373. package/lib/components/ResultTreeList.d.ts +41 -40
  374. package/lib/components/ResultTreeList.js +4 -4
  375. package/lib/components/RichText.js +1 -1
  376. package/lib/components/SearchBox.d.ts +40 -40
  377. package/lib/components/SearchBox.js +1 -1
  378. package/lib/components/Select.d.ts +193 -193
  379. package/lib/components/Select.js +1 -1
  380. package/lib/components/Selection.d.ts +42 -40
  381. package/lib/components/Selection.js +6 -3
  382. package/lib/components/SparkLine.d.ts +40 -40
  383. package/lib/components/SparkLine.js +1 -1
  384. package/lib/components/Spinner.d.ts +22 -10
  385. package/lib/components/Spinner.js +111 -23
  386. package/lib/components/Steps.js +1 -1
  387. package/lib/components/Switch.d.ts +10 -10
  388. package/lib/components/Switch.js +1 -1
  389. package/lib/components/TableSelection.d.ts +40 -40
  390. package/lib/components/TableSelection.js +1 -1
  391. package/lib/components/Tabs.d.ts +40 -40
  392. package/lib/components/Tabs.js +1 -1
  393. package/lib/components/TabsTransfer.js +1 -1
  394. package/lib/components/TabsTransferPicker.js +1 -1
  395. package/lib/components/Tag.d.ts +10 -10
  396. package/lib/components/Tag.js +1 -1
  397. package/lib/components/Textarea.d.ts +40 -40
  398. package/lib/components/Textarea.js +2 -2
  399. package/lib/components/Timeline.js +1 -1
  400. package/lib/components/TimelineItem.js +1 -1
  401. package/lib/components/Tinymce.js +2 -2
  402. package/lib/components/TitleBar.js +1 -1
  403. package/lib/components/Toast.js +1 -1
  404. package/lib/components/Tooltip.js +1 -1
  405. package/lib/components/TooltipWrapper.js +1 -1
  406. package/lib/components/Transfer.d.ts +50 -50
  407. package/lib/components/Transfer.js +12 -12
  408. package/lib/components/TransferDropDown.d.ts +40 -40
  409. package/lib/components/TransferDropDown.js +1 -1
  410. package/lib/components/TransferPicker.js +1 -1
  411. package/lib/components/TransferSearch.d.ts +40 -42
  412. package/lib/components/TransferSearch.js +2 -8
  413. package/lib/components/Tree.d.ts +40 -40
  414. package/lib/components/Tree.js +3 -2
  415. package/lib/components/TreeSelection.d.ts +40 -40
  416. package/lib/components/TreeSelection.js +1 -1
  417. package/lib/components/UserSelect.d.ts +45 -41
  418. package/lib/components/UserSelect.js +86 -27
  419. package/lib/components/UserTabSelect.d.ts +44 -43
  420. package/lib/components/UserTabSelect.js +64 -18
  421. package/lib/components/WithRemoteConfig.js +1 -1
  422. package/lib/components/WithStore.js +1 -1
  423. package/lib/components/calendar/Calendar.js +1 -1
  424. package/lib/components/calendar/CalendarContainer.js +1 -1
  425. package/lib/components/calendar/DaysView.js +1 -1
  426. package/lib/components/calendar/MonthsView.js +1 -1
  427. package/lib/components/calendar/QuartersView.js +1 -1
  428. package/lib/components/calendar/TimeView.js +1 -1
  429. package/lib/components/calendar/YearsView.js +1 -1
  430. package/lib/components/condition-builder/Expression.d.ts +1 -0
  431. package/lib/components/condition-builder/Expression.js +3 -3
  432. package/lib/components/condition-builder/Field.d.ts +2 -1
  433. package/lib/components/condition-builder/Field.js +9 -5
  434. package/lib/components/condition-builder/Formula.js +1 -1
  435. package/lib/components/condition-builder/Func.js +1 -1
  436. package/lib/components/condition-builder/Group.d.ts +1 -0
  437. package/lib/components/condition-builder/Group.js +3 -3
  438. package/lib/components/condition-builder/GroupOrItem.d.ts +1 -0
  439. package/lib/components/condition-builder/GroupOrItem.js +3 -3
  440. package/lib/components/condition-builder/InputSwitch.js +1 -1
  441. package/lib/components/condition-builder/Item.d.ts +1 -0
  442. package/lib/components/condition-builder/Item.js +3 -3
  443. package/lib/components/condition-builder/Value.js +1 -1
  444. package/lib/components/condition-builder/config.js +1 -1
  445. package/lib/components/condition-builder/index.d.ts +1 -0
  446. package/lib/components/condition-builder/index.js +3 -3
  447. package/lib/components/formula/Editor.d.ts +42 -40
  448. package/lib/components/formula/Editor.js +17 -6
  449. package/lib/components/formula/FuncList.js +1 -1
  450. package/lib/components/formula/Picker.d.ts +65 -54
  451. package/lib/components/formula/Picker.js +22 -9
  452. package/lib/components/formula/VariableList.js +1 -1
  453. package/lib/components/formula/plugin.d.ts +1 -1
  454. package/lib/components/formula/plugin.js +6 -4
  455. package/lib/components/icons.js +1 -1
  456. package/lib/components/json-schema/Array.js +1 -1
  457. package/lib/components/json-schema/Item.js +1 -1
  458. package/lib/components/json-schema/Object.js +1 -1
  459. package/lib/components/json-schema/index.js +1 -1
  460. package/lib/components/schema-editor/Array.js +1 -1
  461. package/lib/components/schema-editor/Common.js +1 -1
  462. package/lib/components/schema-editor/Item.js +1 -1
  463. package/lib/components/schema-editor/Object.js +1 -1
  464. package/lib/components/schema-editor/SchemaVariableList.js +1 -1
  465. package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
  466. package/lib/components/schema-editor/index.d.ts +40 -40
  467. package/lib/components/schema-editor/index.js +1 -1
  468. package/lib/components/table/Cell.d.ts +40 -40
  469. package/lib/components/table/Cell.js +1 -1
  470. package/lib/components/table/HeadCellDropDown.js +1 -1
  471. package/lib/components/table/HeadCellFilter.js +1 -1
  472. package/lib/components/table/HeadCellSelect.js +1 -1
  473. package/lib/components/table/HeadCellSort.js +1 -1
  474. package/lib/components/table/ItemActionsWrapper.js +1 -1
  475. package/lib/components/table/index.d.ts +49 -43
  476. package/lib/components/table/index.js +98 -51
  477. package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
  478. package/lib/components/virtual-list/constants.js +1 -1
  479. package/lib/components/virtual-list/index.js +1 -1
  480. package/lib/helper.css +8335 -38
  481. package/lib/hooks/use-set-state.js +1 -1
  482. package/lib/hooks/use-touch.js +1 -1
  483. package/lib/hooks/use-update-effect.js +1 -1
  484. package/lib/hooks/use-validation-resolver.js +1 -1
  485. package/lib/icons/alert-danger.svg.js +1 -1
  486. package/lib/icons/alert-info.svg.js +1 -1
  487. package/lib/icons/alert-success.svg.js +1 -1
  488. package/lib/icons/alert-warning.svg.js +1 -1
  489. package/lib/icons/back.svg.js +1 -1
  490. package/lib/icons/calendar.svg.js +1 -1
  491. package/lib/icons/caret.svg.js +1 -1
  492. package/lib/icons/check-circle.svg.js +1 -1
  493. package/lib/icons/check.svg.js +1 -1
  494. package/lib/icons/clock.svg.js +1 -1
  495. package/lib/icons/close-small.svg.js +1 -1
  496. package/lib/icons/close.svg.js +1 -1
  497. package/lib/icons/cloud-upload.svg.js +1 -1
  498. package/lib/icons/column-filter.svg.js +1 -1
  499. package/lib/icons/columns.svg.js +1 -1
  500. package/lib/icons/compress-alt.svg.js +1 -1
  501. package/lib/icons/copy.svg.js +1 -1
  502. package/lib/icons/date.svg.js +1 -1
  503. package/lib/icons/department.svg.js +1 -1
  504. package/lib/icons/desk-empty.svg.js +1 -1
  505. package/lib/icons/dot.svg.js +1 -1
  506. package/lib/icons/down-arrow-bold.svg.js +1 -1
  507. package/lib/icons/down.svg.js +1 -1
  508. package/lib/icons/download.svg.js +1 -1
  509. package/lib/icons/drag-bar.svg.js +1 -1
  510. package/lib/icons/drag.svg.js +1 -1
  511. package/lib/icons/edit.svg.js +1 -1
  512. package/lib/icons/ellipsis-v.svg.js +1 -1
  513. package/lib/icons/enter.svg.js +1 -1
  514. package/lib/icons/exchange.svg.js +1 -1
  515. package/lib/icons/expand-alt.svg.js +1 -1
  516. package/lib/icons/fail.svg.js +1 -1
  517. package/lib/icons/file.svg.js +1 -1
  518. package/lib/icons/filter.svg.js +1 -1
  519. package/lib/icons/folder.svg.js +1 -1
  520. package/lib/icons/function.svg.js +1 -1
  521. package/lib/icons/home.svg.js +1 -1
  522. package/lib/icons/image.svg.js +1 -1
  523. package/lib/icons/info-circle.svg.js +1 -1
  524. package/lib/icons/info.svg.js +1 -1
  525. package/lib/icons/input-clear.svg.js +1 -1
  526. package/lib/icons/invisible.svg.js +1 -1
  527. package/lib/icons/left-arrow.svg.js +1 -1
  528. package/lib/icons/loading-outline.svg.js +1 -1
  529. package/lib/icons/location.svg.js +1 -1
  530. package/lib/icons/menu.svg.js +1 -1
  531. package/lib/icons/minus.svg.js +1 -1
  532. package/lib/icons/move.svg.js +1 -1
  533. package/lib/icons/mute.svg.js +1 -1
  534. package/lib/icons/new-edit.svg.js +1 -1
  535. package/lib/icons/pause.svg.js +1 -1
  536. package/lib/icons/pencil.svg.js +1 -1
  537. package/lib/icons/play.svg.js +1 -1
  538. package/lib/icons/plus-cicle.svg.js +1 -1
  539. package/lib/icons/plus-fine.svg.js +1 -1
  540. package/lib/icons/plus.svg.js +1 -1
  541. package/lib/icons/post.svg.js +1 -1
  542. package/lib/icons/question-mark.svg.js +1 -1
  543. package/lib/icons/question.svg.js +1 -1
  544. package/lib/icons/redo.svg.js +1 -1
  545. package/lib/icons/refresh.svg.js +1 -1
  546. package/lib/icons/reload.svg.js +1 -1
  547. package/lib/icons/remove.svg.js +1 -1
  548. package/lib/icons/retry.svg.js +1 -1
  549. package/lib/icons/right-arrow-bold.svg.js +1 -1
  550. package/lib/icons/right-arrow.svg.js +1 -1
  551. package/lib/icons/right-double-arrow.svg.js +1 -1
  552. package/lib/icons/role.svg.js +1 -1
  553. package/lib/icons/rotate-left.svg.js +1 -1
  554. package/lib/icons/rotate-right.svg.js +1 -1
  555. package/lib/icons/scale-origin.svg.js +1 -1
  556. package/lib/icons/schedule.svg.js +1 -1
  557. package/lib/icons/search.svg.js +1 -1
  558. package/lib/icons/setting.svg.js +1 -1
  559. package/lib/icons/slider-handle-icon.svg.js +1 -1
  560. package/lib/icons/sort-asc.svg.js +1 -1
  561. package/lib/icons/sort-default.svg.js +1 -1
  562. package/lib/icons/sort-desc.svg.js +1 -1
  563. package/lib/icons/star.svg.js +1 -1
  564. package/lib/icons/status-close.svg.js +1 -1
  565. package/lib/icons/status-fail.svg.js +1 -1
  566. package/lib/icons/status-info.svg.js +1 -1
  567. package/lib/icons/status-success.svg.js +1 -1
  568. package/lib/icons/status-warning.svg.js +1 -1
  569. package/lib/icons/steps-finsh.svg.js +1 -1
  570. package/lib/icons/success.svg.js +1 -1
  571. package/lib/icons/transparent.svg.js +1 -1
  572. package/lib/icons/trash.svg.js +1 -1
  573. package/lib/icons/tree-down.svg.js +1 -1
  574. package/lib/icons/undo.svg.js +1 -1
  575. package/lib/icons/upload.svg.js +1 -1
  576. package/lib/icons/user-remove.svg.js +1 -1
  577. package/lib/icons/view.svg.js +1 -1
  578. package/lib/icons/volume.svg.js +1 -1
  579. package/lib/icons/warning-mark.svg.js +1 -1
  580. package/lib/icons/warning.svg.js +1 -1
  581. package/lib/icons/window-restore.svg.js +1 -1
  582. package/lib/icons/zoom-in.svg.js +1 -1
  583. package/lib/icons/zoom-out.svg.js +1 -1
  584. package/lib/index.js +1 -1
  585. package/lib/locale/de-DE.js +7 -2
  586. package/lib/locale/en-US.js +7 -3
  587. package/lib/locale/zh-CN.js +7 -3
  588. package/lib/scss/helper.scss.js +1 -1
  589. package/lib/scss/themes/ang.scss.js +1 -1
  590. package/lib/scss/themes/antd.scss.js +1 -1
  591. package/lib/scss/themes/cxd.scss.js +1 -1
  592. package/lib/scss/themes/dark.scss.js +1 -1
  593. package/lib/scss/themes/default.scss.js +1 -1
  594. package/lib/themes/ang.css +8847 -5617
  595. package/lib/themes/ang.js +1 -1
  596. package/lib/themes/antd.css +8955 -5731
  597. package/lib/themes/antd.js +1 -1
  598. package/lib/themes/cxd.css +8855 -5630
  599. package/lib/themes/cxd.js +1 -1
  600. package/lib/themes/dark.css +8940 -5709
  601. package/lib/themes/dark.js +1 -1
  602. package/lib/themes/default.css +8855 -5630
  603. package/package.json +22 -22
  604. package/scss/_mixins.scss +10 -0
  605. package/scss/_thirds.scss +6 -6
  606. package/scss/components/_anchor-nav.scss +9 -2
  607. package/scss/components/_collapse.scss +4 -4
  608. package/scss/components/_spinner.scss +6 -0
  609. package/scss/components/_table.scss +1 -1
  610. package/scss/components/form/_fieldset.scss +20 -0
  611. package/scss/components/form/_input-group.scss +5 -0
  612. package/scss/components/form/_selection.scss +6 -1
  613. package/scss/components/form/_textarea.scss +4 -2
  614. package/scss/components/form/_user-select.scss +35 -2
  615. package/scss/themes/_antd-variables.scss +4 -2
  616. package/scss/themes/_cxd-variables.scss +5 -1
  617. package/scss/themes/_dark-variables.scss +3 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -224,13 +224,14 @@ var Table = /** @class */ (function (_super) {
224
224
  };
225
225
  Table.prototype.componentDidMount = function () {
226
226
  var _this = this;
227
- var _a, _b;
227
+ var _a, _b, _c, _d;
228
+ (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onRef) === null || _b === void 0 ? void 0 : _b.call(_a, this);
228
229
  if (this.props.loading) {
229
230
  return;
230
231
  }
231
232
  this.updateTableFixedRows();
232
- var current = (_a = this.contentDom) === null || _a === void 0 ? void 0 : _a.current;
233
- if ((_b = this.headerDom) === null || _b === void 0 ? void 0 : _b.current) {
233
+ var current = (_c = this.contentDom) === null || _c === void 0 ? void 0 : _c.current;
234
+ if ((_d = this.headerDom) === null || _d === void 0 ? void 0 : _d.current) {
234
235
  // overflow设置为hidden的情况
235
236
  var hiddenDomRefs = [this.headerDom, this.footDom];
236
237
  hiddenDomRefs.forEach(function (ref) {
@@ -490,19 +491,25 @@ var Table = /** @class */ (function (_super) {
490
491
  var _a = this.props, rowSelection = _a.rowSelection, cx = _a.classnames, expandable = _a.expandable, draggable = _a.draggable;
491
492
  var tdColumns = this.tdColumns;
492
493
  var isExpandable = this.isExpandableTable();
493
- var extraCount = this.getExtraColumnCount();
494
+ var extraCount = this.getExtraColumnCount() - (this.isRightExpandable() ? 1 : 0);
495
+ var isLeftExpandable = this.isLeftExpandable();
496
+ var isRightExpandable = this.isRightExpandable();
497
+ var expandableCol = !draggable && isExpandable ? (React__default.createElement("col", { className: cx('Table-expand-col'), style: {
498
+ width: ((expandable === null || expandable === void 0 ? void 0 : expandable.columnWidth) || DefaultCellWidth) + 'px'
499
+ } })) : null;
494
500
  return (React__default.createElement("colgroup", null,
495
501
  draggable ? (React__default.createElement("col", { className: cx('Table-drag-col'), style: { width: DefaultCellWidth + 'px' } })) : null,
496
502
  !draggable && rowSelection ? (React__default.createElement("col", { className: cx('Table-selection-col'), style: {
497
503
  width: (rowSelection.columnWidth || DefaultCellWidth) + 'px'
498
504
  } })) : null,
499
- !draggable && isExpandable ? (React__default.createElement("col", { className: cx('Table-expand-col'), style: {
500
- width: ((expandable === null || expandable === void 0 ? void 0 : expandable.columnWidth) || DefaultCellWidth) + 'px'
501
- } })) : null,
505
+ isLeftExpandable ? expandableCol : null,
502
506
  tdColumns.map(function (data, index) {
503
- var width = colWidths ? colWidths[index + extraCount] : data.width;
507
+ var width = colWidths
508
+ ? colWidths[index + extraCount - (isRightExpandable ? 1 : 0)]
509
+ : data.width;
504
510
  return (React__default.createElement("col", { key: index, style: { width: typeof width === 'number' ? width + 'px' : width }, className: data.className ? cx("Table-colgroup-".concat(data.className)) : '' }));
505
- })));
511
+ }),
512
+ isRightExpandable ? expandableCol : null));
506
513
  };
507
514
  Table.prototype.onResizeMouseDown = function (event, index) {
508
515
  var _a;
@@ -579,16 +586,22 @@ var Table = /** @class */ (function (_super) {
579
586
  })
580
587
  : this.state.dataSource;
581
588
  var isExpandable = this.isExpandableTable();
589
+ var isLeftExpandable = this.isLeftExpandable();
590
+ var isRightExpandable = this.isRightExpandable();
591
+ var expandableCell = !draggable && isExpandable ? (React__default.createElement(Cell, { wrapperComponent: "th", rowSpan: thColumns.length, fixed: expandable && expandable.fixed ? 'left' : '', className: cx('Table-row-expand-icon-cell') })) : null;
582
592
  var allRowKeys = [];
583
593
  var allRows = [];
594
+ var maxSelectedLength = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.maxSelectedLength;
584
595
  dataList.forEach(function (data) {
585
- allRowKeys.push(data[keyField]);
586
- allRows.push(data);
587
- if (!expandable && _this.hasChildrenRow(data)) {
588
- allRowKeys = __spreadArray(__spreadArray([], allRowKeys, true), _this.getDataChildrenKeys(data), true);
589
- data[_this.getChildrenColumnName()].forEach(function (item) {
590
- return allRows.push(item);
591
- });
596
+ if (!!maxSelectedLength && allRows.length < maxSelectedLength) {
597
+ allRowKeys.push(data[keyField]);
598
+ allRows.push(data);
599
+ if (!expandable && _this.hasChildrenRow(data)) {
600
+ allRowKeys = __spreadArray(__spreadArray([], allRowKeys, true), _this.getDataChildrenKeys(data), true);
601
+ data[_this.getChildrenColumnName()].forEach(function (item) {
602
+ return allRows.push(item);
603
+ });
604
+ }
592
605
  }
593
606
  });
594
607
  return (React__default.createElement("thead", { ref: this.theadDom, className: cx('Table-thead') }, thColumns.map(function (data, index) {
@@ -599,21 +612,21 @@ var Table = /** @class */ (function (_super) {
599
612
  React__default.createElement(Checkbox, { key: "checkAll", partial: _this.state.selectedRowKeys.length > 0 &&
600
613
  _this.state.selectedRowKeys.length <
601
614
  allRowKeys.length, checked: _this.state.selectedRowKeys.length > 0, onChange: function (value) { return __awaiter(_this, void 0, void 0, function () {
602
- var changeRows, selectedRows, selectedRowKeys, prevented;
615
+ var selectedRows, selectedRowKeys, prevented;
603
616
  var _this = this;
604
617
  return __generator(this, function (_a) {
605
618
  switch (_a.label) {
606
619
  case 0:
607
620
  if (value) {
608
- changeRows = dataList.filter(function (data) { return !_this.hasCheckedRows(data); });
621
+ dataList.filter(function (data) { return !_this.hasCheckedRows(data); });
609
622
  }
610
623
  else {
611
- changeRows = this.selectedRows;
624
+ this.selectedRows;
612
625
  }
613
626
  selectedRows = value ? allRows : [];
614
627
  selectedRowKeys = value ? allRowKeys : [];
615
628
  if (!onSelectAll) return [3 /*break*/, 2];
616
- return [4 /*yield*/, onSelectAll(selectedRows, value ? [] : selectedRows, changeRows)];
629
+ return [4 /*yield*/, onSelectAll(selectedRows, value ? selectedRowKeys : [], value ? [] : selectedRows)];
617
630
  case 1:
618
631
  prevented = _a.sent();
619
632
  if (prevented) {
@@ -630,7 +643,7 @@ var Table = /** @class */ (function (_super) {
630
643
  rowSelection.selections.length > 0 ? (React__default.createElement(HeadCellSelect, { key: "checkSelection", keys: allRowKeys, selections: rowSelection.selections, popOverContainer: _this.getPopOverContainer })) : null
631
644
  ]
632
645
  : null)) : null,
633
- !draggable && isExpandable && index === 0 ? (React__default.createElement(Cell, { wrapperComponent: "th", rowSpan: thColumns.length, fixed: expandable && expandable.fixed ? 'left' : '', className: cx('Table-row-expand-icon-cell') })) : null,
646
+ isLeftExpandable && index === 0 ? expandableCell : null,
634
647
  data.map(function (item, i) {
635
648
  var _a, _b;
636
649
  var sort = null;
@@ -677,7 +690,8 @@ var Table = /** @class */ (function (_super) {
677
690
  }), groupId: item.groupId, depth: item.depth }, typeof item.title === 'function'
678
691
  ? item.title(children)
679
692
  : item.title));
680
- })));
693
+ }),
694
+ isRightExpandable && index === 0 ? expandableCell : null));
681
695
  })));
682
696
  };
683
697
  Table.prototype.onRowClick = function (event, record, rowIndex) {
@@ -752,20 +766,24 @@ var Table = /** @class */ (function (_super) {
752
766
  Table.prototype.onMouseLeave = function () {
753
767
  this.setState({ hoverRow: null });
754
768
  };
755
- Table.prototype.onExpandRow = function (data) {
769
+ Table.prototype.onExpandRows = function (data) {
770
+ var _this = this;
756
771
  var expandedRowKeys = this.state.expandedRowKeys;
757
772
  var expandable = this.props.expandable;
758
- var key = data[this.getExpandableKeyField()];
759
- this.setState({ expandedRowKeys: __spreadArray(__spreadArray([], expandedRowKeys, true), [key], false) });
773
+ var keys = data.map(function (d) { return d[_this.getExpandableKeyField()]; });
774
+ this.setState({ expandedRowKeys: __spreadArray(__spreadArray([], expandedRowKeys, true), keys, true) });
760
775
  (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand) && (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand(true, data));
761
776
  };
762
- Table.prototype.onCollapseRow = function (data) {
777
+ Table.prototype.onCollapseRows = function (data) {
778
+ var _this = this;
763
779
  var expandedRowKeys = this.state.expandedRowKeys;
764
780
  var expandable = this.props.expandable;
765
- var key = data[this.getExpandableKeyField()];
766
- // 还是得模糊匹配 否则'3'、3匹配不上
767
- this.setState({ expandedRowKeys: expandedRowKeys.filter(function (k) { return k != key; }) });
768
- (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand) && (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand(false, data));
781
+ var keys = data.map(function (d) { return d[_this.getExpandableKeyField()]; });
782
+ this.setState({
783
+ expandedRowKeys: expandedRowKeys.filter(function (k) { return !keys.find(function (v) { return v == k; }); } // 模糊匹配 否则'3'、3匹配不上
784
+ )
785
+ });
786
+ (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand) && (expandable === null || expandable === void 0 ? void 0 : expandable.onExpand(true, data));
769
787
  };
770
788
  Table.prototype.getChildrenColumnName = function () {
771
789
  var childrenColumnName = this.props.childrenColumnName;
@@ -787,8 +805,8 @@ var Table = /** @class */ (function (_super) {
787
805
  Table.prototype.isExpandableRow = function (data, rowIndex) {
788
806
  var expandable = this.props.expandable;
789
807
  return (expandable &&
790
- expandable.rowExpandable &&
791
- expandable.rowExpandable(data, rowIndex));
808
+ (!expandable.rowExpandable ||
809
+ (expandable.rowExpandable && expandable.rowExpandable(data, rowIndex))));
792
810
  };
793
811
  // 获取当前行数据所有子行的key值
794
812
  Table.prototype.getDataChildrenKeys = function (data) {
@@ -817,10 +835,14 @@ var Table = /** @class */ (function (_super) {
817
835
  var length = intersection(selectedRowKeys, childrenKeys).length;
818
836
  return length > 0;
819
837
  };
820
- Table.prototype.getExpandedIcons = function (isExpanded, record) {
838
+ Table.prototype.isExpanded = function (record) {
839
+ var _this = this;
840
+ return !!find(this.state.expandedRowKeys, function (key) { return key == record[_this.getExpandableKeyField()]; }); // == 匹配 否则'3'、3匹配不上
841
+ };
842
+ Table.prototype.getExpandedIcons = function (record) {
821
843
  var cx = this.props.classnames;
822
- return isExpanded ? (React__default.createElement("i", { className: cx('Table-expandBtn', 'is-active'), onClick: this.onCollapseRow.bind(this, record) },
823
- React__default.createElement(Icon, { icon: "right-arrow-bold", className: "icon" }))) : (React__default.createElement("i", { className: cx('Table-expandBtn'), onClick: this.onExpandRow.bind(this, record) },
844
+ return this.isExpanded(record) ? (React__default.createElement("i", { className: cx('Table-expandBtn', 'is-active'), onClick: this.onCollapseRows.bind(this, [record]) },
845
+ React__default.createElement(Icon, { icon: "right-arrow-bold", className: "icon" }))) : (React__default.createElement("i", { className: cx('Table-expandBtn'), onClick: this.onExpandRows.bind(this, [record]) },
824
846
  React__default.createElement(Icon, { icon: "right-arrow-bold", className: "icon" })));
825
847
  };
826
848
  Table.prototype.selectedSingleRow = function (value, data) {
@@ -875,11 +897,13 @@ var Table = /** @class */ (function (_super) {
875
897
  var isExpandable = this.isExpandableTable();
876
898
  var defaultKey = this.getRowSelectionKeyField();
877
899
  var colCount = this.getExtraColumnCount();
900
+ var isLeftExpandable = this.isLeftExpandable();
901
+ var isRightExpandable = this.isRightExpandable();
878
902
  // 当前行是否可展开
879
903
  var isExpandableRow = this.isExpandableRow(data, rowIndex);
880
904
  // 当前行是否有children
881
905
  var hasChildrenRow = this.hasChildrenRow(data);
882
- var isExpanded = !!find(this.state.expandedRowKeys, function (key) { return key == data[_this.getExpandableKeyField()]; }); // == 匹配 否则'3'、3匹配不上
906
+ var isExpanded = this.isExpanded(data);
883
907
  // 设置缩进效果
884
908
  var indentDom = levels.length > 0 ? (React__default.createElement("span", { className: cx('Table-row-indent', "indent-level-".concat(levels.length)), style: levels.length > 0
885
909
  ? { paddingLeft: indentSize * levels.length + 'px' }
@@ -911,9 +935,7 @@ var Table = /** @class */ (function (_super) {
911
935
  _b[cx("Table-cell-height-".concat(lineHeight))] = !!lineHeight,
912
936
  _b)) },
913
937
  i === 0 && levels.length > 0 ? indentDom : null,
914
- i === 0 && hasChildrenRow
915
- ? _this.getExpandedIcons(isExpanded, data)
916
- : null,
938
+ i === 0 && hasChildrenRow ? _this.getExpandedIcons(data) : null,
917
939
  render ? children : data[item.name])));
918
940
  });
919
941
  var rowClassNameClass = rowClassName && typeof rowClassName === 'function'
@@ -942,6 +964,13 @@ var Table = /** @class */ (function (_super) {
942
964
  var isChecked = !!find(this.state.selectedRowKeys, function (key) { return key === data[defaultKey]; });
943
965
  var hasChildrenChecked = this.hasCheckedChildrenRows(data);
944
966
  var isRadio = rowSelection && rowSelection.type === 'radio';
967
+ var expandableCell = !draggable && isExpandable ? (React__default.createElement(Cell, { fixed: expandable && expandable.fixed
968
+ ? isRightExpandable
969
+ ? 'right'
970
+ : 'left'
971
+ : '', className: cx('Table-cell-expand-icon-cell') }, isExpandableRow || hasChildrenRow
972
+ ? this.getExpandedIcons(data)
973
+ : null)) : null;
945
974
  return [
946
975
  React__default.createElement("tr", { key: "".concat(data[keyField || 'key'] || rowIndex), "row-index": rowIndex, "row-levels": levels.join(','), className: cx('Table-row', "Table-row-level-".concat(levels.length), rowClassNameClass, {
947
976
  'Table-row-disabled': !!checkboxProps.disabled
@@ -955,10 +984,9 @@ var Table = /** @class */ (function (_super) {
955
984
  }
956
985
  event && event.stopPropagation();
957
986
  } }, checkboxProps)))) : null,
958
- !draggable && isExpandable ? (React__default.createElement(Cell, { fixed: expandable && expandable.fixed ? 'left' : '', className: cx('Table-cell-expand-icon-cell') }, isExpandableRow || hasChildrenRow
959
- ? this.getExpandedIcons(isExpanded, data)
960
- : null)) : null,
961
- cells),
987
+ isLeftExpandable ? expandableCell : null,
988
+ cells,
989
+ isRightExpandable ? expandableCell : null),
962
990
  children
963
991
  ];
964
992
  };
@@ -986,19 +1014,31 @@ var Table = /** @class */ (function (_super) {
986
1014
  // 就不支持默认嵌套了
987
1015
  return !!expandable;
988
1016
  };
1017
+ // 展开列放到右侧 会影响之前的一些合并的规则
1018
+ Table.prototype.isRightExpandable = function () {
1019
+ var expandable = this.props.expandable;
1020
+ return expandable && expandable.position === 'right';
1021
+ };
1022
+ // 展开列放到左侧
1023
+ Table.prototype.isLeftExpandable = function () {
1024
+ var expandable = this.props.expandable;
1025
+ return (expandable && (!expandable.position || expandable.position === 'left'));
1026
+ };
989
1027
  Table.prototype.isNestedTable = function () {
990
1028
  var _this = this;
991
1029
  var dataSource = this.props.dataSource;
992
1030
  return !!find(dataSource, function (item) { return _this.hasChildrenRow(item); });
993
1031
  };
1032
+ // 计算自动增加的列数
1033
+ // 选择、拖拽、展开
994
1034
  Table.prototype.getExtraColumnCount = function () {
995
- var _a = this.props, draggable = _a.draggable, rowSelection = _a.rowSelection;
1035
+ var _a = this.props, draggable = _a.draggable, rowSelection = _a.rowSelection, expandable = _a.expandable;
996
1036
  var count = 0;
997
1037
  if (draggable) {
998
1038
  count++;
999
1039
  }
1000
1040
  else {
1001
- if (this.isExpandableTable()) {
1041
+ if (this.isExpandableTable() && (expandable === null || expandable === void 0 ? void 0 : expandable.position) !== 'none') {
1002
1042
  count++;
1003
1043
  }
1004
1044
  if (rowSelection) {
@@ -1013,17 +1053,26 @@ var Table = /** @class */ (function (_super) {
1013
1053
  var cells = [];
1014
1054
  var trs = [];
1015
1055
  var colCount = this.getExtraColumnCount();
1056
+ var isRightExpandable = this.isRightExpandable() ? 1 : 0;
1016
1057
  Array.isArray(summary)
1017
1058
  ? summary.forEach(function (s, index) {
1018
1059
  Array.isArray(s)
1019
1060
  ? trs.push(React__default.createElement("tr", { onMouseEnter: function (e) { return _this.onRowMouseEnter(e); }, onMouseLeave: function (e) { return _this.onRowMouseLeave(e); }, key: 'summary-tr-' + index, className: cx('Table-summary-row') }, s.map(function (d, i) {
1020
1061
  // 将操作列自动添加到第一列,用户的colSpan只需要关心实际的列数
1021
- var colSpan = i === 0 ? (d.colSpan || 1) + colCount : d.colSpan;
1062
+ var colSpan = i === 0
1063
+ ? (d.colSpan || 1) + colCount - isRightExpandable
1064
+ : i === s.length - 1
1065
+ ? (d.colSpan || 1) + isRightExpandable
1066
+ : d.colSpan;
1022
1067
  return (React__default.createElement(Cell, { key: 'summary-tr-cell-' + i, fixed: d.fixed, colSpan: colSpan }, typeof d.render === 'function'
1023
1068
  ? d.render(dataSource)
1024
1069
  : d.render));
1025
1070
  })))
1026
- : cells.push(React__default.createElement(Cell, { key: 'summary-cell-' + index, fixed: s.fixed, colSpan: cells.length === 0 ? (s.colSpan || 1) + colCount : s.colSpan }, typeof s.render === 'function'
1071
+ : cells.push(React__default.createElement(Cell, { key: 'summary-cell-' + index, fixed: s.fixed, colSpan: cells.length === 0
1072
+ ? (s.colSpan || 1) + colCount - isRightExpandable
1073
+ : index === summary.length - 1
1074
+ ? (s.colSpan || 1) + isRightExpandable
1075
+ : s.colSpan }, typeof s.render === 'function'
1027
1076
  ? s.render(dataSource)
1028
1077
  : s.render));
1029
1078
  })
@@ -1092,9 +1141,7 @@ var Table = /** @class */ (function (_super) {
1092
1141
  // 设置了横向滚动轴 则table的table-layout为fixed
1093
1142
  var hasScrollX = scroll && scroll.x;
1094
1143
  var hoverRow = this.state.hoverRow;
1095
- // 如果设置了列宽 那么table-layout为fixed才能生效
1096
- var columnWidth = this.tdColumns.some(function (item) { return item.width; });
1097
- var tableLayout = hasScrollX || columnWidth ? 'fixed' : 'auto';
1144
+ var tableLayout = hasScrollX ? 'fixed' : 'auto';
1098
1145
  var tableStyle = hasScrollX ? { width: scroll.x + 'px' } : {};
1099
1146
  return (React__default.createElement("div", { ref: this.contentDom, className: cx('Table-content'), style: hasScrollX ? { overflow: 'auto hidden' } : {}, onMouseLeave: this.onMouseLeave.bind(this), onScroll: this.onTableContentScroll.bind(this) },
1100
1147
  itemActions && hoverRow ? (React__default.createElement(ItemActionsWrapper, { dom: hoverRow.target, classnames: cx }, typeof itemActions === 'function'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v2.2.0
2
+ * amis-ui v2.3.0
3
3
  * Copyright 2018-2022 fex
4
4
  */
5
5