@dtjoy/dt-design 1.1.2 → 1.1.5
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/README.md +161 -141
- package/dist/dt-design.min.css +1 -0
- package/dist/dt-design.min.js +1 -0
- package/es/_util/context/createContextSelector.d.ts +28 -0
- package/es/_util/context/createContextSelector.js +110 -0
- package/es/_util/context/immutable.d.ts +10 -0
- package/es/_util/context/immutable.js +84 -0
- package/es/_util/context/index.d.ts +3 -0
- package/es/_util/context/index.js +3 -0
- package/es/_util/easings.d.ts +1 -0
- package/es/_util/gapSize.d.ts +3 -0
- package/es/_util/getScroll.d.ts +3 -0
- package/{esm → es}/_util/getScroll.js +1 -1
- package/es/_util/hooks/index.d.ts +11 -0
- package/es/_util/hooks/index.js +11 -0
- package/es/_util/hooks/useBreakpoint.d.ts +5 -0
- package/es/_util/hooks/useBreakpoint.js +75 -0
- package/es/_util/hooks/useCssVar.d.ts +3 -0
- package/es/_util/hooks/useCssVar.js +28 -0
- package/es/_util/hooks/useEvent.d.ts +1 -0
- package/es/_util/hooks/useEvent.js +1 -0
- package/es/_util/hooks/useForceUpdate.d.ts +2 -0
- package/es/_util/hooks/useLayoutEffect.d.ts +1 -0
- package/es/_util/hooks/useLayoutEffect.js +1 -0
- package/es/_util/hooks/useMultipleSelect.d.ts +2 -0
- package/es/_util/hooks/useMultipleSelect.js +37 -0
- package/es/_util/hooks/useOrientation.d.ts +2 -0
- package/es/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
- package/{esm → es}/_util/hooks/useProxyImperativeHandle.js +10 -3
- package/es/_util/hooks/useSyncState.d.ts +3 -0
- package/es/_util/hooks/useTimeoutLock.d.ts +1 -0
- package/es/_util/hooks/useTimeoutLock.js +26 -0
- package/es/_util/index.d.ts +11 -0
- package/{esm → es}/_util/index.js +9 -1
- package/es/_util/is.d.ts +5 -0
- package/es/_util/is.js +16 -0
- package/es/_util/rcUtil.d.ts +17 -0
- package/es/_util/rcUtil.js +58 -0
- package/es/_util/scrollTo.d.ts +10 -0
- package/{esm → es}/_util/scrollTo.js +1 -1
- package/es/_util/scrollbar.d.ts +1 -0
- package/es/_util/scrollbar.js +32 -0
- package/es/_util/type.d.ts +53 -0
- package/es/_util/validate.d.ts +2 -0
- package/es/_util/validate.js +10 -0
- package/es/_util/warning.d.ts +31 -0
- package/{esm → es}/_util/warning.js +5 -6
- package/es/block-header/index.d.ts +58 -0
- package/{esm/blockHeader → es/block-header}/index.js +1 -1
- package/es/block-header/style/index.d.ts +2 -0
- package/{lib/blockHeader → es/block-header}/style/index.less +167 -143
- package/es/button/index.d.ts +10 -0
- package/{esm → es}/button/index.js +16 -4
- package/es/button/style/index.d.ts +2 -0
- package/{esm → es}/button/style/index.less +62 -59
- package/{esm → es}/button/style/mixin.less +40 -39
- package/es/collapsible/index.d.ts +102 -0
- package/{esm → es}/collapsible/index.js +3 -2
- package/es/collapsible/style/index.d.ts +1 -0
- package/{esm → es}/collapsible/style/index.less +24 -24
- package/es/collapsible-action-items/index.d.ts +24 -0
- package/{esm/collapsibleActionItems → es/collapsible-action-items}/index.js +21 -19
- package/es/collapsible-action-items/style/index.d.ts +2 -0
- package/{lib/collapsibleActionItems → es/collapsible-action-items}/style/index.less +7 -7
- package/es/flex/index.d.ts +7 -0
- package/{esm → es}/flex/index.js +3 -3
- package/es/flex/interface.d.ts +16 -0
- package/es/flex/style/index.d.ts +2 -0
- package/{esm → es}/flex/style/index.less +80 -76
- package/es/flex/utils.d.ts +7 -0
- package/es/form-list/index.d.ts +87 -0
- package/{esm/formList → es/form-list}/index.js +18 -8
- package/es/form-list/style/index.d.ts +2 -0
- package/{esm/formList → es/form-list}/style/index.less +45 -45
- package/es/index.d.ts +26 -0
- package/es/index.js +21 -0
- package/es/overflow-list/index.d.ts +43 -0
- package/{esm/overflowList → es/overflow-list}/index.js +37 -9
- package/es/overflow-list/style/index.d.ts +2 -0
- package/{esm/overflowList → es/overflow-list}/style/index.less +9 -9
- package/es/resize/index.d.ts +9 -0
- package/es/resize-observer/index.d.ts +45 -0
- package/{esm/resizeObserver → es/resize-observer}/index.js +8 -8
- package/es/splitter/Panel.d.ts +7 -0
- package/{esm → es}/splitter/Panel.js +12 -4
- package/es/splitter/SplitBar.d.ts +28 -0
- package/{esm → es}/splitter/SplitBar.js +82 -80
- package/es/splitter/Splitter.d.ts +5 -0
- package/{esm → es}/splitter/Splitter.js +52 -23
- package/es/splitter/hooks/sizeUtil.d.ts +3 -0
- package/{esm → es}/splitter/hooks/sizeUtil.js +1 -1
- package/es/splitter/hooks/useDragListeners.d.ts +14 -0
- package/es/splitter/hooks/useDragListeners.js +107 -0
- package/es/splitter/hooks/useItems.d.ts +20 -0
- package/es/splitter/hooks/useOrientation.d.ts +2 -0
- package/es/splitter/hooks/useOrientation.js +6 -0
- package/es/splitter/hooks/useResizable.d.ts +13 -0
- package/{esm → es}/splitter/hooks/useResizable.js +5 -2
- package/es/splitter/hooks/useResize.d.ts +6 -0
- package/{esm → es}/splitter/hooks/useResize.js +10 -3
- package/es/splitter/hooks/useSizes.d.ts +4 -0
- package/{esm → es}/splitter/hooks/useSizes.js +5 -6
- package/es/splitter/index.d.ts +9 -0
- package/es/splitter/interface.d.ts +45 -0
- package/es/splitter/style/index.d.ts +2 -0
- package/es/splitter/style/index.less +349 -0
- package/es/status-tag/index.d.ts +29 -0
- package/{esm/statusTag → es/status-tag}/index.js +1 -1
- package/es/status-tag/style/index.d.ts +2 -0
- package/{lib/statusTag → es/status-tag}/style/index.less +70 -70
- package/{esm/statusTag → es/status-tag}/style/mixin.less +48 -39
- package/es/style/index.d.ts +1 -0
- package/{esm → es}/style/index.less +1 -1
- package/es/style/themes/index.less +2 -0
- package/{esm → es}/style/themes/variable.less +5 -5
- package/es/table/Column.d.ts +2 -0
- package/es/table/Column.js +1 -0
- package/es/table/ColumnGroup.d.ts +2 -0
- package/es/table/ColumnGroup.js +1 -0
- package/es/table/InternalTable.d.ts +43 -0
- package/es/table/InternalTable.js +816 -0
- package/es/table/Table.d.ts +19 -0
- package/es/table/Table.js +30 -0
- package/es/table/TableMeasureRowContext.d.ts +3 -0
- package/es/table/TableMeasureRowContext.js +3 -0
- package/es/table/components/Body/BodyRow.d.ts +37 -0
- package/es/table/components/Body/BodyRow.js +182 -0
- package/es/table/components/Body/ExpandedRow.d.ts +15 -0
- package/es/table/components/Body/ExpandedRow.js +51 -0
- package/es/table/components/Body/MeasureCell.d.ts +8 -0
- package/es/table/components/Body/MeasureCell.js +33 -0
- package/es/table/components/Body/MeasureRow.d.ts +10 -0
- package/es/table/components/Body/MeasureRow.js +54 -0
- package/es/table/components/Body/index.d.ts +11 -0
- package/es/table/components/Body/index.js +123 -0
- package/es/table/components/Cell/index.d.ts +39 -0
- package/es/table/components/Cell/index.js +196 -0
- package/es/table/components/Cell/useCellRender.d.ts +3 -0
- package/es/table/components/Cell/useCellRender.js +69 -0
- package/es/table/components/Cell/useHoverState.d.ts +2 -0
- package/es/table/components/Cell/useHoverState.js +13 -0
- package/es/table/components/ColGroup.d.ts +9 -0
- package/es/table/components/ColGroup.js +53 -0
- package/es/table/components/ExpandIcon.d.ts +12 -0
- package/es/table/components/ExpandIcon.js +27 -0
- package/es/table/components/FixedHolder/index.d.ts +27 -0
- package/es/table/components/FixedHolder/index.js +186 -0
- package/es/table/components/Footer/Cell.d.ts +11 -0
- package/es/table/components/Footer/Cell.js +47 -0
- package/es/table/components/Footer/Row.d.ts +8 -0
- package/es/table/components/Footer/Row.js +10 -0
- package/es/table/components/Footer/Summary.d.ts +14 -0
- package/es/table/components/Footer/Summary.js +12 -0
- package/es/table/components/Footer/SummaryContext.d.ts +11 -0
- package/es/table/components/Footer/SummaryContext.js +3 -0
- package/es/table/components/Footer/index.d.ts +16 -0
- package/es/table/components/Footer/index.js +31 -0
- package/es/table/components/Header/Header.d.ts +10 -0
- package/es/table/components/Header/Header.js +110 -0
- package/es/table/components/Header/HeaderRow.d.ts +19 -0
- package/es/table/components/Header/HeaderRow.js +63 -0
- package/es/table/components/Panel.d.ts +7 -0
- package/es/table/components/Panel.js +11 -0
- package/es/table/components/RcTable.d.ts +114 -0
- package/es/table/components/RcTable.js +757 -0
- package/es/table/components/VirtualTable.d.ts +5 -0
- package/es/table/components/VirtualTable.js +12 -0
- package/es/table/components/VirtualTableBody/BodyGrid.d.ts +13 -0
- package/es/table/components/VirtualTableBody/BodyGrid.js +307 -0
- package/es/table/components/VirtualTableBody/BodyLine.d.ts +14 -0
- package/es/table/components/VirtualTableBody/BodyLine.js +116 -0
- package/es/table/components/VirtualTableBody/VirtualCell.d.ts +26 -0
- package/es/table/components/VirtualTableBody/VirtualCell.js +118 -0
- package/es/table/components/VirtualTableBody/context.d.ts +13 -0
- package/es/table/components/VirtualTableBody/context.js +3 -0
- package/es/table/components/VirtualTableBody/index.d.ts +16 -0
- package/es/table/components/VirtualTableBody/index.js +102 -0
- package/es/table/constant.d.ts +2 -0
- package/es/table/constant.js +2 -0
- package/es/table/features/columns/Column.d.ts +7 -0
- package/es/table/features/columns/Column.js +4 -0
- package/es/table/features/columns/ColumnGroup.d.ts +9 -0
- package/es/table/features/columns/ColumnGroup.js +4 -0
- package/es/table/features/columns/index.d.ts +8 -0
- package/es/table/features/columns/index.js +6 -0
- package/es/table/features/columns/useColumns.d.ts +31 -0
- package/es/table/features/columns/useColumns.js +227 -0
- package/es/table/features/columns/useFilledColumns.d.ts +4 -0
- package/es/table/features/columns/useFilledColumns.js +34 -0
- package/es/table/features/columns/useTitleColumns.d.ts +4 -0
- package/es/table/features/columns/useTitleColumns.js +26 -0
- package/es/table/features/columns/useWidthColumns.d.ts +5 -0
- package/es/table/features/columns/useWidthColumns.js +75 -0
- package/es/table/features/editable/BatchEditModal.d.ts +4 -0
- package/es/table/features/editable/BatchEditModal.js +786 -0
- package/es/table/features/editable/EditableCell.d.ts +42 -0
- package/es/table/features/editable/EditableCell.js +294 -0
- package/es/table/features/editable/EditableContext.d.ts +33 -0
- package/es/table/features/editable/EditableContext.js +20 -0
- package/es/table/features/editable/batchEditTypes.d.ts +55 -0
- package/es/table/features/editable/batchEditTypes.js +1 -0
- package/es/table/features/editable/batchEditUtils.d.ts +44 -0
- package/es/table/features/editable/batchEditUtils.js +258 -0
- package/es/table/features/editable/builtinEditors.d.ts +32 -0
- package/es/table/features/editable/builtinEditors.js +165 -0
- package/es/table/features/editable/index.d.ts +11 -0
- package/es/table/features/editable/index.js +10 -0
- package/es/table/features/editable/useBatchRules.d.ts +17 -0
- package/es/table/features/editable/useBatchRules.js +96 -0
- package/es/table/features/editable/useEditable.d.ts +51 -0
- package/es/table/features/editable/useEditable.js +693 -0
- package/es/table/features/expand/expandUtil.d.ts +5 -0
- package/es/table/features/expand/expandUtil.js +47 -0
- package/es/table/features/expand/index.d.ts +2 -0
- package/es/table/features/expand/index.js +2 -0
- package/es/table/features/expand/useExpand.d.ts +10 -0
- package/es/table/features/expand/useExpand.js +90 -0
- package/es/table/features/filter/FilterDropdown.d.ts +31 -0
- package/es/table/features/filter/FilterDropdown.js +494 -0
- package/es/table/features/filter/FilterSearch.d.ts +12 -0
- package/es/table/features/filter/FilterSearch.js +24 -0
- package/es/table/features/filter/FilterWrapper.d.ts +8 -0
- package/es/table/features/filter/FilterWrapper.js +23 -0
- package/es/table/features/filter/index.d.ts +4 -0
- package/es/table/features/filter/index.js +4 -0
- package/es/table/features/filter/useFilter.d.ts +22 -0
- package/es/table/features/filter/useFilter.js +240 -0
- package/es/table/features/fixed/fixUtil.d.ts +21 -0
- package/es/table/features/fixed/fixUtil.js +69 -0
- package/es/table/features/fixed/index.d.ts +4 -0
- package/es/table/features/fixed/index.js +4 -0
- package/es/table/features/fixed/offsetUtil.d.ts +4 -0
- package/es/table/features/fixed/offsetUtil.js +13 -0
- package/es/table/features/fixed/useFixedInfo.d.ts +2 -0
- package/es/table/features/fixed/useFixedInfo.js +16 -0
- package/es/table/features/fixed/useStickyOffsets.d.ts +6 -0
- package/es/table/features/fixed/useStickyOffsets.js +29 -0
- package/es/table/features/hover/index.d.ts +1 -0
- package/es/table/features/hover/index.js +1 -0
- package/es/table/features/hover/useHover.d.ts +2 -0
- package/es/table/features/hover/useHover.js +22 -0
- package/es/table/features/pagination/index.d.ts +1 -0
- package/es/table/features/pagination/index.js +1 -0
- package/es/table/features/pagination/usePagination.d.ts +5 -0
- package/es/table/features/pagination/usePagination.js +89 -0
- package/es/table/features/resize/ResizeHandle.d.ts +22 -0
- package/es/table/features/resize/ResizeHandle.js +99 -0
- package/es/table/features/resize/index.d.ts +5 -0
- package/es/table/features/resize/index.js +3 -0
- package/es/table/features/resize/transformResizableColumns.d.ts +11 -0
- package/es/table/features/resize/transformResizableColumns.js +52 -0
- package/es/table/features/resize/useResize.d.ts +52 -0
- package/es/table/features/resize/useResize.js +586 -0
- package/es/table/features/selection/index.d.ts +1 -0
- package/es/table/features/selection/index.js +1 -0
- package/es/table/features/selection/useSelection.d.ts +20 -0
- package/es/table/features/selection/useSelection.js +579 -0
- package/es/table/features/sort/index.d.ts +1 -0
- package/es/table/features/sort/index.js +1 -0
- package/es/table/features/sort/useSorter.d.ts +21 -0
- package/es/table/features/sort/useSorter.js +372 -0
- package/es/table/features/sticky/index.d.ts +2 -0
- package/es/table/features/sticky/index.js +2 -0
- package/es/table/features/sticky/stickyScrollBar.d.ts +12 -0
- package/es/table/features/sticky/stickyScrollBar.js +203 -0
- package/es/table/features/sticky/useSticky.d.ts +10 -0
- package/es/table/features/sticky/useSticky.js +34 -0
- package/es/table/features/summary/index.d.ts +1 -0
- package/es/table/features/summary/index.js +1 -0
- package/es/table/features/virtual/index.d.ts +2 -0
- package/es/table/features/virtual/index.js +2 -0
- package/es/table/features/virtual/useFlattenRecords.d.ts +19 -0
- package/es/table/features/virtual/useFlattenRecords.js +55 -0
- package/es/table/features/virtual/useFrame.d.ts +7 -0
- package/es/table/features/virtual/useFrame.js +67 -0
- package/es/table/immutableHelper.d.ts +9 -0
- package/es/table/immutableHelper.js +36 -0
- package/es/table/index.d.ts +24 -0
- package/es/table/index.js +23 -0
- package/es/table/interface.d.ts +438 -0
- package/es/table/interface.js +56 -0
- package/es/table/shared/context/PerfContext.d.ts +6 -0
- package/es/table/shared/context/PerfContext.js +6 -0
- package/es/table/shared/context/TableContext.d.ts +51 -0
- package/es/table/shared/context/TableContext.js +8 -0
- package/es/table/shared/hooks/useContainerWidth.d.ts +1 -0
- package/es/table/shared/hooks/useContainerWidth.js +14 -0
- package/es/table/shared/hooks/useLazyKVMap.d.ts +4 -0
- package/es/table/shared/hooks/useLazyKVMap.js +30 -0
- package/es/table/shared/hooks/useRenderTimes.d.ts +5 -0
- package/es/table/shared/hooks/useRenderTimes.js +39 -0
- package/es/table/shared/hooks/useRowInfo.d.ts +11 -0
- package/es/table/shared/hooks/useRowInfo.js +73 -0
- package/es/table/shared/utils/legacyUtil.d.ts +5 -0
- package/es/table/shared/utils/legacyUtil.js +30 -0
- package/es/table/shared/utils/util.d.ts +6 -0
- package/es/table/shared/utils/util.js +26 -0
- package/es/table/shared/utils/valueUtil.d.ts +8 -0
- package/es/table/shared/utils/valueUtil.js +29 -0
- package/es/table/style/base.less +164 -0
- package/es/table/style/bordered.less +83 -0
- package/es/table/style/editable.less +50 -0
- package/es/table/style/ellipsis.less +33 -0
- package/es/table/style/empty.less +16 -0
- package/es/table/style/expand.less +123 -0
- package/es/table/style/filter.less +34 -0
- package/es/table/style/fixed.less +85 -0
- package/es/table/style/index.d.ts +3 -0
- package/es/table/style/index.js +3 -0
- package/es/table/style/index.less +19 -0
- package/es/table/style/pagination.less +29 -0
- package/es/table/style/radius.less +64 -0
- package/es/table/style/resize.less +78 -0
- package/es/table/style/rtl.less +52 -0
- package/es/table/style/selection.less +63 -0
- package/es/table/style/size.less +54 -0
- package/es/table/style/sorter.less +99 -0
- package/es/table/style/sticky.less +45 -0
- package/es/table/style/summary.less +23 -0
- package/es/table/style/variables.less +80 -0
- package/es/table/style/virtual.less +95 -0
- package/lib/_util/context/createContextSelector.js +120 -0
- package/lib/_util/context/immutable.js +92 -0
- package/lib/_util/context/index.js +41 -0
- package/lib/_util/easings.js +1 -1
- package/lib/_util/getScroll.js +6 -6
- package/lib/_util/hooks/index.js +82 -5
- package/lib/_util/hooks/useBreakpoint.js +85 -0
- package/lib/_util/hooks/useCssVar.js +37 -0
- package/lib/_util/hooks/useEvent.js +13 -0
- package/lib/_util/hooks/useForceUpdate.js +5 -4
- package/lib/_util/hooks/useLayoutEffect.js +13 -0
- package/lib/_util/hooks/useMultipleSelect.js +43 -0
- package/lib/_util/hooks/useOrientation.js +7 -8
- package/lib/_util/hooks/useProxyImperativeHandle.js +18 -14
- package/lib/_util/hooks/useSyncState.js +19 -9
- package/lib/_util/hooks/useTimeoutLock.js +35 -0
- package/lib/_util/index.js +101 -1
- package/lib/_util/is.js +22 -0
- package/lib/_util/rcUtil.js +134 -0
- package/lib/_util/scrollTo.js +22 -18
- package/lib/_util/scrollbar.js +38 -0
- package/lib/_util/validate.js +17 -0
- package/lib/_util/warning.js +25 -27
- package/lib/block-header/index.js +141 -0
- package/{esm/blockHeader → lib/block-header}/style/index.less +167 -143
- package/lib/button/index.js +24 -9
- package/lib/button/style/index.less +62 -59
- package/lib/button/style/mixin.less +40 -39
- package/lib/collapsible/index.js +210 -169
- package/lib/collapsible/style/index.less +24 -24
- package/lib/collapsible-action-items/index.js +83 -0
- package/{esm/collapsibleActionItems → lib/collapsible-action-items}/style/index.less +7 -7
- package/lib/flex/index.js +43 -34
- package/lib/flex/style/index.less +80 -76
- package/lib/flex/utils.js +23 -23
- package/lib/form-list/index.js +163 -0
- package/lib/{formList → form-list}/style/index.less +45 -45
- package/lib/index.js +41 -63
- package/lib/overflow-list/index.js +203 -0
- package/lib/{overflowList → overflow-list}/style/index.less +9 -9
- package/lib/resize/index.js +13 -13
- package/lib/resize-observer/index.js +182 -0
- package/lib/splitter/Panel.js +36 -25
- package/lib/splitter/SplitBar.js +151 -134
- package/lib/splitter/Splitter.js +141 -89
- package/lib/splitter/hooks/sizeUtil.js +50 -33
- package/lib/splitter/hooks/useDragListeners.js +114 -0
- package/lib/splitter/hooks/useItems.js +27 -20
- package/lib/splitter/hooks/useOrientation.js +12 -0
- package/lib/splitter/hooks/useResizable.js +32 -30
- package/lib/splitter/hooks/useResize.js +76 -45
- package/lib/splitter/hooks/useSizes.js +55 -30
- package/lib/splitter/index.js +1 -1
- package/lib/splitter/style/index.less +349 -312
- package/lib/status-tag/index.js +131 -0
- package/{esm/statusTag → lib/status-tag}/style/index.less +70 -70
- package/lib/{statusTag → status-tag}/style/mixin.less +48 -39
- package/lib/style/index.less +1 -1
- package/lib/style/themes/index.less +2 -2
- package/lib/style/themes/variable.less +5 -5
- package/lib/table/Column.js +13 -0
- package/lib/table/ColumnGroup.js +13 -0
- package/lib/table/InternalTable.js +824 -0
- package/lib/table/Table.js +40 -0
- package/lib/table/TableMeasureRowContext.js +10 -0
- package/lib/table/components/Body/BodyRow.js +192 -0
- package/lib/table/components/Body/ExpandedRow.js +61 -0
- package/lib/table/components/Body/MeasureCell.js +43 -0
- package/lib/table/components/Body/MeasureRow.js +64 -0
- package/lib/table/components/Body/index.js +133 -0
- package/lib/table/components/Cell/index.js +205 -0
- package/lib/table/components/Cell/useCellRender.js +78 -0
- package/lib/table/components/Cell/useHoverState.js +20 -0
- package/lib/table/components/ColGroup.js +62 -0
- package/lib/table/components/ExpandIcon.js +35 -0
- package/lib/table/components/FixedHolder/index.js +195 -0
- package/lib/table/components/Footer/Cell.js +57 -0
- package/lib/table/components/Footer/Row.js +19 -0
- package/lib/table/components/Footer/Summary.js +19 -0
- package/lib/table/components/Footer/SummaryContext.js +12 -0
- package/lib/table/components/Footer/index.js +41 -0
- package/lib/table/components/Header/Header.js +120 -0
- package/lib/table/components/Header/HeaderRow.js +72 -0
- package/lib/table/components/Panel.js +20 -0
- package/lib/table/components/RcTable.js +764 -0
- package/lib/table/components/VirtualTable.js +18 -0
- package/lib/table/components/VirtualTableBody/BodyGrid.js +316 -0
- package/lib/table/components/VirtualTableBody/BodyLine.js +125 -0
- package/lib/table/components/VirtualTableBody/VirtualCell.js +128 -0
- package/lib/table/components/VirtualTableBody/context.js +9 -0
- package/lib/table/components/VirtualTableBody/index.js +111 -0
- package/lib/table/constant.js +8 -0
- package/lib/table/features/columns/Column.js +10 -0
- package/lib/table/features/columns/ColumnGroup.js +10 -0
- package/lib/table/features/columns/index.js +57 -0
- package/lib/table/features/columns/useColumns.js +237 -0
- package/lib/table/features/columns/useFilledColumns.js +42 -0
- package/lib/table/features/columns/useTitleColumns.js +34 -0
- package/lib/table/features/columns/useWidthColumns.js +83 -0
- package/lib/table/features/editable/BatchEditModal.js +794 -0
- package/lib/table/features/editable/EditableCell.js +303 -0
- package/lib/table/features/editable/EditableContext.js +28 -0
- package/lib/table/features/editable/batchEditTypes.js +5 -0
- package/lib/table/features/editable/batchEditUtils.js +264 -0
- package/lib/table/features/editable/builtinEditors.js +174 -0
- package/lib/table/features/editable/index.js +75 -0
- package/lib/table/features/editable/useBatchRules.js +103 -0
- package/lib/table/features/editable/useEditable.js +701 -0
- package/lib/table/features/expand/expandUtil.js +57 -0
- package/lib/table/features/expand/index.js +32 -0
- package/lib/table/features/expand/useExpand.js +99 -0
- package/lib/table/features/filter/FilterDropdown.js +504 -0
- package/lib/table/features/filter/FilterSearch.js +34 -0
- package/lib/table/features/filter/FilterWrapper.js +32 -0
- package/lib/table/features/filter/index.js +49 -0
- package/lib/table/features/filter/useFilter.js +254 -0
- package/lib/table/features/fixed/fixUtil.js +75 -0
- package/lib/table/features/fixed/index.js +34 -0
- package/lib/table/features/fixed/offsetUtil.js +19 -0
- package/lib/table/features/fixed/useFixedInfo.js +26 -0
- package/lib/table/features/fixed/useStickyOffsets.js +35 -0
- package/lib/table/features/hover/index.js +13 -0
- package/lib/table/features/hover/useHover.js +31 -0
- package/lib/table/features/pagination/index.js +27 -0
- package/lib/table/features/pagination/usePagination.js +96 -0
- package/lib/table/features/resize/ResizeHandle.js +109 -0
- package/lib/table/features/resize/index.js +27 -0
- package/lib/table/features/resize/transformResizableColumns.js +61 -0
- package/lib/table/features/resize/useResize.js +595 -0
- package/lib/table/features/selection/index.js +39 -0
- package/lib/table/features/selection/useSelection.js +588 -0
- package/lib/table/features/sort/index.js +21 -0
- package/lib/table/features/sort/useSorter.js +381 -0
- package/lib/table/features/sticky/index.js +20 -0
- package/lib/table/features/sticky/stickyScrollBar.js +212 -0
- package/lib/table/features/sticky/useSticky.js +43 -0
- package/lib/table/features/summary/index.js +13 -0
- package/lib/table/features/virtual/index.js +26 -0
- package/lib/table/features/virtual/useFlattenRecords.js +64 -0
- package/lib/table/features/virtual/useFrame.js +74 -0
- package/lib/table/immutableHelper.js +46 -0
- package/lib/table/index.js +124 -0
- package/lib/table/interface.js +60 -0
- package/lib/table/shared/context/PerfContext.js +15 -0
- package/lib/table/shared/context/TableContext.js +13 -0
- package/lib/table/shared/hooks/useContainerWidth.js +20 -0
- package/lib/table/shared/hooks/useLazyKVMap.js +39 -0
- package/lib/table/shared/hooks/useRenderTimes.js +49 -0
- package/lib/table/shared/hooks/useRowInfo.js +80 -0
- package/lib/table/shared/utils/legacyUtil.js +38 -0
- package/lib/table/shared/utils/util.js +34 -0
- package/lib/table/shared/utils/valueUtil.js +37 -0
- package/lib/table/style/base.less +164 -0
- package/lib/table/style/bordered.less +83 -0
- package/lib/table/style/editable.less +50 -0
- package/lib/table/style/ellipsis.less +33 -0
- package/lib/table/style/empty.less +16 -0
- package/lib/table/style/expand.less +123 -0
- package/lib/table/style/filter.less +34 -0
- package/lib/table/style/fixed.less +85 -0
- package/lib/table/style/index.js +5 -0
- package/lib/table/style/index.less +19 -0
- package/lib/table/style/pagination.less +29 -0
- package/lib/table/style/radius.less +64 -0
- package/lib/table/style/resize.less +78 -0
- package/lib/table/style/rtl.less +52 -0
- package/lib/table/style/selection.less +63 -0
- package/lib/table/style/size.less +54 -0
- package/lib/table/style/sorter.less +99 -0
- package/lib/table/style/sticky.less +45 -0
- package/lib/table/style/summary.less +23 -0
- package/lib/table/style/variables.less +80 -0
- package/lib/table/style/virtual.less +95 -0
- package/package.json +147 -152
- package/esm/_util/extendsObject.js +0 -17
- package/esm/_util/hooks/index.js +0 -4
- package/esm/_util/isNonNullable.js +0 -4
- package/esm/index.js +0 -22
- package/esm/splitter/style/index.less +0 -312
- package/esm/style/mixins/index.less +0 -0
- package/esm/style/themes/index.less +0 -2
- package/lib/_util/extendsObject.js +0 -20
- package/lib/_util/isNonNullable.js +0 -10
- package/lib/blockHeader/index.js +0 -121
- package/lib/collapsibleActionItems/index.js +0 -68
- package/lib/formList/index.js +0 -130
- package/lib/overflowList/index.js +0 -144
- package/lib/resizeObserver/index.js +0 -137
- package/lib/statusTag/index.js +0 -125
- package/lib/style/mixins/index.less +0 -0
- /package/{esm → es}/_util/easings.js +0 -0
- /package/{esm → es}/_util/gapSize.js +0 -0
- /package/{esm → es}/_util/hooks/useForceUpdate.js +0 -0
- /package/{esm → es}/_util/hooks/useOrientation.js +0 -0
- /package/{esm → es}/_util/hooks/useSyncState.js +0 -0
- /package/{esm → es}/_util/type.js +0 -0
- /package/{esm/blockHeader → es/block-header}/style/index.js +0 -0
- /package/{esm → es}/button/style/index.js +0 -0
- /package/{esm → es}/collapsible/style/index.js +0 -0
- /package/{esm/collapsibleActionItems → es/collapsible-action-items}/style/index.js +0 -0
- /package/{esm → es}/flex/interface.js +0 -0
- /package/{esm → es}/flex/style/index.js +0 -0
- /package/{esm → es}/flex/utils.js +0 -0
- /package/{esm/formList → es/form-list}/style/index.js +0 -0
- /package/{esm/overflowList → es/overflow-list}/style/index.js +0 -0
- /package/{esm → es}/resize/index.js +0 -0
- /package/{esm → es}/splitter/hooks/useItems.js +0 -0
- /package/{esm → es}/splitter/index.js +0 -0
- /package/{esm → es}/splitter/interface.js +0 -0
- /package/{esm → es}/splitter/style/index.js +0 -0
- /package/{esm/statusTag → es/status-tag}/style/index.js +0 -0
- /package/{esm → es}/style/index.js +0 -0
- /package/lib/{blockHeader → block-header}/style/index.js +0 -0
- /package/lib/{collapsibleActionItems → collapsible-action-items}/style/index.js +0 -0
- /package/lib/{formList → form-list}/style/index.js +0 -0
- /package/lib/{overflowList → overflow-list}/style/index.js +0 -0
- /package/lib/{statusTag → status-tag}/style/index.js +0 -0
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* 获取列宽追踪用的列标识。
|
|
10
|
+
* 无 key 且无 dataIndex 的列(如 selection / expand 等功能列)不可标识,返回 null:
|
|
11
|
+
* 不注入拖拽手柄,也不进入 widths Map,避免多列共用 '' 键互相覆盖。
|
|
12
|
+
*/
|
|
13
|
+
function getColumnKey(col) {
|
|
14
|
+
var _col$key;
|
|
15
|
+
var key = (_col$key = col.key) !== null && _col$key !== void 0 ? _col$key : col.dataIndex;
|
|
16
|
+
return key != null ? key : null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 表头拖拽改变列宽的 hook
|
|
21
|
+
*
|
|
22
|
+
* 核心交互策略:
|
|
23
|
+
*
|
|
24
|
+
* **初始弹性分配**:
|
|
25
|
+
* - 初始所有列为"弹性列",按 baseWidth 比例分配容器剩余空间,填满容器
|
|
26
|
+
* - remainder > 0:弹性列膨胀;remainder < 0:弹性列收缩(不低于 minWidth)
|
|
27
|
+
*
|
|
28
|
+
* **拖拽冻结**:
|
|
29
|
+
* - 松手时,将所有列的 baseWidth 冻结为当前渲染宽度,并全部标记为固定列
|
|
30
|
+
* - 这样松手后 remainder ≈ 0,不会触发 flex 重分配
|
|
31
|
+
* - 列边界精确停留在鼠标位置(跟手)
|
|
32
|
+
* - 总宽 = 渲染宽度之和,可能 ≠ containerWidth(出现滚动条或空白)
|
|
33
|
+
* - 用户可调用 resetColumnWidths 恢复所有列为弹性列
|
|
34
|
+
*
|
|
35
|
+
* **拖拽精度**:
|
|
36
|
+
* - 使用 th.offsetWidth(实际渲染宽度)作为拖拽起点
|
|
37
|
+
* - 用户拖 N px → 新宽度 = 渲染宽度 ± N px,松手后冻结,视觉无跳变
|
|
38
|
+
*
|
|
39
|
+
* **其他特性**:
|
|
40
|
+
* - 容器宽度测量滚动区域 clientWidth,自动排除垂直滚动条
|
|
41
|
+
* - scrollX = 列宽总和,覆盖 scroll.x 避免 table-layout:fixed 下的浏览器重分配
|
|
42
|
+
* - rAF + 直接 DOM 操作实现高性能拖拽
|
|
43
|
+
*/
|
|
44
|
+
function useResize(_ref) {
|
|
45
|
+
var columns = _ref.columns,
|
|
46
|
+
_ref$enabled = _ref.enabled,
|
|
47
|
+
enabled = _ref$enabled === void 0 ? false : _ref$enabled,
|
|
48
|
+
_ref$defaultMinWidth = _ref.defaultMinWidth,
|
|
49
|
+
defaultMinWidth = _ref$defaultMinWidth === void 0 ? 60 : _ref$defaultMinWidth,
|
|
50
|
+
containerRef = _ref.containerRef,
|
|
51
|
+
onColumnResize = _ref.onColumnResize,
|
|
52
|
+
prefixCls = _ref.prefixCls;
|
|
53
|
+
// 扁平化列(仅叶子列可以 resize)
|
|
54
|
+
var flattenColumns = React.useMemo(function () {
|
|
55
|
+
var result = [];
|
|
56
|
+
function walk(cols) {
|
|
57
|
+
cols.forEach(function (col) {
|
|
58
|
+
var children = col.children;
|
|
59
|
+
if (children && children.length > 0) {
|
|
60
|
+
walk(children);
|
|
61
|
+
} else {
|
|
62
|
+
result.push(col);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
walk(columns);
|
|
67
|
+
return result;
|
|
68
|
+
}, [columns]);
|
|
69
|
+
|
|
70
|
+
// 初始化列宽(从 column.width 读取)
|
|
71
|
+
var _React$useState = React.useState(function () {
|
|
72
|
+
var map = new Map();
|
|
73
|
+
flattenColumns.forEach(function (col) {
|
|
74
|
+
var key = getColumnKey(col);
|
|
75
|
+
if (key == null) return;
|
|
76
|
+
if (col.width != null) {
|
|
77
|
+
var w = Number(col.width);
|
|
78
|
+
if (!Number.isNaN(w)) map.set(key, w);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return map;
|
|
82
|
+
}),
|
|
83
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
84
|
+
columnWidths = _React$useState2[0],
|
|
85
|
+
setColumnWidths = _React$useState2[1];
|
|
86
|
+
|
|
87
|
+
// 记录用户拖拽过的列 key(被拖拽过的列变为"固定列",不再吸收 remainder)
|
|
88
|
+
var _React$useState3 = React.useState(function () {
|
|
89
|
+
return new Set();
|
|
90
|
+
}),
|
|
91
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
92
|
+
resizedKeys = _React$useState4[0],
|
|
93
|
+
setResizedKeys = _React$useState4[1];
|
|
94
|
+
|
|
95
|
+
// 同步外部 columns 变化
|
|
96
|
+
React.useEffect(function () {
|
|
97
|
+
setColumnWidths(function (prev) {
|
|
98
|
+
var next = new Map(prev);
|
|
99
|
+
flattenColumns.forEach(function (col) {
|
|
100
|
+
var key = getColumnKey(col);
|
|
101
|
+
if (key == null) return;
|
|
102
|
+
if (col.width != null && !next.has(key)) {
|
|
103
|
+
var w = Number(col.width);
|
|
104
|
+
if (!Number.isNaN(w)) next.set(key, w);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return next;
|
|
108
|
+
});
|
|
109
|
+
}, [flattenColumns]);
|
|
110
|
+
|
|
111
|
+
// 拖拽状态:正在拖拽的列 key(使用 state 驱动渲染)
|
|
112
|
+
var _React$useState5 = React.useState(null),
|
|
113
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
114
|
+
resizingKey = _React$useState6[0],
|
|
115
|
+
setResizingKey = _React$useState6[1];
|
|
116
|
+
|
|
117
|
+
// 竖线 DOM ref(直接操作 DOM 避免频繁 state 更新)
|
|
118
|
+
var lineRef = React.useRef(null);
|
|
119
|
+
|
|
120
|
+
// 拖拽过程中的 ref(避免闭包陷阱)
|
|
121
|
+
var dragRef = React.useRef(null);
|
|
122
|
+
|
|
123
|
+
// 存储当前拖拽的事件监听器清理函数
|
|
124
|
+
// 用于:1) 组件卸载时清理泄漏的监听器 2) 重复 mousedown 时清理旧拖拽
|
|
125
|
+
var cleanupDragListenersRef = React.useRef(null);
|
|
126
|
+
|
|
127
|
+
// columnWidths / flattenColumns / onColumnResize 的 ref 镜像
|
|
128
|
+
// 用于稳定 onStartResize 引用,避免每次拖拽松手后 transformColumns 链重跑
|
|
129
|
+
var columnWidthsRef = React.useRef(columnWidths);
|
|
130
|
+
columnWidthsRef.current = columnWidths;
|
|
131
|
+
var flattenColumnsRef = React.useRef(flattenColumns);
|
|
132
|
+
flattenColumnsRef.current = flattenColumns;
|
|
133
|
+
var onColumnResizeRef = React.useRef(onColumnResize);
|
|
134
|
+
onColumnResizeRef.current = onColumnResize;
|
|
135
|
+
// renderWidthsRef 在 renderWidths memo 之后初始化
|
|
136
|
+
var renderWidthsRef = React.useRef(new Map());
|
|
137
|
+
|
|
138
|
+
// 获取列的可调整配置
|
|
139
|
+
var getResizeConfig = React.useCallback(function (col) {
|
|
140
|
+
var _col$resizable, _col$minWidth;
|
|
141
|
+
// 不可标识的列(无 key/dataIndex,如 selection / expand 列)不可调整
|
|
142
|
+
var colEnabled = ((_col$resizable = col.resizable) !== null && _col$resizable !== void 0 ? _col$resizable : enabled) && getColumnKey(col) != null;
|
|
143
|
+
return {
|
|
144
|
+
enabled: colEnabled,
|
|
145
|
+
minWidth: (_col$minWidth = col.minWidth) !== null && _col$minWidth !== void 0 ? _col$minWidth : defaultMinWidth,
|
|
146
|
+
maxWidth: col.maxWidth
|
|
147
|
+
};
|
|
148
|
+
}, [enabled, defaultMinWidth]);
|
|
149
|
+
|
|
150
|
+
// ========================= 滚动区域查找 =========================
|
|
151
|
+
// 查找表格滚动区域元素,用于容器宽度测量和竖线定位。
|
|
152
|
+
//
|
|
153
|
+
// 优先级:
|
|
154
|
+
// 1. .{prefixCls}-tbody — 虚拟滚动模式(Grid 组件)
|
|
155
|
+
// 2. .{prefixCls}-body — fixHeader 模式,body 有 overflowY: scroll
|
|
156
|
+
// 3. .{prefixCls}-content — unique table 模式
|
|
157
|
+
// 4. .{prefixCls}-container — 回退
|
|
158
|
+
var findScrollElement = React.useCallback(function (wrapper) {
|
|
159
|
+
var tbody = wrapper.querySelector(".".concat(prefixCls, "-tbody"));
|
|
160
|
+
if (tbody) return tbody;
|
|
161
|
+
var body = wrapper.querySelector(".".concat(prefixCls, "-body"));
|
|
162
|
+
if (body) return body;
|
|
163
|
+
var content = wrapper.querySelector(".".concat(prefixCls, "-content"));
|
|
164
|
+
if (content) return content;
|
|
165
|
+
return wrapper.querySelector(".".concat(prefixCls, "-container"));
|
|
166
|
+
}, [prefixCls]);
|
|
167
|
+
|
|
168
|
+
// ========================= 容器宽度测量 =========================
|
|
169
|
+
// 测量表格滚动区域的 clientWidth,自动排除垂直滚动条宽度。
|
|
170
|
+
// 使用 useLayoutEffect 在浏览器绘制前完成首次测量,避免初始化闪烁。
|
|
171
|
+
var _React$useState7 = React.useState(0),
|
|
172
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
173
|
+
containerWidth = _React$useState8[0],
|
|
174
|
+
setContainerWidth = _React$useState8[1];
|
|
175
|
+
React.useLayoutEffect(function () {
|
|
176
|
+
var wrapper = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
177
|
+
if (!wrapper) return;
|
|
178
|
+
var measure = function measure() {
|
|
179
|
+
var el = findScrollElement(wrapper);
|
|
180
|
+
if (el) {
|
|
181
|
+
setContainerWidth(el.clientWidth);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// 首次测量
|
|
186
|
+
measure();
|
|
187
|
+
|
|
188
|
+
// 监听容器尺寸变化
|
|
189
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
190
|
+
measure();
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// 观察 container(外层尺寸变化)
|
|
194
|
+
var container = wrapper.querySelector(".".concat(prefixCls, "-container"));
|
|
195
|
+
if (container) {
|
|
196
|
+
resizeObserver.observe(container);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 也观察滚动区域(滚动条出现/消失时 clientWidth 会变化)
|
|
200
|
+
var scrollEl = findScrollElement(wrapper);
|
|
201
|
+
if (scrollEl && scrollEl !== container) {
|
|
202
|
+
resizeObserver.observe(scrollEl);
|
|
203
|
+
}
|
|
204
|
+
return function () {
|
|
205
|
+
resizeObserver.disconnect();
|
|
206
|
+
};
|
|
207
|
+
}, [containerRef, findScrollElement]);
|
|
208
|
+
|
|
209
|
+
// ========================= 渲染宽度计算 =========================
|
|
210
|
+
// renderWidths: 实际传给 colgroup 的宽度
|
|
211
|
+
// scrollX: renderWidths 的总和,用于覆盖 scroll.x
|
|
212
|
+
//
|
|
213
|
+
// 策略(对齐 Element Plus updateColumnsWidth):
|
|
214
|
+
// 1. 收集所有列的 baseWidth,计算 totalWidth
|
|
215
|
+
// 2. flexColumns = 未在 resizedKeys 中的列(弹性列)
|
|
216
|
+
// 3. remainder = containerWidth - totalWidth
|
|
217
|
+
// 4. remainder ≠ 0 且有弹性列时,按 baseWidth 比例分配 remainder 给弹性列
|
|
218
|
+
// - remainder > 0:弹性列膨胀(吸收剩余空间)
|
|
219
|
+
// - remainder < 0:弹性列收缩(让出超出空间),但不低于 minWidth
|
|
220
|
+
// - 第一个弹性列吸收舍入误差,确保 totalRender === containerWidth
|
|
221
|
+
// 5. remainder = 0 或无弹性列时,使用 baseWidth
|
|
222
|
+
var _React$useMemo = React.useMemo(function () {
|
|
223
|
+
var map = new Map();
|
|
224
|
+
|
|
225
|
+
// 1. 收集每列的基础宽度
|
|
226
|
+
var entries = [];
|
|
227
|
+
var totalWidth = 0;
|
|
228
|
+
flattenColumns.forEach(function (col) {
|
|
229
|
+
var key = getColumnKey(col);
|
|
230
|
+
// 不可标识的列不参与宽度分配,保留自身 width / 自然宽度
|
|
231
|
+
if (key == null) return;
|
|
232
|
+
var mapWidth = columnWidths.get(key);
|
|
233
|
+
// Guard against NaN: non-numeric string widths are treated as missing
|
|
234
|
+
var rawW = col.width != null ? Number(col.width) : 0;
|
|
235
|
+
// 未设 width 且未被拖拽冻结的列:以 defaultMinWidth 为基础宽度参与弹性分配,
|
|
236
|
+
// 避免渲染宽度被覆盖为 0 而塌陷为 0~1px
|
|
237
|
+
var baseWidth = mapWidth !== null && mapWidth !== void 0 ? mapWidth : Number.isNaN(rawW) || rawW <= 0 ? defaultMinWidth : rawW;
|
|
238
|
+
var flex = !resizedKeys.has(key) && baseWidth > 0;
|
|
239
|
+
entries.push({
|
|
240
|
+
key: key,
|
|
241
|
+
width: baseWidth,
|
|
242
|
+
flex: flex
|
|
243
|
+
});
|
|
244
|
+
totalWidth += baseWidth;
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// 2. 收集弹性列
|
|
248
|
+
var flexEntries = entries.filter(function (e) {
|
|
249
|
+
return e.flex;
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// 3. 计算剩余空间
|
|
253
|
+
var remainder = containerWidth > 0 && flexEntries.length > 0 ? containerWidth - totalWidth : 0;
|
|
254
|
+
|
|
255
|
+
// 4. 分配(remainder > 0 膨胀,remainder < 0 收缩)
|
|
256
|
+
if (remainder !== 0) {
|
|
257
|
+
var flexTotal = flexEntries.reduce(function (sum, e) {
|
|
258
|
+
return sum + e.width;
|
|
259
|
+
}, 0);
|
|
260
|
+
if (remainder > 0) {
|
|
261
|
+
// 膨胀:按 baseWidth 比例分配剩余空间
|
|
262
|
+
var ratio = remainder / flexTotal;
|
|
263
|
+
var assigned = 0;
|
|
264
|
+
flexEntries.forEach(function (entry, index) {
|
|
265
|
+
if (index === 0) return; // 第一个弹性列最后计算,吸收舍入误差
|
|
266
|
+
var flex = Math.floor(entry.width * ratio);
|
|
267
|
+
assigned += flex;
|
|
268
|
+
map.set(entry.key, entry.width + flex);
|
|
269
|
+
});
|
|
270
|
+
// 第一个弹性列 = remainder - 其他弹性列已分配的量
|
|
271
|
+
var firstFlex = remainder - assigned;
|
|
272
|
+
map.set(flexEntries[0].key, flexEntries[0].width + firstFlex);
|
|
273
|
+
} else {
|
|
274
|
+
// 收缩:按 baseWidth 比例从弹性列中扣除超出空间(对齐 Element Plus)
|
|
275
|
+
var deficit = -remainder; // 需要扣除的总量
|
|
276
|
+
var _ratio = deficit / flexTotal;
|
|
277
|
+
|
|
278
|
+
// 先计算每列的扣除量,确保不低于 minWidth
|
|
279
|
+
var actualDeducted = 0;
|
|
280
|
+
var deductions = flexEntries.map(function (entry, index) {
|
|
281
|
+
if (index === 0) return 0; // 第一个弹性列最后计算
|
|
282
|
+
var maxDeduct = Math.max(0, entry.width - defaultMinWidth);
|
|
283
|
+
var deduct = Math.min(Math.floor(entry.width * _ratio), maxDeduct);
|
|
284
|
+
actualDeducted += deduct;
|
|
285
|
+
return deduct;
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// 第一个弹性列扣除剩余量,但不低于 minWidth
|
|
289
|
+
var firstDeduct = Math.min(deficit - actualDeducted, Math.max(0, flexEntries[0].width - defaultMinWidth));
|
|
290
|
+
deductions[0] = firstDeduct;
|
|
291
|
+
actualDeducted += firstDeduct;
|
|
292
|
+
|
|
293
|
+
// 应用扣除
|
|
294
|
+
flexEntries.forEach(function (entry, index) {
|
|
295
|
+
map.set(entry.key, entry.width - deductions[index]);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// 如果弹性列全部到 minWidth 仍然不够扣除,totalRender > containerWidth,出现滚动条
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// 非弹性列 + remainder = 0 时的弹性列,使用 baseWidth
|
|
303
|
+
var totalRender = 0;
|
|
304
|
+
entries.forEach(function (entry) {
|
|
305
|
+
if (!map.has(entry.key)) {
|
|
306
|
+
map.set(entry.key, entry.width);
|
|
307
|
+
}
|
|
308
|
+
totalRender += map.get(entry.key);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// scrollX: 当 containerWidth > 0 时使用 totalRender(列宽总和)
|
|
312
|
+
// 当 containerWidth = 0(尚未测量)时返回 null,由 InternalTable 回退到用户 scroll.x
|
|
313
|
+
var sx = containerWidth > 0 ? totalRender : null;
|
|
314
|
+
return {
|
|
315
|
+
renderWidths: map,
|
|
316
|
+
scrollX: sx
|
|
317
|
+
};
|
|
318
|
+
}, [flattenColumns, columnWidths, containerWidth, resizedKeys, defaultMinWidth]),
|
|
319
|
+
renderWidths = _React$useMemo.renderWidths,
|
|
320
|
+
scrollX = _React$useMemo.scrollX;
|
|
321
|
+
|
|
322
|
+
// 同步 renderWidths 到 ref(供 onUp 中读取当前渲染宽度)
|
|
323
|
+
renderWidthsRef.current = renderWidths;
|
|
324
|
+
|
|
325
|
+
// 更新竖线位置(直接操作 DOM,不触发 React 重渲染)
|
|
326
|
+
// 竖线覆盖表格本体(.xxx-container),不覆盖分页等外部区域
|
|
327
|
+
var updateLinePosition = React.useCallback(function (clientX) {
|
|
328
|
+
var line = lineRef.current;
|
|
329
|
+
var wrapper = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current;
|
|
330
|
+
if (!line || !wrapper) return;
|
|
331
|
+
|
|
332
|
+
// 查找表格本体容器(排除分页、title、footer、spin 等区域)
|
|
333
|
+
var tableContainer = wrapper.querySelector(".".concat(prefixCls, "-container"));
|
|
334
|
+
if (!tableContainer) return;
|
|
335
|
+
|
|
336
|
+
// 查找滚动区域元素(与 containerWidth 测量使用相同的优先级)
|
|
337
|
+
// 使用 scrollEl.clientWidth 计算右边界,自动排除垂直滚动条宽度
|
|
338
|
+
var scrollEl = findScrollElement(wrapper);
|
|
339
|
+
if (!scrollEl) return;
|
|
340
|
+
var wrapperRect = wrapper.getBoundingClientRect();
|
|
341
|
+
var tableRect = tableContainer.getBoundingClientRect();
|
|
342
|
+
var scrollRect = scrollEl.getBoundingClientRect();
|
|
343
|
+
|
|
344
|
+
// 竖线的 top / height 基于表格本体相对于 wrapper 的偏移
|
|
345
|
+
var topOffset = tableRect.top - wrapperRect.top;
|
|
346
|
+
var tableHeight = tableRect.height;
|
|
347
|
+
|
|
348
|
+
// 水平位置:竖线是 absolute 定位在 wrapper 内,直接用 clientX 减去 wrapper 左边界
|
|
349
|
+
// wrapper 本身不滚动(滚动发生在 .ant-table-container 内部),所以不需要 scrollLeft
|
|
350
|
+
var left = clientX - wrapperRect.left;
|
|
351
|
+
|
|
352
|
+
// 限制在滚动区域范围内(使用 scrollEl.clientWidth 排除垂直滚动条)
|
|
353
|
+
var minLeft = scrollRect.left - wrapperRect.left;
|
|
354
|
+
var maxLeft = minLeft + scrollEl.clientWidth;
|
|
355
|
+
left = Math.max(minLeft, Math.min(left, maxLeft));
|
|
356
|
+
line.style.left = "".concat(left, "px");
|
|
357
|
+
line.style.top = "".concat(topOffset, "px");
|
|
358
|
+
line.style.height = "".concat(tableHeight, "px");
|
|
359
|
+
line.style.display = 'block';
|
|
360
|
+
}, [containerRef, findScrollElement, prefixCls]);
|
|
361
|
+
|
|
362
|
+
// 隐藏竖线
|
|
363
|
+
var hideLine = React.useCallback(function () {
|
|
364
|
+
if (lineRef.current) {
|
|
365
|
+
lineRef.current.style.display = 'none';
|
|
366
|
+
}
|
|
367
|
+
}, []);
|
|
368
|
+
|
|
369
|
+
// 组件卸载时清理残留的拖拽监听器,防止内存泄漏
|
|
370
|
+
React.useEffect(function () {
|
|
371
|
+
return function () {
|
|
372
|
+
var _cleanupDragListeners, _dragRef$current;
|
|
373
|
+
(_cleanupDragListeners = cleanupDragListenersRef.current) === null || _cleanupDragListeners === void 0 || _cleanupDragListeners.call(cleanupDragListenersRef);
|
|
374
|
+
cleanupDragListenersRef.current = null;
|
|
375
|
+
if (((_dragRef$current = dragRef.current) === null || _dragRef$current === void 0 ? void 0 : _dragRef$current.rafId) != null) {
|
|
376
|
+
cancelAnimationFrame(dragRef.current.rafId);
|
|
377
|
+
}
|
|
378
|
+
dragRef.current = null;
|
|
379
|
+
};
|
|
380
|
+
}, []);
|
|
381
|
+
|
|
382
|
+
// 开始拖拽
|
|
383
|
+
// actualWidth 由 ResizeHandle 从 th.offsetWidth 测量后传入,确保与实际渲染宽度一致
|
|
384
|
+
var onStartResize = React.useCallback(function (e, col, actualWidth) {
|
|
385
|
+
var _cleanupDragListeners2, _columnWidthsRef$curr;
|
|
386
|
+
var key = getColumnKey(col);
|
|
387
|
+
var config = getResizeConfig(col);
|
|
388
|
+
if (key == null || !config.enabled) return;
|
|
389
|
+
e.preventDefault();
|
|
390
|
+
e.stopPropagation();
|
|
391
|
+
|
|
392
|
+
// 如果有正在进行的拖拽,先清理旧的事件监听器(防止重复 mousedown 导致监听器堆积)
|
|
393
|
+
(_cleanupDragListeners2 = cleanupDragListenersRef.current) === null || _cleanupDragListeners2 === void 0 || _cleanupDragListeners2.call(cleanupDragListenersRef);
|
|
394
|
+
cleanupDragListenersRef.current = null;
|
|
395
|
+
|
|
396
|
+
// 使用 DOM 测量的实际渲染宽度作为拖拽起点(包含 remainder)
|
|
397
|
+
// 参考 Element Plus:columnWidth = finalLeft - startColumnLeft
|
|
398
|
+
// 用户拖 3px → 新宽度 = 渲染宽度 - 3px,松手后变固定列,视觉无跳变
|
|
399
|
+
// Guard against NaN: if col.width is a non-numeric string (e.g. 'auto'),
|
|
400
|
+
// Number(col.width) returns NaN, which would corrupt the drag math.
|
|
401
|
+
var rawWidth = col.width != null ? Number(col.width) : 0;
|
|
402
|
+
var baseWidth = (_columnWidthsRef$curr = columnWidthsRef.current.get(key)) !== null && _columnWidthsRef$curr !== void 0 ? _columnWidthsRef$curr : Number.isNaN(rawWidth) ? 0 : rawWidth;
|
|
403
|
+
var currentWidth = actualWidth !== null && actualWidth !== void 0 ? actualWidth : baseWidth;
|
|
404
|
+
dragRef.current = {
|
|
405
|
+
key: key,
|
|
406
|
+
startX: e.clientX,
|
|
407
|
+
startWidth: currentWidth,
|
|
408
|
+
minWidth: config.minWidth,
|
|
409
|
+
maxWidth: config.maxWidth,
|
|
410
|
+
latestWidth: currentWidth,
|
|
411
|
+
latestClientX: e.clientX,
|
|
412
|
+
rafId: null
|
|
413
|
+
};
|
|
414
|
+
setResizingKey(key);
|
|
415
|
+
|
|
416
|
+
// 立即显示竖线
|
|
417
|
+
updateLinePosition(e.clientX);
|
|
418
|
+
var onMove = function onMove(ev) {
|
|
419
|
+
if (!dragRef.current) return;
|
|
420
|
+
|
|
421
|
+
// 始终存储最新的 clientX,rAF 回调中使用此值
|
|
422
|
+
dragRef.current.latestClientX = ev.clientX;
|
|
423
|
+
|
|
424
|
+
// 使用 rAF 节流:如果上一帧还没执行完,跳过本次调度
|
|
425
|
+
if (dragRef.current.rafId != null) return;
|
|
426
|
+
dragRef.current.rafId = requestAnimationFrame(function () {
|
|
427
|
+
if (!dragRef.current) return;
|
|
428
|
+
dragRef.current.rafId = null;
|
|
429
|
+
|
|
430
|
+
// 使用最新存储的 clientX 计算,而非闭包中的 ev
|
|
431
|
+
var delta = dragRef.current.latestClientX - dragRef.current.startX;
|
|
432
|
+
var newWidth = dragRef.current.startWidth + delta;
|
|
433
|
+
newWidth = Math.max(newWidth, dragRef.current.minWidth);
|
|
434
|
+
if (dragRef.current.maxWidth != null) {
|
|
435
|
+
newWidth = Math.min(newWidth, dragRef.current.maxWidth);
|
|
436
|
+
}
|
|
437
|
+
dragRef.current.latestWidth = newWidth;
|
|
438
|
+
|
|
439
|
+
// 直接操作 DOM 更新竖线位置(不触发 React 重渲染)
|
|
440
|
+
updateLinePosition(dragRef.current.latestClientX);
|
|
441
|
+
});
|
|
442
|
+
};
|
|
443
|
+
var onUp = function onUp() {
|
|
444
|
+
var _dragRef$current2;
|
|
445
|
+
document.removeEventListener('mousemove', onMove);
|
|
446
|
+
document.removeEventListener('mouseup', onUp);
|
|
447
|
+
cleanupDragListenersRef.current = null;
|
|
448
|
+
document.body.style.cursor = '';
|
|
449
|
+
document.body.style.userSelect = '';
|
|
450
|
+
|
|
451
|
+
// 取消未执行的 rAF
|
|
452
|
+
if (((_dragRef$current2 = dragRef.current) === null || _dragRef$current2 === void 0 ? void 0 : _dragRef$current2.rafId) != null) {
|
|
453
|
+
cancelAnimationFrame(dragRef.current.rafId);
|
|
454
|
+
}
|
|
455
|
+
if (dragRef.current) {
|
|
456
|
+
var _onColumnResizeRef$cu, _col$onResize;
|
|
457
|
+
var _dragRef$current3 = dragRef.current,
|
|
458
|
+
k = _dragRef$current3.key,
|
|
459
|
+
latestWidth = _dragRef$current3.latestWidth;
|
|
460
|
+
|
|
461
|
+
// 核心修复:冻结所有列的 baseWidth 为当前渲染宽度
|
|
462
|
+
// 这样松手后 renderWidths 重算时,baseWidth === renderedWidth,
|
|
463
|
+
// remainder ≈ 0,不会触发 flex 重分配,列边界精确停留在鼠标位置。
|
|
464
|
+
// 同时将所有列标记为固定列(不再参与 flex 分配)。
|
|
465
|
+
var currentRendered = renderWidthsRef.current;
|
|
466
|
+
setColumnWidths(function (prev) {
|
|
467
|
+
var next = new Map(prev);
|
|
468
|
+
// 冻结所有列的 baseWidth 为当前渲染宽度
|
|
469
|
+
currentRendered.forEach(function (w, key) {
|
|
470
|
+
// 不冻结 0 / NaN:未分配到渲染宽度的列保持弹性,避免塌陷宽度被永久化
|
|
471
|
+
if (w > 0 && !Number.isNaN(w)) next.set(key, w);
|
|
472
|
+
});
|
|
473
|
+
// 被拖拽的列使用用户拖拽的最终宽度
|
|
474
|
+
next.set(k, latestWidth);
|
|
475
|
+
return next;
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
// 将所有列标记为固定列(不再参与 flex 分配)
|
|
479
|
+
setResizedKeys(function (prev) {
|
|
480
|
+
var next = new Set(prev);
|
|
481
|
+
flattenColumnsRef.current.forEach(function (col) {
|
|
482
|
+
var key = getColumnKey(col);
|
|
483
|
+
if (key != null) next.add(key);
|
|
484
|
+
});
|
|
485
|
+
return next;
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
// 触发回调
|
|
489
|
+
(_onColumnResizeRef$cu = onColumnResizeRef.current) === null || _onColumnResizeRef$cu === void 0 || _onColumnResizeRef$cu.call(onColumnResizeRef, k, latestWidth);
|
|
490
|
+
|
|
491
|
+
// 触发列的 onResize 回调
|
|
492
|
+
var _col = flattenColumnsRef.current.find(function (c) {
|
|
493
|
+
return getColumnKey(c) === k;
|
|
494
|
+
});
|
|
495
|
+
_col === null || _col === void 0 || (_col$onResize = _col.onResize) === null || _col$onResize === void 0 || _col$onResize.call(_col, latestWidth);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// 隐藏竖线
|
|
499
|
+
hideLine();
|
|
500
|
+
dragRef.current = null;
|
|
501
|
+
setResizingKey(null);
|
|
502
|
+
};
|
|
503
|
+
document.addEventListener('mousemove', onMove);
|
|
504
|
+
document.addEventListener('mouseup', onUp);
|
|
505
|
+
document.body.style.cursor = 'col-resize';
|
|
506
|
+
document.body.style.userSelect = 'none';
|
|
507
|
+
|
|
508
|
+
// 存储清理函数,用于组件卸载或重复 mousedown 时清理
|
|
509
|
+
cleanupDragListenersRef.current = function () {
|
|
510
|
+
document.removeEventListener('mousemove', onMove);
|
|
511
|
+
document.removeEventListener('mouseup', onUp);
|
|
512
|
+
};
|
|
513
|
+
}, [getResizeConfig, updateLinePosition, hideLine]);
|
|
514
|
+
|
|
515
|
+
// 获取列的渲染宽度(= 用户宽度 + 剩余空间分配)
|
|
516
|
+
var getColumnRenderWidth = React.useCallback(function (col) {
|
|
517
|
+
var key = getColumnKey(col);
|
|
518
|
+
// 不可标识的列不注入覆盖宽度
|
|
519
|
+
if (key == null) return undefined;
|
|
520
|
+
var renderWidth = renderWidths.get(key);
|
|
521
|
+
if (renderWidth != null) return renderWidth;
|
|
522
|
+
var mapWidth = columnWidths.get(key);
|
|
523
|
+
if (mapWidth != null) return mapWidth;
|
|
524
|
+
if (col.width != null) return Number(col.width);
|
|
525
|
+
return undefined;
|
|
526
|
+
}, [renderWidths, columnWidths]);
|
|
527
|
+
|
|
528
|
+
// 检查某列是否可调整
|
|
529
|
+
var isColumnResizable = React.useCallback(function (col) {
|
|
530
|
+
return getResizeConfig(col).enabled;
|
|
531
|
+
}, [getResizeConfig]);
|
|
532
|
+
|
|
533
|
+
// 键盘调整列宽(不走 MouseEvent 路径,直接更新 state)
|
|
534
|
+
var setColumnWidth = React.useCallback(function (col, newWidth) {
|
|
535
|
+
var _onColumnResizeRef$cu2, _col$onResize2;
|
|
536
|
+
var key = getColumnKey(col);
|
|
537
|
+
var config = getResizeConfig(col);
|
|
538
|
+
if (key == null || !config.enabled) return;
|
|
539
|
+
|
|
540
|
+
// clamp 到 minWidth / maxWidth
|
|
541
|
+
newWidth = Math.max(newWidth, config.minWidth);
|
|
542
|
+
if (config.maxWidth != null) {
|
|
543
|
+
newWidth = Math.min(newWidth, config.maxWidth);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// 冻结所有列的 baseWidth 为当前渲染宽度,标记为固定列
|
|
547
|
+
var currentRendered = renderWidthsRef.current;
|
|
548
|
+
setColumnWidths(function (prev) {
|
|
549
|
+
var next = new Map(prev);
|
|
550
|
+
currentRendered.forEach(function (w, k) {
|
|
551
|
+
// 不冻结 0 / NaN:未分配到渲染宽度的列保持弹性,避免塌陷宽度被永久化
|
|
552
|
+
if (w > 0 && !Number.isNaN(w)) next.set(k, w);
|
|
553
|
+
});
|
|
554
|
+
next.set(key, newWidth);
|
|
555
|
+
return next;
|
|
556
|
+
});
|
|
557
|
+
setResizedKeys(function (prev) {
|
|
558
|
+
var next = new Set(prev);
|
|
559
|
+
flattenColumnsRef.current.forEach(function (c) {
|
|
560
|
+
var k = getColumnKey(c);
|
|
561
|
+
if (k != null) next.add(k);
|
|
562
|
+
});
|
|
563
|
+
return next;
|
|
564
|
+
});
|
|
565
|
+
(_onColumnResizeRef$cu2 = onColumnResizeRef.current) === null || _onColumnResizeRef$cu2 === void 0 || _onColumnResizeRef$cu2.call(onColumnResizeRef, key, newWidth);
|
|
566
|
+
(_col$onResize2 = col.onResize) === null || _col$onResize2 === void 0 || _col$onResize2.call(col, newWidth);
|
|
567
|
+
}, [getResizeConfig]);
|
|
568
|
+
|
|
569
|
+
// 重置列宽(同时清空 resizedKeys,恢复所有列为弹性列)
|
|
570
|
+
var resetColumnWidths = React.useCallback(function () {
|
|
571
|
+
setColumnWidths(new Map());
|
|
572
|
+
setResizedKeys(new Set());
|
|
573
|
+
}, []);
|
|
574
|
+
return {
|
|
575
|
+
resizingKey: resizingKey,
|
|
576
|
+
lineRef: lineRef,
|
|
577
|
+
renderWidths: renderWidths,
|
|
578
|
+
scrollX: scrollX,
|
|
579
|
+
getColumnRenderWidth: getColumnRenderWidth,
|
|
580
|
+
isColumnResizable: isColumnResizable,
|
|
581
|
+
onStartResize: onStartResize,
|
|
582
|
+
setColumnWidth: setColumnWidth,
|
|
583
|
+
resetColumnWidths: resetColumnWidths
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
export default useResize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE, default as useSelection, } from './useSelection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE, default as useSelection } from "./useSelection";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExpandType, GetPopupContainer, GetRowKey, Key, SelectionItem, TableLocale, TableRowSelection, TransformColumns } from '../../interface';
|
|
2
|
+
import type { AnyObject } from '../../../_util/type';
|
|
3
|
+
export declare const SELECTION_COLUMN: {};
|
|
4
|
+
export declare const SELECTION_ALL: "SELECT_ALL";
|
|
5
|
+
export declare const SELECTION_INVERT: "SELECT_INVERT";
|
|
6
|
+
export declare const SELECTION_NONE: "SELECT_NONE";
|
|
7
|
+
interface UseSelectionConfig<RecordType = AnyObject> {
|
|
8
|
+
prefixCls: string;
|
|
9
|
+
pageData: RecordType[];
|
|
10
|
+
data: RecordType[];
|
|
11
|
+
getRowKey: GetRowKey<RecordType>;
|
|
12
|
+
getRecordByKey: (key: Key) => RecordType;
|
|
13
|
+
expandType: ExpandType;
|
|
14
|
+
childrenColumnName: string;
|
|
15
|
+
locale: TableLocale;
|
|
16
|
+
getPopupContainer?: GetPopupContainer;
|
|
17
|
+
}
|
|
18
|
+
export type INTERNAL_SELECTION_ITEM = SelectionItem | typeof SELECTION_ALL | typeof SELECTION_INVERT | typeof SELECTION_NONE;
|
|
19
|
+
declare const useSelection: <RecordType extends AnyObject = AnyObject>(config: UseSelectionConfig<RecordType>, rowSelection?: TableRowSelection<RecordType>) => readonly [TransformColumns<RecordType>, Set<Key>];
|
|
20
|
+
export default useSelection;
|