@kdcloudjs/table 1.2.1-canary.5 → 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 +4595 -5995
  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 +74 -154
  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 +17 -20
  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 +76 -175
  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 +19 -24
  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
@@ -1,28 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
4
-
5
4
  var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
6
-
7
5
  var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
8
-
9
6
  var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
10
-
11
7
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
-
13
8
  Object.defineProperty(exports, "__esModule", {
14
9
  value: true
15
10
  });
16
11
  exports.default = collectNodes;
17
-
18
12
  var _isLeafNode = _interopRequireDefault(require("./isLeafNode"));
19
-
20
- 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; } } }; }
21
-
22
- function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 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); }
23
-
24
- 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; }
25
-
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 _context; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context = {}.toString.call(r)).call(_context, 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; }
26
16
  /** 遍历所有节点,并将节点收集到一个数组中.
27
17
  * order 参数可用于指定遍历规则:
28
18
  * * `pre` 前序遍历 (默认)
@@ -34,19 +24,15 @@ function collectNodes(nodes) {
34
24
  var result = [];
35
25
  dfs(nodes);
36
26
  return result;
37
-
38
27
  function dfs(nodes) {
39
28
  if (nodes == null) {
40
29
  return;
41
30
  }
42
-
43
31
  var _iterator = _createForOfIteratorHelper(nodes),
44
- _step;
45
-
32
+ _step;
46
33
  try {
47
34
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
48
35
  var node = _step.value;
49
-
50
36
  if ((0, _isLeafNode.default)(node)) {
51
37
  result.push(node);
52
38
  } else {
File without changes
@@ -1,68 +1,51 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
11
-
12
9
  function isOutput() {
13
10
  return true;
14
11
  }
15
-
16
12
  function log() {
17
13
  if (isOutput()) {
18
14
  var _console, _context;
19
-
20
15
  for (var _len = arguments.length, msg = new Array(_len), _key = 0; _key < _len; _key++) {
21
16
  msg[_key] = arguments[_key];
22
17
  }
23
-
24
18
  (_console = console).log.apply(_console, (0, _concat.default)(_context = ['[kd-table]']).call(_context, msg));
25
19
  }
26
20
  }
27
-
28
21
  function warn() {
29
22
  if (isOutput()) {
30
23
  var _console2, _context2;
31
-
32
24
  for (var _len2 = arguments.length, msg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
33
25
  msg[_key2] = arguments[_key2];
34
26
  }
35
-
36
27
  (_console2 = console).warn.apply(_console2, (0, _concat.default)(_context2 = ['[kd-table]']).call(_context2, msg));
37
28
  }
38
29
  }
39
-
40
30
  function error() {
41
31
  var _console3, _context3;
42
-
43
32
  for (var _len3 = arguments.length, msg = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
44
33
  msg[_key3] = arguments[_key3];
45
34
  }
46
-
47
35
  (_console3 = console).error.apply(_console3, (0, _concat.default)(_context3 = ['[kd-table]']).call(_context3, msg));
48
36
  }
49
-
50
37
  function table() {
51
38
  if (isOutput()) {
52
39
  var _console4, _context4;
53
-
54
40
  for (var _len4 = arguments.length, msg = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
55
41
  msg[_key4] = arguments[_key4];
56
42
  }
57
-
58
43
  (_console4 = console).table.apply(_console4, (0, _concat.default)(_context4 = ['[kd-table]']).call(_context4, msg));
59
44
  }
60
45
  }
61
-
62
- var _default = {
46
+ var _default = exports.default = {
63
47
  log: log,
64
48
  warn: warn,
65
49
  error: error,
66
50
  table: table
67
- };
68
- exports.default = _default;
51
+ };
File without changes
@@ -1,16 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.copyDataToClipboard = void 0;
9
8
  exports.executeOnTempElement = executeOnTempElement;
10
-
11
9
  var _console = _interopRequireDefault(require("./console"));
12
-
13
- var copyDataToClipboard = function copyDataToClipboard(data) {
10
+ var copyDataToClipboard = exports.copyDataToClipboard = function copyDataToClipboard(data) {
14
11
  return function (element) {
15
12
  element.value = data;
16
13
  element.select();
@@ -19,9 +16,6 @@ var copyDataToClipboard = function copyDataToClipboard(data) {
19
16
  document.body.removeChild(element);
20
17
  };
21
18
  };
22
-
23
- exports.copyDataToClipboard = copyDataToClipboard;
24
-
25
19
  function executeOnTempElement(callback) {
26
20
  var eTempInput = document.createElement('textarea');
27
21
  eTempInput.style.width = '1px';
@@ -31,7 +25,6 @@ function executeOnTempElement(callback) {
31
25
  eTempInput.style.position = 'absolute';
32
26
  eTempInput.style.opacity = '0.0';
33
27
  document.body.appendChild(eTempInput);
34
-
35
28
  try {
36
29
  callback(eTempInput);
37
30
  } catch (err) {
File without changes
@@ -10,7 +10,6 @@ exports.getTargetEleInEventPath = getTargetEleInEventPath;
10
10
  exports.hasScroll = hasScroll;
11
11
  exports.isElementInEventPath = isElementInEventPath;
12
12
  exports.keepWithinBounds = keepWithinBounds;
13
-
14
13
  /** elementUtil html元素用的工具函数 */
