@tanstack/table-core 9.0.0-alpha.46 → 9.0.0-alpha.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/core/cells/constructCell.cjs +4 -3
- package/dist/core/cells/constructCell.cjs.map +1 -1
- package/dist/core/cells/constructCell.js +4 -3
- package/dist/core/cells/constructCell.js.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.cjs +11 -8
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +1 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.d.ts +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js +11 -8
- package/dist/core/cells/coreCellsFeature.utils.js.map +1 -1
- package/dist/core/columns/constructColumn.cjs +6 -4
- package/dist/core/columns/constructColumn.cjs.map +1 -1
- package/dist/core/columns/constructColumn.js +6 -4
- package/dist/core/columns/constructColumn.js.map +1 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +7 -6
- package/dist/core/columns/coreColumnsFeature.types.d.ts +7 -6
- package/dist/core/columns/coreColumnsFeature.utils.cjs +47 -29
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +1 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +37 -27
- package/dist/core/columns/coreColumnsFeature.utils.js +47 -29
- package/dist/core/columns/coreColumnsFeature.utils.js.map +1 -1
- package/dist/core/headers/buildHeaderGroups.cjs +27 -19
- package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
- package/dist/core/headers/buildHeaderGroups.js +27 -19
- package/dist/core/headers/buildHeaderGroups.js.map +1 -1
- package/dist/core/headers/constructHeader.cjs +4 -3
- package/dist/core/headers/constructHeader.cjs.map +1 -1
- package/dist/core/headers/constructHeader.js +4 -3
- package/dist/core/headers/constructHeader.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.cjs +1 -6
- package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.js +2 -7
- package/dist/core/headers/coreHeadersFeature.js.map +1 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +6 -4
- package/dist/core/headers/coreHeadersFeature.types.d.ts +6 -4
- package/dist/core/headers/coreHeadersFeature.utils.cjs +43 -36
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +24 -19
- package/dist/core/headers/coreHeadersFeature.utils.js +44 -37
- package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +4 -0
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +4 -0
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +1 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js +48 -36
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +1 -1
- package/dist/core/rows/constructRow.cjs +8 -6
- package/dist/core/rows/constructRow.cjs.map +1 -1
- package/dist/core/rows/constructRow.js +8 -6
- package/dist/core/rows/constructRow.js.map +1 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +4 -4
- package/dist/core/rows/coreRowsFeature.types.d.ts +4 -4
- package/dist/core/rows/coreRowsFeature.utils.cjs +43 -32
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +1 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.d.ts +34 -28
- package/dist/core/rows/coreRowsFeature.utils.js +43 -32
- package/dist/core/rows/coreRowsFeature.utils.js.map +1 -1
- package/dist/core/table/constructTable.cjs +9 -5
- package/dist/core/table/constructTable.cjs.map +1 -1
- package/dist/core/table/constructTable.js +9 -5
- package/dist/core/table/constructTable.js.map +1 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +6 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +6 -2
- package/dist/core/table/coreTablesFeature.utils.cjs +7 -3
- package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +2 -2
- package/dist/core/table/coreTablesFeature.utils.d.ts +2 -2
- package/dist/core/table/coreTablesFeature.utils.js +7 -3
- package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +16 -10
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +1 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +26 -18
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +8 -5
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedRowModel.js +8 -3
- package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.js +7 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +21 -11
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +39 -28
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
- package/dist/features/column-filtering/createFilteredRowModel.js +11 -5
- package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +18 -14
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +1 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +55 -43
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +14 -5
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +46 -29
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +30 -23
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +46 -29
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +43 -31
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +152 -115
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +116 -95
- package/dist/features/column-pinning/columnPinningFeature.utils.js +153 -116
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +9 -9
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js +28 -19
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +28 -4
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.js +28 -4
- package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +19 -12
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js +52 -41
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +23 -14
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.js +24 -15
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +19 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +91 -52
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +63 -40
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +91 -53
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +10 -5
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +20 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +16 -15
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +58 -43
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +1 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +56 -41
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +58 -43
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +19 -12
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +1 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +49 -32
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +12 -8
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +52 -36
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +1 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +39 -29
- package/dist/features/row-pinning/rowPinningFeature.utils.js +52 -36
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +30 -24
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +95 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +1 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +89 -69
- package/dist/features/row-selection/rowSelectionFeature.utils.js +95 -72
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +13 -8
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
- package/dist/features/row-sorting/createSortedRowModel.js +13 -8
- package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +10 -8
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +63 -46
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +1 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +61 -44
- package/dist/features/row-sorting/rowSortingFeature.utils.js +63 -46
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +1 -1
- package/dist/fns/aggregationFns.cjs +47 -16
- package/dist/fns/aggregationFns.cjs.map +1 -1
- package/dist/fns/aggregationFns.d.cts +33 -9
- package/dist/fns/aggregationFns.d.ts +33 -9
- package/dist/fns/aggregationFns.js +47 -17
- package/dist/fns/aggregationFns.js.map +1 -1
- package/dist/fns/filterFns.cjs +48 -17
- package/dist/fns/filterFns.cjs.map +1 -1
- package/dist/fns/filterFns.d.cts +42 -15
- package/dist/fns/filterFns.d.ts +42 -15
- package/dist/fns/filterFns.js +48 -17
- package/dist/fns/filterFns.js.map +1 -1
- package/dist/helpers/columnHelper.cjs +9 -4
- package/dist/helpers/columnHelper.cjs.map +1 -1
- package/dist/helpers/columnHelper.d.cts +9 -4
- package/dist/helpers/columnHelper.d.ts +9 -4
- package/dist/helpers/columnHelper.js +9 -4
- package/dist/helpers/columnHelper.js.map +1 -1
- package/dist/helpers/tableOptions.cjs.map +1 -1
- package/dist/helpers/tableOptions.d.cts +12 -9
- package/dist/helpers/tableOptions.d.ts +12 -9
- package/dist/helpers/tableOptions.js.map +1 -1
- package/dist/index.cjs +0 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/static-functions.cjs +1 -0
- package/dist/static-functions.d.cts +2 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/store-reactivity-bindings.cjs +1 -0
- package/dist/store-reactivity-bindings.cjs.map +1 -1
- package/dist/store-reactivity-bindings.js +1 -0
- package/dist/store-reactivity-bindings.js.map +1 -1
- package/dist/types/ColumnDef.d.cts +38 -0
- package/dist/types/ColumnDef.d.ts +38 -0
- package/dist/types/TableOptions.d.cts +15 -0
- package/dist/types/TableOptions.d.ts +15 -0
- package/dist/types/TableState.d.cts +12 -0
- package/dist/types/TableState.d.ts +12 -0
- package/dist/utils.cjs +18 -39
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -23
- package/dist/utils.d.ts +1 -23
- package/dist/utils.js +19 -36
- package/dist/utils.js.map +1 -1
- package/package.json +5 -3
- package/skills/column-definitions/SKILL.md +333 -0
- package/skills/column-layout/SKILL.md +328 -0
- package/skills/column-layout/references/subsystems.md +220 -0
- package/skills/customizing-feature-behavior/SKILL.md +416 -0
- package/skills/filtering/SKILL.md +357 -0
- package/skills/filtering/references/faceting-and-fuzzy.md +191 -0
- package/skills/grouping/SKILL.md +448 -0
- package/skills/migrate-v8-to-v9/SKILL.md +495 -0
- package/skills/pagination/SKILL.md +385 -0
- package/skills/row-expanding/SKILL.md +348 -0
- package/skills/row-pinning/SKILL.md +269 -0
- package/skills/row-selection/SKILL.md +391 -0
- package/skills/setup/SKILL.md +400 -0
- package/skills/sorting/SKILL.md +344 -0
- package/skills/state-management/SKILL.md +388 -0
- package/src/core/cells/constructCell.ts +3 -2
- package/src/core/cells/coreCellsFeature.utils.ts +11 -8
- package/src/core/columns/constructColumn.ts +5 -3
- package/src/core/columns/coreColumnsFeature.types.ts +7 -6
- package/src/core/columns/coreColumnsFeature.utils.ts +43 -29
- package/src/core/headers/buildHeaderGroups.ts +29 -30
- package/src/core/headers/constructHeader.ts +3 -2
- package/src/core/headers/coreHeadersFeature.ts +2 -27
- package/src/core/headers/coreHeadersFeature.types.ts +6 -4
- package/src/core/headers/coreHeadersFeature.utils.ts +52 -61
- package/src/core/reactivity/coreReactivityFeature.types.ts +4 -0
- package/src/core/row-models/coreRowModelsFeature.utils.ts +48 -36
- package/src/core/rows/constructRow.ts +6 -4
- package/src/core/rows/coreRowsFeature.types.ts +4 -4
- package/src/core/rows/coreRowsFeature.utils.ts +45 -32
- package/src/core/table/constructTable.ts +6 -4
- package/src/core/table/coreTablesFeature.types.ts +6 -2
- package/src/core/table/coreTablesFeature.utils.ts +5 -3
- package/src/features/column-faceting/columnFacetingFeature.types.ts +16 -10
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +26 -18
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +8 -10
- package/src/features/column-faceting/createFacetedRowModel.ts +10 -6
- package/src/features/column-faceting/createFacetedUniqueValues.ts +4 -3
- package/src/features/column-filtering/columnFilteringFeature.types.ts +21 -11
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +39 -28
- package/src/features/column-filtering/createFilteredRowModel.ts +14 -8
- package/src/features/column-grouping/columnGroupingFeature.types.ts +18 -14
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +55 -43
- package/src/features/column-ordering/columnOrderingFeature.types.ts +14 -5
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +44 -29
- package/src/features/column-pinning/columnPinningFeature.types.ts +43 -31
- package/src/features/column-pinning/columnPinningFeature.utils.ts +164 -128
- package/src/features/column-resizing/columnResizingFeature.types.ts +9 -9
- package/src/features/column-resizing/columnResizingFeature.utils.ts +28 -19
- package/src/features/column-sizing/columnSizingFeature.ts +16 -0
- package/src/features/column-sizing/columnSizingFeature.types.ts +19 -12
- package/src/features/column-sizing/columnSizingFeature.utils.ts +52 -41
- package/src/features/column-visibility/columnVisibilityFeature.ts +8 -0
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +22 -12
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +101 -56
- package/src/features/global-filtering/globalFilteringFeature.types.ts +10 -5
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +20 -14
- package/src/features/row-expanding/rowExpandingFeature.types.ts +16 -15
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +58 -43
- package/src/features/row-pagination/rowPaginationFeature.types.ts +19 -12
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +49 -32
- package/src/features/row-pinning/rowPinningFeature.types.ts +12 -8
- package/src/features/row-pinning/rowPinningFeature.utils.ts +59 -47
- package/src/features/row-selection/rowSelectionFeature.types.ts +30 -24
- package/src/features/row-selection/rowSelectionFeature.utils.ts +109 -88
- package/src/features/row-sorting/createSortedRowModel.ts +16 -13
- package/src/features/row-sorting/rowSortingFeature.types.ts +10 -8
- package/src/features/row-sorting/rowSortingFeature.utils.ts +63 -46
- package/src/fns/aggregationFns.ts +53 -17
- package/src/fns/filterFns.ts +48 -17
- package/src/helpers/columnHelper.ts +9 -4
- package/src/helpers/tableOptions.ts +12 -9
- package/src/store-reactivity-bindings.ts +1 -0
- package/src/types/ColumnDef.ts +38 -0
- package/src/types/TableOptions.ts +15 -0
- package/src/types/TableState.ts +12 -0
- package/src/utils.ts +19 -46
|
@@ -6,32 +6,38 @@ import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
|
|
|
6
6
|
//#region src/features/column-faceting/columnFacetingFeature.types.d.ts
|
|
7
7
|
interface Column_ColumnFaceting<TFeatures extends TableFeatures, TData extends RowData> {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Computes min/max numeric facet values for this column.
|
|
10
10
|
*/
|
|
11
11
|
getFacetedMinMaxValues: () => undefined | [number, number];
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Computes the row model used to derive this column's facet values.
|
|
14
|
+
*
|
|
15
|
+
* Other column filters are applied, while this column's own filter is
|
|
16
|
+
* excluded.
|
|
14
17
|
*/
|
|
15
18
|
getFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
16
19
|
/**
|
|
17
|
-
*
|
|
20
|
+
* Computes unique facet values and occurrence counts for this column.
|
|
18
21
|
*/
|
|
19
22
|
getFacetedUniqueValues: () => Map<any, number>;
|
|
20
23
|
}
|
|
21
24
|
interface Table_RowModels_Faceted<TFeatures extends TableFeatures, TData extends RowData> {
|
|
22
25
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
26
|
+
* Computes min/max numeric facet values for the active faceting context.
|
|
27
|
+
*
|
|
28
|
+
* Requires a `facetedMinMaxValues` row-model factory in `_rowModels`.
|
|
25
29
|
*/
|
|
26
30
|
getFacetedMinMaxValues: () => undefined | [number, number];
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
32
|
+
* Computes the row model used to derive facet values.
|
|
33
|
+
*
|
|
34
|
+
* Requires a `facetedRowModel` row-model factory in `_rowModels`.
|
|
30
35
|
*/
|
|
31
36
|
getFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
32
37
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
38
|
+
* Computes unique facet values and occurrence counts.
|
|
39
|
+
*
|
|
40
|
+
* Requires a `facetedUniqueValues` row-model factory in `_rowModels`.
|
|
35
41
|
*/
|
|
36
42
|
getFacetedUniqueValues: () => Map<any, number>;
|
|
37
43
|
}
|
|
@@ -66,7 +72,7 @@ interface Table_ColumnFaceting<TFeatures extends TableFeatures, TData extends Ro
|
|
|
66
72
|
*/
|
|
67
73
|
getGlobalFacetedMinMaxValues: () => undefined | [number, number];
|
|
68
74
|
/**
|
|
69
|
-
*
|
|
75
|
+
* Computes the row model used to derive global facet values.
|
|
70
76
|
*/
|
|
71
77
|
getGlobalFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
72
78
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/features/column-faceting/columnFacetingFeature.utils.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Computes min and max numeric facet values for one column.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
7
|
+
* If no factory is registered, the result is `undefined`.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```ts
|
|
10
|
-
* const
|
|
11
|
+
* const range = column_getFacetedMinMaxValues(column, table)
|
|
11
12
|
* ```
|
|
12
13
|
*/
|
|
13
14
|
function column_getFacetedMinMaxValues(column, table) {
|
|
@@ -15,13 +16,15 @@ function column_getFacetedMinMaxValues(column, table) {
|
|
|
15
16
|
return (((_table$options$_rowMo = table.options._rowModels) === null || _table$options$_rowMo === void 0 || (_table$options$_rowMo2 = _table$options$_rowMo.facetedMinMaxValues) === null || _table$options$_rowMo2 === void 0 ? void 0 : _table$options$_rowMo2.call(_table$options$_rowMo, table, column.id)) ?? (() => void 0))();
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Computes the row model used to derive one column's facet values.
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
+
* The faceted row model normally applies every other active filter while
|
|
22
|
+
* excluding this column's own filter. If no factory is registered, the
|
|
23
|
+
* pre-filtered row model is returned.
|
|
21
24
|
*
|
|
22
25
|
* @example
|
|
23
26
|
* ```ts
|
|
24
|
-
* const
|
|
27
|
+
* const rows = column_getFacetedRowModel(column, table)
|
|
25
28
|
* ```
|
|
26
29
|
*/
|
|
27
30
|
function column_getFacetedRowModel(column, table) {
|
|
@@ -29,13 +32,14 @@ function column_getFacetedRowModel(column, table) {
|
|
|
29
32
|
return (((_table$options$_rowMo3 = table.options._rowModels) === null || _table$options$_rowMo3 === void 0 || (_table$options$_rowMo4 = _table$options$_rowMo3.facetedRowModel) === null || _table$options$_rowMo4 === void 0 ? void 0 : _table$options$_rowMo4.call(_table$options$_rowMo3, table, (column === null || column === void 0 ? void 0 : column.id) ?? "")) ?? (() => table.getPreFilteredRowModel()))();
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
|
-
*
|
|
35
|
+
* Computes unique facet values and their occurrence counts for one column.
|
|
33
36
|
*
|
|
34
|
-
*
|
|
37
|
+
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
38
|
+
* If no factory is registered, an empty `Map` is returned.
|
|
35
39
|
*
|
|
36
40
|
* @example
|
|
37
41
|
* ```ts
|
|
38
|
-
* const
|
|
42
|
+
* const values = column_getFacetedUniqueValues(column, table)
|
|
39
43
|
* ```
|
|
40
44
|
*/
|
|
41
45
|
function column_getFacetedUniqueValues(column, table) {
|
|
@@ -43,13 +47,14 @@ function column_getFacetedUniqueValues(column, table) {
|
|
|
43
47
|
return (((_table$options$_rowMo5 = table.options._rowModels) === null || _table$options$_rowMo5 === void 0 || (_table$options$_rowMo6 = _table$options$_rowMo5.facetedUniqueValues) === null || _table$options$_rowMo6 === void 0 ? void 0 : _table$options$_rowMo6.call(_table$options$_rowMo5, table, column.id)) ?? (() => /* @__PURE__ */ new Map()))();
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
50
|
+
* Computes min and max numeric facet values for the global filter context.
|
|
47
51
|
*
|
|
48
|
-
*
|
|
52
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
53
|
+
* no factory is registered, the result is `undefined`.
|
|
49
54
|
*
|
|
50
55
|
* @example
|
|
51
56
|
* ```ts
|
|
52
|
-
* const
|
|
57
|
+
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
53
58
|
* ```
|
|
54
59
|
*/
|
|
55
60
|
function table_getGlobalFacetedMinMaxValues(table) {
|
|
@@ -57,13 +62,15 @@ function table_getGlobalFacetedMinMaxValues(table) {
|
|
|
57
62
|
return (((_table$options$_rowMo7 = table.options._rowModels) === null || _table$options$_rowMo7 === void 0 || (_table$options$_rowMo8 = _table$options$_rowMo7.facetedMinMaxValues) === null || _table$options$_rowMo8 === void 0 ? void 0 : _table$options$_rowMo8.call(_table$options$_rowMo7, table, "__global__")) ?? (() => void 0))();
|
|
58
63
|
}
|
|
59
64
|
/**
|
|
60
|
-
*
|
|
65
|
+
* Computes the row model used to derive global facet values.
|
|
61
66
|
*
|
|
62
|
-
*
|
|
67
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
68
|
+
* no faceted row-model factory is registered, the pre-filtered row model is
|
|
69
|
+
* returned.
|
|
63
70
|
*
|
|
64
71
|
* @example
|
|
65
72
|
* ```ts
|
|
66
|
-
* const
|
|
73
|
+
* const rows = table_getGlobalFacetedRowModel(table)
|
|
67
74
|
* ```
|
|
68
75
|
*/
|
|
69
76
|
function table_getGlobalFacetedRowModel(table) {
|
|
@@ -71,13 +78,14 @@ function table_getGlobalFacetedRowModel(table) {
|
|
|
71
78
|
return (((_table$options$_rowMo9 = table.options._rowModels) === null || _table$options$_rowMo9 === void 0 || (_table$options$_rowMo10 = _table$options$_rowMo9.facetedRowModel) === null || _table$options$_rowMo10 === void 0 ? void 0 : _table$options$_rowMo10.call(_table$options$_rowMo9, table, "__global__")) ?? (() => table.getPreFilteredRowModel()))();
|
|
72
79
|
}
|
|
73
80
|
/**
|
|
74
|
-
*
|
|
81
|
+
* Computes unique values and occurrence counts for the global filter context.
|
|
75
82
|
*
|
|
76
|
-
*
|
|
83
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
84
|
+
* no factory is registered, an empty `Map` is returned.
|
|
77
85
|
*
|
|
78
86
|
* @example
|
|
79
87
|
* ```ts
|
|
80
|
-
* const
|
|
88
|
+
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
81
89
|
* ```
|
|
82
90
|
*/
|
|
83
91
|
function table_getGlobalFacetedUniqueValues(table) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnFacetingFeature.utils.cjs","names":[],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import 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 *
|
|
1
|
+
{"version":3,"file":"columnFacetingFeature.utils.cjs","names":[],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import 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 facetedMinMaxValuesFn =\n table.options._rowModels?.facetedMinMaxValues?.(table, column.id) ??\n (() => undefined)\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 facetedRowModelFn =\n table.options._rowModels?.facetedRowModel?.(table, column?.id ?? '') ??\n (() => table.getPreFilteredRowModel())\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 facetedUniqueValuesFn =\n table.options._rowModels?.facetedUniqueValues?.(table, column.id) ??\n (() => new Map<any, number>())\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 const facetedMinMaxValuesFn =\n table.options._rowModels?.facetedMinMaxValues?.(table, '__global__') ??\n (() => undefined)\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 const facetedRowModelFn =\n table.options._rowModels?.facetedRowModel?.(table, '__global__') ??\n (() => table.getPreFilteredRowModel())\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 const facetedUniqueValuesFn =\n table.options._rowModels?.facetedUniqueValues?.(table, '__global__') ??\n (() => new Map())\n return facetedUniqueValuesFn()\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,SAAgB,8BAKd,QACA,OAC8B;;CAI9B,kCAFE,MAAM,QAAQ,4GAAY,iIAAsB,OAAO,OAAO,GAAG,YAC1D,UACqB;;;;;;;;;;;;;;AAehC,SAAgB,0BAKd,QACA,OAC4B;;CAI5B,mCAFE,MAAM,QAAQ,8GAAY,8HAAkB,wDAAO,OAAQ,OAAM,GAAG,YAC7D,MAAM,wBAAwB,IACb;;;;;;;;;;;;;AAc5B,SAAgB,8BAKd,QACA,OACkB;;CAIlB,mCAFE,MAAM,QAAQ,8GAAY,kIAAsB,OAAO,OAAO,GAAG,4BAC1D,IAAI,KAAkB,IACD;;;;;;;;;;;;;AAchC,SAAgB,mCAGd,OAAuE;;CAIvE,mCAFE,MAAM,QAAQ,8GAAY,kIAAsB,OAAO,aAAa,YAC7D,UACqB;;;;;;;;;;;;;;AAehC,SAAgB,+BAGd,OAAqE;;CAIrE,mCAFE,MAAM,QAAQ,+GAAY,gIAAkB,OAAO,aAAa,YACzD,MAAM,wBAAwB,IACb;;;;;;;;;;;;;AAc5B,SAAgB,mCAGd,OAA2D;;CAI3D,oCAFE,MAAM,QAAQ,iHAAY,qIAAsB,OAAO,aAAa,4BAC7D,IAAI,KAAK,IACY"}
|
|
@@ -6,68 +6,76 @@ import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.cjs";
|
|
|
6
6
|
|
|
7
7
|
//#region src/features/column-faceting/columnFacetingFeature.utils.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Computes min and max numeric facet values for one column.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
12
|
+
* If no factory is registered, the result is `undefined`.
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
15
|
-
* const
|
|
16
|
+
* const range = column_getFacetedMinMaxValues(column, table)
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
19
|
declare function column_getFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>, table: Table_Internal<TFeatures, TData>): [number, number] | undefined;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Computes the row model used to derive one column's facet values.
|
|
21
22
|
*
|
|
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.
|
|
23
26
|
*
|
|
24
27
|
* @example
|
|
25
28
|
* ```ts
|
|
26
|
-
* const
|
|
29
|
+
* const rows = column_getFacetedRowModel(column, table)
|
|
27
30
|
* ```
|
|
28
31
|
*/
|
|
29
32
|
declare function column_getFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue> | undefined, table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
34
|
+
* Computes unique facet values and their occurrence counts for one column.
|
|
32
35
|
*
|
|
33
|
-
*
|
|
36
|
+
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
37
|
+
* If no factory is registered, an empty `Map` is returned.
|
|
34
38
|
*
|
|
35
39
|
* @example
|
|
36
40
|
* ```ts
|
|
37
|
-
* const
|
|
41
|
+
* const values = column_getFacetedUniqueValues(column, table)
|
|
38
42
|
* ```
|
|
39
43
|
*/
|
|
40
44
|
declare function column_getFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>, table: Table_Internal<TFeatures, TData>): Map<any, number>;
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* Computes min and max numeric facet values for the global filter context.
|
|
43
47
|
*
|
|
44
|
-
*
|
|
48
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
49
|
+
* no factory is registered, the result is `undefined`.
|
|
45
50
|
*
|
|
46
51
|
* @example
|
|
47
52
|
* ```ts
|
|
48
|
-
* const
|
|
53
|
+
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
49
54
|
* ```
|
|
50
55
|
*/
|
|
51
56
|
declare function table_getGlobalFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): undefined | [number, number];
|
|
52
57
|
/**
|
|
53
|
-
*
|
|
58
|
+
* Computes the row model used to derive global facet values.
|
|
54
59
|
*
|
|
55
|
-
*
|
|
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.
|
|
56
63
|
*
|
|
57
64
|
* @example
|
|
58
65
|
* ```ts
|
|
59
|
-
* const
|
|
66
|
+
* const rows = table_getGlobalFacetedRowModel(table)
|
|
60
67
|
* ```
|
|
61
68
|
*/
|
|
62
69
|
declare function table_getGlobalFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
63
70
|
/**
|
|
64
|
-
*
|
|
71
|
+
* Computes unique values and occurrence counts for the global filter context.
|
|
65
72
|
*
|
|
66
|
-
*
|
|
73
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
74
|
+
* no factory is registered, an empty `Map` is returned.
|
|
67
75
|
*
|
|
68
76
|
* @example
|
|
69
77
|
* ```ts
|
|
70
|
-
* const
|
|
78
|
+
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
71
79
|
* ```
|
|
72
80
|
*/
|
|
73
81
|
declare function table_getGlobalFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): Map<any, number>;
|
|
@@ -6,68 +6,76 @@ import { RowModel } from "../../core/row-models/coreRowModelsFeature.types.js";
|
|
|
6
6
|
|
|
7
7
|
//#region src/features/column-faceting/columnFacetingFeature.utils.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Computes min and max numeric facet values for one column.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
12
|
+
* If no factory is registered, the result is `undefined`.
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
15
|
-
* const
|
|
16
|
+
* const range = column_getFacetedMinMaxValues(column, table)
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
19
|
declare function column_getFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>, table: Table_Internal<TFeatures, TData>): [number, number] | undefined;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* Computes the row model used to derive one column's facet values.
|
|
21
22
|
*
|
|
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.
|
|
23
26
|
*
|
|
24
27
|
* @example
|
|
25
28
|
* ```ts
|
|
26
|
-
* const
|
|
29
|
+
* const rows = column_getFacetedRowModel(column, table)
|
|
27
30
|
* ```
|
|
28
31
|
*/
|
|
29
32
|
declare function column_getFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue> | undefined, table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
34
|
+
* Computes unique facet values and their occurrence counts for one column.
|
|
32
35
|
*
|
|
33
|
-
*
|
|
36
|
+
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
37
|
+
* If no factory is registered, an empty `Map` is returned.
|
|
34
38
|
*
|
|
35
39
|
* @example
|
|
36
40
|
* ```ts
|
|
37
|
-
* const
|
|
41
|
+
* const values = column_getFacetedUniqueValues(column, table)
|
|
38
42
|
* ```
|
|
39
43
|
*/
|
|
40
44
|
declare function column_getFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column_Internal<TFeatures, TData, TValue>, table: Table_Internal<TFeatures, TData>): Map<any, number>;
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* Computes min and max numeric facet values for the global filter context.
|
|
43
47
|
*
|
|
44
|
-
*
|
|
48
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
49
|
+
* no factory is registered, the result is `undefined`.
|
|
45
50
|
*
|
|
46
51
|
* @example
|
|
47
52
|
* ```ts
|
|
48
|
-
* const
|
|
53
|
+
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
49
54
|
* ```
|
|
50
55
|
*/
|
|
51
56
|
declare function table_getGlobalFacetedMinMaxValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): undefined | [number, number];
|
|
52
57
|
/**
|
|
53
|
-
*
|
|
58
|
+
* Computes the row model used to derive global facet values.
|
|
54
59
|
*
|
|
55
|
-
*
|
|
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.
|
|
56
63
|
*
|
|
57
64
|
* @example
|
|
58
65
|
* ```ts
|
|
59
|
-
* const
|
|
66
|
+
* const rows = table_getGlobalFacetedRowModel(table)
|
|
60
67
|
* ```
|
|
61
68
|
*/
|
|
62
69
|
declare function table_getGlobalFacetedRowModel<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): RowModel<TFeatures, TData>;
|
|
63
70
|
/**
|
|
64
|
-
*
|
|
71
|
+
* Computes unique values and occurrence counts for the global filter context.
|
|
65
72
|
*
|
|
66
|
-
*
|
|
73
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
74
|
+
* no factory is registered, an empty `Map` is returned.
|
|
67
75
|
*
|
|
68
76
|
* @example
|
|
69
77
|
* ```ts
|
|
70
|
-
* const
|
|
78
|
+
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
71
79
|
* ```
|
|
72
80
|
*/
|
|
73
81
|
declare function table_getGlobalFacetedUniqueValues<TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>): Map<any, number>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
//#region src/features/column-faceting/columnFacetingFeature.utils.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Computes min and max numeric facet values for one column.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* The configured `facetedMinMaxValues` row-model factory owns the calculation.
|
|
6
|
+
* If no factory is registered, the result is `undefined`.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* ```ts
|
|
9
|
-
* const
|
|
10
|
+
* const range = column_getFacetedMinMaxValues(column, table)
|
|
10
11
|
* ```
|
|
11
12
|
*/
|
|
12
13
|
function column_getFacetedMinMaxValues(column, table) {
|
|
@@ -14,13 +15,15 @@ function column_getFacetedMinMaxValues(column, table) {
|
|
|
14
15
|
return (((_table$options$_rowMo = table.options._rowModels) === null || _table$options$_rowMo === void 0 || (_table$options$_rowMo2 = _table$options$_rowMo.facetedMinMaxValues) === null || _table$options$_rowMo2 === void 0 ? void 0 : _table$options$_rowMo2.call(_table$options$_rowMo, table, column.id)) ?? (() => void 0))();
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* Computes the row model used to derive one column's facet values.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
+
* The faceted row model normally applies every other active filter while
|
|
21
|
+
* excluding this column's own filter. If no factory is registered, the
|
|
22
|
+
* pre-filtered row model is returned.
|
|
20
23
|
*
|
|
21
24
|
* @example
|
|
22
25
|
* ```ts
|
|
23
|
-
* const
|
|
26
|
+
* const rows = column_getFacetedRowModel(column, table)
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
29
|
function column_getFacetedRowModel(column, table) {
|
|
@@ -28,13 +31,14 @@ function column_getFacetedRowModel(column, table) {
|
|
|
28
31
|
return (((_table$options$_rowMo3 = table.options._rowModels) === null || _table$options$_rowMo3 === void 0 || (_table$options$_rowMo4 = _table$options$_rowMo3.facetedRowModel) === null || _table$options$_rowMo4 === void 0 ? void 0 : _table$options$_rowMo4.call(_table$options$_rowMo3, table, (column === null || column === void 0 ? void 0 : column.id) ?? "")) ?? (() => table.getPreFilteredRowModel()))();
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
|
-
*
|
|
34
|
+
* Computes unique facet values and their occurrence counts for one column.
|
|
32
35
|
*
|
|
33
|
-
*
|
|
36
|
+
* The configured `facetedUniqueValues` row-model factory owns the calculation.
|
|
37
|
+
* If no factory is registered, an empty `Map` is returned.
|
|
34
38
|
*
|
|
35
39
|
* @example
|
|
36
40
|
* ```ts
|
|
37
|
-
* const
|
|
41
|
+
* const values = column_getFacetedUniqueValues(column, table)
|
|
38
42
|
* ```
|
|
39
43
|
*/
|
|
40
44
|
function column_getFacetedUniqueValues(column, table) {
|
|
@@ -42,13 +46,14 @@ function column_getFacetedUniqueValues(column, table) {
|
|
|
42
46
|
return (((_table$options$_rowMo5 = table.options._rowModels) === null || _table$options$_rowMo5 === void 0 || (_table$options$_rowMo6 = _table$options$_rowMo5.facetedUniqueValues) === null || _table$options$_rowMo6 === void 0 ? void 0 : _table$options$_rowMo6.call(_table$options$_rowMo5, table, column.id)) ?? (() => /* @__PURE__ */ new Map()))();
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
|
-
*
|
|
49
|
+
* Computes min and max numeric facet values for the global filter context.
|
|
46
50
|
*
|
|
47
|
-
*
|
|
51
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
52
|
+
* no factory is registered, the result is `undefined`.
|
|
48
53
|
*
|
|
49
54
|
* @example
|
|
50
55
|
* ```ts
|
|
51
|
-
* const
|
|
56
|
+
* const range = table_getGlobalFacetedMinMaxValues(table)
|
|
52
57
|
* ```
|
|
53
58
|
*/
|
|
54
59
|
function table_getGlobalFacetedMinMaxValues(table) {
|
|
@@ -56,13 +61,15 @@ function table_getGlobalFacetedMinMaxValues(table) {
|
|
|
56
61
|
return (((_table$options$_rowMo7 = table.options._rowModels) === null || _table$options$_rowMo7 === void 0 || (_table$options$_rowMo8 = _table$options$_rowMo7.facetedMinMaxValues) === null || _table$options$_rowMo8 === void 0 ? void 0 : _table$options$_rowMo8.call(_table$options$_rowMo7, table, "__global__")) ?? (() => void 0))();
|
|
57
62
|
}
|
|
58
63
|
/**
|
|
59
|
-
*
|
|
64
|
+
* Computes the row model used to derive global facet values.
|
|
60
65
|
*
|
|
61
|
-
*
|
|
66
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
67
|
+
* no faceted row-model factory is registered, the pre-filtered row model is
|
|
68
|
+
* returned.
|
|
62
69
|
*
|
|
63
70
|
* @example
|
|
64
71
|
* ```ts
|
|
65
|
-
* const
|
|
72
|
+
* const rows = table_getGlobalFacetedRowModel(table)
|
|
66
73
|
* ```
|
|
67
74
|
*/
|
|
68
75
|
function table_getGlobalFacetedRowModel(table) {
|
|
@@ -70,13 +77,14 @@ function table_getGlobalFacetedRowModel(table) {
|
|
|
70
77
|
return (((_table$options$_rowMo9 = table.options._rowModels) === null || _table$options$_rowMo9 === void 0 || (_table$options$_rowMo10 = _table$options$_rowMo9.facetedRowModel) === null || _table$options$_rowMo10 === void 0 ? void 0 : _table$options$_rowMo10.call(_table$options$_rowMo9, table, "__global__")) ?? (() => table.getPreFilteredRowModel()))();
|
|
71
78
|
}
|
|
72
79
|
/**
|
|
73
|
-
*
|
|
80
|
+
* Computes unique values and occurrence counts for the global filter context.
|
|
74
81
|
*
|
|
75
|
-
*
|
|
82
|
+
* The global context is requested with the internal `__global__` column id. If
|
|
83
|
+
* no factory is registered, an empty `Map` is returned.
|
|
76
84
|
*
|
|
77
85
|
* @example
|
|
78
86
|
* ```ts
|
|
79
|
-
* const
|
|
87
|
+
* const values = table_getGlobalFacetedUniqueValues(table)
|
|
80
88
|
* ```
|
|
81
89
|
*/
|
|
82
90
|
function table_getGlobalFacetedUniqueValues(table) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnFacetingFeature.utils.js","names":[],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import 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 *
|
|
1
|
+
{"version":3,"file":"columnFacetingFeature.utils.js","names":[],"sources":["../../../src/features/column-faceting/columnFacetingFeature.utils.ts"],"sourcesContent":["import 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 facetedMinMaxValuesFn =\n table.options._rowModels?.facetedMinMaxValues?.(table, column.id) ??\n (() => undefined)\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 facetedRowModelFn =\n table.options._rowModels?.facetedRowModel?.(table, column?.id ?? '') ??\n (() => table.getPreFilteredRowModel())\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 facetedUniqueValuesFn =\n table.options._rowModels?.facetedUniqueValues?.(table, column.id) ??\n (() => new Map<any, number>())\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 const facetedMinMaxValuesFn =\n table.options._rowModels?.facetedMinMaxValues?.(table, '__global__') ??\n (() => undefined)\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 const facetedRowModelFn =\n table.options._rowModels?.facetedRowModel?.(table, '__global__') ??\n (() => table.getPreFilteredRowModel())\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 const facetedUniqueValuesFn =\n table.options._rowModels?.facetedUniqueValues?.(table, '__global__') ??\n (() => new Map())\n return facetedUniqueValuesFn()\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgB,8BAKd,QACA,OAC8B;;CAI9B,kCAFE,MAAM,QAAQ,4GAAY,iIAAsB,OAAO,OAAO,GAAG,YAC1D,UACqB;;;;;;;;;;;;;;AAehC,SAAgB,0BAKd,QACA,OAC4B;;CAI5B,mCAFE,MAAM,QAAQ,8GAAY,8HAAkB,wDAAO,OAAQ,OAAM,GAAG,YAC7D,MAAM,wBAAwB,IACb;;;;;;;;;;;;;AAc5B,SAAgB,8BAKd,QACA,OACkB;;CAIlB,mCAFE,MAAM,QAAQ,8GAAY,kIAAsB,OAAO,OAAO,GAAG,4BAC1D,IAAI,KAAkB,IACD;;;;;;;;;;;;;AAchC,SAAgB,mCAGd,OAAuE;;CAIvE,mCAFE,MAAM,QAAQ,8GAAY,kIAAsB,OAAO,aAAa,YAC7D,UACqB;;;;;;;;;;;;;;AAehC,SAAgB,+BAGd,OAAqE;;CAIrE,mCAFE,MAAM,QAAQ,+GAAY,gIAAkB,OAAO,aAAa,YACzD,MAAM,wBAAwB,IACb;;;;;;;;;;;;;AAc5B,SAAgB,mCAGd,OAA2D;;CAI3D,oCAFE,MAAM,QAAQ,iHAAY,qIAAsB,OAAO,aAAa,4BAC7D,IAAI,KAAK,IACY"}
|
|
@@ -25,14 +25,17 @@ function createFacetedMinMaxValues() {
|
|
|
25
25
|
}
|
|
26
26
|
function _createFacetedMinMaxValues(columnId, flatRows) {
|
|
27
27
|
if (!flatRows.length) return void 0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
let
|
|
32
|
-
|
|
28
|
+
let facetedMinValue = Number.POSITIVE_INFINITY;
|
|
29
|
+
let facetedMaxValue = Number.NEGATIVE_INFINITY;
|
|
30
|
+
let foundAny = false;
|
|
31
|
+
for (let i = 0; i < flatRows.length; i++) {
|
|
32
|
+
const value = Number(flatRows[i].getValue(columnId));
|
|
33
|
+
if (Number.isNaN(value)) continue;
|
|
34
|
+
foundAny = true;
|
|
33
35
|
if (value < facetedMinValue) facetedMinValue = value;
|
|
34
36
|
if (value > facetedMaxValue) facetedMaxValue = value;
|
|
35
37
|
}
|
|
38
|
+
if (!foundAny) return void 0;
|
|
36
39
|
return [facetedMinValue, facetedMaxValue];
|
|
37
40
|
}
|
|
38
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFacetedMinMaxValues.cjs","names":["tableMemo","callMemoOrStaticFn","column_getFacetedRowModel"],"sources":["../../../src/features/column-faceting/createFacetedMinMaxValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getFacetedRowModel } 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_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'columnFacetingFeature',\n fn: (flatRows) => _createFacetedMinMaxValues(columnId, flatRows),\n fnName: 'table.getFacetedMinMaxValues',\n memoDeps: () => {\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 columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): undefined | [number, number] {\n if (!flatRows.length) return undefined\n\n
|
|
1
|
+
{"version":3,"file":"createFacetedMinMaxValues.cjs","names":["tableMemo","callMemoOrStaticFn","column_getFacetedRowModel"],"sources":["../../../src/features/column-faceting/createFacetedMinMaxValues.ts"],"sourcesContent":["import { callMemoOrStaticFn, tableMemo } from '../../utils'\nimport { column_getFacetedRowModel } 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_Internal<TFeatures, TData> = _table\n return tableMemo({\n feature: 'columnFacetingFeature',\n fn: (flatRows) => _createFacetedMinMaxValues(columnId, flatRows),\n fnName: 'table.getFacetedMinMaxValues',\n memoDeps: () => {\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 columnId: string,\n flatRows: Array<Row<TFeatures, TData>>,\n): undefined | [number, number] {\n if (!flatRows.length) return undefined\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 const value = Number(flatRows[i]!.getValue(columnId))\n if (Number.isNaN(value)) continue\n foundAny = true\n if (value < facetedMinValue) facetedMinValue = value\n if (value > facetedMaxValue) facetedMaxValue = value\n }\n\n if (!foundAny) return undefined\n return [facetedMinValue, facetedMaxValue]\n}\n"],"mappings":";;;;;;;;;AAYA,SAAgB,4BAMwB;CACtC,QAAQ,QAAQ,aAAa;EAC3B,MAAM,QAA0C;EAChD,OAAOA,wBAAU;GACf,SAAS;GACT,KAAK,aAAa,2BAA2B,UAAU,SAAS;GAChE,QAAQ;GACR,gBAAgB;IACd,MAAM,SAAS,MAAM,UAAU,SAAS;IACxC,IAAI,CAAC,QAAQ,OAAO,CAAC,MAAM,wBAAwB,CAAC,SAAS;IAC7D,OAAO,CACLC,iCACE,QACA,sBACAC,+DACA,MACD,CAAC,SACH;;GAEH;GACD,CAAC;;;AAIN,SAAS,2BAIP,UACA,UAC8B;CAC9B,IAAI,CAAC,SAAS,QAAQ,OAAO;CAE7B,IAAI,kBAAkB,OAAO;CAC7B,IAAI,kBAAkB,OAAO;CAC7B,IAAI,WAAW;CAEf,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,QAAQ,OAAO,SAAS,GAAI,SAAS,SAAS,CAAC;EACrD,IAAI,OAAO,MAAM,MAAM,EAAE;EACzB,WAAW;EACX,IAAI,QAAQ,iBAAiB,kBAAkB;EAC/C,IAAI,QAAQ,iBAAiB,kBAAkB;;CAGjD,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO,CAAC,iBAAiB,gBAAgB"}
|
|
@@ -25,14 +25,17 @@ function createFacetedMinMaxValues() {
|
|
|
25
25
|
}
|
|
26
26
|
function _createFacetedMinMaxValues(columnId, flatRows) {
|
|
27
27
|
if (!flatRows.length) return void 0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
let
|
|
32
|
-
|
|
28
|
+
let facetedMinValue = Number.POSITIVE_INFINITY;
|
|
29
|
+
let facetedMaxValue = Number.NEGATIVE_INFINITY;
|
|
30
|
+
let foundAny = false;
|
|
31
|
+
for (let i = 0; i < flatRows.length; i++) {
|
|
32
|
+
const value = Number(flatRows[i].getValue(columnId));
|
|
33
|
+
if (Number.isNaN(value)) continue;
|
|
34
|
+
foundAny = true;
|
|
33
35
|
if (value < facetedMinValue) facetedMinValue = value;
|
|
34
36
|
if (value > facetedMaxValue) facetedMaxValue = value;
|
|
35
37
|
}
|
|
38
|
+
if (!foundAny) return void 0;
|
|
36
39
|
return [facetedMinValue, facetedMaxValue];
|
|
37
40
|
}
|
|
38
41
|
|