@lemon-fe/components 0.1.154 → 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,445 +0,0 @@
1
- .transition() {
2
- transition: background-color 0.2s;
3
- }
4
-
5
- .@{prefixCls}-menu {
6
- flex: 0 0 200px;
7
- min-width: 0;
8
- height: 100%;
9
- padding: 8px 0;
10
- white-space: nowrap;
11
- transition: flex 0.1s;
12
-
13
- &-collapsed {
14
- flex: 0 0 52px;
15
- }
16
-
17
- &-bar {
18
- position: relative;
19
- z-index: 3;
20
- display: flex;
21
- flex-direction: column;
22
- box-sizing: border-box;
23
- width: 100%;
24
- height: 100%;
25
- background: #f2f2f2;
26
- }
27
-
28
- &-collapse {
29
- position: absolute;
30
- right: 0;
31
- z-index: 1;
32
- box-sizing: content-box;
33
- width: 20px;
34
- height: 20px;
35
- padding: 12px;
36
- color: #333;
37
- transform: rotate(180deg);
38
- cursor: pointer;
39
-
40
- &:hover {
41
- color: .primary() [];
42
- }
43
- }
44
-
45
- &-collapsed &-collapse {
46
- position: static;
47
- padding: 12px 16px;
48
- transform: rotate(0);
49
- }
50
-
51
- &-collapsed &-popup {
52
- left: 52px;
53
- }
54
-
55
- &-top-items {
56
- overflow-x: hidden;
57
- overflow-y: auto;
58
-
59
- .scrollBar();
60
- }
61
-
62
- &-top-item {
63
- box-sizing: border-box;
64
- height: 44px;
65
- min-height: 44px;
66
- padding: 0 16px;
67
- overflow: hidden;
68
- color: #333;
69
- font-size: 14px;
70
- border-radius: 8px;
71
- cursor: pointer;
72
- .transition();
73
-
74
- &-content {
75
- position: relative;
76
- left: 50%;
77
- display: flex;
78
- align-items: center;
79
- height: 100%;
80
- transform: translateX(-50%);
81
- }
82
-
83
- &:hover,
84
- &-popover-active {
85
- background: #e6e6e6;
86
- }
87
-
88
- &-active {
89
- font-weight: 500;
90
- background-color: #e6e6e6;
91
-
92
- &::before {
93
- position: absolute;
94
- top: 50%;
95
- left: 0;
96
- display: block;
97
- width: 2px;
98
- height: 14px;
99
- margin-top: -7px;
100
- content: '';
101
- }
102
- }
103
- }
104
-
105
- &-collapsed &-top-item-content {
106
- width: 100%;
107
- min-width: 20px;
108
- overflow: hidden;
109
- }
110
-
111
- &-icon {
112
- width: 20px;
113
- height: 20px;
114
- margin-right: 8px;
115
- color: rgba(108, 108, 108, 1);
116
- font-size: 16px;
117
- }
118
-
119
- &-favorite-star {
120
- color: var(--ant-primary-color);
121
- }
122
-
123
- &-title {
124
- flex: 1;
125
- overflow: hidden;
126
- white-space: nowrap;
127
- text-overflow: ellipsis;
128
-
129
- & + .anticon {
130
- color: #666;
131
- font-size: 16px;
132
- transform: rotate(270deg);
133
- }
134
- }
135
-
136
- &-top-item:hover &-icon {
137
- color: #333;
138
- }
139
-
140
- &-top-item&-top-item-active &-title,
141
- &-top-item&-top-item-active &-icon {
142
- color: .primary() [];
143
- }
144
-
145
- &-popup {
146
- position: absolute;
147
- top: 0;
148
- left: 200px;
149
- z-index: 2;
150
- transition: left 0.1s;
151
-
152
- &-body {
153
- position: relative;
154
- z-index: 1;
155
- display: flex;
156
- margin-left: 4px;
157
- padding: 8px;
158
- background: #fff;
159
- border-radius: 10px;
160
- box-shadow: 0 12px 48px 16px rgba(0, 0, 0, 0.03), 0 9px 28px 0 rgba(0, 0, 0, 0.05),
161
- 0 6px 16px -8px rgba(0, 0, 0, 0.08);
162
- transform: translate3d(-20px, 0, 0);
163
- opacity: 0;
164
- transition: all 0.15s;
165
- }
166
-
167
- &-tip {
168
- height: 36px;
169
- margin: 4px 0 0 4px;
170
- padding: 0 16px;
171
- color: #fff;
172
- line-height: 36px;
173
- text-align: center;
174
- background-color: .primary() [];
175
- border-radius: 22px;
176
- transform: translate3d(-10px, 0, 0);
177
- opacity: 0;
178
- transition: all 0.15s;
179
- }
180
-
181
- &.animated &-body,
182
- &.animated &-tip {
183
- transform: translate3d(0, 0, 0);
184
- opacity: 1;
185
- }
186
- }
187
-
188
- &-block {
189
- display: inline-block;
190
-
191
- &-empty {
192
- display: flex;
193
- flex-direction: column;
194
- align-items: center;
195
- justify-content: center;
196
- width: 256px;
197
- height: 180px;
198
-
199
- & > span {
200
- margin-top: 24px;
201
- color: #333;
202
- font-weight: 400;
203
- font-size: 14px;
204
- line-height: 22px;
205
- opacity: 0.5;
206
- }
207
- }
208
-
209
- &-favorite {
210
- display: grid;
211
- grid-auto-flow: column;
212
- grid-template-rows: repeat(5, auto);
213
- }
214
- }
215
-
216
- &-sub-item {
217
- box-sizing: border-box;
218
- min-width: 120px;
219
- height: 40px;
220
- padding: 0 8px;
221
- color: rgba(51, 51, 51, 0.5);
222
- font-weight: 500;
223
- font-size: 14px;
224
- line-height: 40px;
225
- }
226
-
227
- &-item {
228
- position: relative;
229
- display: flex;
230
- align-items: center;
231
- justify-content: space-between;
232
- box-sizing: border-box;
233
- min-width: 120px;
234
- height: 40px;
235
- padding: 9px 8px;
236
- color: rgba(51, 51, 51, 1);
237
- font-size: 14px;
238
- line-height: 40px;
239
- border-radius: 8px;
240
- cursor: pointer;
241
- .transition();
242
-
243
- &:hover {
244
- background-color: #e6e6e6;
245
- }
246
-
247
- &-favorite {
248
- position: absolute;
249
- top: 50%;
250
- right: 0;
251
- display: none;
252
- padding: 0 4px;
253
- background-color: inherit;
254
- transform: translateY(-50%);
255
-
256
- &:hover {
257
- display: block;
258
- }
259
-
260
- & > svg {
261
- display: block;
262
- }
263
- }
264
-
265
- &:hover &-favorite {
266
- display: block;
267
- }
268
- }
269
-
270
- &-gutter {
271
- height: 1px;
272
- margin: 12px 0 16px 12px;
273
- background-color: rgba(196, 196, 196, 0.2);
274
- }
275
-
276
- &-collapsed &-gutter {
277
- margin: 0 12px;
278
- }
279
-
280
- &-label {
281
- margin: 0 0 12px 12px;
282
- color: rgba(0, 0, 0, 0.5);
283
- font-weight: 400;
284
- font-size: 14px;
285
- line-height: 22px;
286
- }
287
-
288
- &-divider-div {
289
- padding-left: 16px;
290
- }
291
-
292
- &-divider-div-collapsed {
293
- padding-right: 12px;
294
- padding-left: 12px;
295
- }
296
-
297
- &-divider {
298
- margin-top: 12px;
299
- margin-bottom: 16px;
300
- }
301
-
302
- &-other-title {
303
- margin: 0 0 8px 16px;
304
- color: #000;
305
- font-weight: 400;
306
- font-size: 14px;
307
- line-height: 22px;
308
- opacity: 0.5;
309
- }
310
-
311
- &-more {
312
- display: flex;
313
- align-items: center;
314
- justify-content: center;
315
- box-sizing: border-box;
316
- width: 107px;
317
- height: 36px;
318
- margin-left: 12px;
319
- color: .primary() [];
320
- font-size: 14px;
321
- text-align: center;
322
- background-color: #fff;
323
- border: 1px solid .primary() [];
324
- border-radius: 4px;
325
- cursor: pointer;
326
- user-select: none;
327
- .transition();
328
-
329
- &:hover {
330
- background-color: rgba(222, 234, 255, 1);
331
- }
332
-
333
- & > span {
334
- margin-left: 8px;
335
- }
336
- }
337
-
338
- &-drawer {
339
- position: absolute;
340
- top: 0;
341
- right: 0;
342
- z-index: 10;
343
- width: 740px;
344
- height: 100vh;
345
- background-color: #fff;
346
- box-shadow: 0 12px 48px 16px rgba(0, 0, 0, 0.03), 0 9px 28px 0 rgba(0, 0, 0, 0.05),
347
- 0 6px 16px -8px rgba(0, 0, 0, 0.08);
348
- transform: translate3d(60px, 0, 0);
349
- opacity: 0;
350
- transition: all 0.2s;
351
-
352
- &.animated {
353
- transform: translate3d(0, 0, 0);
354
- opacity: 1;
355
- }
356
-
357
- &-header {
358
- display: flex;
359
- align-items: center;
360
- justify-content: space-between;
361
- height: 56px;
362
- padding: 0 24px;
363
- color: #333;
364
- font-weight: 500;
365
- font-size: 16px;
366
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
367
- }
368
-
369
- &-body {
370
- height: calc(100vh - 56px);
371
- padding: 16px;
372
- overflow-x: hidden;
373
- overflow-y: auto;
374
- }
375
-
376
- &-col {
377
- display: inline-block;
378
- width: 33.33333333%;
379
- vertical-align: top;
380
- }
381
-
382
- .item() {
383
- height: 44px;
384
- padding: 0 16px;
385
- font-size: 14px;
386
- line-height: 44px;
387
- }
388
-
389
- &-1 {
390
- color: rgba(51, 51, 51, 1);
391
- font-weight: 500;
392
- .item();
393
-
394
- &-path {
395
- cursor: pointer;
396
- .transition();
397
-
398
- &:hover {
399
- color: .primary() [];
400
- background-color: rgba(238, 238, 238, 1);
401
- }
402
- }
403
- }
404
-
405
- &-2 {
406
- color: rgba(51, 51, 51, 0.5);
407
- font-weight: 500;
408
- .item();
409
- }
410
-
411
- &-3 {
412
- color: rgba(51, 51, 51, 1);
413
- cursor: pointer;
414
- .item();
415
- .transition();
416
-
417
- &:hover {
418
- color: .primary() [];
419
- background-color: rgba(238, 238, 238, 1);
420
- }
421
- }
422
-
423
- &-block {
424
- padding: 8px;
425
-
426
- & > div {
427
- overflow: hidden;
428
- background-color: rgba(238, 238, 238, 0.5);
429
- border-radius: 8px;
430
- }
431
- }
432
-
433
- &-close {
434
- cursor: pointer;
435
-
436
- &:hover {
437
- color: .primary() [];
438
- }
439
- }
440
- }
441
-
442
- &-active {
443
- color: .primary() [];
444
- }
445
- }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export default function RefreshButton(props: {
3
- onRefresh: () => void;
4
- onCloseOther: () => void;
5
- onCloseAll: () => void;
6
- }): JSX.Element;
@@ -1,63 +0,0 @@
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; }
2
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
- 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
- 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; }
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
- import { Popover } from 'antd';
9
- import classNames from 'classnames';
10
- import React, { useState } from 'react';
11
- import { PREFIX_CLS as prefixCls } from '../../../constants';
12
- export default function RefreshButton(props) {
13
- var onRefresh = props.onRefresh,
14
- onCloseOther = props.onCloseOther,
15
- onCloseAll = props.onCloseAll;
16
- var _useState = useState(false),
17
- _useState2 = _slicedToArray(_useState, 2),
18
- popVisible = _useState2[0],
19
- setPopVisible = _useState2[1];
20
- return /*#__PURE__*/React.createElement(Popover, {
21
- open: popVisible,
22
- onOpenChange: setPopVisible,
23
- trigger: "click",
24
- overlayClassName: "".concat(prefixCls, "-refresh-down-pop"),
25
- placement: "bottomRight",
26
- content: /*#__PURE__*/React.createElement("div", {
27
- className: "".concat(prefixCls, "-refresh-down-tabs")
28
- }, /*#__PURE__*/React.createElement("div", {
29
- className: "".concat(prefixCls, "-refresh-down-tab"),
30
- onClick: function onClick() {
31
- onRefresh();
32
- setPopVisible(false);
33
- }
34
- }, "\u5237\u65B0\u5F53\u524D\u9875"), /*#__PURE__*/React.createElement("div", {
35
- className: "".concat(prefixCls, "-refresh-down-tab"),
36
- onClick: function onClick() {
37
- onCloseOther();
38
- setPopVisible(false);
39
- }
40
- }, "\u5173\u95ED\u5176\u4ED6\u9875"), /*#__PURE__*/React.createElement("div", {
41
- className: "".concat(prefixCls, "-refresh-down-tab"),
42
- onClick: function onClick() {
43
- onCloseAll();
44
- setPopVisible(false);
45
- }
46
- }, "\u5173\u95ED\u5168\u90E8\u9875"))
47
- }, /*#__PURE__*/React.createElement("div", {
48
- className: classNames("".concat(prefixCls, "-refresh-button-icon"), _defineProperty({}, "".concat(prefixCls, "-refresh-button-icon-active"), popVisible))
49
- }, /*#__PURE__*/React.createElement("svg", {
50
- width: "20",
51
- height: "20",
52
- xmlns: "http://www.w3.org/2000/svg"
53
- }, /*#__PURE__*/React.createElement("path", {
54
- d: "M17 10.06a7 7 0 0 1-13.033 3.492V17m-.96-7.33a7 7 0 0 1 12.884-3.453V3",
55
- stroke: "currentColor",
56
- strokeWidth: "1.5",
57
- opacity: ".9",
58
- strokeLinecap: "round",
59
- strokeLinejoin: "round",
60
- fill: "none",
61
- fillRule: "evenodd"
62
- }))));
63
- }
@@ -1,30 +0,0 @@
1
- .@{prefixCls}-refresh-button-icon {
2
- width: 34px;
3
- height: 34px;
4
- margin-left: 7px;
5
- padding: 7px;
6
- color: #6d6d6d;
7
- border-radius: 50%;
8
- cursor: pointer;
9
- transition: background-color 0.2s;
10
-
11
- &:hover,
12
- &-active {
13
- color: #333;
14
- background-color: #f3f3f3;
15
- }
16
- }
17
-
18
- .@{prefixCls}-refresh-down {
19
- display: flex;
20
- align-items: center;
21
- line-height: 1;
22
-
23
- &-tab {
24
- .popoverItem();
25
- }
26
-
27
- &-pop {
28
- .popover();
29
- }
30
- }
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export default function TabBar<T extends {
3
- title: string;
4
- closable?: boolean;
5
- }>(props: {
6
- tabs: T[];
7
- active: number;
8
- onClick: (active: number) => void;
9
- onClose: (active: number) => void;
10
- }): JSX.Element;
@@ -1,101 +0,0 @@
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; }
2
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
- 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
- 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; }
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
- import React, { useEffect, useRef, useState } from 'react';
9
- import classNames from 'classnames';
10
- import { PREFIX_CLS as prefixCls } from '../../../constants';
11
- import DropMenu from '../DropMenu';
12
- import { useDebounce } from '@lemon-fe/hooks';
13
- export default function TabBar(props) {
14
- var tabs = props.tabs,
15
- active = props.active,
16
- _onClick = props.onClick,
17
- onClose = props.onClose;
18
- var _useState = useState(false),
19
- _useState2 = _slicedToArray(_useState, 2),
20
- hideTabs = _useState2[0],
21
- setHideTabs = _useState2[1];
22
- var tabRef = useRef(null);
23
- var handleClose = function handleClose(e, index) {
24
- e.stopPropagation();
25
- onClose(index);
26
- };
27
- var handleDropMenu = useDebounce(function () {
28
- var _tabRef$current, _tabRef$current$query;
29
- if (tabRef.current === null) {
30
- return;
31
- }
32
- var barWidth = (_tabRef$current = tabRef.current) === null || _tabRef$current === void 0 ? void 0 : _tabRef$current.offsetWidth;
33
- var iconWidth = (_tabRef$current$query = tabRef.current.querySelector(".".concat(prefixCls, "-nav-tabs-layout-icon"))) === null || _tabRef$current$query === void 0 ? void 0 : _tabRef$current$query.offsetWidth;
34
- var minWidth = 66 * tabs.length + 32;
35
- var width = barWidth - (iconWidth || 0);
36
- if (tabs.length && minWidth >= width) {
37
- setHideTabs(true);
38
- } else if (minWidth < width) {
39
- setHideTabs(false);
40
- }
41
- }, 300);
42
- useEffect(function () {
43
- window.addEventListener('resize', handleDropMenu);
44
- return function () {
45
- window.removeEventListener('resize', handleDropMenu);
46
- };
47
- }, []);
48
- useEffect(function () {
49
- handleDropMenu();
50
- }, [tabs, active]);
51
- return /*#__PURE__*/React.createElement("div", {
52
- className: "".concat(prefixCls, "-nav-tabs-layout"),
53
- ref: tabRef
54
- }, /*#__PURE__*/React.createElement("div", {
55
- className: "".concat(prefixCls, "-nav-tabs")
56
- }, tabs.map(function (item, index) {
57
- var _classNames;
58
- var key = item.title;
59
- return /*#__PURE__*/React.createElement("div", {
60
- className: classNames("".concat(prefixCls, "-nav-tab"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-nav-tab-active"), index === active), _defineProperty(_classNames, "".concat(prefixCls, "-nav-tabs-end"), index === tabs.length - 1), _classNames)),
61
- onClick: function onClick() {
62
- return _onClick(index);
63
- },
64
- key: key
65
- }, /*#__PURE__*/React.createElement("div", {
66
- className: "".concat(prefixCls, "-nav-tab-title")
67
- }, /*#__PURE__*/React.createElement("div", {
68
- className: "".concat(prefixCls, "-nav-tab-inner")
69
- }, item.title), item.closable !== false && /*#__PURE__*/React.createElement("div", {
70
- className: "".concat(prefixCls, "-nav-tab-close"),
71
- onClick: function onClick(e) {
72
- return handleClose(e, index);
73
- }
74
- }, /*#__PURE__*/React.createElement("svg", {
75
- width: "14",
76
- height: "14",
77
- xmlns: "http://www.w3.org/2000/svg"
78
- }, /*#__PURE__*/React.createElement("g", {
79
- fill: "none",
80
- fillRule: "evenodd"
81
- }, /*#__PURE__*/React.createElement("g", {
82
- fill: "currentColor"
83
- }, /*#__PURE__*/React.createElement("g", {
84
- fillRule: "nonzero"
85
- }, /*#__PURE__*/React.createElement("path", {
86
- d: "M7.74992318,2.75006802 L7.74992318,11.250068 C7.74992318,11.6642816 7.41413675,12.000068 6.99992318,12.000068 C6.58570962,12.000068 6.24992318,11.6642816 6.24992318,11.250068 L6.24992318,2.75006802 C6.24992318,2.33585446 6.58570962,2.00006802 6.99992318,2.00006802 C7.41413675,2.00006802 7.74992318,2.33585446 7.74992318,2.75006802 Z",
87
- transform: "translate(-367.000000, -21.000000) translate(367.000000, 21.000000) translate(6.999923, 7.000068) rotate(45.000000) translate(-6.999923, -7.000068)"
88
- }), /*#__PURE__*/React.createElement("path", {
89
- d: "M7.74994595,2.75007682 L7.74994595,11.2500768 C7.74994595,11.6642904 7.41415952,12.0000768 6.99994595,12.0000768 C6.58573239,12.0000768 6.24994595,11.6642904 6.24994595,11.2500768 L6.24994595,2.75007682 C6.24994595,2.33586325 6.58573239,2.00007682 6.99994595,2.00007682 C7.41415952,2.00007682 7.74994595,2.33586325 7.74994595,2.75007682 Z",
90
- transform: "translate(-367.000000, -21.000000) translate(367.000000, 21.000000) translate(6.999946, 7.000077) rotate(-45.000000) translate(-6.999946, -7.000077)"
91
- }))))))));
92
- })), /*#__PURE__*/React.createElement("div", {
93
- className: "".concat(prefixCls, "-nav-tabs-layout-icon")
94
- }, /*#__PURE__*/React.createElement(DropMenu, {
95
- visible: hideTabs,
96
- tabs: tabs,
97
- active: active,
98
- onClick: _onClick,
99
- onClose: onClose
100
- })));
101
- }