15
14
  // 获取面板相对屏幕的位置 panel - 面板 trigger - 触发器
16
15
  // export function getPanelScreenByTrigger ({ panel, trigger, defaultAlign }) {
@@ -70,34 +69,27 @@ function getEventPath(event) {
70
69
  // Firefox supports composePath
71
70
  return event.composedPath();
72
71
  }
73
-
74
72
  return createEventPath(event);
75
73
  }
76
-
77
74
  function createEventPath(event) {
78
75
  var res = [];
79
76
  var pointer = event.target;
80
-
81
77
  while (pointer) {
82
78
  res.push(pointer);
83
79
  pointer = pointer.parentElement;
84
80
  }
85
-
86
81
  return res;
87
82
  }
88
-
89
83
  ;
90
84
  /**
91
85
  * 获取点击事件是否发生在元素内部
92
86
  * @param ele
93
87
  * @param event
94
88
  */
95
-
96
89
  function isElementInEventPath(ele, event) {
97
90
  if (!ele || !event) {
98
91
  return false;
99
92
  }
100
-
101
93
  var path = getEventPath(event);
102
94
  return path.indexOf(ele) >= 0;
103
95
  }
@@ -106,22 +98,16 @@ function isElementInEventPath(ele, event) {
106
98
  * @param path
107
99
  * @param isTargetCb
108
100
  */
109
-
110
-
111
101
  function getTargetEleInEventPath(path, isTargetCb) {
112
102
  var target;
113
103
  var l = 0;
114
-
115
104
  while (!target && l < path.length) {
116
105
  var ele = path[l];
117
-
118
106
  if (isTargetCb(ele)) {
119
107
  target = ele;
120
108
  }
121
-
122
109
  l++;
123
110
  }
124
-
125
111
  return target;
126
112
  }
127
113
  /**
@@ -129,8 +115,6 @@ function getTargetEleInEventPath(path, isTargetCb) {
129
115
  * @param event
130
116
  * @param popupParent
131
117
  */
132
-
133
-
134
118
  function calculatePointerRelative(event, popupParent) {
135
119
  var parentRect = popupParent.getBoundingClientRect();
136
120
  var documentRect = document.documentElement.getBoundingClientRect();
@@ -144,8 +128,6 @@ function calculatePointerRelative(event, popupParent) {
144
128
  * @param event
145
129
  * @param popupParent
146
130
  */
147
-
148
-
149
131
  function calculatePopupRelative(trigger, popupParent, offset) {
150
132
  var triggerRect = trigger.getBoundingClientRect();
151
133
  var parent = popupParent === document.body ? document.documentElement : popupParent;
@@ -155,48 +137,39 @@ function calculatePopupRelative(trigger, popupParent, offset) {
155
137
  y: triggerRect.top - parentRect.top - (offset ? offset.y : 0)
156
138
  };
157
139
  }
158
-
159
140
  function getPerfectX(_ref) {
160
141
  var x = _ref.x,
161
- maxX = _ref.maxX,
162
- width = _ref.width,
163
- isPerfectX = _ref.isPerfectX;
164
-
142
+ maxX = _ref.maxX,
143
+ width = _ref.width,
144
+ isPerfectX = _ref.isPerfectX;
165
145
  if (isPerfectX && Math.max(x, 0) > Math.abs(maxX)) {
166
146
  //看左侧空间是否足够
167
147
  var parentAvailableWidth = x;
168
-
169
148
  if (width <= parentAvailableWidth) {
170
149
  return x - width; //空间足够,往左侧偏移
171
150
  }
172
- } //目前位置,最大支持的位置
173
-
174
-
151
+ }
152
+ //目前位置,最大支持的位置
175
153
  return Math.min(Math.max(x, 0), Math.abs(maxX));
176
154
  }
177
-
178
155
  function getPerfectY(_ref2) {
179
156
  var y = _ref2.y,
180
- maxY = _ref2.maxY,
181
- height = _ref2.height,
182
- scrollTop = _ref2.scrollTop,
183
- isBody = _ref2.isBody,
184
- isPerfectY = _ref2.isPerfectY;
185
-
157
+ maxY = _ref2.maxY,
158
+ height = _ref2.height,
159
+ scrollTop = _ref2.scrollTop,
160
+ isBody = _ref2.isBody,
161
+ isPerfectY = _ref2.isPerfectY;
186
162
  if (isPerfectY && Math.max(y, 0) > Math.abs(maxY)) {
187
163
  //看下上方空间是否足够
188
164
  var parentAvailableHeight = isBody ? y - scrollTop : y;
189
-
190
165
  if (height <= parentAvailableHeight) {
191
166
  //上方空间足够,向上展示
192
167
  return y - height;
193
168
  }
194
- } //目前位置,最大支持的位置
195
-
196
-
169
+ }
170
+ //目前位置,最大支持的位置
197
171
  return Math.min(Math.max(y, 0), Math.abs(maxY));
198
172
  }
199
-
200
173
  function keepWithinBounds(popupParent, popup, x, y, isPerfect) {
201
174
  var parentRect = popupParent.getBoundingClientRect();
202
175
  var docElement = document.documentElement;
@@ -205,14 +178,12 @@ function keepWithinBounds(popupParent, popup, x, y, isPerfect) {
205
178
  var parentAvailableWidth = parentRect.width;
206
179
  var parentAvailableHeight = parentRect.height;
207
180
  var isBody = popupParent === document.body;
208
-
209
181
  if (isBody) {
210
182
  //ducument的宽度减去 父元素到document边界的的宽度,就是剩余可显示的宽度
211
- parentAvailableWidth = docRect.width - Math.abs(docRect.left - parentRect.left); //ducument的高度加上滚动条的高度减去 父元素到document边界的的宽度,就是剩余可显示的高度
212
-
183
+ parentAvailableWidth = docRect.width - Math.abs(docRect.left - parentRect.left);
184
+ //ducument的高度加上滚动条的高度减去 父元素到document边界的的宽度,就是剩余可显示的高度
213
185
  parentAvailableHeight = docRect.height + docElement.scrollTop - Math.abs(docRect.top - parentRect.top);
214
186
  }
215
-
216
187
  if (x) {
217
188
  var width = popupRect.width;
218
189
  var maxX = parentAvailableWidth - width;
@@ -223,7 +194,6 @@ function keepWithinBounds(popupParent, popup, x, y, isPerfect) {
223
194
  isPerfectX: isPerfect
224
195
  });
225
196
  }
226
-
227
197
  if (y) {
228
198
  var height = popupRect.height;
229
199
  var maxY = parentAvailableHeight - height;
@@ -236,13 +206,11 @@ function keepWithinBounds(popupParent, popup, x, y, isPerfect) {
236
206
  isPerfectY: isPerfect
237
207
  });
238
208
  }
239
-
240
209
  return {
241
210
  x: x,
242
211
  y: y
243
212
  };
244
213
  }
