@kdcloudjs/table 1.2.1-canary.6 → 1.2.1-canary.7

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 (573) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/@kdcloudjs/table.css +1 -1
  4. package/dist/@kdcloudjs/table.css.map +0 -0
  5. package/dist/@kdcloudjs/table.js +4588 -5991
  6. package/dist/@kdcloudjs/table.js.map +1 -1
  7. package/dist/@kdcloudjs/table.min.css +1 -1
  8. package/dist/@kdcloudjs/table.min.js +16 -24
  9. package/dist/@kdcloudjs/table.min.js.map +1 -1
  10. package/dist/default-theme.js +0 -0
  11. package/dist/kd-ui-complete.less +0 -0
  12. package/dist/kd-ui.less +0 -0
  13. package/dist/theme.js +0 -0
  14. package/es/_utils/arrayUtil.d.ts +0 -0
  15. package/es/_utils/arrayUtil.js +0 -3
  16. package/es/_utils/devwarning.d.ts +0 -0
  17. package/es/_utils/devwarning.js +0 -1
  18. package/es/_utils/formatUtil.d.ts +0 -0
  19. package/es/_utils/formatUtil.js +36 -101
  20. package/es/_utils/hooks.d.ts +0 -0
  21. package/es/_utils/hooks.js +21 -45
  22. package/es/_utils/index.d.ts +0 -0
  23. package/es/_utils/index.js +0 -2
  24. package/es/_utils/numberUtil.d.ts +0 -0
  25. package/es/_utils/numberUtil.js +32 -55
  26. package/es/_utils/omit.d.ts +0 -0
  27. package/es/_utils/omit.js +0 -2
  28. package/es/_utils/react-children.d.ts +0 -0
  29. package/es/_utils/react-children.js +0 -0
  30. package/es/_utils/type.d.ts +0 -0
  31. package/es/_utils/type.js +0 -2
  32. package/es/_utils/usePopper.d.ts +0 -0
  33. package/es/_utils/usePopper.js +81 -144
  34. package/es/config-provider/ConfigContext.d.ts +0 -0
  35. package/es/config-provider/ConfigContext.js +0 -0
  36. package/es/config-provider/compDefaultProps.d.ts +0 -0
  37. package/es/config-provider/compDefaultProps.js +0 -1
  38. package/es/config-provider/configProvider.d.ts +0 -0
  39. package/es/config-provider/configProvider.js +2 -7
  40. package/es/config-provider/defaultConfig.d.ts +0 -0
  41. package/es/config-provider/defaultConfig.js +0 -1
  42. package/es/config-provider/index.d.ts +0 -0
  43. package/es/config-provider/index.js +0 -0
  44. package/es/index.d.ts +0 -0
  45. package/es/index.js +0 -2
  46. package/es/locale/index.d.ts +0 -0
  47. package/es/locale/index.js +0 -0
  48. package/es/locale/locale.d.ts +0 -0
  49. package/es/locale/locale.js +9 -48
  50. package/es/locale/zh-CN.d.ts +0 -0
  51. package/es/locale/zh-CN.js +0 -0
  52. package/es/style/color/colors.less +0 -0
  53. package/es/style/core/index.less +0 -0
  54. package/es/style/core/motion/other.less +0 -0
  55. package/es/style/core/motion/slide.less +0 -0
  56. package/es/style/core/motion.less +0 -0
  57. package/es/style/core/reset.less +0 -0
  58. package/es/style/css.js +0 -0
  59. package/es/style/index.css +0 -0
  60. package/es/style/index.d.ts +0 -0
  61. package/es/style/index.js +0 -0
  62. package/es/style/index.less +0 -0
  63. package/es/style/mixins/index.less +0 -0
  64. package/es/style/mixins/overlay.less +0 -0
  65. package/es/style/mixins/reset.less +0 -0
  66. package/es/style/themes/default.less +0 -0
  67. package/es/style/themes/index.less +0 -0
  68. package/es/table/base/calculations.d.ts +0 -0
  69. package/es/table/base/calculations.js +25 -75
  70. package/es/table/base/colgroup.d.ts +0 -0
  71. package/es/table/base/colgroup.js +0 -1
  72. package/es/table/base/empty.d.ts +0 -0
  73. package/es/table/base/empty.js +6 -6
  74. package/es/table/base/header.d.ts +0 -0
  75. package/es/table/base/header.js +21 -76
  76. package/es/table/base/helpers/SpanManager.d.ts +0 -0
  77. package/es/table/base/helpers/SpanManager.js +4 -11
  78. package/es/table/base/helpers/TableDOMUtils.d.ts +0 -0
  79. package/es/table/base/helpers/TableDOMUtils.js +9 -34
  80. package/es/table/base/helpers/__test__/SpanManager.test.d.ts +0 -0
  81. package/es/table/base/helpers/__test__/SpanManager.test.js +2 -2
  82. package/es/table/base/helpers/__test__/TableDOMUtils.test.d.ts +0 -0
  83. package/es/table/base/helpers/__test__/TableDOMUtils.test.js +0 -1
  84. package/es/table/base/helpers/__test__/rowHeightManager.test.d.ts +0 -0
  85. package/es/table/base/helpers/__test__/rowHeightManager.test.js +0 -0
  86. package/es/table/base/helpers/getRichVisibleRectsStream.d.ts +0 -0
  87. package/es/table/base/helpers/getRichVisibleRectsStream.js +13 -45
  88. package/es/table/base/helpers/rowHeightManager.d.ts +0 -0
  89. package/es/table/base/helpers/rowHeightManager.js +0 -28
  90. package/es/table/base/html-table.d.ts +0 -0
  91. package/es/table/base/html-table.js +17 -39
  92. package/es/table/base/index.d.ts +0 -0
  93. package/es/table/base/index.js +0 -0
  94. package/es/table/base/interfaces.d.ts +0 -0
  95. package/es/table/base/interfaces.js +0 -0
  96. package/es/table/base/loading.d.ts +0 -0
  97. package/es/table/base/loading.js +8 -10
  98. package/es/table/base/renderTemplates.d.ts +0 -0
  99. package/es/table/base/renderTemplates.js +41 -59
  100. package/es/table/base/styles.d.ts +0 -0
  101. package/es/table/base/styles.js +0 -9
  102. package/es/table/base/table.d.ts +0 -0
  103. package/es/table/base/table.js +110 -199
  104. package/es/table/base/utils.d.ts +0 -0
  105. package/es/table/base/utils.js +17 -57
  106. package/es/table/common-views.d.ts +0 -0
  107. package/es/table/common-views.js +0 -7
  108. package/es/table/index.d.ts +0 -0
  109. package/es/table/index.js +0 -0
  110. package/es/table/interfaces.d.ts +0 -0
  111. package/es/table/interfaces.js +0 -0
  112. package/es/table/internals.d.ts +0 -0
  113. package/es/table/internals.js +0 -13
  114. package/es/table/pipeline/features/autoFill.d.ts +0 -0
  115. package/es/table/pipeline/features/autoFill.js +11 -40
  116. package/es/table/pipeline/features/autoRowSpan.d.ts +0 -0
  117. package/es/table/pipeline/features/autoRowSpan.js +1 -14
  118. package/es/table/pipeline/features/buildTree.d.ts +0 -0
  119. package/es/table/pipeline/features/buildTree.js +0 -0
  120. package/es/table/pipeline/features/colGroupExtendable.d.ts +0 -0
  121. package/es/table/pipeline/features/colGroupExtendable.js +4 -19
  122. package/es/table/pipeline/features/columnDrag.d.ts +0 -0
  123. package/es/table/pipeline/features/columnDrag.js +41 -97
  124. package/es/table/pipeline/features/columnFilter.d.ts +0 -0
  125. package/es/table/pipeline/features/columnFilter.js +12 -51
  126. package/es/table/pipeline/features/columnHover.d.ts +0 -0
  127. package/es/table/pipeline/features/columnHover.js +1 -7
  128. package/es/table/pipeline/features/columnRangeHover.d.ts +0 -0
  129. package/es/table/pipeline/features/columnRangeHover.js +1 -8
  130. package/es/table/pipeline/features/columnResizeWidth.d.ts +0 -0
  131. package/es/table/pipeline/features/columnResizeWidth.js +13 -39
  132. package/es/table/pipeline/features/contextMenu.d.ts +0 -0
  133. package/es/table/pipeline/features/contextMenu.js +22 -95
  134. package/es/table/pipeline/features/filter/DefaultFilterContent.d.ts +0 -0
  135. package/es/table/pipeline/features/filter/DefaultFilterContent.js +14 -30
  136. package/es/table/pipeline/features/filter/DefaultFilterIcon.d.ts +0 -0
  137. package/es/table/pipeline/features/filter/DefaultFilterIcon.js +1 -1
  138. package/es/table/pipeline/features/filter/Filter.d.ts +0 -0
  139. package/es/table/pipeline/features/filter/Filter.js +26 -50
  140. package/es/table/pipeline/features/filter/FilterPanel.d.ts +0 -0
  141. package/es/table/pipeline/features/filter/FilterPanel.js +11 -25
  142. package/es/table/pipeline/features/filter/index.d.ts +0 -0
  143. package/es/table/pipeline/features/filter/index.js +0 -0
  144. package/es/table/pipeline/features/filter/util.d.ts +0 -0
  145. package/es/table/pipeline/features/filter/util.js +0 -4
  146. package/es/table/pipeline/features/footerDataSource.d.ts +0 -0
  147. package/es/table/pipeline/features/footerDataSource.js +0 -3
  148. package/es/table/pipeline/features/index.d.ts +0 -0
  149. package/es/table/pipeline/features/index.js +0 -0
  150. package/es/table/pipeline/features/mergeCellHover.d.ts +0 -0
  151. package/es/table/pipeline/features/mergeCellHover.js +0 -1
  152. package/es/table/pipeline/features/multiSelect.d.ts +0 -0
  153. package/es/table/pipeline/features/multiSelect.js +15 -57
  154. package/es/table/pipeline/features/rangeSelection.d.ts +0 -0
  155. package/es/table/pipeline/features/rangeSelection.js +73 -152
  156. package/es/table/pipeline/features/rowDetail.d.ts +0 -0
  157. package/es/table/pipeline/features/rowDetail.js +4 -43
  158. package/es/table/pipeline/features/rowDrag.d.ts +0 -0
  159. package/es/table/pipeline/features/rowDrag.js +39 -78
  160. package/es/table/pipeline/features/rowGrouping.d.ts +0 -0
  161. package/es/table/pipeline/features/rowGrouping.js +4 -37
  162. package/es/table/pipeline/features/singleSelect.d.ts +0 -0
  163. package/es/table/pipeline/features/singleSelect.js +0 -24
  164. package/es/table/pipeline/features/sort.d.ts +0 -0
  165. package/es/table/pipeline/features/sort.js +38 -96
  166. package/es/table/pipeline/features/tips.d.ts +0 -0
  167. package/es/table/pipeline/features/tips.js +4 -10
  168. package/es/table/pipeline/features/treeMode.d.ts +0 -0
  169. package/es/table/pipeline/features/treeMode.js +14 -49
  170. package/es/table/pipeline/features/treeSelect.d.ts +0 -0
  171. package/es/table/pipeline/features/treeSelect.js +2 -28
  172. package/es/table/pipeline/index.d.ts +0 -0
  173. package/es/table/pipeline/index.js +0 -0
  174. package/es/table/pipeline/pipeline.d.ts +0 -0
  175. package/es/table/pipeline/pipeline.js +12 -53
  176. package/es/table/pivot/cross-table/buildCrossTable.d.ts +0 -0
  177. package/es/table/pivot/cross-table/buildCrossTable.js +21 -72
  178. package/es/table/pivot/cross-table/constants.d.ts +0 -0
  179. package/es/table/pivot/cross-table/constants.js +0 -0
  180. package/es/table/pivot/cross-table/cross-table.d.ts +0 -0
  181. package/es/table/pivot/cross-table/cross-table.js +23 -31
  182. package/es/table/pivot/cross-table/index.d.ts +0 -0
  183. package/es/table/pivot/cross-table/index.js +0 -0
  184. package/es/table/pivot/cross-table/interfaces.d.ts +0 -0
  185. package/es/table/pivot/cross-table/interfaces.js +0 -0
  186. package/es/table/pivot/cross-table/internals.d.ts +0 -0
  187. package/es/table/pivot/cross-table/internals.js +0 -0
  188. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +0 -0
  189. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +22 -57
  190. package/es/table/pivot/cross-tree-table/cross-tree-table.d.ts +0 -0
  191. package/es/table/pivot/cross-tree-table/cross-tree-table.js +36 -61
  192. package/es/table/pivot/cross-tree-table/index.d.ts +0 -0
  193. package/es/table/pivot/cross-tree-table/index.js +0 -0
  194. package/es/table/pivot/pivot-utils/buildDrillTree.d.ts +0 -0
  195. package/es/table/pivot/pivot-utils/buildDrillTree.js +10 -23
  196. package/es/table/pivot/pivot-utils/builders.d.ts +0 -0
  197. package/es/table/pivot/pivot-utils/builders.js +34 -74
  198. package/es/table/pivot/pivot-utils/convert-utils.d.ts +0 -0
  199. package/es/table/pivot/pivot-utils/convert-utils.js +16 -42
  200. package/es/table/pivot/pivot-utils/index.d.ts +0 -0
  201. package/es/table/pivot/pivot-utils/index.js +0 -0
  202. package/es/table/pivot/pivot-utils/interfaces.d.ts +0 -0
  203. package/es/table/pivot/pivot-utils/interfaces.js +0 -0
  204. package/es/table/pivot/pivot-utils/simpleEncode.d.ts +0 -0
  205. package/es/table/pivot/pivot-utils/simpleEncode.js +0 -1
  206. package/es/table/style/css.js +0 -0
  207. package/es/table/style/index.css +0 -0
  208. package/es/table/style/index.d.ts +0 -0
  209. package/es/table/style/index.js +0 -0
  210. package/es/table/style/index.less +0 -0
  211. package/es/table/transforms/autoRowSpan.d.ts +0 -0
  212. package/es/table/transforms/autoRowSpan.js +1 -15
  213. package/es/table/transforms/autoWidth.d.ts +0 -0
  214. package/es/table/transforms/autoWidth.js +13 -35
  215. package/es/table/transforms/buildTree.d.ts +0 -0
  216. package/es/table/transforms/buildTree.js +1 -2
  217. package/es/table/transforms/columnHover.d.ts +0 -0
  218. package/es/table/transforms/columnHover.js +9 -15
  219. package/es/table/transforms/columnRangeHover.d.ts +0 -0
  220. package/es/table/transforms/columnRangeHover.js +12 -19
  221. package/es/table/transforms/columnResize.d.ts +0 -0
  222. package/es/table/transforms/columnResize.js +18 -42
  223. package/es/table/transforms/flatten.d.ts +0 -0
  224. package/es/table/transforms/flatten.js +0 -3
  225. package/es/table/transforms/index.d.ts +0 -0
  226. package/es/table/transforms/index.js +0 -0
  227. package/es/table/transforms/orderField.d.ts +0 -0
  228. package/es/table/transforms/orderField.js +0 -3
  229. package/es/table/transforms/sort.d.ts +0 -0
  230. package/es/table/transforms/sort.js +42 -101
  231. package/es/table/transforms/tips.d.ts +0 -0
  232. package/es/table/transforms/tips.js +5 -10
  233. package/es/table/transforms/treeMode.d.ts +0 -0
  234. package/es/table/transforms/treeMode.js +36 -77
  235. package/es/table/transforms/visible.d.ts +0 -0
  236. package/es/table/transforms/visible.js +0 -2
  237. package/es/table/transforms/warnTransformsDeprecated.d.ts +0 -0
  238. package/es/table/transforms/warnTransformsDeprecated.js +0 -0
  239. package/es/table/use/useResizeObserver.d.ts +0 -0
  240. package/es/table/use/useResizeObserver.js +1 -4
  241. package/es/table/utils/applyTransforms.d.ts +0 -0
  242. package/es/table/utils/applyTransforms.js +0 -1
  243. package/es/table/utils/browserType.d.ts +0 -0
  244. package/es/table/utils/browserType.js +12 -19
  245. package/es/table/utils/buildTree.d.ts +0 -0
  246. package/es/table/utils/buildTree.js +7 -22
  247. package/es/table/utils/collectNodes.d.ts +0 -0
  248. package/es/table/utils/collectNodes.js +4 -13
  249. package/es/table/utils/console.d.ts +0 -0
  250. package/es/table/utils/console.js +0 -14
  251. package/es/table/utils/copyToClipboard.d.ts +0 -0
  252. package/es/table/utils/copyToClipboard.js +0 -4
  253. package/es/table/utils/element.d.ts +0 -0
  254. package/es/table/utils/element.js +14 -41
  255. package/es/table/utils/exportTableAsExcel.d.ts +0 -0
  256. package/es/table/utils/exportTableAsExcel.js +7 -43
  257. package/es/table/utils/getTreeDepth.d.ts +0 -0
  258. package/es/table/utils/getTreeDepth.js +4 -12
  259. package/es/table/utils/groupBy.d.ts +0 -0
  260. package/es/table/utils/groupBy.js +4 -13
  261. package/es/table/utils/index.d.ts +0 -0
  262. package/es/table/utils/index.js +0 -0
  263. package/es/table/utils/isGroupColumn.d.ts +0 -0
  264. package/es/table/utils/isGroupColumn.js +0 -0
  265. package/es/table/utils/isLeafNode.d.ts +0 -0
  266. package/es/table/utils/isLeafNode.js +0 -0
  267. package/es/table/utils/keyCode.d.ts +0 -0
  268. package/es/table/utils/keyCode.js +0 -0
  269. package/es/table/utils/layeredFilter.d.ts +0 -0
  270. package/es/table/utils/layeredFilter.js +0 -4
  271. package/es/table/utils/layeredSort.d.ts +0 -0
  272. package/es/table/utils/layeredSort.js +0 -5
  273. package/es/table/utils/makeRecursiveMapper.d.ts +0 -0
  274. package/es/table/utils/makeRecursiveMapper.js +4 -15
  275. package/es/table/utils/mergeCellProps.d.ts +0 -0
  276. package/es/table/utils/mergeCellProps.js +6 -14
  277. package/es/table/utils/others.d.ts +0 -0
  278. package/es/table/utils/others.js +6 -19
  279. package/es/table/utils/proto.d.ts +0 -0
  280. package/es/table/utils/proto.js +2 -30
  281. package/es/table/utils/selectColumn.d.ts +0 -0
  282. package/es/table/utils/selectColumn.js +0 -0
  283. package/es/table/utils/smartCompare.d.ts +0 -0
  284. package/es/table/utils/smartCompare.js +4 -12
  285. package/es/table/utils/traverseColumn.d.ts +0 -0
  286. package/es/table/utils/traverseColumn.js +5 -18
  287. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +0 -0
  288. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +8 -30
  289. package/es/table/utils/tree-data-helpers/TreeDataHelper.d.ts +0 -0
  290. package/es/table/utils/tree-data-helpers/TreeDataHelper.js +19 -74
  291. package/es/table/utils/uiDegrade.d.ts +0 -0
  292. package/es/table/utils/uiDegrade.js +0 -5
  293. package/lib/_utils/arrayUtil.d.ts +0 -0
  294. package/lib/_utils/arrayUtil.js +2 -8
  295. package/lib/_utils/devwarning.d.ts +0 -0
  296. package/lib/_utils/devwarning.js +0 -5
  297. package/lib/_utils/formatUtil.d.ts +0 -0
  298. package/lib/_utils/formatUtil.js +36 -105
  299. package/lib/_utils/hooks.d.ts +0 -0
  300. package/lib/_utils/hooks.js +21 -56
  301. package/lib/_utils/index.d.ts +0 -0
  302. package/lib/_utils/index.js +2 -9
  303. package/lib/_utils/numberUtil.d.ts +0 -0
  304. package/lib/_utils/numberUtil.js +32 -63
  305. package/lib/_utils/omit.d.ts +0 -0
  306. package/lib/_utils/omit.js +0 -5
  307. package/lib/_utils/react-children.d.ts +0 -0
  308. package/lib/_utils/react-children.js +0 -5
  309. package/lib/_utils/type.d.ts +0 -0
  310. package/lib/_utils/type.js +3 -11
  311. package/lib/_utils/usePopper.d.ts +0 -0
  312. package/lib/_utils/usePopper.js +86 -173
  313. package/lib/config-provider/ConfigContext.d.ts +0 -0
  314. package/lib/config-provider/ConfigContext.js +2 -6
  315. package/lib/config-provider/compDefaultProps.d.ts +0 -0
  316. package/lib/config-provider/compDefaultProps.js +1 -3
  317. package/lib/config-provider/configProvider.d.ts +0 -0
  318. package/lib/config-provider/configProvider.js +6 -22
  319. package/lib/config-provider/defaultConfig.d.ts +0 -0
  320. package/lib/config-provider/defaultConfig.js +1 -7
  321. package/lib/config-provider/index.d.ts +0 -0
  322. package/lib/config-provider/index.js +1 -8
  323. package/lib/index.d.ts +0 -0
  324. package/lib/index.js +2 -8
  325. package/lib/locale/index.d.ts +0 -0
  326. package/lib/locale/index.js +3 -11
  327. package/lib/locale/locale.d.ts +0 -0
  328. package/lib/locale/locale.js +13 -69
  329. package/lib/locale/zh-CN.d.ts +0 -0
  330. package/lib/locale/zh-CN.js +1 -2
  331. package/lib/style/color/colors.less +0 -0
  332. package/lib/style/components.less +0 -0
  333. package/lib/style/core/index.less +0 -0
  334. package/lib/style/core/motion/other.less +0 -0
  335. package/lib/style/core/motion/slide.less +0 -0
  336. package/lib/style/core/motion.less +0 -0
  337. package/lib/style/core/reset.less +0 -0
  338. package/lib/style/css.js +0 -0
  339. package/lib/style/index.css +0 -0
  340. package/lib/style/index.d.ts +0 -0
  341. package/lib/style/index.js +0 -0
  342. package/lib/style/index.less +0 -0
  343. package/lib/style/mixins/index.less +0 -0
  344. package/lib/style/mixins/overlay.less +0 -0
  345. package/lib/style/mixins/reset.less +0 -0
  346. package/lib/style/themes/default.less +0 -0
  347. package/lib/style/themes/index.less +0 -0
  348. package/lib/table/base/calculations.d.ts +0 -0
  349. package/lib/table/base/calculations.js +25 -86
  350. package/lib/table/base/colgroup.d.ts +0 -0
  351. package/lib/table/base/colgroup.js +0 -5
  352. package/lib/table/base/empty.d.ts +0 -0
  353. package/lib/table/base/empty.js +8 -20
  354. package/lib/table/base/header.d.ts +0 -0
  355. package/lib/table/base/header.js +21 -86
  356. package/lib/table/base/helpers/SpanManager.d.ts +0 -0
  357. package/lib/table/base/helpers/SpanManager.js +6 -16
  358. package/lib/table/base/helpers/TableDOMUtils.d.ts +0 -0
  359. package/lib/table/base/helpers/TableDOMUtils.js +9 -37
  360. package/lib/table/base/helpers/__test__/SpanManager.test.d.ts +0 -0
  361. package/lib/table/base/helpers/__test__/SpanManager.test.js +2 -4
  362. package/lib/table/base/helpers/__test__/TableDOMUtils.test.d.ts +0 -0
  363. package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +0 -5
  364. package/lib/table/base/helpers/__test__/rowHeightManager.test.d.ts +0 -0
  365. package/lib/table/base/helpers/__test__/rowHeightManager.test.js +0 -1
  366. package/lib/table/base/helpers/getRichVisibleRectsStream.d.ts +0 -0
  367. package/lib/table/base/helpers/getRichVisibleRectsStream.js +15 -65
  368. package/lib/table/base/helpers/rowHeightManager.d.ts +0 -0
  369. package/lib/table/base/helpers/rowHeightManager.js +0 -33
  370. package/lib/table/base/html-table.d.ts +0 -0
  371. package/lib/table/base/html-table.js +17 -49
  372. package/lib/table/base/index.d.ts +0 -0
  373. package/lib/table/base/index.js +0 -2
  374. package/lib/table/base/interfaces.d.ts +0 -0
  375. package/lib/table/base/interfaces.js +0 -0
  376. package/lib/table/base/loading.d.ts +0 -0
  377. package/lib/table/base/loading.js +8 -14
  378. package/lib/table/base/renderTemplates.d.ts +0 -0
  379. package/lib/table/base/renderTemplates.js +44 -75
  380. package/lib/table/base/styles.d.ts +0 -0
  381. package/lib/table/base/styles.js +9 -37
  382. package/lib/table/base/table.d.ts +0 -0
  383. package/lib/table/base/table.js +122 -243
  384. package/lib/table/base/utils.d.ts +0 -0
  385. package/lib/table/base/utils.js +27 -109
  386. package/lib/table/common-views.d.ts +0 -0
  387. package/lib/table/common-views.js +4 -24
  388. package/lib/table/index.d.ts +0 -0
  389. package/lib/table/index.js +0 -13
  390. package/lib/table/interfaces.d.ts +0 -0
  391. package/lib/table/interfaces.js +0 -0
  392. package/lib/table/internals.d.ts +0 -0
  393. package/lib/table/internals.js +2 -17
  394. package/lib/table/pipeline/features/autoFill.d.ts +0 -0
  395. package/lib/table/pipeline/features/autoFill.js +14 -53
  396. package/lib/table/pipeline/features/autoRowSpan.d.ts +0 -0
  397. package/lib/table/pipeline/features/autoRowSpan.js +1 -19
  398. package/lib/table/pipeline/features/buildTree.d.ts +0 -0
  399. package/lib/table/pipeline/features/buildTree.js +0 -2
  400. package/lib/table/pipeline/features/colGroupExtendable.d.ts +0 -0
  401. package/lib/table/pipeline/features/colGroupExtendable.js +6 -35
  402. package/lib/table/pipeline/features/columnDrag.d.ts +0 -0
  403. package/lib/table/pipeline/features/columnDrag.js +41 -103
  404. package/lib/table/pipeline/features/columnFilter.d.ts +0 -0
  405. package/lib/table/pipeline/features/columnFilter.js +12 -65
  406. package/lib/table/pipeline/features/columnHover.d.ts +0 -0
  407. package/lib/table/pipeline/features/columnHover.js +1 -11
  408. package/lib/table/pipeline/features/columnRangeHover.d.ts +0 -0
  409. package/lib/table/pipeline/features/columnRangeHover.js +1 -13
  410. package/lib/table/pipeline/features/columnResizeWidth.d.ts +0 -0
  411. package/lib/table/pipeline/features/columnResizeWidth.js +18 -63
  412. package/lib/table/pipeline/features/contextMenu.d.ts +0 -0
  413. package/lib/table/pipeline/features/contextMenu.js +24 -121
  414. package/lib/table/pipeline/features/filter/DefaultFilterContent.d.ts +0 -0
  415. package/lib/table/pipeline/features/filter/DefaultFilterContent.js +17 -52
  416. package/lib/table/pipeline/features/filter/DefaultFilterIcon.d.ts +0 -0
  417. package/lib/table/pipeline/features/filter/DefaultFilterIcon.js +1 -4
  418. package/lib/table/pipeline/features/filter/Filter.d.ts +0 -0
  419. package/lib/table/pipeline/features/filter/Filter.js +29 -76
  420. package/lib/table/pipeline/features/filter/FilterPanel.d.ts +0 -0
  421. package/lib/table/pipeline/features/filter/FilterPanel.js +14 -44
  422. package/lib/table/pipeline/features/filter/index.d.ts +0 -0
  423. package/lib/table/pipeline/features/filter/index.js +0 -5
  424. package/lib/table/pipeline/features/filter/util.d.ts +0 -0
  425. package/lib/table/pipeline/features/filter/util.js +2 -10
  426. package/lib/table/pipeline/features/footerDataSource.d.ts +0 -0
  427. package/lib/table/pipeline/features/footerDataSource.js +1 -12
  428. package/lib/table/pipeline/features/index.d.ts +0 -0
  429. package/lib/table/pipeline/features/index.js +0 -23
  430. package/lib/table/pipeline/features/mergeCellHover.d.ts +0 -0
  431. package/lib/table/pipeline/features/mergeCellHover.js +0 -5
  432. package/lib/table/pipeline/features/multiSelect.d.ts +0 -0
  433. package/lib/table/pipeline/features/multiSelect.js +15 -71
  434. package/lib/table/pipeline/features/rangeSelection.d.ts +0 -0
  435. package/lib/table/pipeline/features/rangeSelection.js +75 -173
  436. package/lib/table/pipeline/features/rowDetail.d.ts +0 -0
  437. package/lib/table/pipeline/features/rowDetail.js +4 -67
  438. package/lib/table/pipeline/features/rowDrag.d.ts +0 -0
  439. package/lib/table/pipeline/features/rowDrag.js +41 -93
  440. package/lib/table/pipeline/features/rowGrouping.d.ts +0 -0
  441. package/lib/table/pipeline/features/rowGrouping.js +4 -57
  442. package/lib/table/pipeline/features/singleSelect.d.ts +0 -0
  443. package/lib/table/pipeline/features/singleSelect.js +0 -34
  444. package/lib/table/pipeline/features/sort.d.ts +0 -0
  445. package/lib/table/pipeline/features/sort.js +37 -115
  446. package/lib/table/pipeline/features/tips.d.ts +0 -0
  447. package/lib/table/pipeline/features/tips.js +4 -19
  448. package/lib/table/pipeline/features/treeMode.d.ts +0 -0
  449. package/lib/table/pipeline/features/treeMode.js +15 -72
  450. package/lib/table/pipeline/features/treeSelect.d.ts +0 -0
  451. package/lib/table/pipeline/features/treeSelect.js +2 -36
  452. package/lib/table/pipeline/index.d.ts +0 -0
  453. package/lib/table/pipeline/index.js +2 -10
  454. package/lib/table/pipeline/pipeline.d.ts +0 -0
  455. package/lib/table/pipeline/pipeline.js +13 -64
  456. package/lib/table/pivot/cross-table/buildCrossTable.d.ts +0 -0
  457. package/lib/table/pivot/cross-table/buildCrossTable.js +21 -83
  458. package/lib/table/pivot/cross-table/constants.d.ts +0 -0
  459. package/lib/table/pivot/cross-table/constants.js +1 -2
  460. package/lib/table/pivot/cross-table/cross-table.d.ts +0 -0
  461. package/lib/table/pivot/cross-table/cross-table.js +25 -42
  462. package/lib/table/pivot/cross-table/index.d.ts +0 -0
  463. package/lib/table/pivot/cross-table/index.js +0 -4
  464. package/lib/table/pivot/cross-table/interfaces.d.ts +0 -0
  465. package/lib/table/pivot/cross-table/interfaces.js +0 -0
  466. package/lib/table/pivot/cross-table/internals.d.ts +0 -0
  467. package/lib/table/pivot/cross-table/internals.js +0 -0
  468. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +0 -0
  469. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +22 -70
  470. package/lib/table/pivot/cross-tree-table/cross-tree-table.d.ts +0 -0
  471. package/lib/table/pivot/cross-tree-table/cross-tree-table.js +37 -73
  472. package/lib/table/pivot/cross-tree-table/index.d.ts +0 -0
  473. package/lib/table/pivot/cross-tree-table/index.js +0 -3
  474. package/lib/table/pivot/pivot-utils/buildDrillTree.d.ts +0 -0
  475. package/lib/table/pivot/pivot-utils/buildDrillTree.js +10 -29
  476. package/lib/table/pivot/pivot-utils/builders.d.ts +0 -0
  477. package/lib/table/pivot/pivot-utils/builders.js +34 -85
  478. package/lib/table/pivot/pivot-utils/convert-utils.d.ts +0 -0
  479. package/lib/table/pivot/pivot-utils/convert-utils.js +16 -60
  480. package/lib/table/pivot/pivot-utils/index.d.ts +0 -0
  481. package/lib/table/pivot/pivot-utils/index.js +0 -7
  482. package/lib/table/pivot/pivot-utils/interfaces.d.ts +0 -0
  483. package/lib/table/pivot/pivot-utils/interfaces.js +0 -0
  484. package/lib/table/pivot/pivot-utils/simpleEncode.d.ts +0 -0
  485. package/lib/table/pivot/pivot-utils/simpleEncode.js +0 -2
  486. package/lib/table/style/css.js +0 -1
  487. package/lib/table/style/index.css +0 -0
  488. package/lib/table/style/index.d.ts +0 -0
  489. package/lib/table/style/index.js +0 -1
  490. package/lib/table/style/index.less +0 -0
  491. package/lib/table/transforms/autoRowSpan.d.ts +0 -0
  492. package/lib/table/transforms/autoRowSpan.js +1 -21
  493. package/lib/table/transforms/autoWidth.d.ts +0 -0
  494. package/lib/table/transforms/autoWidth.js +15 -58
  495. package/lib/table/transforms/buildTree.d.ts +0 -0
  496. package/lib/table/transforms/buildTree.js +1 -4
  497. package/lib/table/transforms/columnHover.d.ts +0 -0
  498. package/lib/table/transforms/columnHover.js +9 -22
  499. package/lib/table/transforms/columnRangeHover.d.ts +0 -0
  500. package/lib/table/transforms/columnRangeHover.js +12 -27
  501. package/lib/table/transforms/columnResize.d.ts +0 -0
  502. package/lib/table/transforms/columnResize.js +20 -63
  503. package/lib/table/transforms/flatten.d.ts +0 -0
  504. package/lib/table/transforms/flatten.js +0 -5
  505. package/lib/table/transforms/index.d.ts +0 -0
  506. package/lib/table/transforms/index.js +0 -12
  507. package/lib/table/transforms/orderField.d.ts +0 -0
  508. package/lib/table/transforms/orderField.js +0 -7
  509. package/lib/table/transforms/sort.d.ts +0 -0
  510. package/lib/table/transforms/sort.js +44 -127
  511. package/lib/table/transforms/tips.d.ts +0 -0
  512. package/lib/table/transforms/tips.js +5 -20
  513. package/lib/table/transforms/treeMode.d.ts +0 -0
  514. package/lib/table/transforms/treeMode.js +38 -106
  515. package/lib/table/transforms/visible.d.ts +0 -0
  516. package/lib/table/transforms/visible.js +0 -7
  517. package/lib/table/transforms/warnTransformsDeprecated.d.ts +0 -0
  518. package/lib/table/transforms/warnTransformsDeprecated.js +0 -4
  519. package/lib/table/use/useResizeObserver.d.ts +0 -0
  520. package/lib/table/use/useResizeObserver.js +2 -10
  521. package/lib/table/utils/applyTransforms.d.ts +0 -0
  522. package/lib/table/utils/applyTransforms.js +0 -2
  523. package/lib/table/utils/browserType.d.ts +0 -0
  524. package/lib/table/utils/browserType.js +14 -23
  525. package/lib/table/utils/buildTree.d.ts +0 -0
  526. package/lib/table/utils/buildTree.js +7 -33
  527. package/lib/table/utils/collectNodes.d.ts +0 -0
  528. package/lib/table/utils/collectNodes.js +4 -18
  529. package/lib/table/utils/console.d.ts +0 -0
  530. package/lib/table/utils/console.js +2 -19
  531. package/lib/table/utils/copyToClipboard.d.ts +0 -0
  532. package/lib/table/utils/copyToClipboard.js +1 -8
  533. package/lib/table/utils/element.d.ts +0 -0
  534. package/lib/table/utils/element.js +14 -46
  535. package/lib/table/utils/exportTableAsExcel.d.ts +0 -0
  536. package/lib/table/utils/exportTableAsExcel.js +7 -52
  537. package/lib/table/utils/getTreeDepth.d.ts +0 -0
  538. package/lib/table/utils/getTreeDepth.js +4 -17
  539. package/lib/table/utils/groupBy.d.ts +0 -0
  540. package/lib/table/utils/groupBy.js +4 -17
  541. package/lib/table/utils/index.d.ts +0 -0
  542. package/lib/table/utils/index.js +0 -22
  543. package/lib/table/utils/isGroupColumn.d.ts +0 -0
  544. package/lib/table/utils/isGroupColumn.js +0 -3
  545. package/lib/table/utils/isLeafNode.d.ts +0 -0
  546. package/lib/table/utils/isLeafNode.js +0 -1
  547. package/lib/table/utils/keyCode.d.ts +0 -0
  548. package/lib/table/utils/keyCode.js +1 -2
  549. package/lib/table/utils/layeredFilter.d.ts +0 -0
  550. package/lib/table/utils/layeredFilter.js +0 -10
  551. package/lib/table/utils/layeredSort.d.ts +0 -0
  552. package/lib/table/utils/layeredSort.js +0 -10
  553. package/lib/table/utils/makeRecursiveMapper.d.ts +0 -0
  554. package/lib/table/utils/makeRecursiveMapper.js +4 -24
  555. package/lib/table/utils/mergeCellProps.d.ts +0 -0
  556. package/lib/table/utils/mergeCellProps.js +6 -18
  557. package/lib/table/utils/others.d.ts +0 -0
  558. package/lib/table/utils/others.js +7 -36
  559. package/lib/table/utils/proto.d.ts +0 -0
  560. package/lib/table/utils/proto.js +3 -35
  561. package/lib/table/utils/selectColumn.d.ts +0 -0
  562. package/lib/table/utils/selectColumn.js +2 -5
  563. package/lib/table/utils/smartCompare.d.ts +0 -0
  564. package/lib/table/utils/smartCompare.js +4 -13
  565. package/lib/table/utils/traverseColumn.d.ts +0 -0
  566. package/lib/table/utils/traverseColumn.js +5 -25
  567. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +0 -0
  568. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +10 -41
  569. package/lib/table/utils/tree-data-helpers/TreeDataHelper.d.ts +0 -0
  570. package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +21 -90
  571. package/lib/table/utils/uiDegrade.d.ts +0 -0
  572. package/lib/table/utils/uiDegrade.js +1 -8
  573. package/package.json +1 -1
