@tanstack/table-core 9.0.0-alpha.42 → 9.0.0-alpha.46
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/dist/core/cells/constructCell.cjs +5 -0
- package/dist/core/cells/constructCell.cjs.map +1 -1
- package/dist/core/cells/constructCell.d.cts +5 -0
- package/dist/core/cells/constructCell.d.ts +5 -0
- package/dist/core/cells/constructCell.js +5 -0
- package/dist/core/cells/constructCell.js.map +1 -1
- package/dist/core/cells/coreCellsFeature.cjs +5 -0
- package/dist/core/cells/coreCellsFeature.cjs.map +1 -1
- package/dist/core/cells/coreCellsFeature.d.cts +5 -0
- package/dist/core/cells/coreCellsFeature.d.ts +5 -0
- package/dist/core/cells/coreCellsFeature.js +5 -0
- package/dist/core/cells/coreCellsFeature.js.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.cjs +30 -0
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +30 -0
- package/dist/core/cells/coreCellsFeature.utils.d.ts +30 -0
- package/dist/core/cells/coreCellsFeature.utils.js +30 -0
- package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
- package/dist/core/columns/constructColumn.cjs +16 -9
- package/dist/core/columns/constructColumn.cjs.map +1 -1
- package/dist/core/columns/constructColumn.d.cts +5 -0
- package/dist/core/columns/constructColumn.d.ts +5 -0
- package/dist/core/columns/constructColumn.js +16 -9
- package/dist/core/columns/constructColumn.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.cjs +9 -0
- package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.d.cts +5 -0
- package/dist/core/columns/coreColumnsFeature.d.ts +5 -0
- package/dist/core/columns/coreColumnsFeature.js +10 -1
- package/dist/core/columns/coreColumnsFeature.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +4 -0
- package/dist/core/columns/coreColumnsFeature.types.d.ts +4 -0
- package/dist/core/columns/coreColumnsFeature.utils.cjs +99 -4
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +92 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +92 -1
- package/dist/core/columns/coreColumnsFeature.utils.js +99 -5
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/coreFeatures.cjs +5 -0
- package/dist/core/coreFeatures.cjs.map +1 -1
- package/dist/core/coreFeatures.d.cts +5 -0
- package/dist/core/coreFeatures.d.ts +5 -0
- package/dist/core/coreFeatures.js +5 -0
- package/dist/core/coreFeatures.js.map +1 -1
- package/dist/core/headers/buildHeaderGroups.cjs +6 -1
- package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
- package/dist/core/headers/buildHeaderGroups.d.cts +5 -0
- package/dist/core/headers/buildHeaderGroups.d.ts +5 -0
- package/dist/core/headers/buildHeaderGroups.js +6 -1
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +5 -0
- package/dist/core/headers/constructHeader.cjs.map +1 -1
- package/dist/core/headers/constructHeader.d.cts +5 -0
- package/dist/core/headers/constructHeader.d.ts +5 -0
- package/dist/core/headers/constructHeader.js +5 -0
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +5 -0
- package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.d.cts +5 -0
- package/dist/core/headers/coreHeadersFeature.d.ts +5 -0
- package/dist/core/headers/coreHeadersFeature.js +5 -0
- package/dist/core/headers/coreHeadersFeature.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.cjs +71 -2
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +60 -0
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +60 -0
- package/dist/core/headers/coreHeadersFeature.utils.js +72 -3
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +1 -0
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +1 -0
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs +5 -0
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +1 -1
- package/dist/core/reactivity/coreReactivityFeature.utils.d.cts +10 -0
- package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +10 -0
- package/dist/core/reactivity/coreReactivityFeature.utils.js +5 -0
- package/dist/core/reactivity/coreReactivityFeature.utils.js.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.cjs +5 -0
- package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.d.cts +5 -0
- package/dist/core/row-models/coreRowModelsFeature.d.ts +5 -0
- package/dist/core/row-models/coreRowModelsFeature.js +5 -0
- package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.types.d.cts +2 -1
- package/dist/core/row-models/coreRowModelsFeature.types.d.ts +2 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +120 -0
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +120 -0
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +120 -0
- package/dist/core/row-models/coreRowModelsFeature.utils.js +120 -0
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
- package/dist/core/row-models/createCoreRowModel.cjs +5 -0
- package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
- package/dist/core/row-models/createCoreRowModel.d.cts +5 -0
- package/dist/core/row-models/createCoreRowModel.d.ts +5 -0
- package/dist/core/row-models/createCoreRowModel.js +5 -0
- package/dist/core/row-models/createCoreRowModel.js.map +1 -1
- package/dist/core/rows/constructRow.cjs +5 -0
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.d.cts +5 -0
- package/dist/core/rows/constructRow.d.ts +5 -0
- package/dist/core/rows/constructRow.js +5 -0
- package/dist/core/rows/constructRow.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.cjs +5 -0
- package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.d.cts +5 -0
- package/dist/core/rows/coreRowsFeature.d.ts +5 -0
- package/dist/core/rows/coreRowsFeature.js +5 -0
- package/dist/core/rows/coreRowsFeature.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +3 -0
- package/dist/core/rows/coreRowsFeature.types.d.ts +3 -0
- package/dist/core/rows/coreRowsFeature.utils.cjs +104 -4
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +101 -0
- package/dist/core/rows/coreRowsFeature.utils.d.ts +101 -0
- package/dist/core/rows/coreRowsFeature.utils.js +104 -4
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +34 -19
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.d.cts +10 -0
- package/dist/core/table/constructTable.d.ts +10 -0
- package/dist/core/table/constructTable.js +34 -19
- package/dist/core/table/constructTable.js.map +1 -1
- package/dist/core/table/coreTablesFeature.cjs +5 -0
- package/dist/core/table/coreTablesFeature.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.d.cts +5 -0
- package/dist/core/table/coreTablesFeature.d.ts +5 -0
- package/dist/core/table/coreTablesFeature.js +5 -0
- package/dist/core/table/coreTablesFeature.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +23 -10
- package/dist/core/table/coreTablesFeature.types.d.ts +23 -10
- package/dist/core/table/coreTablesFeature.utils.cjs +60 -1
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +46 -1
- package/dist/core/table/coreTablesFeature.utils.d.ts +46 -1
- package/dist/core/table/coreTablesFeature.utils.js +60 -2
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.cjs +9 -1
- package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.d.cts +9 -1
- package/dist/features/column-faceting/columnFacetingFeature.d.ts +9 -1
- package/dist/features/column-faceting/columnFacetingFeature.js +9 -1
- package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +12 -6
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +12 -6
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +60 -0
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +60 -0
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +60 -0
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +60 -0
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +5 -0
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +5 -0
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +5 -0
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +5 -0
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +5 -0
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.d.cts +5 -0
- package/dist/features/column-faceting/createFacetedRowModel.d.ts +5 -0
- package/dist/features/column-faceting/createFacetedRowModel.js +5 -0
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +5 -0
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +5 -0
- package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +5 -0
- package/dist/features/column-faceting/createFacetedUniqueValues.js +5 -0
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.cjs +10 -2
- package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.d.cts +10 -2
- package/dist/features/column-filtering/columnFilteringFeature.d.ts +10 -2
- package/dist/features/column-filtering/columnFilteringFeature.js +10 -2
- package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +7 -4
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +7 -4
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +113 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +111 -0
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +111 -0
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +113 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +5 -0
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.d.cts +5 -0
- package/dist/features/column-filtering/createFilteredRowModel.d.ts +5 -0
- package/dist/features/column-filtering/createFilteredRowModel.js +5 -0
- package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
- package/dist/features/column-filtering/filterRowsUtils.cjs +5 -0
- package/dist/features/column-filtering/filterRowsUtils.cjs.map +1 -1
- package/dist/features/column-filtering/filterRowsUtils.js +5 -0
- package/dist/features/column-filtering/filterRowsUtils.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.cjs +9 -1
- package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.cts +9 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.ts +9 -1
- package/dist/features/column-grouping/columnGroupingFeature.js +9 -1
- package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +7 -3
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +7 -3
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +151 -0
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +151 -0
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +151 -0
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +151 -0
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.cjs +5 -0
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +5 -0
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +5 -0
- package/dist/features/column-grouping/createGroupedRowModel.js +5 -0
- package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.cjs +12 -3
- package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.d.cts +9 -1
- package/dist/features/column-ordering/columnOrderingFeature.d.ts +9 -1
- package/dist/features/column-ordering/columnOrderingFeature.js +12 -3
- package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +4 -2
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +4 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +98 -8
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +81 -0
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +81 -0
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +98 -8
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.cjs +17 -30
- package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.d.cts +9 -1
- package/dist/features/column-pinning/columnPinningFeature.d.ts +9 -1
- package/dist/features/column-pinning/columnPinningFeature.js +17 -30
- package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +6 -2
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +6 -2
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +360 -17
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +314 -3
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +314 -3
- package/dist/features/column-pinning/columnPinningFeature.utils.js +361 -18
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.cjs +9 -2
- package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.d.cts +9 -2
- package/dist/features/column-resizing/columnResizingFeature.d.ts +9 -2
- package/dist/features/column-resizing/columnResizingFeature.js +9 -2
- package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +14 -6
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +14 -6
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +81 -0
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +81 -0
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +81 -0
- package/dist/features/column-resizing/columnResizingFeature.utils.js +81 -0
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +50 -12
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.d.cts +10 -2
- package/dist/features/column-sizing/columnSizingFeature.d.ts +10 -2
- package/dist/features/column-sizing/columnSizingFeature.js +51 -13
- package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +6 -3
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +6 -3
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +151 -3
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +141 -0
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +141 -0
- package/dist/features/column-sizing/columnSizingFeature.utils.js +151 -3
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +26 -25
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.d.cts +9 -1
- package/dist/features/column-visibility/columnVisibilityFeature.d.ts +9 -1
- package/dist/features/column-visibility/columnVisibilityFeature.js +27 -26
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +4 -3
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +4 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +172 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +143 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +143 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +173 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.cjs +9 -2
- package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.d.cts +9 -2
- package/dist/features/global-filtering/globalFilteringFeature.d.ts +9 -2
- package/dist/features/global-filtering/globalFilteringFeature.js +9 -2
- package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +4 -2
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +4 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +51 -0
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +51 -0
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +51 -0
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +51 -0
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
- package/dist/features/row-expanding/createExpandedRowModel.cjs +10 -0
- package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
- package/dist/features/row-expanding/createExpandedRowModel.d.cts +10 -0
- package/dist/features/row-expanding/createExpandedRowModel.d.ts +10 -0
- package/dist/features/row-expanding/createExpandedRowModel.js +10 -0
- package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.cjs +9 -1
- package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.d.cts +9 -1
- package/dist/features/row-expanding/rowExpandingFeature.d.ts +9 -1
- package/dist/features/row-expanding/rowExpandingFeature.js +9 -1
- package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +10 -5
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +10 -5
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +151 -0
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +151 -0
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +151 -0
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +151 -0
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
- package/dist/features/row-pagination/createPaginatedRowModel.cjs +5 -0
- package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
- package/dist/features/row-pagination/createPaginatedRowModel.d.cts +5 -0
- package/dist/features/row-pagination/createPaginatedRowModel.d.ts +5 -0
- package/dist/features/row-pagination/createPaginatedRowModel.js +5 -0
- package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.cjs +9 -1
- package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.d.cts +9 -1
- package/dist/features/row-pagination/rowPaginationFeature.d.ts +9 -1
- package/dist/features/row-pagination/rowPaginationFeature.js +9 -1
- package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +11 -7
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +11 -7
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +175 -0
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +175 -0
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +175 -0
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +175 -0
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.cjs +9 -1
- package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.d.cts +9 -1
- package/dist/features/row-pinning/rowPinningFeature.d.ts +9 -1
- package/dist/features/row-pinning/rowPinningFeature.js +9 -1
- package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +4 -2
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +4 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +112 -0
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +112 -0
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +112 -0
- package/dist/features/row-pinning/rowPinningFeature.utils.js +112 -0
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs +9 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.d.cts +9 -1
- package/dist/features/row-selection/rowSelectionFeature.d.ts +9 -1
- package/dist/features/row-selection/rowSelectionFeature.js +9 -1
- package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +4 -2
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +4 -2
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +259 -0
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +259 -0
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +259 -0
- package/dist/features/row-selection/rowSelectionFeature.utils.js +259 -0
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +5 -0
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.d.cts +5 -0
- package/dist/features/row-sorting/createSortedRowModel.d.ts +5 -0
- package/dist/features/row-sorting/createSortedRowModel.js +5 -0
- package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.cjs +11 -3
- package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.d.cts +9 -1
- package/dist/features/row-sorting/rowSortingFeature.d.ts +9 -1
- package/dist/features/row-sorting/rowSortingFeature.js +11 -3
- package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +7 -3
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +7 -3
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +151 -0
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +151 -0
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +151 -0
- package/dist/features/row-sorting/rowSortingFeature.utils.js +151 -0
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/features/stockFeatures.cjs +5 -0
- package/dist/features/stockFeatures.cjs.map +1 -1
- package/dist/features/stockFeatures.d.cts +5 -0
- package/dist/features/stockFeatures.d.ts +5 -0
- package/dist/features/stockFeatures.js +5 -0
- package/dist/features/stockFeatures.js.map +1 -1
- package/dist/flex-render.cjs +10 -0
- package/dist/flex-render.cjs.map +1 -1
- package/dist/flex-render.d.cts +10 -0
- package/dist/flex-render.d.ts +10 -0
- package/dist/flex-render.js +10 -0
- package/dist/flex-render.js.map +1 -1
- package/dist/fns/aggregationFns.cjs +5 -0
- package/dist/fns/aggregationFns.cjs.map +1 -1
- package/dist/fns/aggregationFns.d.cts +5 -0
- package/dist/fns/aggregationFns.d.ts +5 -0
- package/dist/fns/aggregationFns.js +5 -0
- package/dist/fns/aggregationFns.js.map +1 -1
- package/dist/fns/filterFns.cjs +5 -0
- package/dist/fns/filterFns.cjs.map +1 -1
- package/dist/fns/filterFns.d.cts +5 -0
- package/dist/fns/filterFns.d.ts +5 -0
- package/dist/fns/filterFns.js +5 -0
- package/dist/fns/filterFns.js.map +1 -1
- package/dist/fns/sortFns.cjs +49 -4
- package/dist/fns/sortFns.cjs.map +1 -1
- package/dist/fns/sortFns.d.cts +41 -0
- package/dist/fns/sortFns.d.ts +41 -0
- package/dist/fns/sortFns.js +49 -4
- package/dist/fns/sortFns.js.map +1 -1
- package/dist/helpers/columnHelper.cjs.map +1 -1
- package/dist/helpers/columnHelper.js.map +1 -1
- package/dist/helpers/tableFeatures.cjs.map +1 -1
- package/dist/helpers/tableFeatures.js.map +1 -1
- package/dist/helpers/tableOptions.cjs +6 -0
- package/dist/helpers/tableOptions.cjs.map +1 -1
- package/dist/helpers/tableOptions.d.cts +26 -0
- package/dist/helpers/tableOptions.d.ts +26 -0
- package/dist/helpers/tableOptions.js +6 -0
- package/dist/helpers/tableOptions.js.map +1 -1
- package/dist/reactivity.cjs +1 -3
- package/dist/reactivity.d.cts +1 -2
- package/dist/reactivity.d.ts +1 -2
- package/dist/reactivity.js +1 -2
- package/dist/static-functions.cjs +2 -1
- package/dist/static-functions.d.cts +4 -4
- package/dist/static-functions.d.ts +4 -4
- package/dist/static-functions.js +4 -4
- package/dist/store-reactivity-bindings.cjs +36 -0
- package/dist/store-reactivity-bindings.cjs.map +1 -0
- package/dist/store-reactivity-bindings.d.cts +22 -0
- package/dist/store-reactivity-bindings.d.ts +22 -0
- package/dist/store-reactivity-bindings.js +35 -0
- package/dist/store-reactivity-bindings.js.map +1 -0
- package/dist/utils.cjs +45 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +45 -0
- package/dist/utils.d.ts +45 -0
- package/dist/utils.js +45 -0
- package/dist/utils.js.map +1 -1
- package/package.json +5 -1
- package/src/core/cells/constructCell.ts +5 -0
- package/src/core/cells/coreCellsFeature.ts +5 -0
- package/src/core/cells/coreCellsFeature.utils.ts +30 -0
- package/src/core/columns/constructColumn.ts +7 -1
- package/src/core/columns/coreColumnsFeature.ts +10 -0
- package/src/core/columns/coreColumnsFeature.types.ts +4 -0
- package/src/core/columns/coreColumnsFeature.utils.ts +109 -8
- package/src/core/coreFeatures.ts +5 -0
- package/src/core/headers/buildHeaderGroups.ts +7 -1
- package/src/core/headers/constructHeader.ts +5 -0
- package/src/core/headers/coreHeadersFeature.ts +5 -0
- package/src/core/headers/coreHeadersFeature.utils.ts +86 -8
- package/src/core/reactivity/coreReactivityFeature.types.ts +1 -0
- package/src/core/reactivity/coreReactivityFeature.utils.ts +15 -0
- package/src/core/row-models/coreRowModelsFeature.ts +5 -0
- package/src/core/row-models/coreRowModelsFeature.types.ts +2 -1
- package/src/core/row-models/coreRowModelsFeature.utils.ts +120 -0
- package/src/core/row-models/createCoreRowModel.ts +5 -0
- package/src/core/rows/constructRow.ts +5 -0
- package/src/core/rows/coreRowsFeature.ts +5 -0
- package/src/core/rows/coreRowsFeature.types.ts +3 -0
- package/src/core/rows/coreRowsFeature.utils.ts +106 -7
- package/src/core/table/constructTable.ts +37 -19
- package/src/core/table/coreTablesFeature.ts +5 -0
- package/src/core/table/coreTablesFeature.types.ts +23 -10
- package/src/core/table/coreTablesFeature.utils.ts +74 -1
- package/src/features/column-faceting/columnFacetingFeature.ts +9 -1
- package/src/features/column-faceting/columnFacetingFeature.types.ts +12 -6
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +60 -0
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +5 -0
- package/src/features/column-faceting/createFacetedRowModel.ts +5 -0
- package/src/features/column-faceting/createFacetedUniqueValues.ts +5 -0
- package/src/features/column-filtering/columnFilteringFeature.ts +10 -2
- package/src/features/column-filtering/columnFilteringFeature.types.ts +7 -4
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +113 -2
- package/src/features/column-filtering/createFilteredRowModel.ts +5 -0
- package/src/features/column-filtering/filterRowsUtils.ts +5 -0
- package/src/features/column-grouping/columnGroupingFeature.ts +9 -1
- package/src/features/column-grouping/columnGroupingFeature.types.ts +7 -3
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +151 -0
- package/src/features/column-grouping/createGroupedRowModel.ts +5 -0
- package/src/features/column-ordering/columnOrderingFeature.ts +10 -1
- package/src/features/column-ordering/columnOrderingFeature.types.ts +4 -2
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +110 -18
- package/src/features/column-pinning/columnPinningFeature.ts +11 -12
- package/src/features/column-pinning/columnPinningFeature.types.ts +6 -2
- package/src/features/column-pinning/columnPinningFeature.utils.ts +390 -57
- package/src/features/column-resizing/columnResizingFeature.ts +9 -2
- package/src/features/column-resizing/columnResizingFeature.types.ts +14 -6
- package/src/features/column-resizing/columnResizingFeature.utils.ts +81 -0
- package/src/features/column-sizing/columnSizingFeature.ts +38 -18
- package/src/features/column-sizing/columnSizingFeature.types.ts +6 -3
- package/src/features/column-sizing/columnSizingFeature.utils.ts +168 -9
- package/src/features/column-visibility/columnVisibilityFeature.ts +15 -21
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +4 -3
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +179 -23
- package/src/features/global-filtering/globalFilteringFeature.ts +9 -2
- package/src/features/global-filtering/globalFilteringFeature.types.ts +4 -2
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +51 -0
- package/src/features/row-expanding/createExpandedRowModel.ts +10 -0
- package/src/features/row-expanding/rowExpandingFeature.ts +9 -1
- package/src/features/row-expanding/rowExpandingFeature.types.ts +10 -5
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +151 -0
- package/src/features/row-pagination/createPaginatedRowModel.ts +5 -0
- package/src/features/row-pagination/rowPaginationFeature.ts +9 -1
- package/src/features/row-pagination/rowPaginationFeature.types.ts +11 -7
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +175 -0
- package/src/features/row-pinning/rowPinningFeature.ts +9 -1
- package/src/features/row-pinning/rowPinningFeature.types.ts +4 -2
- package/src/features/row-pinning/rowPinningFeature.utils.ts +112 -0
- package/src/features/row-selection/rowSelectionFeature.ts +9 -1
- package/src/features/row-selection/rowSelectionFeature.types.ts +4 -2
- package/src/features/row-selection/rowSelectionFeature.utils.ts +259 -0
- package/src/features/row-sorting/createSortedRowModel.ts +5 -0
- package/src/features/row-sorting/rowSortingFeature.ts +11 -3
- package/src/features/row-sorting/rowSortingFeature.types.ts +7 -3
- package/src/features/row-sorting/rowSortingFeature.utils.ts +151 -0
- package/src/features/stockFeatures.ts +5 -0
- package/src/flex-render.ts +10 -0
- package/src/fns/aggregationFns.ts +5 -0
- package/src/fns/filterFns.ts +5 -0
- package/src/fns/sortFns.ts +50 -5
- package/src/helpers/tableOptions.ts +32 -0
- package/src/reactivity.ts +0 -1
- package/src/store-reactivity-bindings.ts +35 -0
- package/src/types/Table.ts +1 -1
- package/src/utils.ts +45 -0
- package/dist/core/reactivity/constructReactivityBindings.cjs +0 -19
- package/dist/core/reactivity/constructReactivityBindings.cjs.map +0 -1
- package/dist/core/reactivity/constructReactivityBindings.d.cts +0 -7
- package/dist/core/reactivity/constructReactivityBindings.d.ts +0 -7
- package/dist/core/reactivity/constructReactivityBindings.js +0 -19
- package/dist/core/reactivity/constructReactivityBindings.js.map +0 -1
- package/src/core/reactivity/constructReactivityBindings.ts +0 -19
|
@@ -27,6 +27,11 @@ function getColumnPrototype<
|
|
|
27
27
|
return table._columnPrototype
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a column instance from normalized table internals.
|
|
32
|
+
*
|
|
33
|
+
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
34
|
+
*/
|
|
30
35
|
export function constructColumn<
|
|
31
36
|
TFeatures extends TableFeatures,
|
|
32
37
|
TData extends RowData,
|
|
@@ -60,10 +65,11 @@ export function constructColumn<
|
|
|
60
65
|
} else if (accessorKey) {
|
|
61
66
|
// Support deep accessor keys
|
|
62
67
|
if (accessorKey.includes('.')) {
|
|
68
|
+
const keys = accessorKey.split('.')
|
|
63
69
|
accessorFn = (originalRow: TData) => {
|
|
64
70
|
let result = originalRow as Record<string, any> | undefined
|
|
65
71
|
|
|
66
|
-
for (const key of
|
|
72
|
+
for (const key of keys) {
|
|
67
73
|
result = result?.[key]
|
|
68
74
|
if (process.env.NODE_ENV === 'development' && result === undefined) {
|
|
69
75
|
console.warn(
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
table_getAllFlatColumns,
|
|
7
7
|
table_getAllFlatColumnsById,
|
|
8
8
|
table_getAllLeafColumns,
|
|
9
|
+
table_getAllLeafColumnsById,
|
|
9
10
|
table_getColumn,
|
|
10
11
|
table_getDefaultColumnDef,
|
|
11
12
|
} from './coreColumnsFeature.utils'
|
|
@@ -26,6 +27,11 @@ export interface CoreColumnsFeatureConstructors<
|
|
|
26
27
|
// TableOptions: TableOptions_Columns<TFeatures, TData>
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Creates the stock core columns feature.
|
|
32
|
+
*
|
|
33
|
+
* The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
|
|
34
|
+
*/
|
|
29
35
|
export function constructCoreColumnsFeature<
|
|
30
36
|
TFeatures extends TableFeatures,
|
|
31
37
|
TData extends RowData,
|
|
@@ -76,6 +82,10 @@ export function constructCoreColumnsFeature<
|
|
|
76
82
|
table.options.groupedColumnMode,
|
|
77
83
|
],
|
|
78
84
|
},
|
|
85
|
+
table_getAllLeafColumnsById: {
|
|
86
|
+
fn: () => table_getAllLeafColumnsById(table),
|
|
87
|
+
memoDeps: () => [table.getAllLeafColumns()],
|
|
88
|
+
},
|
|
79
89
|
table_getColumn: {
|
|
80
90
|
fn: (columnId) => table_getColumn(table, columnId),
|
|
81
91
|
},
|
|
@@ -96,6 +96,10 @@ export interface Table_Columns<
|
|
|
96
96
|
* Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns.
|
|
97
97
|
*/
|
|
98
98
|
getAllLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
|
|
99
|
+
/**
|
|
100
|
+
* Returns a map of all leaf-node columns by their ID. This does not include parent columns.
|
|
101
|
+
*/
|
|
102
|
+
getAllLeafColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>
|
|
99
103
|
/**
|
|
100
104
|
* Returns a single column by its ID.
|
|
101
105
|
*/
|
|
@@ -11,6 +11,16 @@ import type {
|
|
|
11
11
|
} from '../../types/ColumnDef'
|
|
12
12
|
import type { Column } from '../../types/Column'
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Returns flat columns for a column.
|
|
16
|
+
*
|
|
17
|
+
* This derives the value from the column definition, table options, and the feature state atoms registered on the table.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const value = column_getFlatColumns(column)
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
14
24
|
export function column_getFlatColumns<
|
|
15
25
|
TFeatures extends TableFeatures,
|
|
16
26
|
TData extends RowData,
|
|
@@ -21,6 +31,16 @@ export function column_getFlatColumns<
|
|
|
21
31
|
return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]
|
|
22
32
|
}
|
|
23
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Returns leaf columns for a column.
|
|
36
|
+
*
|
|
37
|
+
* This derives the value from the column definition, table options, and the feature state atoms registered on the table.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const value = column_getLeafColumns(column)
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
24
44
|
export function column_getLeafColumns<
|
|
25
45
|
TFeatures extends TableFeatures,
|
|
26
46
|
TData extends RowData,
|
|
@@ -43,6 +63,16 @@ export function column_getLeafColumns<
|
|
|
43
63
|
return [column]
|
|
44
64
|
}
|
|
45
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Returns default column def for the table.
|
|
68
|
+
*
|
|
69
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const value = table_getDefaultColumnDef(table)
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
46
76
|
export function table_getDefaultColumnDef<
|
|
47
77
|
TFeatures extends TableFeatures,
|
|
48
78
|
TData extends RowData,
|
|
@@ -72,6 +102,16 @@ export function table_getDefaultColumnDef<
|
|
|
72
102
|
} as Partial<ColumnDef<TFeatures, TData, unknown>>
|
|
73
103
|
}
|
|
74
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Returns all columns for the table.
|
|
107
|
+
*
|
|
108
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* const value = table_getAllColumns(table)
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
75
115
|
export function table_getAllColumns<
|
|
76
116
|
TFeatures extends TableFeatures,
|
|
77
117
|
TData extends RowData,
|
|
@@ -103,6 +143,16 @@ export function table_getAllColumns<
|
|
|
103
143
|
return recurseColumns(table.options.columns)
|
|
104
144
|
}
|
|
105
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Returns all flat columns for the table.
|
|
148
|
+
*
|
|
149
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* const value = table_getAllFlatColumns(table)
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
106
156
|
export function table_getAllFlatColumns<
|
|
107
157
|
TFeatures extends TableFeatures,
|
|
108
158
|
TData extends RowData,
|
|
@@ -112,21 +162,39 @@ export function table_getAllFlatColumns<
|
|
|
112
162
|
return table.getAllColumns().flatMap((column) => column.getFlatColumns())
|
|
113
163
|
}
|
|
114
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Returns all flat columns by id for the table.
|
|
167
|
+
*
|
|
168
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const value = table_getAllFlatColumnsById(table)
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
115
175
|
export function table_getAllFlatColumnsById<
|
|
116
176
|
TFeatures extends TableFeatures,
|
|
117
177
|
TData extends RowData,
|
|
118
178
|
>(
|
|
119
179
|
table: Table_Internal<TFeatures, TData>,
|
|
120
180
|
): Record<string, Column<TFeatures, TData, unknown>> {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{} as Record<string, Column<TFeatures, TData, unknown>>,
|
|
127
|
-
)
|
|
181
|
+
const result: Record<string, Column<TFeatures, TData, unknown>> = {}
|
|
182
|
+
for (const column of table.getAllFlatColumns()) {
|
|
183
|
+
result[column.id] = column
|
|
184
|
+
}
|
|
185
|
+
return result
|
|
128
186
|
}
|
|
129
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Returns all leaf columns for the table.
|
|
190
|
+
*
|
|
191
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* const value = table_getAllLeafColumns(table)
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
130
198
|
export function table_getAllLeafColumns<
|
|
131
199
|
TFeatures extends TableFeatures,
|
|
132
200
|
TData extends RowData,
|
|
@@ -140,9 +208,42 @@ export function table_getAllLeafColumns<
|
|
|
140
208
|
table,
|
|
141
209
|
'getOrderColumns',
|
|
142
210
|
table_getOrderColumnsFn,
|
|
143
|
-
)(leafColumns
|
|
211
|
+
)(leafColumns)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Returns all leaf columns by id for the table.
|
|
216
|
+
*
|
|
217
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```ts
|
|
221
|
+
* const value = table_getAllLeafColumnsById(table)
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
export function table_getAllLeafColumnsById<
|
|
225
|
+
TFeatures extends TableFeatures,
|
|
226
|
+
TData extends RowData,
|
|
227
|
+
>(
|
|
228
|
+
table: Table_Internal<TFeatures, TData>,
|
|
229
|
+
): Record<string, Column<TFeatures, TData, unknown>> {
|
|
230
|
+
const result: Record<string, Column<TFeatures, TData, unknown>> = {}
|
|
231
|
+
for (const column of table.getAllLeafColumns()) {
|
|
232
|
+
result[column.id] = column
|
|
233
|
+
}
|
|
234
|
+
return result
|
|
144
235
|
}
|
|
145
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Returns column for the table.
|
|
239
|
+
*
|
|
240
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```ts
|
|
244
|
+
* const value = table_getColumn(table)
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
146
247
|
export function table_getColumn<
|
|
147
248
|
TFeatures extends TableFeatures,
|
|
148
249
|
TData extends RowData,
|
package/src/core/coreFeatures.ts
CHANGED
|
@@ -16,6 +16,11 @@ export interface CoreFeatures {
|
|
|
16
16
|
coreTablesFeature: typeof coreTablesFeature
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The built-in core feature set required by every table.
|
|
21
|
+
*
|
|
22
|
+
* These features provide table, column, row, header, cell, and core row-model behavior before optional feature plugins are added.
|
|
23
|
+
*/
|
|
19
24
|
export const coreFeatures: CoreFeatures = {
|
|
20
25
|
coreCellsFeature,
|
|
21
26
|
coreColumnsFeature,
|
|
@@ -8,6 +8,11 @@ import type { Header } from '../../types/Header'
|
|
|
8
8
|
import type { HeaderGroup } from '../../types/HeaderGroup'
|
|
9
9
|
import type { Column } from '../../types/Column'
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Builds the nested header group structure for a table.
|
|
13
|
+
*
|
|
14
|
+
* The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.
|
|
15
|
+
*/
|
|
11
16
|
export function buildHeaderGroups<
|
|
12
17
|
TFeatures extends TableFeatures,
|
|
13
18
|
TData extends RowData,
|
|
@@ -65,7 +70,8 @@ export function buildHeaderGroups<
|
|
|
65
70
|
headersToGroup.forEach((headerToGroup) => {
|
|
66
71
|
// What is the latest (last) parent column?
|
|
67
72
|
|
|
68
|
-
const latestPendingParentHeader =
|
|
73
|
+
const latestPendingParentHeader =
|
|
74
|
+
pendingParentHeaders[pendingParentHeaders.length - 1]
|
|
69
75
|
|
|
70
76
|
const isLeafHeader = headerToGroup.column.depth === headerGroup.depth
|
|
71
77
|
|
|
@@ -22,6 +22,11 @@ function getHeaderPrototype<
|
|
|
22
22
|
return table._headerPrototype
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a header instance from normalized table internals.
|
|
27
|
+
*
|
|
28
|
+
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
29
|
+
*/
|
|
25
30
|
export function constructHeader<
|
|
26
31
|
TFeatures extends TableFeatures,
|
|
27
32
|
TData extends RowData,
|
|
@@ -28,6 +28,11 @@ export interface CoreHeadersFeatureConstructors<
|
|
|
28
28
|
// Table: Table_Headers<TFeatures, TData>
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Creates the stock core headers feature.
|
|
33
|
+
*
|
|
34
|
+
* The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
|
|
35
|
+
*/
|
|
31
36
|
export function constructCoreHeadersFeature<
|
|
32
37
|
TFeatures extends TableFeatures,
|
|
33
38
|
TData extends RowData,
|
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
table_getLeftHeaderGroups,
|
|
5
5
|
table_getRightHeaderGroups,
|
|
6
6
|
} from '../../features/column-pinning/columnPinningFeature.utils'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
column_getIsVisible,
|
|
9
|
+
table_getVisibleLeafColumns,
|
|
10
|
+
} from '../../features/column-visibility/columnVisibilityFeature.utils'
|
|
8
11
|
import { callMemoOrStaticFn } from '../../utils'
|
|
9
12
|
import { buildHeaderGroups } from './buildHeaderGroups'
|
|
10
13
|
import type { Table_Internal } from '../../types/Table'
|
|
@@ -14,6 +17,16 @@ import type { TableFeatures } from '../../types/TableFeatures'
|
|
|
14
17
|
import type { Header_Header } from './coreHeadersFeature.types'
|
|
15
18
|
import type { Column } from '../../types/Column'
|
|
16
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Returns leaf headers for a header.
|
|
22
|
+
*
|
|
23
|
+
* This is the static implementation behind the matching header instance API and can account for nested header groups.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const value = header_getLeafHeaders(header)
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
17
30
|
export function header_getLeafHeaders<
|
|
18
31
|
TFeatures extends TableFeatures,
|
|
19
32
|
TData extends RowData,
|
|
@@ -33,6 +46,16 @@ export function header_getLeafHeaders<
|
|
|
33
46
|
return leafHeaders
|
|
34
47
|
}
|
|
35
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Returns context for a header.
|
|
51
|
+
*
|
|
52
|
+
* This is the static implementation behind the matching header instance API and can account for nested header groups.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const value = header_getContext(header)
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
36
59
|
export function header_getContext<
|
|
37
60
|
TFeatures extends TableFeatures,
|
|
38
61
|
TData extends RowData,
|
|
@@ -45,6 +68,16 @@ export function header_getContext<
|
|
|
45
68
|
}
|
|
46
69
|
}
|
|
47
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Returns header groups for the table.
|
|
73
|
+
*
|
|
74
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const value = table_getHeaderGroups(table)
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
48
81
|
export function table_getHeaderGroups<
|
|
49
82
|
TFeatures extends TableFeatures,
|
|
50
83
|
TData extends RowData,
|
|
@@ -56,15 +89,30 @@ export function table_getHeaderGroups<
|
|
|
56
89
|
table,
|
|
57
90
|
'getVisibleLeafColumns',
|
|
58
91
|
table_getVisibleLeafColumns,
|
|
59
|
-
) as
|
|
92
|
+
) as Array<Column<TFeatures, TData, unknown>>
|
|
93
|
+
const leafColumnsById = table.getAllLeafColumnsById()
|
|
60
94
|
|
|
61
|
-
const leftColumns =
|
|
62
|
-
|
|
63
|
-
|
|
95
|
+
const leftColumns: typeof leafColumns = []
|
|
96
|
+
for (const columnId of left) {
|
|
97
|
+
const column = leafColumnsById[columnId]
|
|
98
|
+
if (
|
|
99
|
+
column &&
|
|
100
|
+
callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
|
|
101
|
+
) {
|
|
102
|
+
leftColumns.push(column)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
64
105
|
|
|
65
|
-
const rightColumns =
|
|
66
|
-
|
|
67
|
-
|
|
106
|
+
const rightColumns: typeof leafColumns = []
|
|
107
|
+
for (const columnId of right) {
|
|
108
|
+
const column = leafColumnsById[columnId]
|
|
109
|
+
if (
|
|
110
|
+
column &&
|
|
111
|
+
callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
|
|
112
|
+
) {
|
|
113
|
+
rightColumns.push(column)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
68
116
|
|
|
69
117
|
const centerColumns = leafColumns.filter(
|
|
70
118
|
(column) => !left.includes(column.id) && !right.includes(column.id),
|
|
@@ -79,6 +127,16 @@ export function table_getHeaderGroups<
|
|
|
79
127
|
return headerGroups
|
|
80
128
|
}
|
|
81
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Returns footer groups for the table.
|
|
132
|
+
*
|
|
133
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* const value = table_getFooterGroups(table)
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
82
140
|
export function table_getFooterGroups<
|
|
83
141
|
TFeatures extends TableFeatures,
|
|
84
142
|
TData extends RowData,
|
|
@@ -87,6 +145,16 @@ export function table_getFooterGroups<
|
|
|
87
145
|
return [...headerGroups].reverse()
|
|
88
146
|
}
|
|
89
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Returns flat headers for the table.
|
|
150
|
+
*
|
|
151
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* const value = table_getFlatHeaders(table)
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
90
158
|
export function table_getFlatHeaders<
|
|
91
159
|
TFeatures extends TableFeatures,
|
|
92
160
|
TData extends RowData,
|
|
@@ -99,6 +167,16 @@ export function table_getFlatHeaders<
|
|
|
99
167
|
.flat()
|
|
100
168
|
}
|
|
101
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Returns leaf headers for the table.
|
|
172
|
+
*
|
|
173
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```ts
|
|
177
|
+
* const value = table_getLeafHeaders(table)
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
102
180
|
export function table_getLeafHeaders<
|
|
103
181
|
TFeatures extends TableFeatures,
|
|
104
182
|
TData extends RowData,
|
|
@@ -2,16 +2,31 @@ import type { Atom, ReadonlyAtom, ReadonlyStore, Store } from '@tanstack/store'
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Converts a writable atom to the store-compatible shape expected by core.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const store = atomToStore(atom)
|
|
9
|
+
* ```
|
|
5
10
|
*/
|
|
6
11
|
export function atomToStore<T>(atom: Atom<T>): Store<T>
|
|
7
12
|
/**
|
|
8
13
|
* Converts a readonly atom to a readonly store-compatible shape.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const store = atomToStore(atom)
|
|
18
|
+
* ```
|
|
9
19
|
*/
|
|
10
20
|
export function atomToStore<T>(atom: ReadonlyAtom<T>): ReadonlyStore<T>
|
|
11
21
|
/**
|
|
12
22
|
* Bridges atom instances to the `Store`/`ReadonlyStore` API by exposing
|
|
13
23
|
* a `state` getter backed by `atom.get()`, and wiring `setState` for
|
|
14
24
|
* writable atoms.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const store = atomToStore(atom)
|
|
29
|
+
* ```
|
|
15
30
|
*/
|
|
16
31
|
export function atomToStore<T>(
|
|
17
32
|
atom: Atom<T> | ReadonlyAtom<T>,
|
|
@@ -24,6 +24,11 @@ export interface CoreRowModelsFeatureConstructors<
|
|
|
24
24
|
// Table: Table_RowModels<TFeatures, TData>
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Creates the stock core row models feature.
|
|
29
|
+
*
|
|
30
|
+
* The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
|
|
31
|
+
*/
|
|
27
32
|
export function constructCoreRowModelsFeature<
|
|
28
33
|
TFeatures extends TableFeatures,
|
|
29
34
|
TData extends RowData,
|
|
@@ -25,7 +25,8 @@ export interface CreateRowModel_Core<
|
|
|
25
25
|
TData extends RowData,
|
|
26
26
|
> extends CreateRowModel_Plugins {
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Optional factory for the core row model. When omitted, the built-in
|
|
29
|
+
* `createCoreRowModel()` factory is used.
|
|
29
30
|
*/
|
|
30
31
|
coreRowModel?: (
|
|
31
32
|
table: Table<TFeatures, TData>,
|