@kdcloudjs/table 1.2.1-canary.7 → 1.2.2-canary.4
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 -568
- package/README.md +111 -111
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.css.map +0 -0
- package/dist/@kdcloudjs/table.js +1314 -468
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +17 -7
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/dist/default-theme.js +0 -0
- package/dist/kd-ui-complete.less +777 -777
- package/dist/kd-ui.less +0 -0
- package/dist/theme.js +0 -0
- package/es/_utils/arrayUtil.d.ts +0 -0
- package/es/_utils/arrayUtil.js +0 -0
- package/es/_utils/devwarning.d.ts +0 -0
- package/es/_utils/devwarning.js +0 -0
- package/es/_utils/formatUtil.d.ts +0 -0
- package/es/_utils/formatUtil.js +0 -0
- package/es/_utils/hooks.d.ts +0 -0
- package/es/_utils/hooks.js +0 -0
- package/es/_utils/index.d.ts +0 -0
- package/es/_utils/index.js +0 -0
- package/es/_utils/numberUtil.d.ts +0 -0
- package/es/_utils/numberUtil.js +0 -0
- package/es/_utils/omit.d.ts +0 -0
- package/es/_utils/omit.js +0 -0
- package/es/_utils/react-children.d.ts +0 -0
- package/es/_utils/react-children.js +0 -0
- package/es/_utils/type.d.ts +0 -0
- package/es/_utils/type.js +0 -0
- package/es/_utils/usePopper.d.ts +0 -0
- package/es/_utils/usePopper.js +0 -0
- package/es/config-provider/ConfigContext.d.ts +0 -0
- package/es/config-provider/ConfigContext.js +0 -0
- package/es/config-provider/compDefaultProps.d.ts +0 -0
- package/es/config-provider/compDefaultProps.js +0 -0
- package/es/config-provider/configProvider.d.ts +0 -0
- package/es/config-provider/configProvider.js +0 -0
- package/es/config-provider/defaultConfig.d.ts +0 -0
- package/es/config-provider/defaultConfig.js +0 -0
- package/es/config-provider/index.d.ts +0 -0
- package/es/config-provider/index.js +0 -0
- package/es/index.d.ts +0 -0
- package/es/index.js +0 -0
- package/es/locale/index.d.ts +0 -0
- package/es/locale/index.js +0 -0
- package/es/locale/locale.d.ts +0 -0
- package/es/locale/locale.js +2 -2
- package/es/locale/zh-CN.d.ts +0 -0
- package/es/locale/zh-CN.js +0 -0
- package/es/style/color/colors.less +1 -1
- package/es/style/core/index.less +1 -1
- package/es/style/core/motion/other.less +27 -27
- package/es/style/core/motion/slide.less +53 -53
- package/es/style/core/motion.less +1 -1
- package/es/style/core/reset.less +185 -185
- package/es/style/css.js +0 -0
- package/es/style/index.css +0 -0
- package/es/style/index.d.ts +0 -0
- package/es/style/index.js +0 -0
- package/es/style/index.less +1 -1
- package/es/style/mixins/index.less +18 -18
- package/es/style/mixins/overlay.less +21 -21
- package/es/style/mixins/reset.less +12 -12
- package/es/style/themes/default.less +445 -445
- package/es/style/themes/index.less +0 -0
- package/es/table/base/calculations.d.ts +0 -0
- package/es/table/base/calculations.js +0 -0
- package/es/table/base/colgroup.d.ts +0 -0
- package/es/table/base/colgroup.js +0 -0
- package/es/table/base/empty.d.ts +0 -0
- package/es/table/base/empty.js +1 -1
- package/es/table/base/globalStyleComponent.d.ts +4 -0
- package/es/table/base/globalStyleComponent.js +24 -0
- package/es/table/base/header.d.ts +0 -0
- package/es/table/base/header.js +0 -0
- package/es/table/base/helpers/SpanManager.d.ts +0 -0
- package/es/table/base/helpers/SpanManager.js +0 -0
- package/es/table/base/helpers/TableDOMUtils.d.ts +0 -0
- package/es/table/base/helpers/TableDOMUtils.js +0 -0
- package/es/table/base/helpers/__test__/SpanManager.test.d.ts +0 -0
- package/es/table/base/helpers/__test__/SpanManager.test.js +0 -0
- package/es/table/base/helpers/__test__/TableDOMUtils.test.d.ts +0 -0
- package/es/table/base/helpers/__test__/TableDOMUtils.test.js +0 -0
- package/es/table/base/helpers/__test__/rowHeightManager.test.d.ts +0 -0
- package/es/table/base/helpers/__test__/rowHeightManager.test.js +0 -0
- package/es/table/base/helpers/getRichVisibleRectsStream.d.ts +0 -0
- package/es/table/base/helpers/getRichVisibleRectsStream.js +0 -0
- package/es/table/base/helpers/rowHeightManager.d.ts +0 -0
- package/es/table/base/helpers/rowHeightManager.js +0 -0
- package/es/table/base/html-table.d.ts +0 -0
- package/es/table/base/html-table.js +0 -0
- package/es/table/base/index.d.ts +0 -0
- package/es/table/base/index.js +0 -0
- package/es/table/base/interfaces.d.ts +0 -0
- package/es/table/base/interfaces.js +0 -0
- package/es/table/base/loading.d.ts +0 -0
- package/es/table/base/loading.js +1 -1
- package/es/table/base/renderTemplates.d.ts +0 -0
- package/es/table/base/renderTemplates.js +11 -11
- package/es/table/base/styles.d.ts +10 -0
- package/es/table/base/styles.js +17 -7
- package/es/table/base/table.d.ts +0 -0
- package/es/table/base/table.js +5 -4
- package/es/table/base/utils.d.ts +0 -0
- package/es/table/base/utils.js +0 -0
- package/es/table/common-views.d.ts +0 -0
- package/es/table/common-views.js +0 -0
- package/es/table/index.d.ts +0 -0
- package/es/table/index.js +0 -0
- package/es/table/interfaces.d.ts +41 -0
- package/es/table/interfaces.js +0 -0
- package/es/table/internals.d.ts +0 -0
- package/es/table/internals.js +0 -0
- package/es/table/pipeline/const.d.ts +3 -0
- package/es/table/pipeline/const.js +3 -0
- package/es/table/pipeline/features/autoFill.d.ts +0 -0
- package/es/table/pipeline/features/autoFill.js +0 -0
- package/es/table/pipeline/features/autoRowSpan.d.ts +0 -0
- package/es/table/pipeline/features/autoRowSpan.js +0 -0
- package/es/table/pipeline/features/buildTree.d.ts +0 -0
- package/es/table/pipeline/features/buildTree.js +0 -0
- package/es/table/pipeline/features/colGroupExtendable.d.ts +0 -0
- package/es/table/pipeline/features/colGroupExtendable.js +0 -0
- package/es/table/pipeline/features/columnDrag.d.ts +0 -0
- package/es/table/pipeline/features/columnDrag.js +0 -0
- package/es/table/pipeline/features/columnFilter.d.ts +0 -0
- package/es/table/pipeline/features/columnFilter.js +0 -0
- package/es/table/pipeline/features/columnHover.d.ts +0 -0
- package/es/table/pipeline/features/columnHover.js +0 -0
- package/es/table/pipeline/features/columnRangeHover.d.ts +0 -0
- package/es/table/pipeline/features/columnRangeHover.js +0 -0
- package/es/table/pipeline/features/columnResizeWidth.d.ts +0 -0
- package/es/table/pipeline/features/columnResizeWidth.js +1 -1
- package/es/table/pipeline/features/contextMenu.d.ts +0 -0
- package/es/table/pipeline/features/contextMenu.js +0 -0
- package/es/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
- package/es/table/pipeline/features/featureApi/RowDragApi.js +66 -0
- package/es/table/pipeline/features/featureApi/utils.d.ts +2 -0
- package/es/table/pipeline/features/featureApi/utils.js +10 -0
- package/es/table/pipeline/features/filter/DefaultFilterContent.d.ts +0 -0
- package/es/table/pipeline/features/filter/DefaultFilterContent.js +1 -1
- package/es/table/pipeline/features/filter/DefaultFilterIcon.d.ts +0 -0
- package/es/table/pipeline/features/filter/DefaultFilterIcon.js +0 -0
- package/es/table/pipeline/features/filter/Filter.d.ts +0 -0
- package/es/table/pipeline/features/filter/Filter.js +1 -1
- package/es/table/pipeline/features/filter/FilterPanel.d.ts +0 -0
- package/es/table/pipeline/features/filter/FilterPanel.js +0 -0
- package/es/table/pipeline/features/filter/index.d.ts +0 -0
- package/es/table/pipeline/features/filter/index.js +0 -0
- package/es/table/pipeline/features/filter/util.d.ts +0 -0
- package/es/table/pipeline/features/filter/util.js +0 -0
- package/es/table/pipeline/features/footerDataSource.d.ts +0 -0
- package/es/table/pipeline/features/footerDataSource.js +0 -0
- package/es/table/pipeline/features/index.d.ts +0 -0
- package/es/table/pipeline/features/index.js +0 -0
- package/es/table/pipeline/features/mergeCellHover.d.ts +0 -0
- package/es/table/pipeline/features/mergeCellHover.js +0 -0
- package/es/table/pipeline/features/multiSelect.d.ts +0 -0
- package/es/table/pipeline/features/multiSelect.js +0 -0
- package/es/table/pipeline/features/rangeSelection.d.ts +0 -0
- package/es/table/pipeline/features/rangeSelection.js +0 -0
- package/es/table/pipeline/features/rowDetail.d.ts +0 -0
- package/es/table/pipeline/features/rowDetail.js +1 -1
- package/es/table/pipeline/features/rowDrag.d.ts +12 -12
- package/es/table/pipeline/features/rowDrag.js +523 -191
- package/es/table/pipeline/features/rowGrouping.d.ts +0 -0
- package/es/table/pipeline/features/rowGrouping.js +1 -1
- package/es/table/pipeline/features/singleSelect.d.ts +0 -0
- package/es/table/pipeline/features/singleSelect.js +0 -0
- package/es/table/pipeline/features/sort.d.ts +0 -0
- package/es/table/pipeline/features/sort.js +1 -1
- package/es/table/pipeline/features/tips.d.ts +0 -0
- package/es/table/pipeline/features/tips.js +1 -1
- package/es/table/pipeline/features/treeMode.d.ts +1 -0
- package/es/table/pipeline/features/treeMode.js +38 -10
- package/es/table/pipeline/features/treeSelect.d.ts +0 -0
- package/es/table/pipeline/features/treeSelect.js +0 -0
- package/es/table/pipeline/index.d.ts +0 -0
- package/es/table/pipeline/index.js +0 -0
- package/es/table/pipeline/pipeline.d.ts +3 -0
- package/es/table/pipeline/pipeline.js +23 -1
- package/es/table/pivot/cross-table/buildCrossTable.d.ts +0 -0
- package/es/table/pivot/cross-table/buildCrossTable.js +0 -0
- package/es/table/pivot/cross-table/constants.d.ts +0 -0
- package/es/table/pivot/cross-table/constants.js +0 -0
- package/es/table/pivot/cross-table/cross-table.d.ts +0 -0
- package/es/table/pivot/cross-table/cross-table.js +0 -0
- package/es/table/pivot/cross-table/index.d.ts +0 -0
- package/es/table/pivot/cross-table/index.js +0 -0
- package/es/table/pivot/cross-table/interfaces.d.ts +0 -0
- package/es/table/pivot/cross-table/interfaces.js +0 -0
- package/es/table/pivot/cross-table/internals.d.ts +0 -0
- package/es/table/pivot/cross-table/internals.js +0 -0
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +0 -0
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +0 -0
- package/es/table/pivot/cross-tree-table/cross-tree-table.d.ts +0 -0
- package/es/table/pivot/cross-tree-table/cross-tree-table.js +0 -0
- package/es/table/pivot/cross-tree-table/index.d.ts +0 -0
- package/es/table/pivot/cross-tree-table/index.js +0 -0
- package/es/table/pivot/pivot-utils/buildDrillTree.d.ts +0 -0
- package/es/table/pivot/pivot-utils/buildDrillTree.js +0 -0
- package/es/table/pivot/pivot-utils/builders.d.ts +0 -0
- package/es/table/pivot/pivot-utils/builders.js +0 -0
- package/es/table/pivot/pivot-utils/convert-utils.d.ts +0 -0
- package/es/table/pivot/pivot-utils/convert-utils.js +0 -0
- package/es/table/pivot/pivot-utils/index.d.ts +0 -0
- package/es/table/pivot/pivot-utils/index.js +0 -0
- package/es/table/pivot/pivot-utils/interfaces.d.ts +0 -0
- package/es/table/pivot/pivot-utils/interfaces.js +0 -0
- package/es/table/pivot/pivot-utils/simpleEncode.d.ts +0 -0
- package/es/table/pivot/pivot-utils/simpleEncode.js +0 -0
- package/es/table/style/css.js +0 -0
- package/es/table/style/index.css +0 -0
- package/es/table/style/index.d.ts +0 -0
- package/es/table/style/index.js +0 -0
- package/es/table/style/index.less +1 -1
- package/es/table/transforms/autoRowSpan.d.ts +0 -0
- package/es/table/transforms/autoRowSpan.js +0 -0
- package/es/table/transforms/autoWidth.d.ts +0 -0
- package/es/table/transforms/autoWidth.js +0 -0
- package/es/table/transforms/buildTree.d.ts +0 -0
- package/es/table/transforms/buildTree.js +0 -0
- package/es/table/transforms/columnHover.d.ts +0 -0
- package/es/table/transforms/columnHover.js +0 -0
- package/es/table/transforms/columnRangeHover.d.ts +0 -0
- package/es/table/transforms/columnRangeHover.js +0 -0
- package/es/table/transforms/columnResize.d.ts +0 -0
- package/es/table/transforms/columnResize.js +1 -1
- package/es/table/transforms/flatten.d.ts +0 -0
- package/es/table/transforms/flatten.js +0 -0
- package/es/table/transforms/index.d.ts +0 -0
- package/es/table/transforms/index.js +0 -0
- package/es/table/transforms/orderField.d.ts +0 -0
- package/es/table/transforms/orderField.js +0 -0
- package/es/table/transforms/sort.d.ts +0 -0
- package/es/table/transforms/sort.js +1 -1
- package/es/table/transforms/tips.d.ts +0 -0
- package/es/table/transforms/tips.js +1 -1
- package/es/table/transforms/treeMode.d.ts +0 -0
- package/es/table/transforms/treeMode.js +1 -1
- package/es/table/transforms/visible.d.ts +0 -0
- package/es/table/transforms/visible.js +0 -0
- package/es/table/transforms/warnTransformsDeprecated.d.ts +0 -0
- package/es/table/transforms/warnTransformsDeprecated.js +0 -0
- package/es/table/use/useResizeObserver.d.ts +0 -0
- package/es/table/use/useResizeObserver.js +0 -0
- package/es/table/utils/applyTransforms.d.ts +0 -0
- package/es/table/utils/applyTransforms.js +0 -0
- package/es/table/utils/browserType.d.ts +0 -0
- package/es/table/utils/browserType.js +0 -0
- package/es/table/utils/buildTree.d.ts +0 -0
- package/es/table/utils/buildTree.js +0 -0
- package/es/table/utils/collectNodes.d.ts +0 -0
- package/es/table/utils/collectNodes.js +0 -0
- package/es/table/utils/console.d.ts +0 -0
- package/es/table/utils/console.js +0 -0
- package/es/table/utils/copyToClipboard.d.ts +0 -0
- package/es/table/utils/copyToClipboard.js +0 -0
- package/es/table/utils/element.d.ts +0 -0
- package/es/table/utils/element.js +0 -0
- package/es/table/utils/exportTableAsExcel.d.ts +0 -0
- package/es/table/utils/exportTableAsExcel.js +0 -0
- package/es/table/utils/getTreeDepth.d.ts +0 -0
- package/es/table/utils/getTreeDepth.js +0 -0
- package/es/table/utils/groupBy.d.ts +0 -0
- package/es/table/utils/groupBy.js +0 -0
- package/es/table/utils/index.d.ts +0 -0
- package/es/table/utils/index.js +0 -0
- package/es/table/utils/isGroupColumn.d.ts +0 -0
- package/es/table/utils/isGroupColumn.js +0 -0
- package/es/table/utils/isLeafNode.d.ts +0 -0
- package/es/table/utils/isLeafNode.js +0 -0
- package/es/table/utils/keyCode.d.ts +0 -0
- package/es/table/utils/keyCode.js +0 -0
- package/es/table/utils/layeredFilter.d.ts +0 -0
- package/es/table/utils/layeredFilter.js +0 -0
- package/es/table/utils/layeredSort.d.ts +0 -0
- package/es/table/utils/layeredSort.js +0 -0
- package/es/table/utils/makeRecursiveMapper.d.ts +0 -0
- package/es/table/utils/makeRecursiveMapper.js +0 -0
- package/es/table/utils/mergeCellProps.d.ts +0 -0
- package/es/table/utils/mergeCellProps.js +0 -0
- package/es/table/utils/others.d.ts +0 -0
- package/es/table/utils/others.js +0 -0
- package/es/table/utils/proto.d.ts +0 -0
- package/es/table/utils/proto.js +0 -0
- package/es/table/utils/selectColumn.d.ts +0 -0
- package/es/table/utils/selectColumn.js +0 -0
- package/es/table/utils/smartCompare.d.ts +0 -0
- package/es/table/utils/smartCompare.js +0 -0
- package/es/table/utils/traverseColumn.d.ts +0 -0
- package/es/table/utils/traverseColumn.js +0 -0
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +0 -0
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +0 -0
- package/es/table/utils/tree-data-helpers/TreeDataHelper.d.ts +0 -0
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +0 -0
- package/es/table/utils/uiDegrade.d.ts +0 -0
- package/es/table/utils/uiDegrade.js +0 -0
- package/lib/_utils/arrayUtil.d.ts +0 -0
- package/lib/_utils/arrayUtil.js +0 -0
- package/lib/_utils/devwarning.d.ts +0 -0
- package/lib/_utils/devwarning.js +0 -0
- package/lib/_utils/formatUtil.d.ts +0 -0
- package/lib/_utils/formatUtil.js +0 -0
- package/lib/_utils/hooks.d.ts +0 -0
- package/lib/_utils/hooks.js +0 -0
- package/lib/_utils/index.d.ts +0 -0
- package/lib/_utils/index.js +0 -0
- package/lib/_utils/numberUtil.d.ts +0 -0
- package/lib/_utils/numberUtil.js +0 -0
- package/lib/_utils/omit.d.ts +0 -0
- package/lib/_utils/omit.js +0 -0
- package/lib/_utils/react-children.d.ts +0 -0
- package/lib/_utils/react-children.js +0 -0
- package/lib/_utils/type.d.ts +0 -0
- package/lib/_utils/type.js +0 -0
- package/lib/_utils/usePopper.d.ts +0 -0
- package/lib/_utils/usePopper.js +0 -0
- package/lib/config-provider/ConfigContext.d.ts +0 -0
- package/lib/config-provider/ConfigContext.js +0 -0
- package/lib/config-provider/compDefaultProps.d.ts +0 -0
- package/lib/config-provider/compDefaultProps.js +0 -0
- package/lib/config-provider/configProvider.d.ts +0 -0
- package/lib/config-provider/configProvider.js +0 -0
- package/lib/config-provider/defaultConfig.d.ts +0 -0
- package/lib/config-provider/defaultConfig.js +0 -0
- package/lib/config-provider/index.d.ts +0 -0
- package/lib/config-provider/index.js +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/locale/index.d.ts +0 -0
- package/lib/locale/index.js +0 -0
- package/lib/locale/locale.d.ts +0 -0
- package/lib/locale/locale.js +2 -2
- package/lib/locale/zh-CN.d.ts +0 -0
- package/lib/locale/zh-CN.js +0 -0
- package/lib/style/color/colors.less +1 -1
- package/lib/style/components.less +1 -1
- package/lib/style/core/index.less +1 -1
- package/lib/style/core/motion/other.less +27 -27
- package/lib/style/core/motion/slide.less +53 -53
- package/lib/style/core/motion.less +1 -1
- package/lib/style/core/reset.less +185 -185
- package/lib/style/css.js +0 -0
- package/lib/style/index.css +0 -0
- package/lib/style/index.d.ts +0 -0
- package/lib/style/index.js +0 -0
- package/lib/style/index.less +1 -1
- package/lib/style/mixins/index.less +18 -18
- package/lib/style/mixins/overlay.less +21 -21
- package/lib/style/mixins/reset.less +12 -12
- package/lib/style/themes/default.less +445 -445
- package/lib/style/themes/index.less +0 -0
- package/lib/table/base/calculations.d.ts +0 -0
- package/lib/table/base/calculations.js +0 -0
- package/lib/table/base/colgroup.d.ts +0 -0
- package/lib/table/base/colgroup.js +0 -0
- package/lib/table/base/empty.d.ts +0 -0
- package/lib/table/base/empty.js +1 -1
- package/lib/table/base/globalStyleComponent.d.ts +4 -0
- package/lib/table/base/globalStyleComponent.js +35 -0
- package/lib/table/base/header.d.ts +0 -0
- package/lib/table/base/header.js +0 -0
- package/lib/table/base/helpers/SpanManager.d.ts +0 -0
- package/lib/table/base/helpers/SpanManager.js +0 -0
- package/lib/table/base/helpers/TableDOMUtils.d.ts +0 -0
- package/lib/table/base/helpers/TableDOMUtils.js +0 -0
- package/lib/table/base/helpers/__test__/SpanManager.test.d.ts +0 -0
- package/lib/table/base/helpers/__test__/SpanManager.test.js +0 -0
- package/lib/table/base/helpers/__test__/TableDOMUtils.test.d.ts +0 -0
- package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +0 -0
- package/lib/table/base/helpers/__test__/rowHeightManager.test.d.ts +0 -0
- package/lib/table/base/helpers/__test__/rowHeightManager.test.js +0 -0
- package/lib/table/base/helpers/getRichVisibleRectsStream.d.ts +0 -0
- package/lib/table/base/helpers/getRichVisibleRectsStream.js +0 -0
- package/lib/table/base/helpers/rowHeightManager.d.ts +0 -0
- package/lib/table/base/helpers/rowHeightManager.js +0 -0
- package/lib/table/base/html-table.d.ts +0 -0
- package/lib/table/base/html-table.js +0 -0
- package/lib/table/base/index.d.ts +0 -0
- package/lib/table/base/index.js +0 -0
- package/lib/table/base/interfaces.d.ts +0 -0
- package/lib/table/base/interfaces.js +0 -0
- package/lib/table/base/loading.d.ts +0 -0
- package/lib/table/base/loading.js +1 -1
- package/lib/table/base/renderTemplates.d.ts +0 -0
- package/lib/table/base/renderTemplates.js +11 -11
- package/lib/table/base/styles.d.ts +10 -0
- package/lib/table/base/styles.js +17 -7
- package/lib/table/base/table.d.ts +0 -0
- package/lib/table/base/table.js +5 -4
- package/lib/table/base/utils.d.ts +0 -0
- package/lib/table/base/utils.js +0 -0
- package/lib/table/common-views.d.ts +0 -0
- package/lib/table/common-views.js +0 -0
- package/lib/table/index.d.ts +0 -0
- package/lib/table/index.js +0 -0
- package/lib/table/interfaces.d.ts +41 -0
- package/lib/table/interfaces.js +0 -0
- package/lib/table/internals.d.ts +0 -0
- package/lib/table/internals.js +0 -0
- package/lib/table/pipeline/const.d.ts +3 -0
- package/lib/table/pipeline/const.js +9 -0
- package/lib/table/pipeline/features/autoFill.d.ts +0 -0
- package/lib/table/pipeline/features/autoFill.js +0 -0
- package/lib/table/pipeline/features/autoRowSpan.d.ts +0 -0
- package/lib/table/pipeline/features/autoRowSpan.js +0 -0
- package/lib/table/pipeline/features/buildTree.d.ts +0 -0
- package/lib/table/pipeline/features/buildTree.js +0 -0
- package/lib/table/pipeline/features/colGroupExtendable.d.ts +0 -0
- package/lib/table/pipeline/features/colGroupExtendable.js +0 -0
- package/lib/table/pipeline/features/columnDrag.d.ts +0 -0
- package/lib/table/pipeline/features/columnDrag.js +0 -0
- package/lib/table/pipeline/features/columnFilter.d.ts +0 -0
- package/lib/table/pipeline/features/columnFilter.js +0 -0
- package/lib/table/pipeline/features/columnHover.d.ts +0 -0
- package/lib/table/pipeline/features/columnHover.js +0 -0
- package/lib/table/pipeline/features/columnRangeHover.d.ts +0 -0
- package/lib/table/pipeline/features/columnRangeHover.js +0 -0
- package/lib/table/pipeline/features/columnResizeWidth.d.ts +0 -0
- package/lib/table/pipeline/features/columnResizeWidth.js +1 -1
- package/lib/table/pipeline/features/contextMenu.d.ts +0 -0
- package/lib/table/pipeline/features/contextMenu.js +0 -0
- package/lib/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
- package/lib/table/pipeline/features/featureApi/RowDragApi.js +72 -0
- package/lib/table/pipeline/features/featureApi/utils.d.ts +2 -0
- package/lib/table/pipeline/features/featureApi/utils.js +17 -0
- package/lib/table/pipeline/features/filter/DefaultFilterContent.d.ts +0 -0
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +1 -1
- package/lib/table/pipeline/features/filter/DefaultFilterIcon.d.ts +0 -0
- package/lib/table/pipeline/features/filter/DefaultFilterIcon.js +0 -0
- package/lib/table/pipeline/features/filter/Filter.d.ts +0 -0
- package/lib/table/pipeline/features/filter/Filter.js +1 -1
- package/lib/table/pipeline/features/filter/FilterPanel.d.ts +0 -0
- package/lib/table/pipeline/features/filter/FilterPanel.js +0 -0
- package/lib/table/pipeline/features/filter/index.d.ts +0 -0
- package/lib/table/pipeline/features/filter/index.js +0 -0
- package/lib/table/pipeline/features/filter/util.d.ts +0 -0
- package/lib/table/pipeline/features/filter/util.js +0 -0
- package/lib/table/pipeline/features/footerDataSource.d.ts +0 -0
- package/lib/table/pipeline/features/footerDataSource.js +0 -0
- package/lib/table/pipeline/features/index.d.ts +0 -0
- package/lib/table/pipeline/features/index.js +0 -0
- package/lib/table/pipeline/features/mergeCellHover.d.ts +0 -0
- package/lib/table/pipeline/features/mergeCellHover.js +0 -0
- package/lib/table/pipeline/features/multiSelect.d.ts +0 -0
- package/lib/table/pipeline/features/multiSelect.js +0 -0
- package/lib/table/pipeline/features/rangeSelection.d.ts +0 -0
- package/lib/table/pipeline/features/rangeSelection.js +0 -0
- package/lib/table/pipeline/features/rowDetail.d.ts +0 -0
- package/lib/table/pipeline/features/rowDetail.js +1 -1
- package/lib/table/pipeline/features/rowDrag.d.ts +12 -12
- package/lib/table/pipeline/features/rowDrag.js +524 -192
- package/lib/table/pipeline/features/rowGrouping.d.ts +0 -0
- package/lib/table/pipeline/features/rowGrouping.js +1 -1
- package/lib/table/pipeline/features/singleSelect.d.ts +0 -0
- package/lib/table/pipeline/features/singleSelect.js +0 -0
- package/lib/table/pipeline/features/sort.d.ts +0 -0
- package/lib/table/pipeline/features/sort.js +1 -1
- package/lib/table/pipeline/features/tips.d.ts +0 -0
- package/lib/table/pipeline/features/tips.js +1 -1
- package/lib/table/pipeline/features/treeMode.d.ts +1 -0
- package/lib/table/pipeline/features/treeMode.js +39 -10
- package/lib/table/pipeline/features/treeSelect.d.ts +0 -0
- package/lib/table/pipeline/features/treeSelect.js +0 -0
- package/lib/table/pipeline/index.d.ts +0 -0
- package/lib/table/pipeline/index.js +0 -0
- package/lib/table/pipeline/pipeline.d.ts +3 -0
- package/lib/table/pipeline/pipeline.js +23 -1
- package/lib/table/pivot/cross-table/buildCrossTable.d.ts +0 -0
- package/lib/table/pivot/cross-table/buildCrossTable.js +0 -0
- package/lib/table/pivot/cross-table/constants.d.ts +0 -0
- package/lib/table/pivot/cross-table/constants.js +0 -0
- package/lib/table/pivot/cross-table/cross-table.d.ts +0 -0
- package/lib/table/pivot/cross-table/cross-table.js +0 -0
- package/lib/table/pivot/cross-table/index.d.ts +0 -0
- package/lib/table/pivot/cross-table/index.js +0 -0
- package/lib/table/pivot/cross-table/interfaces.d.ts +0 -0
- package/lib/table/pivot/cross-table/interfaces.js +0 -0
- package/lib/table/pivot/cross-table/internals.d.ts +0 -0
- package/lib/table/pivot/cross-table/internals.js +0 -0
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.d.ts +0 -0
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +0 -0
- package/lib/table/pivot/cross-tree-table/cross-tree-table.d.ts +0 -0
- package/lib/table/pivot/cross-tree-table/cross-tree-table.js +0 -0
- package/lib/table/pivot/cross-tree-table/index.d.ts +0 -0
- package/lib/table/pivot/cross-tree-table/index.js +0 -0
- package/lib/table/pivot/pivot-utils/buildDrillTree.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/buildDrillTree.js +0 -0
- package/lib/table/pivot/pivot-utils/builders.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/builders.js +0 -0
- package/lib/table/pivot/pivot-utils/convert-utils.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/convert-utils.js +0 -0
- package/lib/table/pivot/pivot-utils/index.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/index.js +0 -0
- package/lib/table/pivot/pivot-utils/interfaces.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/interfaces.js +0 -0
- package/lib/table/pivot/pivot-utils/simpleEncode.d.ts +0 -0
- package/lib/table/pivot/pivot-utils/simpleEncode.js +0 -0
- package/lib/table/style/css.js +0 -0
- package/lib/table/style/index.css +0 -0
- package/lib/table/style/index.d.ts +0 -0
- package/lib/table/style/index.js +0 -0
- package/lib/table/style/index.less +1 -1
- package/lib/table/transforms/autoRowSpan.d.ts +0 -0
- package/lib/table/transforms/autoRowSpan.js +0 -0
- package/lib/table/transforms/autoWidth.d.ts +0 -0
- package/lib/table/transforms/autoWidth.js +0 -0
- package/lib/table/transforms/buildTree.d.ts +0 -0
- package/lib/table/transforms/buildTree.js +0 -0
- package/lib/table/transforms/columnHover.d.ts +0 -0
- package/lib/table/transforms/columnHover.js +0 -0
- package/lib/table/transforms/columnRangeHover.d.ts +0 -0
- package/lib/table/transforms/columnRangeHover.js +0 -0
- package/lib/table/transforms/columnResize.d.ts +0 -0
- package/lib/table/transforms/columnResize.js +1 -1
- package/lib/table/transforms/flatten.d.ts +0 -0
- package/lib/table/transforms/flatten.js +0 -0
- package/lib/table/transforms/index.d.ts +0 -0
- package/lib/table/transforms/index.js +0 -0
- package/lib/table/transforms/orderField.d.ts +0 -0
- package/lib/table/transforms/orderField.js +0 -0
- package/lib/table/transforms/sort.d.ts +0 -0
- package/lib/table/transforms/sort.js +1 -1
- package/lib/table/transforms/tips.d.ts +0 -0
- package/lib/table/transforms/tips.js +1 -1
- package/lib/table/transforms/treeMode.d.ts +0 -0
- package/lib/table/transforms/treeMode.js +1 -1
- package/lib/table/transforms/visible.d.ts +0 -0
- package/lib/table/transforms/visible.js +0 -0
- package/lib/table/transforms/warnTransformsDeprecated.d.ts +0 -0
- package/lib/table/transforms/warnTransformsDeprecated.js +0 -0
- package/lib/table/use/useResizeObserver.d.ts +0 -0
- package/lib/table/use/useResizeObserver.js +0 -0
- package/lib/table/utils/applyTransforms.d.ts +0 -0
- package/lib/table/utils/applyTransforms.js +0 -0
- package/lib/table/utils/browserType.d.ts +0 -0
- package/lib/table/utils/browserType.js +0 -0
- package/lib/table/utils/buildTree.d.ts +0 -0
- package/lib/table/utils/buildTree.js +0 -0
- package/lib/table/utils/collectNodes.d.ts +0 -0
- package/lib/table/utils/collectNodes.js +0 -0
- package/lib/table/utils/console.d.ts +0 -0
- package/lib/table/utils/console.js +0 -0
- package/lib/table/utils/copyToClipboard.d.ts +0 -0
- package/lib/table/utils/copyToClipboard.js +0 -0
- package/lib/table/utils/element.d.ts +0 -0
- package/lib/table/utils/element.js +0 -0
- package/lib/table/utils/exportTableAsExcel.d.ts +0 -0
- package/lib/table/utils/exportTableAsExcel.js +0 -0
- package/lib/table/utils/getTreeDepth.d.ts +0 -0
- package/lib/table/utils/getTreeDepth.js +0 -0
- package/lib/table/utils/groupBy.d.ts +0 -0
- package/lib/table/utils/groupBy.js +0 -0
- package/lib/table/utils/index.d.ts +0 -0
- package/lib/table/utils/index.js +0 -0
- package/lib/table/utils/isGroupColumn.d.ts +0 -0
- package/lib/table/utils/isGroupColumn.js +0 -0
- package/lib/table/utils/isLeafNode.d.ts +0 -0
- package/lib/table/utils/isLeafNode.js +0 -0
- package/lib/table/utils/keyCode.d.ts +0 -0
- package/lib/table/utils/keyCode.js +0 -0
- package/lib/table/utils/layeredFilter.d.ts +0 -0
- package/lib/table/utils/layeredFilter.js +0 -0
- package/lib/table/utils/layeredSort.d.ts +0 -0
- package/lib/table/utils/layeredSort.js +0 -0
- package/lib/table/utils/makeRecursiveMapper.d.ts +0 -0
- package/lib/table/utils/makeRecursiveMapper.js +0 -0
- package/lib/table/utils/mergeCellProps.d.ts +0 -0
- package/lib/table/utils/mergeCellProps.js +0 -0
- package/lib/table/utils/others.d.ts +0 -0
- package/lib/table/utils/others.js +0 -0
- package/lib/table/utils/proto.d.ts +0 -0
- package/lib/table/utils/proto.js +0 -0
- package/lib/table/utils/selectColumn.d.ts +0 -0
- package/lib/table/utils/selectColumn.js +0 -0
- package/lib/table/utils/smartCompare.d.ts +0 -0
- package/lib/table/utils/smartCompare.js +0 -0
- package/lib/table/utils/traverseColumn.d.ts +0 -0
- package/lib/table/utils/traverseColumn.js +0 -0
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.d.ts +0 -0
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +0 -0
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.d.ts +0 -0
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +0 -0
- package/lib/table/utils/uiDegrade.d.ts +0 -0
- package/lib/table/utils/uiDegrade.js +0 -0
- package/package.json +218 -218
|
File without changes
|
|
@@ -152,7 +152,7 @@ function rowGrouping() {
|
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
154
|
return (0, _concat.default)(_context3 = [(0, _extends3.default)((0, _extends3.default)({}, firstCol), {
|
|
155
|
-
title: (
|
|
155
|
+
title: (/*#__PURE__*/_react.default.createElement("div", {
|
|
156
156
|
style: {
|
|
157
157
|
display: 'inline-block',
|
|
158
158
|
marginLeft: textOffset
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -77,7 +77,7 @@ function DefaultSortHeaderCell(_ref2) {
|
|
|
77
77
|
className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.Classes.tableSortIcon, true), "active", sortOrder === 'desc' || sortOrder === 'asc')),
|
|
78
78
|
size: 16,
|
|
79
79
|
order: sortOrder
|
|
80
|
-
}), sortOptions.mode === 'multiple' && sortIndex !== -1 && (
|
|
80
|
+
}), sortOptions.mode === 'multiple' && sortIndex !== -1 && (/*#__PURE__*/_react.default.createElement("div", {
|
|
81
81
|
style: {
|
|
82
82
|
userSelect: 'none',
|
|
83
83
|
marginLeft: 2,
|
|
File without changes
|
|
@@ -28,7 +28,7 @@ function tips() {
|
|
|
28
28
|
}
|
|
29
29
|
var justifyContent = col.align === 'right' ? 'flex-end' : col.align === 'center' ? 'center' : 'flex-start';
|
|
30
30
|
return (0, _extends2.default)((0, _extends2.default)({}, col), {
|
|
31
|
-
title: (
|
|
31
|
+
title: (/*#__PURE__*/_react.default.createElement(HeaderCellWithTips, {
|
|
32
32
|
style: {
|
|
33
33
|
justifyContent: justifyContent
|
|
34
34
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TablePipeline } from '../pipeline';
|
|
3
3
|
export declare const treeMetaSymbol: unique symbol;
|
|
4
|
+
export declare const treeModeOptionsKey = "treeModeOptions";
|
|
4
5
|
interface ExpandIconProps extends React.DOMAttributes<Element> {
|
|
5
6
|
expanded: boolean;
|
|
6
7
|
style: React.CSSProperties;
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
});
|
|
11
11
|
exports.treeMetaSymbol = void 0;
|
|
12
12
|
exports.treeMode = treeMode;
|
|
13
|
+
exports.treeModeOptionsKey = void 0;
|
|
13
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
14
15
|
var _extends3 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
15
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
@@ -25,9 +26,10 @@ var _internals = require("../../internals");
|
|
|
25
26
|
var _utils = require("../../utils");
|
|
26
27
|
var _styles = require("../../base/styles");
|
|
27
28
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol2 && _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; } } }; }
|
|
28
|
-
function _unsupportedIterableToArray(r, a) { if (r) { var
|
|
29
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context3; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context3 = {}.toString.call(r)).call(_context3, 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; } }
|
|
29
30
|
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; }
|
|
30
31
|
var treeMetaSymbol = exports.treeMetaSymbol = (0, _symbol.default)('treeMetaSymbol');
|
|
32
|
+
var treeModeOptionsKey = exports.treeModeOptionsKey = 'treeModeOptions';
|
|
31
33
|
function treeMode() {
|
|
32
34
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
35
|
return function treeModeStep(pipeline) {
|
|
@@ -65,16 +67,36 @@ function treeMode() {
|
|
|
65
67
|
var iconIndent = (_g = opts.iconIndent) !== null && _g !== void 0 ? _g : ctx.indents.iconIndent;
|
|
66
68
|
var iconGap = (_h = opts.iconGap) !== null && _h !== void 0 ? _h : ctx.indents.iconGap;
|
|
67
69
|
var indentSize = (_j = opts.indentSize) !== null && _j !== void 0 ? _j : ctx.indents.indentSize;
|
|
70
|
+
pipeline.setFeatureOptions(treeModeOptionsKey, {
|
|
71
|
+
iconWidth: iconWidth,
|
|
72
|
+
iconIndent: iconIndent,
|
|
73
|
+
iconGap: iconGap,
|
|
74
|
+
indentSize: indentSize,
|
|
75
|
+
treeMetaKey: treeMetaKey,
|
|
76
|
+
isExpanded: function isExpanded(rowKey) {
|
|
77
|
+
return openKeySet.has(rowKey);
|
|
78
|
+
},
|
|
79
|
+
onExpand: function onExpand(rowKey) {
|
|
80
|
+
var _context2;
|
|
81
|
+
onChangeOpenKeys((0, _concat.default)(_context2 = []).call(_context2, (0, _toConsumableArray2.default)(openKeys), [rowKey]), rowKey, 'expand');
|
|
82
|
+
},
|
|
83
|
+
onCollapse: function onCollapse(rowKey) {
|
|
84
|
+
onChangeOpenKeys((0, _filter.default)(openKeys).call(openKeys, function (key) {
|
|
85
|
+
return key !== rowKey;
|
|
86
|
+
}), rowKey, 'collapse');
|
|
87
|
+
}
|
|
88
|
+
});
|
|
68
89
|
var Icon = opts.icon;
|
|
69
90
|
return pipeline.mapDataSource(processDataSource).mapColumns(processColumns);
|
|
70
91
|
function processDataSource(input) {
|
|
71
92
|
if (pipeline.isSameInputDataSource() && openKeys === pipeline.getFeatureOptions('lastOpenKeys')) {
|
|
72
93
|
return pipeline.getFeatureOptions('lastTreeMode');
|
|
73
94
|
}
|
|
74
|
-
pipeline.setFeatureOptions('lastOpenKeys', pipeline.getStateAtKey(stateKey));
|
|
95
|
+
pipeline.setFeatureOptions('lastOpenKeys', pipeline.getStateAtKey(stateKey) || openKeys);
|
|
75
96
|
var result = [];
|
|
76
97
|
dfs(input, 0);
|
|
77
98
|
function dfs(nodes, depth) {
|
|
99
|
+
var parentNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
78
100
|
if (nodes == null) {
|
|
79
101
|
return;
|
|
80
102
|
}
|
|
@@ -84,6 +106,7 @@ function treeMode() {
|
|
|
84
106
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
107
|
var node = _step.value;
|
|
86
108
|
var rowKey = _internals.internals.safeGetRowKey(primaryKey, node, -1);
|
|
109
|
+
var parentRowKey = parentNode ? _internals.internals.safeGetRowKey(primaryKey, parentNode, -1) : null;
|
|
87
110
|
var expanded = openKeySet.has(rowKey);
|
|
88
111
|
var isLeaf = isLeafNode(node, {
|
|
89
112
|
depth: depth,
|
|
@@ -94,11 +117,12 @@ function treeMode() {
|
|
|
94
117
|
depth: depth,
|
|
95
118
|
isLeaf: isLeaf,
|
|
96
119
|
expanded: expanded,
|
|
97
|
-
rowKey: rowKey
|
|
120
|
+
rowKey: rowKey,
|
|
121
|
+
parentRowKey: parentRowKey
|
|
98
122
|
};
|
|
99
123
|
result.push((0, _extends3.default)((0, _defineProperty2.default)({}, treeMetaKey, treeMeta), node));
|
|
100
124
|
if (!isLeaf && expanded) {
|
|
101
|
-
dfs(node.children, depth + 1);
|
|
125
|
+
dfs(node.children, depth + 1, node);
|
|
102
126
|
}
|
|
103
127
|
}
|
|
104
128
|
} catch (err) {
|
|
@@ -175,15 +199,19 @@ function treeMode() {
|
|
|
175
199
|
};
|
|
176
200
|
var getCellProps = function getCellProps(value, record, rowIndex) {
|
|
177
201
|
var prevProps = _internals.internals.safeGetCellProps(expandCol, record, rowIndex);
|
|
178
|
-
if (record[treeMetaKey] == null) {
|
|
202
|
+
if (record[treeMetaKey] == null || clickArea !== 'cell') {
|
|
179
203
|
// 没有 treeMeta 信息的话,就返回原先的 cellProps
|
|
180
|
-
return prevProps
|
|
204
|
+
return (0, _utils.mergeCellProps)(prevProps, {
|
|
205
|
+
className: _styles.Classes.tableExtendCell
|
|
206
|
+
});
|
|
181
207
|
}
|
|
182
208
|
var _record$treeMetaKey2 = record[treeMetaKey],
|
|
183
209
|
isLeaf = _record$treeMetaKey2.isLeaf,
|
|
184
210
|
rowKey = _record$treeMetaKey2.rowKey;
|
|
185
211
|
if (isLeaf) {
|
|
186
|
-
return prevProps
|
|
212
|
+
return (0, _utils.mergeCellProps)(prevProps, {
|
|
213
|
+
className: _styles.Classes.tableExtendCell
|
|
214
|
+
});
|
|
187
215
|
}
|
|
188
216
|
return (0, _utils.mergeCellProps)(prevProps, {
|
|
189
217
|
onClick: function onClick(e) {
|
|
@@ -194,18 +222,19 @@ function treeMode() {
|
|
|
194
222
|
},
|
|
195
223
|
style: {
|
|
196
224
|
cursor: 'pointer'
|
|
197
|
-
}
|
|
225
|
+
},
|
|
226
|
+
className: _styles.Classes.tableExtendCell
|
|
198
227
|
});
|
|
199
228
|
};
|
|
200
229
|
columns[expandColIndex] = (0, _extends3.default)((0, _extends3.default)({}, expandCol), {
|
|
201
|
-
title: (
|
|
230
|
+
title: (/*#__PURE__*/_react.default.createElement("span", {
|
|
202
231
|
style: {
|
|
203
232
|
marginLeft: iconIndent + iconWidth + iconGap,
|
|
204
233
|
display: 'flex'
|
|
205
234
|
}
|
|
206
235
|
}, _internals.internals.safeRenderHeader(expandCol))),
|
|
207
236
|
render: render,
|
|
208
|
-
getCellProps:
|
|
237
|
+
getCellProps: getCellProps
|
|
209
238
|
});
|
|
210
239
|
return (0, _toConsumableArray2.default)(columns);
|
|
211
240
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -90,6 +90,9 @@ export declare class TablePipeline {
|
|
|
90
90
|
setFeatureOptions(optionKey: string, value: any): void;
|
|
91
91
|
/** 获取 BaseTable 的 props,结果中包含 dataSource/columns/primaryKey/getRowProps 四个字段 */
|
|
92
92
|
getProps(this: TablePipeline): TableProps;
|
|
93
|
+
getFeatureApi(featureName: string): any;
|
|
94
|
+
addFeatureApi(featureName: string): any;
|
|
95
|
+
getLastPipeline(): any;
|
|
93
96
|
}
|
|
94
97
|
export declare function useTablePipeline(ctx?: Partial<TablePipelineCtx>): TablePipeline;
|
|
95
98
|
export {};
|
|
@@ -16,6 +16,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpe
|
|
|
16
16
|
var _react = require("react");
|
|
17
17
|
var _utils = require("../utils");
|
|
18
18
|
var _autoFill = require("./features/autoFill");
|
|
19
|
+
var _utils2 = require("./features/featureApi/utils");
|
|
19
20
|
/**
|
|
20
21
|
* 表格数据处理流水线。TablePipeline 提供了表格数据处理过程中的一些上下方与工具方法,包括……
|
|
21
22
|
*
|
|
@@ -132,6 +133,7 @@ var TablePipeline = exports.TablePipeline = /*#__PURE__*/function () {
|
|
|
132
133
|
this._isSameInputDataSource = _input.dataSource === this.ref.current._lastInputDataSource;
|
|
133
134
|
this._dataSource = _input.dataSource;
|
|
134
135
|
this.ref.current._lastInputDataSource = _input.dataSource;
|
|
136
|
+
this.ref.current.lastPipeline = this;
|
|
135
137
|
this._columns = (0, _map.default)(_context = _input.columns).call(_context, function (col) {
|
|
136
138
|
return (0, _extends3.default)((0, _extends3.default)({}, col), {
|
|
137
139
|
key: _this.guid()
|
|
@@ -262,6 +264,25 @@ var TablePipeline = exports.TablePipeline = /*#__PURE__*/function () {
|
|
|
262
264
|
};
|
|
263
265
|
return result;
|
|
264
266
|
}
|
|
267
|
+
}, {
|
|
268
|
+
key: "getFeatureApi",
|
|
269
|
+
value: function getFeatureApi(featureName) {
|
|
270
|
+
var _a;
|
|
271
|
+
return (_a = this.ref.current.featureApi) === null || _a === void 0 ? void 0 : _a[featureName];
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
key: "addFeatureApi",
|
|
275
|
+
value: function addFeatureApi(featureName) {
|
|
276
|
+
if (!this.getFeatureApi(featureName)) {
|
|
277
|
+
this.ref.current.featureApi[featureName] = (0, _utils2.createFeatureApi)(featureName, this);
|
|
278
|
+
}
|
|
279
|
+
return this.ref.current.featureApi[featureName];
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
key: "getLastPipeline",
|
|
283
|
+
value: function getLastPipeline() {
|
|
284
|
+
return this.ref.current.lastPipeline;
|
|
285
|
+
}
|
|
265
286
|
}]);
|
|
266
287
|
}();
|
|
267
288
|
TablePipeline.defaultIndents = {
|
|
@@ -276,7 +297,8 @@ function useTablePipeline(ctx) {
|
|
|
276
297
|
state = _useState2[0],
|
|
277
298
|
setState = _useState2[1];
|
|
278
299
|
var ref = (0, _react.useRef)({
|
|
279
|
-
featureOptions: {}
|
|
300
|
+
featureOptions: {},
|
|
301
|
+
featureApi: {}
|
|
280
302
|
});
|
|
281
303
|
return new TablePipeline({
|
|
282
304
|
state: state,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/table/style/css.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/table/style/index.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -85,7 +85,7 @@ function makeColumnResizeTransform(_ref) {
|
|
|
85
85
|
var prevTitle = _internals.internals.safeRenderHeader(col);
|
|
86
86
|
return (0, _extends2.default)((0, _extends2.default)({}, col), {
|
|
87
87
|
width: sizes[range.start],
|
|
88
|
-
title: (
|
|
88
|
+
title: (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, prevTitle, /*#__PURE__*/_react.default.createElement(ResizeHandle, {
|
|
89
89
|
className: "resize-handle",
|
|
90
90
|
onMouseDown: function onMouseDown(e) {
|
|
91
91
|
return startResize(range.start, e);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -89,7 +89,7 @@ function DefaultSortHeaderCell(_ref2) {
|
|
|
89
89
|
},
|
|
90
90
|
size: 16,
|
|
91
91
|
order: sortOrder
|
|
92
|
-
}), sortOptions.mode === 'multiple' && sortIndex != -1 && (
|
|
92
|
+
}), sortOptions.mode === 'multiple' && sortIndex != -1 && (/*#__PURE__*/_react.default.createElement("div", {
|
|
93
93
|
style: {
|
|
94
94
|
userSelect: 'none',
|
|
95
95
|
marginLeft: 2,
|
|
File without changes
|
|
@@ -27,7 +27,7 @@ function makeTipsTransform(_ref) {
|
|
|
27
27
|
}
|
|
28
28
|
var justifyContent = col.align === 'right' ? 'flex-end' : col.align === 'center' ? 'center' : 'flex-start';
|
|
29
29
|
return (0, _extends2.default)((0, _extends2.default)({}, col), {
|
|
30
|
-
title: (
|
|
30
|
+
title: (/*#__PURE__*/_react.default.createElement(HeaderCellWithTips, {
|
|
31
31
|
style: {
|
|
32
32
|
justifyContent: justifyContent
|
|
33
33
|
}
|
|
File without changes
|
|
@@ -197,7 +197,7 @@ function makeTreeModeTransform(_ref) {
|
|
|
197
197
|
});
|
|
198
198
|
};
|
|
199
199
|
return (0, _concat.default)(_context2 = [(0, _extends3.default)((0, _extends3.default)({}, firstCol), {
|
|
200
|
-
title: (
|
|
200
|
+
title: (/*#__PURE__*/_react.default.createElement("span", {
|
|
201
201
|
style: {
|
|
202
202
|
marginLeft: iconIndent + ICON_WIDTH + iconGap
|
|
203
203
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/table/utils/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/table/utils/proto.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|