@@ -2,13 +2,9 @@ import _typeof from "@babel/runtime-corejs3/helpers/typeof";
2
2
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
-
6
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7
-
8
- function _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context2 = Object.prototype.toString.call(o)).call(_context2, 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); }
9
-
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
-
5
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
6
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context2; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context2 = {}.toString.call(r)).call(_context2, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
7
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
12
8
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
13
9
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
14
10
  import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
@@ -16,11 +12,9 @@ import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
16
12
  import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
17
13
  import React from 'react';
18
14
  import zhCNData from './zh-CN';
19
-
20
15
  var LocaleCache = /*#__PURE__*/function () {
21
16
  function LocaleCache(localesData, locale) {
22
17
  _classCallCheck(this, LocaleCache);
23
-
24
18
  this.locale = locale || zhCNData.locale;
25
19
  this.localesData = localesData;
26
20
  }
@@ -29,18 +23,14 @@ var LocaleCache = /*#__PURE__*/function () {
29
23
  * @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
30
24
  * @returns 设置后的语言对应的语言包
31
25
  */
32
-
33
-
34
- _createClass(LocaleCache, [{
26
+ return _createClass(LocaleCache, [{
35
27
  key: "setLocalesData",
36
28
  value: function setLocalesData(locale, localeData) {
37
29
  var newLocaleData = localeData || this.localesData[locale];
38
-
39
30
  if (!newLocaleData) {
40
31
  console.error("\u7F3A\u5C11\u8BED\u8A00".concat(locale, "\u5BF9\u5E94\u7684\u8BED\u8A00\u5305\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u8BBE\u7F6E"));
41
32
  return;
42
33
  }
43
-
44
34
  this.locale = locale;
45
35
  this.localesData[locale] = newLocaleData;
46
36
  return localeData;
@@ -48,7 +38,6 @@ var LocaleCache = /*#__PURE__*/function () {
48
38
  /**
49
39
  * 获取当前语言包数据
50
40
  */
51
-
52
41
  }, {
53
42
  key: "getLocalData",
54
43
  value: function getLocalData() {
@@ -57,7 +46,6 @@ var LocaleCache = /*#__PURE__*/function () {
57
46
  /**
58
47
  * 获取当前语言类型
59
48
  */
60
-
61
49
  }, {
62
50
  key: "getLocal",
63
51
  value: function getLocal() {
@@ -66,22 +54,17 @@ var LocaleCache = /*#__PURE__*/function () {
66
54
  /**
67
55
  * 获取所有语言包数据
68
56
  */
69
-
70
57
  }, {
71
58
  key: "getLocalesData",
72
59
  value: function getLocalesData() {
73
60
  return this.localesData;
74
61
  }
75
62
  }]);
76
-
77
- return LocaleCache;
78
63
  }();
79
-
80
64
  var localeCacher = new LocaleCache(_defineProperty({}, zhCNData.locale, zhCNData));
81
65
  export default localeCacher;
82
66
  export var getLangMsg = function getLangMsg(componentName, labelName, params) {
83
67
  var _context;
84
-
85
68
  var localData = localeCacher.getLocalData();
86
69
  var msg = localData[_concatInstanceProperty(_context = "".concat(componentName, ".")).call(_context, labelName)] || localData["global.".concat(labelName)] || '';
87
70
  return analysVariables(msg, params);
@@ -91,32 +74,25 @@ export var getLangMsg = function getLangMsg(componentName, labelName, params) {
91
74
  * @param {*} msg
92
75
  * @param {*} variables
93
76
  */
94
-
95
77
  function analysVariables(msg, variables) {
96
78
  var reg = /{[\w\W]*?}/g;
97
79
  var matchArr = msg.match(reg) || [];
98
-
99
80
  var isObject = function isObject(value) {
100
81
  return _typeof(value) === 'object' || typeof value === 'function';
101
82
  };
102
-
103
83
  var getVarName = function getVarName(str) {
104
84
  var len = str.length;
105
85
  return _sliceInstanceProperty(str).call(str, 1, len - 1);
106
86
  };
107
-
108
87
  var stringVar = [];
109
88
  var eleVar = [];
110
-
111
89
  var _iterator = _createForOfIteratorHelper(matchArr),
112
- _step;
113
-
90
+ _step;
114
91
  try {
115
92
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
116
93
  var item = _step.value;
117
94
  var varName = getVarName(item);
118
95
  var value = variables[varName];
119
-
120
96
  if (isObject(value)) {
121
97
  eleVar.push({
122
98
  k: varName,
@@ -134,14 +110,11 @@ function analysVariables(msg, variables) {
134
110
  } finally {
135
111
  _iterator.f();
136
112
  }
137
-
138
113
  msg = formatText(msg, stringVar);
139
114
  var msgArr = [];
140
-
141
115
  if (eleVar.length > 0) {
142
116
  msgArr = formatElement(msg, variables);
143
117
  }
144
-
145
118
  return eleVar.length > 0 ? msgArr : msg;
146
119
  }
147
120
  /**
@@ -149,12 +122,10 @@ function analysVariables(msg, variables) {
149
122
  * @param {*} msg
150
123
  * @param {*} stringVar
151
124
  */
152
-
153
-
154
125
  function formatText(msg, stringVar) {
155
126
  stringVar.forEach(function (item) {
156
127
  var k = item.k,
157
- v = item.v;
128
+ v = item.v;
158
129
  var reg = new RegExp('{' + k + '}', 'g');
159
130
  msg = msg.replace(reg, v);
160
131
  });
@@ -166,8 +137,6 @@ function formatText(msg, stringVar) {
166
137
  * @param {*} eleVar
167
138
  * @param {*} variables
168
139
  */
169
-
170
-
171
140
  function formatElement(msg, variables) {
172
141
  var splitByElement = function splitByElement(msg) {
173
142
  var array = [];
@@ -175,7 +144,6 @@ function formatElement(msg, variables) {
175
144
  t: 0,
176
145
  v: ''
177
146
  }; // 0-string 1-react
178
-
179
147
  var len = msg.length;
180
148
  msg.split('').forEach(function (c, i) {
181
149
  if (c === '{') {
@@ -193,20 +161,17 @@ function formatElement(msg, variables) {
193
161
  } else {
194
162
  item.v = item.v + c;
195
163
  }
196
-
197
164
  if (i === len - 1) {
198
165
  array.push(item);
199
166
  }
200
167
  });
201
168
  return array;
202
169
  };
203
-
204
170
  var elements = [];
205
171
  var eleArr = splitByElement(msg);
206
172
  eleArr.forEach(function (item, index) {
207
173
  var t = item.t,
208
- v = item.v;
209
-
174
+ v = item.v;
210
175
  if (t === 0 && v !== '') {
211
176
  elements.push( /*#__PURE__*/React.createElement("span", {
212
177
  key: index
@@ -219,25 +184,21 @@ function formatElement(msg, variables) {
219
184
  });
220
185
  return elements;
221
186
  }
222
-
223
187
  export var getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {
224
188
  var componentName = compLangMsgParams.componentName,
225
- labels = compLangMsgParams.labels,
226
- labelParams = compLangMsgParams.labelParams;
189
+ labels = compLangMsgParams.labels,
190
+ labelParams = compLangMsgParams.labelParams;
227
191
  labels = labels || [];
228
192
  labelParams = labelParams || {};
229
193
  localeDate = localeDate || zhCNData;
230
-
231
194
  if (!labels.length) {
232
195
  for (var key in localeDate) {
233
196
  var componentNameAndLabel = key.split('.');
234
-
235
197
  if (componentName === componentNameAndLabel[0] && componentNameAndLabel[1]) {
236
198
  labels.push(componentNameAndLabel[1]);
237
199
  }
238
200
  }
239
201
  }
240
-
241
202
  var componentLangMsg = {};
242
203
  labels.forEach(function (label) {
243
204
  if (customGetLangMsg && typeof customGetLangMsg === 'function') {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/es/style/css.js CHANGED
File without changes
File without changes
File without changes
package/es/style/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -10,35 +10,25 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
10
10
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
11
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
12
12
  import _Map from "@babel/runtime-corejs3/core-js-stable/map";
13
-
14
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
15
-
16
- function _unsupportedIterableToArray(o, minLen) { var _context10; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context10 = Object.prototype.toString.call(o)).call(_context10, 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); }
17
-
18
- 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; }
19
-
13
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
14
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context10; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context10 = {}.toString.call(r)).call(_context10, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20
16
  import { collectNodes, isLeafNode, console } from '../utils';
21
17
  import { AUTO_VIRTUAL_THRESHOLD, OVERSCAN_SIZE, sum } from './utils';
22
-
23
18
  function resolveVirtualEnabled(virtualEnum, defaultValue) {
24
19
  if (virtualEnum == null || virtualEnum === 'auto') {
25
20
  return defaultValue;
26
21
  }
27
-
28
22
  return virtualEnum;
29
23
  }
30
-
31
24
  var lockColumnNeedSpecifiedWidthWarned = false;
32
-
33
25
  function warnLockColumnNeedSpecifiedWidth(column) {
34
26
  if (!lockColumnNeedSpecifiedWidthWarned) {
35
27
  lockColumnNeedSpecifiedWidthWarned = true;
36
28
  console.warn('lock=true 的列需要指定宽度', column);
37
29
  }
38
30
  }
39
-
40
31
  var columnHiddenDeprecatedWarned = false;
41
-
42
32
  function warnColumnHiddenDeprecated(column) {
43
33
  if (!columnHiddenDeprecatedWarned) {
44
34
  columnHiddenDeprecatedWarned = true;
@@ -46,24 +36,18 @@ function warnColumnHiddenDeprecated(column) {
46
36
  }
47
37
  }
48
38
  /** 检查列配置 & 设置默认宽度 & 剔除隐藏的列 */
49
-
50
-
51
39
  function processColumns(columns, defaultColumnWidth) {
52
40
  if (columns == null || !Array.isArray(columns)) {
53
41
  console.warn('<BaseTable /> props.columns 需要传入一个数组', columns);
54
42
  columns = [];
55
43
  }
56
-
57
44
  function dfs(columns) {
58
45
  var result = [];
59
-
60
46
  var _iterator = _createForOfIteratorHelper(columns),
61
- _step;
62
-
47
+ _step;
63
48
  try {
64
49
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
65
50
  var column = _step.value;
66
-
67
51
  if (column.width == null) {
68
52
  if (defaultColumnWidth != null) {
69
53
  column = _extends(_extends({}, column), {
@@ -73,7 +57,6 @@ function processColumns(columns, defaultColumnWidth) {
73
57
  warnLockColumnNeedSpecifiedWidth(column);
74
58
  }
75
59
  }
76
-
77
60
  if (isLeafNode(column)) {
78
61
  if (column.hidden) {
79
62
  // 被隐藏的列 会在这里被剔除
@@ -82,8 +65,8 @@ function processColumns(columns, defaultColumnWidth) {
82
65
  result.push(column);
83
66
  }
84
67
  } else {
85
- var nextChildren = dfs(column.children); // 如果 nextChildren 为空,说明所有的子节点均被隐藏了,在这里隐藏父节点
86
-
68
+ var nextChildren = dfs(column.children);
69
+ // 如果 nextChildren 为空,说明所有的子节点均被隐藏了,在这里隐藏父节点
87
70
  if (nextChildren.length > 0) {
88
71
  result.push(_extends(_extends({}, column), {
89
72
  children: nextChildren
@@ -96,23 +79,17 @@ function processColumns(columns, defaultColumnWidth) {
96
79
  } finally {
97
80
  _iterator.f();
98
81
  }
99
-
100
82
  return result;
101
83
  }
102
-
103
84
  return dfs(columns);
104
85
  }
105
-
106
86
  export function getLeftNestedLockCount(columns) {
107
87
  var nestedCount = 0;
108
-
109
88
  var _iterator2 = _createForOfIteratorHelper(columns),
110
- _step2;
111
-
89
+ _step2;
112
90
  try {
113
91
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
114
92
  var col = _step2.value;
115
-
116
93
  if (isLock(col)) {
117
94
  nestedCount += 1;
118
95
  } else {
@@ -124,9 +101,7 @@ export function getLeftNestedLockCount(columns) {
124
101
  } finally {
125
102
  _iterator2.f();
126
103
  }
127
-
128
104
  return nestedCount;
129
-
130
105
  function isLock(col) {
131
106
  if (isLeafNode(col)) {
132
107
  return col.lock;
@@ -135,15 +110,12 @@ export function getLeftNestedLockCount(columns) {
135
110
  }
136
111
  }
137
112
  }
138
-
139
113
  function getHorizontalRenderRange(_ref) {
140
114
  var _context, _context2;
141
-
142
115
  var offsetX = _ref.offsetX,
143
- maxRenderWidth = _ref.maxRenderWidth,
144
- flat = _flatInstanceProperty(_ref),
145
- useVirtual = _ref.useVirtual;
146
-
116
+ maxRenderWidth = _ref.maxRenderWidth,
117
+ flat = _flatInstanceProperty(_ref),
118
+ useVirtual = _ref.useVirtual;
147
119
  if (!useVirtual.horizontal) {
148
120
  return {
149
121
  leftIndex: 0,
@@ -152,30 +124,24 @@ function getHorizontalRenderRange(_ref) {
152
124
  rightBlank: 0
153
125
  };
154
126
  }
155
-
156
127
  var leftIndex = 0;
157
128
  var centerCount = 0;
158
129
  var leftBlank = 0;
159
130
  var centerRenderWidth = 0;
160
131
  var overscannedOffsetX = Math.max(0, offsetX - OVERSCAN_SIZE);
161
-
162
132
  while (leftIndex < flat.center.length) {
163
133
  var col = flat.center[leftIndex];
164
-
165
134
  if (col.width + leftBlank < overscannedOffsetX) {
166
135
  leftIndex += 1;
167
136
  leftBlank += col.width;
168
137
  } else {
169
138
  break;
170
139
  }
171
- } // 考虑 over scan 之后,中间部分的列至少需要渲染的宽度
172
-
173
-
140
+ }
141
+ // 考虑 over scan 之后,中间部分的列至少需要渲染的宽度
174
142
  var minCenterRenderWidth = maxRenderWidth + (overscannedOffsetX - leftBlank) + 2 * OVERSCAN_SIZE;
175
-
176
143
  while (leftIndex + centerCount < flat.center.length) {
177
144
  var _col = flat.center[leftIndex + centerCount];
178
-
179
145
  if (centerRenderWidth < minCenterRenderWidth) {
180
146
  centerRenderWidth += _col.width;
181
147
  centerCount += 1;
@@ -183,7 +149,6 @@ function getHorizontalRenderRange(_ref) {
183
149
  break;
184
150
  }
185
151
  }
186
-
187
152
  var rightBlankCount = flat.center.length - leftIndex - centerCount;
188
153
  var rightBlank = sum(_mapInstanceProperty(_context = _sliceInstanceProperty(_context2 = flat.center).call(_context2, flat.center.length - rightBlankCount)).call(_context, function (col) {
189
154
  return col.width;
@@ -194,28 +159,25 @@ function getHorizontalRenderRange(_ref) {
194
159
  rightIndex: leftIndex + centerCount,
195
160
  rightBlank: rightBlank
196
161
  };
197
- } // 一顿计算,将表格本次渲染所需要的数据都给算出来(代码写得有点乱,有较大优化空间)
162
+ }
163
+ // 一顿计算,将表格本次渲染所需要的数据都给算出来(代码写得有点乱,有较大优化空间)
198
164
  // todo 可以考虑下将 header 部分的计算逻辑也放到这个文件中,目前应该有一些重复的计算逻辑
199
-
200
-
201
165
  export function calculateRenderInfo(table) {
202
166
  var _context3, _context4, _context5, _context6, _context7, _context8, _context9;
203
-
204
167
  var _table$state = table.state,
205
- offsetX = _table$state.offsetX,
206
- maxRenderWidth = _table$state.maxRenderWidth;
168
+ offsetX = _table$state.offsetX,
169
+ maxRenderWidth = _table$state.maxRenderWidth;
207
170
  var _table$props = table.props,
208
- useVirtualProp = _table$props.useVirtual,
209
- columnsProp = _table$props.columns,
210
- dataSourceProp = _table$props.dataSource,
211
- defaultColumnWidth = _table$props.defaultColumnWidth;
171
+ useVirtualProp = _table$props.useVirtual,
172
+ columnsProp = _table$props.columns,
173
+ dataSourceProp = _table$props.dataSource,
174
+ defaultColumnWidth = _table$props.defaultColumnWidth;
212
175
  var columns = processColumns(columnsProp, defaultColumnWidth);
213
176
  var leftNestedLockCount = getLeftNestedLockCount(columns);
214
177
  var fullFlat = collectNodes(columns, 'leaf-only');
215
178
  var flat;
216
179
  var nested;
217
180
  var useVirtual;
218
-
219
181
  if (leftNestedLockCount === columns.length) {
220
182
  flat = {
221
183
  left: [],
@@ -236,13 +198,9 @@ export function calculateRenderInfo(table) {
236
198
  };
237
199
  } else {
238
200
  var leftNested = _sliceInstanceProperty(columns).call(columns, 0, leftNestedLockCount);
239
-
240
201
  var rightNestedLockCount = getLeftNestedLockCount(_sliceInstanceProperty(columns).call(columns).reverse());
241
-
242
202
  var centerNested = _sliceInstanceProperty(columns).call(columns, leftNestedLockCount, columns.length - rightNestedLockCount);
243
-
244
203
  var rightNested = _sliceInstanceProperty(columns).call(columns, columns.length - rightNestedLockCount);
245
-
246
204
  var shouldEnableHozVirtual = fullFlat.length >= AUTO_VIRTUAL_THRESHOLD && fullFlat.every(function (col) {
247
205
  return col.width != null;
248
206
  });
@@ -265,7 +223,6 @@ export function calculateRenderInfo(table) {
265
223
  center: centerNested
266
224
  };
267
225
  }
268
-
269
226
  var horizontalRenderRange = getHorizontalRenderRange({
270
227
  maxRenderWidth: maxRenderWidth,
271
228
  offsetX: offsetX,
@@ -274,10 +231,9 @@ export function calculateRenderInfo(table) {
274
231
  });
275
232
  var verticalRenderRange = table.getVerticalRenderRange(useVirtual);
276
233
  var leftBlank = horizontalRenderRange.leftBlank,
277
- leftIndex = horizontalRenderRange.leftIndex,
278
- rightBlank = horizontalRenderRange.rightBlank,
279
- rightIndex = horizontalRenderRange.rightIndex;
280
-
234
+ leftIndex = horizontalRenderRange.leftIndex,
235
+ rightBlank = horizontalRenderRange.rightBlank,
236
+ rightIndex = horizontalRenderRange.rightIndex;
281
237
  var unfilteredVisibleColumnDescriptors = _concatInstanceProperty(_context3 = []).call(_context3, _toConsumableArray(_mapInstanceProperty(_context4 = flat.left).call(_context4, function (col, i) {
282
238
  return {
283
239
  type: 'normal',
@@ -305,8 +261,8 @@ export function calculateRenderInfo(table) {
305
261
  colIndex: flat.full.length - flat.right.length + i
306
262
  };
307
263
  })));
308
-
309
- var visibleColumnDescriptors = _filterInstanceProperty(unfilteredVisibleColumnDescriptors).call(unfilteredVisibleColumnDescriptors, Boolean); // const totalWidth = visibleColumnDescriptors.reduce((pre, cur) => {
264
+ var visibleColumnDescriptors = _filterInstanceProperty(unfilteredVisibleColumnDescriptors).call(unfilteredVisibleColumnDescriptors, Boolean);
265
+ // const totalWidth = visibleColumnDescriptors.reduce((pre, cur) => {
310
266
  // if (cur.type === 'blank') {
311
267
  // return cur.width + pre
312
268
  // } else {
@@ -320,27 +276,21 @@ export function calculateRenderInfo(table) {
320
276
  // width: `width: calc(100% - ${totalWidth}px)`
321
277
  // } as VisibleColumnDescriptor)
322
278
  // }
323
-
324
-
325
279
  var fullFlatCount = flat.full.length;
326
280
  var leftFlatCount = flat.left.length;
327
281
  var rightFlatCount = flat.right.length;
328
282
  var stickyLeftMap = new _Map();
329
283
  var stickyLeft = 0;
330
-
331
284
  for (var i = 0; i < leftFlatCount; i++) {
332
285
  stickyLeftMap.set(i, stickyLeft);
333
286
  stickyLeft += flat.full[i].width;
334
287
  }
335
-
336
288
  var stickyRightMap = new _Map();
337
289
  var stickyRight = 0;
338
-
339
290
  for (var _i = 0; _i < rightFlatCount; _i++) {
340
291
  stickyRightMap.set(fullFlatCount - 1 - _i, stickyRight);
341
292
  stickyRight += flat.full[fullFlatCount - 1 - _i].width;
342
293
  }
343
-
344
294
  var leftLockTotalWidth = sum(_mapInstanceProperty(_context8 = flat.left).call(_context8, function (col) {
345
295
  return col.width;
346
296
  }));
File without changes
@@ -11,7 +11,6 @@ export function Colgroup(_ref) {
11
11
  }
12
12
  });
13
13
  }
14
-
15
14
  return /*#__PURE__*/React.createElement("col", {
16
15
  key: descriptor.colIndex,
17
16
  style: {
File without changes
@@ -13,10 +13,10 @@ var DefaultEmptyContent = /*#__PURE__*/React.memo(function () {
13
13
  });
14
14
  export function EmptyHtmlTable(_ref) {
15
15
  var descriptors = _ref.descriptors,
16
- isLoading = _ref.isLoading,
17
- emptyCellHeight = _ref.emptyCellHeight,
18
- _ref$EmptyContent = _ref.EmptyContent,
19
- EmptyContent = _ref$EmptyContent === void 0 ? DefaultEmptyContent : _ref$EmptyContent;
16
+ isLoading = _ref.isLoading,
17
+ emptyCellHeight = _ref.emptyCellHeight,
18
+ _ref$EmptyContent = _ref.EmptyContent,
19
+ EmptyContent = _ref$EmptyContent === void 0 ? DefaultEmptyContent : _ref$EmptyContent;
20
20
  var show = !isLoading;
21
21
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("table", {
22
22
  key: "table"
@@ -31,8 +31,8 @@ export function EmptyHtmlTable(_ref) {
31
31
  style: {
32
32
  height: emptyCellHeight !== null && emptyCellHeight !== void 0 ? emptyCellHeight : 200
33
33
  }
34
- })))), show && /*#__PURE__*/React.createElement("div", {
34
+ })))), show && ( /*#__PURE__*/React.createElement("div", {
35
35
  className: Classes.emptyWrapper,
36
36
  key: "empty"
37
- }, /*#__PURE__*/React.createElement(EmptyContent, null)));
37
+ }, /*#__PURE__*/React.createElement(EmptyContent, null))));
38
38
  }
File without changes