245
-
246
214
  function hasScroll(ele) {
247
215
  var isHorizontal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
248
216
  return isHorizontal ? ele.scrollWidth > ele.clientWidth : ele.scrollHeight > ele.clientHeight;
File without changes
@@ -1,63 +1,42 @@
1
1
  "use strict";
2
2
 
3
3
  var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
4
-
5
4
  var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
6
-
7
5
  var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
8
-
9
6
  var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
10
-
11
7
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
-
13
8
  Object.defineProperty(exports, "__esModule", {
14
9
  value: true
15
10
  });
16
11
  exports.default = exportTableAsExcel;
17
-
18
12
  var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
19
-
20
13
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
21
-
22
14
  var _SpanManager = _interopRequireDefault(require("../base/helpers/SpanManager"));
23
-
24
15
  var _internals = require("../internals");
25
-
26
16
  var _collectNodes = _interopRequireDefault(require("./collectNodes"));
27
-
28
17
  var _getTreeDepth = _interopRequireDefault(require("./getTreeDepth"));
29
-
30
18
  var _isLeafNode = _interopRequireDefault(require("./isLeafNode"));
31
-
32
- 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; } } }; }
33
-
34
- 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); }
35
-
36
- 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; }
37
-
19
+ 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; } } }; }
20
+ 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; } }
21
+ 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; }
38
22
  function safeGetSpanRect(column, record, rowIndex, colIndex) {
39
23
  var colSpan = 1;
40
24
  var rowSpan = 1;
41
-
42
25
  if (column.getSpanRect) {
43
26
  var value = _internals.internals.safeGetValue(column, record, rowIndex);
44
-
45
27
  var spanRect = column.getSpanRect(value, record, rowIndex);
46
28
  colSpan = spanRect == null ? 1 : spanRect.right - colIndex;
47
29
  rowSpan = spanRect == null ? 1 : spanRect.bottom - rowIndex;
48
30
  } else {
49
31
  var cellProps = _internals.internals.safeGetCellProps(column, record, rowIndex);
50
-
51
32
  if (cellProps.colSpan != null) {
52
33
  colSpan = cellProps.colSpan;
53
34
  }
54
-
55
35
  if (cellProps.rowSpan != null) {
56
36
  rowSpan = cellProps.rowSpan;
57
37
  }
58
- } // 注意这里没有考虑「rowSpan/colSpan 不能过大,避免 rowSpan/colSpan 影响因虚拟滚动而未渲染的单元格」
59
-
60
-
38
+ }
39
+ // 注意这里没有考虑「rowSpan/colSpan 不能过大,避免 rowSpan/colSpan 影响因虚拟滚动而未渲染的单元格」
61
40
  return {
62
41
  top: rowIndex,
63
42
  bottom: rowIndex + rowSpan,
@@ -65,16 +44,14 @@ function safeGetSpanRect(column, record, rowIndex, colIndex) {
65
44
  right: colIndex + colSpan
66
45
  };
67
46
  }
