@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,114 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
|
|
3
|
-
//#region src/features/column-faceting/columnFacetingFeature.utils.ts
|
|
4
|
-
/**
|
|
5
|
-
* Computes min and max numeric facet values for one column.
|
|
6
|
-
*
|
|
7
|
-
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
8
|
-
* If no factory is registered, the result is `undefined`.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const range = column_getFacetedMinMaxValues(column, table)
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
function column_getFacetedMinMaxValues(column, table) {
|
|
16
|
-
const facetedMinMaxValues = table._rowModels.facetedMinMaxValues ??= require_utils.makeObjectMap();
|
|
17
|
-
let facetedMinMaxValuesFn = facetedMinMaxValues[column.id];
|
|
18
|
-
if (!facetedMinMaxValuesFn) facetedMinMaxValuesFn = facetedMinMaxValues[column.id] = table.options.features.facetedMinMaxValues?.(table, column.id) ?? (() => void 0);
|
|
19
|
-
return facetedMinMaxValuesFn();
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Computes the row model used to derive one column's facet values.
|
|
23
|
-
*
|
|
24
|
-
* The faceted row model normally applies every other active filter while
|
|
25
|
-
* excluding this column's own filter. If no factory is registered, the
|
|
26
|
-
* pre-filtered row model is returned.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const rows = column_getFacetedRowModel(column, table)
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
function column_getFacetedRowModel(column, table) {
|
|
34
|
-
const columnId = column?.id ?? "";
|
|
35
|
-
const facetedRowModels = table._rowModels.facetedRowModels ??= require_utils.makeObjectMap();
|
|
36
|
-
let facetedRowModelFn = facetedRowModels[columnId];
|
|
37
|
-
if (!facetedRowModelFn) facetedRowModelFn = facetedRowModels[columnId] = table.options.features.facetedRowModel?.(table, columnId) ?? (() => table.getPreFilteredRowModel());
|
|
38
|
-
return facetedRowModelFn();
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Computes unique facet values and their occurrence counts for one column.
|
|
42
|
-
*
|
|
43
|
-
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
44
|
-
* If no factory is registered, an empty `Map` is returned.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* const values = column_getFacetedUniqueValues(column, table)
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
function column_getFacetedUniqueValues(column, table) {
|
|
52
|
-
const facetedUniqueValues = table._rowModels.facetedUniqueValues ??= require_utils.makeObjectMap();
|
|
53
|
-
let facetedUniqueValuesFn = facetedUniqueValues[column.id];
|
|
54
|
-
if (!facetedUniqueValuesFn) facetedUniqueValuesFn = facetedUniqueValues[column.id] = table.options.features.facetedUniqueValues?.(table, column.id) ?? (() => /* @__PURE__ */ new Map());
|
|
55
|
-
return facetedUniqueValuesFn();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Computes min and max numeric facet values for the global filter context.
|
|
59
|
-
*
|
|
60
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
61
|
-
* no factory is registered, the result is `undefined`.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
function table_getGlobalFacetedMinMaxValues(table) {
|
|
69
|
-
if (!table._rowModels.globalFacetedMinMaxValues) table._rowModels.globalFacetedMinMaxValues = table.options.features.facetedMinMaxValues?.(table, "__global__") ?? (() => void 0);
|
|
70
|
-
const facetedMinMaxValuesFn = table._rowModels.globalFacetedMinMaxValues;
|
|
71
|
-
return facetedMinMaxValuesFn();
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Computes the row model used to derive global facet values.
|
|
75
|
-
*
|
|
76
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
77
|
-
* no faceted row-model factory is registered, the pre-filtered row model is
|
|
78
|
-
* returned.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```ts
|
|
82
|
-
* const rows = table_getGlobalFacetedRowModel(table)
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
function table_getGlobalFacetedRowModel(table) {
|
|
86
|
-
if (!table._rowModels.globalFacetedRowModel) table._rowModels.globalFacetedRowModel = table.options.features.facetedRowModel?.(table, "__global__") ?? (() => table.getPreFilteredRowModel());
|
|
87
|
-
const facetedRowModelFn = table._rowModels.globalFacetedRowModel;
|
|
88
|
-
return facetedRowModelFn();
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Computes unique values and occurrence counts for the global filter context.
|
|
92
|
-
*
|
|
93
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
94
|
-
* no factory is registered, an empty `Map` is returned.
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
function table_getGlobalFacetedUniqueValues(table) {
|
|
102
|
-
if (!table._rowModels.globalFacetedUniqueValues) table._rowModels.globalFacetedUniqueValues = table.options.features.facetedUniqueValues?.(table, "__global__") ?? (() => /* @__PURE__ */ new Map());
|
|
103
|
-
const facetedUniqueValuesFn = table._rowModels.globalFacetedUniqueValues;
|
|
104
|
-
return facetedUniqueValuesFn();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
//#endregion
|
|
108
|
-
exports.column_getFacetedMinMaxValues = column_getFacetedMinMaxValues;
|
|
109
|
-
exports.column_getFacetedRowModel = column_getFacetedRowModel;
|
|
110
|
-
exports.column_getFacetedUniqueValues = column_getFacetedUniqueValues;
|
|
111
|
-
exports.table_getGlobalFacetedMinMaxValues = table_getGlobalFacetedMinMaxValues;
|
|
112
|
-
exports.table_getGlobalFacetedRowModel = table_getGlobalFacetedRowModel;
|
|
113
|
-
exports.table_getGlobalFacetedUniqueValues = table_getGlobalFacetedUniqueValues;
|
|
114
|
-
//# sourceMappingURL=columnFacetingFeature.utils.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnFacetingFeature.utils.cjs","names":["makeObjectMap"],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import { makeObjectMap } from '../../utils'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\n\n/**\n * Computes min and max numeric facet values for one column.\n *\n * The configured `facetedMinMaxValues` row-model factory owns the calculation.\n * If no factory is registered, the result is `undefined`.\n *\n * @example\n * ```ts\n * const range = column_getFacetedMinMaxValues(column, table)\n * ```\n */\nexport function column_getFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n table: Table_Internal<TFeatures, TData>,\n): [number, number] | undefined {\n const facetedMinMaxValues = (table._rowModels.facetedMinMaxValues ??=\n makeObjectMap())\n let facetedMinMaxValuesFn = facetedMinMaxValues[column.id]\n\n if (!facetedMinMaxValuesFn) {\n facetedMinMaxValuesFn = facetedMinMaxValues[column.id] =\n table.options.features.facetedMinMaxValues?.(table, column.id) ??\n (() => undefined)\n }\n\n return facetedMinMaxValuesFn()\n}\n\n/**\n * Computes the row model used to derive one column's facet values.\n *\n * The faceted row model normally applies every other active filter while\n * excluding this column's own filter. If no factory is registered, the\n * pre-filtered row model is returned.\n *\n * @example\n * ```ts\n * const rows = column_getFacetedRowModel(column, table)\n * ```\n */\nexport function column_getFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const columnId = column?.id ?? ''\n const facetedRowModels = (table._rowModels.facetedRowModels ??=\n makeObjectMap())\n let facetedRowModelFn = facetedRowModels[columnId]\n\n if (!facetedRowModelFn) {\n facetedRowModelFn = facetedRowModels[columnId] =\n table.options.features.facetedRowModel?.(table, columnId) ??\n (() => table.getPreFilteredRowModel())\n }\n\n return facetedRowModelFn()\n}\n\n/**\n * Computes unique facet values and their occurrence counts for one column.\n *\n * The configured `facetedUniqueValues` row-model factory owns the calculation.\n * If no factory is registered, an empty `Map` is returned.\n *\n * @example\n * ```ts\n * const values = column_getFacetedUniqueValues(column, table)\n * ```\n */\nexport function column_getFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n table: Table_Internal<TFeatures, TData>,\n): Map<any, number> {\n const facetedUniqueValues = (table._rowModels.facetedUniqueValues ??=\n makeObjectMap())\n let facetedUniqueValuesFn = facetedUniqueValues[column.id]\n\n if (!facetedUniqueValuesFn) {\n facetedUniqueValuesFn = facetedUniqueValues[column.id] =\n table.options.features.facetedUniqueValues?.(table, column.id) ??\n (() => new Map<any, number>())\n }\n\n return facetedUniqueValuesFn()\n}\n\n/**\n * Computes min and max numeric facet values for the global filter context.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no factory is registered, the result is `undefined`.\n *\n * @example\n * ```ts\n * const range = table_getGlobalFacetedMinMaxValues(table)\n * ```\n */\nexport function table_getGlobalFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): undefined | [number, number] {\n if (!table._rowModels.globalFacetedMinMaxValues) {\n table._rowModels.globalFacetedMinMaxValues =\n table.options.features.facetedMinMaxValues?.(table, '__global__') ??\n (() => undefined)\n }\n\n const facetedMinMaxValuesFn = table._rowModels.globalFacetedMinMaxValues\n return facetedMinMaxValuesFn()\n}\n\n/**\n * Computes the row model used to derive global facet values.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no faceted row-model factory is registered, the pre-filtered row model is\n * returned.\n *\n * @example\n * ```ts\n * const rows = table_getGlobalFacetedRowModel(table)\n * ```\n */\nexport function table_getGlobalFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n if (!table._rowModels.globalFacetedRowModel) {\n table._rowModels.globalFacetedRowModel =\n table.options.features.facetedRowModel?.(table, '__global__') ??\n (() => table.getPreFilteredRowModel())\n }\n\n const facetedRowModelFn = table._rowModels.globalFacetedRowModel\n return facetedRowModelFn()\n}\n\n/**\n * Computes unique values and occurrence counts for the global filter context.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no factory is registered, an empty `Map` is returned.\n *\n * @example\n * ```ts\n * const values = table_getGlobalFacetedUniqueValues(table)\n * ```\n */\nexport function table_getGlobalFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Map<any, number> {\n if (!table._rowModels.globalFacetedUniqueValues) {\n table._rowModels.globalFacetedUniqueValues =\n table.options.features.facetedUniqueValues?.(table, '__global__') ??\n (() => new Map())\n }\n\n const facetedUniqueValuesFn = table._rowModels.globalFacetedUniqueValues\n return facetedUniqueValuesFn()\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,8BAKd,QACA,OAC8B;CAC9B,MAAM,sBAAuB,MAAM,WAAW,wBAC5CA,4BAAc;CAChB,IAAI,wBAAwB,oBAAoB,OAAO;CAEvD,IAAI,CAAC,uBACH,wBAAwB,oBAAoB,OAAO,MACjD,MAAM,QAAQ,SAAS,sBAAsB,OAAO,OAAO,EAAE,YACtD;CAGX,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;;AAcA,SAAgB,0BAKd,QACA,OAC4B;CAC5B,MAAM,WAAW,QAAQ,MAAM;CAC/B,MAAM,mBAAoB,MAAM,WAAW,qBACzCA,4BAAc;CAChB,IAAI,oBAAoB,iBAAiB;CAEzC,IAAI,CAAC,mBACH,oBAAoB,iBAAiB,YACnC,MAAM,QAAQ,SAAS,kBAAkB,OAAO,QAAQ,YACjD,MAAM,uBAAuB;CAGxC,OAAO,kBAAkB;AAC3B;;;;;;;;;;;;AAaA,SAAgB,8BAKd,QACA,OACkB;CAClB,MAAM,sBAAuB,MAAM,WAAW,wBAC5CA,4BAAc;CAChB,IAAI,wBAAwB,oBAAoB,OAAO;CAEvD,IAAI,CAAC,uBACH,wBAAwB,oBAAoB,OAAO,MACjD,MAAM,QAAQ,SAAS,sBAAsB,OAAO,OAAO,EAAE,4BACtD,IAAI,IAAiB;CAGhC,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;AAaA,SAAgB,mCAGd,OAAuE;CACvE,IAAI,CAAC,MAAM,WAAW,2BACpB,MAAM,WAAW,4BACf,MAAM,QAAQ,SAAS,sBAAsB,OAAO,YAAY,YACzD;CAGX,MAAM,wBAAwB,MAAM,WAAW;CAC/C,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;;AAcA,SAAgB,+BAGd,OAAqE;CACrE,IAAI,CAAC,MAAM,WAAW,uBACpB,MAAM,WAAW,wBACf,MAAM,QAAQ,SAAS,kBAAkB,OAAO,YAAY,YACrD,MAAM,uBAAuB;CAGxC,MAAM,oBAAoB,MAAM,WAAW;CAC3C,OAAO,kBAAkB;AAC3B;;;;;;;;;;;;AAaA,SAAgB,mCAGd,OAA2D;CAC3D,IAAI,CAAC,MAAM,WAAW,2BACpB,MAAM,WAAW,4BACf,MAAM,QAAQ,SAAS,sBAAsB,OAAO,YAAY,4BACzD,IAAI,IAAI;CAGnB,MAAM,wBAAwB,MAAM,WAAW;CAC/C,OAAO,sBAAsB;AAC/B"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { CellData, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
|
|
3
|
-
import { Table } from "../../types/Table.cjs";
|
|
4
|
-
import { Column } from "../../types/Column.cjs";
|
|
5
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
6
|
-
|
|
7
|
-
//#region src/features/column-faceting/columnFacetingFeature.utils.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Computes min and max numeric facet values for one column.
|
|
10
|
-
*
|
|
11
|
-
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
12
|
-
* If no factory is registered, the result is `undefined`.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const range = column_getFacetedMinMaxValues(column, table)
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function column_getFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, table: Table<TFeatures, TData>): [number, number] | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Computes the row model used to derive one column's facet values.
|
|
22
|
-
*
|
|
23
|
-
* The faceted row model normally applies every other active filter while
|
|
24
|
-
* excluding this column's own filter. If no factory is registered, the
|
|
25
|
-
* pre-filtered row model is returned.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const rows = column_getFacetedRowModel(column, table)
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
declare function column_getFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue> | undefined, table: Table<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
33
|
-
/**
|
|
34
|
-
* Computes unique facet values and their occurrence counts for one column.
|
|
35
|
-
*
|
|
36
|
-
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
37
|
-
* If no factory is registered, an empty `Map` is returned.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const values = column_getFacetedUniqueValues(column, table)
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
declare function column_getFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, table: Table<TFeatures, TData>): Map<any, number>;
|
|
45
|
-
/**
|
|
46
|
-
* Computes min and max numeric facet values for the global filter context.
|
|
47
|
-
*
|
|
48
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
49
|
-
* no factory is registered, the result is `undefined`.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
declare function table_getGlobalFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>): undefined | [number, number];
|
|
57
|
-
/**
|
|
58
|
-
* Computes the row model used to derive global facet values.
|
|
59
|
-
*
|
|
60
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
61
|
-
* no faceted row-model factory is registered, the pre-filtered row model is
|
|
62
|
-
* returned.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* const rows = table_getGlobalFacetedRowModel(table)
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
declare function table_getGlobalFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
70
|
-
/**
|
|
71
|
-
* Computes unique values and occurrence counts for the global filter context.
|
|
72
|
-
*
|
|
73
|
-
* The global context is requested with the internal `__global__` column id. If
|
|
74
|
-
* no factory is registered, an empty `Map` is returned.
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```ts
|
|
78
|
-
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
declare function table_getGlobalFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>): Map<any, number>;
|
|
82
|
-
//#endregion
|
|
83
|
-
export { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues };
|
|
84
|
-
//# sourceMappingURL=columnFacetingFeature.utils.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnFacetingFeature.utils.js","names":[],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import { makeObjectMap } from '../../utils'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../../types/Table'\nimport type { Column_Internal } from '../../types/Column'\n\n/**\n * Computes min and max numeric facet values for one column.\n *\n * The configured `facetedMinMaxValues` row-model factory owns the calculation.\n * If no factory is registered, the result is `undefined`.\n *\n * @example\n * ```ts\n * const range = column_getFacetedMinMaxValues(column, table)\n * ```\n */\nexport function column_getFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n table: Table_Internal<TFeatures, TData>,\n): [number, number] | undefined {\n const facetedMinMaxValues = (table._rowModels.facetedMinMaxValues ??=\n makeObjectMap())\n let facetedMinMaxValuesFn = facetedMinMaxValues[column.id]\n\n if (!facetedMinMaxValuesFn) {\n facetedMinMaxValuesFn = facetedMinMaxValues[column.id] =\n table.options.features.facetedMinMaxValues?.(table, column.id) ??\n (() => undefined)\n }\n\n return facetedMinMaxValuesFn()\n}\n\n/**\n * Computes the row model used to derive one column's facet values.\n *\n * The faceted row model normally applies every other active filter while\n * excluding this column's own filter. If no factory is registered, the\n * pre-filtered row model is returned.\n *\n * @example\n * ```ts\n * const rows = column_getFacetedRowModel(column, table)\n * ```\n */\nexport function column_getFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue> | undefined,\n table: Table_Internal<TFeatures, TData>,\n): RowModel<TFeatures, TData> {\n const columnId = column?.id ?? ''\n const facetedRowModels = (table._rowModels.facetedRowModels ??=\n makeObjectMap())\n let facetedRowModelFn = facetedRowModels[columnId]\n\n if (!facetedRowModelFn) {\n facetedRowModelFn = facetedRowModels[columnId] =\n table.options.features.facetedRowModel?.(table, columnId) ??\n (() => table.getPreFilteredRowModel())\n }\n\n return facetedRowModelFn()\n}\n\n/**\n * Computes unique facet values and their occurrence counts for one column.\n *\n * The configured `facetedUniqueValues` row-model factory owns the calculation.\n * If no factory is registered, an empty `Map` is returned.\n *\n * @example\n * ```ts\n * const values = column_getFacetedUniqueValues(column, table)\n * ```\n */\nexport function column_getFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column_Internal<TFeatures, TData, TValue>,\n table: Table_Internal<TFeatures, TData>,\n): Map<any, number> {\n const facetedUniqueValues = (table._rowModels.facetedUniqueValues ??=\n makeObjectMap())\n let facetedUniqueValuesFn = facetedUniqueValues[column.id]\n\n if (!facetedUniqueValuesFn) {\n facetedUniqueValuesFn = facetedUniqueValues[column.id] =\n table.options.features.facetedUniqueValues?.(table, column.id) ??\n (() => new Map<any, number>())\n }\n\n return facetedUniqueValuesFn()\n}\n\n/**\n * Computes min and max numeric facet values for the global filter context.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no factory is registered, the result is `undefined`.\n *\n * @example\n * ```ts\n * const range = table_getGlobalFacetedMinMaxValues(table)\n * ```\n */\nexport function table_getGlobalFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): undefined | [number, number] {\n if (!table._rowModels.globalFacetedMinMaxValues) {\n table._rowModels.globalFacetedMinMaxValues =\n table.options.features.facetedMinMaxValues?.(table, '__global__') ??\n (() => undefined)\n }\n\n const facetedMinMaxValuesFn = table._rowModels.globalFacetedMinMaxValues\n return facetedMinMaxValuesFn()\n}\n\n/**\n * Computes the row model used to derive global facet values.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no faceted row-model factory is registered, the pre-filtered row model is\n * returned.\n *\n * @example\n * ```ts\n * const rows = table_getGlobalFacetedRowModel(table)\n * ```\n */\nexport function table_getGlobalFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData> {\n if (!table._rowModels.globalFacetedRowModel) {\n table._rowModels.globalFacetedRowModel =\n table.options.features.facetedRowModel?.(table, '__global__') ??\n (() => table.getPreFilteredRowModel())\n }\n\n const facetedRowModelFn = table._rowModels.globalFacetedRowModel\n return facetedRowModelFn()\n}\n\n/**\n * Computes unique values and occurrence counts for the global filter context.\n *\n * The global context is requested with the internal `__global__` column id. If\n * no factory is registered, an empty `Map` is returned.\n *\n * @example\n * ```ts\n * const values = table_getGlobalFacetedUniqueValues(table)\n * ```\n */\nexport function table_getGlobalFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): Map<any, number> {\n if (!table._rowModels.globalFacetedUniqueValues) {\n table._rowModels.globalFacetedUniqueValues =\n table.options.features.facetedUniqueValues?.(table, '__global__') ??\n (() => new Map())\n }\n\n const facetedUniqueValuesFn = table._rowModels.globalFacetedUniqueValues\n return facetedUniqueValuesFn()\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,8BAKd,QACA,OAC8B;CAC9B,MAAM,sBAAuB,MAAM,WAAW,wBAC5C,cAAc;CAChB,IAAI,wBAAwB,oBAAoB,OAAO;CAEvD,IAAI,CAAC,uBACH,wBAAwB,oBAAoB,OAAO,MACjD,MAAM,QAAQ,SAAS,sBAAsB,OAAO,OAAO,EAAE,YACtD;CAGX,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;;AAcA,SAAgB,0BAKd,QACA,OAC4B;CAC5B,MAAM,WAAW,QAAQ,MAAM;CAC/B,MAAM,mBAAoB,MAAM,WAAW,qBACzC,cAAc;CAChB,IAAI,oBAAoB,iBAAiB;CAEzC,IAAI,CAAC,mBACH,oBAAoB,iBAAiB,YACnC,MAAM,QAAQ,SAAS,kBAAkB,OAAO,QAAQ,YACjD,MAAM,uBAAuB;CAGxC,OAAO,kBAAkB;AAC3B;;;;;;;;;;;;AAaA,SAAgB,8BAKd,QACA,OACkB;CAClB,MAAM,sBAAuB,MAAM,WAAW,wBAC5C,cAAc;CAChB,IAAI,wBAAwB,oBAAoB,OAAO;CAEvD,IAAI,CAAC,uBACH,wBAAwB,oBAAoB,OAAO,MACjD,MAAM,QAAQ,SAAS,sBAAsB,OAAO,OAAO,EAAE,4BACtD,IAAI,IAAiB;CAGhC,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;AAaA,SAAgB,mCAGd,OAAuE;CACvE,IAAI,CAAC,MAAM,WAAW,2BACpB,MAAM,WAAW,4BACf,MAAM,QAAQ,SAAS,sBAAsB,OAAO,YAAY,YACzD;CAGX,MAAM,wBAAwB,MAAM,WAAW;CAC/C,OAAO,sBAAsB;AAC/B;;;;;;;;;;;;;AAcA,SAAgB,+BAGd,OAAqE;CACrE,IAAI,CAAC,MAAM,WAAW,uBACpB,MAAM,WAAW,wBACf,MAAM,QAAQ,SAAS,kBAAkB,OAAO,YAAY,YACrD,MAAM,uBAAuB;CAGxC,MAAM,oBAAoB,MAAM,WAAW;CAC3C,OAAO,kBAAkB;AAC3B;;;;;;;;;;;;AAaA,SAAgB,mCAGd,OAA2D;CAC3D,IAAI,CAAC,MAAM,WAAW,2BACpB,MAAM,WAAW,4BACf,MAAM,QAAQ,SAAS,sBAAsB,OAAO,YAAY,4BACzD,IAAI,IAAI;CAGnB,MAAM,wBAAwB,MAAM,WAAW;CAC/C,OAAO,sBAAsB;AAC/B"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_columnFacetingFeature_utils = require('./columnFacetingFeature.utils.cjs');
|
|
3
|
-
const require_globalFilteringFeature_utils = require('../global-filtering/globalFilteringFeature.utils.cjs');
|
|
4
|
-
|
|
5
|
-
//#region src/features/column-faceting/createFacetedMinMaxValues.ts
|
|
6
|
-
/**
|
|
7
|
-
* Creates a memoized faceted min max values helper for faceted filtering.
|
|
8
|
-
*
|
|
9
|
-
* The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.
|
|
10
|
-
*/
|
|
11
|
-
function createFacetedMinMaxValues() {
|
|
12
|
-
return (_table, columnId) => {
|
|
13
|
-
const table = _table;
|
|
14
|
-
return require_utils.tableMemo({
|
|
15
|
-
feature: "columnFacetingFeature",
|
|
16
|
-
fn: (flatRows) => _createFacetedMinMaxValues(table, columnId, flatRows),
|
|
17
|
-
fnName: "table.getFacetedMinMaxValues",
|
|
18
|
-
memoDeps: () => {
|
|
19
|
-
if (columnId === "__global__") return [require_utils.callMemoOrStaticFn(table, "getGlobalFacetedRowModel", require_columnFacetingFeature_utils.table_getGlobalFacetedRowModel).flatRows];
|
|
20
|
-
const column = table.getColumn(columnId);
|
|
21
|
-
if (!column) return [table.getPreFilteredRowModel().flatRows];
|
|
22
|
-
return [require_utils.callMemoOrStaticFn(column, "getFacetedRowModel", require_columnFacetingFeature_utils.column_getFacetedRowModel, table).flatRows];
|
|
23
|
-
},
|
|
24
|
-
table
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function _createFacetedMinMaxValues(table, columnId, flatRows) {
|
|
29
|
-
if (!flatRows.length) return void 0;
|
|
30
|
-
const columnIds = columnId === "__global__" ? table.getAllLeafColumns().filter((column) => require_globalFilteringFeature_utils.column_getCanGlobalFilter(column)).map((column) => column.id) : [columnId];
|
|
31
|
-
let facetedMinValue = Number.POSITIVE_INFINITY;
|
|
32
|
-
let facetedMaxValue = Number.NEGATIVE_INFINITY;
|
|
33
|
-
let foundAny = false;
|
|
34
|
-
for (let i = 0; i < flatRows.length; i++) for (let c = 0; c < columnIds.length; c++) {
|
|
35
|
-
const value = Number(flatRows[i].getValue(columnIds[c]));
|
|
36
|
-
if (Number.isNaN(value)) continue;
|
|
37
|
-
foundAny = true;
|
|
38
|
-
if (value < facetedMinValue) facetedMinValue = value;
|
|
39
|
-
if (value > facetedMaxValue) facetedMaxValue = value;
|
|
40
|
-
}
|
|
41
|
-
if (!foundAny) return void 0;
|
|
42
|
-
return [facetedMinValue, facetedMaxValue];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
exports.createFacetedMinMaxValues = createFacetedMinMaxValues;
|
|
47
|
-
//# sourceMappingURL=createFacetedMinMaxValues.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedMinMaxValues.cjs","names":["tableMemo","callMemoOrStaticFn","table_getGlobalFacetedRowModel","column_getFacetedRowModel","column_getCanGlobalFilter"],"sources":["../../../src/features/column-faceting/createFacetedMinMaxValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getCanGlobalFilter } from '../global-filtering/globalFilteringFeature.utils'\nimport {\n column_getFacetedRowModel,\n table_getGlobalFacetedRowModel,\n} from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted min max values helper for faceted filtering.\n *\n * The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.\n */\nexport function createFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => undefined | [number, number] {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n fn: (flatRows) => _createFacetedMinMaxValues(table, columnId, flatRows),\n fnName: 'table.getFacetedMinMaxValues',\n memoDeps: () => {\n if (columnId === '__global__') {\n return [\n callMemoOrStaticFn(\n table,\n 'getGlobalFacetedRowModel',\n table_getGlobalFacetedRowModel,\n ).flatRows,\n ]\n }\n const column = table.getColumn(columnId)\n if (!column) return [table.getPreFilteredRowModel().flatRows]\n return [\n callMemoOrStaticFn(\n column,\n 'getFacetedRowModel',\n column_getFacetedRowModel,\n table,\n ).flatRows,\n ]\n },\n table,\n })\n }\n}\n\nfunction _createFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): undefined | [number, number] {\n if (!flatRows.length) return undefined\n\n // The global context aggregates values across every column that\n // participates in global filtering\n const columnIds =\n columnId === '__global__'\n ? table\n .getAllLeafColumns()\n .filter((column) => column_getCanGlobalFilter(column))\n .map((column) => column.id)\n : [columnId]\n\n let facetedMinValue = Number.POSITIVE_INFINITY\n let facetedMaxValue = Number.NEGATIVE_INFINITY\n let foundAny = false\n\n for (let i = 0; i < flatRows.length; i++) {\n for (let c = 0; c < columnIds.length; c++) {\n const value = Number(flatRows[i]!.getValue(columnIds[c]!))\n if (Number.isNaN(value)) continue\n foundAny = true\n if (value < facetedMinValue) facetedMinValue = value\n if (value > facetedMaxValue) facetedMaxValue = value\n }\n }\n\n if (!foundAny) return undefined\n return [facetedMinValue, facetedMaxValue]\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,4BAMwB;CACtC,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAOA,wBAAU;GACf,SAAS;GACT,KAAK,aAAa,2BAA2B,OAAO,UAAU,QAAQ;GACtE,QAAQ;GACR,gBAAgB;IACd,IAAI,aAAa,cACf,OAAO,CACLC,iCACE,OACA,4BACAC,kEACF,CAAC,CAAC,QACJ;IAEF,MAAM,SAAS,MAAM,UAAU,QAAQ;IACvC,IAAI,CAAC,QAAQ,OAAO,CAAC,MAAM,uBAAuB,CAAC,CAAC,QAAQ;IAC5D,OAAO,CACLD,iCACE,QACA,sBACAE,+DACA,KACF,CAAC,CAAC,QACJ;GACF;GACA;EACF,CAAC;CACH;AACF;AAEA,SAAS,2BAIP,OACA,UACA,UAC8B;CAC9B,IAAI,CAAC,SAAS,QAAQ,OAAO;CAI7B,MAAM,YACJ,aAAa,eACT,MACG,kBAAkB,CAAC,CACnB,QAAQ,WAAWC,+DAA0B,MAAM,CAAC,CAAC,CACrD,KAAK,WAAW,OAAO,EAAE,IAC5B,CAAC,QAAQ;CAEf,IAAI,kBAAkB,OAAO;CAC7B,IAAI,kBAAkB,OAAO;CAC7B,IAAI,WAAW;CAEf,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EACzC,MAAM,QAAQ,OAAO,SAAS,EAAE,CAAE,SAAS,UAAU,EAAG,CAAC;EACzD,IAAI,OAAO,MAAM,KAAK,GAAG;EACzB,WAAW;EACX,IAAI,QAAQ,iBAAiB,kBAAkB;EAC/C,IAAI,QAAQ,iBAAiB,kBAAkB;CACjD;CAGF,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO,CAAC,iBAAiB,eAAe;AAC1C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Table } from "../../types/Table.cjs";
|
|
3
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/features/column-faceting/createFacetedMinMaxValues.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Creates a memoized faceted min max values helper for faceted filtering.
|
|
8
|
-
*
|
|
9
|
-
* The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.
|
|
10
|
-
*/
|
|
11
|
-
declare function createFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData = any>(): (table: Table<TFeatures, TData>, columnId: string) => () => undefined | [number, number];
|
|
12
|
-
//#endregion
|
|
13
|
-
export { createFacetedMinMaxValues };
|
|
14
|
-
//# sourceMappingURL=createFacetedMinMaxValues.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedMinMaxValues.js","names":[],"sources":["../../../src/features/column-faceting/createFacetedMinMaxValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getCanGlobalFilter } from '../global-filtering/globalFilteringFeature.utils'\nimport {\n column_getFacetedRowModel,\n table_getGlobalFacetedRowModel,\n} from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted min max values helper for faceted filtering.\n *\n * The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.\n */\nexport function createFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => undefined | [number, number] {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n fn: (flatRows) => _createFacetedMinMaxValues(table, columnId, flatRows),\n fnName: 'table.getFacetedMinMaxValues',\n memoDeps: () => {\n if (columnId === '__global__') {\n return [\n callMemoOrStaticFn(\n table,\n 'getGlobalFacetedRowModel',\n table_getGlobalFacetedRowModel,\n ).flatRows,\n ]\n }\n const column = table.getColumn(columnId)\n if (!column) return [table.getPreFilteredRowModel().flatRows]\n return [\n callMemoOrStaticFn(\n column,\n 'getFacetedRowModel',\n column_getFacetedRowModel,\n table,\n ).flatRows,\n ]\n },\n table,\n })\n }\n}\n\nfunction _createFacetedMinMaxValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): undefined | [number, number] {\n if (!flatRows.length) return undefined\n\n // The global context aggregates values across every column that\n // participates in global filtering\n const columnIds =\n columnId === '__global__'\n ? table\n .getAllLeafColumns()\n .filter((column) => column_getCanGlobalFilter(column))\n .map((column) => column.id)\n : [columnId]\n\n let facetedMinValue = Number.POSITIVE_INFINITY\n let facetedMaxValue = Number.NEGATIVE_INFINITY\n let foundAny = false\n\n for (let i = 0; i < flatRows.length; i++) {\n for (let c = 0; c < columnIds.length; c++) {\n const value = Number(flatRows[i]!.getValue(columnIds[c]!))\n if (Number.isNaN(value)) continue\n foundAny = true\n if (value < facetedMinValue) facetedMinValue = value\n if (value > facetedMaxValue) facetedMaxValue = value\n }\n }\n\n if (!foundAny) return undefined\n return [facetedMinValue, facetedMaxValue]\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,4BAMwB;CACtC,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAO,UAAU;GACf,SAAS;GACT,KAAK,aAAa,2BAA2B,OAAO,UAAU,QAAQ;GACtE,QAAQ;GACR,gBAAgB;IACd,IAAI,aAAa,cACf,OAAO,CACL,mBACE,OACA,4BACA,8BACF,CAAC,CAAC,QACJ;IAEF,MAAM,SAAS,MAAM,UAAU,QAAQ;IACvC,IAAI,CAAC,QAAQ,OAAO,CAAC,MAAM,uBAAuB,CAAC,CAAC,QAAQ;IAC5D,OAAO,CACL,mBACE,QACA,sBACA,2BACA,KACF,CAAC,CAAC,QACJ;GACF;GACA;EACF,CAAC;CACH;AACF;AAEA,SAAS,2BAIP,OACA,UACA,UAC8B;CAC9B,IAAI,CAAC,SAAS,QAAQ,OAAO;CAI7B,MAAM,YACJ,aAAa,eACT,MACG,kBAAkB,CAAC,CACnB,QAAQ,WAAW,0BAA0B,MAAM,CAAC,CAAC,CACrD,KAAK,WAAW,OAAO,EAAE,IAC5B,CAAC,QAAQ;CAEf,IAAI,kBAAkB,OAAO;CAC7B,IAAI,kBAAkB,OAAO;CAC7B,IAAI,WAAW;CAEf,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EACzC,MAAM,QAAQ,OAAO,SAAS,EAAE,CAAE,SAAS,UAAU,EAAG,CAAC;EACzD,IAAI,OAAO,MAAM,KAAK,GAAG;EACzB,WAAW;EACX,IAAI,QAAQ,iBAAiB,kBAAkB;EAC/C,IAAI,QAAQ,iBAAiB,kBAAkB;CACjD;CAGF,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO,CAAC,iBAAiB,eAAe;AAC1C"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_filterRowsUtils = require('../column-filtering/filterRowsUtils.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/features/column-faceting/createFacetedRowModel.ts
|
|
5
|
-
/**
|
|
6
|
-
* Creates a memoized faceted row model factory.
|
|
7
|
-
*
|
|
8
|
-
* The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
|
|
9
|
-
*/
|
|
10
|
-
function createFacetedRowModel() {
|
|
11
|
-
return (_table, columnId) => {
|
|
12
|
-
const table = _table;
|
|
13
|
-
return require_utils.tableMemo({
|
|
14
|
-
feature: "columnFacetingFeature",
|
|
15
|
-
table,
|
|
16
|
-
fnName: "createFacetedRowModel",
|
|
17
|
-
memoDeps: () => [
|
|
18
|
-
table.getPreFilteredRowModel(),
|
|
19
|
-
table.atoms.columnFilters?.get(),
|
|
20
|
-
table.atoms.globalFilter?.get(),
|
|
21
|
-
table.getFilteredRowModel()
|
|
22
|
-
],
|
|
23
|
-
fn: (preRowModel, columnFilters, globalFilter) => _createFacetedRowModel(table, columnId, preRowModel, columnFilters, globalFilter)
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function _createFacetedRowModel(table, columnId, preRowModel, columnFilters, globalFilter) {
|
|
28
|
-
if (!preRowModel.rows.length || !columnFilters?.length && !globalFilter) return preRowModel;
|
|
29
|
-
const filterableIds = [];
|
|
30
|
-
if (columnFilters) for (let i = 0; i < columnFilters.length; i++) {
|
|
31
|
-
const id = columnFilters[i].id;
|
|
32
|
-
if (id !== columnId) filterableIds.push(id);
|
|
33
|
-
}
|
|
34
|
-
if (globalFilter && columnId !== "__global__") filterableIds.push("__global__");
|
|
35
|
-
if (!filterableIds.length) return preRowModel;
|
|
36
|
-
const filterRowsImpl = (row) => {
|
|
37
|
-
for (let i = 0; i < filterableIds.length; i++) if (row.columnFilters?.[filterableIds[i]] === false) return false;
|
|
38
|
-
return true;
|
|
39
|
-
};
|
|
40
|
-
return require_filterRowsUtils.filterRows(preRowModel.rows, filterRowsImpl, table);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
exports.createFacetedRowModel = createFacetedRowModel;
|
|
45
|
-
//# sourceMappingURL=createFacetedRowModel.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedRowModel.cjs","names":["tableMemo","filterRows"],"sources":["../../../src/features/column-faceting/createFacetedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { filterRows } from '../column-filtering/filterRowsUtils'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type {\n ColumnFiltersState,\n Row_ColumnFiltering,\n} from '../column-filtering/columnFilteringFeature.types'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted row model factory.\n *\n * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.\n */\nexport function createFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => RowModel<TFeatures, TData> {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n table,\n fnName: 'createFacetedRowModel',\n memoDeps: () => [\n table.getPreFilteredRowModel(),\n table.atoms.columnFilters?.get(),\n table.atoms.globalFilter?.get(),\n table.getFilteredRowModel(),\n ],\n fn: (preRowModel, columnFilters, globalFilter) =>\n _createFacetedRowModel(\n table,\n columnId,\n preRowModel,\n columnFilters,\n globalFilter,\n ),\n })\n }\n}\n\nfunction _createFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n preRowModel: RowModel<TFeatures, TData>,\n columnFilters?: ColumnFiltersState,\n globalFilter?: string,\n) {\n if (!preRowModel.rows.length || (!columnFilters?.length && !globalFilter)) {\n return preRowModel\n }\n\n const filterableIds: Array<string> = []\n if (columnFilters) {\n for (let i = 0; i < columnFilters.length; i++) {\n const id = columnFilters[i]!.id\n if (id !== columnId) filterableIds.push(id)\n }\n }\n // The global context excludes the global filter itself, mirroring how a\n // column's faceted model excludes that column's own filter\n if (globalFilter && columnId !== '__global__')\n filterableIds.push('__global__')\n\n if (!filterableIds.length) {\n return preRowModel\n }\n\n const filterRowsImpl = (\n row: Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>,\n ) => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters?.[filterableIds[i]!] === false) {\n return false\n }\n }\n return true\n }\n\n return filterRows(preRowModel.rows, filterRowsImpl, table)\n}\n"],"mappings":";;;;;;;;;AAiBA,SAAgB,wBAMsB;CACpC,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAOA,wBAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;IACd,MAAM,uBAAuB;IAC7B,MAAM,MAAM,eAAe,IAAI;IAC/B,MAAM,MAAM,cAAc,IAAI;IAC9B,MAAM,oBAAoB;GAC5B;GACA,KAAK,aAAa,eAAe,iBAC/B,uBACE,OACA,UACA,aACA,eACA,YACF;EACJ,CAAC;CACH;AACF;AAEA,SAAS,uBAIP,OACA,UACA,aACA,eACA,cACA;CACA,IAAI,CAAC,YAAY,KAAK,UAAW,CAAC,eAAe,UAAU,CAAC,cAC1D,OAAO;CAGT,MAAM,gBAA+B,CAAC;CACtC,IAAI,eACF,KAAK,IAAI,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;EAC7C,MAAM,KAAK,cAAc,EAAE,CAAE;EAC7B,IAAI,OAAO,UAAU,cAAc,KAAK,EAAE;CAC5C;CAIF,IAAI,gBAAgB,aAAa,cAC/B,cAAc,KAAK,YAAY;CAEjC,IAAI,CAAC,cAAc,QACjB,OAAO;CAGT,MAAM,kBACJ,QACG;EAEH,KAAK,IAAI,IAAI,GAAG,IAAI,cAAc,QAAQ,KACxC,IAAI,IAAI,gBAAgB,cAAc,QAAS,OAC7C,OAAO;EAGX,OAAO;CACT;CAEA,OAAOC,mCAAW,YAAY,MAAM,gBAAgB,KAAK;AAC3D"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
|
|
3
|
-
import { Table } from "../../types/Table.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
|
|
6
|
-
//#region src/features/column-faceting/createFacetedRowModel.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Creates a memoized faceted row model factory.
|
|
9
|
-
*
|
|
10
|
-
* The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.
|
|
11
|
-
*/
|
|
12
|
-
declare function createFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData = any>(): (table: Table<TFeatures, TData>, columnId: string) => () => RowModel<TFeatures, TData>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { createFacetedRowModel };
|
|
15
|
-
//# sourceMappingURL=createFacetedRowModel.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedRowModel.js","names":[],"sources":["../../../src/features/column-faceting/createFacetedRowModel.ts"],"sourcesContent":["import { tableMemo } from '../../utils'\nimport { filterRows } from '../column-filtering/filterRowsUtils'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type {\n ColumnFiltersState,\n Row_ColumnFiltering,\n} from '../column-filtering/columnFilteringFeature.types'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowModel } from '../../core/row-models/coreRowModelsFeature.types'\nimport type { Row } from '../../types/Row'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted row model factory.\n *\n * The factory reads the relevant table state atoms and options, then returns a row model function used by the table row-model pipeline.\n */\nexport function createFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => RowModel<TFeatures, TData> {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n table,\n fnName: 'createFacetedRowModel',\n memoDeps: () => [\n table.getPreFilteredRowModel(),\n table.atoms.columnFilters?.get(),\n table.atoms.globalFilter?.get(),\n table.getFilteredRowModel(),\n ],\n fn: (preRowModel, columnFilters, globalFilter) =>\n _createFacetedRowModel(\n table,\n columnId,\n preRowModel,\n columnFilters,\n globalFilter,\n ),\n })\n }\n}\n\nfunction _createFacetedRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n preRowModel: RowModel<TFeatures, TData>,\n columnFilters?: ColumnFiltersState,\n globalFilter?: string,\n) {\n if (!preRowModel.rows.length || (!columnFilters?.length && !globalFilter)) {\n return preRowModel\n }\n\n const filterableIds: Array<string> = []\n if (columnFilters) {\n for (let i = 0; i < columnFilters.length; i++) {\n const id = columnFilters[i]!.id\n if (id !== columnId) filterableIds.push(id)\n }\n }\n // The global context excludes the global filter itself, mirroring how a\n // column's faceted model excludes that column's own filter\n if (globalFilter && columnId !== '__global__')\n filterableIds.push('__global__')\n\n if (!filterableIds.length) {\n return preRowModel\n }\n\n const filterRowsImpl = (\n row: Row<TFeatures, TData> & Partial<Row_ColumnFiltering<TFeatures, TData>>,\n ) => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters?.[filterableIds[i]!] === false) {\n return false\n }\n }\n return true\n }\n\n return filterRows(preRowModel.rows, filterRowsImpl, table)\n}\n"],"mappings":";;;;;;;;;AAiBA,SAAgB,wBAMsB;CACpC,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAO,UAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;IACd,MAAM,uBAAuB;IAC7B,MAAM,MAAM,eAAe,IAAI;IAC/B,MAAM,MAAM,cAAc,IAAI;IAC9B,MAAM,oBAAoB;GAC5B;GACA,KAAK,aAAa,eAAe,iBAC/B,uBACE,OACA,UACA,aACA,eACA,YACF;EACJ,CAAC;CACH;AACF;AAEA,SAAS,uBAIP,OACA,UACA,aACA,eACA,cACA;CACA,IAAI,CAAC,YAAY,KAAK,UAAW,CAAC,eAAe,UAAU,CAAC,cAC1D,OAAO;CAGT,MAAM,gBAA+B,CAAC;CACtC,IAAI,eACF,KAAK,IAAI,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;EAC7C,MAAM,KAAK,cAAc,EAAE,CAAE;EAC7B,IAAI,OAAO,UAAU,cAAc,KAAK,EAAE;CAC5C;CAIF,IAAI,gBAAgB,aAAa,cAC/B,cAAc,KAAK,YAAY;CAEjC,IAAI,CAAC,cAAc,QACjB,OAAO;CAGT,MAAM,kBACJ,QACG;EAEH,KAAK,IAAI,IAAI,GAAG,IAAI,cAAc,QAAQ,KACxC,IAAI,IAAI,gBAAgB,cAAc,QAAS,OAC7C,OAAO;EAGX,OAAO;CACT;CAEA,OAAO,WAAW,YAAY,MAAM,gBAAgB,KAAK;AAC3D"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_columnFacetingFeature_utils = require('./columnFacetingFeature.utils.cjs');
|
|
3
|
-
const require_globalFilteringFeature_utils = require('../global-filtering/globalFilteringFeature.utils.cjs');
|
|
4
|
-
|
|
5
|
-
//#region src/features/column-faceting/createFacetedUniqueValues.ts
|
|
6
|
-
/**
|
|
7
|
-
* Creates a memoized faceted unique values helper for faceted filtering.
|
|
8
|
-
*
|
|
9
|
-
* The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.
|
|
10
|
-
*/
|
|
11
|
-
function createFacetedUniqueValues() {
|
|
12
|
-
return (_table, columnId) => {
|
|
13
|
-
const table = _table;
|
|
14
|
-
return require_utils.tableMemo({
|
|
15
|
-
feature: "columnFacetingFeature",
|
|
16
|
-
table,
|
|
17
|
-
fnName: "table.getFacetedUniqueValues",
|
|
18
|
-
memoDeps: () => {
|
|
19
|
-
if (columnId === "__global__") return [require_utils.callMemoOrStaticFn(table, "getGlobalFacetedRowModel", require_columnFacetingFeature_utils.table_getGlobalFacetedRowModel).flatRows];
|
|
20
|
-
const column = table.getColumn(columnId);
|
|
21
|
-
if (!column) return [table.getPreFilteredRowModel().flatRows];
|
|
22
|
-
return [require_utils.callMemoOrStaticFn(column, "getFacetedRowModel", require_columnFacetingFeature_utils.column_getFacetedRowModel, table).flatRows];
|
|
23
|
-
},
|
|
24
|
-
fn: (flatRows) => _createFacetedUniqueValues(table, columnId, flatRows)
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function _createFacetedUniqueValues(table, columnId, flatRows) {
|
|
29
|
-
const columnIds = columnId === "__global__" ? table.getAllLeafColumns().filter((column) => require_globalFilteringFeature_utils.column_getCanGlobalFilter(column)).map((column) => column.id) : [columnId];
|
|
30
|
-
const facetedUniqueValues = /* @__PURE__ */ new Map();
|
|
31
|
-
for (let i = 0; i < flatRows.length; i++) for (let c = 0; c < columnIds.length; c++) {
|
|
32
|
-
const values = flatRows[i].getUniqueValues(columnIds[c]);
|
|
33
|
-
if (!values) continue;
|
|
34
|
-
for (let j = 0; j < values.length; j++) {
|
|
35
|
-
const value = values[j];
|
|
36
|
-
const previousValue = facetedUniqueValues.get(value);
|
|
37
|
-
facetedUniqueValues.set(value, previousValue === void 0 ? 1 : previousValue + 1);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return facetedUniqueValues;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
exports.createFacetedUniqueValues = createFacetedUniqueValues;
|
|
45
|
-
//# sourceMappingURL=createFacetedUniqueValues.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedUniqueValues.cjs","names":["tableMemo","callMemoOrStaticFn","table_getGlobalFacetedRowModel","column_getFacetedRowModel","column_getCanGlobalFilter"],"sources":["../../../src/features/column-faceting/createFacetedUniqueValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getCanGlobalFilter } from '../global-filtering/globalFilteringFeature.utils'\nimport {\n column_getFacetedRowModel,\n table_getGlobalFacetedRowModel,\n} from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted unique values helper for faceted filtering.\n *\n * The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.\n */\nexport function createFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => Map<any, number> {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n table,\n fnName: 'table.getFacetedUniqueValues',\n memoDeps: () => {\n if (columnId === '__global__') {\n return [\n callMemoOrStaticFn(\n table,\n 'getGlobalFacetedRowModel',\n table_getGlobalFacetedRowModel,\n ).flatRows,\n ]\n }\n const column = table.getColumn(columnId)\n if (!column) return [table.getPreFilteredRowModel().flatRows]\n return [\n callMemoOrStaticFn(\n column,\n 'getFacetedRowModel',\n column_getFacetedRowModel,\n table,\n ).flatRows,\n ]\n },\n fn: (flatRows) => _createFacetedUniqueValues(table, columnId, flatRows),\n })\n }\n}\n\nfunction _createFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): Map<any, number> {\n // The global context aggregates unique values across every column that\n // participates in global filtering\n const columnIds =\n columnId === '__global__'\n ? table\n .getAllLeafColumns()\n .filter((column) => column_getCanGlobalFilter(column))\n .map((column) => column.id)\n : [columnId]\n\n const facetedUniqueValues = new Map<any, number>()\n\n for (let i = 0; i < flatRows.length; i++) {\n for (let c = 0; c < columnIds.length; c++) {\n // the declared return type is Array, but rows return undefined for\n // columns without an accessor (e.g. display columns)\n const values = flatRows[i]!.getUniqueValues(columnIds[c]!) as\n | Array<unknown>\n | undefined\n if (!values) continue\n\n for (let j = 0; j < values.length; j++) {\n const value = values[j]\n const previousValue = facetedUniqueValues.get(value)\n facetedUniqueValues.set(\n value,\n previousValue === undefined ? 1 : previousValue + 1,\n )\n }\n }\n }\n\n return facetedUniqueValues\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,4BAMY;CAC1B,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAOA,wBAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;IACd,IAAI,aAAa,cACf,OAAO,CACLC,iCACE,OACA,4BACAC,kEACF,CAAC,CAAC,QACJ;IAEF,MAAM,SAAS,MAAM,UAAU,QAAQ;IACvC,IAAI,CAAC,QAAQ,OAAO,CAAC,MAAM,uBAAuB,CAAC,CAAC,QAAQ;IAC5D,OAAO,CACLD,iCACE,QACA,sBACAE,+DACA,KACF,CAAC,CAAC,QACJ;GACF;GACA,KAAK,aAAa,2BAA2B,OAAO,UAAU,QAAQ;EACxE,CAAC;CACH;AACF;AAEA,SAAS,2BAIP,OACA,UACA,UACkB;CAGlB,MAAM,YACJ,aAAa,eACT,MACG,kBAAkB,CAAC,CACnB,QAAQ,WAAWC,+DAA0B,MAAM,CAAC,CAAC,CACrD,KAAK,WAAW,OAAO,EAAE,IAC5B,CAAC,QAAQ;CAEf,MAAM,sCAAsB,IAAI,IAAiB;CAEjD,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EAGzC,MAAM,SAAS,SAAS,EAAE,CAAE,gBAAgB,UAAU,EAAG;EAGzD,IAAI,CAAC,QAAQ;EAEb,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;GACtC,MAAM,QAAQ,OAAO;GACrB,MAAM,gBAAgB,oBAAoB,IAAI,KAAK;GACnD,oBAAoB,IAClB,OACA,kBAAkB,SAAY,IAAI,gBAAgB,CACpD;EACF;CACF;CAGF,OAAO;AACT"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Table } from "../../types/Table.cjs";
|
|
3
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/features/column-faceting/createFacetedUniqueValues.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Creates a memoized faceted unique values helper for faceted filtering.
|
|
8
|
-
*
|
|
9
|
-
* The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.
|
|
10
|
-
*/
|
|
11
|
-
declare function createFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData = any>(): (table: Table<TFeatures, TData>, columnId: string) => () => Map<any, number>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { createFacetedUniqueValues };
|
|
14
|
-
//# sourceMappingURL=createFacetedUniqueValues.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedUniqueValues.js","names":[],"sources":["../../../src/features/column-faceting/createFacetedUniqueValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getCanGlobalFilter } from '../global-filtering/globalFilteringFeature.utils'\nimport {\n column_getFacetedRowModel,\n table_getGlobalFacetedRowModel,\n} from './columnFacetingFeature.utils'\nimport type { Row } from '../../types/Row'\nimport type { Table, Table_Internal } from '../../types/Table'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { RowData } from '../../types/type-utils'\n\n/**\n * Creates a memoized faceted unique values helper for faceted filtering.\n *\n * The returned function derives facet data from the table row model and relevant filter state so filter UIs can display available values.\n */\nexport function createFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(): (\n table: Table<TFeatures, TData>,\n columnId: string,\n) => () => Map<any, number> {\n return (_table, columnId) => {\n const table = _table as unknown as Table_Internal<TFeatures, TData>\n return tableMemo({\n feature: 'columnFacetingFeature',\n table,\n fnName: 'table.getFacetedUniqueValues',\n memoDeps: () => {\n if (columnId === '__global__') {\n return [\n callMemoOrStaticFn(\n table,\n 'getGlobalFacetedRowModel',\n table_getGlobalFacetedRowModel,\n ).flatRows,\n ]\n }\n const column = table.getColumn(columnId)\n if (!column) return [table.getPreFilteredRowModel().flatRows]\n return [\n callMemoOrStaticFn(\n column,\n 'getFacetedRowModel',\n column_getFacetedRowModel,\n table,\n ).flatRows,\n ]\n },\n fn: (flatRows) => _createFacetedUniqueValues(table, columnId, flatRows),\n })\n }\n}\n\nfunction _createFacetedUniqueValues<\n TFeatures extends TableFeatures,\n TData extends RowData = any,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): Map<any, number> {\n // The global context aggregates unique values across every column that\n // participates in global filtering\n const columnIds =\n columnId === '__global__'\n ? table\n .getAllLeafColumns()\n .filter((column) => column_getCanGlobalFilter(column))\n .map((column) => column.id)\n : [columnId]\n\n const facetedUniqueValues = new Map<any, number>()\n\n for (let i = 0; i < flatRows.length; i++) {\n for (let c = 0; c < columnIds.length; c++) {\n // the declared return type is Array, but rows return undefined for\n // columns without an accessor (e.g. display columns)\n const values = flatRows[i]!.getUniqueValues(columnIds[c]!) as\n | Array<unknown>\n | undefined\n if (!values) continue\n\n for (let j = 0; j < values.length; j++) {\n const value = values[j]\n const previousValue = facetedUniqueValues.get(value)\n facetedUniqueValues.set(\n value,\n previousValue === undefined ? 1 : previousValue + 1,\n )\n }\n }\n }\n\n return facetedUniqueValues\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,4BAMY;CAC1B,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAAQ;EACd,OAAO,UAAU;GACf,SAAS;GACT;GACA,QAAQ;GACR,gBAAgB;IACd,IAAI,aAAa,cACf,OAAO,CACL,mBACE,OACA,4BACA,8BACF,CAAC,CAAC,QACJ;IAEF,MAAM,SAAS,MAAM,UAAU,QAAQ;IACvC,IAAI,CAAC,QAAQ,OAAO,CAAC,MAAM,uBAAuB,CAAC,CAAC,QAAQ;IAC5D,OAAO,CACL,mBACE,QACA,sBACA,2BACA,KACF,CAAC,CAAC,QACJ;GACF;GACA,KAAK,aAAa,2BAA2B,OAAO,UAAU,QAAQ;EACxE,CAAC;CACH;AACF;AAEA,SAAS,2BAIP,OACA,UACA,UACkB;CAGlB,MAAM,YACJ,aAAa,eACT,MACG,kBAAkB,CAAC,CACnB,QAAQ,WAAW,0BAA0B,MAAM,CAAC,CAAC,CACrD,KAAK,WAAW,OAAO,EAAE,IAC5B,CAAC,QAAQ;CAEf,MAAM,sCAAsB,IAAI,IAAiB;CAEjD,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EAGzC,MAAM,SAAS,SAAS,EAAE,CAAE,gBAAgB,UAAU,EAAG;EAGzD,IAAI,CAAC,QAAQ;EAEb,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;GACtC,MAAM,QAAQ,OAAO;GACrB,MAAM,gBAAgB,oBAAoB,IAAI,KAAK;GACnD,oBAAoB,IAClB,OACA,kBAAkB,SAAY,IAAI,gBAAgB,CACpD;EACF;CACF;CAGF,OAAO;AACT"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_columnFilteringFeature_utils = require('./columnFilteringFeature.utils.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/features/column-filtering/columnFilteringFeature.ts
|
|
5
|
-
/**
|
|
6
|
-
* Feature that adds per-column filtering state, options, and column/table filter APIs.
|
|
7
|
-
*/
|
|
8
|
-
const columnFilteringFeature = {
|
|
9
|
-
getInitialState: (initialState) => {
|
|
10
|
-
return {
|
|
11
|
-
columnFilters: require_columnFilteringFeature_utils.getDefaultColumnFiltersState(),
|
|
12
|
-
...initialState
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
getDefaultColumnDef: () => {
|
|
16
|
-
return { filterFn: "auto" };
|
|
17
|
-
},
|
|
18
|
-
getDefaultTableOptions: (table) => {
|
|
19
|
-
return {
|
|
20
|
-
onColumnFiltersChange: require_utils.makeStateUpdater("columnFilters", table),
|
|
21
|
-
filterFromLeafRows: false,
|
|
22
|
-
maxLeafRowFilterDepth: 100
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
assignColumnPrototype: (prototype, table) => {
|
|
26
|
-
require_utils.assignPrototypeAPIs("columnFilteringFeature", prototype, table, {
|
|
27
|
-
column_getAutoFilterFn: { fn: (column) => require_columnFilteringFeature_utils.column_getAutoFilterFn(column) },
|
|
28
|
-
column_getFilterFn: { fn: (column) => require_columnFilteringFeature_utils.column_getFilterFn(column) },
|
|
29
|
-
column_getCanFilter: { fn: (column) => require_columnFilteringFeature_utils.column_getCanFilter(column) },
|
|
30
|
-
column_getIsFiltered: { fn: (column) => require_columnFilteringFeature_utils.column_getIsFiltered(column) },
|
|
31
|
-
column_getFilterValue: { fn: (column) => require_columnFilteringFeature_utils.column_getFilterValue(column) },
|
|
32
|
-
column_getFilterIndex: { fn: (column) => require_columnFilteringFeature_utils.column_getFilterIndex(column) },
|
|
33
|
-
column_setFilterValue: { fn: (column, value) => require_columnFilteringFeature_utils.column_setFilterValue(column, value) }
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
initRowInstanceData: (row) => {
|
|
37
|
-
row.columnFilters = require_utils.makeObjectMap();
|
|
38
|
-
row.columnFiltersMeta = require_utils.makeObjectMap();
|
|
39
|
-
},
|
|
40
|
-
constructTableAPIs: (table) => {
|
|
41
|
-
require_utils.assignTableAPIs("columnFilteringFeature", table, {
|
|
42
|
-
table_setColumnFilters: { fn: (updater) => require_columnFilteringFeature_utils.table_setColumnFilters(table, updater) },
|
|
43
|
-
table_resetColumnFilters: { fn: (defaultState) => require_columnFilteringFeature_utils.table_resetColumnFilters(table, defaultState) }
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
exports.columnFilteringFeature = columnFilteringFeature;
|
|
50
|
-
//# sourceMappingURL=columnFilteringFeature.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnFilteringFeature.cjs","names":["getDefaultColumnFiltersState","makeStateUpdater","column_getAutoFilterFn","column_getFilterFn","column_getCanFilter","column_getIsFiltered","column_getFilterValue","column_getFilterIndex","column_setFilterValue","makeObjectMap","table_setColumnFilters","table_resetColumnFilters"],"sources":["../../../src/features/column-filtering/columnFilteringFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeObjectMap,\n makeStateUpdater,\n} from '../../utils'\nimport {\n column_getAutoFilterFn,\n column_getCanFilter,\n column_getFilterFn,\n column_getFilterIndex,\n column_getFilterValue,\n column_getIsFiltered,\n column_setFilterValue,\n getDefaultColumnFiltersState,\n table_resetColumnFilters,\n table_setColumnFilters,\n} from './columnFilteringFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Feature that adds per-column filtering state, options, and column/table filter APIs.\n */\nexport const columnFilteringFeature: TableFeature = {\n getInitialState: (initialState) => {\n return {\n columnFilters: getDefaultColumnFiltersState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n filterFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n filterFromLeafRows: false,\n maxLeafRowFilterDepth: 100,\n }\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnFilteringFeature', prototype, table, {\n column_getAutoFilterFn: {\n fn: (column) => column_getAutoFilterFn(column),\n },\n column_getFilterFn: {\n fn: (column) => column_getFilterFn(column),\n },\n column_getCanFilter: {\n fn: (column) => column_getCanFilter(column),\n },\n column_getIsFiltered: {\n fn: (column) => column_getIsFiltered(column),\n },\n column_getFilterValue: {\n fn: (column) => column_getFilterValue(column),\n },\n column_getFilterIndex: {\n fn: (column) => column_getFilterIndex(column),\n },\n column_setFilterValue: {\n fn: (column, value) => column_setFilterValue(column, value),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any).columnFilters = makeObjectMap()\n ;(row as any).columnFiltersMeta = makeObjectMap()\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnFilteringFeature', table, {\n table_setColumnFilters: {\n fn: (updater) => table_setColumnFilters(table, updater),\n },\n table_resetColumnFilters: {\n fn: (defaultState) => table_resetColumnFilters(table, defaultState),\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAuBA,MAAa,yBAAuC;CAClD,kBAAkB,iBAAiB;EACjC,OAAO;GACL,eAAeA,kEAA6B;GAC5C,GAAG;EACL;CACF;CAEA,2BAA2B;EACzB,OAAO,EACL,UAAU,OACZ;CACF;CAEA,yBAAyB,UAAU;EACjC,OAAO;GACL,uBAAuBC,+BAAiB,iBAAiB,KAAK;GAC9D,oBAAoB;GACpB,uBAAuB;EACzB;CACF;CAEA,wBAAwB,WAAW,UAAU;EAC3C,kCAAoB,0BAA0B,WAAW,OAAO;GAC9D,wBAAwB,EACtB,KAAK,WAAWC,4DAAuB,MAAM,EAC/C;GACA,oBAAoB,EAClB,KAAK,WAAWC,wDAAmB,MAAM,EAC3C;GACA,qBAAqB,EACnB,KAAK,WAAWC,yDAAoB,MAAM,EAC5C;GACA,sBAAsB,EACpB,KAAK,WAAWC,0DAAqB,MAAM,EAC7C;GACA,uBAAuB,EACrB,KAAK,WAAWC,2DAAsB,MAAM,EAC9C;GACA,uBAAuB,EACrB,KAAK,WAAWC,2DAAsB,MAAM,EAC9C;GACA,uBAAuB,EACrB,KAAK,QAAQ,UAAUC,2DAAsB,QAAQ,KAAK,EAC5D;EACF,CAAC;CACH;CAEA,sBAAsB,QAAQ;EAC3B,AAAC,IAAY,gBAAgBC,4BAAc;EAC3C,AAAC,IAAY,oBAAoBA,4BAAc;CAClD;CAEA,qBAAqB,UAAU;EAC7B,8BAAgB,0BAA0B,OAAO;GAC/C,wBAAwB,EACtB,KAAK,YAAYC,4DAAuB,OAAO,OAAO,EACxD;GACA,0BAA0B,EACxB,KAAK,iBAAiBC,8DAAyB,OAAO,YAAY,EACpE;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TableFeature } from "../../types/TableFeatures.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/features/column-filtering/columnFilteringFeature.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Feature that adds per-column filtering state, options, and column/table filter APIs.
|
|
6
|
-
*/
|
|
7
|
-
declare const columnFilteringFeature: TableFeature;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { columnFilteringFeature };
|
|
10
|
-
//# sourceMappingURL=columnFilteringFeature.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnFilteringFeature.js","names":[],"sources":["../../../src/features/column-filtering/columnFilteringFeature.ts"],"sourcesContent":["import {\n assignPrototypeAPIs,\n assignTableAPIs,\n makeObjectMap,\n makeStateUpdater,\n} from '../../utils'\nimport {\n column_getAutoFilterFn,\n column_getCanFilter,\n column_getFilterFn,\n column_getFilterIndex,\n column_getFilterValue,\n column_getIsFiltered,\n column_setFilterValue,\n getDefaultColumnFiltersState,\n table_resetColumnFilters,\n table_setColumnFilters,\n} from './columnFilteringFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Feature that adds per-column filtering state, options, and column/table filter APIs.\n */\nexport const columnFilteringFeature: TableFeature = {\n getInitialState: (initialState) => {\n return {\n columnFilters: getDefaultColumnFiltersState(),\n ...initialState,\n }\n },\n\n getDefaultColumnDef: () => {\n return {\n filterFn: 'auto',\n }\n },\n\n getDefaultTableOptions: (table) => {\n return {\n onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n filterFromLeafRows: false,\n maxLeafRowFilterDepth: 100,\n }\n },\n\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('columnFilteringFeature', prototype, table, {\n column_getAutoFilterFn: {\n fn: (column) => column_getAutoFilterFn(column),\n },\n column_getFilterFn: {\n fn: (column) => column_getFilterFn(column),\n },\n column_getCanFilter: {\n fn: (column) => column_getCanFilter(column),\n },\n column_getIsFiltered: {\n fn: (column) => column_getIsFiltered(column),\n },\n column_getFilterValue: {\n fn: (column) => column_getFilterValue(column),\n },\n column_getFilterIndex: {\n fn: (column) => column_getFilterIndex(column),\n },\n column_setFilterValue: {\n fn: (column, value) => column_setFilterValue(column, value),\n },\n })\n },\n\n initRowInstanceData: (row) => {\n ;(row as any).columnFilters = makeObjectMap()\n ;(row as any).columnFiltersMeta = makeObjectMap()\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('columnFilteringFeature', table, {\n table_setColumnFilters: {\n fn: (updater) => table_setColumnFilters(table, updater),\n },\n table_resetColumnFilters: {\n fn: (defaultState) => table_resetColumnFilters(table, defaultState),\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAuBA,MAAa,yBAAuC;CAClD,kBAAkB,iBAAiB;EACjC,OAAO;GACL,eAAe,6BAA6B;GAC5C,GAAG;EACL;CACF;CAEA,2BAA2B;EACzB,OAAO,EACL,UAAU,OACZ;CACF;CAEA,yBAAyB,UAAU;EACjC,OAAO;GACL,uBAAuB,iBAAiB,iBAAiB,KAAK;GAC9D,oBAAoB;GACpB,uBAAuB;EACzB;CACF;CAEA,wBAAwB,WAAW,UAAU;EAC3C,oBAAoB,0BAA0B,WAAW,OAAO;GAC9D,wBAAwB,EACtB,KAAK,WAAW,uBAAuB,MAAM,EAC/C;GACA,oBAAoB,EAClB,KAAK,WAAW,mBAAmB,MAAM,EAC3C;GACA,qBAAqB,EACnB,KAAK,WAAW,oBAAoB,MAAM,EAC5C;GACA,sBAAsB,EACpB,KAAK,WAAW,qBAAqB,MAAM,EAC7C;GACA,uBAAuB,EACrB,KAAK,WAAW,sBAAsB,MAAM,EAC9C;GACA,uBAAuB,EACrB,KAAK,WAAW,sBAAsB,MAAM,EAC9C;GACA,uBAAuB,EACrB,KAAK,QAAQ,UAAU,sBAAsB,QAAQ,KAAK,EAC5D;EACF,CAAC;CACH;CAEA,sBAAsB,QAAQ;EAC3B,AAAC,IAAY,gBAAgB,cAAc;EAC3C,AAAC,IAAY,oBAAoB,cAAc;CAClD;CAEA,qBAAqB,UAAU;EAC7B,gBAAgB,0BAA0B,OAAO;GAC/C,wBAAwB,EACtB,KAAK,YAAY,uBAAuB,OAAO,OAAO,EACxD;GACA,0BAA0B,EACxB,KAAK,iBAAiB,yBAAyB,OAAO,YAAY,EACpE;EACF,CAAC;CACH;AACF"}
|