@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
|
@@ -4,26 +4,28 @@ import { constructColumn } from "./constructColumn.js";
|
|
|
4
4
|
|
|
5
5
|
//#region src/core/columns/coreColumnsFeature.utils.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Flattens this column and every descendant column into a single array.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Group columns appear before their child columns, which matches the normalized
|
|
10
|
+
* column hierarchy produced during table construction.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
* ```ts
|
|
13
|
-
* const
|
|
14
|
+
* const flatColumns = column_getFlatColumns(column)
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
16
17
|
function column_getFlatColumns(column) {
|
|
17
18
|
return [column, ...column.columns.flatMap((col) => col.getFlatColumns())];
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Collects the terminal leaf columns below this column.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
+
* Group columns return their ordered descendants. Non-group columns return an
|
|
24
|
+
* array containing only the column itself.
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
27
|
* ```ts
|
|
26
|
-
* const
|
|
28
|
+
* const leafColumns = column_getLeafColumns(column)
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
31
|
function column_getLeafColumns(column) {
|
|
@@ -34,13 +36,15 @@ function column_getLeafColumns(column) {
|
|
|
34
36
|
return [column];
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* Merges built-in, feature, and user default column definitions.
|
|
38
40
|
*
|
|
39
|
-
*
|
|
41
|
+
* Built-in defaults provide a header and fallback cell renderer, feature
|
|
42
|
+
* defaults can add feature-specific column options, and
|
|
43
|
+
* `options.defaultColumn` wins last.
|
|
40
44
|
*
|
|
41
45
|
* @example
|
|
42
46
|
* ```ts
|
|
43
|
-
* const
|
|
47
|
+
* const defaultColumn = table_getDefaultColumnDef(table)
|
|
44
48
|
* ```
|
|
45
49
|
*/
|
|
46
50
|
function table_getDefaultColumnDef(table) {
|
|
@@ -63,13 +67,14 @@ function table_getDefaultColumnDef(table) {
|
|
|
63
67
|
};
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
66
|
-
*
|
|
70
|
+
* Normalizes `options.columns` into the table's nested column tree.
|
|
67
71
|
*
|
|
68
|
-
*
|
|
72
|
+
* Each column definition is constructed with its parent and depth, and group
|
|
73
|
+
* column children are recursively constructed.
|
|
69
74
|
*
|
|
70
75
|
* @example
|
|
71
76
|
* ```ts
|
|
72
|
-
* const
|
|
77
|
+
* const columns = table_getAllColumns(table)
|
|
73
78
|
* ```
|
|
74
79
|
*/
|
|
75
80
|
function table_getAllColumns(table) {
|
|
@@ -84,41 +89,48 @@ function table_getAllColumns(table) {
|
|
|
84
89
|
return recurseColumns(table.options.columns);
|
|
85
90
|
}
|
|
86
91
|
/**
|
|
87
|
-
*
|
|
92
|
+
* Flattens every table column, including group columns and leaf columns.
|
|
88
93
|
*
|
|
89
|
-
*
|
|
94
|
+
* Use this when parent/group columns must be included in addition to data leaf
|
|
95
|
+
* columns.
|
|
90
96
|
*
|
|
91
97
|
* @example
|
|
92
98
|
* ```ts
|
|
93
|
-
* const
|
|
99
|
+
* const flatColumns = table_getAllFlatColumns(table)
|
|
94
100
|
* ```
|
|
95
101
|
*/
|
|
96
102
|
function table_getAllFlatColumns(table) {
|
|
97
103
|
return table.getAllColumns().flatMap((column) => column.getFlatColumns());
|
|
98
104
|
}
|
|
99
105
|
/**
|
|
100
|
-
*
|
|
106
|
+
* Builds an id lookup for every flat column in the table.
|
|
101
107
|
*
|
|
102
|
-
*
|
|
108
|
+
* Group columns and leaf columns are included. Later columns with the same id
|
|
109
|
+
* replace earlier entries.
|
|
103
110
|
*
|
|
104
111
|
* @example
|
|
105
112
|
* ```ts
|
|
106
|
-
* const
|
|
113
|
+
* const columnsById = table_getAllFlatColumnsById(table)
|
|
107
114
|
* ```
|
|
108
115
|
*/
|
|
109
116
|
function table_getAllFlatColumnsById(table) {
|
|
110
117
|
const result = {};
|
|
111
|
-
|
|
118
|
+
const flatColumns = table.getAllFlatColumns();
|
|
119
|
+
for (let i = 0; i < flatColumns.length; i++) {
|
|
120
|
+
const column = flatColumns[i];
|
|
121
|
+
result[column.id] = column;
|
|
122
|
+
}
|
|
112
123
|
return result;
|
|
113
124
|
}
|
|
114
125
|
/**
|
|
115
|
-
*
|
|
126
|
+
* Collects all terminal leaf columns in their current table order.
|
|
116
127
|
*
|
|
117
|
-
*
|
|
128
|
+
* Column ordering features can reorder the collected leaves before the result
|
|
129
|
+
* is returned.
|
|
118
130
|
*
|
|
119
131
|
* @example
|
|
120
132
|
* ```ts
|
|
121
|
-
* const
|
|
133
|
+
* const leafColumns = table_getAllLeafColumns(table)
|
|
122
134
|
* ```
|
|
123
135
|
*/
|
|
124
136
|
function table_getAllLeafColumns(table) {
|
|
@@ -126,28 +138,34 @@ function table_getAllLeafColumns(table) {
|
|
|
126
138
|
return callMemoOrStaticFn(table, "getOrderColumns", table_getOrderColumnsFn)(leafColumns);
|
|
127
139
|
}
|
|
128
140
|
/**
|
|
129
|
-
*
|
|
141
|
+
* Builds an id lookup for terminal leaf columns only.
|
|
130
142
|
*
|
|
131
|
-
*
|
|
143
|
+
* Parent/group columns are excluded, making this lookup appropriate for row
|
|
144
|
+
* cells and feature state keyed by data columns.
|
|
132
145
|
*
|
|
133
146
|
* @example
|
|
134
147
|
* ```ts
|
|
135
|
-
* const
|
|
148
|
+
* const leavesById = table_getAllLeafColumnsById(table)
|
|
136
149
|
* ```
|
|
137
150
|
*/
|
|
138
151
|
function table_getAllLeafColumnsById(table) {
|
|
139
152
|
const result = {};
|
|
140
|
-
|
|
153
|
+
const leafColumns = table.getAllLeafColumns();
|
|
154
|
+
for (let i = 0; i < leafColumns.length; i++) {
|
|
155
|
+
const column = leafColumns[i];
|
|
156
|
+
result[column.id] = column;
|
|
157
|
+
}
|
|
141
158
|
return result;
|
|
142
159
|
}
|
|
143
160
|
/**
|
|
144
|
-
*
|
|
161
|
+
* Looks up a column by id from the flat column map.
|
|
145
162
|
*
|
|
146
|
-
*
|
|
163
|
+
* The lookup can return group columns or leaf columns. In development, a
|
|
164
|
+
* missing id logs a warning to help catch stale column references.
|
|
147
165
|
*
|
|
148
166
|
* @example
|
|
149
167
|
* ```ts
|
|
150
|
-
* const
|
|
168
|
+
* const column = table_getColumn(table, 'firstName')
|
|
151
169
|
* ```
|
|
152
170
|
*/
|
|
153
171
|
function table_getColumn(table, columnId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreColumnsFeature.utils.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"coreColumnsFeature.utils.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.utils.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { table_getOrderColumnsFn } from '../../features/column-ordering/columnOrderingFeature.utils'\nimport { constructColumn } from './constructColumn'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n ColumnDef,\n ColumnDefResolved,\n GroupColumnDef,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\n\n/**\n * Flattens this column and every descendant column into a single array.\n *\n * Group columns appear before their child columns, which matches the normalized\n * column hierarchy produced during table construction.\n *\n * @example\n * ```ts\n * const flatColumns = column_getFlatColumns(column)\n * ```\n */\nexport function column_getFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n return [column, ...column.columns.flatMap((col) => col.getFlatColumns())]\n}\n\n/**\n * Collects the terminal leaf columns below this column.\n *\n * Group columns return their ordered descendants. Non-group columns return an\n * array containing only the column itself.\n *\n * @example\n * ```ts\n * const leafColumns = column_getLeafColumns(column)\n * ```\n */\nexport function column_getLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n): Array<Column<TFeatures, TData, TValue>> {\n if (column.columns.length) {\n const leafColumns = column.columns.flatMap(\n (col) => col.getLeafColumns(), // recursive\n )\n\n return callMemoOrStaticFn(\n column.table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns as any) as any\n }\n\n return [column]\n}\n\n/**\n * Merges built-in, feature, and user default column definitions.\n *\n * Built-in defaults provide a header and fallback cell renderer, feature\n * defaults can add feature-specific column options, and\n * `options.defaultColumn` wins last.\n *\n * @example\n * ```ts\n * const defaultColumn = table_getDefaultColumnDef(table)\n * ```\n */\nexport function table_getDefaultColumnDef<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Partial<ColumnDef<TFeatures, TData, unknown>> {\n return {\n header: (props) => {\n const resolvedColumnDef = props.header.column\n .columnDef as ColumnDefResolved<{}, TData>\n\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey\n }\n\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id\n }\n\n return null\n },\n cell: (props) => props.renderValue<any>()?.toString?.() ?? null,\n ...Object.values(table._features).reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef?.())\n }, {}),\n ...table.options.defaultColumn,\n } as Partial<ColumnDef<TFeatures, TData, unknown>>\n}\n\n/**\n * Normalizes `options.columns` into the table's nested column tree.\n *\n * Each column definition is constructed with its parent and depth, and group\n * column children are recursively constructed.\n *\n * @example\n * ```ts\n * const columns = table_getAllColumns(table)\n * ```\n */\nexport function table_getAllColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const recurseColumns = (\n colDefs: ReadonlyArray<ColumnDef<TFeatures, TData, unknown>>,\n parent?: Column<TFeatures, TData, unknown>,\n depth = 0,\n ): Array<Column<TFeatures, TData, unknown>> => {\n return colDefs.map((columnDef) => {\n const column = constructColumn(table, columnDef, depth, parent)\n\n const groupingColumnDef = columnDef as GroupColumnDef<\n TFeatures,\n TData,\n unknown\n >\n\n column.columns = groupingColumnDef.columns\n ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n : []\n\n return column\n })\n }\n\n return recurseColumns(table.options.columns)\n}\n\n/**\n * Flattens every table column, including group columns and leaf columns.\n *\n * Use this when parent/group columns must be included in addition to data leaf\n * columns.\n *\n * @example\n * ```ts\n * const flatColumns = table_getAllFlatColumns(table)\n * ```\n */\nexport function table_getAllFlatColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n return table.getAllColumns().flatMap((column) => column.getFlatColumns())\n}\n\n/**\n * Builds an id lookup for every flat column in the table.\n *\n * Group columns and leaf columns are included. Later columns with the same id\n * replace earlier entries.\n *\n * @example\n * ```ts\n * const columnsById = table_getAllFlatColumnsById(table)\n * ```\n */\nexport function table_getAllFlatColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const flatColumns = table.getAllFlatColumns()\n for (let i = 0; i < flatColumns.length; i++) {\n const column = flatColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Collects all terminal leaf columns in their current table order.\n *\n * Column ordering features can reorder the collected leaves before the result\n * is returned.\n *\n * @example\n * ```ts\n * const leafColumns = table_getAllLeafColumns(table)\n * ```\n */\nexport function table_getAllLeafColumns<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Array<Column<TFeatures, TData, unknown>> {\n const leafColumns = table.getAllColumns().flatMap(\n (c) => c.getLeafColumns(), // recursive\n )\n return callMemoOrStaticFn(\n table,\n 'getOrderColumns',\n table_getOrderColumnsFn,\n )(leafColumns)\n}\n\n/**\n * Builds an id lookup for terminal leaf columns only.\n *\n * Parent/group columns are excluded, making this lookup appropriate for row\n * cells and feature state keyed by data columns.\n *\n * @example\n * ```ts\n * const leavesById = table_getAllLeafColumnsById(table)\n * ```\n */\nexport function table_getAllLeafColumnsById<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n): Record<string, Column<TFeatures, TData, unknown>> {\n const result: Record<string, Column<TFeatures, TData, unknown>> = {}\n const leafColumns = table.getAllLeafColumns()\n for (let i = 0; i < leafColumns.length; i++) {\n const column = leafColumns[i]!\n result[column.id] = column\n }\n return result\n}\n\n/**\n * Looks up a column by id from the flat column map.\n *\n * The lookup can return group columns or leaf columns. In development, a\n * missing id logs a warning to help catch stale column references.\n *\n * @example\n * ```ts\n * const column = table_getColumn(table, 'firstName')\n * ```\n */\nexport function table_getColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n): Column<TFeatures, TData, unknown> | undefined {\n const column = table.getAllFlatColumnsById()[columnId]\n\n if (process.env.NODE_ENV === 'development' && !column) {\n console.warn(`[Table] Column with id '${columnId}' does not exist.`)\n }\n\n return column\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAgB,sBAKd,QACyC;CACzC,OAAO,CAAC,QAAQ,GAAG,OAAO,QAAQ,SAAS,QAAQ,IAAI,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;AAc3E,SAAgB,sBAKd,QACyC;CACzC,IAAI,OAAO,QAAQ,QAAQ;EACzB,MAAM,cAAc,OAAO,QAAQ,SAChC,QAAQ,IAAI,gBAAgB,CAC9B;EAED,OAAO,mBACL,OAAO,OACP,mBACA,wBACD,CAAC,YAAmB;;CAGvB,OAAO,CAAC,OAAO;;;;;;;;;;;;;;AAejB,SAAgB,0BAId,OAC+C;CAC/C,OAAO;EACL,SAAS,UAAU;GACjB,MAAM,oBAAoB,MAAM,OAAO,OACpC;GAEH,IAAI,kBAAkB,aACpB,OAAO,kBAAkB;GAG3B,IAAI,kBAAkB,YACpB,OAAO,kBAAkB;GAG3B,OAAO;;EAET,OAAO,UAAU;;uCAAM,aAAkB,2FAAE,gHAAY,KAAI;;EAC3D,GAAG,OAAO,OAAO,MAAM,UAAU,CAAC,QAAQ,KAAK,YAAY;;GACzD,OAAO,OAAO,OAAO,8BAAK,QAAQ,gHAAuB,CAAC;KACzD,EAAE,CAAC;EACN,GAAG,MAAM,QAAQ;EAClB;;;;;;;;;;;;;AAcH,SAAgB,oBAId,OAC0C;CAC1C,MAAM,kBACJ,SACA,QACA,QAAQ,MACqC;EAC7C,OAAO,QAAQ,KAAK,cAAc;GAChC,MAAM,SAAS,gBAAgB,OAAO,WAAW,OAAO,OAAO;GAE/D,MAAM,oBAAoB;GAM1B,OAAO,UAAU,kBAAkB,UAC/B,eAAe,kBAAkB,SAAS,QAAQ,QAAQ,EAAE,GAC5D,EAAE;GAEN,OAAO;IACP;;CAGJ,OAAO,eAAe,MAAM,QAAQ,QAAQ;;;;;;;;;;;;;AAc9C,SAAgB,wBAId,OAC0C;CAC1C,OAAO,MAAM,eAAe,CAAC,SAAS,WAAW,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;AAc3E,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,EAAE;CACpE,MAAM,cAAc,MAAM,mBAAmB;CAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,wBAId,OAC0C;CAC1C,MAAM,cAAc,MAAM,eAAe,CAAC,SACvC,MAAM,EAAE,gBAAgB,CAC1B;CACD,OAAO,mBACL,OACA,mBACA,wBACD,CAAC,YAAY;;;;;;;;;;;;;AAchB,SAAgB,4BAId,OACmD;CACnD,MAAM,SAA4D,EAAE;CACpE,MAAM,cAAc,MAAM,mBAAmB;CAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,QAAQ,KAAK;EAC3C,MAAM,SAAS,YAAY;EAC3B,OAAO,OAAO,MAAM;;CAEtB,OAAO;;;;;;;;;;;;;AAcT,SAAgB,gBAId,OACA,UAC+C;CAC/C,MAAM,SAAS,MAAM,uBAAuB,CAAC;CAE7C,IAAI,QAAQ,IAAI,aAAa,iBAAiB,CAAC,QAC7C,QAAQ,KAAK,2BAA2B,SAAS,mBAAmB;CAGtE,OAAO"}
|
|
@@ -13,9 +13,12 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
|
13
13
|
let maxDepth = 0;
|
|
14
14
|
const findMaxDepth = (columns, depth = 1) => {
|
|
15
15
|
maxDepth = Math.max(maxDepth, depth);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
for (let i = 0; i < columns.length; i++) {
|
|
17
|
+
const column = columns[i];
|
|
18
|
+
if (require_utils.callMemoOrStaticFn(column, "getIsVisible", require_columnVisibilityFeature_utils.column_getIsVisible)) {
|
|
19
|
+
if (column.columns.length) findMaxDepth(column.columns, depth + 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
19
22
|
};
|
|
20
23
|
findMaxDepth(allColumns);
|
|
21
24
|
const headerGroups = [];
|
|
@@ -65,26 +68,31 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
|
65
68
|
})), maxDepth - 1);
|
|
66
69
|
headerGroups.reverse();
|
|
67
70
|
const recurseHeadersForSpans = (headers) => {
|
|
68
|
-
|
|
71
|
+
const results = [];
|
|
72
|
+
for (let i = 0; i < headers.length; i++) {
|
|
73
|
+
const header = headers[i];
|
|
74
|
+
if (!require_utils.callMemoOrStaticFn(header.column, "getIsVisible", require_columnVisibilityFeature_utils.column_getIsVisible)) continue;
|
|
69
75
|
let colSpan = 0;
|
|
70
|
-
let
|
|
71
|
-
let childRowSpans = [0];
|
|
76
|
+
let minChildRowSpan = Infinity;
|
|
72
77
|
if (header.subHeaders.length) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
const childSpans = recurseHeadersForSpans(header.subHeaders);
|
|
79
|
+
for (let j = 0; j < childSpans.length; j++) {
|
|
80
|
+
const child = childSpans[j];
|
|
81
|
+
colSpan += child.colSpan;
|
|
82
|
+
if (child.rowSpan < minChildRowSpan) minChildRowSpan = child.rowSpan;
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
colSpan = 1;
|
|
86
|
+
minChildRowSpan = 0;
|
|
87
|
+
}
|
|
81
88
|
header.colSpan = colSpan;
|
|
82
|
-
header.rowSpan =
|
|
83
|
-
|
|
89
|
+
header.rowSpan = minChildRowSpan;
|
|
90
|
+
results.push({
|
|
84
91
|
colSpan,
|
|
85
|
-
rowSpan
|
|
86
|
-
};
|
|
87
|
-
}
|
|
92
|
+
rowSpan: header.rowSpan
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return results;
|
|
88
96
|
};
|
|
89
97
|
recurseHeadersForSpans(((_headerGroups$ = headerGroups[0]) === null || _headerGroups$ === void 0 ? void 0 : _headerGroups$.headers) ?? []);
|
|
90
98
|
return headerGroups;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildHeaderGroups.cjs","names":["callMemoOrStaticFn","column_getIsVisible","constructHeader"],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n columns\n
|
|
1
|
+
{"version":3,"file":"buildHeaderGroups.cjs","names":["callMemoOrStaticFn","column_getIsVisible","constructHeader"],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,MAAM;EAEpC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAIA,iCAAmB,QAAQ,gBAAgBC,0DAAoB,EACjE;QAAI,OAAO,QAAQ,QACjB,aAAa,OAAO,SAAS,QAAQ,EAAE;;;;CAM/C,aAAa,WAAW;CAExB,MAAM,eAAqD,EAAE;CAE7D,MAAM,wBACJ,gBACA,UACG;EAEH,MAAM,cAA6C;GACjD;GACA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GACxD,SAAS,EAAE;GACZ;EAGD,MAAM,uBAAgE,EAAE;EAGxE,eAAe,SAAS,kBAAkB;GAGxC,MAAM,4BACJ,qBAAqB,qBAAqB,SAAS;GAErD,MAAM,eAAe,cAAc,OAAO,UAAU,YAAY;GAEhE,IAAI;GACJ,IAAI,gBAAgB;GAEpB,IAAI,gBAAgB,cAAc,OAAO,QAEvC,SAAS,cAAc,OAAO;QACzB;IAEL,SAAS,cAAc;IACvB,gBAAgB;;GAGlB,IACE,6BACA,0BAA0B,WAAW,QAGrC,0BAA0B,WAAW,KAAK,cAAc;QACnD;IAEL,MAAM,SAASC,wCAAgB,OAAO,QAAQ;KAC5C,IAAI;MAAC;MAAc;MAAO,OAAO;MAAI,cAAc;MAAG,CACnD,OAAO,QAAQ,CACf,KAAK,IAAI;KACZ;KACA,eAAe,gBACX,GAAG,qBAAqB,QAAQ,MAAM,EAAE,WAAW,OAAO,CAAC,WAC3D;KACJ;KACA,OAAO,qBAAqB;KAC7B,CAAC;IAGF,OAAO,WAAW,KAAK,cAAc;IAGrC,qBAAqB,KAAK,OAAO;;GAGnC,YAAY,QAAQ,KAAK,cAAc;GACvC,cAAc,cAAc;IAC5B;EAEF,aAAa,KAAK,YAAY;EAE9B,IAAI,QAAQ,GACV,qBAAqB,sBAAsB,QAAQ,EAAE;;CAWzD,qBAPsB,eAAe,KAAK,QAAQ,UAChDA,wCAAgB,OAAO,QAAQ;EAC7B,OAAO;EACP;EACD,CAAC,CAG8B,EAAE,WAAW,EAAE;CAEjD,aAAa,SAAS;CAEtB,MAAM,0BACJ,YACgD;EAChD,MAAM,UAAuD,EAAE;EAE/D,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IACE,CAACF,iCAAmB,OAAO,QAAQ,gBAAgBC,0DAAoB,EAEvE;GAGF,IAAI,UAAU;GACd,IAAI,kBAAkB;GAEtB,IAAI,OAAO,WAAW,QAAQ;IAC5B,MAAM,aAAa,uBAAuB,OAAO,WAAW;IAC5D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;KAC1C,MAAM,QAAQ,WAAW;KACzB,WAAW,MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;;UAGvB;IACL,UAAU;IACV,kBAAkB;;GAGpB,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;IAAS,CAAC;;EAGpD,OAAO;;CAGT,0CACG,aAAa,oEAAI,YAAW,EAAE,CAChC;CAED,OAAO"}
|
|
@@ -13,9 +13,12 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
|
13
13
|
let maxDepth = 0;
|
|
14
14
|
const findMaxDepth = (columns, depth = 1) => {
|
|
15
15
|
maxDepth = Math.max(maxDepth, depth);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
for (let i = 0; i < columns.length; i++) {
|
|
17
|
+
const column = columns[i];
|
|
18
|
+
if (callMemoOrStaticFn(column, "getIsVisible", column_getIsVisible)) {
|
|
19
|
+
if (column.columns.length) findMaxDepth(column.columns, depth + 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
19
22
|
};
|
|
20
23
|
findMaxDepth(allColumns);
|
|
21
24
|
const headerGroups = [];
|
|
@@ -65,26 +68,31 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
|
65
68
|
})), maxDepth - 1);
|
|
66
69
|
headerGroups.reverse();
|
|
67
70
|
const recurseHeadersForSpans = (headers) => {
|
|
68
|
-
|
|
71
|
+
const results = [];
|
|
72
|
+
for (let i = 0; i < headers.length; i++) {
|
|
73
|
+
const header = headers[i];
|
|
74
|
+
if (!callMemoOrStaticFn(header.column, "getIsVisible", column_getIsVisible)) continue;
|
|
69
75
|
let colSpan = 0;
|
|
70
|
-
let
|
|
71
|
-
let childRowSpans = [0];
|
|
76
|
+
let minChildRowSpan = Infinity;
|
|
72
77
|
if (header.subHeaders.length) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
const childSpans = recurseHeadersForSpans(header.subHeaders);
|
|
79
|
+
for (let j = 0; j < childSpans.length; j++) {
|
|
80
|
+
const child = childSpans[j];
|
|
81
|
+
colSpan += child.colSpan;
|
|
82
|
+
if (child.rowSpan < minChildRowSpan) minChildRowSpan = child.rowSpan;
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
colSpan = 1;
|
|
86
|
+
minChildRowSpan = 0;
|
|
87
|
+
}
|
|
81
88
|
header.colSpan = colSpan;
|
|
82
|
-
header.rowSpan =
|
|
83
|
-
|
|
89
|
+
header.rowSpan = minChildRowSpan;
|
|
90
|
+
results.push({
|
|
84
91
|
colSpan,
|
|
85
|
-
rowSpan
|
|
86
|
-
};
|
|
87
|
-
}
|
|
92
|
+
rowSpan: header.rowSpan
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return results;
|
|
88
96
|
};
|
|
89
97
|
recurseHeadersForSpans(((_headerGroups$ = headerGroups[0]) === null || _headerGroups$ === void 0 ? void 0 : _headerGroups$.headers) ?? []);
|
|
90
98
|
return headerGroups;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildHeaderGroups.js","names":[],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n columns\n
|
|
1
|
+
{"version":3,"file":"buildHeaderGroups.js","names":[],"sources":["../../../src/core/headers/buildHeaderGroups.ts"],"sourcesContent":["import { callMemoOrStaticFn } from '../../utils'\nimport { column_getIsVisible } from '../../features/column-visibility/columnVisibilityFeature.utils'\nimport { constructHeader } from './constructHeader'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Header } from '../../types/Header'\nimport type { HeaderGroup } from '../../types/HeaderGroup'\nimport type { Column } from '../../types/Column'\n\n/**\n * Builds the nested header group structure for a table.\n *\n * The result accounts for visible leaf columns, pinned column groups, and placeholder headers needed to render multi-level headers.\n */\nexport function buildHeaderGroups<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n allColumns: Array<Column<TFeatures, TData, TValue>>,\n columnsToGroup: Array<Column<TFeatures, TData, TValue>>,\n table: Table_Internal<TFeatures, TData>,\n headerFamily?: 'center' | 'left' | 'right',\n) {\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0\n\n const findMaxDepth = (\n columns: Array<Column<TFeatures, TData, TValue>>,\n depth = 1,\n ) => {\n maxDepth = Math.max(maxDepth, depth)\n\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i]!\n if (callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)) {\n if (column.columns.length) {\n findMaxDepth(column.columns, depth + 1)\n }\n }\n }\n }\n\n findMaxDepth(allColumns)\n\n const headerGroups: Array<HeaderGroup<TFeatures, TData>> = []\n\n const constructHeaderGroup = (\n headersToGroup: Array<Header<TFeatures, TData, TValue>>,\n depth: number,\n ) => {\n // The header group we are creating\n const headerGroup: HeaderGroup<TFeatures, TData> = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: [],\n } as any\n\n // The parent columns we're going to scan next\n const pendingParentHeaders: Array<Header<TFeatures, TData, TValue>> = []\n\n // Scan each column for parents\n headersToGroup.forEach((headerToGroup) => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader =\n pendingParentHeaders[pendingParentHeaders.length - 1]\n\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n let column: Column<TFeatures, TData, TValue>\n let isPlaceholder = false\n\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent\n } else {\n // The parent header is repeated\n column = headerToGroup.column\n isPlaceholder = true\n }\n\n if (\n latestPendingParentHeader &&\n latestPendingParentHeader.column === column\n ) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup)\n } else {\n // This is a new header. Let's create it\n const header = constructHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup.id]\n .filter(Boolean)\n .join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder\n ? `${pendingParentHeaders.filter((d) => d.column === column).length}`\n : undefined,\n depth,\n index: pendingParentHeaders.length,\n })\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup)\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header)\n }\n\n headerGroup.headers.push(headerToGroup)\n headerToGroup.headerGroup = headerGroup\n })\n\n headerGroups.push(headerGroup)\n\n if (depth > 0) {\n constructHeaderGroup(pendingParentHeaders, depth - 1)\n }\n }\n\n const bottomHeaders = columnsToGroup.map((column, index) =>\n constructHeader(table, column, {\n depth: maxDepth,\n index,\n }),\n )\n\n constructHeaderGroup(bottomHeaders, maxDepth - 1)\n\n headerGroups.reverse()\n\n const recurseHeadersForSpans = (\n headers: Array<Header<TFeatures, TData, TValue>>,\n ): Array<{ colSpan: number; rowSpan: number }> => {\n const results: Array<{ colSpan: number; rowSpan: number }> = []\n\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n if (\n !callMemoOrStaticFn(header.column, 'getIsVisible', column_getIsVisible)\n ) {\n continue\n }\n\n let colSpan = 0\n let minChildRowSpan = Infinity\n\n if (header.subHeaders.length) {\n const childSpans = recurseHeadersForSpans(header.subHeaders)\n for (let j = 0; j < childSpans.length; j++) {\n const child = childSpans[j]!\n colSpan += child.colSpan\n if (child.rowSpan < minChildRowSpan) {\n minChildRowSpan = child.rowSpan\n }\n }\n } else {\n colSpan = 1\n minChildRowSpan = 0\n }\n\n header.colSpan = colSpan\n header.rowSpan = minChildRowSpan\n\n results.push({ colSpan, rowSpan: header.rowSpan })\n }\n\n return results\n }\n\n recurseHeadersForSpans(\n (headerGroups[0]?.headers ?? []) as Array<Header<TFeatures, TData, TValue>>,\n )\n\n return headerGroups\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,kBAKd,YACA,gBACA,OACA,cACA;;CAOA,IAAI,WAAW;CAEf,MAAM,gBACJ,SACA,QAAQ,MACL;EACH,WAAW,KAAK,IAAI,UAAU,MAAM;EAEpC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IAAI,mBAAmB,QAAQ,gBAAgB,oBAAoB,EACjE;QAAI,OAAO,QAAQ,QACjB,aAAa,OAAO,SAAS,QAAQ,EAAE;;;;CAM/C,aAAa,WAAW;CAExB,MAAM,eAAqD,EAAE;CAE7D,MAAM,wBACJ,gBACA,UACG;EAEH,MAAM,cAA6C;GACjD;GACA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GACxD,SAAS,EAAE;GACZ;EAGD,MAAM,uBAAgE,EAAE;EAGxE,eAAe,SAAS,kBAAkB;GAGxC,MAAM,4BACJ,qBAAqB,qBAAqB,SAAS;GAErD,MAAM,eAAe,cAAc,OAAO,UAAU,YAAY;GAEhE,IAAI;GACJ,IAAI,gBAAgB;GAEpB,IAAI,gBAAgB,cAAc,OAAO,QAEvC,SAAS,cAAc,OAAO;QACzB;IAEL,SAAS,cAAc;IACvB,gBAAgB;;GAGlB,IACE,6BACA,0BAA0B,WAAW,QAGrC,0BAA0B,WAAW,KAAK,cAAc;QACnD;IAEL,MAAM,SAAS,gBAAgB,OAAO,QAAQ;KAC5C,IAAI;MAAC;MAAc;MAAO,OAAO;MAAI,cAAc;MAAG,CACnD,OAAO,QAAQ,CACf,KAAK,IAAI;KACZ;KACA,eAAe,gBACX,GAAG,qBAAqB,QAAQ,MAAM,EAAE,WAAW,OAAO,CAAC,WAC3D;KACJ;KACA,OAAO,qBAAqB;KAC7B,CAAC;IAGF,OAAO,WAAW,KAAK,cAAc;IAGrC,qBAAqB,KAAK,OAAO;;GAGnC,YAAY,QAAQ,KAAK,cAAc;GACvC,cAAc,cAAc;IAC5B;EAEF,aAAa,KAAK,YAAY;EAE9B,IAAI,QAAQ,GACV,qBAAqB,sBAAsB,QAAQ,EAAE;;CAWzD,qBAPsB,eAAe,KAAK,QAAQ,UAChD,gBAAgB,OAAO,QAAQ;EAC7B,OAAO;EACP;EACD,CAAC,CAG8B,EAAE,WAAW,EAAE;CAEjD,aAAa,SAAS;CAEtB,MAAM,0BACJ,YACgD;EAChD,MAAM,UAAuD,EAAE;EAE/D,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;GACvB,IACE,CAAC,mBAAmB,OAAO,QAAQ,gBAAgB,oBAAoB,EAEvE;GAGF,IAAI,UAAU;GACd,IAAI,kBAAkB;GAEtB,IAAI,OAAO,WAAW,QAAQ;IAC5B,MAAM,aAAa,uBAAuB,OAAO,WAAW;IAC5D,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;KAC1C,MAAM,QAAQ,WAAW;KACzB,WAAW,MAAM;KACjB,IAAI,MAAM,UAAU,iBAClB,kBAAkB,MAAM;;UAGvB;IACL,UAAU;IACV,kBAAkB;;GAGpB,OAAO,UAAU;GACjB,OAAO,UAAU;GAEjB,QAAQ,KAAK;IAAE;IAAS,SAAS,OAAO;IAAS,CAAC;;EAGpD,OAAO;;CAGT,0CACG,aAAa,oEAAI,YAAW,EAAE,CAChC;CAED,OAAO"}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
function getHeaderPrototype(table) {
|
|
8
8
|
if (!table._headerPrototype) {
|
|
9
9
|
table._headerPrototype = { table };
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const features = Object.values(table._features);
|
|
11
|
+
for (let i = 0; i < features.length; i++) {
|
|
12
|
+
var _assignHeaderPrototyp, _ref;
|
|
13
|
+
(_assignHeaderPrototyp = (_ref = features[i]).assignHeaderPrototype) === null || _assignHeaderPrototyp === void 0 || _assignHeaderPrototyp.call(_ref, table._headerPrototype, table);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
return table._headerPrototype;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructHeader.cjs","names":[],"sources":["../../../src/core/headers/constructHeader.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 { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructHeader.cjs","names":[],"sources":["../../../src/core/headers/constructHeader.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 { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAWA,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,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,EAAE;CAEtB,OAAO"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
function getHeaderPrototype(table) {
|
|
7
7
|
if (!table._headerPrototype) {
|
|
8
8
|
table._headerPrototype = { table };
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const features = Object.values(table._features);
|
|
10
|
+
for (let i = 0; i < features.length; i++) {
|
|
11
|
+
var _assignHeaderPrototyp, _ref;
|
|
12
|
+
(_assignHeaderPrototyp = (_ref = features[i]).assignHeaderPrototype) === null || _assignHeaderPrototyp === void 0 || _assignHeaderPrototyp.call(_ref, table._headerPrototype, table);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
return table._headerPrototype;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructHeader.js","names":[],"sources":["../../../src/core/headers/constructHeader.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 { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n
|
|
1
|
+
{"version":3,"file":"constructHeader.js","names":[],"sources":["../../../src/core/headers/constructHeader.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 { Header } from '../../types/Header'\nimport type { Column } from '../../types/Column'\nimport type { Header_CoreProperties } from './coreHeadersFeature.types'\n\n/**\n * Creates or retrieves the header prototype for a table.\n * The prototype is cached on the table and shared by all header instances.\n */\nfunction getHeaderPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._headerPrototype) {\n table._headerPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignHeaderPrototype?.(table._headerPrototype, table)\n }\n }\n return table._headerPrototype\n}\n\n/**\n * Constructs a header 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 constructHeader<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n column: Column<TFeatures, TData, TValue>,\n options: {\n id?: string\n isPlaceholder?: boolean\n placeholderId?: string\n index: number\n depth: number\n },\n): Header<TFeatures, TData, TValue> {\n // Create header with shared prototype for memory efficiency\n const headerPrototype = getHeaderPrototype(table)\n const header = Object.create(headerPrototype) as Header_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n header.colSpan = 0\n header.column = column\n header.depth = options.depth\n header.headerGroup = null\n header.id = options.id ?? column.id\n header.index = options.index\n header.isPlaceholder = !!options.isPlaceholder\n header.placeholderId = options.placeholderId\n header.rowSpan = 0\n header.subHeaders = []\n\n return header as Header<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAWA,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,QACA,SAOkC;CAElC,MAAM,kBAAkB,mBAAmB,MAAM;CACjD,MAAM,SAAS,OAAO,OAAO,gBAAgB;CAO7C,OAAO,UAAU;CACjB,OAAO,SAAS;CAChB,OAAO,QAAQ,QAAQ;CACvB,OAAO,cAAc;CACrB,OAAO,KAAK,QAAQ,MAAM,OAAO;CACjC,OAAO,QAAQ,QAAQ;CACvB,OAAO,gBAAgB,CAAC,CAAC,QAAQ;CACjC,OAAO,gBAAgB,QAAQ;CAC/B,OAAO,UAAU;CACjB,OAAO,aAAa,EAAE;CAEtB,OAAO"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_columnPinningFeature_utils = require('../../features/column-pinning/columnPinningFeature.utils.cjs');
|
|
3
2
|
const require_coreHeadersFeature_utils = require('./coreHeadersFeature.utils.cjs');
|
|
4
3
|
|
|
5
4
|
//#region src/core/headers/coreHeadersFeature.ts
|
|
@@ -48,11 +47,7 @@ function constructCoreHeadersFeature() {
|
|
|
48
47
|
},
|
|
49
48
|
table_getLeafHeaders: {
|
|
50
49
|
fn: () => require_coreHeadersFeature_utils.table_getLeafHeaders(table),
|
|
51
|
-
memoDeps: () => [
|
|
52
|
-
require_utils.callMemoOrStaticFn(table, "getLeftHeaderGroups", require_columnPinningFeature_utils.table_getLeftHeaderGroups),
|
|
53
|
-
require_utils.callMemoOrStaticFn(table, "getCenterHeaderGroups", require_columnPinningFeature_utils.table_getCenterHeaderGroups),
|
|
54
|
-
require_utils.callMemoOrStaticFn(table, "getRightHeaderGroups", require_columnPinningFeature_utils.table_getRightHeaderGroups)
|
|
55
|
-
]
|
|
50
|
+
memoDeps: () => [table.getHeaderGroups()]
|
|
56
51
|
}
|
|
57
52
|
});
|
|
58
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreHeadersFeature.cjs","names":["header_getLeafHeaders","header_getContext","table_getHeaderGroups","table_getFooterGroups","table_getFlatHeaders","table_getLeafHeaders"
|
|
1
|
+
{"version":3,"file":"coreHeadersFeature.cjs","names":["header_getLeafHeaders","header_getContext","table_getHeaderGroups","table_getFooterGroups","table_getFlatHeaders","table_getLeafHeaders"],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,kCAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAWA,uDAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACD,mBAAmB;KACjB,KAAK,WAAWC,mDAAkB,OAAO;KACzC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,8BAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAUC,uDAAsB,MAAM;KACtC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;gCAC3B,MAAM,MAAM,6FAAe,KAAK;gCAChC,MAAM,MAAM,gGAAkB,KAAK;OACnC,MAAM,QAAQ;OACf;;KACF;IACD,uBAAuB;KACrB,UAAUC,uDAAsB,MAAM;KACtC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAUC,sDAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAUC,sDAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { assignPrototypeAPIs, assignTableAPIs
|
|
2
|
-
import { table_getCenterHeaderGroups, table_getLeftHeaderGroups, table_getRightHeaderGroups } from "../../features/column-pinning/columnPinningFeature.utils.js";
|
|
1
|
+
import { assignPrototypeAPIs, assignTableAPIs } from "../../utils.js";
|
|
3
2
|
import { header_getContext, header_getLeafHeaders, table_getFlatHeaders, table_getFooterGroups, table_getHeaderGroups, table_getLeafHeaders } from "./coreHeadersFeature.utils.js";
|
|
4
3
|
|
|
5
4
|
//#region src/core/headers/coreHeadersFeature.ts
|
|
@@ -48,11 +47,7 @@ function constructCoreHeadersFeature() {
|
|
|
48
47
|
},
|
|
49
48
|
table_getLeafHeaders: {
|
|
50
49
|
fn: () => table_getLeafHeaders(table),
|
|
51
|
-
memoDeps: () => [
|
|
52
|
-
callMemoOrStaticFn(table, "getLeftHeaderGroups", table_getLeftHeaderGroups),
|
|
53
|
-
callMemoOrStaticFn(table, "getCenterHeaderGroups", table_getCenterHeaderGroups),
|
|
54
|
-
callMemoOrStaticFn(table, "getRightHeaderGroups", table_getRightHeaderGroups)
|
|
55
|
-
]
|
|
50
|
+
memoDeps: () => [table.getHeaderGroups()]
|
|
56
51
|
}
|
|
57
52
|
});
|
|
58
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreHeadersFeature.js","names":[],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"coreHeadersFeature.js","names":[],"sources":["../../../src/core/headers/coreHeadersFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n header_getContext,\n header_getLeafHeaders,\n table_getFlatHeaders,\n table_getFooterGroups,\n table_getHeaderGroups,\n table_getLeafHeaders,\n} from './coreHeadersFeature.utils'\nimport type { RowData } from '../../types/type-utils'\nimport type { TableFeature, TableFeatures } from '../../types/TableFeatures'\n// import type { Header_Header, Table_Headers } from './coreHeadersFeature.types'\n\nexport interface CoreHeadersFeatureConstructors<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> {\n // Header: Header_Header<TFeatures, TData>\n // Table: Table_Headers<TFeatures, TData>\n}\n\n/**\n * Creates the stock core headers feature.\n *\n * The returned feature registers its state defaults, option defaults, and instance APIs so it can be included in a `tableFeatures({ ... })` call.\n */\nexport function constructCoreHeadersFeature<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(): TableFeature<CoreHeadersFeatureConstructors<TFeatures, TData>> {\n return {\n assignHeaderPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreHeadersFeature', prototype, table, {\n header_getLeafHeaders: {\n fn: (header) => header_getLeafHeaders(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n header_getContext: {\n fn: (header) => header_getContext(header),\n memoDeps: (header) => [header.column.table.options.columns],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreHeadersFeature', table, {\n table_getHeaderGroups: {\n fn: () => table_getHeaderGroups(table),\n memoDeps: () => [\n table.options.columns,\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.atoms.columnPinning?.get(),\n table.atoms.columnVisibility?.get(),\n table.options.groupedColumnMode,\n ],\n },\n table_getFooterGroups: {\n fn: () => table_getFooterGroups(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getFlatHeaders: {\n fn: () => table_getFlatHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n table_getLeafHeaders: {\n fn: () => table_getLeafHeaders(table),\n memoDeps: () => [table.getHeaderGroups()],\n },\n })\n },\n }\n}\n\n/**\n * The Core Headers feature provides the core header functionality.\n */\nexport const coreHeadersFeature = constructCoreHeadersFeature()\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,8BAGoD;CAClE,OAAO;EACL,wBAAwB,WAAW,UAAU;GAC3C,oBAAoB,sBAAsB,WAAW,OAAO;IAC1D,uBAAuB;KACrB,KAAK,WAAW,sBAAsB,OAAO;KAC7C,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACD,mBAAmB;KACjB,KAAK,WAAW,kBAAkB,OAAO;KACzC,WAAW,WAAW,CAAC,OAAO,OAAO,MAAM,QAAQ,QAAQ;KAC5D;IACF,CAAC;;EAGJ,qBAAqB,UAAU;GAC7B,gBAAgB,sBAAsB,OAAO;IAC3C,uBAAuB;KACrB,UAAU,sBAAsB,MAAM;KACtC,gBAAgB;;;OACd,MAAM,QAAQ;gCACd,MAAM,MAAM,2FAAa,KAAK;gCAC9B,MAAM,MAAM,wFAAU,KAAK;gCAC3B,MAAM,MAAM,6FAAe,KAAK;gCAChC,MAAM,MAAM,gGAAkB,KAAK;OACnC,MAAM,QAAQ;OACf;;KACF;IACD,uBAAuB;KACrB,UAAU,sBAAsB,MAAM;KACtC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAU,qBAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACD,sBAAsB;KACpB,UAAU,qBAAqB,MAAM;KACrC,gBAAgB,CAAC,MAAM,iBAAiB,CAAC;KAC1C;IACF,CAAC;;EAEL;;;;;AAMH,MAAa,qBAAqB,6BAA6B"}
|