@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,132 @@
|
|
|
1
|
+
export declare const LOCK_SHADOW_PADDING = 20;
|
|
2
|
+
export declare const Classes: {
|
|
3
|
+
/** BaseTable 表格组件的外层包裹 div */
|
|
4
|
+
readonly artTableWrapper: string;
|
|
5
|
+
readonly artTable: string;
|
|
6
|
+
readonly tableHeader: string;
|
|
7
|
+
readonly tableBody: string;
|
|
8
|
+
readonly virtual: string;
|
|
9
|
+
readonly tableFooter: string;
|
|
10
|
+
/** 表格行 */
|
|
11
|
+
readonly tableRow: string;
|
|
12
|
+
/** 表头行 */
|
|
13
|
+
readonly tableHeaderRow: string;
|
|
14
|
+
/** 单元格 */
|
|
15
|
+
readonly tableCell: string;
|
|
16
|
+
/** 表头的单元格 */
|
|
17
|
+
readonly tableHeaderCell: string;
|
|
18
|
+
readonly tableHeaderCellContent: string;
|
|
19
|
+
readonly tableHeaderCellResize: string;
|
|
20
|
+
readonly virtualBlank: string;
|
|
21
|
+
readonly stickyScroll: string;
|
|
22
|
+
readonly stickyScrollItem: string;
|
|
23
|
+
readonly horizontalScrollContainer: string;
|
|
24
|
+
readonly lockShadowMask: string;
|
|
25
|
+
readonly lockShadow: string;
|
|
26
|
+
readonly leftLockShadow: string;
|
|
27
|
+
readonly rightLockShadow: string;
|
|
28
|
+
/** 数据为空时表格内容的外层 div */
|
|
29
|
+
readonly emptyWrapper: string;
|
|
30
|
+
readonly loadingWrapper: string;
|
|
31
|
+
readonly loadingContentWrapper: string;
|
|
32
|
+
readonly loadingIndicatorWrapper: string;
|
|
33
|
+
readonly loadingIndicator: string;
|
|
34
|
+
readonly tableHeaderCellLine: string;
|
|
35
|
+
readonly tableFilterTrigger: string;
|
|
36
|
+
readonly tableSortIcon: string;
|
|
37
|
+
readonly button: string;
|
|
38
|
+
readonly buttonPrimary: string;
|
|
39
|
+
readonly filterIcon: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const MenuClasses: {
|
|
42
|
+
menu: string;
|
|
43
|
+
menuList: string;
|
|
44
|
+
menuOption: string;
|
|
45
|
+
menuOptionActive: string;
|
|
46
|
+
menuOptionText: string;
|
|
47
|
+
};
|
|
48
|
+
export declare type BaseTableCSSVariables = Partial<{
|
|
49
|
+
/** 表格一行的高度,注意该属性将被作为 CSS variable,不能使用数字作为简写 */
|
|
50
|
+
'--row-height': string;
|
|
51
|
+
/** 表格的字体颜色 */
|
|
52
|
+
'--color': string;
|
|
53
|
+
/** 表格背景颜色 */
|
|
54
|
+
'--bgcolor': string;
|
|
55
|
+
/** 鼠标悬停时的背景色 */
|
|
56
|
+
'--hover-bgcolor': string;
|
|
57
|
+
/** 单元格高亮时的背景色 */
|
|
58
|
+
'--highlight-bgcolor': string;
|
|
59
|
+
/** 主题色 */
|
|
60
|
+
'--primary-color': string;
|
|
61
|
+
/** 主题色浅色1,浅色选中、悬浮 */
|
|
62
|
+
'--primary-color-level1': string;
|
|
63
|
+
/** 主题色浅色2,深色选中、悬浮 */
|
|
64
|
+
'--primary-color-level2': string;
|
|
65
|
+
/**图标默认颜色 */
|
|
66
|
+
'--icon-color': string;
|
|
67
|
+
/**边框颜色 */
|
|
68
|
+
'--strong-border-color': string;
|
|
69
|
+
/** 表头中一行的高度,注意该属性将被作为 CSS variable,不能使用数字作为简写 */
|
|
70
|
+
'--header-row-height': string;
|
|
71
|
+
/** 表头中的字体颜色 */
|
|
72
|
+
'--header-color': string;
|
|
73
|
+
/** 表头的背景色 */
|
|
74
|
+
'--header-bgcolor': string;
|
|
75
|
+
/** 表头上鼠标悬停时的背景色 */
|
|
76
|
+
'--header-hover-bgcolor': string;
|
|
77
|
+
/** 表头上单元格高亮时的背景色 */
|
|
78
|
+
'--header-highlight-bgcolor': string;
|
|
79
|
+
/** 单元格 padding */
|
|
80
|
+
'--cell-padding': string;
|
|
81
|
+
/** 字体大小 */
|
|
82
|
+
'--font-size': string;
|
|
83
|
+
/** 表格内字体的行高 */
|
|
84
|
+
'--line-height': string;
|
|
85
|
+
/** 锁列阴影,默认为 rgba(152, 152, 152, 0.5) 0 0 6px 2px */
|
|
86
|
+
'--lock-shadow': string;
|
|
87
|
+
/** 单元格的边框颜色 */
|
|
88
|
+
'--border-color': string;
|
|
89
|
+
/** 单元格边框,默认为 1px solid #dfe3e8 */
|
|
90
|
+
'--cell-border': string;
|
|
91
|
+
/** 单元格上下边框,默认为 #dfe3e8 */
|
|
92
|
+
'--cell-border-horizontal': string;
|
|
93
|
+
/** 单元格左右边框,默认为 #dfe3e8 */
|
|
94
|
+
'--cell-border-vertical': string;
|
|
95
|
+
/** 表头单元格边框,默认为 1px solid #dfe3e8 */
|
|
96
|
+
'--header-cell-border': string;
|
|
97
|
+
/** 表头单元格上下边框,默认为 1px solid #dfe3e8 */
|
|
98
|
+
'--header-cell-border-horizontal': string;
|
|
99
|
+
/** 表头单元格左右边框,默认为 1px solid #dfe3e8 */
|
|
100
|
+
'--header-cell-border-vertical': string;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const defaultCSSVariables: {
|
|
103
|
+
'--row-height': string;
|
|
104
|
+
'--color': string;
|
|
105
|
+
'--bgcolor': string;
|
|
106
|
+
'--hover-bgcolor': string;
|
|
107
|
+
'--highlight-bgcolor': string;
|
|
108
|
+
'--primary-color': string;
|
|
109
|
+
'--primary-color-level1': string;
|
|
110
|
+
'--primary-color-level2': string;
|
|
111
|
+
'--icon-color': string;
|
|
112
|
+
'--strong-border-color': string;
|
|
113
|
+
'--header-row-height': string;
|
|
114
|
+
'--header-color': string;
|
|
115
|
+
'--header-bgcolor': string;
|
|
116
|
+
'--header-hover-bgcolor': string;
|
|
117
|
+
'--header-highlight-bgcolor': string;
|
|
118
|
+
'--cell-padding': string;
|
|
119
|
+
'--font-size': string;
|
|
120
|
+
'--line-height': string;
|
|
121
|
+
'--lock-shadow': string;
|
|
122
|
+
'--border-color': string;
|
|
123
|
+
'--cell-border': string;
|
|
124
|
+
'--cell-border-horizontal': string;
|
|
125
|
+
'---cell-border-vertical': string;
|
|
126
|
+
'--header-cell-border': string;
|
|
127
|
+
'--header-cell-border-horizontal': string;
|
|
128
|
+
'--header-cell-border-vertical': string;
|
|
129
|
+
};
|
|
130
|
+
export declare const variableConst: string;
|
|
131
|
+
export declare const StyledArtTableWrapper: any;
|
|
132
|
+
export declare const ButtonCSS: any;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ButtonCSS = exports.StyledArtTableWrapper = exports.variableConst = exports.defaultCSSVariables = exports.MenuClasses = exports.Classes = exports.LOCK_SHADOW_PADDING = void 0;
|
|
11
|
+
|
|
12
|
+
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
13
|
+
|
|
14
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
15
|
+
|
|
16
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
17
|
+
|
|
18
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/taggedTemplateLiteral"));
|
|
19
|
+
|
|
20
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
+
|
|
22
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
23
|
+
|
|
24
|
+
var LOCK_SHADOW_PADDING = 20;
|
|
25
|
+
exports.LOCK_SHADOW_PADDING = LOCK_SHADOW_PADDING;
|
|
26
|
+
var prefix = 'kd-';
|
|
27
|
+
var Classes = {
|
|
28
|
+
/** BaseTable 表格组件的外层包裹 div */
|
|
29
|
+
artTableWrapper: "".concat(prefix, "table-wrapper"),
|
|
30
|
+
artTable: "".concat(prefix, "table"),
|
|
31
|
+
tableHeader: "".concat(prefix, "table-header"),
|
|
32
|
+
tableBody: "".concat(prefix, "table-body"),
|
|
33
|
+
virtual: "".concat(prefix, "virtual"),
|
|
34
|
+
tableFooter: "".concat(prefix, "table-footer"),
|
|
35
|
+
|
|
36
|
+
/** 表格行 */
|
|
37
|
+
tableRow: "".concat(prefix, "table-row"),
|
|
38
|
+
|
|
39
|
+
/** 表头行 */
|
|
40
|
+
tableHeaderRow: "".concat(prefix, "table-header-row"),
|
|
41
|
+
|
|
42
|
+
/** 单元格 */
|
|
43
|
+
tableCell: "".concat(prefix, "table-cell"),
|
|
44
|
+
|
|
45
|
+
/** 表头的单元格 */
|
|
46
|
+
tableHeaderCell: "".concat(prefix, "table-header-cell"),
|
|
47
|
+
tableHeaderCellContent: "".concat(prefix, "table-header-cell-content"),
|
|
48
|
+
tableHeaderCellResize: "".concat(prefix, "table-header-cell-resize"),
|
|
49
|
+
virtualBlank: "".concat(prefix, "virtual-blank"),
|
|
50
|
+
stickyScroll: "".concat(prefix, "sticky-scroll"),
|
|
51
|
+
stickyScrollItem: "".concat(prefix, "sticky-scroll-item"),
|
|
52
|
+
horizontalScrollContainer: "".concat(prefix, "horizontal-scroll-container"),
|
|
53
|
+
lockShadowMask: "".concat(prefix, "lock-shadow-mask"),
|
|
54
|
+
lockShadow: "".concat(prefix, "lock-shadow"),
|
|
55
|
+
leftLockShadow: "".concat(prefix, "left-lock-shadow"),
|
|
56
|
+
rightLockShadow: "".concat(prefix, "right-lock-shadow"),
|
|
57
|
+
|
|
58
|
+
/** 数据为空时表格内容的外层 div */
|
|
59
|
+
emptyWrapper: "".concat(prefix, "empty-wrapper"),
|
|
60
|
+
loadingWrapper: "".concat(prefix, "loading-wrapper"),
|
|
61
|
+
loadingContentWrapper: "".concat(prefix, "loading-content-wrapper"),
|
|
62
|
+
loadingIndicatorWrapper: "".concat(prefix, "loading-indicator-wrapper"),
|
|
63
|
+
loadingIndicator: "".concat(prefix, "loading-indicator"),
|
|
64
|
+
tableHeaderCellLine: "".concat(prefix, "table-header-cell-line"),
|
|
65
|
+
tableFilterTrigger: "".concat(prefix, "filter-trigger"),
|
|
66
|
+
tableSortIcon: "".concat(prefix, "sort-icon"),
|
|
67
|
+
button: "".concat(prefix, "btn"),
|
|
68
|
+
buttonPrimary: "".concat(prefix, "btn-primary"),
|
|
69
|
+
filterIcon: "".concat(prefix, "filter-icon")
|
|
70
|
+
};
|
|
71
|
+
exports.Classes = Classes;
|
|
72
|
+
var MenuClasses = {
|
|
73
|
+
menu: "".concat(prefix, "table-menu"),
|
|
74
|
+
menuList: "".concat(prefix, "table-menu-list"),
|
|
75
|
+
menuOption: "".concat(prefix, "table-menu-option"),
|
|
76
|
+
menuOptionActive: "".concat(prefix, "table-menu-option-active"),
|
|
77
|
+
menuOptionText: "".concat(prefix, "table-menu-option-text")
|
|
78
|
+
};
|
|
79
|
+
exports.MenuClasses = MenuClasses;
|
|
80
|
+
var Z = {
|
|
81
|
+
lock: 5,
|
|
82
|
+
header: 15,
|
|
83
|
+
footer: 10,
|
|
84
|
+
lockShadow: 20,
|
|
85
|
+
scrollItem: 30,
|
|
86
|
+
loadingIndicator: 40
|
|
87
|
+
};
|
|
88
|
+
var outerBorderStyleMixin = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-top: 1px solid #cccccc;\n border-right: 1px solid #cccccc;\n border-bottom: 1px solid #cccccc;\n border-left: 1px solid #cccccc;\n\n td.first,\n th.first {\n border-left: none;\n }\n td.last,\n th.last {\n --border-right: none;\n }\n\n thead tr.first th,\n tbody tr.first td {\n border-top: none;\n }\n &.has-footer tfoot tr.last td {\n border-bottom: none;\n }\n &:not(.has-footer) tbody tr.last td {\n border-bottom: none;\n }\n td.row-span:not(.first){\n border-left: var(---cell-border-vertical);\n }\n td.row-span:not(.last){\n border-right: var(---cell-border-vertical);\n }\n"])));
|
|
89
|
+
var defaultCSSVariables = {
|
|
90
|
+
'--row-height': '48px',
|
|
91
|
+
'--color': '#333',
|
|
92
|
+
'--bgcolor': 'white',
|
|
93
|
+
'--hover-bgcolor': 'var(--hover-color, #F2F6FF)',
|
|
94
|
+
'--highlight-bgcolor': '#eee',
|
|
95
|
+
'--primary-color': '#5582F3',
|
|
96
|
+
'--primary-color-level1': 'rgb(242, 248, 255)',
|
|
97
|
+
'--primary-color-level2': 'rgb(135, 173, 255)',
|
|
98
|
+
'--icon-color': '#bfbfbf',
|
|
99
|
+
'--strong-border-color': '#d9d9d9',
|
|
100
|
+
'--header-row-height': '32px',
|
|
101
|
+
'--header-color': '#333',
|
|
102
|
+
'--header-bgcolor': '#f4f4f4',
|
|
103
|
+
'--header-hover-bgcolor': '#ddd',
|
|
104
|
+
'--header-highlight-bgcolor': '#e4e8ed',
|
|
105
|
+
'--cell-padding': '8px 12px',
|
|
106
|
+
'--font-size': '12px',
|
|
107
|
+
'--line-height': '1.28571',
|
|
108
|
+
'--lock-shadow': 'rgba(152, 152, 152, 0.5) 0 0 6px 2px',
|
|
109
|
+
'--border-color': '#dfe3e8',
|
|
110
|
+
'--cell-border': '1px solid #dfe3e8',
|
|
111
|
+
'--cell-border-horizontal': '1px solid #dfe3e8',
|
|
112
|
+
'---cell-border-vertical': '1px solid #dfe3e8',
|
|
113
|
+
'--header-cell-border': '1px solid #dfe3e8',
|
|
114
|
+
'--header-cell-border-horizontal': '1px solid #dfe3e8',
|
|
115
|
+
'--header-cell-border-vertical': '1px solid #dfe3e8'
|
|
116
|
+
};
|
|
117
|
+
exports.defaultCSSVariables = defaultCSSVariables;
|
|
118
|
+
var variableConst = getCssVariableText(defaultCSSVariables);
|
|
119
|
+
exports.variableConst = variableConst;
|
|
120
|
+
|
|
121
|
+
var StyledArtTableWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n :root {\n ", "\n }\n ", "\n\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n cursor: default;\n color: var(--color);\n font-size: var(--font-size);\n line-height: var(--line-height);\n position: relative;\n\n // \u8868\u683C\u5916\u8FB9\u6846\u7531 art-table-wrapper \u63D0\u4F9B\uFF0C\u800C\u4E0D\u662F\u7531\u5355\u5143\u683C\u63D0\u4F9B\n &.use-outer-border {\n ", ";\n }\n\n .no-scrollbar {\n ::-webkit-scrollbar {\n display: none;\n }\n }\n\n .", " {\n overflow: auto;\n flex-shrink: 1;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n }\n\n .", " {\n overflow: hidden;\n background: var(--header-bgcolor);\n display: flex;\n flex-shrink: 0;\n border-bottom: var(--header-cell-border-horizontal);\n }\n\n .", " {\n display: flex;\n justify-content: center;\n align-items: center;\n height: inherit;\n }\n\n .", " {\n overflow: hidden;\n flex-shrink: 0;\n flex-grow: 0;\n }\n\n .", " {\n flex: none;\n }\n .", ", .", " {\n background: var(--bgcolor);\n overflow: auto;\n overflow-x: hidden;\n overflow-anchor: none;\n &.empty {\n position: relative;\n }\n }\n\n .", " {\n position: relative;\n transform: translate(0px);\n }\n\n &.sticky-header .", " {\n position: sticky;\n top: 0;\n z-index: ", ";\n }\n\n &.sticky-footer .", " {\n position: sticky;\n bottom: 0;\n z-index: ", ";\n }\n\n table {\n width: 0;\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0;\n display: table;\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n flex-grow: 0;\n }\n\n // \u5728 tr \u4E0A\u8BBE\u7F6E .no-hover \u53EF\u4EE5\u7981\u7528\u9F20\u6807\u60AC\u505C\u6548\u679C\n tr:not(.no-hover):hover > td {\n background: var(--hover-bgcolor);\n }\n // \u5728 tr \u8BBE\u7F6E highlight \u53EF\u4EE5\u4E3A\u5E95\u4E0B\u7684 td \u8BBE\u7F6E\u4E3A\u9AD8\u4EAE\u8272\n // \u800C\u8BBE\u7F6E .no-highlight \u7684\u8BDD\u5219\u53EF\u4EE5\u7981\u7528\u9AD8\u4EAE\u6548\u679C\uFF1B\n tr:not(.no-highlight).highlight > td {\n background: var(--highlight-bgcolor);\n }\n\n th {\n font-weight: normal;\n text-align: left;\n padding: var(--cell-padding);\n height: var(--header-row-height);\n color: var(--header-color);\n background: var(--header-bgcolor);\n border: none;\n border-right: var(--header-cell-border-vertical);\n border-bottom: var(--header-cell-border-horizontal);\n position: relative;\n }\n\n th.resizeable{\n border-right:none\n }\n\n th.leaf {\n border-right: none;\n border-bottom: none;\n }\n\n tr.first th {\n border-top: var(--header-cell-border-horizontal);\n }\n th.first {\n border-left: var(--header-cell-border-vertical);\n }\n\n td {\n padding: var(--cell-padding);\n background: var(--bgcolor);\n height: var(--row-height);\n border: none;\n border-right: var(--cell-border-vertical);\n border-bottom: var(--cell-border-horizontal);\n word-break: break-all;\n }\n td.first {\n border-left: var(--cell-border-vertical);\n }\n tr.first td {\n border-top: var(--cell-border-horizontal);\n }\n &.has-header tbody tr.first td {\n border-top: none;\n }\n &.has-footer tbody tr.last td {\n border-bottom: none;\n }\n\n .lock-left,\n .lock-right {\n z-index: ", ";\n }\n\n //#region \u9501\u5217\u9634\u5F71\n .", " {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: ", ";\n pointer-events: none;\n overflow: hidden;\n\n .", " {\n height: 100%;\n }\n\n .", " {\n margin-right: ", "px;\n box-shadow: none;\n\n &.show-shadow {\n box-shadow: var(--lock-shadow);\n border-right: var(--cell-border-vertical);\n }\n }\n\n .", " {\n margin-left: ", "px;\n box-shadow: none;\n\n &.show-shadow {\n box-shadow: var(--lock-shadow);\n border-left: var(--cell-border-vertical);\n }\n }\n }\n //#endregion\n\n //#region \u7A7A\u8868\u683C\u5C55\u73B0\n .", " {\n pointer-events: none;\n color: #99a3b3;\n font-size: 12px;\n text-align: center;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n .empty-image {\n width: 50px;\n height: 50px;\n }\n\n .empty-tips {\n margin-top: 16px;\n line-height: 1.5;\n }\n }\n //#endregion\n\n //#region \u7C98\u6027\u6EDA\u52A8\u6761\n .", " {\n overflow-y: hidden;\n overflow-x: auto;\n z-index: ", ";\n flex-shrink: 0;\n flex-grow: 0;\n }\n\n .", " {\n // \u5FC5\u987B\u6709\u9AD8\u5EA6\u624D\u80FD\u51FA\u73B0\u6EDA\u52A8\u6761\n height: 1px;\n visibility: hidden;\n }\n //#endregion\n\n //#region \u52A0\u8F7D\u6837\u5F0F\n .", " {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: auto;\n\n .", " {\n filter: none;\n width: 100%;\n height: 100%;\n overflow: auto;\n display: flex;\n position: relative;\n flex-direction: column;\n }\n\n .", " {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n }\n\n .", " {\n position: sticky;\n z-index: ", ";\n transform: translateY(-50%);\n }\n }\n //#endregion\n \n //#region \u8868\u683C\u8FC7\u6EE4\n .", " {\n color:var(--icon-color);\n &.active{\n color:var(--primary-color);\n }\n }\n //#endregion\n\n //#region \u8868\u683C\u6392\u5E8F\n .", " {\n color:var(--icon-color);\n &.active{\n color:var(--primary-color);\n }\n }\n //#endregion\n "])), variableConst, variableConst, outerBorderStyleMixin, Classes.artTable, Classes.tableHeader, Classes.tableHeaderCellContent, Classes.virtual, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableRow, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingContentWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator, Classes.tableFilterTrigger, Classes.tableSortIcon);
|
|
122
|
+
|
|
123
|
+
exports.StyledArtTableWrapper = StyledArtTableWrapper;
|
|
124
|
+
var ButtonCSS = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n //#region \u6309\u94AE\n .", "{\n color: var(--color);\n background:#ffffff;\n border:1px solid var(--strong-border-color);\n border-radius: 2px;\n cursor: pointer;\n &:hover{\n color: var(--primary-color);\n border:1px solid var(--primary-color);\n }\n }\n .", " {\n color:#ffffff;\n background-color: var(--primary-color);\n border:none;\n &:hover{\n color:#ffffff;\n background-color: var(--primary-color-level2);\n border:none;\n }\n }\n//#endregion\n"])), variableConst, Classes.button, Classes.buttonPrimary);
|
|
125
|
+
exports.ButtonCSS = ButtonCSS;
|
|
126
|
+
|
|
127
|
+
function getCssVariableText(obj) {
|
|
128
|
+
var _context;
|
|
129
|
+
|
|
130
|
+
return (0, _reduce.default)(_context = (0, _keys.default)(obj)).call(_context, function (acc, key) {
|
|
131
|
+
var _context2;
|
|
132
|
+
|
|
133
|
+
acc += (0, _concat.default)(_context2 = "".concat(key, ":")).call(_context2, obj[key], ";");
|
|
134
|
+
return acc;
|
|
135
|
+
}, '');
|
|
136
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { noop } from 'rxjs';
|
|
3
|
+
import { ArtColumn } from '../interfaces';
|
|
4
|
+
import { TableDOMHelper } from './helpers/TableDOMUtils';
|
|
5
|
+
import { ResolvedUseVirtual, VerticalRenderRange, VirtualEnum } from './interfaces';
|
|
6
|
+
import { LoadingContentWrapperProps } from './loading';
|
|
7
|
+
import { BaseTableCSSVariables } from './styles';
|
|
8
|
+
export declare type PrimaryKey = string | ((record: any) => string);
|
|
9
|
+
export interface BaseTableProps {
|
|
10
|
+
/** 主键 */
|
|
11
|
+
primaryKey?: PrimaryKey;
|
|
12
|
+
/** 表格展示的数据源 */
|
|
13
|
+
dataSource: any[];
|
|
14
|
+
/** 表格页脚数据源 */
|
|
15
|
+
footerDataSource?: any[];
|
|
16
|
+
/** 表格的列配置 */
|
|
17
|
+
columns: ArtColumn[];
|
|
18
|
+
/** 是否开启虚拟滚动 */
|
|
19
|
+
useVirtual?: VirtualEnum | {
|
|
20
|
+
horizontal?: VirtualEnum;
|
|
21
|
+
vertical?: VirtualEnum;
|
|
22
|
+
header?: VirtualEnum;
|
|
23
|
+
};
|
|
24
|
+
/** 虚拟滚动开启情况下,表格中每一行的预估高度 */
|
|
25
|
+
estimatedRowHeight?: number;
|
|
26
|
+
/** @deprecated 表格头部是否置顶,默认为 true。请使用 isStickyHeader 代替 */
|
|
27
|
+
isStickyHead?: boolean;
|
|
28
|
+
/** 表格头部是否置顶,默认为 true */
|
|
29
|
+
isStickyHeader?: boolean;
|
|
30
|
+
/** 表格置顶后,距离顶部的距离 */
|
|
31
|
+
stickyTop?: number;
|
|
32
|
+
/** 表格页脚是否置底,默认为 true */
|
|
33
|
+
isStickyFooter?: boolean;
|
|
34
|
+
/** 表格页脚置底后,距离底部的距离 */
|
|
35
|
+
stickyBottom?: number;
|
|
36
|
+
/** 自定义类名 */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** 自定义内联样式 */
|
|
39
|
+
style?: CSSProperties & BaseTableCSSVariables;
|
|
40
|
+
/** 表格是否具有头部 */
|
|
41
|
+
hasHeader?: boolean;
|
|
42
|
+
/** 表格是否具有横向的粘性滚动条 */
|
|
43
|
+
hasStickyScroll?: boolean;
|
|
44
|
+
/** 横向粘性滚动条高度 */
|
|
45
|
+
stickyScrollHeight?: 'auto' | number;
|
|
46
|
+
/** 使用来自外层 div 的边框代替单元格的外边框 */
|
|
47
|
+
useOuterBorder?: boolean;
|
|
48
|
+
/** 表格是否在加载中 */
|
|
49
|
+
isLoading?: boolean;
|
|
50
|
+
/** 数据为空时,单元格的高度 */
|
|
51
|
+
emptyCellHeight?: number;
|
|
52
|
+
/** @deprecated 数据为空时,表格的展示内容。请使用 components.EmptyContent 代替 */
|
|
53
|
+
emptyContent?: ReactNode;
|
|
54
|
+
/** 覆盖表格内部用到的组件 */
|
|
55
|
+
components?: {
|
|
56
|
+
/** 表格加载时,表格内容的父组件 */
|
|
57
|
+
LoadingContentWrapper?: React.ComponentType<LoadingContentWrapperProps>;
|
|
58
|
+
/** 表格加载时的加载图标 */
|
|
59
|
+
LoadingIcon?: React.ComponentType;
|
|
60
|
+
/** 数据为空时,表格的展示内容。 */
|
|
61
|
+
EmptyContent?: React.ComponentType;
|
|
62
|
+
};
|
|
63
|
+
/** 列的默认宽度 */
|
|
64
|
+
defaultColumnWidth?: number;
|
|
65
|
+
/** 表格所处于的块格式化上下文(BFC)
|
|
66
|
+
* https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Block_formatting_context */
|
|
67
|
+
flowRoot?: 'auto' | 'self' | (() => HTMLElement | typeof window) | HTMLElement | typeof window;
|
|
68
|
+
getRowProps?(record: any, rowIndex: number): React.HTMLAttributes<HTMLTableRowElement>;
|
|
69
|
+
getTableProps?(): React.HTMLAttributes<HTMLTableElement>;
|
|
70
|
+
setTableWidth?(tableWidth: number): void;
|
|
71
|
+
cssVariables?: {
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
};
|
|
74
|
+
enableCSSVariables?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface BaseTableState {
|
|
77
|
+
/** 是否要展示自定义滚动条(stickyScroll) */
|
|
78
|
+
hasScroll: boolean;
|
|
79
|
+
/** 是否存在纵向滚动条 */
|
|
80
|
+
hasScrollY: boolean;
|
|
81
|
+
/** 是否需要渲染 lock sections
|
|
82
|
+
* 当表格较宽时,所有的列都能被完整的渲染,此时不需要渲染 lock sections
|
|
83
|
+
* 只有当「整个表格的宽度」小于「每一列渲染宽度之和」时,lock sections 才需要被渲染 */
|
|
84
|
+
needRenderLock: boolean;
|
|
85
|
+
/** 纵向虚拟滚动偏移量 */
|
|
86
|
+
offsetY: number;
|
|
87
|
+
/** 纵向虚拟滚动 最大渲染尺寸 */
|
|
88
|
+
maxRenderHeight: number;
|
|
89
|
+
/** 横向虚拟滚动偏移量 */
|
|
90
|
+
offsetX: number;
|
|
91
|
+
/** 横向虚拟滚动 最大渲染尺寸 */
|
|
92
|
+
maxRenderWidth: number;
|
|
93
|
+
}
|
|
94
|
+
export declare class BaseTable extends React.Component<BaseTableProps, BaseTableState> {
|
|
95
|
+
static defaultProps: {
|
|
96
|
+
hasHeader: boolean;
|
|
97
|
+
isStickyHeader: boolean;
|
|
98
|
+
stickyTop: number;
|
|
99
|
+
footerDataSource: any[];
|
|
100
|
+
isStickyFooter: boolean;
|
|
101
|
+
stickyBottom: number;
|
|
102
|
+
hasStickyScroll: boolean;
|
|
103
|
+
stickyScrollHeight: string;
|
|
104
|
+
useVirtual: string;
|
|
105
|
+
estimatedRowHeight: number;
|
|
106
|
+
isLoading: boolean;
|
|
107
|
+
components: {};
|
|
108
|
+
getTableProps: typeof noop;
|
|
109
|
+
getRowProps: typeof noop;
|
|
110
|
+
flowRoot: string;
|
|
111
|
+
dataSource: any[];
|
|
112
|
+
useOuterBorder: boolean;
|
|
113
|
+
};
|
|
114
|
+
private rowHeightManager;
|
|
115
|
+
private artTableWrapperRef;
|
|
116
|
+
private domHelper;
|
|
117
|
+
private rootSubscription;
|
|
118
|
+
private lastInfo;
|
|
119
|
+
private props$;
|
|
120
|
+
private hasScrollY;
|
|
121
|
+
private resizeObserver?;
|
|
122
|
+
private resizeSubject;
|
|
123
|
+
/** @deprecated BaseTable.getDoms() 已经过时,请勿调用 */
|
|
124
|
+
getDoms(): TableDOMHelper;
|
|
125
|
+
constructor(props: Readonly<BaseTableProps>);
|
|
126
|
+
/** 自定义滚动条宽度为table宽度,使滚动条滑块宽度相同 */
|
|
127
|
+
private updateStickyScroll;
|
|
128
|
+
private renderTableHeader;
|
|
129
|
+
private updateOffsetX;
|
|
130
|
+
private syncHorizontalScrollFromTableBody;
|
|
131
|
+
/** 同步横向滚动偏移量 */
|
|
132
|
+
private syncHorizontalScroll;
|
|
133
|
+
getVerticalRenderRange(useVirtual: ResolvedUseVirtual): VerticalRenderRange;
|
|
134
|
+
private renderTableBody;
|
|
135
|
+
private renderTableFooter;
|
|
136
|
+
private renderLockShadows;
|
|
137
|
+
private renderStickyScroll;
|
|
138
|
+
render(): JSX.Element;
|
|
139
|
+
componentDidMount(): void;
|
|
140
|
+
componentDidUpdate(prevProps: Readonly<BaseTableProps>, prevState: Readonly<BaseTableState>): void;
|
|
141
|
+
private didMountOrUpdate;
|
|
142
|
+
private updateScrollLeftWhenLayoutChanged;
|
|
143
|
+
private initSubscriptions;
|
|
144
|
+
componentWillUnmount(): void;
|
|
145
|
+
/** 更新 DOM 节点的引用,方便其他方法直接操作 DOM */
|
|
146
|
+
private updateDOMHelper;
|
|
147
|
+
private updateRowHeightManager;
|
|
148
|
+
/** 计算表格所有列的渲染宽度之和,判断表格是否需要渲染锁列 */
|
|
149
|
+
private adjustNeedRenderLock;
|
|
150
|
+
}
|