68
-
69
47
  function move(_ref, dx, dy) {
70
48
  var c = _ref.c,
71
- r = _ref.r;
49
+ r = _ref.r;
72
50
  return {
73
51
  c: c + dx,
74
52
  r: r + dy
75
53
  };
76
54
  }
77
-
78
55
  function sanitizeCellDatum(value) {
79
56
  if (value === Infinity || value === -Infinity || typeof value === 'number' && isNaN(value)) {
80
57
  return null;
@@ -83,8 +60,6 @@ function sanitizeCellDatum(value) {
83
60
  }
84
61
  }
85
62
  /** 根据 BaseTable 的 dataSource 和 column,将表格数据导出为 Excel 文件 */
86
-
87
-
88
63
  function exportTableAsExcel(xlsxPackage, dataSource, columns, filename) {
89
64
  var sheet = xlsxPackage.utils.aoa_to_sheet([]);
90
65
  var topHeaderHeight = (0, _getTreeDepth.default)(columns) + 1;
@@ -100,30 +75,22 @@ function exportTableAsExcel(xlsxPackage, dataSource, columns, filename) {
100
75
  Sheet1: sheet
101
76
  }
102
77
  }, filename);
103
-
104
78
  function addTopHeaders(origin) {
105
79
  dfs(columns, 0, 0);
106
-
107
80
  function dfs(cols, startDx, startDy) {
108
81
  var _a;
109
-
110
82
  var start = move(origin, startDx, startDy);
111
83
  var offsetX = 0;
112
-
113
84
  var _iterator = _createForOfIteratorHelper(cols),
114
- _step;
115
-
85
+ _step;
116
86
  try {
117
87
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
118
88
  var col = _step.value;
119
-
120
89
  if ((_a = col.features) === null || _a === void 0 ? void 0 : _a.noExport) {
121
90
  continue;
122
91
  }
123
-
124
92
  var current = move(start, offsetX, 0);
125
93
  addOne(col.name, current);
126
-
127
94
  if ((0, _isLeafNode.default)(col)) {
128
95
  offsetX += 1;
129
96
  mergeCells(current, 1, topHeaderHeight - startDy);
@@ -138,17 +105,13 @@ function exportTableAsExcel(xlsxPackage, dataSource, columns, filename) {
138
105
  } finally {
139
106
  _iterator.f();
140
107
  }
141
-
142
108
  return offsetX;
143
109
  }
144
110
  }
145
-
146
111
  function addDataPart(origin) {
147
112
  var _context;
148
-
149
113
  var leafColumns = (0, _filter.default)(_context = (0, _collectNodes.default)(columns, 'leaf-only')).call(_context, function (col) {
150
114
  var _a;
151
-
152
115
  return !((_a = col.features) === null || _a === void 0 ? void 0 : _a.noExport);
153
116
  });
154
117
  var spanManager = new _SpanManager.default();
@@ -158,43 +121,35 @@ function exportTableAsExcel(xlsxPackage, dataSource, columns, filename) {
158
121
  if (spanManager.testSkip(rowIndex, colIndex)) {
159
122
  return null;
160
123
  }
161
-
162
124
  var spanRect = safeGetSpanRect(col, record, rowIndex, colIndex);
163
125
  var rowSpan = spanRect.bottom - spanRect.top;
164
126
  var colSpan = spanRect.right - spanRect.left;
165
-
166
127
  if (rowSpan > 1 || colSpan > 1) {
167
128
  spanManager.add(spanRect.top, spanRect.left, colSpan, rowSpan);
168
129
  mergeCells(move(origin, spanRect.left, spanRect.top), colSpan, rowSpan);
169
130
  }
170
-
171
131
  return sanitizeCellDatum(_internals.internals.safeGetValue(col, record, rowIndex));
172
132
  });
173
133
  });
