@lemon-fe/components 0.1.153 → 1.1.0-alpha.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 (411) hide show
  1. package/es/{Actions → actions}/index.d.ts +8 -5
  2. package/es/{Actions → actions}/index.js +56 -39
  3. package/es/{Actions → actions}/index.less +5 -5
  4. package/es/alert/index.d.ts +3 -0
  5. package/es/alert/index.js +18 -0
  6. package/es/{BaseTable/Actions.js → base-table/actions.js} +13 -10
  7. package/es/{BaseTable → base-table}/index.d.ts +0 -1
  8. package/es/{BaseTable → base-table}/index.js +48 -22
  9. package/es/{BaseTable/ResizeHeaderCell.js → base-table/resize-header-cell.js} +3 -3
  10. package/es/{BaseTable → base-table}/utils.d.ts +1 -1
  11. package/es/{BaseTable/VirtualBody.js → base-table/virtual-body.js} +12 -13
  12. package/es/{ColorPicker → color-picker}/index.js +7 -7
  13. package/es/{ColorPicker → color-picker}/index.less +1 -1
  14. package/es/component-configure/index.d.ts +12 -0
  15. package/es/component-configure/index.js +4 -0
  16. package/es/data-grid/cell-editors/date.d.ts +19 -0
  17. package/es/data-grid/cell-editors/date.js +92 -0
  18. package/es/data-grid/cell-editors/number.d.ts +32 -0
  19. package/es/data-grid/cell-editors/number.js +120 -0
  20. package/es/data-grid/cell-editors/row.d.ts +23 -0
  21. package/es/data-grid/cell-editors/row.js +119 -0
  22. package/es/data-grid/cell-editors/select.d.ts +33 -0
  23. package/es/data-grid/cell-editors/select.js +102 -0
  24. package/es/data-grid/cell-editors/text.d.ts +10 -0
  25. package/es/data-grid/cell-editors/text.js +81 -0
  26. package/es/data-grid/cell-editors/utils.d.ts +10 -0
  27. package/es/data-grid/cell-editors/utils.js +45 -0
  28. package/es/data-grid/cell-editors/wrapper.d.ts +5 -0
  29. package/es/data-grid/cell-editors/wrapper.js +8 -0
  30. package/es/data-grid/components/custom-panel/drag-context.d.ts +4 -0
  31. package/es/data-grid/components/custom-panel/drag-context.js +3 -0
  32. package/es/data-grid/components/custom-panel/field-modal.d.ts +10 -0
  33. package/es/data-grid/components/custom-panel/field-modal.js +223 -0
  34. package/es/data-grid/components/custom-panel/index.d.ts +5 -0
  35. package/es/data-grid/components/custom-panel/index.js +321 -0
  36. package/es/data-grid/components/custom-panel/item.d.ts +14 -0
  37. package/es/data-grid/components/custom-panel/item.js +181 -0
  38. package/es/data-grid/components/custom-panel/typings.d.ts +25 -0
  39. package/es/data-grid/components/search.d.ts +4 -0
  40. package/es/data-grid/components/search.js +159 -0
  41. package/es/data-grid/components/selected.d.ts +7 -0
  42. package/es/data-grid/components/selected.js +24 -0
  43. package/es/data-grid/context/grid-store.d.ts +4 -0
  44. package/es/data-grid/context/grid-store.js +4 -0
  45. package/es/data-grid/hooks.d.ts +20 -0
  46. package/es/data-grid/hooks.js +71 -0
  47. package/es/data-grid/index.d.ts +102 -0
  48. package/es/data-grid/index.js +1684 -0
  49. package/es/data-grid/index.less +659 -0
  50. package/es/data-grid/modules/clipboard/clipboard/clipboardService.d.ts +62 -0
  51. package/es/data-grid/modules/clipboard/clipboard/clipboardService.js +1007 -0
  52. package/es/data-grid/modules/clipboard/clipboardModule.d.ts +2 -0
  53. package/es/data-grid/modules/clipboard/clipboardModule.js +10 -0
  54. package/es/data-grid/modules/clipboard/main.d.ts +1 -0
  55. package/es/data-grid/modules/clipboard/main.js +1 -0
  56. package/es/data-grid/modules/clipboard/version.d.ts +1 -0
  57. package/es/data-grid/modules/clipboard/version.js +2 -0
  58. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +26 -0
  59. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +94 -0
  60. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +32 -0
  61. package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +272 -0
  62. package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +16 -0
  63. package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +209 -0
  64. package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +9 -0
  65. package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +68 -0
  66. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +32 -0
  67. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +150 -0
  68. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +44 -0
  69. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +455 -0
  70. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +26 -0
  71. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +224 -0
  72. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +24 -0
  73. package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +123 -0
  74. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +37 -0
  75. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +314 -0
  76. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +51 -0
  77. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +406 -0
  78. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +24 -0
  79. package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +264 -0
  80. package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.d.ts +2 -0
  81. package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.js +29 -0
  82. package/es/data-grid/modules/column-tool-panel/main.d.ts +2 -0
  83. package/es/data-grid/modules/column-tool-panel/main.js +3 -0
  84. package/es/data-grid/modules/column-tool-panel/version.d.ts +1 -0
  85. package/es/data-grid/modules/column-tool-panel/version.js +2 -0
  86. package/es/data-grid/modules/master-detail/main.d.ts +1 -0
  87. package/es/data-grid/modules/master-detail/main.js +1 -0
  88. package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +14 -0
  89. package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.js +144 -0
  90. package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +19 -0
  91. package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +203 -0
  92. package/es/data-grid/modules/master-detail/masterDetailModule.d.ts +2 -0
  93. package/es/data-grid/modules/master-detail/masterDetailModule.js +18 -0
  94. package/es/data-grid/modules/master-detail/version.d.ts +1 -0
  95. package/es/data-grid/modules/master-detail/version.js +2 -0
  96. package/es/data-grid/modules/menu/main.d.ts +1 -0
  97. package/es/data-grid/modules/menu/main.js +1 -0
  98. package/es/data-grid/modules/menu/menu/chartMenuItemMapper.d.ts +13 -0
  99. package/es/data-grid/modules/menu/menu/chartMenuItemMapper.js +351 -0
  100. package/es/data-grid/modules/menu/menu/contextMenu.d.ts +13 -0
  101. package/es/data-grid/modules/menu/menu/contextMenu.js +267 -0
  102. package/es/data-grid/modules/menu/menu/enterpriseMenu.d.ts +66 -0
  103. package/es/data-grid/modules/menu/menu/enterpriseMenu.js +592 -0
  104. package/es/data-grid/modules/menu/menu/menuItemMapper.d.ts +13 -0
  105. package/es/data-grid/modules/menu/menu/menuItemMapper.js +328 -0
  106. package/es/data-grid/modules/menu/menuModule.d.ts +2 -0
  107. package/es/data-grid/modules/menu/menuModule.js +12 -0
  108. package/es/data-grid/modules/menu/version.d.ts +1 -0
  109. package/es/data-grid/modules/menu/version.js +2 -0
  110. package/es/data-grid/modules/row-grouping/main.d.ts +4 -0
  111. package/es/data-grid/modules/row-grouping/main.js +4 -0
  112. package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +23 -0
  113. package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.js +250 -0
  114. package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +22 -0
  115. package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.js +285 -0
  116. package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.d.ts +12 -0
  117. package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.js +77 -0
  118. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +75 -0
  119. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +516 -0
  120. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +40 -0
  121. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +367 -0
  122. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +11 -0
  123. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +85 -0
  124. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +17 -0
  125. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +139 -0
  126. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +15 -0
  127. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +105 -0
  128. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +15 -0
  129. package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +105 -0
  130. package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +9 -0
  131. package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +136 -0
  132. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +39 -0
  133. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +319 -0
  134. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +23 -0
  135. package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +163 -0
  136. package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.d.ts +48 -0
  137. package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.js +740 -0
  138. package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +24 -0
  139. package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.js +396 -0
  140. package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.d.ts +19 -0
  141. package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.js +182 -0
  142. package/es/data-grid/modules/row-grouping/rowGroupingModule.d.ts +2 -0
  143. package/es/data-grid/modules/row-grouping/rowGroupingModule.js +28 -0
  144. package/es/data-grid/modules/row-grouping/version.d.ts +1 -0
  145. package/es/data-grid/modules/row-grouping/version.js +2 -0
  146. package/es/data-grid/modules/side-bar/main.d.ts +2 -0
  147. package/es/data-grid/modules/side-bar/main.js +2 -0
  148. package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +11 -0
  149. package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.js +216 -0
  150. package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +19 -0
  151. package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.js +108 -0
  152. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +16 -0
  153. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.js +84 -0
  154. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +18 -0
  155. package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.js +89 -0
  156. package/es/data-grid/modules/side-bar/sideBar/sideBarComp.d.ts +28 -0
  157. package/es/data-grid/modules/side-bar/sideBar/sideBarComp.js +325 -0
  158. package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.d.ts +10 -0
  159. package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.js +95 -0
  160. package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +17 -0
  161. package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.js +103 -0
  162. package/es/data-grid/modules/side-bar/sideBarModule.d.ts +2 -0
  163. package/es/data-grid/modules/side-bar/sideBarModule.js +22 -0
  164. package/es/data-grid/modules/side-bar/version.d.ts +1 -0
  165. package/es/data-grid/modules/side-bar/version.js +2 -0
  166. package/es/data-grid/renderer/actions-renderer.d.ts +3 -0
  167. package/es/data-grid/renderer/actions-renderer.js +50 -0
  168. package/es/data-grid/renderer/actions.d.ts +11 -0
  169. package/es/data-grid/renderer/actions.js +72 -0
  170. package/es/data-grid/renderer/cell-delete-renderer.d.ts +5 -0
  171. package/es/data-grid/renderer/cell-delete-renderer.js +49 -0
  172. package/es/data-grid/renderer/cell-index-renderer.d.ts +4 -0
  173. package/es/data-grid/renderer/cell-index-renderer.js +43 -0
  174. package/es/data-grid/renderer/cell-renderer.d.ts +4 -0
  175. package/es/data-grid/renderer/cell-renderer.js +58 -0
  176. package/es/data-grid/renderer/detali-cell-renderer.d.ts +9 -0
  177. package/es/data-grid/renderer/detali-cell-renderer.js +59 -0
  178. package/es/data-grid/renderer/header-renderer.d.ts +6 -0
  179. package/es/data-grid/renderer/header-renderer.js +98 -0
  180. package/es/data-grid/typings.d.ts +226 -0
  181. package/es/data-grid/typings.js +1 -0
  182. package/es/data-grid/utils.d.ts +51 -0
  183. package/es/data-grid/utils.js +293 -0
  184. package/es/dropdown/index.d.ts +14 -0
  185. package/es/dropdown/index.js +42 -0
  186. package/es/dropdown/index.less +5 -0
  187. package/es/{DurationPicker → duration-picker}/index.d.ts +12 -9
  188. package/es/duration-picker/index.js +204 -0
  189. package/es/duration-picker/index.less +12 -0
  190. package/es/{EditableTable/EditableCell.d.ts → editable-table/editable-cell.d.ts} +1 -1
  191. package/es/editable-table/editable-cell.js +41 -0
  192. package/es/{EditableTable/EditableTableFormItem.d.ts → editable-table/editable-table-form-item.d.ts} +1 -1
  193. package/es/{EditableTable/EditableTableFormItem.js → editable-table/editable-table-form-item.js} +3 -5
  194. package/es/{EditableTable → editable-table}/index.d.ts +3 -3
  195. package/es/editable-table/index.js +8 -0
  196. package/es/{EditableTable/Table.d.ts → editable-table/table.d.ts} +1 -1
  197. package/es/{EditableTable/Table.js → editable-table/table.js} +27 -22
  198. package/es/{EditableTable → editable-table}/typings.d.ts +2 -2
  199. package/es/editable-table/util.js +311 -0
  200. package/es/empty-image/index.d.ts +2 -0
  201. package/es/empty-image/index.js +78 -0
  202. package/es/{Filter → filter}/index.d.ts +3 -3
  203. package/es/filter/index.js +615 -0
  204. package/es/{Filter → filter}/index.less +5 -5
  205. package/es/filter/typings.d.ts +70 -0
  206. package/es/{FormLayout → form-layout}/index.d.ts +5 -0
  207. package/es/form-layout/index.js +48 -0
  208. package/es/{FormLayout → form-layout}/index.less +21 -8
  209. package/es/grey-panel/index.d.ts +6 -0
  210. package/es/grey-panel/index.js +15 -0
  211. package/es/grey-panel/index.less +11 -0
  212. package/es/icons/add.d.ts +6 -0
  213. package/es/icons/add.js +39 -0
  214. package/es/{Icons/BigTip → icons/big-tip}/index.d.ts +1 -1
  215. package/es/{Icons/BigTip → icons/big-tip}/index.js +6 -8
  216. package/es/{Icons/Down.d.ts → icons/calendar.d.ts} +1 -1
  217. package/es/icons/calendar.js +35 -0
  218. package/es/icons/clear.d.ts +3 -0
  219. package/es/icons/clear.js +18 -0
  220. package/es/icons/clock.d.ts +5 -0
  221. package/es/icons/clock.js +27 -0
  222. package/es/icons/close-light.d.ts +5 -0
  223. package/es/icons/close-light.js +31 -0
  224. package/es/{Icons/Close.d.ts → icons/close.d.ts} +1 -1
  225. package/es/icons/close.js +22 -0
  226. package/es/{Icons/CollapseUp.d.ts → icons/collapse-up.d.ts} +1 -1
  227. package/es/icons/collapse-up.js +24 -0
  228. package/es/{Icons/Search.d.ts → icons/dark-search.d.ts} +1 -1
  229. package/es/{Icons/DarkSearch.js → icons/dark-search.js} +3 -5
  230. package/es/icons/delete.d.ts +3 -0
  231. package/es/icons/delete.js +37 -0
  232. package/es/icons/down.d.ts +3 -0
  233. package/es/icons/down.js +18 -0
  234. package/es/icons/drag/drag.svg +7 -0
  235. package/es/icons/drag/index.d.ts +3 -0
  236. package/es/icons/drag/index.js +31 -0
  237. package/es/{Icons/Empty.d.ts → icons/empty.d.ts} +1 -0
  238. package/es/icons/index.d.ts +45 -0
  239. package/es/icons/index.js +45 -0
  240. package/es/{Icons/LookUp.d.ts → icons/look-up.d.ts} +1 -1
  241. package/es/{Icons/LookUp.js → icons/look-up.js} +3 -5
  242. package/es/icons/more.d.ts +3 -0
  243. package/es/icons/more.js +37 -0
  244. package/es/icons/new-tag.d.ts +3 -0
  245. package/es/icons/new-tag.js +19 -0
  246. package/es/icons/plus/index.d.ts +3 -0
  247. package/es/icons/plus/index.js +27 -0
  248. package/es/icons/plus/plus.svg +6 -0
  249. package/es/icons/question.d.ts +3 -0
  250. package/es/icons/question.js +18 -0
  251. package/es/icons/reload.d.ts +3 -0
  252. package/es/icons/reload.js +18 -0
  253. package/es/icons/search.d.ts +3 -0
  254. package/es/icons/search.js +18 -0
  255. package/es/icons/tip.d.ts +5 -0
  256. package/es/{Icons/Tip.js → icons/tip.js} +64 -75
  257. package/es/index.d.ts +43 -32
  258. package/es/index.js +36 -28
  259. package/es/input-compact/index.d.ts +11 -0
  260. package/es/input-compact/index.js +63 -0
  261. package/es/input-compact/index.less +33 -0
  262. package/es/input-number/index.d.ts +8 -0
  263. package/es/input-number/index.js +35 -0
  264. package/es/input-number/index.less +58 -0
  265. package/es/{Layout → layout}/index.d.ts +26 -8
  266. package/es/layout/index.js +253 -0
  267. package/es/{Layout → layout}/index.less +43 -25
  268. package/es/{PageLoading → page-loading}/index.d.ts +2 -1
  269. package/es/{PageLoading → page-loading}/index.js +5 -3
  270. package/es/popup/index.d.ts +80 -0
  271. package/es/popup/index.js +260 -0
  272. package/es/popup/index.less +34 -0
  273. package/es/portal/index.d.ts +18 -0
  274. package/es/{Portal → portal}/index.js +48 -14
  275. package/es/{Section → section}/index.d.ts +10 -2
  276. package/es/section/index.js +99 -0
  277. package/es/{Section → section}/index.less +22 -6
  278. package/es/{Section/TabBar.d.ts → section/tab-bar.d.ts} +2 -1
  279. package/es/{Section/TabBar.js → section/tab-bar.js} +6 -3
  280. package/es/select-panel/index.d.ts +17 -0
  281. package/es/select-panel/index.js +63 -0
  282. package/es/select-panel/index.less +112 -0
  283. package/es/select-view/index.d.ts +63 -0
  284. package/es/select-view/index.js +269 -0
  285. package/es/select-view/index.less +57 -0
  286. package/es/{SiderTree → sider-tree}/index.d.ts +6 -12
  287. package/es/{SiderTree → sider-tree}/index.js +58 -82
  288. package/es/sider-tree/index.less +151 -0
  289. package/es/{SiderTree/TreeNodeTitle.js → sider-tree/tree-node-title.js} +13 -10
  290. package/es/{SiderTree → sider-tree}/typings.d.ts +2 -2
  291. package/es/state/index.d.ts +8 -0
  292. package/es/state/index.js +20 -0
  293. package/es/state/index.less +131 -0
  294. package/es/styles/empty.png +0 -0
  295. package/es/styles/index.less +28 -0
  296. package/es/styles/overrides.less +347 -0
  297. package/es/styles/theme.less +29 -0
  298. package/es/{utils.less → styles/utils.less} +18 -18
  299. package/es/symbol-icon/index.js +30 -0
  300. package/es/{TabBar → tab-bar}/index.d.ts +2 -3
  301. package/es/tab-bar/index.js +31 -0
  302. package/es/tab-bar/index.less +5 -0
  303. package/es/table/index.js +201 -0
  304. package/es/{Table → table}/typings.d.ts +2 -3
  305. package/es/{Table → table}/utils.d.ts +1 -1
  306. package/es/tip-mark/index.d.ts +8 -0
  307. package/es/tip-mark/index.js +44 -0
  308. package/es/utils.d.ts +2 -1
  309. package/es/utils.js +10 -2
  310. package/package.json +50 -21
  311. package/README.md +0 -11
  312. package/es/Dropdown/index.d.ts +0 -15
  313. package/es/Dropdown/index.js +0 -45
  314. package/es/Dropdown/index.less +0 -13
  315. package/es/DurationPicker/index.js +0 -174
  316. package/es/DurationPicker/index.less +0 -61
  317. package/es/EditableTable/EditableCell.js +0 -41
  318. package/es/EditableTable/index.js +0 -8
  319. package/es/EditableTable/util.js +0 -311
  320. package/es/Filter/index.js +0 -555
  321. package/es/Filter/typings.d.ts +0 -37
  322. package/es/FormHorizontal/index.d.ts +0 -6
  323. package/es/FormHorizontal/index.js +0 -30
  324. package/es/FormHorizontal/index.less +0 -14
  325. package/es/FormInline/index.d.ts +0 -15
  326. package/es/FormInline/index.js +0 -74
  327. package/es/FormInline/index.less +0 -26
  328. package/es/FormLayout/index.js +0 -36
  329. package/es/FormTable/index.d.ts +0 -6
  330. package/es/FormTable/index.js +0 -125
  331. package/es/FormTable/index.less +0 -11
  332. package/es/FormTable/typings.d.ts +0 -38
  333. package/es/Icons/Calendar.d.ts +0 -5
  334. package/es/Icons/Calendar.js +0 -42
  335. package/es/Icons/Close.js +0 -24
  336. package/es/Icons/CollapseUp.js +0 -26
  337. package/es/Icons/DarkSearch.d.ts +0 -5
  338. package/es/Icons/Down.js +0 -30
  339. package/es/Icons/More.d.ts +0 -5
  340. package/es/Icons/More.js +0 -39
  341. package/es/Icons/Search.js +0 -30
  342. package/es/Icons/Tip.d.ts +0 -6
  343. package/es/Icons/index.d.ts +0 -24
  344. package/es/Icons/index.js +0 -25
  345. package/es/InputMaxLength/index.d.ts +0 -14
  346. package/es/InputMaxLength/index.js +0 -72
  347. package/es/InputMaxLength/index.less +0 -8
  348. package/es/Layout/index.js +0 -184
  349. package/es/MainFramework/components/DropMenu/index.d.ts +0 -11
  350. package/es/MainFramework/components/DropMenu/index.js +0 -93
  351. package/es/MainFramework/components/DropMenu/index.less +0 -59
  352. package/es/MainFramework/components/Menu/index.d.ts +0 -10
  353. package/es/MainFramework/components/Menu/index.js +0 -603
  354. package/es/MainFramework/components/Menu/index.less +0 -445
  355. package/es/MainFramework/components/RefreshButton/index.d.ts +0 -6
  356. package/es/MainFramework/components/RefreshButton/index.js +0 -63
  357. package/es/MainFramework/components/RefreshButton/index.less +0 -30
  358. package/es/MainFramework/components/TabBar/index.d.ts +0 -10
  359. package/es/MainFramework/components/TabBar/index.js +0 -101
  360. package/es/MainFramework/components/TabBar/index.less +0 -155
  361. package/es/MainFramework/components/WaterMark/index.d.ts +0 -6
  362. package/es/MainFramework/components/WaterMark/index.js +0 -65
  363. package/es/MainFramework/index.d.ts +0 -28
  364. package/es/MainFramework/index.js +0 -78
  365. package/es/MainFramework/index.less +0 -97
  366. package/es/MainFramework/typings.d.ts +0 -10
  367. package/es/Popup/index.d.ts +0 -39
  368. package/es/Popup/index.js +0 -180
  369. package/es/Popup/index.less +0 -12
  370. package/es/Portal/index.d.ts +0 -17
  371. package/es/Section/index.js +0 -90
  372. package/es/SelectView/index.d.ts +0 -56
  373. package/es/SelectView/index.js +0 -227
  374. package/es/SelectView/index.less +0 -60
  375. package/es/SiderTree/index.less +0 -222
  376. package/es/SymbolIcon/index.js +0 -27
  377. package/es/TabBar/index.js +0 -42
  378. package/es/TabBar/index.less +0 -31
  379. package/es/Table/index.js +0 -205
  380. package/es/TipMark/index.d.ts +0 -10
  381. package/es/TipMark/index.js +0 -35
  382. package/es/TipMark/index.less +0 -6
  383. package/es/index.less +0 -26
  384. package/es/init.d.ts +0 -3
  385. package/es/init.js +0 -134
  386. package/es/overrides.less +0 -183
  387. package/es/theme.less +0 -9
  388. /package/es/{BaseTable/Actions.d.ts → base-table/actions.d.ts} +0 -0
  389. /package/es/{BaseTable/BaseTableContext.d.ts → base-table/base-table-context.d.ts} +0 -0
  390. /package/es/{BaseTable/BaseTableContext.js → base-table/base-table-context.js} +0 -0
  391. /package/es/{BaseTable → base-table}/empty.png +0 -0
  392. /package/es/{BaseTable → base-table}/index.less +0 -0
  393. /package/es/{BaseTable/ResizeHeaderCell.d.ts → base-table/resize-header-cell.d.ts} +0 -0
  394. /package/es/{BaseTable → base-table}/typings.d.ts +0 -0
  395. /package/es/{BaseTable → base-table}/utils.js +0 -0
  396. /package/es/{BaseTable/VirtualBody.d.ts → base-table/virtual-body.d.ts} +0 -0
  397. /package/es/{ColorPicker → color-picker}/index.d.ts +0 -0
  398. /package/es/{EditableTable → editable-table}/index.less +0 -0
  399. /package/es/{EditableTable → editable-table}/util.d.ts +0 -0
  400. /package/es/{Icons/BigTip → icons/big-tip}/error.png +0 -0
  401. /package/es/{Icons/BigTip → icons/big-tip}/info.png +0 -0
  402. /package/es/{Icons/BigTip → icons/big-tip}/success.png +0 -0
  403. /package/es/{Icons/BigTip → icons/big-tip}/warning.png +0 -0
  404. /package/es/{Icons/Empty.js → icons/empty.js} +0 -0
  405. /package/es/{PageLoading → page-loading}/index.less +0 -0
  406. /package/es/{SiderTree → sider-tree}/empty.png +0 -0
  407. /package/es/{SiderTree/TreeNodeTitle.d.ts → sider-tree/tree-node-title.d.ts} +0 -0
  408. /package/es/{SymbolIcon → symbol-icon}/index.d.ts +0 -0
  409. /package/es/{SymbolIcon → symbol-icon}/index.less +0 -0
  410. /package/es/{Table → table}/index.d.ts +0 -0
  411. /package/es/{Table → table}/utils.js +0 -0
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
1
+ import { type ReactElement } from 'react';
2
2
  import type { CSSProperties } from 'react';
