@tanstack/table-core 9.0.0-beta.5 → 9.0.0-beta.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/core/cells/constructCell.cjs +1 -4
- package/dist/core/cells/constructCell.cjs.map +1 -1
- package/dist/core/cells/constructCell.d.cts +4 -4
- package/dist/core/cells/constructCell.d.ts +4 -4
- package/dist/core/cells/constructCell.js +1 -4
- package/dist/core/cells/constructCell.js.map +1 -1
- package/dist/core/cells/coreCellsFeature.types.d.cts +7 -7
- package/dist/core/cells/coreCellsFeature.types.d.ts +7 -7
- package/dist/core/cells/coreCellsFeature.utils.d.cts +4 -4
- package/dist/core/cells/coreCellsFeature.utils.d.ts +4 -4
- package/dist/core/columns/constructColumn.cjs +4 -5
- package/dist/core/columns/constructColumn.cjs.map +1 -1
- package/dist/core/columns/constructColumn.d.cts +3 -3
- package/dist/core/columns/constructColumn.d.ts +3 -3
- package/dist/core/columns/constructColumn.js +4 -5
- package/dist/core/columns/constructColumn.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.cjs +12 -18
- package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.js +12 -18
- package/dist/core/columns/coreColumnsFeature.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +7 -7
- package/dist/core/columns/coreColumnsFeature.types.d.ts +7 -7
- package/dist/core/columns/coreColumnsFeature.utils.cjs +4 -8
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +9 -9
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +9 -9
- package/dist/core/columns/coreColumnsFeature.utils.js +5 -9
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/coreFeatures.cjs.map +1 -1
- package/dist/core/coreFeatures.d.cts +1 -1
- package/dist/core/coreFeatures.d.ts +1 -1
- package/dist/core/coreFeatures.js.map +1 -1
- package/dist/core/headers/buildHeaderGroups.cjs +1 -2
- package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
- package/dist/core/headers/buildHeaderGroups.d.cts +2 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +2 -2
- package/dist/core/headers/buildHeaderGroups.js +1 -2
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +1 -4
- package/dist/core/headers/constructHeader.cjs.map +1 -1
- package/dist/core/headers/constructHeader.d.cts +2 -2
- package/dist/core/headers/constructHeader.d.ts +2 -2
- package/dist/core/headers/constructHeader.js +1 -4
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +8 -11
- package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.js +8 -11
- package/dist/core/headers/coreHeadersFeature.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +6 -6
- package/dist/core/headers/coreHeadersFeature.types.d.ts +6 -6
- package/dist/core/headers/coreHeadersFeature.utils.cjs +8 -10
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +6 -6
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +6 -6
- package/dist/core/headers/coreHeadersFeature.utils.js +8 -10
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.types.d.cts +7 -15
- package/dist/core/row-models/coreRowModelsFeature.types.d.ts +7 -15
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +8 -26
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +16 -16
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +16 -16
- package/dist/core/row-models/coreRowModelsFeature.utils.js +8 -26
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
- package/dist/core/row-models/createCoreRowModel.cjs +4 -6
- package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
- package/dist/core/row-models/createCoreRowModel.d.cts +2 -2
- package/dist/core/row-models/createCoreRowModel.d.ts +2 -2
- package/dist/core/row-models/createCoreRowModel.js +5 -7
- package/dist/core/row-models/createCoreRowModel.js.map +1 -1
- package/dist/core/rows/constructRow.cjs +6 -10
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.d.cts +2 -2
- package/dist/core/rows/constructRow.d.ts +2 -2
- package/dist/core/rows/constructRow.js +7 -10
- package/dist/core/rows/constructRow.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.cjs +18 -2
- package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.js +19 -3
- package/dist/core/rows/coreRowsFeature.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +41 -7
- package/dist/core/rows/coreRowsFeature.types.d.ts +41 -7
- package/dist/core/rows/coreRowsFeature.utils.cjs +62 -8
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +24 -5
- package/dist/core/rows/coreRowsFeature.utils.d.ts +24 -5
- package/dist/core/rows/coreRowsFeature.utils.js +61 -10
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +24 -14
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.d.cts +1 -1
- package/dist/core/table/constructTable.d.ts +1 -1
- package/dist/core/table/constructTable.js +24 -14
- package/dist/core/table/constructTable.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +32 -19
- package/dist/core/table/coreTablesFeature.types.d.ts +32 -19
- package/dist/core/table/coreTablesFeature.utils.cjs +38 -14
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +10 -7
- package/dist/core/table/coreTablesFeature.utils.d.ts +10 -7
- package/dist/core/table/coreTablesFeature.utils.js +38 -14
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/experimental-worker-plugin.cjs +14 -0
- package/dist/experimental-worker-plugin.d.cts +5 -0
- package/dist/experimental-worker-plugin.d.ts +5 -0
- package/dist/experimental-worker-plugin.js +6 -0
- package/dist/features/column-faceting/columnFacetingFeature.cjs +12 -18
- package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.js +12 -18
- package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +15 -33
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +15 -33
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +23 -12
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +9 -9
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +9 -9
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +24 -12
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +7 -4
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +10 -15
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.d.cts +2 -2
- package/dist/features/column-faceting/createFacetedRowModel.d.ts +2 -2
- package/dist/features/column-faceting/createFacetedRowModel.js +10 -15
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +10 -6
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.js +11 -7
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.cjs +2 -2
- package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.js +3 -3
- package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +83 -29
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +83 -29
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +23 -17
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +18 -14
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +18 -14
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +23 -17
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +29 -25
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.d.cts +10 -4
- package/dist/features/column-filtering/createFilteredRowModel.d.ts +10 -4
- package/dist/features/column-filtering/createFilteredRowModel.js +30 -26
- package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
- package/dist/features/column-filtering/filterFns.cjs +399 -0
- package/dist/features/column-filtering/filterFns.cjs.map +1 -0
- package/dist/features/column-filtering/filterFns.d.cts +210 -0
- package/dist/features/column-filtering/filterFns.d.ts +210 -0
- package/dist/features/column-filtering/filterFns.js +375 -0
- package/dist/features/column-filtering/filterFns.js.map +1 -0
- package/dist/features/column-filtering/filterRowsUtils.cjs +3 -2
- package/dist/features/column-filtering/filterRowsUtils.cjs.map +1 -1
- package/dist/features/column-filtering/filterRowsUtils.js +3 -2
- package/dist/features/column-filtering/filterRowsUtils.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.cjs +4 -16
- package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.cts +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.ts +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.js +6 -18
- package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +14 -50
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +14 -50
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +6 -61
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +12 -49
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +12 -49
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +8 -60
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.cjs +37 -24
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +6 -4
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +6 -4
- package/dist/features/column-grouping/createGroupedRowModel.js +39 -26
- package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.cjs +17 -21
- package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.js +18 -22
- package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +28 -3
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +28 -3
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +35 -15
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +26 -14
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +26 -14
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +36 -17
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.cjs +124 -143
- package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.d.cts +6 -1
- package/dist/features/column-pinning/columnPinningFeature.d.ts +6 -1
- package/dist/features/column-pinning/columnPinningFeature.js +125 -144
- package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +52 -41
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +52 -41
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +161 -162
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +101 -92
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +101 -92
- package/dist/features/column-pinning/columnPinningFeature.utils.js +148 -149
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +1 -4
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +1 -4
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +84 -44
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +6 -6
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +6 -6
- package/dist/features/column-resizing/columnResizingFeature.utils.js +85 -45
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +33 -67
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.js +34 -68
- package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +52 -9
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +52 -9
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +88 -45
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +43 -25
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +43 -25
- package/dist/features/column-sizing/columnSizingFeature.utils.js +88 -46
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +25 -36
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.js +25 -36
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +3 -3
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +3 -3
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +30 -29
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +18 -18
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +18 -18
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +31 -30
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.cjs +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.js +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +2 -2
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +2 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +6 -6
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +8 -11
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +8 -11
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +6 -6
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
- package/dist/features/row-aggregation/aggregationFns.cjs +246 -0
- package/dist/features/row-aggregation/aggregationFns.cjs.map +1 -0
- package/dist/features/row-aggregation/aggregationFns.d.cts +68 -0
- package/dist/features/row-aggregation/aggregationFns.d.ts +68 -0
- package/dist/features/row-aggregation/aggregationFns.js +235 -0
- package/dist/features/row-aggregation/aggregationFns.js.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.cjs +39 -0
- package/dist/features/row-aggregation/rowAggregationFeature.cjs.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.d.cts +10 -0
- package/dist/features/row-aggregation/rowAggregationFeature.d.ts +10 -0
- package/dist/features/row-aggregation/rowAggregationFeature.js +39 -0
- package/dist/features/row-aggregation/rowAggregationFeature.js.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs +13 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.cts +195 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +195 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.js +12 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.js.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs +212 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs.map +1 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.cts +34 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +34 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js +206 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js.map +1 -0
- package/dist/features/row-expanding/createExpandedRowModel.cjs +6 -10
- package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
- package/dist/features/row-expanding/createExpandedRowModel.d.cts +2 -2
- package/dist/features/row-expanding/createExpandedRowModel.d.ts +2 -2
- package/dist/features/row-expanding/createExpandedRowModel.js +6 -10
- package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +6 -15
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +6 -15
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +28 -26
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +10 -10
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +10 -10
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +29 -27
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
- package/dist/features/row-pagination/createPaginatedRowModel.cjs +6 -10
- package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
- package/dist/features/row-pagination/createPaginatedRowModel.d.cts +2 -2
- package/dist/features/row-pagination/createPaginatedRowModel.d.ts +2 -2
- package/dist/features/row-pagination/createPaginatedRowModel.js +6 -10
- package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +5 -14
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +5 -14
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +9 -15
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +17 -17
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +17 -17
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +9 -15
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.cjs +4 -16
- package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.js +4 -16
- package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +2 -2
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +2 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +9 -14
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +7 -7
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +7 -7
- package/dist/features/row-pinning/rowPinningFeature.utils.js +9 -14
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs +66 -22
- package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.js +67 -23
- package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +49 -11
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +49 -11
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +128 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +57 -30
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +57 -30
- package/dist/features/row-selection/rowSelectionFeature.utils.js +129 -74
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +69 -50
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.d.cts +10 -4
- package/dist/features/row-sorting/createSortedRowModel.d.ts +10 -4
- package/dist/features/row-sorting/createSortedRowModel.js +70 -51
- package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +54 -22
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +54 -22
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +31 -17
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +16 -16
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +16 -16
- package/dist/features/row-sorting/rowSortingFeature.utils.js +31 -17
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/sortFns.cjs +226 -0
- package/dist/features/row-sorting/sortFns.cjs.map +1 -0
- package/dist/features/row-sorting/sortFns.d.cts +98 -0
- package/dist/features/row-sorting/sortFns.d.ts +98 -0
- package/dist/features/row-sorting/sortFns.js +217 -0
- package/dist/features/row-sorting/sortFns.js.map +1 -0
- package/dist/features/stockFeatures.cjs +2 -0
- package/dist/features/stockFeatures.cjs.map +1 -1
- package/dist/features/stockFeatures.d.cts +2 -0
- package/dist/features/stockFeatures.d.ts +2 -0
- package/dist/features/stockFeatures.js +2 -0
- package/dist/features/stockFeatures.js.map +1 -1
- package/dist/flex-render.d.cts +1 -1
- package/dist/flex-render.d.ts +1 -1
- package/dist/helpers/columnHelper.cjs.map +1 -1
- package/dist/helpers/columnHelper.d.cts +2 -2
- package/dist/helpers/columnHelper.d.ts +2 -2
- package/dist/helpers/columnHelper.js.map +1 -1
- package/dist/helpers/metaHelper.cjs +30 -0
- package/dist/helpers/metaHelper.cjs.map +1 -0
- package/dist/helpers/metaHelper.d.cts +26 -0
- package/dist/helpers/metaHelper.d.ts +26 -0
- package/dist/helpers/metaHelper.js +29 -0
- package/dist/helpers/metaHelper.js.map +1 -0
- package/dist/helpers/tableFeatures.cjs +32 -3
- package/dist/helpers/tableFeatures.cjs.map +1 -1
- package/dist/helpers/tableFeatures.d.cts +34 -5
- package/dist/helpers/tableFeatures.d.ts +34 -5
- package/dist/helpers/tableFeatures.js +32 -3
- package/dist/helpers/tableFeatures.js.map +1 -1
- package/dist/index.cjs +23 -3
- package/dist/index.d.cts +31 -28
- package/dist/index.d.ts +31 -28
- package/dist/index.js +8 -5
- package/dist/static-functions.cjs +30 -19
- package/dist/static-functions.d.cts +8 -7
- package/dist/static-functions.d.ts +8 -7
- package/dist/static-functions.js +8 -7
- package/dist/store-reactivity-bindings.cjs +3 -3
- package/dist/store-reactivity-bindings.cjs.map +1 -1
- package/dist/store-reactivity-bindings.d.cts +1 -1
- package/dist/store-reactivity-bindings.d.ts +1 -1
- package/dist/store-reactivity-bindings.js +3 -3
- package/dist/store-reactivity-bindings.js.map +1 -1
- package/dist/types/Cell.d.cts +4 -2
- package/dist/types/Cell.d.ts +4 -2
- package/dist/types/Column.d.cts +15 -15
- package/dist/types/Column.d.ts +15 -15
- package/dist/types/ColumnDef.d.cts +30 -14
- package/dist/types/ColumnDef.d.ts +30 -14
- package/dist/types/Header.d.cts +2 -2
- package/dist/types/Header.d.ts +2 -2
- package/dist/types/HeaderGroup.d.cts +2 -2
- package/dist/types/HeaderGroup.d.ts +2 -2
- package/dist/types/Row.d.cts +6 -4
- package/dist/types/Row.d.ts +6 -4
- package/dist/types/RowModel.d.cts +11 -23
- package/dist/types/RowModel.d.ts +11 -23
- package/dist/types/RowModelFns.d.cts +4 -4
- package/dist/types/RowModelFns.d.ts +4 -4
- package/dist/types/Table.d.cts +26 -31
- package/dist/types/Table.d.ts +26 -31
- package/dist/types/TableFeatures.d.cts +350 -22
- package/dist/types/TableFeatures.d.ts +350 -22
- package/dist/types/TableOptions.d.cts +22 -14
- package/dist/types/TableOptions.d.ts +22 -14
- package/dist/types/TableState.d.cts +6 -6
- package/dist/types/TableState.d.ts +6 -6
- package/dist/types/type-utils.d.cts +8 -1
- package/dist/types/type-utils.d.ts +8 -1
- package/dist/utils.cjs +51 -29
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +30 -8
- package/dist/utils.d.ts +30 -8
- package/dist/utils.js +49 -30
- package/dist/utils.js.map +1 -1
- package/dist/worker/createTableWorker.cjs +189 -0
- package/dist/worker/createTableWorker.cjs.map +1 -0
- package/dist/worker/createTableWorker.d.cts +102 -0
- package/dist/worker/createTableWorker.d.ts +102 -0
- package/dist/worker/createTableWorker.js +186 -0
- package/dist/worker/createTableWorker.js.map +1 -0
- package/dist/worker/createWorkerRowModel.cjs +78 -0
- package/dist/worker/createWorkerRowModel.cjs.map +1 -0
- package/dist/worker/createWorkerRowModel.d.cts +42 -0
- package/dist/worker/createWorkerRowModel.d.ts +42 -0
- package/dist/worker/createWorkerRowModel.js +78 -0
- package/dist/worker/createWorkerRowModel.js.map +1 -0
- package/dist/worker/initTableWorker.cjs +100 -0
- package/dist/worker/initTableWorker.cjs.map +1 -0
- package/dist/worker/initTableWorker.d.cts +33 -0
- package/dist/worker/initTableWorker.d.ts +33 -0
- package/dist/worker/initTableWorker.js +100 -0
- package/dist/worker/initTableWorker.js.map +1 -0
- package/dist/worker/rebuildRowModel.cjs +72 -0
- package/dist/worker/rebuildRowModel.cjs.map +1 -0
- package/dist/worker/rebuildRowModel.d.cts +9 -0
- package/dist/worker/rebuildRowModel.d.ts +9 -0
- package/dist/worker/rebuildRowModel.js +72 -0
- package/dist/worker/rebuildRowModel.js.map +1 -0
- package/dist/worker/serializeRowModel.cjs +53 -0
- package/dist/worker/serializeRowModel.cjs.map +1 -0
- package/dist/worker/serializeRowModel.js +52 -0
- package/dist/worker/serializeRowModel.js.map +1 -0
- package/dist/worker/tableWorkerProtocol.cjs +29 -0
- package/dist/worker/tableWorkerProtocol.cjs.map +1 -0
- package/dist/worker/tableWorkerProtocol.d.cts +88 -0
- package/dist/worker/tableWorkerProtocol.d.ts +88 -0
- package/dist/worker/tableWorkerProtocol.js +27 -0
- package/dist/worker/tableWorkerProtocol.js.map +1 -0
- package/package.json +8 -3
- package/skills/aggregation/SKILL.md +141 -0
- package/skills/api-not-found/SKILL.md +113 -0
- package/skills/client-vs-server/SKILL.md +164 -0
- package/skills/column-faceting/SKILL.md +97 -0
- package/skills/column-filtering/SKILL.md +87 -0
- package/skills/column-ordering/SKILL.md +75 -0
- package/skills/column-pinning/SKILL.md +89 -0
- package/skills/column-resizing/SKILL.md +91 -0
- package/skills/column-sizing/SKILL.md +72 -0
- package/skills/column-visibility/SKILL.md +75 -0
- package/skills/core/SKILL.md +175 -0
- package/skills/custom-features/SKILL.md +235 -0
- package/skills/expanding/SKILL.md +80 -0
- package/skills/global-filtering/SKILL.md +84 -0
- package/skills/grouping/SKILL.md +51 -401
- package/skills/migrate-v8-to-v9/SKILL.md +274 -416
- package/skills/pagination/SKILL.md +37 -344
- package/skills/row-pinning/SKILL.md +47 -234
- package/skills/row-selection/SKILL.md +75 -302
- package/skills/sorting/SKILL.md +45 -303
- package/skills/table-features/SKILL.md +159 -0
- package/skills/typescript/SKILL.md +126 -0
- package/src/core/cells/coreCellsFeature.types.ts +6 -6
- package/src/core/columns/constructColumn.ts +6 -0
- package/src/core/columns/coreColumnsFeature.types.ts +8 -8
- package/src/core/columns/coreColumnsFeature.utils.ts +4 -4
- package/src/core/coreFeatures.ts +1 -1
- package/src/core/headers/buildHeaderGroups.ts +4 -2
- package/src/core/headers/coreHeadersFeature.types.ts +12 -12
- package/src/core/headers/coreHeadersFeature.utils.ts +7 -8
- package/src/core/row-models/coreRowModelsFeature.types.ts +6 -20
- package/src/core/row-models/coreRowModelsFeature.utils.ts +8 -8
- package/src/core/row-models/createCoreRowModel.ts +7 -6
- package/src/core/rows/constructRow.ts +4 -2
- package/src/core/rows/coreRowsFeature.ts +21 -0
- package/src/core/rows/coreRowsFeature.types.ts +45 -8
- package/src/core/rows/coreRowsFeature.utils.ts +93 -5
- package/src/core/table/constructTable.ts +44 -6
- package/src/core/table/coreTablesFeature.types.ts +45 -20
- package/src/core/table/coreTablesFeature.utils.ts +59 -19
- package/src/experimental-worker-plugin.ts +22 -0
- package/src/features/column-faceting/columnFacetingFeature.types.ts +17 -48
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +53 -18
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +33 -7
- package/src/features/column-faceting/createFacetedRowModel.ts +8 -1
- package/src/features/column-faceting/createFacetedUniqueValues.ts +41 -10
- package/src/features/column-filtering/columnFilteringFeature.ts +3 -2
- package/src/features/column-filtering/columnFilteringFeature.types.ts +117 -41
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +37 -23
- package/src/features/column-filtering/createFilteredRowModel.ts +28 -17
- package/src/features/column-filtering/filterFns.ts +533 -0
- package/src/features/column-filtering/filterRowsUtils.ts +3 -2
- package/src/features/column-grouping/columnGroupingFeature.ts +3 -21
- package/src/features/column-grouping/columnGroupingFeature.types.ts +21 -95
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +4 -87
- package/src/features/column-grouping/createGroupedRowModel.ts +46 -45
- package/src/features/column-ordering/columnOrderingFeature.ts +12 -7
- package/src/features/column-ordering/columnOrderingFeature.types.ts +29 -3
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +59 -8
- package/src/features/column-pinning/columnPinningFeature.ts +76 -59
- package/src/features/column-pinning/columnPinningFeature.types.ts +53 -42
- package/src/features/column-pinning/columnPinningFeature.utils.ts +184 -170
- package/src/features/column-resizing/columnResizingFeature.types.ts +1 -4
- package/src/features/column-resizing/columnResizingFeature.utils.ts +120 -52
- package/src/features/column-sizing/columnSizingFeature.ts +24 -24
- package/src/features/column-sizing/columnSizingFeature.types.ts +53 -8
- package/src/features/column-sizing/columnSizingFeature.utils.ts +143 -62
- package/src/features/column-visibility/columnVisibilityFeature.ts +4 -0
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +4 -4
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +48 -30
- package/src/features/global-filtering/globalFilteringFeature.types.ts +4 -4
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +13 -5
- package/src/features/row-aggregation/aggregationFns.ts +345 -0
- package/src/features/row-aggregation/rowAggregationFeature.ts +60 -0
- package/src/features/row-aggregation/rowAggregationFeature.types.ts +339 -0
- package/src/features/row-aggregation/rowAggregationFeature.utils.ts +430 -0
- package/src/features/row-expanding/rowExpandingFeature.types.ts +8 -23
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +38 -13
- package/src/features/row-pagination/createPaginatedRowModel.ts +1 -1
- package/src/features/row-pagination/rowPaginationFeature.types.ts +6 -21
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +1 -1
- package/src/features/row-pinning/rowPinningFeature.types.ts +4 -4
- package/src/features/row-selection/rowSelectionFeature.ts +53 -3
- package/src/features/row-selection/rowSelectionFeature.types.ts +54 -10
- package/src/features/row-selection/rowSelectionFeature.utils.ts +273 -91
- package/src/features/row-sorting/createSortedRowModel.ts +107 -75
- package/src/features/row-sorting/rowSortingFeature.types.ts +87 -34
- package/src/features/row-sorting/rowSortingFeature.utils.ts +49 -23
- package/src/features/row-sorting/sortFns.ts +366 -0
- package/src/features/stockFeatures.ts +3 -0
- package/src/helpers/columnHelper.ts +4 -4
- package/src/helpers/metaHelper.ts +24 -0
- package/src/helpers/tableFeatures.ts +37 -5
- package/src/index.ts +8 -8
- package/src/static-functions.ts +1 -0
- package/src/store-reactivity-bindings.ts +1 -1
- package/src/types/Cell.ts +4 -2
- package/src/types/Column.ts +13 -9
- package/src/types/ColumnDef.ts +40 -10
- package/src/types/Header.ts +2 -2
- package/src/types/HeaderGroup.ts +6 -6
- package/src/types/Row.ts +6 -4
- package/src/types/RowModel.ts +19 -74
- package/src/types/RowModelFns.ts +10 -10
- package/src/types/Table.ts +52 -27
- package/src/types/TableFeatures.ts +392 -14
- package/src/types/TableOptions.ts +67 -14
- package/src/types/TableState.ts +15 -1
- package/src/types/type-utils.ts +8 -0
- package/src/utils.ts +60 -8
- package/src/worker/createTableWorker.ts +357 -0
- package/src/worker/createWorkerRowModel.ts +121 -0
- package/src/worker/initTableWorker.ts +164 -0
- package/src/worker/rebuildRowModel.ts +120 -0
- package/src/worker/serializeRowModel.ts +80 -0
- package/src/worker/tableWorkerProtocol.ts +105 -0
- package/dist/fns/aggregationFns.cjs +0 -161
- package/dist/fns/aggregationFns.cjs.map +0 -1
- package/dist/fns/aggregationFns.d.cts +0 -85
- package/dist/fns/aggregationFns.d.ts +0 -85
- package/dist/fns/aggregationFns.js +0 -151
- package/dist/fns/aggregationFns.js.map +0 -1
- package/dist/fns/filterFns.cjs +0 -201
- package/dist/fns/filterFns.cjs.map +0 -1
- package/dist/fns/filterFns.d.cts +0 -167
- package/dist/fns/filterFns.d.ts +0 -167
- package/dist/fns/filterFns.js +0 -185
- package/dist/fns/filterFns.js.map +0 -1
- package/dist/fns/sortFns.cjs +0 -118
- package/dist/fns/sortFns.cjs.map +0 -1
- package/dist/fns/sortFns.d.cts +0 -65
- package/dist/fns/sortFns.d.ts +0 -65
- package/dist/fns/sortFns.js +0 -110
- package/dist/fns/sortFns.js.map +0 -1
- package/skills/column-definitions/SKILL.md +0 -333
- package/skills/column-layout/SKILL.md +0 -328
- package/skills/column-layout/references/subsystems.md +0 -220
- package/skills/customizing-feature-behavior/SKILL.md +0 -416
- package/skills/filtering/SKILL.md +0 -357
- package/skills/filtering/references/faceting-and-fuzzy.md +0 -191
- package/skills/row-expanding/SKILL.md +0 -348
- package/skills/setup/SKILL.md +0 -400
- package/skills/state-management/SKILL.md +0 -388
- package/src/fns/aggregationFns.ts +0 -245
- package/src/fns/filterFns.ts +0 -382
- package/src/fns/sortFns.ts +0 -217
|
@@ -1,10 +1,68 @@
|
|
|
1
|
-
import { flattenBy } from '../../utils'
|
|
1
|
+
import { flattenBy, hasOwn, makeObjectMap } from '../../utils'
|
|
2
2
|
import { constructCell } from '../cells/constructCell'
|
|
3
3
|
import type { Table_Internal } from '../../types/Table'
|
|
4
4
|
import type { RowData } from '../../types/type-utils'
|
|
5
5
|
import type { TableFeatures } from '../../types/TableFeatures'
|
|
6
6
|
import type { Row } from '../../types/Row'
|
|
7
7
|
import type { Cell } from '../../types/Cell'
|
|
8
|
+
import type { Row_RowExpanding } from '../../features/row-expanding/rowExpandingFeature.types'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns this row's zero-based position in the current pre-pagination row
|
|
12
|
+
* model. Rows outside that model return `-1`.
|
|
13
|
+
*/
|
|
14
|
+
export function row_getDisplayIndex<
|
|
15
|
+
TFeatures extends TableFeatures,
|
|
16
|
+
TData extends RowData,
|
|
17
|
+
>(row: Row<TFeatures, TData>) {
|
|
18
|
+
const rows = row.table.getRowsInDisplayOrder()
|
|
19
|
+
const displayIndex = row._displayIndexCache
|
|
20
|
+
|
|
21
|
+
return rows[displayIndex] === row ? displayIndex : -1
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns the rows in the current display order after assigning their
|
|
26
|
+
* zero-based display indexes.
|
|
27
|
+
*
|
|
28
|
+
* When expanded rows bypass pagination, expanded descendants are inserted into
|
|
29
|
+
* the returned order even though they are absent from the pre-pagination row
|
|
30
|
+
* model.
|
|
31
|
+
*/
|
|
32
|
+
export function table_getRowsInDisplayOrder<
|
|
33
|
+
TFeatures extends TableFeatures,
|
|
34
|
+
TData extends RowData,
|
|
35
|
+
>(table: Table_Internal<TFeatures, TData>) {
|
|
36
|
+
const rows = table.getPrePaginatedRowModel().rows
|
|
37
|
+
|
|
38
|
+
if (table.options.paginateExpandedRows === false) {
|
|
39
|
+
const displayRows: Array<Row<TFeatures, TData>> = []
|
|
40
|
+
|
|
41
|
+
const handleRow = (row: Row<TFeatures, TData>) => {
|
|
42
|
+
row._displayIndexCache = displayRows.length
|
|
43
|
+
displayRows.push(row)
|
|
44
|
+
|
|
45
|
+
if (
|
|
46
|
+
row.subRows.length &&
|
|
47
|
+
(
|
|
48
|
+
row as Row<TFeatures, TData> & Partial<Row_RowExpanding>
|
|
49
|
+
).getIsExpanded?.()
|
|
50
|
+
) {
|
|
51
|
+
row.subRows.forEach(handleRow)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
rows.forEach(handleRow)
|
|
56
|
+
|
|
57
|
+
return displayRows
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for (let i = 0; i < rows.length; i++) {
|
|
61
|
+
rows[i]!._displayIndexCache = i
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return rows
|
|
65
|
+
}
|
|
8
66
|
|
|
9
67
|
/**
|
|
10
68
|
* Reads and caches this row's value for a column.
|
|
@@ -21,7 +79,7 @@ export function row_getValue<
|
|
|
21
79
|
TFeatures extends TableFeatures,
|
|
22
80
|
TData extends RowData,
|
|
23
81
|
>(row: Row<TFeatures, TData>, columnId: string) {
|
|
24
|
-
if (row._valuesCache
|
|
82
|
+
if (hasOwn(row._valuesCache, columnId)) {
|
|
25
83
|
return row._valuesCache[columnId]
|
|
26
84
|
}
|
|
27
85
|
|
|
@@ -51,7 +109,7 @@ export function row_getUniqueValues<
|
|
|
51
109
|
TFeatures extends TableFeatures,
|
|
52
110
|
TData extends RowData,
|
|
53
111
|
>(row: Row<TFeatures, TData>, columnId: string) {
|
|
54
|
-
if (row._uniqueValuesCache
|
|
112
|
+
if (hasOwn(row._uniqueValuesCache, columnId)) {
|
|
55
113
|
return row._uniqueValuesCache[columnId]
|
|
56
114
|
}
|
|
57
115
|
|
|
@@ -109,6 +167,24 @@ export function row_getLeafRows<
|
|
|
109
167
|
return flattenBy(row.subRows, (d) => d.subRows)
|
|
110
168
|
}
|
|
111
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Returns the deepest structural row depth in the core row model.
|
|
172
|
+
* Root rows are depth `0`, their direct sub-rows are depth `1`, and so on.
|
|
173
|
+
*/
|
|
174
|
+
export function table_getMaxSubRowDepth<
|
|
175
|
+
TFeatures extends TableFeatures,
|
|
176
|
+
TData extends RowData,
|
|
177
|
+
>(table: Table_Internal<TFeatures, TData>): number {
|
|
178
|
+
const rows = table.getCoreRowModel().flatRows
|
|
179
|
+
let maxDepth = 0
|
|
180
|
+
|
|
181
|
+
for (let i = 0; i < rows.length; i++) {
|
|
182
|
+
maxDepth = Math.max(maxDepth, rows[i]!.depth)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return maxDepth
|
|
186
|
+
}
|
|
187
|
+
|
|
112
188
|
/**
|
|
113
189
|
* Looks up this row's direct parent, if it has one.
|
|
114
190
|
*
|
|
@@ -169,11 +245,23 @@ export function row_getAllCells<
|
|
|
169
245
|
TData extends RowData,
|
|
170
246
|
>(row: Row<TFeatures, TData>): Array<Cell<TFeatures, TData, unknown>> {
|
|
171
247
|
const columns = row.table.getAllLeafColumns()
|
|
248
|
+
// WeakMap so cells keyed by replaced column instances can be collected;
|
|
249
|
+
// rows are memoized on data only and outlive column generations
|
|
250
|
+
let cache = row._cellsCache
|
|
251
|
+
if (!cache) {
|
|
252
|
+
cache = row._cellsCache = new WeakMap()
|
|
253
|
+
}
|
|
172
254
|
const cells: Array<Cell<TFeatures, TData, unknown>> = new Array(
|
|
173
255
|
columns.length,
|
|
174
256
|
)
|
|
175
257
|
for (let i = 0; i < columns.length; i++) {
|
|
176
|
-
|
|
258
|
+
const column = columns[i]!
|
|
259
|
+
let cell = cache.get(column)
|
|
260
|
+
if (!cell) {
|
|
261
|
+
cell = constructCell(column, row, row.table)
|
|
262
|
+
cache.set(column, cell)
|
|
263
|
+
}
|
|
264
|
+
cells[i] = cell
|
|
177
265
|
}
|
|
178
266
|
return cells
|
|
179
267
|
}
|
|
@@ -192,7 +280,7 @@ export function row_getAllCellsByColumnId<
|
|
|
192
280
|
TFeatures extends TableFeatures,
|
|
193
281
|
TData extends RowData,
|
|
194
282
|
>(row: Row<TFeatures, TData>) {
|
|
195
|
-
const result
|
|
283
|
+
const result = makeObjectMap<Cell<TFeatures, TData, unknown>>()
|
|
196
284
|
const cells = row.getAllCells()
|
|
197
285
|
for (let i = 0; i < cells.length; i++) {
|
|
198
286
|
const cell = cells[i]!
|
|
@@ -33,16 +33,38 @@ export function constructTable<
|
|
|
33
33
|
TFeatures extends TableFeatures,
|
|
34
34
|
TData extends RowData,
|
|
35
35
|
>(tableOptions: TableOptions<TFeatures, TData>): Table<TFeatures, TData> {
|
|
36
|
-
const _reactivity = tableOptions.features.
|
|
36
|
+
const _reactivity = tableOptions.features.coreReactivityFeature!
|
|
37
|
+
|
|
38
|
+
// Strip the non-feature slots: type-only meta slots, row model factories,
|
|
39
|
+
// and row model fn registries all live on the `features` option but are not
|
|
40
|
+
// table features themselves.
|
|
41
|
+
const {
|
|
42
|
+
aggregationFns,
|
|
43
|
+
columnMeta: _columnMeta,
|
|
44
|
+
coreRowModel,
|
|
45
|
+
expandedRowModel,
|
|
46
|
+
facetedMinMaxValues,
|
|
47
|
+
facetedRowModel,
|
|
48
|
+
facetedUniqueValues,
|
|
49
|
+
filterFns,
|
|
50
|
+
filterMeta: _filterMeta,
|
|
51
|
+
filteredRowModel,
|
|
52
|
+
groupedRowModel,
|
|
53
|
+
paginatedRowModel,
|
|
54
|
+
sortFns,
|
|
55
|
+
sortedRowModel,
|
|
56
|
+
tableMeta: _tableMeta,
|
|
57
|
+
...features
|
|
58
|
+
} = tableOptions.features
|
|
37
59
|
|
|
38
60
|
const table = {
|
|
39
61
|
_reactivity,
|
|
40
|
-
_features: { ...coreFeatures, ...
|
|
62
|
+
_features: { ...coreFeatures, ...features },
|
|
41
63
|
_rowModels: {},
|
|
42
|
-
_rowModelFns: {},
|
|
64
|
+
_rowModelFns: { aggregationFns, filterFns, sortFns },
|
|
43
65
|
baseAtoms: {},
|
|
44
66
|
atoms: {},
|
|
45
|
-
} as Table_Internal<TFeatures, TData>
|
|
67
|
+
} as unknown as Table_Internal<TFeatures, TData>
|
|
46
68
|
|
|
47
69
|
const featuresList: Array<TableFeature> = Object.values(table._features)
|
|
48
70
|
|
|
@@ -144,12 +166,28 @@ export function constructTable<
|
|
|
144
166
|
),
|
|
145
167
|
)
|
|
146
168
|
|
|
169
|
+
for (let i = 0; i < featuresList.length; i++) {
|
|
170
|
+
featuresList[i]!.initTableInstanceData?.(table)
|
|
171
|
+
}
|
|
172
|
+
|
|
147
173
|
if (
|
|
148
174
|
process.env.NODE_ENV === 'development' &&
|
|
149
175
|
(tableOptions.debugAll || tableOptions.debugTable)
|
|
150
176
|
) {
|
|
151
177
|
const features = Object.keys(table._features)
|
|
152
|
-
const rowModels = Object.
|
|
178
|
+
const rowModels = Object.entries({
|
|
179
|
+
coreRowModel,
|
|
180
|
+
filteredRowModel,
|
|
181
|
+
groupedRowModel,
|
|
182
|
+
sortedRowModel,
|
|
183
|
+
expandedRowModel,
|
|
184
|
+
paginatedRowModel,
|
|
185
|
+
facetedRowModel,
|
|
186
|
+
facetedMinMaxValues,
|
|
187
|
+
facetedUniqueValues,
|
|
188
|
+
})
|
|
189
|
+
.filter(([, factory]) => factory)
|
|
190
|
+
.map(([key]) => key)
|
|
153
191
|
const states = Object.keys(table.initialState)
|
|
154
192
|
|
|
155
193
|
console.log(
|
|
@@ -168,5 +206,5 @@ export function constructTable<
|
|
|
168
206
|
featuresList[i]!.constructTableAPIs?.(table)
|
|
169
207
|
}
|
|
170
208
|
|
|
171
|
-
return table
|
|
209
|
+
return table as unknown as Table<TFeatures, TData>
|
|
172
210
|
}
|
|
@@ -3,15 +3,38 @@ import type { Atom, ReadonlyAtom, ReadonlyStore } from '@tanstack/store'
|
|
|
3
3
|
import type { CoreFeatures } from '../coreFeatures'
|
|
4
4
|
import type { RowModelFns } from '../../types/RowModelFns'
|
|
5
5
|
import type { RowData, Updater } from '../../types/type-utils'
|
|
6
|
-
import type {
|
|
7
|
-
|
|
6
|
+
import type {
|
|
7
|
+
IsAny,
|
|
8
|
+
TableFeatures,
|
|
9
|
+
ValidateFeatureSlots,
|
|
10
|
+
} from '../../types/TableFeatures'
|
|
11
|
+
import type { CachedRowModels } from '../../types/RowModel'
|
|
8
12
|
import type { TableOptions } from '../../types/TableOptions'
|
|
9
13
|
import type { TableState, TableState_All } from '../../types/TableState'
|
|
10
14
|
|
|
15
|
+
// @ts-expect-error Phantom type params: unused in this empty base declaration, but required with these exact names so user `declare module` augmentations merge correctly.
|
|
11
16
|
export interface TableMeta<
|
|
17
|
+
in out TFeatures extends TableFeatures,
|
|
18
|
+
in out TData extends RowData,
|
|
19
|
+
> {}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Resolves the type of `options.meta` for a feature set.
|
|
23
|
+
*
|
|
24
|
+
* When the features object declares a `tableMeta` type-only slot
|
|
25
|
+
* (`tableFeatures({ ..., tableMeta: {} as MyTableMeta })`), that type wins.
|
|
26
|
+
* Otherwise this falls back to the global declaration-merged `TableMeta`
|
|
27
|
+
* interface.
|
|
28
|
+
*/
|
|
29
|
+
export type ExtractTableMeta<
|
|
12
30
|
TFeatures extends TableFeatures,
|
|
13
31
|
TData extends RowData,
|
|
14
|
-
>
|
|
32
|
+
> =
|
|
33
|
+
IsAny<TFeatures> extends true
|
|
34
|
+
? TableMeta<TFeatures, TData>
|
|
35
|
+
: TFeatures extends { tableMeta: infer TMeta extends object }
|
|
36
|
+
? TMeta
|
|
37
|
+
: TableMeta<TFeatures, TData>
|
|
15
38
|
|
|
16
39
|
/**
|
|
17
40
|
* A map of writable atoms, one per `TableState` slice. These are the internal
|
|
@@ -52,31 +75,29 @@ export type ExternalAtoms<TFeatures extends TableFeatures> = Partial<{
|
|
|
52
75
|
* use optional chaining (`table.atoms.columnPinning?.get() ?? default`).
|
|
53
76
|
*/
|
|
54
77
|
export type BaseAtoms_All = {
|
|
55
|
-
[K in keyof TableState_All]?: Atom<TableState_All[K]
|
|
78
|
+
[K in keyof TableState_All]?: Atom<Exclude<TableState_All[K], undefined>>
|
|
56
79
|
}
|
|
57
80
|
export type Atoms_All = {
|
|
58
81
|
[K in keyof TableState_All]?: ReadonlyAtom<TableState_All[K]>
|
|
59
82
|
}
|
|
60
83
|
export type ExternalAtoms_All = Partial<{
|
|
61
|
-
[K in keyof TableState_All]: Atom<TableState_All[K]
|
|
84
|
+
[K in keyof TableState_All]: Atom<Exclude<TableState_All[K], undefined>>
|
|
62
85
|
}>
|
|
63
86
|
|
|
64
87
|
export interface TableOptions_Table<
|
|
65
|
-
TFeatures extends TableFeatures,
|
|
66
|
-
TData extends RowData,
|
|
88
|
+
in out TFeatures extends TableFeatures,
|
|
89
|
+
in out TData extends RowData,
|
|
67
90
|
> {
|
|
68
91
|
/**
|
|
69
92
|
* The feature modules registered on this table instance.
|
|
70
93
|
*
|
|
71
94
|
* Feature registration controls which state slices, options, and prototype
|
|
72
|
-
* APIs are available.
|
|
95
|
+
* APIs are available. This object also carries the table's row model
|
|
96
|
+
* factories (`sortedRowModel`, `filteredRowModel`, etc.), row model function
|
|
97
|
+
* registries (`sortFns`, `filterFns`, `aggregationFns`), and type-only meta
|
|
98
|
+
* slots (`tableMeta`, `columnMeta`).
|
|
73
99
|
*/
|
|
74
|
-
readonly features: TFeatures
|
|
75
|
-
/**
|
|
76
|
-
* Row model factories used by features such as filtering, grouping, sorting,
|
|
77
|
-
* expansion, and pagination.
|
|
78
|
-
*/
|
|
79
|
-
readonly rowModels?: CreateRowModels_All<TFeatures, TData>
|
|
100
|
+
readonly features: TFeatures & ValidateFeatureSlots<TFeatures>
|
|
80
101
|
/**
|
|
81
102
|
* Optionally, provide your own external writable atoms for individual state slices.
|
|
82
103
|
* When an atom is provided for a given slice, it takes precedence over `options.state[key]`
|
|
@@ -116,8 +137,11 @@ export interface TableOptions_Table<
|
|
|
116
137
|
) => TableOptions<TFeatures, TData>
|
|
117
138
|
/**
|
|
118
139
|
* You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.
|
|
140
|
+
*
|
|
141
|
+
* Declare its type per-table via the `tableMeta` type-only slot on the
|
|
142
|
+
* `features` option, or globally via declaration merging on `TableMeta`.
|
|
119
143
|
*/
|
|
120
|
-
readonly meta?:
|
|
144
|
+
readonly meta?: ExtractTableMeta<TFeatures, TData>
|
|
121
145
|
/**
|
|
122
146
|
* Optionally provide externally managed values for individual state slices.
|
|
123
147
|
*
|
|
@@ -129,8 +153,8 @@ export interface TableOptions_Table<
|
|
|
129
153
|
}
|
|
130
154
|
|
|
131
155
|
export interface Table_CoreProperties<
|
|
132
|
-
TFeatures extends TableFeatures,
|
|
133
|
-
TData extends RowData,
|
|
156
|
+
in out TFeatures extends TableFeatures,
|
|
157
|
+
in out TData extends RowData,
|
|
134
158
|
> {
|
|
135
159
|
/**
|
|
136
160
|
* Table reactivity bindings for interacting with TanStack Store.
|
|
@@ -197,15 +221,16 @@ export interface Table_CoreProperties<
|
|
|
197
221
|
}
|
|
198
222
|
|
|
199
223
|
export interface Table_Table<
|
|
200
|
-
TFeatures extends TableFeatures,
|
|
201
|
-
TData extends RowData,
|
|
224
|
+
in out TFeatures extends TableFeatures,
|
|
225
|
+
in out TData extends RowData,
|
|
202
226
|
> extends Table_CoreProperties<TFeatures, TData> {
|
|
203
227
|
/**
|
|
204
228
|
* Resets the table's internal base atoms to `table.initialState`.
|
|
205
229
|
*
|
|
206
230
|
* Prefer feature-specific reset APIs, such as `resetPagination`, when a state
|
|
207
231
|
* slice may be owned by an external atom or needs that feature's blank/default
|
|
208
|
-
* reset behavior.
|
|
232
|
+
* reset behavior. After resetting internal atoms, this also invokes feature
|
|
233
|
+
* reset hooks for mutable, transient table-instance data.
|
|
209
234
|
*/
|
|
210
235
|
reset: () => void
|
|
211
236
|
/**
|
|
@@ -32,7 +32,7 @@ export function table_syncExternalStateToBaseAtoms<
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const externalState = state[key as keyof typeof state]
|
|
35
|
-
if (externalState !== baseAtom.get()) {
|
|
35
|
+
if (externalState !== table._reactivity.untrack(() => baseAtom.get())) {
|
|
36
36
|
baseAtom.set(() => externalState)
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -40,7 +40,8 @@ export function table_syncExternalStateToBaseAtoms<
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Resets all internal table base atoms to `table.initialState
|
|
43
|
+
* Resets all internal table base atoms to `table.initialState`, then clears
|
|
44
|
+
* transient instance data through registered feature reset hooks.
|
|
44
45
|
*
|
|
45
46
|
* This resets internally owned state slices in a single reactivity batch. Use
|
|
46
47
|
* feature-specific reset APIs when a slice may be externally owned.
|
|
@@ -62,13 +63,20 @@ export function table_reset<
|
|
|
62
63
|
;(table.baseAtoms as any)[key].set(snap[key])
|
|
63
64
|
}
|
|
64
65
|
})
|
|
66
|
+
|
|
67
|
+
const features = Object.values(table._features)
|
|
68
|
+
for (let i = 0; i < features.length; i++) {
|
|
69
|
+
features[i]!.resetTableInstanceData?.(table)
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
/**
|
|
68
74
|
* Merges new table options with the current resolved options.
|
|
69
75
|
*
|
|
70
76
|
* If `options.mergeOptions` is provided, it owns the merge behavior; otherwise
|
|
71
|
-
* options are shallow-merged.
|
|
77
|
+
* options are shallow-merged. Static options that should never change after
|
|
78
|
+
* initialization are restored on a fresh object so framework merge helpers may
|
|
79
|
+
* return readonly getter/proxy objects.
|
|
72
80
|
*
|
|
73
81
|
* @example
|
|
74
82
|
* ```ts
|
|
@@ -82,14 +90,52 @@ export function table_mergeOptions<
|
|
|
82
90
|
table: Table_Internal<TFeatures, TData>,
|
|
83
91
|
newOptions: TableOptions<TFeatures, TData>,
|
|
84
92
|
) {
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
const { features, atoms, initialState } = table.options
|
|
94
|
+
|
|
95
|
+
// simple merge if no mergeOptions is provided - performant
|
|
96
|
+
if (!table.options.mergeOptions) {
|
|
97
|
+
return {
|
|
98
|
+
...table.options,
|
|
99
|
+
...newOptions,
|
|
100
|
+
features,
|
|
101
|
+
atoms,
|
|
102
|
+
initialState,
|
|
103
|
+
}
|
|
87
104
|
}
|
|
88
105
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
// else use the mergeOptions function and preserve getters/setters
|
|
107
|
+
const mergedOptions = table.options.mergeOptions(
|
|
108
|
+
table.options as TableOptions<TFeatures, TData>,
|
|
109
|
+
newOptions,
|
|
110
|
+
)
|
|
111
|
+
const descriptors: PropertyDescriptorMap = {
|
|
112
|
+
...Object.getOwnPropertyDescriptors(mergedOptions),
|
|
92
113
|
}
|
|
114
|
+
|
|
115
|
+
return Object.defineProperties(
|
|
116
|
+
Object.create(Object.getPrototypeOf(mergedOptions)),
|
|
117
|
+
{
|
|
118
|
+
...descriptors,
|
|
119
|
+
features: {
|
|
120
|
+
value: features,
|
|
121
|
+
enumerable: true,
|
|
122
|
+
configurable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
},
|
|
125
|
+
atoms: {
|
|
126
|
+
value: atoms,
|
|
127
|
+
enumerable: true,
|
|
128
|
+
configurable: true,
|
|
129
|
+
writable: true,
|
|
130
|
+
},
|
|
131
|
+
initialState: {
|
|
132
|
+
value: initialState,
|
|
133
|
+
enumerable: true,
|
|
134
|
+
configurable: true,
|
|
135
|
+
writable: true,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
) as TableOptions<TFeatures, TData>
|
|
93
139
|
}
|
|
94
140
|
|
|
95
141
|
/**
|
|
@@ -110,17 +156,11 @@ export function table_setOptions<
|
|
|
110
156
|
table: Table_Internal<TFeatures, TData>,
|
|
111
157
|
updater: Updater<TableOptions<TFeatures, TData>>,
|
|
112
158
|
): void {
|
|
113
|
-
const newOptions = functionalUpdate(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// so we assign them back preserving the `table_mergeOptions` object reference
|
|
119
|
-
rowModels,
|
|
120
|
-
features,
|
|
121
|
-
atoms,
|
|
122
|
-
initialState,
|
|
123
|
-
})
|
|
159
|
+
const newOptions = functionalUpdate(
|
|
160
|
+
updater,
|
|
161
|
+
table.options as TableOptions<TFeatures, TData>,
|
|
162
|
+
)
|
|
163
|
+
const mergedOptions = table_mergeOptions(table, newOptions)
|
|
124
164
|
|
|
125
165
|
if (table.optionsStore) {
|
|
126
166
|
table.optionsStore.set(() => mergedOptions)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web Worker row models sub-entry (experimental POC).
|
|
3
|
+
*
|
|
4
|
+
* Offloads row model stages to a dedicated worker running a headless "shadow
|
|
5
|
+
* table" built with the same table-core row model pipeline. The main thread
|
|
6
|
+
* receives transferable index permutations and rebuilds its row models from
|
|
7
|
+
* them, stale-while-revalidate style.
|
|
8
|
+
*
|
|
9
|
+
* Main thread:
|
|
10
|
+
* - `createTableWorker` — one shared handle per table worker
|
|
11
|
+
* - `createWorkerRowModel` — turns any flat row model stage into a
|
|
12
|
+
* worker-backed factory for the matching `features` slot
|
|
13
|
+
* - `workerRowModelsFeature` — registers the `workerRowModels` state slice
|
|
14
|
+
*
|
|
15
|
+
* Worker entry (user-authored file):
|
|
16
|
+
* - `initTableWorker` — runs the shadow table; computes only the stages whose
|
|
17
|
+
* row model factories are registered in its config
|
|
18
|
+
*/
|
|
19
|
+
export * from './worker/tableWorkerProtocol'
|
|
20
|
+
export * from './worker/initTableWorker'
|
|
21
|
+
export * from './worker/createTableWorker'
|
|
22
|
+
export * from './worker/createWorkerRowModel'
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { Table } from '../../types/Table'
|
|
2
1
|
import type { RowData } from '../../types/type-utils'
|
|
3
2
|
import type { TableFeatures } from '../../types/TableFeatures'
|
|
4
3
|
import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'
|
|
5
4
|
|
|
6
5
|
export interface Column_ColumnFaceting<
|
|
7
|
-
TFeatures extends TableFeatures,
|
|
8
|
-
TData extends RowData,
|
|
6
|
+
in out TFeatures extends TableFeatures,
|
|
7
|
+
in out TData extends RowData,
|
|
9
8
|
> {
|
|
10
9
|
/**
|
|
11
10
|
* Computes min/max numeric facet values for this column.
|
|
@@ -25,74 +24,44 @@ export interface Column_ColumnFaceting<
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
export interface Table_RowModels_Faceted<
|
|
28
|
-
TFeatures extends TableFeatures,
|
|
29
|
-
TData extends RowData,
|
|
27
|
+
in out TFeatures extends TableFeatures,
|
|
28
|
+
in out TData extends RowData,
|
|
30
29
|
> {
|
|
31
30
|
/**
|
|
32
31
|
* Computes min/max numeric facet values for the active faceting context.
|
|
33
32
|
*
|
|
34
|
-
* Requires a `facetedMinMaxValues` row-model factory
|
|
33
|
+
* Requires a `facetedMinMaxValues` row-model factory on the `features` option.
|
|
35
34
|
*/
|
|
36
35
|
getFacetedMinMaxValues: () => undefined | [number, number]
|
|
37
36
|
/**
|
|
38
37
|
* Computes the row model used to derive facet values.
|
|
39
38
|
*
|
|
40
|
-
* Requires a `facetedRowModel` row-model factory
|
|
39
|
+
* Requires a `facetedRowModel` row-model factory on the `features` option.
|
|
41
40
|
*/
|
|
42
41
|
getFacetedRowModel: () => RowModel<TFeatures, TData>
|
|
43
42
|
/**
|
|
44
43
|
* Computes unique facet values and occurrence counts.
|
|
45
44
|
*
|
|
46
|
-
* Requires a `facetedUniqueValues` row-model factory
|
|
45
|
+
* Requires a `facetedUniqueValues` row-model factory on the `features` option.
|
|
47
46
|
*/
|
|
48
47
|
getFacetedUniqueValues: () => Map<any, number>
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
export interface CreateRowModel_Faceted<
|
|
52
|
-
TFeatures extends TableFeatures,
|
|
53
|
-
TData extends RowData,
|
|
54
|
-
> {
|
|
55
|
-
/**
|
|
56
|
-
* Factory used to retrieve faceted min/max values. If using server-side
|
|
57
|
-
* faceting, this is not required. To use client-side faceting, pass
|
|
58
|
-
* `createFacetedMinMaxValues()` or implement your own factory.
|
|
59
|
-
*/
|
|
60
|
-
facetedMinMaxValues?: (
|
|
61
|
-
table: Table<TFeatures, TData>,
|
|
62
|
-
columnId: string,
|
|
63
|
-
) => () => [number, number] | undefined
|
|
64
|
-
/**
|
|
65
|
-
* Factory used to retrieve the faceted row model. If using server-side
|
|
66
|
-
* faceting, this is not required. To use client-side faceting, pass
|
|
67
|
-
* `createFacetedRowModel()` or implement your own factory.
|
|
68
|
-
*/
|
|
69
|
-
facetedRowModel?: (
|
|
70
|
-
table: Table<TFeatures, TData>,
|
|
71
|
-
columnId: string,
|
|
72
|
-
) => () => RowModel<TFeatures, TData>
|
|
73
|
-
/**
|
|
74
|
-
* Factory used to retrieve faceted unique values. If using server-side
|
|
75
|
-
* faceting, this is not required. To use client-side faceting, pass
|
|
76
|
-
* `createFacetedUniqueValues()` or implement your own factory.
|
|
77
|
-
*/
|
|
78
|
-
facetedUniqueValues?: (
|
|
79
|
-
table: Table<TFeatures, TData>,
|
|
80
|
-
columnId: string,
|
|
81
|
-
) => () => Map<any, number>
|
|
82
|
-
}
|
|
83
|
-
|
|
84
50
|
export interface CachedRowModel_Faceted<
|
|
85
|
-
TFeatures extends TableFeatures,
|
|
86
|
-
TData extends RowData,
|
|
51
|
+
in out TFeatures extends TableFeatures,
|
|
52
|
+
in out TData extends RowData,
|
|
87
53
|
> {
|
|
88
|
-
|
|
89
|
-
facetedMinMaxValues?: (
|
|
90
|
-
facetedUniqueValues?: (
|
|
54
|
+
facetedRowModels?: Record<string, () => RowModel<TFeatures, TData>>
|
|
55
|
+
facetedMinMaxValues?: Record<string, () => undefined | [number, number]>
|
|
56
|
+
facetedUniqueValues?: Record<string, () => Map<any, number>>
|
|
57
|
+
globalFacetedRowModel?: () => RowModel<TFeatures, TData>
|
|
58
|
+
globalFacetedMinMaxValues?: () => undefined | [number, number]
|
|
59
|
+
globalFacetedUniqueValues?: () => Map<any, number>
|
|
91
60
|
}
|
|
92
61
|
|
|
93
62
|
export interface Table_ColumnFaceting<
|
|
94
|
-
TFeatures extends TableFeatures,
|
|
95
|
-
TData extends RowData,
|
|
63
|
+
in out TFeatures extends TableFeatures,
|
|
64
|
+
in out TData extends RowData,
|
|
96
65
|
> {
|
|
97
66
|
/**
|
|
98
67
|
* Returns the min and max values for the global filter.
|