@kdcloudjs/table 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +568 -0
- package/README.md +111 -0
- package/dist/@kdcloudjs/table.css +422 -0
- package/dist/@kdcloudjs/table.css.map +1 -0
- package/dist/@kdcloudjs/table.js +38578 -0
- package/dist/@kdcloudjs/table.js.map +1 -0
- package/dist/@kdcloudjs/table.min.css +9 -0
- package/dist/@kdcloudjs/table.min.js +208 -0
- package/dist/@kdcloudjs/table.min.js.map +1 -0
- package/dist/default-theme.js +344 -0
- package/dist/kd-table.css +422 -0
- package/dist/kd-table.css.map +1 -0
- package/dist/kd-table.js +38578 -0
- package/dist/kd-table.js.map +1 -0
- package/dist/kd-table.min.css +9 -0
- package/dist/kd-table.min.js +208 -0
- package/dist/kd-table.min.js.map +1 -0
- package/dist/kd-ui-complete.less +779 -0
- package/dist/kd-ui.less +2 -0
- package/dist/theme.js +13 -0
- package/es/_utils/arrayUtil.d.ts +5 -0
- package/es/_utils/arrayUtil.js +17 -0
- package/es/_utils/devwarning.d.ts +1 -0
- package/es/_utils/devwarning.js +10 -0
- package/es/_utils/formatUtil.d.ts +46 -0
- package/es/_utils/formatUtil.js +346 -0
- package/es/_utils/hooks.d.ts +51 -0
- package/es/_utils/hooks.js +165 -0
- package/es/_utils/index.d.ts +8 -0
- package/es/_utils/index.js +15 -0
- package/es/_utils/numberUtil.d.ts +34 -0
- package/es/_utils/numberUtil.js +181 -0
- package/es/_utils/omit.d.ts +1 -0
- package/es/_utils/omit.js +11 -0
- package/es/_utils/react-children.d.ts +2 -0
- package/es/_utils/react-children.js +8 -0
- package/es/_utils/type.d.ts +12 -0
- package/es/_utils/type.js +15 -0
- package/es/_utils/usePopper.d.ts +29 -0
- package/es/_utils/usePopper.js +546 -0
- package/es/config-provider/ConfigContext.d.ts +22 -0
- package/es/config-provider/ConfigContext.js +7 -0
- package/es/config-provider/compDefaultProps.d.ts +8 -0
- package/es/config-provider/compDefaultProps.js +10 -0
- package/es/config-provider/configProvider.d.ts +11 -0
- package/es/config-provider/configProvider.js +40 -0
- package/es/config-provider/defaultConfig.d.ts +10 -0
- package/es/config-provider/defaultConfig.js +18 -0
- package/es/config-provider/index.d.ts +6 -0
- package/es/config-provider/index.js +6 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -0
- package/es/locale/index.d.ts +3 -0
- package/es/locale/index.js +3 -0
- package/es/locale/locale.d.ts +50 -0
- package/es/locale/locale.js +251 -0
- package/es/locale/zh-CN.d.ts +8 -0
- package/es/locale/zh-CN.js +8 -0
- package/es/style/color/colors.less +2 -0
- package/es/style/core/index.less +2 -0
- package/es/style/core/motion/other.less +28 -0
- package/es/style/core/motion/slide.less +53 -0
- package/es/style/core/motion.less +2 -0
- package/es/style/core/reset.less +186 -0
- package/es/style/css.js +1 -0
- package/es/style/index.css +410 -0
- package/es/style/index.d.ts +1 -0
- package/es/style/index.js +1 -0
- package/es/style/index.less +2 -0
- package/es/style/mixins/index.less +19 -0
- package/es/style/mixins/overlay.less +22 -0
- package/es/style/mixins/reset.less +13 -0
- package/es/style/themes/default.less +445 -0
- package/es/style/themes/index.less +1 -0
- package/es/table/base/calculations.d.ts +5 -0
- package/es/table/base/calculations.js +364 -0
- package/es/table/base/colgroup.d.ts +5 -0
- package/es/table/base/colgroup.js +22 -0
- package/es/table/base/empty.d.ts +9 -0
- package/es/table/base/empty.js +38 -0
- package/es/table/base/header.d.ts +5 -0
- package/es/table/base/header.js +324 -0
- package/es/table/base/helpers/SpanManager.d.ts +9 -0
- package/es/table/base/helpers/SpanManager.js +50 -0
- package/es/table/base/helpers/TableDOMUtils.d.ts +18 -0
- package/es/table/base/helpers/TableDOMUtils.js +104 -0
- package/es/table/base/helpers/__test__/SpanManager.test.d.ts +1 -0
- package/es/table/base/helpers/__test__/SpanManager.test.js +18 -0
- package/es/table/base/helpers/__test__/TableDOMUtils.test.d.ts +1 -0
- package/es/table/base/helpers/__test__/TableDOMUtils.test.js +34 -0
- package/es/table/base/helpers/__test__/rowHeightManager.test.d.ts +1 -0
- package/es/table/base/helpers/__test__/rowHeightManager.test.js +30 -0
- package/es/table/base/helpers/__test__/visible-part.test.d.ts +1 -0
- package/es/table/base/helpers/__test__/visible-part.test.js +28 -0
- package/es/table/base/helpers/rowHeightManager.d.ts +7 -0
- package/es/table/base/helpers/rowHeightManager.js +157 -0
- package/es/table/base/helpers/visible-part.d.ts +23 -0
- package/es/table/base/helpers/visible-part.js +58 -0
- package/es/table/base/html-table.d.ts +15 -0
- package/es/table/base/html-table.js +132 -0
- package/es/table/base/index.d.ts +3 -0
- package/es/table/base/index.js +2 -0
- package/es/table/base/interfaces.d.ts +54 -0
- package/es/table/base/interfaces.js +0 -0
- package/es/table/base/loading.d.ts +13 -0
- package/es/table/base/loading.js +60 -0
- package/es/table/base/styles.d.ts +132 -0
- package/es/table/base/styles.js +112 -0
- package/es/table/base/table.d.ts +150 -0
- package/es/table/base/table.js +733 -0
- package/es/table/base/utils.d.ts +36 -0
- package/es/table/base/utils.js +193 -0
- package/es/table/common-views.d.ts +24 -0
- package/es/table/common-views.js +70 -0
- package/es/table/index.d.ts +6 -0
- package/es/table/index.js +6 -0
- package/es/table/interfaces.d.ts +98 -0
- package/es/table/interfaces.js +0 -0
- package/es/table/internals.d.ts +14 -0
- package/es/table/internals.js +56 -0
- package/es/table/pipeline/features/__test__/multiSelect.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/multiSelect.test.js +152 -0
- package/es/table/pipeline/features/__test__/rowDetail.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/rowDetail.test.js +223 -0
- package/es/table/pipeline/features/__test__/rowGrouping.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/rowGrouping.test.js +120 -0
- package/es/table/pipeline/features/__test__/singleSelect.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/singleSelect.test.js +191 -0
- package/es/table/pipeline/features/__test__/sort.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/sort.test.js +213 -0
- package/es/table/pipeline/features/__test__/tips.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/tips.test.js +123 -0
- package/es/table/pipeline/features/__test__/treeMode.test.d.ts +1 -0
- package/es/table/pipeline/features/__test__/treeMode.test.js +202 -0
- package/es/table/pipeline/features/autoFill.d.ts +4 -0
- package/es/table/pipeline/features/autoFill.js +63 -0
- package/es/table/pipeline/features/autoRowSpan.d.ts +2 -0
- package/es/table/pipeline/features/autoRowSpan.js +72 -0
- package/es/table/pipeline/features/buildTree.d.ts +2 -0
- package/es/table/pipeline/features/buildTree.js +8 -0
- package/es/table/pipeline/features/columnDrag.d.ts +6 -0
- package/es/table/pipeline/features/columnDrag.js +265 -0
- package/es/table/pipeline/features/columnFilter.d.ts +20 -0
- package/es/table/pipeline/features/columnFilter.js +173 -0
- package/es/table/pipeline/features/columnHover.d.ts +12 -0
- package/es/table/pipeline/features/columnHover.js +51 -0
- package/es/table/pipeline/features/columnRangeHover.d.ts +15 -0
- package/es/table/pipeline/features/columnRangeHover.js +83 -0
- package/es/table/pipeline/features/columnResizeWidth.d.ts +21 -0
- package/es/table/pipeline/features/columnResizeWidth.js +173 -0
- package/es/table/pipeline/features/contextMenu.d.ts +14 -0
- package/es/table/pipeline/features/contextMenu.js +370 -0
- package/es/table/pipeline/features/filter/DefaultFilterContent.d.ts +4 -0
- package/es/table/pipeline/features/filter/DefaultFilterContent.js +91 -0
- package/es/table/pipeline/features/filter/Filter.d.ts +17 -0
- package/es/table/pipeline/features/filter/Filter.js +111 -0
- package/es/table/pipeline/features/filter/FilterPanel.d.ts +20 -0
- package/es/table/pipeline/features/filter/FilterPanel.js +81 -0
- package/es/table/pipeline/features/filter/__test__/Filter.test.d.ts +1 -0
- package/es/table/pipeline/features/filter/__test__/Filter.test.js +29 -0
- package/es/table/pipeline/features/filter/index.d.ts +4 -0
- package/es/table/pipeline/features/filter/index.js +4 -0
- package/es/table/pipeline/features/filter/util.d.ts +10 -0
- package/es/table/pipeline/features/filter/util.js +67 -0
- package/es/table/pipeline/features/index.d.ts +16 -0
- package/es/table/pipeline/features/index.js +16 -0
- package/es/table/pipeline/features/multiSelect.d.ts +27 -0
- package/es/table/pipeline/features/multiSelect.js +208 -0
- package/es/table/pipeline/features/rowDetail.d.ts +35 -0
- package/es/table/pipeline/features/rowDetail.js +254 -0
- package/es/table/pipeline/features/rowGrouping.d.ts +14 -0
- package/es/table/pipeline/features/rowGrouping.js +200 -0
- package/es/table/pipeline/features/singleSelect.d.ts +23 -0
- package/es/table/pipeline/features/singleSelect.js +122 -0
- package/es/table/pipeline/features/sort.d.ts +40 -0
- package/es/table/pipeline/features/sort.js +332 -0
- package/es/table/pipeline/features/tips.d.ts +2 -0
- package/es/table/pipeline/features/tips.js +57 -0
- package/es/table/pipeline/features/treeMode.d.ts +37 -0
- package/es/table/pipeline/features/treeMode.js +234 -0
- package/es/table/pipeline/features/treeSelect.d.ts +38 -0
- package/es/table/pipeline/features/treeSelect.js +154 -0
- package/es/table/pipeline/index.d.ts +3 -0
- package/es/table/pipeline/index.js +3 -0
- package/es/table/pipeline/pipeline.d.ts +85 -0
- package/es/table/pipeline/pipeline.js +272 -0
- package/es/table/pivot/cross-table/buildCrossTable.d.ts +14 -0
- package/es/table/pivot/cross-table/buildCrossTable.js +294 -0
- package/es/table/pivot/cross-table/constants.d.ts +1 -0
- package/es/table/pivot/cross-table/constants.js +1 -0
- package/es/table/pivot/cross-table/cross-table.d.ts +18 -0
- package/es/table/pivot/cross-table/cross-table.js +55 -0
- package/es/table/pivot/cross-table/index.d.ts +4 -0
- package/es/table/pivot/cross-table/index.js +3 -0
- package/es/table/pivot/cross-table/interfaces.d.ts +29 -0
- package/es/table/pivot/cross-table/interfaces.js +0 -0
- package/es/table/pivot/cross-table/internals.d.ts +13 -0
- package/es/table/pivot/cross-table/internals.js +0 -0
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +14 -0
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +219 -0
- package/es/table/pivot/cross-tree-table/cross-tree-table.d.ts +38 -0
- package/es/table/pivot/cross-tree-table/cross-tree-table.js +127 -0
- package/es/table/pivot/cross-tree-table/index.d.ts +2 -0
- package/es/table/pivot/cross-tree-table/index.js +2 -0
- package/es/table/pivot/pivot-utils/buildDrillTree.d.ts +16 -0
- package/es/table/pivot/pivot-utils/buildDrillTree.js +93 -0
- package/es/table/pivot/pivot-utils/builders.d.ts +26 -0
- package/es/table/pivot/pivot-utils/builders.js +252 -0
- package/es/table/pivot/pivot-utils/convert-utils.d.ts +31 -0
- package/es/table/pivot/pivot-utils/convert-utils.js +180 -0
- package/es/table/pivot/pivot-utils/index.d.ts +5 -0
- package/es/table/pivot/pivot-utils/index.js +4 -0
- package/es/table/pivot/pivot-utils/interfaces.d.ts +12 -0
- package/es/table/pivot/pivot-utils/interfaces.js +0 -0
- package/es/table/pivot/pivot-utils/simpleEncode.d.ts +1 -0
- package/es/table/pivot/pivot-utils/simpleEncode.js +7 -0
- package/es/table/style/css.js +2 -0
- package/es/table/style/index.css +0 -0
- package/es/table/style/index.d.ts +2 -0
- package/es/table/style/index.js +2 -0
- package/es/table/style/index.less +1 -0
- package/es/table/transforms/autoRowSpan.d.ts +3 -0
- package/es/table/transforms/autoRowSpan.js +73 -0
- package/es/table/transforms/autoWidth.d.ts +25 -0
- package/es/table/transforms/autoWidth.js +160 -0
- package/es/table/transforms/buildTree.d.ts +3 -0
- package/es/table/transforms/buildTree.js +15 -0
- package/es/table/transforms/columnHover.d.ts +17 -0
- package/es/table/transforms/columnHover.js +59 -0
- package/es/table/transforms/columnRangeHover.d.ts +17 -0
- package/es/table/transforms/columnRangeHover.js +94 -0
- package/es/table/transforms/columnResize.d.ts +27 -0
- package/es/table/transforms/columnResize.js +152 -0
- package/es/table/transforms/flatten.d.ts +3 -0
- package/es/table/transforms/flatten.js +16 -0
- package/es/table/transforms/index.d.ts +12 -0
- package/es/table/transforms/index.js +12 -0
- package/es/table/transforms/orderField.d.ts +3 -0
- package/es/table/transforms/orderField.js +22 -0
- package/es/table/transforms/sort.d.ts +43 -0
- package/es/table/transforms/sort.js +338 -0
- package/es/table/transforms/tips.d.ts +8 -0
- package/es/table/transforms/tips.js +54 -0
- package/es/table/transforms/treeMode.d.ts +30 -0
- package/es/table/transforms/treeMode.js +252 -0
- package/es/table/transforms/visible.d.ts +5 -0
- package/es/table/transforms/visible.js +19 -0
- package/es/table/transforms/warnTransformsDeprecated.d.ts +1 -0
- package/es/table/transforms/warnTransformsDeprecated.js +8 -0
- package/es/table/use/useResizeObserver.d.ts +2 -0
- package/es/table/use/useResizeObserver.js +20 -0
- package/es/table/utils/applyTransforms.d.ts +6 -0
- package/es/table/utils/applyTransforms.js +15 -0
- package/es/table/utils/buildTree.d.ts +36 -0
- package/es/table/utils/buildTree.js +119 -0
- package/es/table/utils/collectNodes.d.ts +8 -0
- package/es/table/utils/collectNodes.js +59 -0
- package/es/table/utils/console.d.ts +11 -0
- package/es/table/utils/console.js +58 -0
- package/es/table/utils/copyToClipboard.d.ts +3 -0
- package/es/table/utils/copyToClipboard.js +30 -0
- package/es/table/utils/element.d.ts +42 -0
- package/es/table/utils/element.js +228 -0
- package/es/table/utils/exportTableAsExcel.d.ts +4 -0
- package/es/table/utils/exportTableAsExcel.js +188 -0
- package/es/table/utils/getTreeDepth.d.ts +3 -0
- package/es/table/utils/getTreeDepth.js +41 -0
- package/es/table/utils/groupBy.d.ts +1 -0
- package/es/table/utils/groupBy.js +37 -0
- package/es/table/utils/index.d.ts +18 -0
- package/es/table/utils/index.js +18 -0
- package/es/table/utils/isGroupColumn.d.ts +2 -0
- package/es/table/utils/isGroupColumn.js +7 -0
- package/es/table/utils/isLeafNode.d.ts +2 -0
- package/es/table/utils/isLeafNode.js +4 -0
- package/es/table/utils/layeredFilter.d.ts +2 -0
- package/es/table/utils/layeredFilter.js +25 -0
- package/es/table/utils/layeredSort.d.ts +5 -0
- package/es/table/utils/layeredSort.js +26 -0
- package/es/table/utils/makeRecursiveMapper.d.ts +9 -0
- package/es/table/utils/makeRecursiveMapper.js +76 -0
- package/es/table/utils/mergeCellProps.d.ts +8 -0
- package/es/table/utils/mergeCellProps.js +67 -0
- package/es/table/utils/others.d.ts +16 -0
- package/es/table/utils/others.js +80 -0
- package/es/table/utils/proto.d.ts +21 -0
- package/es/table/utils/proto.js +106 -0
- package/es/table/utils/smartCompare.d.ts +9 -0
- package/es/table/utils/smartCompare.js +51 -0
- package/es/table/utils/traverseColumn.d.ts +11 -0
- package/es/table/utils/traverseColumn.js +88 -0
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +22 -0
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +138 -0
- package/es/table/utils/tree-data-helpers/TreeDataHelper.d.ts +26 -0
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +337 -0
- package/lib/_utils/arrayUtil.d.ts +5 -0
- package/lib/_utils/arrayUtil.js +26 -0
- package/lib/_utils/devwarning.d.ts +1 -0
- package/lib/_utils/devwarning.js +21 -0
- package/lib/_utils/formatUtil.d.ts +46 -0
- package/lib/_utils/formatUtil.js +358 -0
- package/lib/_utils/hooks.d.ts +51 -0
- package/lib/_utils/hooks.js +187 -0
- package/lib/_utils/index.d.ts +8 -0
- package/lib/_utils/index.js +28 -0
- package/lib/_utils/numberUtil.d.ts +34 -0
- package/lib/_utils/numberUtil.js +202 -0
- package/lib/_utils/omit.d.ts +1 -0
- package/lib/_utils/omit.js +21 -0
- package/lib/_utils/react-children.d.ts +2 -0
- package/lib/_utils/react-children.js +20 -0
- package/lib/_utils/type.d.ts +12 -0
- package/lib/_utils/type.js +27 -0
- package/lib/_utils/usePopper.d.ts +29 -0
- package/lib/_utils/usePopper.js +574 -0
- package/lib/config-provider/ConfigContext.d.ts +22 -0
- package/lib/config-provider/ConfigContext.js +19 -0
- package/lib/config-provider/compDefaultProps.d.ts +8 -0
- package/lib/config-provider/compDefaultProps.js +17 -0
- package/lib/config-provider/configProvider.d.ts +11 -0
- package/lib/config-provider/configProvider.js +56 -0
- package/lib/config-provider/defaultConfig.d.ts +10 -0
- package/lib/config-provider/defaultConfig.js +30 -0
- package/lib/config-provider/index.d.ts +6 -0
- package/lib/config-provider/index.js +37 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +45 -0
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/index.js +25 -0
- package/lib/locale/locale.d.ts +50 -0
- package/lib/locale/locale.js +277 -0
- package/lib/locale/zh-CN.d.ts +8 -0
- package/lib/locale/zh-CN.js +15 -0
- package/lib/style/color/colors.less +2 -0
- package/lib/style/components.less +1 -0
- package/lib/style/core/index.less +2 -0
- package/lib/style/core/motion/other.less +28 -0
- package/lib/style/core/motion/slide.less +53 -0
- package/lib/style/core/motion.less +2 -0
- package/lib/style/core/reset.less +186 -0
- package/lib/style/css.js +3 -0
- package/lib/style/index.css +410 -0
- package/lib/style/index.d.ts +1 -0
- package/lib/style/index.js +3 -0
- package/lib/style/index.less +2 -0
- package/lib/style/mixins/index.less +19 -0
- package/lib/style/mixins/overlay.less +22 -0
- package/lib/style/mixins/reset.less +13 -0
- package/lib/style/themes/default.less +445 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/table/base/calculations.d.ts +5 -0
- package/lib/table/base/calculations.js +385 -0
- package/lib/table/base/colgroup.d.ts +5 -0
- package/lib/table/base/colgroup.js +33 -0
- package/lib/table/base/empty.d.ts +9 -0
- package/lib/table/base/empty.js +54 -0
- package/lib/table/base/header.d.ts +5 -0
- package/lib/table/base/header.js +340 -0
- package/lib/table/base/helpers/SpanManager.d.ts +9 -0
- package/lib/table/base/helpers/SpanManager.js +59 -0
- package/lib/table/base/helpers/TableDOMUtils.d.ts +18 -0
- package/lib/table/base/helpers/TableDOMUtils.js +113 -0
- package/lib/table/base/helpers/__test__/SpanManager.test.d.ts +1 -0
- package/lib/table/base/helpers/__test__/SpanManager.test.js +23 -0
- package/lib/table/base/helpers/__test__/TableDOMUtils.test.d.ts +1 -0
- package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +41 -0
- package/lib/table/base/helpers/__test__/rowHeightManager.test.d.ts +1 -0
- package/lib/table/base/helpers/__test__/rowHeightManager.test.js +33 -0
- package/lib/table/base/helpers/__test__/visible-part.test.d.ts +1 -0
- package/lib/table/base/helpers/__test__/visible-part.test.js +31 -0
- package/lib/table/base/helpers/rowHeightManager.d.ts +7 -0
- package/lib/table/base/helpers/rowHeightManager.js +170 -0
- package/lib/table/base/helpers/visible-part.d.ts +23 -0
- package/lib/table/base/helpers/visible-part.js +72 -0
- package/lib/table/base/html-table.d.ts +15 -0
- package/lib/table/base/html-table.js +149 -0
- package/lib/table/base/index.d.ts +3 -0
- package/lib/table/base/index.js +21 -0
- package/lib/table/base/interfaces.d.ts +54 -0
- package/lib/table/base/interfaces.js +0 -0
- package/lib/table/base/loading.d.ts +13 -0
- package/lib/table/base/loading.js +71 -0
- package/lib/table/base/styles.d.ts +132 -0
- package/lib/table/base/styles.js +136 -0
- package/lib/table/base/table.d.ts +150 -0
- package/lib/table/base/table.js +773 -0
- package/lib/table/base/utils.d.ts +36 -0
- package/lib/table/base/utils.js +234 -0
- package/lib/table/common-views.d.ts +24 -0
- package/lib/table/common-views.js +90 -0
- package/lib/table/index.d.ts +6 -0
- package/lib/table/index.js +85 -0
- package/lib/table/interfaces.d.ts +98 -0
- package/lib/table/interfaces.js +0 -0
- package/lib/table/internals.d.ts +14 -0
- package/lib/table/internals.js +64 -0
- package/lib/table/pipeline/features/__test__/multiSelect.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/multiSelect.test.js +163 -0
- package/lib/table/pipeline/features/__test__/rowDetail.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/rowDetail.test.js +230 -0
- package/lib/table/pipeline/features/__test__/rowGrouping.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/rowGrouping.test.js +129 -0
- package/lib/table/pipeline/features/__test__/singleSelect.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/singleSelect.test.js +201 -0
- package/lib/table/pipeline/features/__test__/sort.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/sort.test.js +218 -0
- package/lib/table/pipeline/features/__test__/tips.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/tips.test.js +133 -0
- package/lib/table/pipeline/features/__test__/treeMode.test.d.ts +1 -0
- package/lib/table/pipeline/features/__test__/treeMode.test.js +206 -0
- package/lib/table/pipeline/features/autoFill.d.ts +4 -0
- package/lib/table/pipeline/features/autoFill.js +80 -0
- package/lib/table/pipeline/features/autoRowSpan.d.ts +2 -0
- package/lib/table/pipeline/features/autoRowSpan.js +84 -0
- package/lib/table/pipeline/features/buildTree.d.ts +2 -0
- package/lib/table/pipeline/features/buildTree.js +16 -0
- package/lib/table/pipeline/features/columnDrag.d.ts +6 -0
- package/lib/table/pipeline/features/columnDrag.js +278 -0
- package/lib/table/pipeline/features/columnFilter.d.ts +20 -0
- package/lib/table/pipeline/features/columnFilter.js +197 -0
- package/lib/table/pipeline/features/columnHover.d.ts +12 -0
- package/lib/table/pipeline/features/columnHover.js +62 -0
- package/lib/table/pipeline/features/columnRangeHover.d.ts +15 -0
- package/lib/table/pipeline/features/columnRangeHover.js +95 -0
- package/lib/table/pipeline/features/columnResizeWidth.d.ts +21 -0
- package/lib/table/pipeline/features/columnResizeWidth.js +192 -0
- package/lib/table/pipeline/features/contextMenu.d.ts +14 -0
- package/lib/table/pipeline/features/contextMenu.js +397 -0
- package/lib/table/pipeline/features/filter/DefaultFilterContent.d.ts +4 -0
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +112 -0
- package/lib/table/pipeline/features/filter/Filter.d.ts +17 -0
- package/lib/table/pipeline/features/filter/Filter.js +129 -0
- package/lib/table/pipeline/features/filter/FilterPanel.d.ts +20 -0
- package/lib/table/pipeline/features/filter/FilterPanel.js +98 -0
- package/lib/table/pipeline/features/filter/__test__/Filter.test.d.ts +1 -0
- package/lib/table/pipeline/features/filter/__test__/Filter.test.js +36 -0
- package/lib/table/pipeline/features/filter/index.d.ts +4 -0
- package/lib/table/pipeline/features/filter/index.js +39 -0
- package/lib/table/pipeline/features/filter/util.d.ts +10 -0
- package/lib/table/pipeline/features/filter/util.js +77 -0
- package/lib/table/pipeline/features/index.d.ts +16 -0
- package/lib/table/pipeline/features/index.js +141 -0
- package/lib/table/pipeline/features/multiSelect.d.ts +27 -0
- package/lib/table/pipeline/features/multiSelect.js +227 -0
- package/lib/table/pipeline/features/rowDetail.d.ts +35 -0
- package/lib/table/pipeline/features/rowDetail.js +283 -0
- package/lib/table/pipeline/features/rowGrouping.d.ts +14 -0
- package/lib/table/pipeline/features/rowGrouping.js +227 -0
- package/lib/table/pipeline/features/singleSelect.d.ts +23 -0
- package/lib/table/pipeline/features/singleSelect.js +138 -0
- package/lib/table/pipeline/features/sort.d.ts +40 -0
- package/lib/table/pipeline/features/sort.js +361 -0
- package/lib/table/pipeline/features/tips.d.ts +2 -0
- package/lib/table/pipeline/features/tips.js +73 -0
- package/lib/table/pipeline/features/treeMode.d.ts +37 -0
- package/lib/table/pipeline/features/treeMode.js +266 -0
- package/lib/table/pipeline/features/treeSelect.d.ts +38 -0
- package/lib/table/pipeline/features/treeSelect.js +169 -0
- package/lib/table/pipeline/index.d.ts +3 -0
- package/lib/table/pipeline/index.js +26 -0
- package/lib/table/pipeline/pipeline.d.ts +85 -0
- package/lib/table/pipeline/pipeline.js +291 -0
- package/lib/table/pivot/cross-table/buildCrossTable.d.ts +14 -0
- package/lib/table/pivot/cross-table/buildCrossTable.js +313 -0
- package/lib/table/pivot/cross-table/constants.d.ts +1 -0
- package/lib/table/pivot/cross-table/constants.js +8 -0
- package/lib/table/pivot/cross-table/cross-table.d.ts +18 -0
- package/lib/table/pivot/cross-table/cross-table.js +71 -0
- package/lib/table/pivot/cross-table/index.d.ts +4 -0
- package/lib/table/pivot/cross-table/index.js +31 -0
- package/lib/table/pivot/cross-table/interfaces.d.ts +29 -0
- package/lib/table/pivot/cross-table/interfaces.js +0 -0
- package/lib/table/pivot/cross-table/internals.d.ts +13 -0
- package/lib/table/pivot/cross-table/internals.js +0 -0
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +14 -0
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +240 -0
- package/lib/table/pivot/cross-tree-table/cross-tree-table.d.ts +38 -0
- package/lib/table/pivot/cross-tree-table/cross-tree-table.js +144 -0
- package/lib/table/pivot/cross-tree-table/index.d.ts +2 -0
- package/lib/table/pivot/cross-tree-table/index.js +23 -0
- package/lib/table/pivot/pivot-utils/buildDrillTree.d.ts +16 -0
- package/lib/table/pivot/pivot-utils/buildDrillTree.js +106 -0
- package/lib/table/pivot/pivot-utils/builders.d.ts +26 -0
- package/lib/table/pivot/pivot-utils/builders.js +272 -0
- package/lib/table/pivot/pivot-utils/convert-utils.d.ts +31 -0
- package/lib/table/pivot/pivot-utils/convert-utils.js +204 -0
- package/lib/table/pivot/pivot-utils/index.d.ts +5 -0
- package/lib/table/pivot/pivot-utils/index.js +59 -0
- package/lib/table/pivot/pivot-utils/interfaces.d.ts +12 -0
- package/lib/table/pivot/pivot-utils/interfaces.js +0 -0
- package/lib/table/pivot/pivot-utils/simpleEncode.d.ts +1 -0
- package/lib/table/pivot/pivot-utils/simpleEncode.js +14 -0
- package/lib/table/style/css.js +5 -0
- package/lib/table/style/index.css +0 -0
- package/lib/table/style/index.d.ts +2 -0
- package/lib/table/style/index.js +5 -0
- package/lib/table/style/index.less +1 -0
- package/lib/table/transforms/autoRowSpan.d.ts +3 -0
- package/lib/table/transforms/autoRowSpan.js +86 -0
- package/lib/table/transforms/autoWidth.d.ts +25 -0
- package/lib/table/transforms/autoWidth.js +187 -0
- package/lib/table/transforms/buildTree.d.ts +3 -0
- package/lib/table/transforms/buildTree.js +23 -0
- package/lib/table/transforms/columnHover.d.ts +17 -0
- package/lib/table/transforms/columnHover.js +74 -0
- package/lib/table/transforms/columnRangeHover.d.ts +17 -0
- package/lib/table/transforms/columnRangeHover.js +110 -0
- package/lib/table/transforms/columnResize.d.ts +27 -0
- package/lib/table/transforms/columnResize.js +176 -0
- package/lib/table/transforms/flatten.d.ts +3 -0
- package/lib/table/transforms/flatten.js +24 -0
- package/lib/table/transforms/index.d.ts +12 -0
- package/lib/table/transforms/index.js +131 -0
- package/lib/table/transforms/orderField.d.ts +3 -0
- package/lib/table/transforms/orderField.js +33 -0
- package/lib/table/transforms/sort.d.ts +43 -0
- package/lib/table/transforms/sort.js +369 -0
- package/lib/table/transforms/tips.d.ts +8 -0
- package/lib/table/transforms/tips.js +71 -0
- package/lib/table/transforms/treeMode.d.ts +30 -0
- package/lib/table/transforms/treeMode.js +286 -0
- package/lib/table/transforms/visible.d.ts +5 -0
- package/lib/table/transforms/visible.js +31 -0
- package/lib/table/transforms/warnTransformsDeprecated.d.ts +1 -0
- package/lib/table/transforms/warnTransformsDeprecated.js +19 -0
- package/lib/table/use/useResizeObserver.d.ts +2 -0
- package/lib/table/use/useResizeObserver.js +32 -0
- package/lib/table/utils/applyTransforms.d.ts +6 -0
- package/lib/table/utils/applyTransforms.js +24 -0
- package/lib/table/utils/buildTree.d.ts +36 -0
- package/lib/table/utils/buildTree.js +140 -0
- package/lib/table/utils/collectNodes.d.ts +8 -0
- package/lib/table/utils/collectNodes.js +72 -0
- package/lib/table/utils/console.d.ts +11 -0
- package/lib/table/utils/console.js +68 -0
- package/lib/table/utils/copyToClipboard.d.ts +3 -0
- package/lib/table/utils/copyToClipboard.js +40 -0
- package/lib/table/utils/element.d.ts +42 -0
- package/lib/table/utils/element.js +243 -0
- package/lib/table/utils/exportTableAsExcel.d.ts +4 -0
- package/lib/table/utils/exportTableAsExcel.js +205 -0
- package/lib/table/utils/getTreeDepth.d.ts +3 -0
- package/lib/table/utils/getTreeDepth.js +54 -0
- package/lib/table/utils/groupBy.d.ts +1 -0
- package/lib/table/utils/groupBy.js +48 -0
- package/lib/table/utils/index.d.ts +18 -0
- package/lib/table/utils/index.js +187 -0
- package/lib/table/utils/isGroupColumn.d.ts +2 -0
- package/lib/table/utils/isGroupColumn.js +17 -0
- package/lib/table/utils/isLeafNode.d.ts +2 -0
- package/lib/table/utils/isLeafNode.js +11 -0
- package/lib/table/utils/layeredFilter.d.ts +2 -0
- package/lib/table/utils/layeredFilter.js +38 -0
- package/lib/table/utils/layeredSort.d.ts +5 -0
- package/lib/table/utils/layeredSort.js +37 -0
- package/lib/table/utils/makeRecursiveMapper.d.ts +9 -0
- package/lib/table/utils/makeRecursiveMapper.js +94 -0
- package/lib/table/utils/mergeCellProps.d.ts +8 -0
- package/lib/table/utils/mergeCellProps.js +78 -0
- package/lib/table/utils/others.d.ts +16 -0
- package/lib/table/utils/others.js +108 -0
- package/lib/table/utils/proto.d.ts +21 -0
- package/lib/table/utils/proto.js +117 -0
- package/lib/table/utils/smartCompare.d.ts +9 -0
- package/lib/table/utils/smartCompare.js +58 -0
- package/lib/table/utils/traverseColumn.d.ts +11 -0
- package/lib/table/utils/traverseColumn.js +103 -0
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +22 -0
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +154 -0
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.d.ts +26 -0
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +358 -0
- package/package.json +213 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
2
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
|
+
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
+
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
7
|
+
import _taggedTemplateLiteral from "@babel/runtime-corejs3/helpers/taggedTemplateLiteral";
|
|
8
|
+
|
|
9
|
+
var _templateObject;
|
|
10
|
+
|
|
11
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof _Symbol === "undefined" || _getIteratorMethod(o) == null) { 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 = _getIterator(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; } } }; }
|
|
12
|
+
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context3 = Object.prototype.toString.call(o)).call(_context3, 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); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
18
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
19
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
20
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { noop } from 'rxjs';
|
|
23
|
+
import styled from 'styled-components';
|
|
24
|
+
import { icons } from '../../common-views';
|
|
25
|
+
import { isLeafNode } from '../../utils';
|
|
26
|
+
import simpleEncode from './simpleEncode';
|
|
27
|
+
var ExpandSpan = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n padding: 2px 8px 2px 0;\n cursor: pointer;\n\n .icon {\n fill: #999;\n margin-right: 4px;\n\n &.expanded {\n transform-origin: center center;\n transform: rotate(90deg);\n }\n }\n"])));
|
|
28
|
+
export function convertDrillTreeToCrossTree(drillTree) {
|
|
29
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
30
|
+
indicators = _ref.indicators,
|
|
31
|
+
_ref$encode = _ref.encode,
|
|
32
|
+
encode = _ref$encode === void 0 ? simpleEncode : _ref$encode,
|
|
33
|
+
generateSubtotalNode = _ref.generateSubtotalNode,
|
|
34
|
+
_ref$enforceExpandTot = _ref.enforceExpandTotalNode,
|
|
35
|
+
enforceExpandTotalNode = _ref$enforceExpandTot === void 0 ? true : _ref$enforceExpandTot,
|
|
36
|
+
expandKeys = _ref.expandKeys,
|
|
37
|
+
_ref$onChangeExpandKe = _ref.onChangeExpandKeys,
|
|
38
|
+
onChangeExpandKeys = _ref$onChangeExpandKe === void 0 ? noop : _ref$onChangeExpandKe,
|
|
39
|
+
supportsExpand = _ref.supportsExpand;
|
|
40
|
+
|
|
41
|
+
var totalKey = encode([]);
|
|
42
|
+
|
|
43
|
+
if (supportsExpand && expandKeys == null) {
|
|
44
|
+
throw new Error('[ali-react-table] convertDrillTreeToCrossTree(...) 设置 supportsExpand=true 时,expandKeys 不能为 null/undefined.');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var expandKeySet = new _Set(expandKeys);
|
|
48
|
+
return dfs(drillTree, 0);
|
|
49
|
+
/** 在 indicators 非空的情况下获取指标对应的 CrossTreeNode */
|
|
50
|
+
|
|
51
|
+
function getIndicators(node, nodeData) {
|
|
52
|
+
return _mapInstanceProperty(indicators).call(indicators, function (indicator) {
|
|
53
|
+
var _context;
|
|
54
|
+
|
|
55
|
+
return _extends({
|
|
56
|
+
key: encode(_concatInstanceProperty(_context = node.path).call(_context, [indicator.code])),
|
|
57
|
+
value: indicator.name,
|
|
58
|
+
data: _extends(_extends({}, nodeData), {
|
|
59
|
+
indicator: indicator
|
|
60
|
+
})
|
|
61
|
+
}, indicator);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function drillNodeToTreeNode(node, nodeData) {
|
|
66
|
+
if (indicators != null) {
|
|
67
|
+
return {
|
|
68
|
+
key: node.key,
|
|
69
|
+
value: node.value,
|
|
70
|
+
data: nodeData,
|
|
71
|
+
children: getIndicators(node, nodeData)
|
|
72
|
+
};
|
|
73
|
+
} else {
|
|
74
|
+
return {
|
|
75
|
+
key: node.key,
|
|
76
|
+
value: node.value,
|
|
77
|
+
data: nodeData
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function dfs(drillNodes, depth) {
|
|
83
|
+
var result = [];
|
|
84
|
+
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(drillNodes),
|
|
86
|
+
_step;
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
var _loop = function _loop() {
|
|
90
|
+
var node = _step.value;
|
|
91
|
+
var nodeData = {
|
|
92
|
+
dataKey: node.key,
|
|
93
|
+
dataPath: node.path
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
if (isLeafNode(node) && !node.hasChild) {
|
|
97
|
+
result.push(drillNodeToTreeNode(node, nodeData));
|
|
98
|
+
} else {
|
|
99
|
+
var needProcessChildren = true;
|
|
100
|
+
var crossTreeNode = {
|
|
101
|
+
key: node.key,
|
|
102
|
+
value: node.value,
|
|
103
|
+
data: nodeData
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
if (!supportsExpand || enforceExpandTotalNode && node.key === totalKey) {
|
|
107
|
+
// 不支持展开功能 或是强制展开
|
|
108
|
+
crossTreeNode.children = dfs(node.children, depth + 1);
|
|
109
|
+
} else if (expandKeySet.has(node.key)) {
|
|
110
|
+
// 展开的父节点
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
crossTreeNode.title = /*#__PURE__*/React.createElement(ExpandSpan, {
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
onChangeExpandKeys(_filterInstanceProperty(expandKeys).call(expandKeys, function (k) {
|
|
115
|
+
return k !== node.key;
|
|
116
|
+
}), node, 'collapse');
|
|
117
|
+
}
|
|
118
|
+
}, /*#__PURE__*/React.createElement(icons.CaretRight, {
|
|
119
|
+
className: "icon expanded"
|
|
120
|
+
}), node.value);
|
|
121
|
+
crossTreeNode.children = dfs(node.children, depth + 1);
|
|
122
|
+
} else {
|
|
123
|
+
// 收拢的父节点
|
|
124
|
+
needProcessChildren = false;
|
|
125
|
+
crossTreeNode.title = /*#__PURE__*/React.createElement(ExpandSpan, {
|
|
126
|
+
onClick: function onClick() {
|
|
127
|
+
onChangeExpandKeys(_concatInstanceProperty(expandKeys).call(expandKeys, [node.key]), node, 'expand');
|
|
128
|
+
}
|
|
129
|
+
}, /*#__PURE__*/React.createElement(icons.CaretRight, {
|
|
130
|
+
className: "icon collapsed"
|
|
131
|
+
}), node.value);
|
|
132
|
+
|
|
133
|
+
if (indicators != null) {
|
|
134
|
+
crossTreeNode.children = getIndicators(node, nodeData);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (needProcessChildren) {
|
|
139
|
+
var subtotalNodeData = generateSubtotalNode === null || generateSubtotalNode === void 0 ? void 0 : generateSubtotalNode(node);
|
|
140
|
+
|
|
141
|
+
if (subtotalNodeData) {
|
|
142
|
+
var _context2;
|
|
143
|
+
|
|
144
|
+
var _subtotalNodeData$pos = subtotalNodeData.position,
|
|
145
|
+
position = _subtotalNodeData$pos === void 0 ? 'start' : _subtotalNodeData$pos,
|
|
146
|
+
value = subtotalNodeData.value;
|
|
147
|
+
|
|
148
|
+
var subtotalPath = _concatInstanceProperty(_context2 = node.path).call(_context2, [value]);
|
|
149
|
+
|
|
150
|
+
var subtotalDrillNode = {
|
|
151
|
+
key: encode(subtotalPath),
|
|
152
|
+
path: subtotalPath,
|
|
153
|
+
value: value
|
|
154
|
+
};
|
|
155
|
+
var subtotalTreeNode = drillNodeToTreeNode(subtotalDrillNode, nodeData);
|
|
156
|
+
|
|
157
|
+
if (position === 'start') {
|
|
158
|
+
crossTreeNode.children.unshift(subtotalTreeNode);
|
|
159
|
+
} else {
|
|
160
|
+
crossTreeNode.children.push(subtotalTreeNode);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
result.push(crossTreeNode);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
170
|
+
_loop();
|
|
171
|
+
}
|
|
172
|
+
} catch (err) {
|
|
173
|
+
_iterator.e(err);
|
|
174
|
+
} finally {
|
|
175
|
+
_iterator.f();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { buildRecordMatrix, BuildRecordMatrixConfig, buildRecordMap } from './builders';
|
|
2
|
+
export { default as buildDrillTree, BuildDrillTreeOptions } from './buildDrillTree';
|
|
3
|
+
export { default as simpleEncode } from './simpleEncode';
|
|
4
|
+
export { RecordMatrix, DrillNode } from './interfaces';
|
|
5
|
+
export * from './convert-utils';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** 数据立方.
|
|
2
|
+
* RecordMatrix 是一个二维的 map,CrossTable 会以下列方式使用 matrix 中的数据:
|
|
3
|
+
* `matrix.get(leftPK).get(topPK)[indicatorCode]` */
|
|
4
|
+
export declare type RecordMatrix<R = any> = Map<string, Map<string, R>>;
|
|
5
|
+
/** 普通的下钻树节点 */
|
|
6
|
+
export interface DrillNode {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
path: string[];
|
|
10
|
+
children?: DrillNode[];
|
|
11
|
+
hasChild?: boolean;
|
|
12
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function simpleEncode(path: string[]): string;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import { internals } from '../internals';
|
|
3
|
+
import { isLeafNode, traverseColumn } from '../utils';
|
|
4
|
+
import { warnTransformsDeprecated } from './warnTransformsDeprecated';
|
|
5
|
+
|
|
6
|
+
function isIdentity(x, y) {
|
|
7
|
+
return x === y;
|
|
8
|
+
}
|
|
9
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export function makeAutoRowSpanTransform() {
|
|
13
|
+
warnTransformsDeprecated('makeAutoRowSpanTransform');
|
|
14
|
+
return traverseColumn(function (col, _ref) {
|
|
15
|
+
var dataSource = _ref.dataSource,
|
|
16
|
+
range = _ref.range;
|
|
17
|
+
|
|
18
|
+
var _a;
|
|
19
|
+
|
|
20
|
+
if (!((_a = col.features) === null || _a === void 0 ? void 0 : _a.autoRowSpan)) {
|
|
21
|
+
return col;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (!isLeafNode(col)) {
|
|
25
|
+
return col;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var isFunc = typeof col.features.autoRowSpan === 'function';
|
|
29
|
+
var shouldMergeCell = isFunc ? col.features.autoRowSpan : isIdentity;
|
|
30
|
+
var spanRects = [];
|
|
31
|
+
var lastBottom = 0;
|
|
32
|
+
var prevValue = null;
|
|
33
|
+
var prevRow = null;
|
|
34
|
+
|
|
35
|
+
for (var rowIndex = 0; rowIndex < dataSource.length; rowIndex++) {
|
|
36
|
+
var row = dataSource[rowIndex];
|
|
37
|
+
var value = internals.safeGetValue(col, row, rowIndex);
|
|
38
|
+
|
|
39
|
+
if (rowIndex === 0 || !shouldMergeCell(prevValue, value, prevRow, row)) {
|
|
40
|
+
var spanRect = {
|
|
41
|
+
top: lastBottom,
|
|
42
|
+
bottom: rowIndex,
|
|
43
|
+
left: range.start,
|
|
44
|
+
right: range.end
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
for (var i = lastBottom; i < rowIndex; i++) {
|
|
48
|
+
spanRects.push(spanRect);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
lastBottom = rowIndex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
prevValue = value;
|
|
55
|
+
prevRow = row;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
for (var _i = lastBottom; _i < dataSource.length; _i++) {
|
|
59
|
+
spanRects.push({
|
|
60
|
+
top: lastBottom,
|
|
61
|
+
bottom: dataSource.length,
|
|
62
|
+
left: range.start,
|
|
63
|
+
right: range.end
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return _extends(_extends({}, col), {
|
|
68
|
+
getSpanRect: function getSpanRect(value, row, rowIndex) {
|
|
69
|
+
return spanRects[rowIndex];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Table } from '../base';
|
|
3
|
+
import { TableTransform } from '../interfaces';
|
|
4
|
+
/** 自适应列宽
|
|
5
|
+
*
|
|
6
|
+
* @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展
|
|
7
|
+
*
|
|
8
|
+
* @param tableRef BaseTable 的 ref
|
|
9
|
+
* @param options 参数
|
|
10
|
+
* @param deps 重新调整列宽的依赖数组,每当依赖数组发生变化时, useAutoWidthTransform 会根据单元格内容的实际渲染宽度 设置单元格的宽度
|
|
11
|
+
*
|
|
12
|
+
* options 说明:
|
|
13
|
+
* - options.appendExpander 是否在列的末尾追加可伸缩列
|
|
14
|
+
* - options.expanderVisibility 设置为 `'hidden'` 可以隐藏可伸缩列
|
|
15
|
+
* - options.wrapperStyle 单元格中 div.auto-width-wrapper 的样式
|
|
16
|
+
* - options.initColumnWidth 自适应的初始列宽
|
|
17
|
+
*
|
|
18
|
+
* 注意 useAutoWidthTransform 是一个 React hooks,要遵循 hooks 的用法规范
|
|
19
|
+
* */
|
|
20
|
+
export declare function useAutoWidthTransform(tableRef: React.MutableRefObject<Table>, options?: {
|
|
21
|
+
wrapperStyle?: React.CSSProperties;
|
|
22
|
+
initColumnWidth?: number;
|
|
23
|
+
appendExpander?: boolean;
|
|
24
|
+
expanderVisibility?: 'visible' | 'hidden';
|
|
25
|
+
}, deps?: any[]): TableTransform;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
2
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
3
|
+
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
4
|
+
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
5
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
6
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
7
|
+
import _taggedTemplateLiteral from "@babel/runtime-corejs3/helpers/taggedTemplateLiteral";
|
|
8
|
+
|
|
9
|
+
var _templateObject;
|
|
10
|
+
|
|
11
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof _Symbol === "undefined" || _getIteratorMethod(o) == null) { 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 = _getIterator(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; } } }; }
|
|
12
|
+
|
|
13
|
+
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); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
18
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
19
|
+
import React, { useEffect, useState } from 'react';
|
|
20
|
+
import styled from 'styled-components';
|
|
21
|
+
import { Classes } from '../base';
|
|
22
|
+
import { internals } from '../internals';
|
|
23
|
+
import { isLeafNode, mergeCellProps, traverseColumn } from '../utils';
|
|
24
|
+
import { warnTransformsDeprecated } from './warnTransformsDeprecated';
|
|
25
|
+
var AUTO_WIDTH_WRAPPER_CLS = 'auto-width-wrapper';
|
|
26
|
+
var AUTO_WIDTH_EXPANDER_CLS = 'auto-width-expander';
|
|
27
|
+
var AutoWidthWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n padding: 8px 12px;\n"])));
|
|
28
|
+
|
|
29
|
+
function isSameArray(arr1, arr2) {
|
|
30
|
+
return arr1.length === arr2.length && arr1.every(function (x, i) {
|
|
31
|
+
return x === arr2[i];
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** 自适应列宽
|
|
35
|
+
*
|
|
36
|
+
* @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展
|
|
37
|
+
*
|
|
38
|
+
* @param tableRef BaseTable 的 ref
|
|
39
|
+
* @param options 参数
|
|
40
|
+
* @param deps 重新调整列宽的依赖数组,每当依赖数组发生变化时, useAutoWidthTransform 会根据单元格内容的实际渲染宽度 设置单元格的宽度
|
|
41
|
+
*
|
|
42
|
+
* options 说明:
|
|
43
|
+
* - options.appendExpander 是否在列的末尾追加可伸缩列
|
|
44
|
+
* - options.expanderVisibility 设置为 `'hidden'` 可以隐藏可伸缩列
|
|
45
|
+
* - options.wrapperStyle 单元格中 div.auto-width-wrapper 的样式
|
|
46
|
+
* - options.initColumnWidth 自适应的初始列宽
|
|
47
|
+
*
|
|
48
|
+
* 注意 useAutoWidthTransform 是一个 React hooks,要遵循 hooks 的用法规范
|
|
49
|
+
* */
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export function useAutoWidthTransform(tableRef, options, deps) {
|
|
53
|
+
warnTransformsDeprecated('useAutoWidthTransform');
|
|
54
|
+
|
|
55
|
+
var _useState = useState([]),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
widthList = _useState2[0],
|
|
58
|
+
setWidthList = _useState2[1];
|
|
59
|
+
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
var artTable = tableRef.current.getDoms().artTable;
|
|
62
|
+
|
|
63
|
+
var rows = _Array$from(artTable.querySelectorAll(".".concat(Classes.tableRow)));
|
|
64
|
+
|
|
65
|
+
if (rows.length === 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var preferredWidthList = [];
|
|
70
|
+
|
|
71
|
+
var _iterator = _createForOfIteratorHelper(rows),
|
|
72
|
+
_step;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
76
|
+
var row = _step.value;
|
|
77
|
+
var autoWidthDivList = row.querySelectorAll(".".concat(AUTO_WIDTH_WRAPPER_CLS));
|
|
78
|
+
autoWidthDivList.forEach(function (div, i) {
|
|
79
|
+
var _a;
|
|
80
|
+
|
|
81
|
+
preferredWidthList[i] = Math.max((_a = preferredWidthList[i]) !== null && _a !== void 0 ? _a : 0, div.scrollWidth);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
} catch (err) {
|
|
85
|
+
_iterator.e(err);
|
|
86
|
+
} finally {
|
|
87
|
+
_iterator.f();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (!isSameArray(preferredWidthList, widthList)) {
|
|
91
|
+
setWidthList(preferredWidthList);
|
|
92
|
+
}
|
|
93
|
+
}, deps);
|
|
94
|
+
var i = 0;
|
|
95
|
+
var innerTransform = traverseColumn(function (col) {
|
|
96
|
+
var _a, _b, _c;
|
|
97
|
+
|
|
98
|
+
if (!isLeafNode(col)) {
|
|
99
|
+
return col;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (!((_a = col.features) === null || _a === void 0 ? void 0 : _a.autoWidth)) {
|
|
103
|
+
return col;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var _col$features$autoWid = col.features.autoWidth,
|
|
107
|
+
_col$features$autoWid2 = _col$features$autoWid.max,
|
|
108
|
+
max = _col$features$autoWid2 === void 0 ? Infinity : _col$features$autoWid2,
|
|
109
|
+
_col$features$autoWid3 = _col$features$autoWid.min,
|
|
110
|
+
min = _col$features$autoWid3 === void 0 ? -Infinity : _col$features$autoWid3;
|
|
111
|
+
var width = (_c = (_b = widthList[i++]) !== null && _b !== void 0 ? _b : col.width) !== null && _c !== void 0 ? _c : options === null || options === void 0 ? void 0 : options.initColumnWidth;
|
|
112
|
+
var clampedWidth = Math.max(min, Math.min(max, width));
|
|
113
|
+
return _extends(_extends({}, col), {
|
|
114
|
+
width: clampedWidth,
|
|
115
|
+
getCellProps: function getCellProps(_, record, rowIndex) {
|
|
116
|
+
return mergeCellProps(internals.safeGetCellProps(col, record, rowIndex), {
|
|
117
|
+
style: {
|
|
118
|
+
padding: 0
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
render: function render(_, record, rowIndex) {
|
|
123
|
+
return /*#__PURE__*/React.createElement(AutoWidthWrapper, {
|
|
124
|
+
className: AUTO_WIDTH_WRAPPER_CLS,
|
|
125
|
+
style: options === null || options === void 0 ? void 0 : options.wrapperStyle
|
|
126
|
+
}, internals.safeRender(col, record, rowIndex));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
return function (input) {
|
|
131
|
+
var _a;
|
|
132
|
+
|
|
133
|
+
var _innerTransform = innerTransform(input),
|
|
134
|
+
columns = _innerTransform.columns,
|
|
135
|
+
dataSource = _innerTransform.dataSource;
|
|
136
|
+
|
|
137
|
+
var expanderVisibility = (_a = options === null || options === void 0 ? void 0 : options.expanderVisibility) !== null && _a !== void 0 ? _a : 'visible';
|
|
138
|
+
return {
|
|
139
|
+
columns: (options === null || options === void 0 ? void 0 : options.appendExpander) ? _concatInstanceProperty(columns).call(columns, [{
|
|
140
|
+
name: '',
|
|
141
|
+
headerCellProps: {
|
|
142
|
+
className: AUTO_WIDTH_EXPANDER_CLS,
|
|
143
|
+
style: {
|
|
144
|
+
background: expanderVisibility === 'hidden' ? 'var(--bgcolor)' : undefined,
|
|
145
|
+
border: expanderVisibility === 'hidden' ? 'none' : undefined
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
getCellProps: function getCellProps() {
|
|
149
|
+
return {
|
|
150
|
+
className: AUTO_WIDTH_EXPANDER_CLS,
|
|
151
|
+
style: {
|
|
152
|
+
visibility: expanderVisibility
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}]) : columns,
|
|
157
|
+
dataSource: dataSource
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { buildTree as _buildTree } from '../utils';
|
|
2
|
+
import { warnTransformsDeprecated } from './warnTransformsDeprecated';
|
|
3
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
4
|
+
|
|
5
|
+
export function makeBuildTreeTransform(idProp, parentIdProp) {
|
|
6
|
+
warnTransformsDeprecated('makeBuildTreeTransform');
|
|
7
|
+
return function (_ref) {
|
|
8
|
+
var columns = _ref.columns,
|
|
9
|
+
dataSource = _ref.dataSource;
|
|
10
|
+
return {
|
|
11
|
+
columns: columns,
|
|
12
|
+
dataSource: _buildTree(idProp, parentIdProp, dataSource)
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TableTransform } from '../interfaces';
|
|
2
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
3
|
+
export interface ColumnHoverOptions {
|
|
4
|
+
hoverColor?: string;
|
|
5
|
+
hoverColIndex: number;
|
|
6
|
+
onChangeHoverColIndex(nextColIndex: number): void;
|
|
7
|
+
}
|
|
8
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
9
|
+
export declare function makeColumnHoverTransform({ hoverColor, hoverColIndex, onChangeHoverColIndex, }: ColumnHoverOptions): TableTransform;
|
|
10
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
11
|
+
export declare function useColumnHoverTransform({ hoverColor, defaultHoverColIndex, }?: {
|
|
12
|
+
hoverColor?: string;
|
|
13
|
+
defaultHoverColIndex?: number;
|
|
14
|
+
}): import("../interfaces").Transform<{
|
|
15
|
+
columns: import("../interfaces").ArtColumn[];
|
|
16
|
+
dataSource: any[];
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
2
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { isLeafNode, mergeCellProps, traverseColumn } from '../utils';
|
|
5
|
+
import { warnTransformsDeprecated } from './warnTransformsDeprecated';
|
|
6
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
7
|
+
|
|
8
|
+
export function makeColumnHoverTransform(_ref) {
|
|
9
|
+
var _ref$hoverColor = _ref.hoverColor,
|
|
10
|
+
hoverColor = _ref$hoverColor === void 0 ? 'var(--hover-bgcolor)' : _ref$hoverColor,
|
|
11
|
+
hoverColIndex = _ref.hoverColIndex,
|
|
12
|
+
onChangeHoverColIndex = _ref.onChangeHoverColIndex;
|
|
13
|
+
warnTransformsDeprecated('makeColumnHoverTransform');
|
|
14
|
+
return traverseColumn(function (col, _ref2) {
|
|
15
|
+
var range = _ref2.range;
|
|
16
|
+
|
|
17
|
+
if (!isLeafNode(col)) {
|
|
18
|
+
return col;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var colIndexMatched = range.start <= hoverColIndex && hoverColIndex < range.end;
|
|
22
|
+
var prevGetCellProps = col.getCellProps;
|
|
23
|
+
return _extends(_extends({}, col), {
|
|
24
|
+
getCellProps: function getCellProps(value, record, rowIndex) {
|
|
25
|
+
var prevCellProps = prevGetCellProps === null || prevGetCellProps === void 0 ? void 0 : prevGetCellProps(value, record, rowIndex);
|
|
26
|
+
return mergeCellProps(prevCellProps, {
|
|
27
|
+
style: {
|
|
28
|
+
'--bgcolor': colIndexMatched ? hoverColor : undefined
|
|
29
|
+
},
|
|
30
|
+
onMouseEnter: function onMouseEnter() {
|
|
31
|
+
onChangeHoverColIndex(range.start);
|
|
32
|
+
},
|
|
33
|
+
onMouseLeave: function onMouseLeave() {
|
|
34
|
+
onChangeHoverColIndex(-1);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
42
|
+
|
|
43
|
+
export function useColumnHoverTransform() {
|
|
44
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
45
|
+
hoverColor = _ref3.hoverColor,
|
|
46
|
+
_ref3$defaultHoverCol = _ref3.defaultHoverColIndex,
|
|
47
|
+
defaultHoverColIndex = _ref3$defaultHoverCol === void 0 ? -1 : _ref3$defaultHoverCol;
|
|
48
|
+
|
|
49
|
+
var _useState = useState(defaultHoverColIndex),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
+
hoverColIndex = _useState2[0],
|
|
52
|
+
onChangeHoverColIndex = _useState2[1];
|
|
53
|
+
|
|
54
|
+
return makeColumnHoverTransform({
|
|
55
|
+
hoverColor: hoverColor,
|
|
56
|
+
hoverColIndex: hoverColIndex,
|
|
57
|
+
onChangeHoverColIndex: onChangeHoverColIndex
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HoverRange, TableTransform } from '../interfaces';
|
|
2
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
3
|
+
export interface ColumnRangeHoverOptions {
|
|
4
|
+
hoverColor?: string;
|
|
5
|
+
headerHoverColor?: string;
|
|
6
|
+
hoverRange: HoverRange;
|
|
7
|
+
onChangeHoverRange(nextColIndexRange: HoverRange): void;
|
|
8
|
+
}
|
|
9
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
10
|
+
export declare function makeColumnRangeHoverTransform({ hoverColor, headerHoverColor, hoverRange, onChangeHoverRange, }: ColumnRangeHoverOptions): TableTransform;
|
|
11
|
+
/** @deprecated transform 用法已经过时,请使用 pipeline 来对表格进行拓展 */
|
|
12
|
+
export declare function useColumnHoverRangeTransform({ hoverColor, headerHoverColor, defaultHoverRange, }?: Omit<ColumnRangeHoverOptions, 'hoverRange' | 'onChangeHoverRange'> & {
|
|
13
|
+
defaultHoverRange?: HoverRange;
|
|
14
|
+
}): import("../interfaces").Transform<{
|
|
15
|
+
columns: import("../interfaces").ArtColumn[];
|
|
16
|
+
dataSource: any[];
|
|
17
|
+
}>;
|