3
- import { ButtonProps } from 'antd';
3
+ import { type ButtonProps } from 'antd';
4
4
  interface ActionBtn extends ButtonProps {
5
5
  text: string | ReactElement;
6
6
  onClick?: () => void;
@@ -10,16 +10,19 @@ interface ActionBtn extends ButtonProps {
10
10
  */
11
11
  action?: () => void;
12
12
  dropDown?: ({
13
- text: string;
14
- onClick: () => void;
13
+ text: string | ReactElement;
14
+ onClick?: () => void;
15
15
  disabled?: boolean;
16
- } | null)[];
16
+ } | ReactElement | null)[] | ReactElement;
17
17
  }
18
18
  interface Props {
19
19
  actions: (ActionBtn | ReactElement | null)[];
20
20
  style?: CSSProperties;
21
21
  className?: string;
22
22
  prefixCls?: string;
23
+ /**
24
+ * @description 默认无限大
25
+ */
23
26
  maxShowCount?: number;
24
27
  }
25
28
  declare function Actions(props: Props): JSX.Element;
@@ -1,20 +1,22 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1
2
  var _excluded = ["disabled", "dropDown", "text", "onClick", "icon", "action"];
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
7
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { Fragment, useState } from 'react';
15
+ import React, { Fragment, useState, isValidElement } from 'react';
14
16
  import { Space, Dropdown, Menu, Button, Popover } from 'antd';
