@hi-ui/table 4.0.0-alpha.7 → 4.0.0-beta.2

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 (276) hide show
  1. package/README.md +159 -6
  2. package/lib/cjs/BaseTable.js +298 -0
  3. package/lib/cjs/BaseTable.js.map +1 -0
  4. package/lib/cjs/Table.js +315 -0
  5. package/lib/cjs/Table.js.map +1 -0
  6. package/lib/cjs/TableAdvancedFilter.js +164 -0
  7. package/lib/cjs/TableAdvancedFilter.js.map +1 -0
  8. package/lib/cjs/TableBody.js +150 -0
  9. package/lib/cjs/TableBody.js.map +1 -0
  10. package/lib/cjs/TableCell.js +226 -0
  11. package/lib/cjs/TableCell.js.map +1 -0
  12. package/lib/cjs/TableColumnMenu.js +172 -0
  13. package/lib/cjs/TableColumnMenu.js.map +1 -0
  14. package/lib/cjs/TableEmbedRow.js +81 -0
  15. package/lib/cjs/TableEmbedRow.js.map +1 -0
  16. package/lib/cjs/TableHeader.js +129 -0
  17. package/lib/cjs/TableHeader.js.map +1 -0
  18. package/lib/cjs/TableRow.js +216 -0
  19. package/lib/cjs/TableRow.js.map +1 -0
  20. package/lib/cjs/TableSettingMenu.js +222 -0
  21. package/lib/cjs/TableSettingMenu.js.map +1 -0
  22. package/lib/cjs/context.js +33 -0
  23. package/lib/cjs/context.js.map +1 -0
  24. package/lib/cjs/hooks/use-async-switch.js +145 -0
  25. package/lib/cjs/hooks/use-async-switch.js.map +1 -0
  26. package/lib/cjs/hooks/use-check.js +106 -0
  27. package/lib/cjs/hooks/use-check.js.map +1 -0
  28. package/lib/cjs/hooks/use-col-hidden.js +76 -0
  29. package/lib/cjs/hooks/use-col-hidden.js.map +1 -0
  30. package/lib/cjs/hooks/use-col-sorter.js +64 -0
  31. package/lib/cjs/hooks/use-col-sorter.js.map +1 -0
  32. package/lib/cjs/hooks/use-col-width.js +134 -0
  33. package/lib/cjs/hooks/use-col-width.js.map +1 -0
  34. package/lib/cjs/hooks/use-colgroup.js +111 -0
  35. package/lib/cjs/hooks/use-colgroup.js.map +1 -0
  36. package/lib/cjs/hooks/use-drag-sorter/lib/esm/index.js +287 -0
  37. package/lib/cjs/hooks/use-drag-sorter/lib/esm/index.js.map +1 -0
  38. package/lib/cjs/hooks/use-drag.js +110 -0
  39. package/lib/cjs/hooks/use-drag.js.map +1 -0
  40. package/lib/cjs/hooks/use-embed-expand.js +185 -0
  41. package/lib/cjs/hooks/use-embed-expand.js.map +1 -0
  42. package/lib/cjs/hooks/use-expand.js +183 -0
  43. package/lib/cjs/hooks/use-expand.js.map +1 -0
  44. package/lib/cjs/hooks/use-pagination.js +66 -0
  45. package/lib/cjs/hooks/use-pagination.js.map +1 -0
  46. package/lib/cjs/hooks/use-queue.js +55 -0
  47. package/lib/cjs/hooks/use-queue.js.map +1 -0
  48. package/lib/cjs/icons/index.js +55 -0
  49. package/lib/cjs/icons/index.js.map +1 -0
  50. package/lib/cjs/index.js +23 -0
  51. package/lib/cjs/index.js.map +1 -0
  52. package/lib/cjs/styles/index.scss.js +22 -0
  53. package/lib/cjs/styles/index.scss.js.map +1 -0
  54. package/lib/cjs/use-table.js +599 -0
  55. package/lib/cjs/use-table.js.map +1 -0
  56. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_cloneBuffer.js_commonjs-module.js +29 -0
  57. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_cloneBuffer.js_commonjs-module.js.map +1 -0
  58. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_commonjsHelpers.js +27 -0
  59. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_commonjsHelpers.js.map +1 -0
  60. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_nodeUtil.js_commonjs-module.js +29 -0
  61. package/lib/cjs/utils/func-utils/lib/esm/_virtual/_nodeUtil.js_commonjs-module.js.map +1 -0
  62. package/lib/cjs/utils/func-utils/lib/esm/_virtual/isBuffer.js_commonjs-module.js +29 -0
  63. package/lib/cjs/utils/func-utils/lib/esm/_virtual/isBuffer.js_commonjs-module.js.map +1 -0
  64. package/lib/cjs/utils/func-utils/lib/esm/index.js +62 -0
  65. package/lib/cjs/utils/func-utils/lib/esm/index.js.map +1 -0
  66. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_DataView.js +37 -0
  67. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_DataView.js.map +1 -0
  68. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Map.js +37 -0
  69. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Map.js.map +1 -0
  70. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Promise.js +37 -0
  71. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Promise.js.map +1 -0
  72. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Set.js +37 -0
  73. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Set.js.map +1 -0
  74. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Symbol.js +34 -0
  75. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_Symbol.js.map +1 -0
  76. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_WeakMap.js +37 -0
  77. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_WeakMap.js.map +1 -0
  78. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseGetTag.js +60 -0
  79. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseGetTag.js.map +1 -0
  80. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseIsArguments.js +49 -0
  81. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseIsArguments.js.map +1 -0
  82. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseIsNative.js +80 -0
  83. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_baseIsNative.js.map +1 -0
  84. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_cloneBuffer.js +63 -0
  85. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_cloneBuffer.js.map +1 -0
  86. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_coreJsData.js +34 -0
  87. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_coreJsData.js.map +1 -0
  88. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_defineProperty.js +33 -0
  89. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_defineProperty.js.map +1 -0
  90. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_freeGlobal.js +36 -0
  91. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_freeGlobal.js.map +1 -0
  92. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getNative.js +48 -0
  93. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getNative.js.map +1 -0
  94. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getRawTag.js +77 -0
  95. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getRawTag.js.map +1 -0
  96. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getTag.js +96 -0
  97. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getTag.js.map +1 -0
  98. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getValue.js +40 -0
  99. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_getValue.js.map +1 -0
  100. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_isMasked.js +50 -0
  101. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_isMasked.js.map +1 -0
  102. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_nativeCreate.js +28 -0
  103. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_nativeCreate.js.map +1 -0
  104. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_nodeUtil.js +58 -0
  105. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_nodeUtil.js.map +1 -0
  106. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_objectToString.js +49 -0
  107. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_objectToString.js.map +1 -0
  108. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_root.js +39 -0
  109. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_root.js.map +1 -0
  110. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_toSource.js +55 -0
  111. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/_toSource.js.map +1 -0
  112. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isArguments.js +61 -0
  113. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isArguments.js.map +1 -0
  114. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isBuffer.js +67 -0
  115. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isBuffer.js.map +1 -0
  116. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isFunction.js +69 -0
  117. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isFunction.js.map +1 -0
  118. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isObject.js +72 -0
  119. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isObject.js.map +1 -0
  120. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isObjectLike.js +69 -0
  121. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/isObjectLike.js.map +1 -0
  122. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/stubFalse.js +45 -0
  123. package/lib/cjs/utils/func-utils/lib/esm/node_modules/lodash/stubFalse.js.map +1 -0
  124. package/lib/cjs/utils/index.js +190 -0
  125. package/lib/cjs/utils/index.js.map +1 -0
  126. package/lib/esm/BaseTable.js +266 -0
  127. package/lib/esm/BaseTable.js.map +1 -0
  128. package/lib/esm/Table.js +276 -0
  129. package/lib/esm/Table.js.map +1 -0
  130. package/lib/esm/TableAdvancedFilter.js +134 -0
  131. package/lib/esm/TableAdvancedFilter.js.map +1 -0
  132. package/lib/esm/TableBody.js +126 -0
  133. package/lib/esm/TableBody.js.map +1 -0
  134. package/lib/esm/TableCell.js +202 -0
  135. package/lib/esm/TableCell.js.map +1 -0
  136. package/lib/esm/TableColumnMenu.js +145 -0
  137. package/lib/esm/TableColumnMenu.js.map +1 -0
  138. package/lib/esm/TableEmbedRow.js +59 -0
  139. package/lib/esm/TableEmbedRow.js.map +1 -0
  140. package/lib/esm/TableHeader.js +107 -0
  141. package/lib/esm/TableHeader.js.map +1 -0
  142. package/lib/esm/TableRow.js +189 -0
  143. package/lib/esm/TableRow.js.map +1 -0
  144. package/lib/esm/TableSettingMenu.js +190 -0
  145. package/lib/esm/TableSettingMenu.js.map +1 -0
  146. package/lib/esm/context.js +25 -0
  147. package/lib/esm/context.js.map +1 -0
  148. package/lib/esm/hooks/use-async-switch.js +124 -0
  149. package/lib/esm/hooks/use-async-switch.js.map +1 -0
  150. package/lib/esm/hooks/use-check.js +87 -0
  151. package/lib/esm/hooks/use-check.js.map +1 -0
  152. package/lib/esm/hooks/use-col-hidden.js +67 -0
  153. package/lib/esm/hooks/use-col-hidden.js.map +1 -0
  154. package/lib/esm/hooks/use-col-sorter.js +55 -0
  155. package/lib/esm/hooks/use-col-sorter.js.map +1 -0
  156. package/lib/esm/hooks/use-col-width.js +116 -0
  157. package/lib/esm/hooks/use-col-width.js.map +1 -0
  158. package/lib/esm/hooks/use-colgroup.js +93 -0
  159. package/lib/esm/hooks/use-colgroup.js.map +1 -0
  160. package/lib/esm/hooks/use-drag-sorter/lib/esm/index.js +264 -0
  161. package/lib/esm/hooks/use-drag-sorter/lib/esm/index.js.map +1 -0
  162. package/lib/esm/hooks/use-drag.js +91 -0
  163. package/lib/esm/hooks/use-drag.js.map +1 -0
  164. package/lib/esm/hooks/use-embed-expand.js +160 -0
  165. package/lib/esm/hooks/use-embed-expand.js.map +1 -0
  166. package/lib/esm/hooks/use-expand.js +172 -0
  167. package/lib/esm/hooks/use-expand.js.map +1 -0
  168. package/lib/esm/hooks/use-pagination.js +46 -0
  169. package/lib/esm/hooks/use-pagination.js.map +1 -0
  170. package/lib/esm/hooks/use-queue.js +49 -0
  171. package/lib/esm/hooks/use-queue.js.map +1 -0
  172. package/lib/esm/icons/index.js +33 -0
  173. package/lib/esm/icons/index.js.map +1 -0
  174. package/lib/esm/index.js +12 -0
  175. package/lib/esm/index.js.map +1 -0
  176. package/lib/esm/styles/index.scss.js +17 -0
  177. package/lib/esm/styles/index.scss.js.map +1 -0
  178. package/lib/esm/use-table.js +567 -0
  179. package/lib/esm/use-table.js.map +1 -0
  180. package/lib/esm/utils/func-utils/lib/esm/_virtual/_cloneBuffer.js_commonjs-module.js +24 -0
  181. package/lib/esm/utils/func-utils/lib/esm/_virtual/_cloneBuffer.js_commonjs-module.js.map +1 -0
  182. package/lib/esm/utils/func-utils/lib/esm/_virtual/_commonjsHelpers.js +22 -0
  183. package/lib/esm/utils/func-utils/lib/esm/_virtual/_commonjsHelpers.js.map +1 -0
  184. package/lib/esm/utils/func-utils/lib/esm/_virtual/_nodeUtil.js_commonjs-module.js +24 -0
  185. package/lib/esm/utils/func-utils/lib/esm/_virtual/_nodeUtil.js_commonjs-module.js.map +1 -0
  186. package/lib/esm/utils/func-utils/lib/esm/_virtual/isBuffer.js_commonjs-module.js +24 -0
  187. package/lib/esm/utils/func-utils/lib/esm/_virtual/isBuffer.js_commonjs-module.js.map +1 -0
  188. package/lib/esm/utils/func-utils/lib/esm/index.js +45 -0
  189. package/lib/esm/utils/func-utils/lib/esm/index.js.map +1 -0
  190. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_DataView.js +29 -0
  191. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_DataView.js.map +1 -0
  192. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Map.js +29 -0
  193. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Map.js.map +1 -0
  194. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Promise.js +29 -0
  195. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Promise.js.map +1 -0
  196. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Set.js +29 -0
  197. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Set.js.map +1 -0
  198. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Symbol.js +27 -0
  199. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_Symbol.js.map +1 -0
  200. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_WeakMap.js +29 -0
  201. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_WeakMap.js.map +1 -0
  202. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseGetTag.js +51 -0
  203. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseGetTag.js.map +1 -0
  204. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseIsArguments.js +41 -0
  205. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseIsArguments.js.map +1 -0
  206. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseIsNative.js +70 -0
  207. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_baseIsNative.js.map +1 -0
  208. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_cloneBuffer.js +59 -0
  209. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_cloneBuffer.js.map +1 -0
  210. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_coreJsData.js +27 -0
  211. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_coreJsData.js.map +1 -0
  212. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_defineProperty.js +30 -0
  213. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_defineProperty.js.map +1 -0
  214. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_freeGlobal.js +17 -0
  215. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_freeGlobal.js.map +1 -0
  216. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getNative.js +40 -0
  217. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getNative.js.map +1 -0
  218. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getRawTag.js +70 -0
  219. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getRawTag.js.map +1 -0
  220. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getTag.js +87 -0
  221. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getTag.js.map +1 -0
  222. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getValue.js +35 -0
  223. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_getValue.js.map +1 -0
  224. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_isMasked.js +43 -0
  225. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_isMasked.js.map +1 -0
  226. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_nativeCreate.js +25 -0
  227. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_nativeCreate.js.map +1 -0
  228. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_nodeUtil.js +54 -0
  229. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_nodeUtil.js.map +1 -0
  230. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_objectToString.js +44 -0
  231. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_objectToString.js.map +1 -0
  232. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_root.js +21 -0
  233. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_root.js.map +1 -0
  234. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_toSource.js +50 -0
  235. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/_toSource.js.map +1 -0
  236. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isArguments.js +57 -0
  237. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isArguments.js.map +1 -0
  238. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isBuffer.js +62 -0
  239. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isBuffer.js.map +1 -0
  240. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isFunction.js +61 -0
  241. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isFunction.js.map +1 -0
  242. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isObject.js +55 -0
  243. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isObject.js.map +1 -0
  244. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isObjectLike.js +52 -0
  245. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/isObjectLike.js.map +1 -0
  246. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/stubFalse.js +40 -0
  247. package/lib/esm/utils/func-utils/lib/esm/node_modules/lodash/stubFalse.js.map +1 -0
  248. package/lib/esm/utils/index.js +178 -0
  249. package/lib/esm/utils/index.js.map +1 -0
  250. package/lib/types/BaseTable.d.ts +41 -0
  251. package/lib/types/Table.d.ts +18 -16
  252. package/lib/types/TableAdvancedFilter.d.ts +9 -0
  253. package/lib/types/TableBody.d.ts +11 -0
  254. package/lib/types/TableCell.d.ts +41 -0
  255. package/lib/types/TableColumnMenu.d.ts +18 -5
  256. package/lib/types/TableEmbedRow.d.ts +26 -0
  257. package/lib/types/TableHeader.d.ts +1 -7
  258. package/lib/types/TableRow.d.ts +32 -0
  259. package/lib/types/TableSettingMenu.d.ts +1 -2
  260. package/lib/types/context.d.ts +110 -85
  261. package/lib/types/hooks/use-async-switch.d.ts +2 -1
  262. package/lib/types/hooks/use-check.d.ts +4 -8
  263. package/lib/types/hooks/use-col-frozen.d.ts +1 -1
  264. package/lib/types/hooks/use-col-hidden.d.ts +1 -1
  265. package/lib/types/hooks/use-col-width.d.ts +5 -8
  266. package/lib/types/hooks/use-colgroup.d.ts +2 -1
  267. package/lib/types/hooks/use-drag.d.ts +13 -0
  268. package/lib/types/hooks/use-embed-expand.d.ts +39 -0
  269. package/lib/types/hooks/use-expand.d.ts +1 -1
  270. package/lib/types/hooks/use-pagination.d.ts +5 -6
  271. package/lib/types/index.d.ts +1 -0
  272. package/lib/types/types.d.ts +33 -32
  273. package/lib/types/use-table.d.ts +242 -0
  274. package/lib/types/utils/index.d.ts +11 -4
  275. package/package.json +35 -8
  276. package/lib/types/TableExpandedRow.d.ts +0 -28
