@tanstack/table-core 9.0.0-alpha.46 → 9.0.0-alpha.48
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 +10 -0
- package/dist/core/cells/constructCell.cjs +4 -3
- package/dist/core/cells/constructCell.cjs.map +1 -1
- package/dist/core/cells/constructCell.js +4 -3
- package/dist/core/cells/constructCell.js.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.cjs +11 -8
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.d.ts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
- package/dist/core/columns/constructColumn.cjs +6 -4
- package/dist/core/columns/constructColumn.cjs.map +1 -1
- package/dist/core/columns/constructColumn.js +6 -4
- package/dist/core/columns/constructColumn.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +7 -6
- package/dist/core/columns/coreColumnsFeature.types.d.ts +7 -6
- package/dist/core/columns/coreColumnsFeature.utils.cjs +47 -29
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.js +47 -29
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/headers/buildHeaderGroups.cjs +27 -19
- package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
- package/dist/core/headers/buildHeaderGroups.js +27 -19
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +4 -3
- package/dist/core/headers/constructHeader.cjs.map +1 -1
- package/dist/core/headers/constructHeader.js +4 -3
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +1 -6
- package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.js +2 -7
- package/dist/core/headers/coreHeadersFeature.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +6 -4
- package/dist/core/headers/coreHeadersFeature.types.d.ts +6 -4
- package/dist/core/headers/coreHeadersFeature.utils.cjs +43 -36
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.js +44 -37
- 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/row-models/coreRowModelsFeature.utils.cjs +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
- package/dist/core/rows/constructRow.cjs +8 -6
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.js +8 -6
- package/dist/core/rows/constructRow.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +4 -4
- package/dist/core/rows/coreRowsFeature.types.d.ts +4 -4
- package/dist/core/rows/coreRowsFeature.utils.cjs +43 -32
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.d.ts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.js +43 -32
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +9 -5
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.js +9 -5
- package/dist/core/table/constructTable.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +6 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +6 -2
- package/dist/core/table/coreTablesFeature.utils.cjs +7 -3
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +2 -2
- package/dist/core/table/coreTablesFeature.utils.d.ts +2 -2
- package/dist/core/table/coreTablesFeature.utils.js +7 -3
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +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 +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.js +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.js +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.js +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +46 -29
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +46 -29
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +152 -115
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.js +153 -116
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +28 -4
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.js +28 -4
- package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +23 -14
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.js +24 -15
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +91 -52
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +91 -53
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +58 -43
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +58 -43
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +52 -36
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.js +52 -36
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +95 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.js +95 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +13 -8
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.js +13 -8
- package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +63 -46
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.js +63 -46
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/fns/aggregationFns.cjs +47 -16
- package/dist/fns/aggregationFns.cjs.map +1 -1
- package/dist/fns/aggregationFns.d.cts +33 -9
- package/dist/fns/aggregationFns.d.ts +33 -9
- package/dist/fns/aggregationFns.js +47 -17
- package/dist/fns/aggregationFns.js.map +1 -1
- package/dist/fns/filterFns.cjs +48 -17
- package/dist/fns/filterFns.cjs.map +1 -1
- package/dist/fns/filterFns.d.cts +42 -15
- package/dist/fns/filterFns.d.ts +42 -15
- package/dist/fns/filterFns.js +48 -17
- package/dist/fns/filterFns.js.map +1 -1
- package/dist/helpers/columnHelper.cjs +9 -4
- package/dist/helpers/columnHelper.cjs.map +1 -1
- package/dist/helpers/columnHelper.d.cts +9 -4
- package/dist/helpers/columnHelper.d.ts +9 -4
- package/dist/helpers/columnHelper.js +9 -4
- package/dist/helpers/columnHelper.js.map +1 -1
- package/dist/helpers/tableOptions.cjs.map +1 -1
- package/dist/helpers/tableOptions.d.cts +12 -9
- package/dist/helpers/tableOptions.d.ts +12 -9
- 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 +1 -0
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- 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/types/ColumnDef.d.cts +38 -0
- package/dist/types/ColumnDef.d.ts +38 -0
- package/dist/types/TableOptions.d.cts +15 -0
- package/dist/types/TableOptions.d.ts +15 -0
- package/dist/types/TableState.d.cts +12 -0
- package/dist/types/TableState.d.ts +12 -0
- package/dist/utils.cjs +18 -39
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -23
- package/dist/utils.d.ts +1 -23
- package/dist/utils.js +19 -36
- package/dist/utils.js.map +1 -1
- package/package.json +5 -3
- package/skills/column-definitions/SKILL.md +333 -0
- package/skills/column-layout/SKILL.md +328 -0
- package/skills/column-layout/references/subsystems.md +220 -0
- package/skills/customizing-feature-behavior/SKILL.md +416 -0
- package/skills/filtering/SKILL.md +357 -0
- package/skills/filtering/references/faceting-and-fuzzy.md +191 -0
- package/skills/grouping/SKILL.md +448 -0
- package/skills/migrate-v8-to-v9/SKILL.md +495 -0
- package/skills/pagination/SKILL.md +385 -0
- package/skills/row-expanding/SKILL.md +348 -0
- package/skills/row-pinning/SKILL.md +269 -0
- package/skills/row-selection/SKILL.md +391 -0
- package/skills/setup/SKILL.md +400 -0
- package/skills/sorting/SKILL.md +344 -0
- package/skills/state-management/SKILL.md +388 -0
- package/src/core/cells/constructCell.ts +3 -2
- package/src/core/cells/coreCellsFeature.utils.ts +11 -8
- package/src/core/columns/constructColumn.ts +5 -3
- package/src/core/columns/coreColumnsFeature.types.ts +7 -6
- package/src/core/columns/coreColumnsFeature.utils.ts +43 -29
- package/src/core/headers/buildHeaderGroups.ts +29 -30
- package/src/core/headers/constructHeader.ts +3 -2
- package/src/core/headers/coreHeadersFeature.ts +2 -27
- package/src/core/headers/coreHeadersFeature.types.ts +6 -4
- package/src/core/headers/coreHeadersFeature.utils.ts +52 -61
- package/src/core/reactivity/coreReactivityFeature.types.ts +4 -0
- package/src/core/row-models/coreRowModelsFeature.utils.ts +48 -36
- package/src/core/rows/constructRow.ts +6 -4
- package/src/core/rows/coreRowsFeature.types.ts +4 -4
- package/src/core/rows/coreRowsFeature.utils.ts +45 -32
- package/src/core/table/constructTable.ts +6 -4
- package/src/core/table/coreTablesFeature.types.ts +6 -2
- package/src/core/table/coreTablesFeature.utils.ts +5 -3
- package/src/features/column-faceting/columnFacetingFeature.types.ts +16 -10
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +26 -18
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +8 -10
- package/src/features/column-faceting/createFacetedRowModel.ts +10 -6
- package/src/features/column-faceting/createFacetedUniqueValues.ts +4 -3
- package/src/features/column-filtering/columnFilteringFeature.types.ts +21 -11
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +39 -28
- package/src/features/column-filtering/createFilteredRowModel.ts +14 -8
- package/src/features/column-grouping/columnGroupingFeature.types.ts +18 -14
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +55 -43
- package/src/features/column-ordering/columnOrderingFeature.types.ts +14 -5
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +44 -29
- package/src/features/column-pinning/columnPinningFeature.types.ts +43 -31
- package/src/features/column-pinning/columnPinningFeature.utils.ts +164 -128
- package/src/features/column-resizing/columnResizingFeature.types.ts +9 -9
- package/src/features/column-resizing/columnResizingFeature.utils.ts +28 -19
- package/src/features/column-sizing/columnSizingFeature.ts +16 -0
- package/src/features/column-sizing/columnSizingFeature.types.ts +19 -12
- package/src/features/column-sizing/columnSizingFeature.utils.ts +52 -41
- package/src/features/column-visibility/columnVisibilityFeature.ts +8 -0
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +22 -12
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +101 -56
- package/src/features/global-filtering/globalFilteringFeature.types.ts +10 -5
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +20 -14
- package/src/features/row-expanding/rowExpandingFeature.types.ts +16 -15
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +58 -43
- package/src/features/row-pagination/rowPaginationFeature.types.ts +19 -12
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +49 -32
- package/src/features/row-pinning/rowPinningFeature.types.ts +12 -8
- package/src/features/row-pinning/rowPinningFeature.utils.ts +59 -47
- package/src/features/row-selection/rowSelectionFeature.types.ts +30 -24
- package/src/features/row-selection/rowSelectionFeature.utils.ts +109 -88
- package/src/features/row-sorting/createSortedRowModel.ts +16 -13
- package/src/features/row-sorting/rowSortingFeature.types.ts +10 -8
- package/src/features/row-sorting/rowSortingFeature.utils.ts +63 -46
- package/src/fns/aggregationFns.ts +53 -17
- package/src/fns/filterFns.ts +48 -17
- package/src/helpers/columnHelper.ts +9 -4
- package/src/helpers/tableOptions.ts +12 -9
- package/src/store-reactivity-bindings.ts +1 -0
- package/src/types/ColumnDef.ts +38 -0
- package/src/types/TableOptions.ts +15 -0
- package/src/types/TableState.ts +12 -0
- package/src/utils.ts +19 -46
package/README.md
CHANGED
|
@@ -49,6 +49,16 @@ A headless table library for building powerful datagrids with full control over
|
|
|
49
49
|
|
|
50
50
|
### <a href="https://tanstack.com/table">Read the Docs →</a>
|
|
51
51
|
|
|
52
|
+
## Using an AI Coding Agent?
|
|
53
|
+
|
|
54
|
+
TanStack Table ships [TanStack Intent](https://github.com/TanStack/intent) skills inside each adapter package. After installing the library, run:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npx @tanstack/intent@latest install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
to add skill-loading guidance for your agent (Claude Code, Cursor, Copilot, etc.). The same CLI also exposes `intent list` to browse available skills and `intent load <skill>` to print one for inspection. Skills version with the library — your agent gets guidance that matches the version of `@tanstack/<framework>-table` you installed. Only available for v9 and above.
|
|
61
|
+
|
|
52
62
|
## Get Involved
|
|
53
63
|
|
|
54
64
|
- We welcome issues and pull requests!
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
function getCellPrototype(table) {
|
|
8
8
|
if (!table._cellPrototype) {
|
|
9
9
|
table._cellPrototype = { table };
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const features = Object.values(table._features);
|
|
11
|
+
for (let i = 0; i < features.length; i++) {
|
|
12
|
+
var _assignCellPrototype, _ref;
|
|
13
|
+
(_assignCellPrototype = (_ref = features[i]).assignCellPrototype) === null || _assignCellPrototype === void 0 || _assignCellPrototype.call(_ref, table._cellPrototype, table);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
return table._cellPrototype;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructCell.cjs","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructCell.cjs","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,OAAO;EAChC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,MAAM;;;CAGnE,OAAO,MAAM;;;;;;;AAQf,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,MAAM;CAC7C,MAAM,OAAO,OAAO,OAAO,cAAc;CAOzC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
function getCellPrototype(table) {
|
|
7
7
|
if (!table._cellPrototype) {
|
|
8
8
|
table._cellPrototype = { table };
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const features = Object.values(table._features);
|
|
10
|
+
for (let i = 0; i < features.length; i++) {
|
|
11
|
+
var _assignCellPrototype, _ref;
|
|
12
|
+
(_assignCellPrototype = (_ref = features[i]).assignCellPrototype) === null || _assignCellPrototype === void 0 || _assignCellPrototype.call(_ref, table._cellPrototype, table);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
return table._cellPrototype;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructCell.js","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructCell.js","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,OAAO;EAChC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,MAAM;;;CAGnE,OAAO,MAAM;;;;;;;AAQf,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,MAAM;CAC7C,MAAM,OAAO,OAAO,OAAO,cAAc;CAOzC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/core/cells/coreCellsFeature.utils.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Reads this cell's accessor value from its owning row and column.
|
|
5
5
|
*
|
|
6
|
-
* This is the
|
|
6
|
+
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
7
|
+
* importing static APIs instead of calling methods from the cell prototype.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```ts
|
|
@@ -14,26 +15,28 @@ function cell_getValue(cell) {
|
|
|
14
15
|
return cell.row.getValue(cell.column.id);
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* Reads the value that should be rendered for this cell.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
+
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
21
|
+
* matching the behavior of `cell.renderValue()`.
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
22
24
|
* ```ts
|
|
23
|
-
* const
|
|
25
|
+
* const rendered = cell_renderValue(cell)
|
|
24
26
|
* ```
|
|
25
27
|
*/
|
|
26
28
|
function cell_renderValue(cell) {
|
|
27
29
|
return cell.getValue() ?? cell.table.options.renderFallbackValue;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
|
-
*
|
|
32
|
+
* Builds the render context passed to a column's `cell` template.
|
|
31
33
|
*
|
|
32
|
-
*
|
|
34
|
+
* The returned object includes stable references to the table, row, column, and
|
|
35
|
+
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
33
36
|
*
|
|
34
37
|
* @example
|
|
35
38
|
* ```ts
|
|
36
|
-
* const
|
|
39
|
+
* const context = cell_getContext(cell)
|
|
37
40
|
* ```
|
|
38
41
|
*/
|
|
39
42
|
function cell_getContext(cell) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.utils.cjs","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"coreCellsFeature.utils.cjs","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,GAAG;;;;;;;;;;;;;AAc1C,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,UAAU,IAAI,KAAK,MAAM,QAAQ;;;;;;;;;;;;;AAc/C,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,UAAU;EAC/B,mBAAmB,KAAK,aAAa;EACtC"}
|
|
@@ -6,9 +6,10 @@ import { Table_Internal } from "../../types/Table.cjs";
|
|
|
6
6
|
import { Cell } from "../../types/Cell.cjs";
|
|
7
7
|
//#region src/core/cells/coreCellsFeature.utils.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Reads this cell's accessor value from its owning row and column.
|
|
10
10
|
*
|
|
11
|
-
* This is the
|
|
11
|
+
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
12
|
+
* importing static APIs instead of calling methods from the cell prototype.
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
@@ -17,24 +18,26 @@ import { Cell } from "../../types/Cell.cjs";
|
|
|
17
18
|
*/
|
|
18
19
|
declare function cell_getValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): TValue;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Reads the value that should be rendered for this cell.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
+
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
24
|
+
* matching the behavior of `cell.renderValue()`.
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
27
|
* ```ts
|
|
26
|
-
* const
|
|
28
|
+
* const rendered = cell_renderValue(cell)
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
31
|
declare function cell_renderValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): any;
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
33
|
+
* Builds the render context passed to a column's `cell` template.
|
|
32
34
|
*
|
|
33
|
-
*
|
|
35
|
+
* The returned object includes stable references to the table, row, column, and
|
|
36
|
+
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
34
37
|
*
|
|
35
38
|
* @example
|
|
36
39
|
* ```ts
|
|
37
|
-
* const
|
|
40
|
+
* const context = cell_getContext(cell)
|
|
38
41
|
* ```
|
|
39
42
|
*/
|
|
40
43
|
declare function cell_getContext<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): {
|
|
@@ -6,9 +6,10 @@ import { Table_Internal } from "../../types/Table.js";
|
|
|
6
6
|
import { Cell } from "../../types/Cell.js";
|
|
7
7
|
//#region src/core/cells/coreCellsFeature.utils.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Reads this cell's accessor value from its owning row and column.
|
|
10
10
|
*
|
|
11
|
-
* This is the
|
|
11
|
+
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
12
|
+
* importing static APIs instead of calling methods from the cell prototype.
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
@@ -17,24 +18,26 @@ import { Cell } from "../../types/Cell.js";
|
|
|
17
18
|
*/
|
|
18
19
|
declare function cell_getValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): TValue;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Reads the value that should be rendered for this cell.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
+
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
24
|
+
* matching the behavior of `cell.renderValue()`.
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
27
|
* ```ts
|
|
26
|
-
* const
|
|
28
|
+
* const rendered = cell_renderValue(cell)
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
31
|
declare function cell_renderValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): any;
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
33
|
+
* Builds the render context passed to a column's `cell` template.
|
|
32
34
|
*
|
|
33
|
-
*
|
|
35
|
+
* The returned object includes stable references to the table, row, column, and
|
|
36
|
+
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
34
37
|
*
|
|
35
38
|
* @example
|
|
36
39
|
* ```ts
|
|
37
|
-
* const
|
|
40
|
+
* const context = cell_getContext(cell)
|
|
38
41
|
* ```
|
|
39
42
|
*/
|
|
40
43
|
declare function cell_getContext<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
//#region src/core/cells/coreCellsFeature.utils.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Reads this cell's accessor value from its owning row and column.
|
|
4
4
|
*
|
|
5
|
-
* This is the
|
|
5
|
+
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
6
|
+
* importing static APIs instead of calling methods from the cell prototype.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* ```ts
|
|
@@ -13,26 +14,28 @@ function cell_getValue(cell) {
|
|
|
13
14
|
return cell.row.getValue(cell.column.id);
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Reads the value that should be rendered for this cell.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
+
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
20
|
+
* matching the behavior of `cell.renderValue()`.
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```ts
|
|
22
|
-
* const
|
|
24
|
+
* const rendered = cell_renderValue(cell)
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
27
|
function cell_renderValue(cell) {
|
|
26
28
|
return cell.getValue() ?? cell.table.options.renderFallbackValue;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* Builds the render context passed to a column's `cell` template.
|
|
30
32
|
*
|
|
31
|
-
*
|
|
33
|
+
* The returned object includes stable references to the table, row, column, and
|
|
34
|
+
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
32
35
|
*
|
|
33
36
|
* @example
|
|
34
37
|
* ```ts
|
|
35
|
-
* const
|
|
38
|
+
* const context = cell_getContext(cell)
|
|
36
39
|
* ```
|
|
37
40
|
*/
|
|
38
41
|
function cell_getContext(cell) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.utils.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"coreCellsFeature.utils.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,GAAG;;;;;;;;;;;;;AAc1C,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,UAAU,IAAI,KAAK,MAAM,QAAQ;;;;;;;;;;;;;AAc/C,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,UAAU;EAC/B,mBAAmB,KAAK,aAAa;EACtC"}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
function getColumnPrototype(table) {
|
|
8
8
|
if (!table._columnPrototype) {
|
|
9
9
|
table._columnPrototype = { table };
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const features = Object.values(table._features);
|
|
11
|
+
for (let i = 0; i < features.length; i++) {
|
|
12
|
+
var _assignColumnPrototyp, _ref;
|
|
13
|
+
(_assignColumnPrototyp = (_ref = features[i]).assignColumnPrototype) === null || _assignColumnPrototyp === void 0 || _assignColumnPrototyp.call(_ref, table._columnPrototype, table);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
return table._columnPrototype;
|
|
@@ -32,7 +33,8 @@ function constructColumn(table, columnDef, depth, parent) {
|
|
|
32
33
|
const keys = accessorKey.split(".");
|
|
33
34
|
accessorFn = (originalRow) => {
|
|
34
35
|
let result = originalRow;
|
|
35
|
-
for (
|
|
36
|
+
for (let i = 0; i < keys.length; i++) {
|
|
37
|
+
const key = keys[i];
|
|
36
38
|
result = result === null || result === void 0 ? void 0 : result[key];
|
|
37
39
|
if (process.env.NODE_ENV === "development" && result === void 0) console.warn(`"${key}" in deeply nested key "${accessorKey}" returned undefined.`);
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructColumn.cjs","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructColumn.cjs","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,OAAO;EAClC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,MAAM;;;CAGvE,OAAO,MAAM;;;;;;;AAQf,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,qBAGV;EAChB,GAAG;EACJ;CAED,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,IAAI,GAAG,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,IAAI,EAAE;EAC7B,MAAM,OAAO,YAAY,MAAM,IAAI;EACnC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,uBAC/C;;GAIL,OAAO;;QAGT,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,kEACL;EAEH,MAAM,IAAI,OAAO;;CAInB,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,EAAE;CACnB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,GAAG;CACzB,OAAO,SAAS;CAEhB,OAAO"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
function getColumnPrototype(table) {
|
|
7
7
|
if (!table._columnPrototype) {
|
|
8
8
|
table._columnPrototype = { table };
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const features = Object.values(table._features);
|
|
10
|
+
for (let i = 0; i < features.length; i++) {
|
|
11
|
+
var _assignColumnPrototyp, _ref;
|
|
12
|
+
(_assignColumnPrototyp = (_ref = features[i]).assignColumnPrototype) === null || _assignColumnPrototyp === void 0 || _assignColumnPrototyp.call(_ref, table._columnPrototype, table);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
return table._columnPrototype;
|
|
@@ -31,7 +32,8 @@ function constructColumn(table, columnDef, depth, parent) {
|
|
|
31
32
|
const keys = accessorKey.split(".");
|
|
32
33
|
accessorFn = (originalRow) => {
|
|
33
34
|
let result = originalRow;
|
|
34
|
-
for (
|
|
35
|
+
for (let i = 0; i < keys.length; i++) {
|
|
36
|
+
const key = keys[i];
|
|
35
37
|
result = result === null || result === void 0 ? void 0 : result[key];
|
|
36
38
|
if (process.env.NODE_ENV === "development" && result === void 0) console.warn(`"${key}" in deeply nested key "${accessorKey}" returned undefined.`);
|
|
37
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructColumn.js","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructColumn.js","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,OAAO;EAClC,MAAM,WAAW,OAAO,OAAO,MAAM,UAAU;EAC/C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,MAAM;;;CAGvE,OAAO,MAAM;;;;;;;AAQf,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,qBAGV;EAChB,GAAG;EACJ;CAED,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,IAAI,GAAG,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,IAAI,EAAE;EAC7B,MAAM,OAAO,YAAY,MAAM,IAAI;EACnC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,uBAC/C;;GAIL,OAAO;;QAGT,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,kEACL;EAEH,MAAM,IAAI,OAAO;;CAInB,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,EAAE;CACnB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,GAAG;CACzB,OAAO,SAAS;CAEhB,OAAO"}
|
|
@@ -40,11 +40,12 @@ interface Column_CoreProperties<TFeatures extends TableFeatures, TData extends R
|
|
|
40
40
|
}
|
|
41
41
|
interface Column_Column<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> extends Column_CoreProperties<TFeatures, TData, TValue> {
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Flattens this column and every descendant column into a single array.
|
|
44
44
|
*/
|
|
45
45
|
getFlatColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Collects the terminal leaf columns below this column, or the column itself
|
|
48
|
+
* when it has no children.
|
|
48
49
|
*/
|
|
49
50
|
getLeafColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
50
51
|
}
|
|
@@ -64,19 +65,19 @@ interface Table_Columns<TFeatures extends TableFeatures, TData extends RowData>
|
|
|
64
65
|
*/
|
|
65
66
|
getAllFlatColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>;
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
+
* Resolves built-in, feature-level, and user-defined default column options.
|
|
68
69
|
*/
|
|
69
70
|
getDefaultColumnDef: () => Partial<ColumnDef<TFeatures, TData, unknown>>;
|
|
70
71
|
/**
|
|
71
|
-
*
|
|
72
|
+
* Normalizes `options.columns` into the table's nested column hierarchy.
|
|
72
73
|
*/
|
|
73
74
|
getAllColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
+
* Flattens the nested column hierarchy, including parent/group columns.
|
|
76
77
|
*/
|
|
77
78
|
getAllFlatColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
+
* Collects all terminal leaf columns, excluding parent/group columns.
|
|
80
81
|
*/
|
|
81
82
|
getAllLeafColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
82
83
|
/**
|
|
@@ -40,11 +40,12 @@ interface Column_CoreProperties<TFeatures extends TableFeatures, TData extends R
|
|
|
40
40
|
}
|
|
41
41
|
interface Column_Column<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> extends Column_CoreProperties<TFeatures, TData, TValue> {
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Flattens this column and every descendant column into a single array.
|
|
44
44
|
*/
|
|
45
45
|
getFlatColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Collects the terminal leaf columns below this column, or the column itself
|
|
48
|
+
* when it has no children.
|
|
48
49
|
*/
|
|
49
50
|
getLeafColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
50
51
|
}
|
|
@@ -64,19 +65,19 @@ interface Table_Columns<TFeatures extends TableFeatures, TData extends RowData>
|
|
|
64
65
|
*/
|
|
65
66
|
getAllFlatColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>;
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
+
* Resolves built-in, feature-level, and user-defined default column options.
|
|
68
69
|
*/
|
|
69
70
|
getDefaultColumnDef: () => Partial<ColumnDef<TFeatures, TData, unknown>>;
|
|
70
71
|
/**
|
|
71
|
-
*
|
|
72
|
+
* Normalizes `options.columns` into the table's nested column hierarchy.
|
|
72
73
|
*/
|
|
73
74
|
getAllColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
+
* Flattens the nested column hierarchy, including parent/group columns.
|
|
76
77
|
*/
|
|
77
78
|
getAllFlatColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
+
* Collects all terminal leaf columns, excluding parent/group columns.
|
|
80
81
|
*/
|
|
81
82
|
getAllLeafColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
82
83
|
/**
|