15
17
  import classNames from 'classnames';
16
- import Icons from '../Icons';
17
- import { PREFIX_CLS } from '../constants';
18
+ import { PREFIX_CLS } from "../constants";
19
+ import Icons from "../icons";
18
20
  function Actions(props) {
19
21
  var actions = props.actions,
20
22
  className = props.className,
@@ -22,7 +24,7 @@ function Actions(props) {
22
24
  _props$prefixCls = props.prefixCls,
23
25
  prefixCls = _props$prefixCls === void 0 ? PREFIX_CLS : _props$prefixCls,
24
26
  _props$maxShowCount = props.maxShowCount,
25
- maxShowCount = _props$maxShowCount === void 0 ? 3 : _props$maxShowCount;
27
+ maxShowCount = _props$maxShowCount === void 0 ? Infinity : _props$maxShowCount;
26
28
  var _useState = useState(false),
27
29
  _useState2 = _slicedToArray(_useState, 2),
28
30
  visible = _useState2[0],
@@ -34,12 +36,12 @@ function Actions(props) {
34
36
  style: style
35
37
  }, /*#__PURE__*/React.createElement(Space, {
36
38
  direction: "horizontal",
37
- size: 12
39
+ size: 8
38
40
  }, visibleBtns.map(function (item, index) {
39
41
  if (item === null) {
40
42
  return item;
41
43
  }
42
- if ( /*#__PURE__*/React.isValidElement(item)) {
44
+ if ( /*#__PURE__*/isValidElement(item)) {
43
45
  return /*#__PURE__*/React.createElement(Fragment, {
44
46
  key: index
45
47
  }, item);
@@ -51,56 +53,71 @@ function Actions(props) {
51
53
  icon = item.icon,
52
54
  action = item.action,
53
55
  rest = _objectWithoutProperties(item, _excluded);
54
- if ( /*#__PURE__*/React.isValidElement(text)) {
56
+ if ( /*#__PURE__*/isValidElement(text)) {
55
57
  return /*#__PURE__*/React.createElement(Fragment, {
56
58
  key: index
57
59
  }, text);
58
60
  }
59
61
  var handleClick = onClick || action;
60
- if (Array.isArray(dropDown)) {
61
- var overlay = /*#__PURE__*/React.createElement(Menu, null, dropDown.map(function (subItem) {
62
- if (subItem) {
63
- return /*#__PURE__*/React.createElement(Menu.Item, {
64
- onClick: function onClick() {
65
- return subItem.onClick();
66
- },
67
- key: subItem.text,
68
- disabled: subItem.disabled
69
- }, subItem.text);
70
- }
71
- }));
62
+ if (dropDown !== undefined) {
63
+ var overlay;
64
+ if (Array.isArray(dropDown)) {
65
+ overlay = /*#__PURE__*/React.createElement(Menu, {
66
+ items: dropDown.filter(Boolean).map(function (subItem, idx) {
67
+ if ( /*#__PURE__*/isValidElement(subItem)) {
68
+ return {
69
+ label: subItem,
70
+ key: idx
71
+ };
72
+ }
73
+ var target = subItem;
74
+ return {
75
+ label: target.text,
76
+ key: idx,
77
+ disabled: target.disabled,
78
+ onClick: target.onClick
79
+ };
80
+ })
81
+ });
82
+ } else {
83
+ overlay = dropDown;
84
+ }
72
85
  if (handleClick !== undefined) {
73
- return /*#__PURE__*/React.createElement(Dropdown.Button, {
86
+ return /*#__PURE__*/React.createElement(Dropdown.Button, _extends({
74
87
  key: text,
75
88
  disabled: disabled,
76
89
  overlay: overlay,
77
90
  onClick: handleClick,
91
+ trigger: ['click'],
92
+ overlayStyle: {
93
+ minWidth: 80
94
+ },
78
95
  buttonsRender: function buttonsRender(_ref) {
79
- var _ref2 = _slicedToArray(_ref, 2),
80
- leftBtn = _ref2[0],
81
- _ = _ref2[1];
96
+ var _ref2 = _slicedToArray(_ref, 1),
97
+ leftBtn = _ref2[0];
82
98
  return [leftBtn, /*#__PURE__*/React.createElement(Button, {
83
- icon: /*#__PURE__*/React.createElement(Icons.More, null)
99
+ icon: /*#__PURE__*/React.createElement(Icons.More, null),
100
+ type: rest.type,
101
+ key: "more"
84
102
  })];
85
103
  }
86
- }, text);
104
+ }, rest), text);
87
105
  }
88
106
  return /*#__PURE__*/React.createElement(Dropdown, {
89
107
  key: text,
90
108
  disabled: disabled,
91
- overlay: overlay
92
- }, /*#__PURE__*/React.createElement(Button, _objectSpread({
109
+ overlay: overlay,
110
+ trigger: ['click']
111
+ }, /*#__PURE__*/React.createElement(Button, _extends({
93
112
  disabled: disabled,
94
113
  icon: icon
95
114
  }, rest), text, /*#__PURE__*/React.createElement(Icons.Down, {
96
115
  style: {
97
- opacity: 0.7,
98
- fontSize: 16,
99
- verticalAlign: -3
116
+ opacity: 0.7
100
117
  }
101
118
  })));
102
119
  }
103
- return /*#__PURE__*/React.createElement(Button, _objectSpread({
120
+ return /*#__PURE__*/React.createElement(Button, _extends({
104
121
  key: text,
105
122
  disabled: disabled,
106
123
  onClick: handleClick,
@@ -109,14 +126,14 @@ function Actions(props) {
109
126
  }), collapsedBtns.length > 0 ? /*#__PURE__*/React.createElement(Popover, {
110
127
  placement: "bottomRight",
111
128
  overlayClassName: "".concat(prefixCls, "-actions-popover"),
112
- onVisibleChange: setVisible,
113
- visible: visible,
129
+ onOpenChange: setVisible,
130
+ open: visible,
114
131
  trigger: "click",
115
132
  content: collapsedBtns.map(function (item, index) {
116
133
  if (item === null) {
117
134
  return item;
118
135
  }
119
- if ( /*#__PURE__*/React.isValidElement(item)) {
136
+ if ( /*#__PURE__*/isValidElement(item)) {
120
137
  return /*#__PURE__*/React.createElement(Fragment, {
121
138
  key: index
122
139
  }, item);
@@ -24,11 +24,12 @@
24
24
 
25
25
  &-item {
26
26
  box-sizing: border-box;
27
- width: 120px;
28
- height: 38px;
27
+ min-width: 120px;
28
+ max-width: 200px;
29
+ height: 30px;
29
30
  padding: 0 16px;
30
31
  color: #333;
31
- line-height: 38px;
32
+ line-height: 30px;
32
33
  list-style: none;
33
34
  cursor: pointer;
34
35
  transition: background-color 0.2s;
@@ -46,8 +47,7 @@
46
47
  }
47
48
 
48
49
  .@{ant-prefix}-btn:not(.@{ant-prefix}-btn-icon-only) {
49
- min-width: 80px;
50
- padding: 4px 12px;
50
+ min-width: 60px;
51
51
 
52
52
  .@{prefixCls}-symbol-icon {
53
53
  margin-right: 8px;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { type AlertProps } from 'antd';
3
+ export default function Alert(props: AlertProps): JSX.Element;
@@ -0,0 +1,18 @@
1
+ var _excluded = ["icon", "type"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import React from 'react';
6
+ import Icons from "../icons";
7
+ import { Alert as AntdAlert } from 'antd';
8
+ export default function Alert(props) {
9
+ var icon = props.icon,
10
+ type = props.type,
11
+ restProps = _objectWithoutProperties(props, _excluded);
12
+ return /*#__PURE__*/React.createElement(AntdAlert, _extends({}, restProps, {
13
+ type: type,
14
+ icon: icon || /*#__PURE__*/React.createElement(Icons.Tip, {
15
+ type: type
16
+ })
17
+ }));
18
+ }
@@ -1,15 +1,18 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
6
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
11
  import React, { useRef, useState } from 'react';
9
- import classNames from 'classnames';
10
12
  import { createPortal } from 'react-dom';
11
- import { PREFIX_CLS } from '../constants';
12
- import Icons from '../Icons';
13
+ import { PREFIX_CLS } from "../constants";
14
+ import Icons from "../icons";
15
+ import classNames from 'classnames';
13
16
  export default function Actions(props) {
14
17
  var actionsProp = props.actions,
15
18
  row = props.row,
@@ -58,8 +61,8 @@ export default function Actions(props) {
58
61
  return null;
59
62
  }
60
63
  var key = getKey(item, idx);
61
- var dropDown = item.dropDown ? item.dropDown.filter(function (item) {
62
- return item !== null;
64
+ var dropDown = item.dropDown ? item.dropDown.filter(function (sub) {
65
+ return sub !== null;
63
66
  }) : [];
64
67
  return /*#__PURE__*/React.createElement("div", {
65
68
  className: classNames("".concat(prefixCls, "-item"), _defineProperty({}, "".concat(prefixCls, "-item-disabled"), item.disabled)),
@@ -83,7 +86,7 @@ export default function Actions(props) {
83
86
  });
84
87
  } else {
85
88
  var _item$onClick;
86
- (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, row, index);
89
+ (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item, row, index);
87
90
  }
88
91
  }
89
92
  }, item.text, dropDown.length > 0 && /*#__PURE__*/React.createElement(Icons.Down, null));
@@ -106,7 +109,7 @@ export default function Actions(props) {
106
109
  if (!item.disabled) {
107
110
  var _item$onClick2;
108
111
  closePop();
109
- (_item$onClick2 = item.onClick) === null || _item$onClick2 === void 0 ? void 0 : _item$onClick2.call(item, row, index);
112
+ (_item$onClick2 = item.onClick) === null || _item$onClick2 === void 0 || _item$onClick2.call(item, row, index);
110
113
  }
111
114
  }
112
115
  }, item.text);
@@ -1,4 +1,3 @@
1
- /// <reference path="../../typings.d.ts" />
2
1
  /// <reference types="react" />
3
2
  import { Table as AntdTable } from 'antd';
4
3
  import type { BaseTableProps } from './typings';
@@ -4,31 +4,49 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
- /// <reference path="../../typings.d.ts" />
17
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
21
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
22
  import React, { useMemo, useState, useEffect, useRef, forwardRef, useContext } from 'react';
21
23
  import { Table as AntdTable, ConfigProvider } from 'antd';
22
24
  import classNames from 'classnames';
23
25
  import { get } from 'lodash';
24
26
  import ResizeObserver from 'rc-resize-observer';
25
- import { isColumnType, getColumnKey } from './utils';
26
- import ResizeHeaderCell from './ResizeHeaderCell';
27
- import { PREFIX_CLS } from '../constants';
28
- import VirtualList from './VirtualBody';
29
- import BaseTableContext from './BaseTableContext';
30
- import Actions from './Actions';
31
- import empty from './empty.png';
27
+ import { PREFIX_CLS } from "../constants";
28
+ import Actions from "./actions";
29
+ import BaseTableContext from "./base-table-context";
30
+ import empty from "./empty.png";
31
+ import ResizeHeaderCell from "./resize-header-cell";
32
+ import { isColumnType, getColumnKey } from "./utils";
33
+ import VirtualList from "./virtual-body";
34
+ function formatSummary(summary) {
35
+ if (!summary) {
36
+ return summary;
37
+ }
38
+ var obj = _objectSpread({}, summary);
39
+ var pretty = new Intl.NumberFormat('en-US', {
40
+ minimumFractionDigits: 2,
41
+ maximumFractionDigits: 2
42
+ });
43
+ Object.keys(obj).forEach(function (key) {
44
+ if (obj.hasOwnProperty(key) && typeof obj[key] === 'number') {
45
+ obj[key] = pretty.format(obj[key]);
46
+ }
47
+ });
48
+ return obj;
49
+ }
32
50
  function Th(props) {
33
51
  var onWidthChange = props.onWidthChange,
34
52
  width = props.width,
@@ -48,7 +66,7 @@ function Th(props) {
48
66
  }, content);
49
67
  }
50
68
  if (!width || !onWidthChange) {
51
- return /*#__PURE__*/React.createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
69
+ return /*#__PURE__*/React.createElement("th", _extends({}, restProps, {
52
70
  className: mClassName
53
71
  }), content);
54
72
  }
@@ -57,7 +75,7 @@ function Th(props) {
57
75
  onChange: onWidthChange,
58
76
  fullTableRef: fullTableRef,
59
77
  prefixCls: "".concat(PREFIX_CLS, "-table")
60
- }, /*#__PURE__*/React.createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
78
+ }, /*#__PURE__*/React.createElement("th", _extends({}, restProps, {
61
79
  className: mClassName
62
80
  }), content));
63
81
  }
@@ -97,7 +115,9 @@ function BaseTable(props, _ref) {
97
115
  scrollY = _useState4[0],
98
116
  setScrollY = _useState4[1];
99
117
  var memoHeight = useRef(0);
118
+
100
119
  /** auto scroll y */
120
+
101
121
  var calcScrollY = function calcScrollY() {
102
122
  var wrapper = fullTableRef.current;
103
123
  if (wrapper === null) {
@@ -112,8 +132,8 @@ function BaseTable(props, _ref) {
112
132
  if (parent === null) {
113
133
  return null;
114
134
  }
115
- var style = getComputedStyle(parent);
116
- var contentHeight = parent.offsetHeight - (parseFloat(style.getPropertyValue('padding-top')) || 0) - (parseFloat(style.getPropertyValue('padding-bottom')) || 0);
135
+ var mStyle = getComputedStyle(parent);
136
+ var contentHeight = parent.offsetHeight - (parseFloat(mStyle.getPropertyValue('padding-top')) || 0) - (parseFloat(mStyle.getPropertyValue('padding-bottom')) || 0);
117
137
  var nodes = [];
118
138
  if (tableBody.previousElementSibling !== null) {
119
139
  nodes.push(tableBody.previousElementSibling);
@@ -173,7 +193,9 @@ function BaseTable(props, _ref) {
173
193
  }
174
194
  }
175
195
  }, [scrollY]);
196
+
176
197
  /** resizable column */
198
+
177
199
  var _useMemo = useMemo(function () {
178
200
  var flattenCols = [];
179
201
  var isFixedLayout = tableLayout === 'fixed';
@@ -245,7 +267,9 @@ function BaseTable(props, _ref) {
245
267
  _useMemo2 = _slicedToArray(_useMemo, 2),
246
268
  formatedColumns = _useMemo2[0],
247
269
  flattenColumns = _useMemo2[1];
270
+
248
271
  /** row actions */
272
+ /** virtualize scroll */
249
273
  var _useMemo3 = useMemo(function () {
250
274
  if (rowActions !== undefined) {
251
275
  var actionCol = {
@@ -268,7 +292,6 @@ function BaseTable(props, _ref) {
268
292
  var _useMemo4 = _slicedToArray(_useMemo3, 2);
269
293
  formatedColumns = _useMemo4[0];
270
294
  flattenColumns = _useMemo4[1];
271
- /** virtualize scroll */
272
295
  var _useMemo5 = useMemo(function () {
273
296
  return {
274
297
  components: _objectSpread({
@@ -282,7 +305,9 @@ function BaseTable(props, _ref) {
282
305
  };
283
306
  }, [virtual]),
284
307
  components = _useMemo5.components;
308
+
285
309
  /** summary row */
310
+
286
311
  var summary = useMemo(function () {
287
312
  var Summary = AntdTable.Summary;
288
313
  if (!summaryRecord) {
@@ -290,6 +315,7 @@ function BaseTable(props, _ref) {
290
315
  }
291
316
  return function () {
292
317
  var _props$rowSelection;
318
+ var data = formatSummary(summaryRecord);
293
319
  var offset = 0;
294
320
  return /*#__PURE__*/React.createElement(Summary, {
295
321
  fixed: true
@@ -300,7 +326,7 @@ function BaseTable(props, _ref) {
300
326
  if (index === 0) {
301
327
  value = summaryTitle;
302
328
  } else if (item.dataIndex) {
303
- value = get(summaryRecord, item.dataIndex);
329
+ value = get(data, item.dataIndex);
304
330
  }
305
331
  return /*#__PURE__*/React.createElement(Summary.Cell, {
306
332
  index: index + offset,
@@ -317,7 +343,7 @@ function BaseTable(props, _ref) {
317
343
  antPrefixCls: antPrefixCls
318
344
  };
319
345
  }, [scrollY, rowHeight, antPrefixCls]);
320
- var tableNode = /*#__PURE__*/React.createElement(AntdTable, _objectSpread(_objectSpread({
346
+ var tableNode = /*#__PURE__*/React.createElement(AntdTable, _extends({
321
347
  size: "small",
322
348
  ref: function ref(elm) {
323
349
  fullTableRef.current = elm;
@@ -348,7 +374,7 @@ function BaseTable(props, _ref) {
348
374
  src: empty
349
375
  }), /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E"))
350
376
  }, localeProp)
351
- }, restProps), {}, {
377
+ }, restProps, {
352
378
  pagination: paginationProp !== false ? _objectSpread({
353
379
  size: 'small',
354
380
  pageSizeOptions: ['10', '20', '50', '100'],
@@ -1,12 +1,12 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState, useRef, useEffect, useContext } from 'react';
8
8
  import { Resizable } from 'react-resizable';
9
- import BaseTableContext from './BaseTableContext';
9
+ import BaseTableContext from "./base-table-context";
10
10
  export default function ResizeHeaderCell(props) {
11
11
  var children = props.children,
12
12
  prefixCls = props.prefixCls,
@@ -1,4 +1,4 @@
1
- import { ColumnType, ColumnGroupType } from './typings';
1
+ import type { ColumnType, ColumnGroupType } from './typings';
2
2
  export declare function isColumnType<T>(col: ColumnGroupType<T> | ColumnType<T>): col is ColumnType<T>;
3
3
  export declare function getColumnKey(col: ColumnType<any>): string | number;
4
4
  export declare function randomStr(): string;
@@ -1,20 +1,18 @@
1
1
  var _excluded = ["children"];
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
11
  import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
12
+ import { PREFIX_CLS } from "../constants";
13
+ import BaseTableContext from "./base-table-context";
14
14
  import { useThrottle } from '@lemon-fe/hooks';
15
15
  import { get } from 'lodash';
16
- import BaseTableContext from './BaseTableContext';
17
- import { PREFIX_CLS } from '../constants';
18
16
  export default function VirtualList(props) {
19
17
  var children = props.children,
20
18
  restProps = _objectWithoutProperties(props, _excluded);
@@ -74,9 +72,10 @@ export default function VirtualList(props) {
74
72
  setRange(getRange());
75
73
  }, [get(children, ['1', 'length']), rowHeight, scrollY]);
76
74
  var render = useMemo(function () {
77
- var _children = _slicedToArray(children, 2),
78
- measureRow = _children[0],
79
- rows = _children[1];
75
+ var _ref = children,
76
+ _ref2 = _slicedToArray(_ref, 2),
77
+ measureRow = _ref2[0],
78
+ rows = _ref2[1];
80
79
  if (!Array.isArray(rows)) {
81
80
  return [children, 0, 0];
82
81
  }
@@ -85,8 +84,8 @@ export default function VirtualList(props) {
85
84
  }
86
85
  var list = [];
87
86
  var max = rows.length - 1;
88
- var start = range.start,
89
- end = range.end;
87
+ var start = range.start;
88
+ var end = range.end;
90
89
  if (end > max) {
91
90
  end = max;
92
91
  }
@@ -115,7 +114,7 @@ export default function VirtualList(props) {
115
114
  display: 'block',
116
115
  height: render[1]
117
116
  }
118
- }), /*#__PURE__*/React.createElement("tbody", _objectSpread(_objectSpread({}, restProps), {}, {
117
+ }), /*#__PURE__*/React.createElement("tbody", _extends({}, restProps, {
119
118
  ref: ref
120
119
  }), render[0]), /*#__PURE__*/React.createElement("tbody", {
121
120
  className: "".concat(PREFIX_CLS, "-table-append-after"),