@tanstack/table-core 9.0.0-beta.52 → 9.0.0-beta.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/cells/constructCell.d.ts +1 -2
- package/dist/core/cells/constructCell.js +1 -2
- package/dist/core/cells/coreCellsFeature.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.js +1 -2
- package/dist/core/cells/coreCellsFeature.types.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.utils.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.utils.js +1 -2
- package/dist/core/columns/constructColumn.d.ts +1 -2
- package/dist/core/columns/constructColumn.js +1 -2
- package/dist/core/columns/coreColumnsFeature.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.js +1 -2
- package/dist/core/columns/coreColumnsFeature.types.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.utils.js +1 -2
- package/dist/core/coreFeatures.d.ts +1 -2
- package/dist/core/coreFeatures.js +1 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +1 -2
- package/dist/core/headers/buildHeaderGroups.js +1 -2
- package/dist/core/headers/constructHeader.d.ts +1 -2
- package/dist/core/headers/constructHeader.js +1 -2
- package/dist/core/headers/coreHeadersFeature.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.js +1 -2
- package/dist/core/headers/coreHeadersFeature.types.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.utils.js +1 -2
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +1 -2
- package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +1 -2
- package/dist/core/reactivity/coreReactivityFeature.utils.js +1 -2
- package/dist/core/row-models/coreRowModelsFeature.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.js +1 -2
- package/dist/core/row-models/coreRowModelsFeature.types.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.utils.js +1 -2
- package/dist/core/row-models/createCoreRowModel.d.ts +1 -2
- package/dist/core/row-models/createCoreRowModel.js +1 -2
- package/dist/core/rows/constructRow.d.ts +1 -2
- package/dist/core/rows/constructRow.js +1 -2
- package/dist/core/rows/coreRowsFeature.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.js +1 -2
- package/dist/core/rows/coreRowsFeature.types.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.utils.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.utils.js +1 -2
- package/dist/core/table/constructTable.d.ts +1 -2
- package/dist/core/table/constructTable.js +1 -2
- package/dist/core/table/coreTablesFeature.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.js +1 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.utils.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.utils.js +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.js +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +1 -2
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +1 -2
- package/dist/features/column-faceting/createFacetedRowModel.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedRowModel.js +1 -2
- package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedUniqueValues.js +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.js +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +1 -2
- package/dist/features/column-filtering/createFilteredRowModel.d.ts +1 -2
- package/dist/features/column-filtering/createFilteredRowModel.js +1 -2
- package/dist/features/column-filtering/filterFns.d.ts +1 -2
- package/dist/features/column-filtering/filterFns.js +1 -2
- package/dist/features/column-filtering/filterRowsUtils.js +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.js +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +1 -2
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +1 -2
- package/dist/features/column-grouping/createGroupedRowModel.js +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.js +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +1 -2
- package/dist/features/column-pinning/columnPinningFeature.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.js +1 -2
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.utils.js +1 -2
- package/dist/features/column-resizing/columnResizingFeature.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.js +1 -2
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.js +1 -2
- package/dist/features/column-sizing/columnSizingFeature.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.js +1 -2
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.utils.js +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.js +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.js +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +1 -2
- package/dist/features/row-aggregation/aggregationFns.d.ts +1 -2
- package/dist/features/row-aggregation/aggregationFns.js +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.d.ts +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.js +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.types.js +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js +1 -2
- package/dist/features/row-expanding/createExpandedRowModel.d.ts +1 -2
- package/dist/features/row-expanding/createExpandedRowModel.js +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.js +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +1 -2
- package/dist/features/row-pagination/createPaginatedRowModel.d.ts +1 -2
- package/dist/features/row-pagination/createPaginatedRowModel.js +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.js +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +1 -2
- package/dist/features/row-pinning/rowPinningFeature.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.js +1 -2
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.js +1 -2
- package/dist/features/row-selection/rowSelectionFeature.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.js +1 -2
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.utils.js +1 -2
- package/dist/features/row-sorting/createSortedRowModel.d.ts +1 -2
- package/dist/features/row-sorting/createSortedRowModel.js +1 -2
- package/dist/features/row-sorting/rowSortingFeature.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.js +1 -2
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.utils.js +1 -2
- package/dist/features/row-sorting/sortFns.d.ts +1 -2
- package/dist/features/row-sorting/sortFns.js +1 -2
- package/dist/features/stockFeatures.d.ts +1 -2
- package/dist/features/stockFeatures.js +1 -2
- package/dist/flex-render.d.ts +1 -2
- package/dist/flex-render.js +1 -2
- package/dist/helpers/columnHelper.d.ts +1 -2
- package/dist/helpers/columnHelper.js +1 -2
- package/dist/helpers/metaHelper.d.ts +1 -2
- package/dist/helpers/metaHelper.js +1 -2
- package/dist/helpers/tableFeatures.d.ts +1 -2
- package/dist/helpers/tableFeatures.js +1 -2
- package/dist/helpers/tableOptions.d.ts +1 -2
- package/dist/helpers/tableOptions.js +1 -2
- package/dist/store-reactivity-bindings.d.ts +1 -2
- package/dist/store-reactivity-bindings.js +1 -2
- package/dist/types/Cell.d.ts +1 -2
- package/dist/types/Column.d.ts +1 -2
- package/dist/types/ColumnDef.d.ts +1 -2
- package/dist/types/Header.d.ts +1 -2
- package/dist/types/HeaderGroup.d.ts +1 -2
- package/dist/types/Row.d.ts +1 -2
- package/dist/types/RowModel.d.ts +1 -2
- package/dist/types/RowModelFns.d.ts +1 -2
- package/dist/types/Table.d.ts +1 -2
- package/dist/types/TableFeatures.d.ts +1 -2
- package/dist/types/TableOptions.d.ts +1 -2
- package/dist/types/TableState.d.ts +1 -2
- package/dist/types/type-utils.d.ts +1 -2
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +1 -2
- package/dist/worker/createTableWorker.d.ts +1 -2
- package/dist/worker/createTableWorker.js +1 -2
- package/dist/worker/createWorkerRowModel.d.ts +1 -2
- package/dist/worker/createWorkerRowModel.js +1 -2
- package/dist/worker/initTableWorker.d.ts +1 -2
- package/dist/worker/initTableWorker.js +1 -2
- package/dist/worker/rebuildRowModel.d.ts +1 -2
- package/dist/worker/rebuildRowModel.js +1 -2
- package/dist/worker/serializeRowModel.js +1 -2
- package/dist/worker/tableWorkerProtocol.d.ts +1 -2
- package/dist/worker/tableWorkerProtocol.js +1 -2
- package/package.json +9 -30
- package/skills/aggregation/SKILL.md +2 -2
- package/skills/api-not-found/SKILL.md +5 -5
- package/skills/client-vs-server/SKILL.md +2 -2
- package/skills/column-faceting/SKILL.md +2 -2
- package/skills/column-filtering/SKILL.md +2 -2
- package/skills/column-ordering/SKILL.md +2 -2
- package/skills/column-pinning/SKILL.md +2 -2
- package/skills/column-resizing/SKILL.md +2 -2
- package/skills/column-sizing/SKILL.md +2 -2
- package/skills/column-visibility/SKILL.md +2 -2
- package/skills/core/SKILL.md +2 -2
- package/skills/custom-features/SKILL.md +2 -2
- package/skills/expanding/SKILL.md +2 -2
- package/skills/global-filtering/SKILL.md +2 -2
- package/skills/grouping/SKILL.md +2 -2
- package/skills/migrate-v8-to-v9/SKILL.md +7 -7
- package/skills/pagination/SKILL.md +2 -2
- package/skills/row-pinning/SKILL.md +2 -2
- package/skills/row-selection/SKILL.md +2 -2
- package/skills/sorting/SKILL.md +2 -2
- package/skills/table-features/SKILL.md +2 -2
- package/skills/typescript/SKILL.md +2 -2
- package/dist/core/cells/constructCell.cjs +0 -31
- package/dist/core/cells/constructCell.cjs.map +0 -1
- package/dist/core/cells/constructCell.d.cts +0 -17
- package/dist/core/cells/constructCell.js.map +0 -1
- package/dist/core/cells/coreCellsFeature.cjs +0 -21
- package/dist/core/cells/coreCellsFeature.cjs.map +0 -1
- package/dist/core/cells/coreCellsFeature.d.cts +0 -10
- package/dist/core/cells/coreCellsFeature.js.map +0 -1
- package/dist/core/cells/coreCellsFeature.types.d.cts +0 -57
- package/dist/core/cells/coreCellsFeature.utils.cjs +0 -57
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +0 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +0 -53
- package/dist/core/cells/coreCellsFeature.utils.js.map +0 -1
- package/dist/core/columns/constructColumn.cjs +0 -60
- package/dist/core/columns/constructColumn.cjs.map +0 -1
- package/dist/core/columns/constructColumn.d.cts +0 -16
- package/dist/core/columns/constructColumn.js.map +0 -1
- package/dist/core/columns/coreColumnsFeature.cjs +0 -64
- package/dist/core/columns/coreColumnsFeature.cjs.map +0 -1
- package/dist/core/columns/coreColumnsFeature.d.cts +0 -10
- package/dist/core/columns/coreColumnsFeature.js.map +0 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +0 -94
- package/dist/core/columns/coreColumnsFeature.utils.cjs +0 -183
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +0 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +0 -119
- package/dist/core/columns/coreColumnsFeature.utils.js.map +0 -1
- package/dist/core/coreFeatures.cjs +0 -25
- package/dist/core/coreFeatures.cjs.map +0 -1
- package/dist/core/coreFeatures.d.cts +0 -26
- package/dist/core/coreFeatures.js.map +0 -1
- package/dist/core/headers/buildHeaderGroups.cjs +0 -102
- package/dist/core/headers/buildHeaderGroups.cjs.map +0 -1
- package/dist/core/headers/buildHeaderGroups.d.cts +0 -16
- package/dist/core/headers/buildHeaderGroups.js.map +0 -1
- package/dist/core/headers/constructHeader.cjs +0 -38
- package/dist/core/headers/constructHeader.cjs.map +0 -1
- package/dist/core/headers/constructHeader.d.cts +0 -22
- package/dist/core/headers/constructHeader.js.map +0 -1
- package/dist/core/headers/coreHeadersFeature.cjs +0 -52
- package/dist/core/headers/coreHeadersFeature.cjs.map +0 -1
- package/dist/core/headers/coreHeadersFeature.d.cts +0 -10
- package/dist/core/headers/coreHeadersFeature.js.map +0 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +0 -106
- package/dist/core/headers/coreHeadersFeature.utils.cjs +0 -140
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +0 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +0 -85
- package/dist/core/headers/coreHeadersFeature.utils.js.map +0 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +0 -48
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs +0 -24
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +0 -1
- package/dist/core/reactivity/coreReactivityFeature.utils.d.cts +0 -24
- package/dist/core/reactivity/coreReactivityFeature.utils.js.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.cjs +0 -27
- package/dist/core/row-models/coreRowModelsFeature.cjs.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.d.cts +0 -10
- package/dist/core/row-models/coreRowModelsFeature.js.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.types.d.cts +0 -33
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +0 -197
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +0 -153
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +0 -1
- package/dist/core/row-models/createCoreRowModel.cjs +0 -50
- package/dist/core/row-models/createCoreRowModel.cjs.map +0 -1
- package/dist/core/row-models/createCoreRowModel.d.cts +0 -15
- package/dist/core/row-models/createCoreRowModel.js.map +0 -1
- package/dist/core/rows/constructRow.cjs +0 -40
- package/dist/core/rows/constructRow.cjs.map +0 -1
- package/dist/core/rows/constructRow.d.cts +0 -15
- package/dist/core/rows/constructRow.js.map +0 -1
- package/dist/core/rows/coreRowsFeature.cjs +0 -53
- package/dist/core/rows/coreRowsFeature.cjs.map +0 -1
- package/dist/core/rows/coreRowsFeature.d.cts +0 -10
- package/dist/core/rows/coreRowsFeature.js.map +0 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +0 -133
- package/dist/core/rows/coreRowsFeature.utils.cjs +0 -246
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +0 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +0 -146
- package/dist/core/rows/coreRowsFeature.utils.js.map +0 -1
- package/dist/core/table/constructTable.cjs +0 -128
- package/dist/core/table/constructTable.cjs.map +0 -1
- package/dist/core/table/constructTable.d.cts +0 -22
- package/dist/core/table/constructTable.js.map +0 -1
- package/dist/core/table/coreTablesFeature.cjs +0 -17
- package/dist/core/table/coreTablesFeature.cjs.map +0 -1
- package/dist/core/table/coreTablesFeature.d.cts +0 -10
- package/dist/core/table/coreTablesFeature.js.map +0 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +0 -199
- package/dist/core/table/coreTablesFeature.utils.cjs +0 -120
- package/dist/core/table/coreTablesFeature.utils.cjs.map +0 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +0 -60
- package/dist/core/table/coreTablesFeature.utils.js.map +0 -1
- package/dist/experimental-worker-plugin.cjs +0 -14
- package/dist/experimental-worker-plugin.d.cts +0 -5
- package/dist/features/column-faceting/columnFacetingFeature.cjs +0 -55
- package/dist/features/column-faceting/columnFacetingFeature.cjs.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.d.cts +0 -10
- package/dist/features/column-faceting/columnFacetingFeature.js.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +0 -67
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +0 -114
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +0 -84
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +0 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +0 -47
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +0 -14
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +0 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +0 -45
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedRowModel.d.cts +0 -15
- package/dist/features/column-faceting/createFacetedRowModel.js.map +0 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +0 -45
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +0 -14
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.cjs +0 -50
- package/dist/features/column-filtering/columnFilteringFeature.cjs.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.d.cts +0 -10
- package/dist/features/column-filtering/columnFilteringFeature.js.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +0 -214
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +0 -218
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +0 -147
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +0 -114
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.d.cts +0 -22
- package/dist/features/column-filtering/createFilteredRowModel.js.map +0 -1
- package/dist/features/column-filtering/filterFns.cjs +0 -399
- package/dist/features/column-filtering/filterFns.cjs.map +0 -1
- package/dist/features/column-filtering/filterFns.d.cts +0 -210
- package/dist/features/column-filtering/filterFns.js.map +0 -1
- package/dist/features/column-filtering/filterRowsUtils.cjs +0 -82
- package/dist/features/column-filtering/filterRowsUtils.cjs.map +0 -1
- package/dist/features/column-filtering/filterRowsUtils.js.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.cjs +0 -55
- package/dist/features/column-grouping/columnGroupingFeature.cjs.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.cts +0 -10
- package/dist/features/column-grouping/columnGroupingFeature.js.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +0 -129
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +0 -195
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +0 -153
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.cjs +0 -140
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +0 -18
- package/dist/features/column-grouping/createGroupedRowModel.js.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.cjs +0 -54
- package/dist/features/column-ordering/columnOrderingFeature.cjs.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.d.cts +0 -10
- package/dist/features/column-ordering/columnOrderingFeature.js.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +0 -81
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +0 -192
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +0 -119
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.cjs +0 -202
- package/dist/features/column-pinning/columnPinningFeature.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.d.cts +0 -15
- package/dist/features/column-pinning/columnPinningFeature.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +0 -189
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +0 -584
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +0 -384
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.cjs +0 -41
- package/dist/features/column-resizing/columnResizingFeature.cjs.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.d.cts +0 -10
- package/dist/features/column-resizing/columnResizingFeature.js.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +0 -78
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +0 -286
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +0 -109
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +0 -90
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.d.cts +0 -10
- package/dist/features/column-sizing/columnSizingFeature.js.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +0 -139
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +0 -299
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +0 -200
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +0 -83
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.d.cts +0 -10
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +0 -97
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +0 -284
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +0 -189
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.cjs +0 -40
- package/dist/features/global-filtering/globalFilteringFeature.cjs.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.d.cts +0 -10
- package/dist/features/global-filtering/globalFilteringFeature.js.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +0 -71
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +0 -88
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +0 -71
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +0 -1
- package/dist/features/row-aggregation/aggregationFns.cjs +0 -291
- package/dist/features/row-aggregation/aggregationFns.cjs.map +0 -1
- package/dist/features/row-aggregation/aggregationFns.d.cts +0 -68
- package/dist/features/row-aggregation/aggregationFns.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.cjs +0 -36
- package/dist/features/row-aggregation/rowAggregationFeature.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.d.cts +0 -10
- package/dist/features/row-aggregation/rowAggregationFeature.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs +0 -13
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.cts +0 -195
- package/dist/features/row-aggregation/rowAggregationFeature.types.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs +0 -243
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.cts +0 -48
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js.map +0 -1
- package/dist/features/row-expanding/createExpandedRowModel.cjs +0 -55
- package/dist/features/row-expanding/createExpandedRowModel.cjs.map +0 -1
- package/dist/features/row-expanding/createExpandedRowModel.d.cts +0 -21
- package/dist/features/row-expanding/createExpandedRowModel.js.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.cjs +0 -47
- package/dist/features/row-expanding/rowExpandingFeature.cjs.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.d.cts +0 -10
- package/dist/features/row-expanding/rowExpandingFeature.js.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +0 -118
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +0 -283
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +0 -191
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +0 -1
- package/dist/features/row-pagination/createPaginatedRowModel.cjs +0 -58
- package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +0 -1
- package/dist/features/row-pagination/createPaginatedRowModel.d.cts +0 -15
- package/dist/features/row-pagination/createPaginatedRowModel.js.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.cjs +0 -45
- package/dist/features/row-pagination/rowPaginationFeature.cjs.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.d.cts +0 -10
- package/dist/features/row-pagination/rowPaginationFeature.js.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +0 -126
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +0 -306
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +0 -218
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.cjs +0 -55
- package/dist/features/row-pinning/rowPinningFeature.cjs.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.d.cts +0 -10
- package/dist/features/row-pinning/rowPinningFeature.js.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +0 -83
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +0 -224
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +0 -143
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs +0 -119
- package/dist/features/row-selection/rowSelectionFeature.cjs.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.d.cts +0 -10
- package/dist/features/row-selection/rowSelectionFeature.js.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +0 -174
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +0 -570
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +0 -345
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +0 -114
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.d.cts +0 -22
- package/dist/features/row-sorting/createSortedRowModel.js.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.cjs +0 -55
- package/dist/features/row-sorting/rowSortingFeature.cjs.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.d.cts +0 -10
- package/dist/features/row-sorting/rowSortingFeature.js.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +0 -220
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +0 -316
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +0 -193
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +0 -1
- package/dist/features/row-sorting/sortFns.cjs +0 -226
- package/dist/features/row-sorting/sortFns.cjs.map +0 -1
- package/dist/features/row-sorting/sortFns.d.cts +0 -98
- package/dist/features/row-sorting/sortFns.js.map +0 -1
- package/dist/features/stockFeatures.cjs +0 -43
- package/dist/features/stockFeatures.cjs.map +0 -1
- package/dist/features/stockFeatures.d.cts +0 -43
- package/dist/features/stockFeatures.js.map +0 -1
- package/dist/flex-render.cjs +0 -29
- package/dist/flex-render.cjs.map +0 -1
- package/dist/flex-render.d.cts +0 -34
- package/dist/flex-render.js.map +0 -1
- package/dist/helpers/columnHelper.cjs +0 -41
- package/dist/helpers/columnHelper.cjs.map +0 -1
- package/dist/helpers/columnHelper.d.cts +0 -71
- package/dist/helpers/columnHelper.js.map +0 -1
- package/dist/helpers/metaHelper.cjs +0 -30
- package/dist/helpers/metaHelper.cjs.map +0 -1
- package/dist/helpers/metaHelper.d.cts +0 -26
- package/dist/helpers/metaHelper.js.map +0 -1
- package/dist/helpers/tableFeatures.cjs +0 -49
- package/dist/helpers/tableFeatures.cjs.map +0 -1
- package/dist/helpers/tableFeatures.d.cts +0 -47
- package/dist/helpers/tableFeatures.js.map +0 -1
- package/dist/helpers/tableOptions.cjs +0 -15
- package/dist/helpers/tableOptions.cjs.map +0 -1
- package/dist/helpers/tableOptions.d.cts +0 -57
- package/dist/helpers/tableOptions.js.map +0 -1
- package/dist/index.cjs +0 -153
- package/dist/index.d.cts +0 -81
- package/dist/reactivity.cjs +0 -4
- package/dist/reactivity.d.cts +0 -3
- package/dist/static-functions.cjs +0 -275
- package/dist/static-functions.d.cts +0 -22
- package/dist/store-reactivity-bindings.cjs +0 -44
- package/dist/store-reactivity-bindings.cjs.map +0 -1
- package/dist/store-reactivity-bindings.d.cts +0 -22
- package/dist/store-reactivity-bindings.js.map +0 -1
- package/dist/types/Cell.d.cts +0 -16
- package/dist/types/Column.d.cts +0 -36
- package/dist/types/ColumnDef.d.cts +0 -125
- package/dist/types/Header.d.cts +0 -16
- package/dist/types/HeaderGroup.d.cts +0 -10
- package/dist/types/Row.d.cts +0 -28
- package/dist/types/RowModel.d.cts +0 -24
- package/dist/types/RowModelFns.d.cts +0 -18
- package/dist/types/Table.d.cts +0 -65
- package/dist/types/TableFeatures.d.cts +0 -381
- package/dist/types/TableOptions.d.cts +0 -77
- package/dist/types/TableState.d.cts +0 -48
- package/dist/types/type-utils.d.cts +0 -30
- package/dist/utils.cjs +0 -265
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.cts +0 -136
- package/dist/utils.js.map +0 -1
- package/dist/worker/createTableWorker.cjs +0 -189
- package/dist/worker/createTableWorker.cjs.map +0 -1
- package/dist/worker/createTableWorker.d.cts +0 -102
- package/dist/worker/createTableWorker.js.map +0 -1
- package/dist/worker/createWorkerRowModel.cjs +0 -78
- package/dist/worker/createWorkerRowModel.cjs.map +0 -1
- package/dist/worker/createWorkerRowModel.d.cts +0 -42
- package/dist/worker/createWorkerRowModel.js.map +0 -1
- package/dist/worker/initTableWorker.cjs +0 -100
- package/dist/worker/initTableWorker.cjs.map +0 -1
- package/dist/worker/initTableWorker.d.cts +0 -33
- package/dist/worker/initTableWorker.js.map +0 -1
- package/dist/worker/rebuildRowModel.cjs +0 -72
- package/dist/worker/rebuildRowModel.cjs.map +0 -1
- package/dist/worker/rebuildRowModel.d.cts +0 -9
- package/dist/worker/rebuildRowModel.js.map +0 -1
- package/dist/worker/serializeRowModel.cjs +0 -53
- package/dist/worker/serializeRowModel.cjs.map +0 -1
- package/dist/worker/serializeRowModel.js.map +0 -1
- package/dist/worker/tableWorkerProtocol.cjs +0 -29
- package/dist/worker/tableWorkerProtocol.cjs.map +0 -1
- package/dist/worker/tableWorkerProtocol.d.cts +0 -88
- package/dist/worker/tableWorkerProtocol.js.map +0 -1
- package/src/core/cells/constructCell.ts +0 -55
- package/src/core/cells/coreCellsFeature.ts +0 -27
- package/src/core/cells/coreCellsFeature.types.ts +0 -68
- package/src/core/cells/coreCellsFeature.utils.ts +0 -68
- package/src/core/columns/constructColumn.ts +0 -125
- package/src/core/columns/coreColumnsFeature.ts +0 -73
- package/src/core/columns/coreColumnsFeature.types.ts +0 -108
- package/src/core/columns/coreColumnsFeature.utils.ts +0 -275
- package/src/core/coreFeatures.ts +0 -31
- package/src/core/headers/buildHeaderGroups.ts +0 -184
- package/src/core/headers/constructHeader.ts +0 -67
- package/src/core/headers/coreHeadersFeature.ts +0 -56
- package/src/core/headers/coreHeadersFeature.types.ts +0 -125
- package/src/core/headers/coreHeadersFeature.utils.ts +0 -199
- package/src/core/reactivity/coreReactivityFeature.types.ts +0 -56
- package/src/core/reactivity/coreReactivityFeature.utils.ts +0 -44
- package/src/core/row-models/coreRowModelsFeature.ts +0 -62
- package/src/core/row-models/coreRowModelsFeature.types.ts +0 -50
- package/src/core/row-models/coreRowModelsFeature.utils.ts +0 -272
- package/src/core/row-models/createCoreRowModel.ts +0 -94
- package/src/core/rows/constructRow.ts +0 -68
- package/src/core/rows/coreRowsFeature.ts +0 -83
- package/src/core/rows/coreRowsFeature.types.ts +0 -154
- package/src/core/rows/coreRowsFeature.utils.ts +0 -352
- package/src/core/table/constructTable.ts +0 -210
- package/src/core/table/coreTablesFeature.ts +0 -19
- package/src/core/table/coreTablesFeature.types.ts +0 -241
- package/src/core/table/coreTablesFeature.utils.ts +0 -171
- package/src/experimental-worker-plugin.ts +0 -22
- package/src/features/column-faceting/columnFacetingFeature.ts +0 -89
- package/src/features/column-faceting/columnFacetingFeature.types.ts +0 -78
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +0 -180
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +0 -92
- package/src/features/column-faceting/createFacetedRowModel.ts +0 -92
- package/src/features/column-faceting/createFacetedUniqueValues.ts +0 -97
- package/src/features/column-filtering/columnFilteringFeature.ts +0 -87
- package/src/features/column-filtering/columnFilteringFeature.types.ts +0 -308
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +0 -345
- package/src/features/column-filtering/createFilteredRowModel.ts +0 -194
- package/src/features/column-filtering/filterFns.ts +0 -533
- package/src/features/column-filtering/filterRowsUtils.ts +0 -158
- package/src/features/column-grouping/columnGroupingFeature.ts +0 -97
- package/src/features/column-grouping/columnGroupingFeature.types.ts +0 -152
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +0 -271
- package/src/features/column-grouping/createGroupedRowModel.ts +0 -258
- package/src/features/column-ordering/columnOrderingFeature.ts +0 -78
- package/src/features/column-ordering/columnOrderingFeature.types.ts +0 -86
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +0 -292
- package/src/features/column-pinning/columnPinningFeature.ts +0 -333
- package/src/features/column-pinning/columnPinningFeature.types.ts +0 -203
- package/src/features/column-pinning/columnPinningFeature.utils.ts +0 -922
- package/src/features/column-resizing/columnResizingFeature.ts +0 -65
- package/src/features/column-resizing/columnResizingFeature.types.ts +0 -86
- package/src/features/column-resizing/columnResizingFeature.utils.ts +0 -432
- package/src/features/column-sizing/columnSizingFeature.ts +0 -145
- package/src/features/column-sizing/columnSizingFeature.types.ts +0 -147
- package/src/features/column-sizing/columnSizingFeature.utils.ts +0 -462
- package/src/features/column-visibility/columnVisibilityFeature.ts +0 -126
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +0 -112
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +0 -402
- package/src/features/global-filtering/globalFilteringFeature.ts +0 -65
- package/src/features/global-filtering/globalFilteringFeature.types.ts +0 -91
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +0 -126
- package/src/features/row-aggregation/aggregationFns.ts +0 -383
- package/src/features/row-aggregation/rowAggregationFeature.ts +0 -56
- package/src/features/row-aggregation/rowAggregationFeature.types.ts +0 -339
- package/src/features/row-aggregation/rowAggregationFeature.utils.ts +0 -487
- package/src/features/row-expanding/createExpandedRowModel.ts +0 -82
- package/src/features/row-expanding/rowExpandingFeature.ts +0 -94
- package/src/features/row-expanding/rowExpandingFeature.types.ts +0 -132
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +0 -399
- package/src/features/row-pagination/createPaginatedRowModel.ts +0 -83
- package/src/features/row-pagination/rowPaginationFeature.ts +0 -95
- package/src/features/row-pagination/rowPaginationFeature.types.ts +0 -137
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +0 -400
- package/src/features/row-pinning/rowPinningFeature.ts +0 -97
- package/src/features/row-pinning/rowPinningFeature.types.ts +0 -95
- package/src/features/row-pinning/rowPinningFeature.utils.ts +0 -323
- package/src/features/row-selection/rowSelectionFeature.ts +0 -190
- package/src/features/row-selection/rowSelectionFeature.types.ts +0 -195
- package/src/features/row-selection/rowSelectionFeature.utils.ts +0 -927
- package/src/features/row-sorting/createSortedRowModel.ts +0 -189
- package/src/features/row-sorting/rowSortingFeature.ts +0 -103
- package/src/features/row-sorting/rowSortingFeature.types.ts +0 -288
- package/src/features/row-sorting/rowSortingFeature.utils.ts +0 -513
- package/src/features/row-sorting/sortFns.ts +0 -366
- package/src/features/stockFeatures.ts +0 -56
- package/src/flex-render.ts +0 -70
- package/src/helpers/columnHelper.ts +0 -122
- package/src/helpers/metaHelper.ts +0 -24
- package/src/helpers/tableFeatures.ts +0 -56
- package/src/helpers/tableOptions.ts +0 -117
- package/src/index.ts +0 -138
- package/src/process-env.d.ts +0 -6
- package/src/reactivity.ts +0 -2
- package/src/static-functions.ts +0 -32
- package/src/store-reactivity-bindings.ts +0 -47
- package/src/types/Cell.ts +0 -23
- package/src/types/Column.ts +0 -55
- package/src/types/ColumnDef.ts +0 -258
- package/src/types/Header.ts +0 -23
- package/src/types/HeaderGroup.ts +0 -13
- package/src/types/Row.ts +0 -36
- package/src/types/RowModel.ts +0 -43
- package/src/types/RowModelFns.ts +0 -32
- package/src/types/Table.ts +0 -116
- package/src/types/TableFeatures.ts +0 -479
- package/src/types/TableOptions.ts +0 -154
- package/src/types/TableState.ts +0 -61
- package/src/types/type-utils.ts +0 -92
- package/src/utils.ts +0 -493
- package/src/worker/createTableWorker.ts +0 -357
- package/src/worker/createWorkerRowModel.ts +0 -121
- package/src/worker/initTableWorker.ts +0 -164
- package/src/worker/rebuildRowModel.ts +0 -120
- package/src/worker/serializeRowModel.ts +0 -80
- package/src/worker/tableWorkerProtocol.ts +0 -105
|
@@ -1,927 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
callMemoOrStaticFn,
|
|
3
|
-
cloneState,
|
|
4
|
-
copyInstancePropertiesWithoutMemos,
|
|
5
|
-
hasOwn,
|
|
6
|
-
makeObjectMap,
|
|
7
|
-
} from '../../utils'
|
|
8
|
-
import type { RowData, Updater } from '../../types/type-utils'
|
|
9
|
-
import type { TableFeatures } from '../../types/TableFeatures'
|
|
10
|
-
import type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'
|
|
11
|
-
import type { Table_Internal } from '../../types/Table'
|
|
12
|
-
import type { Row } from '../../types/Row'
|
|
13
|
-
import type {
|
|
14
|
-
RowSelectionState,
|
|
15
|
-
ToggleSelectedOptions,
|
|
16
|
-
} from './rowSelectionFeature.types'
|
|
17
|
-
|
|
18
|
-
// State APIs
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Creates the default row selection state.
|
|
22
|
-
*
|
|
23
|
-
* The feature default is an empty map, meaning no rows are selected. Reset APIs
|
|
24
|
-
* use this value when `defaultState` is `true`.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const selection = getDefaultRowSelectionState()
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export function getDefaultRowSelectionState(): RowSelectionState {
|
|
32
|
-
return makeObjectMap()
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Routes a row selection updater through the table's selection change handler.
|
|
37
|
-
*
|
|
38
|
-
* The updater may be a next selection map or a function of the previous map,
|
|
39
|
-
* matching the instance `table.setRowSelection` behavior.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* table_setRowSelection(table, (old) => ({ ...old, [rowId]: true }))
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export function table_setRowSelection<
|
|
47
|
-
TFeatures extends TableFeatures,
|
|
48
|
-
TData extends RowData,
|
|
49
|
-
>(
|
|
50
|
-
table: Table_Internal<TFeatures, TData>,
|
|
51
|
-
updater: Updater<RowSelectionState>,
|
|
52
|
-
) {
|
|
53
|
-
table.options.onRowSelectionChange?.(updater)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Resets `rowSelection` to the configured initial state or feature default.
|
|
58
|
-
*
|
|
59
|
-
* With no argument, the reset clones `table.initialState.rowSelection` when it
|
|
60
|
-
* exists. Passing `true` ignores initial state and resets to `{}`.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```ts
|
|
64
|
-
* table_resetRowSelection(table)
|
|
65
|
-
* table_resetRowSelection(table, true)
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
export function table_resetRowSelection<
|
|
69
|
-
TFeatures extends TableFeatures,
|
|
70
|
-
TData extends RowData,
|
|
71
|
-
>(table: Table_Internal<TFeatures, TData>, defaultState?: boolean) {
|
|
72
|
-
// @ts-ignore - _lastSelectedRowId is part of the RowSelection feature
|
|
73
|
-
table._lastSelectedRowId = null
|
|
74
|
-
table_setRowSelection(
|
|
75
|
-
table,
|
|
76
|
-
defaultState
|
|
77
|
-
? makeObjectMap()
|
|
78
|
-
: Object.assign(
|
|
79
|
-
makeObjectMap<true>(),
|
|
80
|
-
cloneState(table.initialState.rowSelection ?? {}),
|
|
81
|
-
),
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Table APIs
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Selects or deselects every selectable row before grouping.
|
|
89
|
-
*
|
|
90
|
-
* Omitting `value` toggles based on `table_getIsAllRowsSelected(table)`.
|
|
91
|
-
* Deselecting removes matching ids from the existing selection map.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```ts
|
|
95
|
-
* table_toggleAllRowsSelected(table)
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
export function table_toggleAllRowsSelected<
|
|
99
|
-
TFeatures extends TableFeatures,
|
|
100
|
-
TData extends RowData,
|
|
101
|
-
>(
|
|
102
|
-
table: Table_Internal<TFeatures, TData>,
|
|
103
|
-
value?: boolean,
|
|
104
|
-
opts?: { deselectAll?: boolean },
|
|
105
|
-
) {
|
|
106
|
-
// @ts-ignore - _lastSelectedRowId is part of the RowSelection feature
|
|
107
|
-
table._lastSelectedRowId = null
|
|
108
|
-
table_setRowSelection(table, (old) => {
|
|
109
|
-
value =
|
|
110
|
-
typeof value !== 'undefined'
|
|
111
|
-
? value
|
|
112
|
-
: !callMemoOrStaticFn(
|
|
113
|
-
table,
|
|
114
|
-
'getIsAllRowsSelected',
|
|
115
|
-
table_getIsAllRowsSelected,
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
if (opts?.deselectAll && !value) {
|
|
119
|
-
// deselectAll opt: clear the whole selection map instead of deleting ids one-by-one
|
|
120
|
-
return makeObjectMap<true>()
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const rowSelection = Object.assign(makeObjectMap<true>(), old)
|
|
124
|
-
const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows
|
|
125
|
-
|
|
126
|
-
// We don't use `mutateRowIsSelected` here for performance reasons.
|
|
127
|
-
// All of the rows are flat already, so it wouldn't be worth it
|
|
128
|
-
if (value) {
|
|
129
|
-
preGroupedFlatRows.forEach((row) => {
|
|
130
|
-
if (row_getCanSelect(row)) {
|
|
131
|
-
rowSelection[row.id] = true
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
} else {
|
|
135
|
-
preGroupedFlatRows.forEach((row) => {
|
|
136
|
-
delete rowSelection[row.id]
|
|
137
|
-
})
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return rowSelection
|
|
141
|
-
})
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Selects or deselects every selectable row on the current page.
|
|
146
|
-
*
|
|
147
|
-
* Omitting `value` toggles based on `table_getIsAllPageRowsSelected(table)`.
|
|
148
|
-
* Child rows are included when sub-row selection allows it.
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```ts
|
|
152
|
-
* table_toggleAllPageRowsSelected(table)
|
|
153
|
-
* ```
|
|
154
|
-
*/
|
|
155
|
-
export function table_toggleAllPageRowsSelected<
|
|
156
|
-
TFeatures extends TableFeatures,
|
|
157
|
-
TData extends RowData,
|
|
158
|
-
>(
|
|
159
|
-
table: Table_Internal<TFeatures, TData>,
|
|
160
|
-
value?: boolean,
|
|
161
|
-
opts?: { deselectAll?: boolean },
|
|
162
|
-
) {
|
|
163
|
-
// @ts-ignore - _lastSelectedRowId is part of the RowSelection feature
|
|
164
|
-
table._lastSelectedRowId = null
|
|
165
|
-
table_setRowSelection(table, (old) => {
|
|
166
|
-
const resolvedValue =
|
|
167
|
-
typeof value !== 'undefined'
|
|
168
|
-
? value
|
|
169
|
-
: !callMemoOrStaticFn(
|
|
170
|
-
table,
|
|
171
|
-
'getIsAllPageRowsSelected',
|
|
172
|
-
table_getIsAllPageRowsSelected,
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
if (opts?.deselectAll && !resolvedValue) {
|
|
176
|
-
// deselectAll opt: clear the whole selection map instead of deleting ids one-by-one
|
|
177
|
-
return makeObjectMap<true>()
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const rowSelection: RowSelectionState = Object.assign(
|
|
181
|
-
makeObjectMap<true>(),
|
|
182
|
-
old,
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
table.getRowModel().rows.forEach((row) => {
|
|
186
|
-
mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table)
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
return rowSelection
|
|
190
|
-
})
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Reads the row model before row selection is projected into selected rows.
|
|
195
|
-
*
|
|
196
|
-
* Selection does not alter the base row pipeline, so this returns the core row
|
|
197
|
-
* model.
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* ```ts
|
|
201
|
-
* const rowsBeforeSelection = table_getPreSelectedRowModel(table)
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
export function table_getPreSelectedRowModel<
|
|
205
|
-
TFeatures extends TableFeatures,
|
|
206
|
-
TData extends RowData,
|
|
207
|
-
>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {
|
|
208
|
-
return table.getCoreRowModel()
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Builds a row model containing selected rows from the core row model.
|
|
213
|
-
*
|
|
214
|
-
* If no row ids are selected, an empty row model is returned without walking
|
|
215
|
-
* the rows.
|
|
216
|
-
*
|
|
217
|
-
* @example
|
|
218
|
-
* ```ts
|
|
219
|
-
* const selectedRows = table_getSelectedRowModel(table)
|
|
220
|
-
* ```
|
|
221
|
-
*/
|
|
222
|
-
export function table_getSelectedRowModel<
|
|
223
|
-
TFeatures extends TableFeatures,
|
|
224
|
-
TData extends RowData,
|
|
225
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
226
|
-
const rowModel = table.getCoreRowModel()
|
|
227
|
-
|
|
228
|
-
if (
|
|
229
|
-
!callMemoOrStaticFn(
|
|
230
|
-
table,
|
|
231
|
-
'getIsSomeRowsSelected',
|
|
232
|
-
table_getIsSomeRowsSelected,
|
|
233
|
-
)
|
|
234
|
-
) {
|
|
235
|
-
return {
|
|
236
|
-
rows: [],
|
|
237
|
-
flatRows: [],
|
|
238
|
-
rowsById: makeObjectMap(),
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return selectRowsFn(rowModel, table)
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Builds a row model containing selected rows from the filtered row model.
|
|
247
|
-
*
|
|
248
|
-
* If no row ids are selected, an empty row model is returned without walking
|
|
249
|
-
* the rows.
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* ```ts
|
|
253
|
-
* const selectedRows = table_getFilteredSelectedRowModel(table)
|
|
254
|
-
* ```
|
|
255
|
-
*/
|
|
256
|
-
export function table_getFilteredSelectedRowModel<
|
|
257
|
-
TFeatures extends TableFeatures,
|
|
258
|
-
TData extends RowData,
|
|
259
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
260
|
-
const rowModel = table.getFilteredRowModel()
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
!callMemoOrStaticFn(
|
|
264
|
-
table,
|
|
265
|
-
'getIsSomeRowsSelected',
|
|
266
|
-
table_getIsSomeRowsSelected,
|
|
267
|
-
)
|
|
268
|
-
) {
|
|
269
|
-
return {
|
|
270
|
-
rows: [],
|
|
271
|
-
flatRows: [],
|
|
272
|
-
rowsById: makeObjectMap(),
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return selectRowsFn(rowModel, table)
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Builds a row model containing selected rows from the grouped row model.
|
|
281
|
-
*
|
|
282
|
-
* If no row ids are selected, an empty row model is returned without walking
|
|
283
|
-
* the rows.
|
|
284
|
-
*
|
|
285
|
-
* @example
|
|
286
|
-
* ```ts
|
|
287
|
-
* const selectedRows = table_getGroupedSelectedRowModel(table)
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
export function table_getGroupedSelectedRowModel<
|
|
291
|
-
TFeatures extends TableFeatures,
|
|
292
|
-
TData extends RowData,
|
|
293
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
294
|
-
// The sorted model falls back grouped -> filtered -> core when those
|
|
295
|
-
// features are not registered, so selected group rows are always visible.
|
|
296
|
-
const rowModel = table.getSortedRowModel()
|
|
297
|
-
|
|
298
|
-
if (
|
|
299
|
-
!callMemoOrStaticFn(
|
|
300
|
-
table,
|
|
301
|
-
'getIsSomeRowsSelected',
|
|
302
|
-
table_getIsSomeRowsSelected,
|
|
303
|
-
)
|
|
304
|
-
) {
|
|
305
|
-
return {
|
|
306
|
-
rows: [],
|
|
307
|
-
flatRows: [],
|
|
308
|
-
rowsById: makeObjectMap(),
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
return selectRowsFn(rowModel, table)
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Returns the ids of all selected rows.
|
|
317
|
-
*
|
|
318
|
-
* @example
|
|
319
|
-
* ```ts
|
|
320
|
-
* const selectedRowIds = table_getSelectedRowIds(table)
|
|
321
|
-
* ```
|
|
322
|
-
*/
|
|
323
|
-
export function table_getSelectedRowIds<
|
|
324
|
-
TFeatures extends TableFeatures,
|
|
325
|
-
TData extends RowData,
|
|
326
|
-
>(table: Table_Internal<TFeatures, TData>): Array<string> {
|
|
327
|
-
return Object.keys(table.atoms.rowSelection?.get() ?? {})
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Checks whether every selectable filtered row is selected.
|
|
332
|
-
*
|
|
333
|
-
* The result is false when there are no filtered rows or when selection state is
|
|
334
|
-
* empty.
|
|
335
|
-
*
|
|
336
|
-
* @example
|
|
337
|
-
* ```ts
|
|
338
|
-
* const allSelected = table_getIsAllRowsSelected(table)
|
|
339
|
-
* ```
|
|
340
|
-
*/
|
|
341
|
-
export function table_getIsAllRowsSelected<
|
|
342
|
-
TFeatures extends TableFeatures,
|
|
343
|
-
TData extends RowData,
|
|
344
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
345
|
-
const preGroupedFlatRows = table.getFilteredRowModel().flatRows
|
|
346
|
-
const rowSelection = table.atoms.rowSelection?.get() ?? {}
|
|
347
|
-
|
|
348
|
-
let isAllRowsSelected = Boolean(
|
|
349
|
-
preGroupedFlatRows.length && Object.keys(rowSelection).length,
|
|
350
|
-
)
|
|
351
|
-
|
|
352
|
-
if (isAllRowsSelected) {
|
|
353
|
-
if (
|
|
354
|
-
preGroupedFlatRows.some(
|
|
355
|
-
(row) => row_getCanSelect(row) && !isRowSelected(row, rowSelection),
|
|
356
|
-
)
|
|
357
|
-
) {
|
|
358
|
-
isAllRowsSelected = false
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return isAllRowsSelected
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Checks whether every selectable row on the current page is selected.
|
|
367
|
-
*
|
|
368
|
-
* Non-selectable rows are ignored for this calculation.
|
|
369
|
-
*
|
|
370
|
-
* @example
|
|
371
|
-
* ```ts
|
|
372
|
-
* const allPageRowsSelected = table_getIsAllPageRowsSelected(table)
|
|
373
|
-
* ```
|
|
374
|
-
*/
|
|
375
|
-
export function table_getIsAllPageRowsSelected<
|
|
376
|
-
TFeatures extends TableFeatures,
|
|
377
|
-
TData extends RowData,
|
|
378
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
379
|
-
const paginationFlatRows = table
|
|
380
|
-
.getPaginatedRowModel()
|
|
381
|
-
.flatRows.filter((row) => row_getCanSelect(row))
|
|
382
|
-
const rowSelection = table.atoms.rowSelection?.get() ?? {}
|
|
383
|
-
|
|
384
|
-
let isAllPageRowsSelected = !!paginationFlatRows.length
|
|
385
|
-
|
|
386
|
-
if (
|
|
387
|
-
isAllPageRowsSelected &&
|
|
388
|
-
paginationFlatRows.some((row) => !isRowSelected(row, rowSelection))
|
|
389
|
-
) {
|
|
390
|
-
isAllPageRowsSelected = false
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return isAllPageRowsSelected
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Checks whether selection is partially applied across filtered rows.
|
|
398
|
-
*
|
|
399
|
-
* The result is true when at least one row id is selected
|
|
400
|
-
*
|
|
401
|
-
* @example
|
|
402
|
-
* ```ts
|
|
403
|
-
* const someRowsSelected = table_getIsSomeRowsSelected(table)
|
|
404
|
-
* ```
|
|
405
|
-
*/
|
|
406
|
-
export function table_getIsSomeRowsSelected<
|
|
407
|
-
TFeatures extends TableFeatures,
|
|
408
|
-
TData extends RowData,
|
|
409
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
410
|
-
return (
|
|
411
|
-
callMemoOrStaticFn(table, 'getSelectedRowIds', table_getSelectedRowIds)
|
|
412
|
-
.length > 0
|
|
413
|
-
)
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Checks whether the current page has a partial selection.
|
|
418
|
-
*
|
|
419
|
-
* @example
|
|
420
|
-
* ```ts
|
|
421
|
-
* const somePageRowsSelected = table_getIsSomePageRowsSelected(table)
|
|
422
|
-
* ```
|
|
423
|
-
*/
|
|
424
|
-
export function table_getIsSomePageRowsSelected<
|
|
425
|
-
TFeatures extends TableFeatures,
|
|
426
|
-
TData extends RowData,
|
|
427
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
428
|
-
return table
|
|
429
|
-
.getPaginatedRowModel()
|
|
430
|
-
.flatRows.filter((row) => row_getCanSelect(row))
|
|
431
|
-
.some(
|
|
432
|
-
(row) =>
|
|
433
|
-
row_getIsSelected(row) ||
|
|
434
|
-
callMemoOrStaticFn(row, 'getIsSomeSelected', row_getIsSomeSelected),
|
|
435
|
-
)
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Creates a checkbox-style handler that selects or deselects all rows.
|
|
440
|
-
*
|
|
441
|
-
* The handler reads `event.target.checked`, so it is intended for controls whose
|
|
442
|
-
* checked state means "all rows selected".
|
|
443
|
-
*
|
|
444
|
-
* @example
|
|
445
|
-
* ```ts
|
|
446
|
-
* const onChange = table_getToggleAllRowsSelectedHandler(table)
|
|
447
|
-
* ```
|
|
448
|
-
*/
|
|
449
|
-
export function table_getToggleAllRowsSelectedHandler<
|
|
450
|
-
TFeatures extends TableFeatures,
|
|
451
|
-
TData extends RowData,
|
|
452
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
453
|
-
return (e: unknown) => {
|
|
454
|
-
table_toggleAllRowsSelected(
|
|
455
|
-
table,
|
|
456
|
-
((e as MouseEvent).target as HTMLInputElement).checked,
|
|
457
|
-
)
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Creates a checkbox-style handler that selects or deselects current page rows.
|
|
463
|
-
*
|
|
464
|
-
* The handler reads `event.target.checked`, so it is intended for controls whose
|
|
465
|
-
* checked state means "all page rows selected".
|
|
466
|
-
*
|
|
467
|
-
* @example
|
|
468
|
-
* ```ts
|
|
469
|
-
* const onChange = table_getToggleAllPageRowsSelectedHandler(table)
|
|
470
|
-
* ```
|
|
471
|
-
*/
|
|
472
|
-
export function table_getToggleAllPageRowsSelectedHandler<
|
|
473
|
-
TFeatures extends TableFeatures,
|
|
474
|
-
TData extends RowData,
|
|
475
|
-
>(table: Table_Internal<TFeatures, TData>) {
|
|
476
|
-
return (e: unknown) => {
|
|
477
|
-
table_toggleAllPageRowsSelected(
|
|
478
|
-
table,
|
|
479
|
-
((e as MouseEvent).target as HTMLInputElement).checked,
|
|
480
|
-
)
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// Row APIs
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Selects or deselects this row.
|
|
488
|
-
*
|
|
489
|
-
* Omitting `value` toggles the row. Child rows are selected recursively unless
|
|
490
|
-
* `opts.selectChildren` is `false` or sub-row selection is disabled.
|
|
491
|
-
*
|
|
492
|
-
* @example
|
|
493
|
-
* ```ts
|
|
494
|
-
* row_toggleSelected(row)
|
|
495
|
-
* row_toggleSelected(row, true)
|
|
496
|
-
* row_toggleSelected(row, false)
|
|
497
|
-
* row_toggleSelected(row, true, { selectChildren: false })
|
|
498
|
-
* row_toggleSelected(row, false, { selectChildren: false })
|
|
499
|
-
* ```
|
|
500
|
-
*/
|
|
501
|
-
export function row_toggleSelected<
|
|
502
|
-
TFeatures extends TableFeatures,
|
|
503
|
-
TData extends RowData,
|
|
504
|
-
>(row: Row<TFeatures, TData>, value?: boolean, opts?: ToggleSelectedOptions) {
|
|
505
|
-
const isSelected = row_getIsSelected(row)
|
|
506
|
-
|
|
507
|
-
table_setRowSelection(row.table, (old) => {
|
|
508
|
-
value = typeof value !== 'undefined' ? value : !isSelected
|
|
509
|
-
|
|
510
|
-
const rowSelection = Object.assign(makeObjectMap<true>(), old)
|
|
511
|
-
|
|
512
|
-
mutateRowIsSelected(
|
|
513
|
-
rowSelection,
|
|
514
|
-
row.id,
|
|
515
|
-
value,
|
|
516
|
-
opts?.selectChildren ?? true,
|
|
517
|
-
row.table,
|
|
518
|
-
)
|
|
519
|
-
|
|
520
|
-
return rowSelection
|
|
521
|
-
})
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Checks whether this row id is selected in `state.rowSelection`.
|
|
526
|
-
*
|
|
527
|
-
* Missing row ids are treated as not selected.
|
|
528
|
-
*
|
|
529
|
-
* @example
|
|
530
|
-
* ```ts
|
|
531
|
-
* const selected = row_getIsSelected(row)
|
|
532
|
-
* ```
|
|
533
|
-
*/
|
|
534
|
-
export function row_getIsSelected<
|
|
535
|
-
TFeatures extends TableFeatures,
|
|
536
|
-
TData extends RowData,
|
|
537
|
-
>(row: Row<TFeatures, TData>) {
|
|
538
|
-
const rowSelection = row.table.atoms.rowSelection?.get() ?? {}
|
|
539
|
-
return isRowSelected(row, rowSelection)
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Checks whether some, but not all, selectable descendants are selected.
|
|
544
|
-
*
|
|
545
|
-
* This supports indeterminate selection UI for parent rows.
|
|
546
|
-
*
|
|
547
|
-
* @example
|
|
548
|
-
* ```ts
|
|
549
|
-
* const partial = row_getIsSomeSelected(row)
|
|
550
|
-
* ```
|
|
551
|
-
*/
|
|
552
|
-
export function row_getIsSomeSelected<
|
|
553
|
-
TFeatures extends TableFeatures,
|
|
554
|
-
TData extends RowData,
|
|
555
|
-
>(row: Row<TFeatures, TData>) {
|
|
556
|
-
return isSubRowSelected(row) === 'some'
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* Checks whether all selectable descendants are selected.
|
|
561
|
-
*
|
|
562
|
-
* Rows without selectable descendants return false.
|
|
563
|
-
*
|
|
564
|
-
* @example
|
|
565
|
-
* ```ts
|
|
566
|
-
* const allChildrenSelected = row_getIsAllSubRowsSelected(row)
|
|
567
|
-
* ```
|
|
568
|
-
*/
|
|
569
|
-
export function row_getIsAllSubRowsSelected<
|
|
570
|
-
TFeatures extends TableFeatures,
|
|
571
|
-
TData extends RowData,
|
|
572
|
-
>(row: Row<TFeatures, TData>) {
|
|
573
|
-
return isSubRowSelected(row) === 'all'
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* Checks whether this row can be selected.
|
|
578
|
-
*
|
|
579
|
-
* `options.enableRowSelection` may be a boolean or a row predicate; it defaults
|
|
580
|
-
* to `true`.
|
|
581
|
-
*
|
|
582
|
-
* @example
|
|
583
|
-
* ```ts
|
|
584
|
-
* const canSelect = row_getCanSelect(row)
|
|
585
|
-
* ```
|
|
586
|
-
*/
|
|
587
|
-
export function row_getCanSelect<
|
|
588
|
-
TFeatures extends TableFeatures,
|
|
589
|
-
TData extends RowData,
|
|
590
|
-
>(row: Row<TFeatures, TData>) {
|
|
591
|
-
const options = row.table.options
|
|
592
|
-
if (typeof options.enableRowSelection === 'function') {
|
|
593
|
-
return options.enableRowSelection(row)
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
return options.enableRowSelection ?? true
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* Checks whether selecting this row should also select its subRows.
|
|
601
|
-
*
|
|
602
|
-
* `options.enableSubRowSelection` may be a boolean or a row predicate; it
|
|
603
|
-
* defaults to `true`.
|
|
604
|
-
*
|
|
605
|
-
* @example
|
|
606
|
-
* ```ts
|
|
607
|
-
* const canSelectChildren = row_getCanSelectSubRows(row)
|
|
608
|
-
* ```
|
|
609
|
-
*/
|
|
610
|
-
export function row_getCanSelectSubRows<
|
|
611
|
-
TFeatures extends TableFeatures,
|
|
612
|
-
TData extends RowData,
|
|
613
|
-
>(row: Row<TFeatures, TData>) {
|
|
614
|
-
const options = row.table.options
|
|
615
|
-
if (typeof options.enableSubRowSelection === 'function') {
|
|
616
|
-
return options.enableSubRowSelection(row)
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
return options.enableSubRowSelection ?? true
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Checks whether this row can be selected alongside other rows.
|
|
624
|
-
*
|
|
625
|
-
* `options.enableMultiRowSelection` may be a boolean or a row predicate; it
|
|
626
|
-
* defaults to `true`.
|
|
627
|
-
*
|
|
628
|
-
* @example
|
|
629
|
-
* ```ts
|
|
630
|
-
* const canMultiSelect = row_getCanMultiSelect(row)
|
|
631
|
-
* ```
|
|
632
|
-
*/
|
|
633
|
-
export function row_getCanMultiSelect<
|
|
634
|
-
TFeatures extends TableFeatures,
|
|
635
|
-
TData extends RowData,
|
|
636
|
-
>(row: Row<TFeatures, TData>) {
|
|
637
|
-
const options = row.table.options
|
|
638
|
-
if (typeof options.enableMultiRowSelection === 'function') {
|
|
639
|
-
return options.enableMultiRowSelection(row)
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
return options.enableMultiRowSelection ?? true
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Creates a checkbox-style handler that selects or deselects this row.
|
|
647
|
-
*
|
|
648
|
-
* The handler is a no-op when the row cannot be selected and reads
|
|
649
|
-
* `event.target.checked`. Shift events select or deselect the inclusive range
|
|
650
|
-
* from the most recent selectable row handled by this table. The event's
|
|
651
|
-
* optional `persist()` method is called before it is read. Pass
|
|
652
|
-
* `selectChildren: false` to limit changes to rows explicitly present in the
|
|
653
|
-
* display-order interval.
|
|
654
|
-
*
|
|
655
|
-
* @example
|
|
656
|
-
* ```ts
|
|
657
|
-
* const onChange = row_getToggleSelectedHandler(row)
|
|
658
|
-
* ```
|
|
659
|
-
*/
|
|
660
|
-
export function row_getToggleSelectedHandler<
|
|
661
|
-
TFeatures extends TableFeatures,
|
|
662
|
-
TData extends RowData,
|
|
663
|
-
>(row: Row<TFeatures, TData>, opts?: ToggleSelectedOptions) {
|
|
664
|
-
const canSelect = row_getCanSelect(row)
|
|
665
|
-
|
|
666
|
-
return (e: unknown) => {
|
|
667
|
-
if (!canSelect) return
|
|
668
|
-
|
|
669
|
-
const event = e as {
|
|
670
|
-
persist?: () => void
|
|
671
|
-
target: { checked: boolean }
|
|
672
|
-
}
|
|
673
|
-
event.persist?.()
|
|
674
|
-
|
|
675
|
-
const table = row.table
|
|
676
|
-
const checked = event.target.checked
|
|
677
|
-
// @ts-ignore - _lastSelectedRowId is part of the RowSelection feature
|
|
678
|
-
const anchorId = table._lastSelectedRowId
|
|
679
|
-
const canSelectRange =
|
|
680
|
-
table.options.enableRowRangeSelection !== false &&
|
|
681
|
-
anchorId !== null &&
|
|
682
|
-
row_getCanMultiSelect(row) &&
|
|
683
|
-
(table.options.isRowRangeSelectionEvent?.(e) ?? false)
|
|
684
|
-
|
|
685
|
-
if (
|
|
686
|
-
!canSelectRange ||
|
|
687
|
-
!selectRowRange(row, anchorId, checked, opts?.selectChildren ?? true)
|
|
688
|
-
) {
|
|
689
|
-
row_toggleSelected(row, checked, opts)
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
// @ts-ignore - _lastSelectedRowId is part of the RowSelection feature
|
|
693
|
-
table._lastSelectedRowId = row.id
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Resolves and mutates an inclusive interval in the table's latest logical
|
|
699
|
-
* display order.
|
|
700
|
-
*
|
|
701
|
-
* The anchor is resolved without throwing from the pre-pagination row model,
|
|
702
|
-
* then the core row model. Both endpoint display indexes must still identify
|
|
703
|
-
* those rows in the current order and both endpoints must support
|
|
704
|
-
* multi-selection. Eligible interval rows are applied through one row
|
|
705
|
-
* selection updater; non-selectable and non-multi-selectable rows are skipped.
|
|
706
|
-
* Returns `false` when the interaction should fall back to an ordinary toggle.
|
|
707
|
-
*/
|
|
708
|
-
function selectRowRange<TFeatures extends TableFeatures, TData extends RowData>(
|
|
709
|
-
row: Row<TFeatures, TData>,
|
|
710
|
-
anchorId: string,
|
|
711
|
-
value: boolean,
|
|
712
|
-
includeChildren: boolean,
|
|
713
|
-
): boolean {
|
|
714
|
-
const table = row.table
|
|
715
|
-
const rows = table.getRowsInDisplayOrder()
|
|
716
|
-
const anchorRow =
|
|
717
|
-
table.getPrePaginatedRowModel().rowsById[anchorId] ??
|
|
718
|
-
table.getCoreRowModel().rowsById[anchorId]
|
|
719
|
-
|
|
720
|
-
if (!anchorRow) {
|
|
721
|
-
return false
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
const anchorIndex = anchorRow.getDisplayIndex()
|
|
725
|
-
const rowIndex = row.getDisplayIndex()
|
|
726
|
-
const anchorAtIndex = rows[anchorIndex]
|
|
727
|
-
const rowAtIndex = rows[rowIndex]
|
|
728
|
-
|
|
729
|
-
if (
|
|
730
|
-
anchorIndex < 0 ||
|
|
731
|
-
rowIndex < 0 ||
|
|
732
|
-
anchorIndex >= rows.length ||
|
|
733
|
-
rowIndex >= rows.length ||
|
|
734
|
-
anchorAtIndex?.id !== anchorRow.id ||
|
|
735
|
-
rowAtIndex?.id !== row.id ||
|
|
736
|
-
!row_getCanMultiSelect(anchorRow) ||
|
|
737
|
-
!row_getCanMultiSelect(row)
|
|
738
|
-
) {
|
|
739
|
-
return false
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
const start = Math.min(anchorIndex, rowIndex)
|
|
743
|
-
const end = Math.max(anchorIndex, rowIndex)
|
|
744
|
-
|
|
745
|
-
table_setRowSelection(table, (old) => {
|
|
746
|
-
const rowSelection = Object.assign(makeObjectMap<true>(), old)
|
|
747
|
-
|
|
748
|
-
for (let index = start; index <= end; index++) {
|
|
749
|
-
const rangeRow = rows[index]!
|
|
750
|
-
if (!row_getCanSelect(rangeRow) || !row_getCanMultiSelect(rangeRow)) {
|
|
751
|
-
continue
|
|
752
|
-
}
|
|
753
|
-
mutateRowIsSelected(
|
|
754
|
-
rowSelection,
|
|
755
|
-
rangeRow.id,
|
|
756
|
-
value,
|
|
757
|
-
includeChildren,
|
|
758
|
-
table,
|
|
759
|
-
)
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
return rowSelection
|
|
763
|
-
})
|
|
764
|
-
|
|
765
|
-
return true
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
const mutateRowIsSelected = <
|
|
769
|
-
TFeatures extends TableFeatures,
|
|
770
|
-
TData extends RowData,
|
|
771
|
-
>(
|
|
772
|
-
rowSelection: RowSelectionState,
|
|
773
|
-
rowId: string,
|
|
774
|
-
value: boolean,
|
|
775
|
-
includeChildren: boolean,
|
|
776
|
-
table: Table_Internal<TFeatures, TData>,
|
|
777
|
-
): void => {
|
|
778
|
-
const row = table.getRow(rowId, true)
|
|
779
|
-
|
|
780
|
-
if (value) {
|
|
781
|
-
if (!row_getCanMultiSelect(row)) {
|
|
782
|
-
Object.keys(rowSelection).forEach((key) => delete rowSelection[key])
|
|
783
|
-
}
|
|
784
|
-
if (row_getCanSelect(row)) {
|
|
785
|
-
rowSelection[rowId] = true
|
|
786
|
-
}
|
|
787
|
-
} else {
|
|
788
|
-
delete rowSelection[rowId]
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
if (includeChildren && row.subRows.length && row_getCanSelectSubRows(row)) {
|
|
792
|
-
row.subRows.forEach((r) =>
|
|
793
|
-
mutateRowIsSelected(rowSelection, r.id, value, includeChildren, table),
|
|
794
|
-
)
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* Builds a row model containing rows selected by the current row selection state.
|
|
800
|
-
*
|
|
801
|
-
* The result is derived from the supplied row model, so selected ids absent from
|
|
802
|
-
* that model are not materialized as rows.
|
|
803
|
-
*
|
|
804
|
-
* @example
|
|
805
|
-
* ```ts
|
|
806
|
-
* const selectedRows = selectRowsFn(rowModel)
|
|
807
|
-
* ```
|
|
808
|
-
*/
|
|
809
|
-
export function selectRowsFn<
|
|
810
|
-
TFeatures extends TableFeatures,
|
|
811
|
-
TData extends RowData,
|
|
812
|
-
>(
|
|
813
|
-
rowModel: RowModel<TFeatures, TData>,
|
|
814
|
-
table: Table_Internal<TFeatures, TData>,
|
|
815
|
-
): RowModel<TFeatures, TData> {
|
|
816
|
-
const newSelectedFlatRows: Array<Row<TFeatures, TData>> = []
|
|
817
|
-
const newSelectedRowsById = makeObjectMap<Row<TFeatures, TData>>()
|
|
818
|
-
const rowSelection = table.atoms.rowSelection?.get() ?? {}
|
|
819
|
-
// Filters top level and nested rows.
|
|
820
|
-
const recurseRows = (
|
|
821
|
-
rows: Array<Row<TFeatures, TData>>,
|
|
822
|
-
depth = 0,
|
|
823
|
-
): Array<Row<TFeatures, TData>> => {
|
|
824
|
-
const result: Array<Row<TFeatures, TData>> = []
|
|
825
|
-
for (let i = 0; i < rows.length; i++) {
|
|
826
|
-
const row = rows[i]!
|
|
827
|
-
const isSelected = isRowSelected(row, rowSelection)
|
|
828
|
-
|
|
829
|
-
if (isSelected) {
|
|
830
|
-
newSelectedFlatRows.push(row)
|
|
831
|
-
newSelectedRowsById[row.id] = row
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
if (row.subRows.length) {
|
|
835
|
-
// Always recurse — selected descendants of unselected parents must
|
|
836
|
-
// still be collected into flatRows/rowsById.
|
|
837
|
-
const newSubRows = recurseRows(row.subRows, depth + 1)
|
|
838
|
-
|
|
839
|
-
if (isSelected) {
|
|
840
|
-
// Preserve prototype chain so methods like getValue() remain accessible
|
|
841
|
-
const cloned = Object.create(Object.getPrototypeOf(row))
|
|
842
|
-
copyInstancePropertiesWithoutMemos(cloned, row)
|
|
843
|
-
cloned.subRows = newSubRows
|
|
844
|
-
result.push(cloned)
|
|
845
|
-
}
|
|
846
|
-
} else if (isSelected) {
|
|
847
|
-
result.push(row)
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
return result
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
return {
|
|
854
|
-
rows: recurseRows(rowModel.rows),
|
|
855
|
-
flatRows: newSelectedFlatRows,
|
|
856
|
-
rowsById: newSelectedRowsById,
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Returns whether a row id is selected in the current row selection state.
|
|
862
|
-
*
|
|
863
|
-
* @example
|
|
864
|
-
* ```ts
|
|
865
|
-
* const selected = isRowSelected(row)
|
|
866
|
-
* ```
|
|
867
|
-
*/
|
|
868
|
-
export function isRowSelected<
|
|
869
|
-
TFeatures extends TableFeatures,
|
|
870
|
-
TData extends RowData,
|
|
871
|
-
>(row: Row<TFeatures, TData>, rowSelection: RowSelectionState): boolean {
|
|
872
|
-
return !!(hasOwn(rowSelection, row.id) && rowSelection[row.id])
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
* Returns whether all, some, or none of a row's selectable descendants are selected.
|
|
877
|
-
*
|
|
878
|
-
* The result is used to drive indeterminate row selection UI.
|
|
879
|
-
*
|
|
880
|
-
* @example
|
|
881
|
-
* ```ts
|
|
882
|
-
* const selectedState = isSubRowSelected(row)
|
|
883
|
-
* ```
|
|
884
|
-
*/
|
|
885
|
-
export function isSubRowSelected<
|
|
886
|
-
TFeatures extends TableFeatures,
|
|
887
|
-
TData extends RowData,
|
|
888
|
-
>(row: Row<TFeatures, TData>): boolean | 'some' | 'all' {
|
|
889
|
-
if (!row.subRows.length) return false
|
|
890
|
-
|
|
891
|
-
const rowSelection = row.table.atoms.rowSelection?.get() ?? {}
|
|
892
|
-
|
|
893
|
-
let someSelected = false
|
|
894
|
-
let allChildrenSelected = true
|
|
895
|
-
|
|
896
|
-
for (let i = 0; i < row.subRows.length; i++) {
|
|
897
|
-
const subRow = row.subRows[i]!
|
|
898
|
-
|
|
899
|
-
// Bail out early if we know both of these
|
|
900
|
-
if (someSelected && !allChildrenSelected) {
|
|
901
|
-
break
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
if (row_getCanSelect(subRow)) {
|
|
905
|
-
if (isRowSelected(subRow, rowSelection)) {
|
|
906
|
-
someSelected = true
|
|
907
|
-
} else {
|
|
908
|
-
allChildrenSelected = false
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
// Check row selection of nested subrows
|
|
913
|
-
if (subRow.subRows.length) {
|
|
914
|
-
const subRowChildrenSelected = isSubRowSelected(subRow)
|
|
915
|
-
if (subRowChildrenSelected === 'all') {
|
|
916
|
-
someSelected = true
|
|
917
|
-
} else if (subRowChildrenSelected === 'some') {
|
|
918
|
-
someSelected = true
|
|
919
|
-
allChildrenSelected = false
|
|
920
|
-
} else {
|
|
921
|
-
allChildrenSelected = false
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
return allChildrenSelected ? 'all' : someSelected ? 'some' : false
|
|
927
|
-
}
|