@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,6 @@
|
|
|
1
|
+
import ConfigProvider from './configProvider';
|
|
2
|
+
import compDefaultProps from './compDefaultProps';
|
|
3
|
+
import ConfigContext from './ConfigContext';
|
|
4
|
+
import defaultConfig from './defaultConfig';
|
|
5
|
+
export { compDefaultProps, ConfigContext, defaultConfig };
|
|
6
|
+
export default ConfigProvider;
|
package/es/index.d.ts
ADDED
package/es/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import zhCNData from './zh-CN';
|
|
3
|
+
export declare type LocaleDataType = typeof zhCNData;
|
|
4
|
+
export declare type ComponentType = keyof LocaleDataType;
|
|
5
|
+
export interface LocaleConfigType {
|
|
6
|
+
locale: string;
|
|
7
|
+
localeData: LocaleDataType | any;
|
|
8
|
+
customGetLangMsg?: (componentName: string, labelName: string, params: any) => any;
|
|
9
|
+
}
|
|
10
|
+
export interface CompLangMsgParams {
|
|
11
|
+
componentName: string;
|
|
12
|
+
labels?: string[];
|
|
13
|
+
labelParams?: any;
|
|
14
|
+
}
|
|
15
|
+
interface ILocalesData {
|
|
16
|
+
[key: string]: LocaleDataType | any;
|
|
17
|
+
}
|
|
18
|
+
declare class LocaleCache {
|
|
19
|
+
localesData: ILocalesData;
|
|
20
|
+
locale: string;
|
|
21
|
+
constructor(localesData: ILocalesData, locale?: string);
|
|
22
|
+
/**
|
|
23
|
+
* 设置语言包并切换当前语言
|
|
24
|
+
* @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
|
|
25
|
+
* @returns 设置后的语言对应的语言包
|
|
26
|
+
*/
|
|
27
|
+
setLocalesData(locale: string, localeData?: LocaleDataType): {
|
|
28
|
+
locale: string;
|
|
29
|
+
'global.selectholder': string;
|
|
30
|
+
'global.placeholder': string;
|
|
31
|
+
'global.cancel': string;
|
|
32
|
+
'global.confirm': string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 获取当前语言包数据
|
|
36
|
+
*/
|
|
37
|
+
getLocalData(): any;
|
|
38
|
+
/**
|
|
39
|
+
* 获取当前语言类型
|
|
40
|
+
*/
|
|
41
|
+
getLocal(): string;
|
|
42
|
+
/**
|
|
43
|
+
* 获取所有语言包数据
|
|
44
|
+
*/
|
|
45
|
+
getLocalesData(): ILocalesData;
|
|
46
|
+
}
|
|
47
|
+
declare const localeCacher: LocaleCache;
|
|
48
|
+
export default localeCacher;
|
|
49
|
+
export declare const getLangMsg: (componentName: ComponentType | string, labelName: string, params?: any) => string | React.ReactNode[];
|
|
50
|
+
export declare const getCompLangMsg: (compLangMsgParams: CompLangMsgParams, customGetLangMsg?: (componentName: string, labelName: string, params: any) => any, localeDate?: any) => any;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
2
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
3
|
+
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
+
|
|
6
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof _Symbol === "undefined" || _getIteratorMethod(o) == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = _getIterator(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
7
|
+
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context2 = Object.prototype.toString.call(o)).call(_context2, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11
|
+
|
|
12
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
13
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
14
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
15
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
16
|
+
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
17
|
+
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import zhCNData from './zh-CN';
|
|
20
|
+
|
|
21
|
+
var LocaleCache = /*#__PURE__*/function () {
|
|
22
|
+
function LocaleCache(localesData, locale) {
|
|
23
|
+
_classCallCheck(this, LocaleCache);
|
|
24
|
+
|
|
25
|
+
this.locale = locale || zhCNData.locale;
|
|
26
|
+
this.localesData = localesData;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 设置语言包并切换当前语言
|
|
30
|
+
* @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
|
|
31
|
+
* @returns 设置后的语言对应的语言包
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
_createClass(LocaleCache, [{
|
|
36
|
+
key: "setLocalesData",
|
|
37
|
+
value: function setLocalesData(locale, localeData) {
|
|
38
|
+
var newLocaleData = localeData || this.localesData[locale];
|
|
39
|
+
|
|
40
|
+
if (!newLocaleData) {
|
|
41
|
+
console.error("\u7F3A\u5C11\u8BED\u8A00".concat(locale, "\u5BF9\u5E94\u7684\u8BED\u8A00\u5305\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u8BBE\u7F6E"));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
this.locale = locale;
|
|
46
|
+
this.localesData[locale] = newLocaleData;
|
|
47
|
+
return localeData;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 获取当前语言包数据
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
}, {
|
|
54
|
+
key: "getLocalData",
|
|
55
|
+
value: function getLocalData() {
|
|
56
|
+
return this.localesData[this.locale];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 获取当前语言类型
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
}, {
|
|
63
|
+
key: "getLocal",
|
|
64
|
+
value: function getLocal() {
|
|
65
|
+
return this.locale;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 获取所有语言包数据
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
}, {
|
|
72
|
+
key: "getLocalesData",
|
|
73
|
+
value: function getLocalesData() {
|
|
74
|
+
return this.localesData;
|
|
75
|
+
}
|
|
76
|
+
}]);
|
|
77
|
+
|
|
78
|
+
return LocaleCache;
|
|
79
|
+
}();
|
|
80
|
+
|
|
81
|
+
var localeCacher = new LocaleCache(_defineProperty({}, zhCNData.locale, zhCNData));
|
|
82
|
+
export default localeCacher;
|
|
83
|
+
export var getLangMsg = function getLangMsg(componentName, labelName, params) {
|
|
84
|
+
var _context;
|
|
85
|
+
|
|
86
|
+
var localData = localeCacher.getLocalData();
|
|
87
|
+
var msg = localData[_concatInstanceProperty(_context = "".concat(componentName, ".")).call(_context, labelName)] || localData["global.".concat(labelName)] || '';
|
|
88
|
+
return analysVariables(msg, params);
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* 解析模板字符串中的变量
|
|
92
|
+
* @param {*} msg
|
|
93
|
+
* @param {*} variables
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
function analysVariables(msg, variables) {
|
|
97
|
+
var reg = /{[\w\W]*?}/g;
|
|
98
|
+
var matchArr = msg.match(reg) || [];
|
|
99
|
+
|
|
100
|
+
var isObject = function isObject(value) {
|
|
101
|
+
return _typeof(value) === 'object' || typeof value === 'function';
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var getVarName = function getVarName(str) {
|
|
105
|
+
var len = str.length;
|
|
106
|
+
return _sliceInstanceProperty(str).call(str, 1, len - 1);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var stringVar = [];
|
|
110
|
+
var eleVar = [];
|
|
111
|
+
|
|
112
|
+
var _iterator = _createForOfIteratorHelper(matchArr),
|
|
113
|
+
_step;
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
117
|
+
var item = _step.value;
|
|
118
|
+
var varName = getVarName(item);
|
|
119
|
+
var value = variables[varName];
|
|
120
|
+
|
|
121
|
+
if (isObject(value)) {
|
|
122
|
+
eleVar.push({
|
|
123
|
+
k: varName,
|
|
124
|
+
v: value
|
|
125
|
+
});
|
|
126
|
+
} else {
|
|
127
|
+
stringVar.push({
|
|
128
|
+
k: varName,
|
|
129
|
+
v: value
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
} catch (err) {
|
|
134
|
+
_iterator.e(err);
|
|
135
|
+
} finally {
|
|
136
|
+
_iterator.f();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
msg = formatText(msg, stringVar);
|
|
140
|
+
var msgArr = [];
|
|
141
|
+
|
|
142
|
+
if (eleVar.length > 0) {
|
|
143
|
+
msgArr = formatElement(msg, variables);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return eleVar.length > 0 ? msgArr : msg;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* 替换基本类型的变量
|
|
150
|
+
* @param {*} msg
|
|
151
|
+
* @param {*} stringVar
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
function formatText(msg, stringVar) {
|
|
156
|
+
stringVar.forEach(function (item) {
|
|
157
|
+
var k = item.k,
|
|
158
|
+
v = item.v;
|
|
159
|
+
var reg = new RegExp('{' + k + '}', 'g');
|
|
160
|
+
msg = msg.replace(reg, v);
|
|
161
|
+
});
|
|
162
|
+
return msg;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* 替换React元素类型的变量
|
|
166
|
+
* @param {*} msg
|
|
167
|
+
* @param {*} eleVar
|
|
168
|
+
* @param {*} variables
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
function formatElement(msg, variables) {
|
|
173
|
+
var splitByElement = function splitByElement(msg) {
|
|
174
|
+
var array = [];
|
|
175
|
+
var item = {
|
|
176
|
+
t: 0,
|
|
177
|
+
v: ''
|
|
178
|
+
}; // 0-string 1-react
|
|
179
|
+
|
|
180
|
+
var len = msg.length;
|
|
181
|
+
msg.split('').forEach(function (c, i) {
|
|
182
|
+
if (c === '{') {
|
|
183
|
+
array.push(item);
|
|
184
|
+
item = {
|
|
185
|
+
t: 1,
|
|
186
|
+
v: ''
|
|
187
|
+
};
|
|
188
|
+
} else if (c === '}') {
|
|
189
|
+
array.push(item);
|
|
190
|
+
item = {
|
|
191
|
+
t: 0,
|
|
192
|
+
v: ''
|
|
193
|
+
};
|
|
194
|
+
} else {
|
|
195
|
+
item.v = item.v + c;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (i === len - 1) {
|
|
199
|
+
array.push(item);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
return array;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
var elements = [];
|
|
206
|
+
var eleArr = splitByElement(msg);
|
|
207
|
+
eleArr.forEach(function (item, index) {
|
|
208
|
+
var t = item.t,
|
|
209
|
+
v = item.v;
|
|
210
|
+
|
|
211
|
+
if (t === 0 && v !== '') {
|
|
212
|
+
elements.push( /*#__PURE__*/React.createElement("span", {
|
|
213
|
+
key: index
|
|
214
|
+
}, v));
|
|
215
|
+
} else if (t === 1) {
|
|
216
|
+
elements.push( /*#__PURE__*/React.cloneElement(variables[v], {
|
|
217
|
+
key: index
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
return elements;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export var getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {
|
|
225
|
+
var componentName = compLangMsgParams.componentName,
|
|
226
|
+
labels = compLangMsgParams.labels,
|
|
227
|
+
labelParams = compLangMsgParams.labelParams;
|
|
228
|
+
labels = labels || [];
|
|
229
|
+
labelParams = labelParams || {};
|
|
230
|
+
localeDate = localeDate || zhCNData;
|
|
231
|
+
|
|
232
|
+
if (!labels.length) {
|
|
233
|
+
for (var key in localeDate) {
|
|
234
|
+
var componentNameAndLabel = key.split('.');
|
|
235
|
+
|
|
236
|
+
if (componentName === componentNameAndLabel[0] && componentNameAndLabel[1]) {
|
|
237
|
+
labels.push(componentNameAndLabel[1]);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
var componentLangMsg = {};
|
|
243
|
+
labels.forEach(function (label) {
|
|
244
|
+
if (customGetLangMsg && typeof customGetLangMsg === 'function') {
|
|
245
|
+
componentLangMsg[label] = customGetLangMsg(componentName, label, labelParams[label] || {});
|
|
246
|
+
} else {
|
|
247
|
+
componentLangMsg[label] = getLangMsg(componentName, label, labelParams[label] || {});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
return componentLangMsg;
|
|
251
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@keyframes loadingcircle {
|
|
2
|
+
100% {
|
|
3
|
+
transform: rotate(360deg);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes waveEffect {
|
|
8
|
+
100% {
|
|
9
|
+
box-shadow: 0 0 0 6px @theme-color;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@keyframes fadeEffect {
|
|
14
|
+
100% {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes kdRadioEffect {
|
|
20
|
+
0% {
|
|
21
|
+
transform: translateY(-50%) scale(0.5);
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
100% {
|
|
25
|
+
transform: translateY(-50%) scale(1);
|
|
26
|
+
opacity: 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@keyframes kdSlideDownIn {
|
|
2
|
+
0% {
|
|
3
|
+
transform: scaleY(0.8);
|
|
4
|
+
transform-origin: 50% 0%;
|
|
5
|
+
opacity: 0;
|
|
6
|
+
}
|
|
7
|
+
100% {
|
|
8
|
+
transform: scaleY(1);
|
|
9
|
+
transform-origin: 50% 0%;
|
|
10
|
+
opacity: 1;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes kdSlideDownOut {
|
|
15
|
+
0% {
|
|
16
|
+
transform: scaleY(1);
|
|
17
|
+
transform-origin: 50% 0%;
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
transform: scaleY(0.9);
|
|
22
|
+
transform-origin: 50% 0%;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes kdSlideUpIn {
|
|
28
|
+
0% {
|
|
29
|
+
transform-origin: 50% 100%;
|
|
30
|
+
opacity: 0;
|
|
31
|
+
}
|
|
32
|
+
5% {
|
|
33
|
+
transform: scaleY(0.8);
|
|
34
|
+
}
|
|
35
|
+
100% {
|
|
36
|
+
transform: scaleY(1);
|
|
37
|
+
transform-origin: 50% 100%;
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes kdSlideUpOut {
|
|
43
|
+
0% {
|
|
44
|
+
transform: scaleY(1);
|
|
45
|
+
transform-origin: 50% 100%;
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
transform: scaleY(0.9);
|
|
50
|
+
transform-origin: 50% 100%;
|
|
51
|
+
opacity: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
2
|
+
|
|
3
|
+
/* normalize.css 和现有产品的结合版本, 根据兼容性进行了调整 */
|
|
4
|
+
/* Document
|
|
5
|
+
========================================================================== */
|
|
6
|
+
|
|
7
|
+
/* Sections
|
|
8
|
+
========================================================================== */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Remove the margin in all browsers.
|
|
12
|
+
*/
|
|
13
|
+
html,body {
|
|
14
|
+
height: 100%;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-size:12px;
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
html,body,input, textarea, select, button{
|
|
22
|
+
font-family:"Microsoft YaHei","PingFangSC-Regular","Helvetica Neue", Helvetica, Arial,"Hiragino Sans GB","WenQuanYi Micro Hei", sans-serif;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Remove the gray background on active links in IE 10.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* Forms
|
|
39
|
+
========================================================================== */
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*/
|
|
43
|
+
input {
|
|
44
|
+
padding: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 1. Change the font styles in all browsers.
|
|
49
|
+
* 2. Remove the margin in Firefox and Safari.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
button,
|
|
53
|
+
input,
|
|
54
|
+
optgroup,
|
|
55
|
+
select,
|
|
56
|
+
textarea {
|
|
57
|
+
margin: 0; /* 2 */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Show the overflow in IE.
|
|
62
|
+
* 1. Show the overflow in Edge.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
button,
|
|
66
|
+
input { /* 1 */
|
|
67
|
+
overflow: visible;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
72
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
button,
|
|
76
|
+
select { /* 1 */
|
|
77
|
+
text-transform: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Correct the inability to style clickable types in iOS and Safari.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
button,
|
|
85
|
+
[type="button"],
|
|
86
|
+
[type="reset"],
|
|
87
|
+
[type="submit"] {
|
|
88
|
+
-webkit-appearance: button;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Remove the inner border and padding in Firefox.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
button::-moz-focus-inner,
|
|
96
|
+
[type="button"]::-moz-focus-inner,
|
|
97
|
+
[type="reset"]::-moz-focus-inner,
|
|
98
|
+
[type="submit"]::-moz-focus-inner {
|
|
99
|
+
border-style: none;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Restore the focus styles unset by the previous rule.
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
button:-moz-focusring,
|
|
108
|
+
[type="button"]:-moz-focusring,
|
|
109
|
+
[type="reset"]:-moz-focusring,
|
|
110
|
+
[type="submit"]:-moz-focusring {
|
|
111
|
+
outline: 1px dotted ButtonText;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
progress {
|
|
119
|
+
vertical-align: baseline;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Remove the default vertical scrollbar in IE 10+.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
textarea {
|
|
127
|
+
overflow: auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 1. Add the correct box sizing in IE 10.
|
|
132
|
+
* 2. Remove the padding in IE 10.
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
[type="checkbox"],
|
|
136
|
+
[type="radio"] {
|
|
137
|
+
box-sizing: border-box; /* 1 */
|
|
138
|
+
padding: 0; /* 2 */
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
146
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
147
|
+
height: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 1. Correct the odd appearance in Chrome and Safari.
|
|
152
|
+
* 2. Correct the outline style in Safari.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
[type="search"] {
|
|
156
|
+
-webkit-appearance: textfield; /* 1 */
|
|
157
|
+
outline-offset: -2px; /* 2 */
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Remove the inner padding in Chrome and Safari on macOS.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
[type="search"]::-webkit-search-decoration {
|
|
165
|
+
-webkit-appearance: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/* Misc
|
|
170
|
+
========================================================================== */
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Add the correct display in IE 10+.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
template {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Add the correct display in IE 10.
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
[hidden] {
|
|
185
|
+
display: none;
|
|
186
|
+
}
|
package/es/style/css.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|