@tanstack/table-core 9.0.0-alpha.43 → 9.0.0-alpha.47
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 +9 -3
- 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 +9 -3
- 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 +21 -12
- 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 +21 -12
- 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 +107 -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 +107 -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 +33 -20
- 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 +33 -20
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +9 -3
- 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 +9 -3
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +6 -6
- 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 +7 -7
- package/dist/core/headers/coreHeadersFeature.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.cjs +87 -16
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +61 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +61 -1
- package/dist/core/headers/coreHeadersFeature.utils.js +89 -18
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +4 -0
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +4 -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 +13 -6
- 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 +13 -6
- 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 +112 -7
- 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 +112 -7
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +19 -5
- 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 +19 -5
- 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 +22 -12
- package/dist/core/table/coreTablesFeature.types.d.ts +22 -12
- package/dist/core/table/coreTablesFeature.utils.cjs +49 -1
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +44 -0
- package/dist/core/table/coreTablesFeature.utils.d.ts +44 -0
- package/dist/core/table/coreTablesFeature.utils.js +49 -1
- 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 +13 -5
- 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 +13 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +13 -3
- 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 +13 -3
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +12 -4
- 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 +12 -4
- 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 +16 -5
- 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 +16 -5
- 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 +108 -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 +108 -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 +387 -27
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +318 -6
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +318 -6
- package/dist/features/column-pinning/columnPinningFeature.utils.js +388 -28
- 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 +78 -16
- 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 +79 -17
- 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 +30 -20
- 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 +31 -21
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +8 -3
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +8 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +199 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +154 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +154 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +199 -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 +153 -2
- 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 +153 -2
- 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 +125 -7
- 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 +125 -7
- 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 +265 -3
- 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 +265 -3
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +18 -8
- 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 +18 -8
- 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 +153 -2
- 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 +153 -2
- 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 +19 -7
- 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 +19 -8
- 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/index.cjs +0 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/static-functions.cjs +2 -1
- package/dist/static-functions.d.cts +3 -3
- package/dist/static-functions.d.ts +3 -3
- package/dist/static-functions.js +3 -3
- package/dist/store-reactivity-bindings.cjs +1 -0
- package/dist/store-reactivity-bindings.cjs.map +1 -1
- package/dist/store-reactivity-bindings.js +1 -0
- package/dist/store-reactivity-bindings.js.map +1 -1
- package/dist/utils.cjs +49 -25
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +33 -10
- package/dist/utils.d.ts +33 -10
- package/dist/utils.js +50 -22
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/core/cells/constructCell.ts +8 -2
- package/src/core/cells/coreCellsFeature.ts +5 -0
- package/src/core/cells/coreCellsFeature.utils.ts +30 -0
- package/src/core/columns/constructColumn.ts +11 -3
- package/src/core/columns/coreColumnsFeature.ts +10 -0
- package/src/core/columns/coreColumnsFeature.types.ts +4 -0
- package/src/core/columns/coreColumnsFeature.utils.ts +113 -8
- package/src/core/coreFeatures.ts +5 -0
- package/src/core/headers/buildHeaderGroups.ts +36 -31
- package/src/core/headers/constructHeader.ts +8 -2
- package/src/core/headers/coreHeadersFeature.ts +7 -27
- package/src/core/headers/coreHeadersFeature.utils.ts +110 -46
- package/src/core/reactivity/coreReactivityFeature.types.ts +4 -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 +11 -4
- package/src/core/rows/coreRowsFeature.ts +5 -0
- package/src/core/rows/coreRowsFeature.types.ts +3 -0
- package/src/core/rows/coreRowsFeature.utils.ts +116 -10
- package/src/core/table/constructTable.ts +16 -4
- package/src/core/table/coreTablesFeature.ts +5 -0
- package/src/core/table/coreTablesFeature.types.ts +22 -12
- package/src/core/table/coreTablesFeature.utils.ts +47 -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 +13 -10
- package/src/features/column-faceting/createFacetedRowModel.ts +15 -6
- package/src/features/column-faceting/createFacetedUniqueValues.ts +9 -3
- 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 +19 -8
- 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 +117 -17
- 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 +425 -76
- 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 +54 -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 +20 -18
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +11 -3
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +213 -24
- 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 +153 -2
- 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 +132 -18
- 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 +279 -19
- package/src/features/row-sorting/createSortedRowModel.ts +21 -13
- 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 +153 -2
- package/src/features/stockFeatures.ts +5 -0
- package/src/flex-render.ts +10 -0
- package/src/fns/aggregationFns.ts +25 -8
- package/src/fns/filterFns.ts +5 -0
- package/src/fns/sortFns.ts +50 -5
- package/src/helpers/tableOptions.ts +32 -0
- package/src/store-reactivity-bindings.ts +1 -0
- package/src/utils.ts +52 -34
|
@@ -16,13 +16,19 @@ function getCellPrototype<
|
|
|
16
16
|
>(table: Table_Internal<TFeatures, TData>): object {
|
|
17
17
|
if (!table._cellPrototype) {
|
|
18
18
|
table._cellPrototype = { table }
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const features = Object.values(table._features)
|
|
20
|
+
for (let i = 0; i < features.length; i++) {
|
|
21
|
+
features[i]!.assignCellPrototype?.(table._cellPrototype, table)
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
return table._cellPrototype
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a cell instance from normalized table internals.
|
|
29
|
+
*
|
|
30
|
+
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
31
|
+
*/
|
|
26
32
|
export function constructCell<
|
|
27
33
|
TFeatures extends TableFeatures,
|
|
28
34
|
TData extends RowData,
|
|
@@ -16,6 +16,11 @@ export interface CoreCellsFeatureConstructors<
|
|
|
16
16
|
// TableOptions: TableOptions_Cell
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Creates the stock core cells feature.
|
|
21
|
+
*
|
|
22
|
+
* The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
|
|
23
|
+
*/
|
|
19
24
|
export function constructCoreCellsFeature<
|
|
20
25
|
TFeatures extends TableFeatures,
|
|
21
26
|
TData extends RowData,
|
|
@@ -2,6 +2,16 @@ import type { CellData, RowData } from '../../types/type-utils'
|
|
|
2
2
|
import type { TableFeatures } from '../../types/TableFeatures'
|
|
3
3
|
import type { Cell } from '../../types/Cell'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Returns value for a cell.
|
|
7
|
+
*
|
|
8
|
+
* This is the static implementation behind the matching cell instance API and uses the owning row and column context.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const value = cell_getValue(cell)
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
5
15
|
export function cell_getValue<
|
|
6
16
|
TFeatures extends TableFeatures,
|
|
7
17
|
TData extends RowData,
|
|
@@ -10,6 +20,16 @@ export function cell_getValue<
|
|
|
10
20
|
return cell.row.getValue(cell.column.id)
|
|
11
21
|
}
|
|
12
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Returns value for a cell.
|
|
25
|
+
*
|
|
26
|
+
* This is the static implementation behind the matching cell instance API and uses the owning row and column context.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const value = cell_renderValue(cell)
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
13
33
|
export function cell_renderValue<
|
|
14
34
|
TFeatures extends TableFeatures,
|
|
15
35
|
TData extends RowData,
|
|
@@ -18,6 +38,16 @@ export function cell_renderValue<
|
|
|
18
38
|
return cell.getValue() ?? cell.table.options.renderFallbackValue
|
|
19
39
|
}
|
|
20
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Returns context for a cell.
|
|
43
|
+
*
|
|
44
|
+
* This is the static implementation behind the matching cell instance API and uses the owning row and column context.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const value = cell_getContext(cell)
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
21
51
|
export function cell_getContext<
|
|
22
52
|
TFeatures extends TableFeatures,
|
|
23
53
|
TData extends RowData,
|
|
@@ -20,13 +20,19 @@ function getColumnPrototype<
|
|
|
20
20
|
>(table: Table_Internal<TFeatures, TData>): object {
|
|
21
21
|
if (!table._columnPrototype) {
|
|
22
22
|
table._columnPrototype = { table }
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const features = Object.values(table._features)
|
|
24
|
+
for (let i = 0; i < features.length; i++) {
|
|
25
|
+
features[i]!.assignColumnPrototype?.(table._columnPrototype, table)
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
return table._columnPrototype
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a column instance from normalized table internals.
|
|
33
|
+
*
|
|
34
|
+
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
35
|
+
*/
|
|
30
36
|
export function constructColumn<
|
|
31
37
|
TFeatures extends TableFeatures,
|
|
32
38
|
TData extends RowData,
|
|
@@ -60,10 +66,12 @@ export function constructColumn<
|
|
|
60
66
|
} else if (accessorKey) {
|
|
61
67
|
// Support deep accessor keys
|
|
62
68
|
if (accessorKey.includes('.')) {
|
|
69
|
+
const keys = accessorKey.split('.')
|
|
63
70
|
accessorFn = (originalRow: TData) => {
|
|
64
71
|
let result = originalRow as Record<string, any> | undefined
|
|
65
72
|
|
|
66
|
-
for (
|
|
73
|
+
for (let i = 0; i < keys.length; i++) {
|
|
74
|
+
const key = keys[i]!
|
|
67
75
|
result = result?.[key]
|
|
68
76
|
if (process.env.NODE_ENV === 'development' && result === undefined) {
|
|
69
77
|
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,41 @@ 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
|
-
|
|
127
|
-
|
|
181
|
+
const result: Record<string, Column<TFeatures, TData, unknown>> = {}
|
|
182
|
+
const flatColumns = table.getAllFlatColumns()
|
|
183
|
+
for (let i = 0; i < flatColumns.length; i++) {
|
|
184
|
+
const column = flatColumns[i]!
|
|
185
|
+
result[column.id] = column
|
|
186
|
+
}
|
|
187
|
+
return result
|
|
128
188
|
}
|
|
129
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Returns all leaf columns for the table.
|
|
192
|
+
*
|
|
193
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* const value = table_getAllLeafColumns(table)
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
130
200
|
export function table_getAllLeafColumns<
|
|
131
201
|
TFeatures extends TableFeatures,
|
|
132
202
|
TData extends RowData,
|
|
@@ -140,9 +210,44 @@ export function table_getAllLeafColumns<
|
|
|
140
210
|
table,
|
|
141
211
|
'getOrderColumns',
|
|
142
212
|
table_getOrderColumnsFn,
|
|
143
|
-
)(leafColumns
|
|
213
|
+
)(leafColumns)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Returns all leaf columns by id for the table.
|
|
218
|
+
*
|
|
219
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const value = table_getAllLeafColumnsById(table)
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
export function table_getAllLeafColumnsById<
|
|
227
|
+
TFeatures extends TableFeatures,
|
|
228
|
+
TData extends RowData,
|
|
229
|
+
>(
|
|
230
|
+
table: Table_Internal<TFeatures, TData>,
|
|
231
|
+
): Record<string, Column<TFeatures, TData, unknown>> {
|
|
232
|
+
const result: Record<string, Column<TFeatures, TData, unknown>> = {}
|
|
233
|
+
const leafColumns = table.getAllLeafColumns()
|
|
234
|
+
for (let i = 0; i < leafColumns.length; i++) {
|
|
235
|
+
const column = leafColumns[i]!
|
|
236
|
+
result[column.id] = column
|
|
237
|
+
}
|
|
238
|
+
return result
|
|
144
239
|
}
|
|
145
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Returns column for the table.
|
|
243
|
+
*
|
|
244
|
+
* This reads the relevant table atoms, options, and row-model cache to derive the current table-level value.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const value = table_getColumn(table)
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
146
251
|
export function table_getColumn<
|
|
147
252
|
TFeatures extends TableFeatures,
|
|
148
253
|
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,
|
|
@@ -32,15 +37,14 @@ export function buildHeaderGroups<
|
|
|
32
37
|
) => {
|
|
33
38
|
maxDepth = Math.max(maxDepth, depth)
|
|
34
39
|
|
|
35
|
-
columns
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
.forEach((column) => {
|
|
40
|
+
for (let i = 0; i < columns.length; i++) {
|
|
41
|
+
const column = columns[i]!
|
|
42
|
+
if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {
|
|
40
43
|
if (column.columns.length) {
|
|
41
44
|
findMaxDepth(column.columns, depth + 1)
|
|
42
45
|
}
|
|
43
|
-
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
findMaxDepth(allColumns)
|
|
@@ -65,7 +69,8 @@ export function buildHeaderGroups<
|
|
|
65
69
|
headersToGroup.forEach((headerToGroup) => {
|
|
66
70
|
// What is the latest (last) parent column?
|
|
67
71
|
|
|
68
|
-
const latestPendingParentHeader =
|
|
72
|
+
const latestPendingParentHeader =
|
|
73
|
+
pendingParentHeaders[pendingParentHeaders.length - 1]
|
|
69
74
|
|
|
70
75
|
const isLeafHeader = headerToGroup.column.depth === headerGroup.depth
|
|
71
76
|
|
|
@@ -130,43 +135,43 @@ export function buildHeaderGroups<
|
|
|
130
135
|
|
|
131
136
|
headerGroups.reverse()
|
|
132
137
|
|
|
133
|
-
// headerGroups = headerGroups.filter(headerGroup => {
|
|
134
|
-
// return !headerGroup.headers.every(header => header.isPlaceholder)
|
|
135
|
-
// })
|
|
136
|
-
|
|
137
138
|
const recurseHeadersForSpans = (
|
|
138
139
|
headers: Array<Header<TFeatures, TData, TValue>>,
|
|
139
140
|
): Array<{ colSpan: number; rowSpan: number }> => {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
)
|
|
141
|
+
const results: Array<{ colSpan: number; rowSpan: number }> = []
|
|
142
|
+
|
|
143
|
+
for (let i = 0; i < headers.length; i++) {
|
|
144
|
+
const header = headers[i]!
|
|
145
|
+
if (
|
|
146
|
+
!callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)
|
|
147
|
+
) {
|
|
148
|
+
continue
|
|
149
|
+
}
|
|
143
150
|
|
|
144
|
-
return filteredHeaders.map((header) => {
|
|
145
151
|
let colSpan = 0
|
|
146
|
-
let
|
|
147
|
-
let childRowSpans = [0]
|
|
152
|
+
let minChildRowSpan = Infinity
|
|
148
153
|
|
|
149
154
|
if (header.subHeaders.length) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
155
|
+
const childSpans = recurseHeadersForSpans(header.subHeaders)
|
|
156
|
+
for (let j = 0; j < childSpans.length; j++) {
|
|
157
|
+
const child = childSpans[j]!
|
|
158
|
+
colSpan += child.colSpan
|
|
159
|
+
if (child.rowSpan < minChildRowSpan) {
|
|
160
|
+
minChildRowSpan = child.rowSpan
|
|
161
|
+
}
|
|
162
|
+
}
|
|
158
163
|
} else {
|
|
159
164
|
colSpan = 1
|
|
165
|
+
minChildRowSpan = 0
|
|
160
166
|
}
|
|
161
167
|
|
|
162
|
-
const minChildRowSpan = Math.min(...childRowSpans)
|
|
163
|
-
rowSpan = rowSpan + minChildRowSpan
|
|
164
|
-
|
|
165
168
|
header.colSpan = colSpan
|
|
166
|
-
header.rowSpan =
|
|
169
|
+
header.rowSpan = minChildRowSpan
|
|
167
170
|
|
|
168
|
-
|
|
169
|
-
}
|
|
171
|
+
results.push({ colSpan, rowSpan: header.rowSpan })
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return results
|
|
170
175
|
}
|
|
171
176
|
|
|
172
177
|
recurseHeadersForSpans(
|
|
@@ -15,13 +15,19 @@ function getHeaderPrototype<
|
|
|
15
15
|
>(table: Table_Internal<TFeatures, TData>): object {
|
|
16
16
|
if (!table._headerPrototype) {
|
|
17
17
|
table._headerPrototype = { table }
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const features = Object.values(table._features)
|
|
19
|
+
for (let i = 0; i < features.length; i++) {
|
|
20
|
+
features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
return table._headerPrototype
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Constructs a header instance from normalized table internals.
|
|
28
|
+
*
|
|
29
|
+
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
30
|
+
*/
|
|
25
31
|
export function constructHeader<
|
|
26
32
|
TFeatures extends TableFeatures,
|
|
27
33
|
TData extends RowData,
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assignPrototypeAPIs,
|
|
3
|
-
assignTableAPIs,
|
|
4
|
-
callMemoOrStaticFn,
|
|
5
|
-
} from '../../utils'
|
|
6
|
-
import {
|
|
7
|
-
table_getCenterHeaderGroups,
|
|
8
|
-
table_getLeftHeaderGroups,
|
|
9
|
-
table_getRightHeaderGroups,
|
|
10
|
-
} from '../../features/column-pinning/columnPinningFeature.utils'
|
|
1
|
+
import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'
|
|
11
2
|
import {
|
|
12
3
|
header_getContext,
|
|
13
4
|
header_getLeafHeaders,
|
|
@@ -28,6 +19,11 @@ export interface CoreHeadersFeatureConstructors<
|
|
|
28
19
|
// Table: Table_Headers<TFeatures, TData>
|
|
29
20
|
}
|
|
30
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Creates the stock core headers feature.
|
|
24
|
+
*
|
|
25
|
+
* The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.
|
|
26
|
+
*/
|
|
31
27
|
export function constructCoreHeadersFeature<
|
|
32
28
|
TFeatures extends TableFeatures,
|
|
33
29
|
TData extends RowData,
|
|
@@ -69,23 +65,7 @@ export function constructCoreHeadersFeature<
|
|
|
69
65
|
},
|
|
70
66
|
table_getLeafHeaders: {
|
|
71
67
|
fn: () => table_getLeafHeaders(table),
|
|
72
|
-
memoDeps: () => [
|
|
73
|
-
callMemoOrStaticFn(
|
|
74
|
-
table,
|
|
75
|
-
'getLeftHeaderGroups',
|
|
76
|
-
table_getLeftHeaderGroups,
|
|
77
|
-
),
|
|
78
|
-
callMemoOrStaticFn(
|
|
79
|
-
table,
|
|
80
|
-
'getCenterHeaderGroups',
|
|
81
|
-
table_getCenterHeaderGroups,
|
|
82
|
-
),
|
|
83
|
-
callMemoOrStaticFn(
|
|
84
|
-
table,
|
|
85
|
-
'getRightHeaderGroups',
|
|
86
|
-
table_getRightHeaderGroups,
|
|
87
|
-
),
|
|
88
|
-
],
|
|
68
|
+
memoDeps: () => [table.getHeaderGroups()],
|
|
89
69
|
},
|
|
90
70
|
})
|
|
91
71
|
},
|