174
134
  add(dataPart, origin);
175
135
  }
176
-
177
136
  function add(data, origin) {
178
137
  xlsxPackage.utils.sheet_add_aoa(sheet, data, {
179
138
  origin: origin
180
139
  });
181
140
  }
182
-
183
141
  function addOne(datum, origin) {
184
142
  xlsxPackage.utils.sheet_add_aoa(sheet, [[datum]], {
185
143
  origin: origin
186
144
  });
187
145
  }
188
-
189
146
  function mergeCells(addr, width, height) {
190
147
  if (width === 1 && height === 1) {
191
148
  return;
192
149
  }
193
-
194
150
  if (sheet['!merges'] == null) {
195
151
  sheet['!merges'] = [];
196
152
  }
197
-
198
153
  sheet['!merges'].push({
199
154
  s: addr,
200
155
  e: move(addr, width - 1, height - 1)
File without changes
@@ -1,42 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
4
-
5
4
  var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
6
-
7
5
  var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
8
-
9
6
  var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
10
-
11
7
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
-
13
8
  Object.defineProperty(exports, "__esModule", {
14
9
  value: true
15
10
  });
16
11
  exports.default = getTreeDepth;
17
-
18
12
  var _isLeafNode = _interopRequireDefault(require("./isLeafNode"));
19
-
20
- 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; } } }; }
21
-
22
- function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 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); }
23
-
24
- 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; }
25
-
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 _context; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context = {}.toString.call(r)).call(_context, 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; }
26
16
  /** 获取一棵树的高度/深度 (0-based) */
27
17
  function getTreeDepth(nodes) {
28
18
  var maxDepth = -1;
29
19
  dfs(nodes, 0);
30
20
  return maxDepth;
31
-
32
21
  function dfs(columns, depth) {
33
22
  var _iterator = _createForOfIteratorHelper(columns),
34
- _step;
35
-
23
+ _step;
36
24
  try {
37
25
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
38
26
  var column = _step.value;
39
-
40
27
  if ((0, _isLeafNode.default)(column)) {
41
28
  maxDepth = Math.max(maxDepth, depth);
42
29
  } else {
File without changes
@@ -1,39 +1,27 @@
1
1
  "use strict";
2
2
 
3
3
  var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
4
-
5
4
  var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
6
-
7
5
  var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
8
-
9
6
  var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
10
-
11
7
  Object.defineProperty(exports, "__esModule", {
12
8
  value: true
13
9
  });
14
10
  exports.default = groupBy;
15
-
16
- 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; } } }; }
17
-
18
- function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 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); }
19
-
20
- 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; }
21
-
11
+ 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; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context = {}.toString.call(r)).call(_context, 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; } }
13
+ 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; }
22
14
  function groupBy(list, iteratee) {
23
15
  var groups = {};
24
-
25
16
  var _iterator = _createForOfIteratorHelper(list),
26
- _step;
27
-
17
+ _step;
28
18
  try {
29
19
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
30
20
  var item = _step.value;
31
21
  var key = iteratee(item);
32
-
33
22
  if (groups[key] == null) {
34
23
  groups[key] = [];
35
24
  }
36
-
37
25
  groups[key].push(item);
38
26
  }
39
27
  } catch (err) {
@@ -41,6 +29,5 @@ function groupBy(list, iteratee) {
41
29
  } finally {
42
30
  _iterator.f();
43
31
  }
44
-
45
32
  return groups;
46
33
  }
File without changes