@@ -1,20 +1,16 @@
1
1
  import React from 'react';
2
- import { HiBaseHTMLProps } from '@hi-ui/core';
3
- import { UseTableProps } from './use-table';
4
- import { TableExtra, TablePaginationProps } from './types';
5
- import { AxiosRequestConfig } from 'axios';
2
+ import { TablePaginationProps, TableDataSource } from './types';
3
+ import { BaseTableProps } from './BaseTable';
4
+ export declare const SELECTION_DATA_KEY: string;
6
5
  /**
7
- * TODO: What is BaseTable
8
- */
9
- export declare const BaseTable: React.ForwardRefExoticComponent<BaseTableProps & React.RefAttributes<HTMLDivElement | null>>;
10
- export interface BaseTableProps extends Omit<HiBaseHTMLProps<'div'>, 'onDrop' | 'draggable' | 'onDragStart'>, UseTableProps {
11
- extra?: TableExtra;
12
- }
13
- /**
14
- * TODO: What is Table
6
+ * 表格
15
7
  */
16
8
  export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLDivElement | null>>;
17
9
  export interface TableProps extends Omit<BaseTableProps, 'extra' | 'role'> {
10
+ /**
11
+ * 加载中状态
12
+ */
13
+ loading?: boolean;
18
14
  /**
19
15
  * 标准模式,默认集成 `showColMenu = true, sticky = true, bordered = true, setting = true, striped = true`
20
16
  */
@@ -32,11 +28,17 @@ export interface TableProps extends Omit<BaseTableProps, 'extra' | 'role'> {
32
28
  */
33
29
  onHiddenColKeysChange?: (hiddenColKeys: string[]) => void;
34
30
  /**
35
- * 异步数据源
31
+ * 表格分页配置项
36
32
  */
37
- dataSource?: (current: number) => AxiosRequestConfig<any>;
33
+ pagination?: TablePaginationProps & {
34
+ pageSize: number;
35
+ };
38
36
  /**
39
- * 表格分页配置项
37
+ * 异步数据源,分页切换时加载数据
38
+ */
39
+ dataSource?: (current: number) => TableDataSource;
40
+ /**
41
+ * 底部吸底
40
42
  */
41
- pagination?: TablePaginationProps;
43
+ stickyFooter?: boolean;
42
44
  }
@@ -0,0 +1,9 @@
1
+ export declare const renderFilter: ({ prefixCls, columnKey, column, showColMenu }: RenderFilterProps) => any[];
2
+ export interface RenderFilterProps {
3
+ prefixCls?: string;
4
+ columnKey?: string;
5
+ column?: any;
6
+ showColMenu?: boolean;
7
+ }
8
+ export declare const SorterMenu: ({ prefixCls, column }: any) => JSX.Element;
9
+ export declare const FilterDropdown: ({ prefixCls, column }: any) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ /**
3
+ * TODO: What is TableBody
4
+ */
5
+ export declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLDivElement | null>>;
6
+ export interface TableBodyProps {
7
+ /**
8
+ * 组件默认的选择器类
9
+ */
10
+ prefixCls?: string;
11
+ }
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { HiBaseHTMLProps } from '@hi-ui/core';
3
+ import { FlattedTableRowData, FlattedTableColumnItemData } from './types';
4
+ /**
5
+ * 表格 body 单元格渲染
6
+ */
7
+ export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement | null>>;
8
+ export interface TableCellProps extends HiBaseHTMLProps<'td'> {
9
+ /**
10
+ * 表格当前列配置信息
11
+ */
12
+ column: FlattedTableColumnItemData;
13
+ /**
14
+ * 表格行数据
15
+ */
16
+ rowData: FlattedTableRowData;
17
+ /**
18
+ * 表格行数据下标
19
+ */
20
+ rowIndex: number;
21
+ /**
22
+ * 是否展开树表格行
23
+ */
24
+ expandedTree?: boolean;
25
+ /**
26
+ * 作为操作树节点展开列(数据第一列)
27
+ */
28
+ isSwitcherCol?: boolean;
29
+ /**
30
+ * 节点收起时的默认图标
31
+ */
32
+ collapsedIcon?: React.ReactNode;
33
+ /**
34
+ * 节点展开时的默认图标
35
+ */
36
+ expandedIcon?: React.ReactNode;
37
+ /**
38
+ * 叶子结点的默认图标
39
+ */
40
+ leafIcon?: React.ReactNode;
41
+ }
@@ -1,10 +1,23 @@
1
1
  import React from 'react';
2
- import { HiBaseHTMLProps } from '@hi-ui/core';
3
- import { UseTableProps } from './use-table';
2
+ import { FlattedTableColumnItemData } from './types';
4
3
  /**
5
- * TODO: What is Table
4
+ * 表头每列下拉式菜单,包含冻结、高亮、递增、递减操作
6
5
  */
7
6
  export declare const TableColumnMenu: React.ForwardRefExoticComponent<TableColumnMenuProps & React.RefAttributes<HTMLDivElement | null>>;
8
- export interface TableColumnMenuProps extends Omit<HiBaseHTMLProps<'div'>, 'onDrop' | 'draggable' | 'onDragStart'>, UseTableProps {
7
+ export interface TableColumnMenuProps {
8
+ /**
9
+ * 组件默认的选择器类
10
+ */
11
+ prefixCls?: string;
12
+ /**
13
+ * 表格当前列配置信息
14
+ */
15
+ column: FlattedTableColumnItemData;
9
16
  }
10
- export declare const TableColumnMenuItem: ({ prefixCls, active, onClick, content, icon }: any) => JSX.Element;
17
+ export declare const TableColumnMenuItem: ({ prefixCls, active, onSwitch, content, icon, }: {
18
+ prefixCls?: string | undefined;
19
+ active: boolean;
20
+ onSwitch: (shouldActive: boolean) => void;
21
+ icon?: React.ReactNode;
22
+ content?: React.ReactNode;
23
+ }) => JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { FlattedTableRowData } from './types';
2
+ /**
3
+ * 可展开的内嵌面板
4
+ */
5
+ export declare const TableEmbedRow: {
6
+ ({ prefixCls, colSpan, rowIndex, rowData, }: TableEmbedRowProps): JSX.Element | null;
7
+ displayName: string;
8
+ };
9
+ export interface TableEmbedRowProps {
10
+ /**
11
+ * 组件默认的选择器类
12
+ */
13
+ prefixCls?: string;
14
+ /**
15
+ * 所占列数
16
+ */
17
+ colSpan: number;
18
+ /**
19
+ * 操作展开行的行数据
20
+ */
21
+ rowData: FlattedTableRowData;
22
+ /**
23
+ * 操作展开行的行下标
24
+ */
25
+ rowIndex: number;
26
+ }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { TableColumnItem, TableRowSelection } from './types';
3
2
  /**
4
3
  * TODO: What is TableHeader
5
4
  */
@@ -9,10 +8,5 @@ export interface TableHeaderProps {
9
8
  * 组件默认的选择器类
10
9
  */
11
10
  prefixCls?: string;
12
- /**
13
- * 列配置项
14
- */
15
- columns: TableColumnItem[];
16
- fixedColWidth: number[];
17
- rowSelection?: TableRowSelection;
11
+ className?: string;
18
12
  }
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { FlattedTableRowData } from './types';
3
+ /**
4
+ * TODO: What is TableRow
5
+ */
6
+ export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement | null>>;
7
+ export interface TableRowProps {
8
+ /**
9
+ * 组件默认的选择器类
10
+ */
11
+ prefixCls?: string;
12
+ /**
13
+ * 是否为总计行
14
+ */
15
+ isSumRow?: boolean;
16
+ /**
17
+ * 是否为均值行
18
+ */
19
+ isAvgRow?: boolean;
20
+ /**
21
+ * 表格行数据
22
+ */
23
+ rowData: FlattedTableRowData;
24
+ /**
25
+ * 表格行数据下标
26
+ */
27
+ rowIndex: number;
28
+ /**
29
+ * 是否展开树表格行
30
+ */
31
+ expandedTree?: boolean;
32
+ }
@@ -3,8 +3,7 @@ import { UseTableProps } from './use-table';
3
3
  import { UseColSorterReturn } from './hooks/use-col-sorter';
4
4
  import { UseColHiddenReturn } from './hooks/use-col-hidden';
5
5
  /**
6
- * TODO: What is Table
7
- * 高级定制功能
6
+ * 表头右侧高级设置菜单(抽屉式)
8
7
  */
9
8
  export declare const TableSettingMenu: React.ForwardRefExoticComponent<TableColumnMenuProps & React.RefAttributes<HTMLDivElement | null>>;
10
9
  export interface TableColumnMenuProps extends UseTableProps, UseColSorterReturn, Omit<UseColHiddenReturn, 'visibleCols'> {
@@ -1,19 +1,14 @@
1
1
  /// <reference types="react" />
2
- export declare const TableProvider: import("react").Provider<Omit<{
2
+ import { TableRowFunc } from './types';
3
+ export declare const TableProvider: import("react").Provider<(Omit<{
3
4
  getColgroupProps: (column: import("./types").FlattedTableColumnItemData, index: number) => {
4
5
  style: {
5
6
  width: number | undefined;
6
7
  minWidth: number | undefined;
7
8
  };
8
- 'data-hover-highlight': "" | undefined;
9
9
  };
10
10
  getStickyColProps: (column: any) => {
11
- style: {
12
- position: string | undefined;
13
- textAlign: any;
14
- right: string;
15
- left: string;
16
- };
11
+ style: import("react").CSSProperties;
17
12
  'data-sticky': "" | undefined;
18
13
  };
19
14
  onHighlightedRowChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
@@ -24,60 +19,62 @@ export declare const TableProvider: import("react").Provider<Omit<{
24
19
  isHighlightedCol: (id: import("react").ReactText) => boolean;
25
20
  highlightedColKeys: string[];
26
21
  trySetHighlightedColKeys: (stateOrFunction: import("react").SetStateAction<string[]>, ...args: any[]) => void;
27
- showColHighlight: boolean | undefined;
28
- isHoveredCol: (id: import("react").ReactText) => boolean;
22
+ showColHighlight: boolean;
23
+ isHoveredHighlightCol: (id: import("react").ReactText) => boolean;
29
24
  onHoveredColChange: <T extends import("packages/hooks/use-check/lib/types").UseCheckItem>(targetItem: T, shouldSelected?: boolean | undefined) => void;
30
25
  draggable: boolean;
31
- highlightColumns: never[];
26
+ highlightColumns: any;
32
27
  dragRowRef: import("react").MutableRefObject<any>;
33
- onDrop: (sourceId: any, targetId: any, dragDirection: any) => void;
34
- mergedColumns: any;
35
- sortedCols: any;
36
- cacheSortedCols: any;
37
- setCacheSortedCols: import("react").Dispatch<any>;
38
- hiddenColKeys: any;
39
- cacheHiddenColKeys: any;
40
- setCacheHiddenColKeys: import("react").Dispatch<any>;
41
- setHiddenColKeys: (stateOrFunction: any, ...args: any[]) => void;
42
- groupedColumns: any;
28
+ onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
29
+ groupedColumns: import("./types").FlattedTableColumnItemData[][];
43
30
  onExpandTreeRowsChange: (expandedNode: import("./types").TableRowEventData, shouldExpanded: boolean) => void;
44
31
  isExpandTreeRows: (id: import("react").ReactText) => boolean;
45
32
  isLoadingTreeNodeId: (id: import("react").ReactText) => boolean;
46
- onTreeNodeSwitch: (node: any, onlyExpand?: any) => Promise<void>;
47
- onExpandEmbedRowsChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
48
- isExpandEmbedRows: (id: import("react").ReactText) => boolean;
49
- rowExpandable: (record: import("./types").TableColumnItem) => import("react").ReactNode;
33
+ onTreeNodeSwitch: (node: import("./types").TableRowEventData, onlyExpand?: any) => Promise<void>;
50
34
  resizable: boolean;
51
- colWidths: (number | undefined)[];
35
+ colWidths: number[];
52
36
  onColumnResizable: (_: any, { size }: any, index: number) => void;
37
+ isTree: boolean;
38
+ cellRender: ((text: any) => import("react").ReactNode) | undefined;
39
+ showColMenu: boolean | undefined;
40
+ onLoadChildren: any;
53
41
  scrollLeft: number;
54
42
  scrollRight: number;
43
+ rootProps: {
44
+ bordered?: boolean | undefined;
45
+ pagination?: import("packages/ui/pagination/lib/types").PaginationProps | undefined;
46
+ setting?: boolean | undefined;
47
+ loading?: boolean | undefined;
48
+ uniqueId?: string | undefined;
49
+ extra?: import("react").ReactNode;
50
+ };
51
+ activeSorterColumn: string | null;
52
+ setActiveSorterColumn: import("react").Dispatch<import("react").SetStateAction<string | null>>;
53
+ activeSorterType: string | null;
54
+ setActiveSorterType: import("react").Dispatch<import("react").SetStateAction<string | null>>;
55
+ canScroll: boolean;
56
+ maxHeight: number | undefined;
57
+ getTableHeaderProps: () => {
58
+ style: import("react").CSSProperties;
59
+ 'data-sticky': "" | undefined;
60
+ };
61
+ isErrorRow: (key: import("react").ReactText) => boolean;
55
62
  bodyTableRef: import("react").RefObject<HTMLTableElement>;
56
63
  scrollBodyElementRef: import("react").RefObject<HTMLTableElement>;
57
- columns: import("packages/utils/tree-utils/lib/types/types").BaseTreeNodeData[];
64
+ columns: import("./types").FlattedTableColumnItemData[];
58
65
  data: object[];
59
66
  transitionData: import("./types").FlattedTableRowData[];
60
67
  flattedColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
61
- flattedColumnsWithoutChildren: import("packages/utils/tree-utils/lib/types/types").BaseTreeNodeData[];
62
- fixedColWidth: number[];
63
- expandedRender: ((record: import("./types").TableColumnItem, index: number) => import("react").ReactNode | Promise<import("react").ReactNode>) | undefined;
68
+ flattedColumnsWithoutChildren: import("./types").FlattedTableColumnItemData[];
64
69
  rowSelection: import("./types").TableRowSelection | undefined;
65
- checkedRowKeys: import("react").ReactText[];
66
- trySetCheckedRowKeys: (stateOrFunction: import("react").SetStateAction<import("react").ReactText[]>, ...args: any[]) => void;
67
- checkedAll: boolean;
68
- halfChecked: boolean;
69
- tryCheckAllRow: () => void;
70
- onCheckedRowKeysChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
71
- isCheckedRowKey: (id: import("react").ReactText) => boolean;
72
70
  cacheData: object[];
73
- firstRowElementRef: import("react").RefObject<HTMLTableRowElement>;
71
+ measureRowElementRef: import("react").RefObject<HTMLTableRowElement>;
72
+ leafColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
74
73
  bordered: boolean;
75
- size: string | undefined;
76
- pagination: any;
77
- currentPage: number;
78
- trySetCurrentPage: (stateOrFunction: import("react").SetStateAction<number>, ...args: any[]) => void;
79
74
  scrollHeaderElementRef: import("react").RefObject<HTMLTableElement>;
80
75
  errorRowKeys: never[];
76
+ leftFreezeColumn: import("react").ReactText | undefined;
77
+ setLeftFreezeColumn: (columnKey: import("react").ReactText) => void;
81
78
  onTableBodyScroll: (evt: any) => void;
82
79
  onTableBodyScrollMock: (evt: any) => void;
83
80
  scrollSize: {
@@ -88,22 +85,32 @@ export declare const TableProvider: import("react").Provider<Omit<{
88
85
  rightFrozenColKeys: any[];
89
86
  leftFixedColumnsWidth: number;
90
87
  rightFixedColumnsWidth: number;
91
- }, "rootProps"> | null>;
88
+ }, "rootProps"> & {
89
+ embedExpandable: boolean | {
90
+ rowExpandable: true | ((row: import("./types").TableColumnItem) => import("react").ReactNode);
91
+ expandedRender: (row: Record<string, any>, index: number) => import("react").ReactNode | Promise<void | import("react").ReactNode>;
92
+ };
93
+ onEmbedSwitch: (node: import("./types").FlattedTableRowData, rowIndex: number) => Promise<void>;
94
+ getEmbedPanelById: (id: import("react").ReactText) => any;
95
+ isEmbedLoadingId: (targetKey: import("react").ReactText) => boolean;
96
+ isExpandEmbedRows: (id: import("react").ReactText) => boolean;
97
+ onExpandEmbedRowsChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
98
+ } & {
99
+ avgRow: Record<string, any>;
100
+ hasAvgColumn: boolean;
101
+ sumRow: Record<string, any>;
102
+ hasSumColumn: boolean;
103
+ onRow?: TableRowFunc | undefined;
104
+ }) | null>;
92
105
  export declare const useTableContext: () => Omit<{
93
106
  getColgroupProps: (column: import("./types").FlattedTableColumnItemData, index: number) => {
94
107
  style: {
95
108
  width: number | undefined;
96
109
  minWidth: number | undefined;
97
110
  };
98
- 'data-hover-highlight': "" | undefined;
99
111
  };
100
112
  getStickyColProps: (column: any) => {
101
- style: {
102
- position: string | undefined;
103
- textAlign: any;
104
- right: string;
105
- left: string;
106
- };
113
+ style: import("react").CSSProperties;
107
114
  'data-sticky': "" | undefined;
108
115
  };
109
116
  onHighlightedRowChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
@@ -114,60 +121,62 @@ export declare const useTableContext: () => Omit<{
114
121
  isHighlightedCol: (id: import("react").ReactText) => boolean;
115
122
  highlightedColKeys: string[];
116
123
  trySetHighlightedColKeys: (stateOrFunction: import("react").SetStateAction<string[]>, ...args: any[]) => void;
117
- showColHighlight: boolean | undefined;
118
- isHoveredCol: (id: import("react").ReactText) => boolean;
124
+ showColHighlight: boolean;
125
+ isHoveredHighlightCol: (id: import("react").ReactText) => boolean;
119
126
  onHoveredColChange: <T extends import("packages/hooks/use-check/lib/types").UseCheckItem>(targetItem: T, shouldSelected?: boolean | undefined) => void;
120
127
  draggable: boolean;
121
- highlightColumns: never[];
128
+ highlightColumns: any;
122
129
  dragRowRef: import("react").MutableRefObject<any>;
123
- onDrop: (sourceId: any, targetId: any, dragDirection: any) => void;
124
- mergedColumns: any;
125
- sortedCols: any;
126
- cacheSortedCols: any;
127
- setCacheSortedCols: import("react").Dispatch<any>;
128
- hiddenColKeys: any;
129
- cacheHiddenColKeys: any;
130
- setCacheHiddenColKeys: import("react").Dispatch<any>;
131
- setHiddenColKeys: (stateOrFunction: any, ...args: any[]) => void;
132
- groupedColumns: any;
130
+ onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
131
+ groupedColumns: import("./types").FlattedTableColumnItemData[][];
133
132
  onExpandTreeRowsChange: (expandedNode: import("./types").TableRowEventData, shouldExpanded: boolean) => void;
134
133
  isExpandTreeRows: (id: import("react").ReactText) => boolean;
135
134
  isLoadingTreeNodeId: (id: import("react").ReactText) => boolean;
136
- onTreeNodeSwitch: (node: any, onlyExpand?: any) => Promise<void>;
137
- onExpandEmbedRowsChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
138
- isExpandEmbedRows: (id: import("react").ReactText) => boolean;
139
- rowExpandable: (record: import("./types").TableColumnItem) => import("react").ReactNode;
135
+ onTreeNodeSwitch: (node: import("./types").TableRowEventData, onlyExpand?: any) => Promise<void>;
140
136
  resizable: boolean;
141
- colWidths: (number | undefined)[];
137
+ colWidths: number[];
142
138
  onColumnResizable: (_: any, { size }: any, index: number) => void;
139
+ isTree: boolean;
140
+ cellRender: ((text: any) => import("react").ReactNode) | undefined;
141
+ showColMenu: boolean | undefined;
142
+ onLoadChildren: any;
143
143
  scrollLeft: number;
144
144
  scrollRight: number;
145
+ rootProps: {
146
+ bordered?: boolean | undefined;
147
+ pagination?: import("packages/ui/pagination/lib/types").PaginationProps | undefined;
148
+ setting?: boolean | undefined;
149
+ loading?: boolean | undefined;
150
+ uniqueId?: string | undefined;
151
+ extra?: import("react").ReactNode;
152
+ };
153
+ activeSorterColumn: string | null;
154
+ setActiveSorterColumn: import("react").Dispatch<import("react").SetStateAction<string | null>>;
155
+ activeSorterType: string | null;
156
+ setActiveSorterType: import("react").Dispatch<import("react").SetStateAction<string | null>>;
157
+ canScroll: boolean;
158
+ maxHeight: number | undefined;
159
+ getTableHeaderProps: () => {
160
+ style: import("react").CSSProperties;
161
+ 'data-sticky': "" | undefined;
162
+ };
163
+ isErrorRow: (key: import("react").ReactText) => boolean;
145
164
  bodyTableRef: import("react").RefObject<HTMLTableElement>;
146
165
  scrollBodyElementRef: import("react").RefObject<HTMLTableElement>;
147
- columns: import("packages/utils/tree-utils/lib/types/types").BaseTreeNodeData[];
166
+ columns: import("./types").FlattedTableColumnItemData[];
148
167
  data: object[];
149
168
  transitionData: import("./types").FlattedTableRowData[];
150
169
  flattedColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
151
- flattedColumnsWithoutChildren: import("packages/utils/tree-utils/lib/types/types").BaseTreeNodeData[];
152
- fixedColWidth: number[];
153
- expandedRender: ((record: import("./types").TableColumnItem, index: number) => import("react").ReactNode | Promise<import("react").ReactNode>) | undefined;
170
+ flattedColumnsWithoutChildren: import("./types").FlattedTableColumnItemData[];
154
171
  rowSelection: import("./types").TableRowSelection | undefined;
155
- checkedRowKeys: import("react").ReactText[];
156
- trySetCheckedRowKeys: (stateOrFunction: import("react").SetStateAction<import("react").ReactText[]>, ...args: any[]) => void;
157
- checkedAll: boolean;
158
- halfChecked: boolean;
159
- tryCheckAllRow: () => void;
160
- onCheckedRowKeysChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
161
- isCheckedRowKey: (id: import("react").ReactText) => boolean;
162
172
  cacheData: object[];
163
- firstRowElementRef: import("react").RefObject<HTMLTableRowElement>;
173
+ measureRowElementRef: import("react").RefObject<HTMLTableRowElement>;
174
+ leafColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
164
175
  bordered: boolean;
165
- size: string | undefined;
166
- pagination: any;
167
- currentPage: number;
168
- trySetCurrentPage: (stateOrFunction: import("react").SetStateAction<number>, ...args: any[]) => void;
169
176
  scrollHeaderElementRef: import("react").RefObject<HTMLTableElement>;
170
177
  errorRowKeys: never[];
178
+ leftFreezeColumn: import("react").ReactText | undefined;
179
+ setLeftFreezeColumn: (columnKey: import("react").ReactText) => void;
171
180
  onTableBodyScroll: (evt: any) => void;
172
181
  onTableBodyScrollMock: (evt: any) => void;
173
182
  scrollSize: {
@@ -178,4 +187,20 @@ export declare const useTableContext: () => Omit<{
178
187
  rightFrozenColKeys: any[];
179
188
  leftFixedColumnsWidth: number;
180
189
  rightFixedColumnsWidth: number;
181
- }, "rootProps">;
190
+ }, "rootProps"> & {
191
+ embedExpandable: boolean | {
192
+ rowExpandable: true | ((row: import("./types").TableColumnItem) => import("react").ReactNode);
193
+ expandedRender: (row: Record<string, any>, index: number) => import("react").ReactNode | Promise<void | import("react").ReactNode>;
194
+ };
195
+ onEmbedSwitch: (node: import("./types").FlattedTableRowData, rowIndex: number) => Promise<void>;
196
+ getEmbedPanelById: (id: import("react").ReactText) => any;
197
+ isEmbedLoadingId: (targetKey: import("react").ReactText) => boolean;
198
+ isExpandEmbedRows: (id: import("react").ReactText) => boolean;
199
+ onExpandEmbedRowsChange: (targetItem: import("packages/hooks/use-check/lib/types").UseCheckItem, shouldChecked: boolean) => void;
200
+ } & {
201
+ avgRow: Record<string, any>;
202
+ hasAvgColumn: boolean;
203
+ sumRow: Record<string, any>;
204
+ hasSumColumn: boolean;
205
+ onRow?: TableRowFunc | undefined;
206
+ };
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
- export declare const useAsyncSwitch: (setCascaderData: React.Dispatch<React.SetStateAction<any[]>>, onExpand?: ((selectedOption: any, onlyExpand: boolean) => void) | undefined, onLoadChildren?: ((item: any) => Promise<any[] | void> | void) | undefined) => readonly [(id: React.ReactText) => boolean, (node: any, onlyExpand?: any) => Promise<void>];
2
+ import { TableRowEventData } from '../types';
3
+ export declare const useAsyncSwitch: (setCascaderData: React.Dispatch<React.SetStateAction<any[]>>, onExpand?: ((selectedOption: TableRowEventData, onlyExpand: boolean) => void) | undefined, onLoadChildren?: ((item: TableRowEventData) => Promise<any[] | void> | void) | undefined) => readonly [(id: React.ReactText) => boolean, (node: TableRowEventData, onlyExpand?: any) => Promise<void>];
@@ -1,20 +1,16 @@
1
1
  import React from 'react';
2
2
  import { FlattedTableRowData, TableRowSelection } from '../types';
3
- export declare const useTableCheck: ({ rowSelection, flattedData, getRowKeyField, }: {
3
+ export declare const useTableCheck: ({ rowSelection, flattedData, fieldKey, }: {
4
4
  rowSelection: TableRowSelection | undefined;
5
5
  flattedData: FlattedTableRowData[];
6
- getRowKeyField: (item: any) => string;
6
+ fieldKey: string;
7
7
  }) => {
8
8
  tryCheckAllRow: () => void;
9
9
  checkedAll: boolean;
10
- halfChecked: boolean;
11
- getRowSelection: (rowData: any) => {
12
- disabled: boolean;
13
- colWidth: number;
14
- };
10
+ semiChecked: boolean;
15
11
  onCheckedRowKeysChange: (targetItem: import("@hi-ui/use-check").UseCheckItem, shouldChecked: boolean) => void;
16
12
  isCheckedRowKey: (id: React.ReactText) => boolean;
17
- checkboxColWidth: number;
18
13
  checkedRowKeys: React.ReactText[];
19
14
  trySetCheckedRowKeys: (stateOrFunction: React.SetStateAction<React.ReactText[]>, ...args: any[]) => void;
15
+ checkRowIsDisabledCheckbox: (rowItem: any) => boolean;
20
16
  };
@@ -5,6 +5,6 @@ export declare const useColFrozen: ({ columns, resizable, }: {
5
5
  }) => {
6
6
  flattedColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
7
7
  mergedColumns: FlattedTableColumnItemData[];
8
- groupedColumns: any;
8
+ groupedColumns: TableColumnItem[][];
9
9
  flattedColumnsWithoutChildren: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
10
10
  };
@@ -4,7 +4,7 @@ import { TableProps } from '../Table';
4
4
  * 列操作逻辑
5
5
  */
6
6
  export declare const useColHidden: ({ uniqueId, columns, hiddenColKeys: hiddenColKeysProp, onHiddenColKeysChange, }: TableProps) => {
7
- visibleCols: import("../types").TableColumnItem[];
7
+ visibleCols: import("..").TableColumnItem[];
8
8
  hiddenColKeys: string[];
9
9
  setHiddenColKeys: (stateOrFunction: import("react").SetStateAction<string[]>, ...args: any[]) => void;
10
10
  cacheHiddenColKeys: string[];
@@ -1,21 +1,18 @@
1
1
  import React from 'react';
2
- import { FlattedTableColumnItemData, TableColumnItem } from '../types';
3
- export declare const useColWidth: ({ data, columns, resizable, dataSource, firstRowElementRef, isHoveredCol, }: {
2
+ import { FlattedTableColumnItemData, TableColumnItem, TableRowRecord } from '../types';
3
+ export declare const useColWidth: ({ resizable, data, columns, }: {
4
4
  resizable: boolean;
5
+ data: TableRowRecord[];
5
6
  columns: TableColumnItem[];
6
- data: object[];
7
- dataSource?: any;
8
- firstRowElementRef?: any;
9
- isHoveredCol: (dataKey: string) => boolean;
10
7
  }) => {
8
+ measureRowElementRef: React.RefObject<HTMLTableRowElement>;
11
9
  onColumnResizable: (_: any, { size }: any, index: number) => void;
12
10
  getColgroupProps: (column: FlattedTableColumnItemData, index: number) => {
13
11
  style: {
14
12
  width: number | undefined;
15
13
  minWidth: number | undefined;
16
14
  };
17
- 'data-hover-highlight': "" | undefined;
18
15
  };
19
16
  setHeaderTableElement: React.Dispatch<React.SetStateAction<HTMLTableElement | null>>;
20
- colWidths: (number | undefined)[];
17
+ colWidths: number[];
21
18
  };
@@ -4,6 +4,7 @@ export declare const useColumns: ({ columns }: {
4
4
  }) => {
5
5
  flattedColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
6
6
  mergedColumns: FlattedTableColumnItemData[];
7
- groupedColumns: any;
7
+ groupedColumns: FlattedTableColumnItemData[][];
8
+ leafColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
8
9
  flattedColumnsWithoutChildren: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
9
10
  };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FlattedTableRowData } from '../types';
3
+ export declare const useTableDrag: ({ cacheData, setCacheData, draggable, flattedData, onDropEnd, onDrop: onDropProp, }: {
4
+ cacheData: any;
5
+ setCacheData: any;
6
+ draggable: boolean;
7
+ flattedData: FlattedTableRowData[];
8
+ onDropEnd: any;
9
+ onDrop: any;
10
+ }) => {
11
+ onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
12
+ dragRowRef: React.MutableRefObject<any>;
13
+ };