@tanstack/table-core 9.0.0-beta.7 → 9.0.0-beta.71
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 +5 -1
- package/dist/core/cells/constructCell.d.ts +4 -6
- package/dist/core/cells/constructCell.js +4 -6
- package/dist/core/cells/coreCellsFeature.d.ts +1 -3
- package/dist/core/cells/coreCellsFeature.js +1 -2
- package/dist/core/cells/coreCellsFeature.types.d.ts +7 -9
- package/dist/core/cells/coreCellsFeature.utils.d.ts +5 -5
- package/dist/core/cells/coreCellsFeature.utils.js +1 -2
- package/dist/core/columns/constructColumn.d.ts +4 -6
- package/dist/core/columns/constructColumn.js +8 -9
- package/dist/core/columns/coreColumnsFeature.d.ts +1 -3
- package/dist/core/columns/coreColumnsFeature.js +13 -20
- package/dist/core/columns/coreColumnsFeature.types.d.ts +13 -15
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +10 -12
- package/dist/core/columns/coreColumnsFeature.utils.js +19 -20
- package/dist/core/coreFeatures.d.ts +3 -3
- package/dist/core/coreFeatures.js +1 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +3 -5
- package/dist/core/headers/buildHeaderGroups.js +99 -85
- package/dist/core/headers/constructHeader.d.ts +3 -5
- package/dist/core/headers/constructHeader.js +4 -6
- package/dist/core/headers/coreHeadersFeature.d.ts +1 -3
- package/dist/core/headers/coreHeadersFeature.js +9 -13
- package/dist/core/headers/coreHeadersFeature.types.d.ts +21 -11
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +8 -8
- package/dist/core/headers/coreHeadersFeature.utils.js +14 -17
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +8 -3
- package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +1 -3
- package/dist/core/reactivity/coreReactivityFeature.utils.js +1 -2
- package/dist/core/reactivity/renderPhaseReactivity.d.ts +80 -0
- package/dist/core/reactivity/renderPhaseReactivity.js +95 -0
- package/dist/core/row-models/coreRowModelsFeature.d.ts +1 -3
- package/dist/core/row-models/coreRowModelsFeature.js +1 -2
- package/dist/core/row-models/coreRowModelsFeature.types.d.ts +7 -17
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +17 -19
- package/dist/core/row-models/coreRowModelsFeature.utils.js +9 -28
- package/dist/core/row-models/createCoreRowModel.d.ts +3 -5
- package/dist/core/row-models/createCoreRowModel.js +27 -24
- package/dist/core/rows/constructRow.d.ts +3 -5
- package/dist/core/rows/constructRow.js +9 -13
- package/dist/core/rows/coreRowsFeature.d.ts +1 -3
- package/dist/core/rows/coreRowsFeature.js +20 -5
- package/dist/core/rows/coreRowsFeature.types.d.ts +42 -10
- package/dist/core/rows/coreRowsFeature.utils.d.ts +26 -9
- package/dist/core/rows/coreRowsFeature.utils.js +65 -14
- package/dist/core/table/constructTable.d.ts +2 -4
- package/dist/core/table/constructTable.js +52 -23
- package/dist/core/table/coreTablesFeature.d.ts +1 -3
- package/dist/core/table/coreTablesFeature.js +1 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +56 -25
- package/dist/core/table/coreTablesFeature.utils.d.ts +34 -12
- package/dist/core/table/coreTablesFeature.utils.js +69 -24
- package/dist/experimental-worker-plugin.d.ts +5 -0
- package/dist/experimental-worker-plugin.js +6 -0
- package/dist/features/cell-selection/cellSelectionFeature.d.ts +8 -0
- package/dist/features/cell-selection/cellSelectionFeature.js +128 -0
- package/dist/features/cell-selection/cellSelectionFeature.types.d.ts +296 -0
- package/dist/features/cell-selection/cellSelectionFeature.utils.d.ts +306 -0
- package/dist/features/cell-selection/cellSelectionFeature.utils.js +873 -0
- package/dist/features/cell-selection/cellSelectionGeometry.js +121 -0
- package/dist/features/cell-spanning/cellSpanningFeature.d.ts +13 -0
- package/dist/features/cell-spanning/cellSpanningFeature.js +47 -0
- package/dist/features/cell-spanning/cellSpanningFeature.types.d.ts +150 -0
- package/dist/features/cell-spanning/cellSpanningFeature.utils.d.ts +74 -0
- package/dist/features/cell-spanning/cellSpanningFeature.utils.js +262 -0
- package/dist/features/column-faceting/columnFacetingFeature.d.ts +1 -3
- package/dist/features/column-faceting/columnFacetingFeature.js +13 -20
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +15 -35
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +10 -12
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +25 -14
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +2 -4
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +9 -7
- package/dist/features/column-faceting/createFacetedRowModel.d.ts +3 -5
- package/dist/features/column-faceting/createFacetedRowModel.js +12 -17
- package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +2 -4
- package/dist/features/column-faceting/createFacetedUniqueValues.js +12 -9
- package/dist/features/column-filtering/columnFilteringFeature.d.ts +1 -3
- package/dist/features/column-filtering/columnFilteringFeature.js +4 -5
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +85 -33
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +19 -17
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +33 -21
- package/dist/features/column-filtering/createFilteredRowModel.d.ts +11 -7
- package/dist/features/column-filtering/createFilteredRowModel.js +33 -29
- package/dist/features/column-filtering/filterFns.d.ts +208 -0
- package/dist/features/column-filtering/filterFns.js +374 -0
- package/dist/features/column-filtering/filterRowsUtils.js +4 -4
- package/dist/features/column-grouping/columnGroupingFeature.d.ts +2 -4
- package/dist/features/column-grouping/columnGroupingFeature.js +7 -20
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +14 -52
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +12 -51
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +8 -61
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +7 -7
- package/dist/features/column-grouping/createGroupedRowModel.js +69 -38
- package/dist/features/column-ordering/columnOrderingFeature.d.ts +1 -3
- package/dist/features/column-ordering/columnOrderingFeature.js +19 -24
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +28 -5
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +26 -16
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +36 -18
- package/dist/features/column-pinning/columnPinningFeature.d.ts +7 -4
- package/dist/features/column-pinning/columnPinningFeature.js +126 -146
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +53 -44
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +100 -93
- package/dist/features/column-pinning/columnPinningFeature.utils.js +148 -150
- package/dist/features/column-resizing/columnResizingFeature.d.ts +1 -3
- package/dist/features/column-resizing/columnResizingFeature.js +1 -2
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +2 -7
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +7 -9
- package/dist/features/column-resizing/columnResizingFeature.utils.js +86 -48
- package/dist/features/column-sizing/columnSizingFeature.d.ts +1 -3
- package/dist/features/column-sizing/columnSizingFeature.js +35 -70
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +52 -11
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +43 -27
- package/dist/features/column-sizing/columnSizingFeature.utils.js +95 -54
- package/dist/features/column-visibility/columnVisibilityFeature.d.ts +1 -3
- package/dist/features/column-visibility/columnVisibilityFeature.js +26 -38
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +4 -6
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +20 -20
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +32 -32
- package/dist/features/global-filtering/globalFilteringFeature.d.ts +1 -3
- package/dist/features/global-filtering/globalFilteringFeature.js +3 -4
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +4 -6
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +10 -13
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +7 -8
- package/dist/features/row-aggregation/aggregationFns.d.ts +66 -0
- package/dist/features/row-aggregation/aggregationFns.js +279 -0
- package/dist/features/row-aggregation/rowAggregationFeature.d.ts +8 -0
- package/dist/features/row-aggregation/rowAggregationFeature.js +35 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +193 -0
- package/dist/features/row-aggregation/rowAggregationFeature.types.js +11 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +46 -0
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js +235 -0
- package/dist/features/row-expanding/createExpandedRowModel.d.ts +3 -5
- package/dist/features/row-expanding/createExpandedRowModel.js +9 -13
- package/dist/features/row-expanding/rowExpandingFeature.d.ts +1 -3
- package/dist/features/row-expanding/rowExpandingFeature.js +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +6 -17
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +11 -16
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +30 -33
- package/dist/features/row-pagination/createPaginatedRowModel.d.ts +3 -5
- package/dist/features/row-pagination/createPaginatedRowModel.js +7 -12
- package/dist/features/row-pagination/rowPaginationFeature.d.ts +1 -3
- package/dist/features/row-pagination/rowPaginationFeature.js +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +5 -16
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +18 -20
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +10 -17
- package/dist/features/row-pinning/rowPinningFeature.d.ts +1 -3
- package/dist/features/row-pinning/rowPinningFeature.js +5 -18
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +3 -5
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +8 -10
- package/dist/features/row-pinning/rowPinningFeature.utils.js +10 -16
- package/dist/features/row-selection/rowSelectionFeature.d.ts +1 -3
- package/dist/features/row-selection/rowSelectionFeature.js +68 -25
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +51 -15
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +60 -35
- package/dist/features/row-selection/rowSelectionFeature.utils.js +142 -89
- package/dist/features/row-sorting/createSortedRowModel.d.ts +11 -7
- package/dist/features/row-sorting/createSortedRowModel.js +71 -53
- package/dist/features/row-sorting/rowSortingFeature.d.ts +1 -3
- package/dist/features/row-sorting/rowSortingFeature.js +2 -2
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +61 -24
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +31 -22
- package/dist/features/row-sorting/rowSortingFeature.utils.js +51 -25
- package/dist/features/row-sorting/sortFns.d.ts +96 -0
- package/dist/features/row-sorting/sortFns.js +216 -0
- package/dist/features/stockFeatures.d.ts +7 -3
- package/dist/features/stockFeatures.js +7 -2
- package/dist/flex-render.d.ts +2 -4
- package/dist/flex-render.js +10 -3
- package/dist/helpers/columnHelper.d.ts +3 -5
- package/dist/helpers/columnHelper.js +1 -2
- package/dist/helpers/metaHelper.d.ts +25 -0
- package/dist/helpers/metaHelper.js +28 -0
- package/dist/helpers/tableFeatures.d.ts +35 -8
- package/dist/helpers/tableFeatures.js +33 -5
- package/dist/helpers/tableOptions.d.ts +1 -3
- package/dist/helpers/tableOptions.js +1 -2
- package/dist/index.d.ts +34 -27
- package/dist/index.js +10 -5
- package/dist/reactivity.d.ts +2 -1
- package/dist/reactivity.js +2 -1
- package/dist/static-functions.d.ts +12 -9
- package/dist/static-functions.js +12 -9
- package/dist/store-reactivity-bindings.d.ts +2 -4
- package/dist/store-reactivity-bindings.js +4 -5
- package/dist/types/Cell.d.ts +9 -5
- package/dist/types/Column.d.ts +13 -15
- package/dist/types/ColumnDef.d.ts +39 -21
- package/dist/types/Header.d.ts +3 -5
- package/dist/types/HeaderGroup.d.ts +3 -5
- package/dist/types/Row.d.ts +7 -7
- package/dist/types/RowModel.d.ts +11 -25
- package/dist/types/RowModelFns.d.ts +5 -7
- package/dist/types/Table.d.ts +29 -32
- package/dist/types/TableFeatures.d.ts +388 -24
- package/dist/types/TableOptions.d.ts +24 -14
- package/dist/types/TableState.d.ts +8 -8
- package/dist/types/type-utils.d.ts +10 -4
- package/dist/utils.d.ts +32 -26
- package/dist/utils.js +52 -32
- package/dist/worker/createTableWorker.d.ts +100 -0
- package/dist/worker/createTableWorker.js +185 -0
- package/dist/worker/createWorkerRowModel.d.ts +40 -0
- package/dist/worker/createWorkerRowModel.js +77 -0
- package/dist/worker/initTableWorker.d.ts +31 -0
- package/dist/worker/initTableWorker.js +99 -0
- package/dist/worker/rebuildRowModel.d.ts +11 -0
- package/dist/worker/rebuildRowModel.js +71 -0
- package/dist/worker/serializeRowModel.js +51 -0
- package/dist/worker/tableWorkerProtocol.d.ts +88 -0
- package/dist/worker/tableWorkerProtocol.js +26 -0
- package/package.json +12 -28
- package/skills/aggregation/SKILL.md +141 -0
- package/skills/api-not-found/SKILL.md +113 -0
- package/skills/cell-selection/SKILL.md +204 -0
- package/skills/cell-spanning/SKILL.md +162 -0
- package/skills/client-vs-server/SKILL.md +164 -0
- package/skills/column-faceting/SKILL.md +97 -0
- package/skills/column-filtering/SKILL.md +87 -0
- package/skills/column-ordering/SKILL.md +75 -0
- package/skills/column-pinning/SKILL.md +89 -0
- package/skills/column-resizing/SKILL.md +91 -0
- package/skills/column-sizing/SKILL.md +72 -0
- package/skills/column-visibility/SKILL.md +75 -0
- package/skills/core/SKILL.md +175 -0
- package/skills/custom-features/SKILL.md +235 -0
- package/skills/expanding/SKILL.md +80 -0
- package/skills/global-filtering/SKILL.md +84 -0
- package/skills/grouping/SKILL.md +51 -401
- package/skills/migrate-v8-to-v9/SKILL.md +275 -416
- package/skills/pagination/SKILL.md +37 -344
- package/skills/row-pinning/SKILL.md +47 -234
- package/skills/row-selection/SKILL.md +75 -302
- package/skills/sorting/SKILL.md +45 -303
- package/skills/table-features/SKILL.md +159 -0
- package/skills/typescript/SKILL.md +126 -0
- package/dist/core/cells/constructCell.cjs +0 -34
- 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 -61
- 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 -70
- 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 -187
- 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 -103
- 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 -41
- 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 -55
- 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 -142
- 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 -41
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +0 -215
- 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 -52
- 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 -44
- 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 -37
- 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 -99
- package/dist/core/rows/coreRowsFeature.utils.cjs +0 -192
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +0 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +0 -127
- package/dist/core/rows/coreRowsFeature.utils.js.map +0 -1
- package/dist/core/table/constructTable.cjs +0 -118
- 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 -186
- package/dist/core/table/coreTablesFeature.utils.cjs +0 -96
- package/dist/core/table/coreTablesFeature.utils.cjs.map +0 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +0 -57
- package/dist/core/table/coreTablesFeature.utils.js.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.cjs +0 -61
- 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 -85
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +0 -103
- 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 -44
- 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 -50
- 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 -41
- 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 -160
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +0 -212
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +0 -143
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +0 -110
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.d.cts +0 -16
- package/dist/features/column-filtering/createFilteredRowModel.js.map +0 -1
- package/dist/features/column-filtering/filterRowsUtils.cjs +0 -81
- 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 -67
- 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 -165
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +0 -250
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +0 -190
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.cjs +0 -119
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +0 -16
- package/dist/features/column-grouping/createGroupedRowModel.js.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.cjs +0 -58
- 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 -56
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +0 -172
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +0 -107
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.cjs +0 -221
- package/dist/features/column-pinning/columnPinningFeature.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.d.cts +0 -10
- package/dist/features/column-pinning/columnPinningFeature.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +0 -178
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +0 -585
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +0 -375
- 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 -81
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +0 -246
- 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 -124
- 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 -96
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +0 -256
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +0 -182
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +0 -94
- 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 -283
- 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 -41
- 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 -74
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +0 -1
- package/dist/features/row-expanding/createExpandedRowModel.cjs +0 -59
- 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 -127
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +0 -281
- 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 -62
- 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 -135
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +0 -312
- 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 -67
- 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 -229
- 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 -75
- 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 -136
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +0 -514
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +0 -318
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +0 -95
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.d.cts +0 -16
- 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 -188
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +0 -305
- 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/stockFeatures.cjs +0 -41
- package/dist/features/stockFeatures.cjs.map +0 -1
- package/dist/features/stockFeatures.d.cts +0 -41
- 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/fns/aggregationFns.cjs +0 -161
- package/dist/fns/aggregationFns.cjs.map +0 -1
- package/dist/fns/aggregationFns.d.cts +0 -85
- package/dist/fns/aggregationFns.d.ts +0 -85
- package/dist/fns/aggregationFns.js +0 -151
- package/dist/fns/aggregationFns.js.map +0 -1
- package/dist/fns/filterFns.cjs +0 -201
- package/dist/fns/filterFns.cjs.map +0 -1
- package/dist/fns/filterFns.d.cts +0 -167
- package/dist/fns/filterFns.d.ts +0 -167
- package/dist/fns/filterFns.js +0 -185
- package/dist/fns/filterFns.js.map +0 -1
- package/dist/fns/sortFns.cjs +0 -130
- package/dist/fns/sortFns.cjs.map +0 -1
- package/dist/fns/sortFns.d.cts +0 -65
- package/dist/fns/sortFns.d.ts +0 -65
- package/dist/fns/sortFns.js +0 -122
- package/dist/fns/sortFns.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/tableFeatures.cjs +0 -20
- package/dist/helpers/tableFeatures.cjs.map +0 -1
- package/dist/helpers/tableFeatures.d.cts +0 -18
- 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 -133
- package/dist/index.d.cts +0 -78
- package/dist/reactivity.cjs +0 -4
- package/dist/reactivity.d.cts +0 -3
- package/dist/static-functions.cjs +0 -263
- package/dist/static-functions.d.cts +0 -21
- 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 -14
- package/dist/types/Column.d.cts +0 -36
- package/dist/types/ColumnDef.d.cts +0 -109
- package/dist/types/Header.d.cts +0 -16
- package/dist/types/HeaderGroup.d.cts +0 -10
- package/dist/types/Row.d.cts +0 -26
- package/dist/types/RowModel.d.cts +0 -36
- package/dist/types/RowModelFns.d.cts +0 -18
- package/dist/types/Table.d.cts +0 -70
- package/dist/types/TableFeatures.d.cts +0 -53
- package/dist/types/TableOptions.d.cts +0 -69
- package/dist/types/TableState.d.cts +0 -48
- package/dist/types/type-utils.d.cts +0 -23
- package/dist/utils.cjs +0 -243
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.cts +0 -114
- package/dist/utils.js.map +0 -1
- package/skills/column-definitions/SKILL.md +0 -333
- package/skills/column-layout/SKILL.md +0 -328
- package/skills/column-layout/references/subsystems.md +0 -220
- package/skills/customizing-feature-behavior/SKILL.md +0 -416
- package/skills/filtering/SKILL.md +0 -357
- package/skills/filtering/references/faceting-and-fuzzy.md +0 -191
- package/skills/row-expanding/SKILL.md +0 -348
- package/skills/setup/SKILL.md +0 -400
- package/skills/state-management/SKILL.md +0 -388
- 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 -119
- 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 -182
- 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 -200
- 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 -64
- package/src/core/row-models/coreRowModelsFeature.utils.ts +0 -272
- package/src/core/row-models/createCoreRowModel.ts +0 -93
- package/src/core/rows/constructRow.ts +0 -66
- package/src/core/rows/coreRowsFeature.ts +0 -62
- package/src/core/rows/coreRowsFeature.types.ts +0 -117
- package/src/core/rows/coreRowsFeature.utils.ts +0 -264
- package/src/core/table/constructTable.ts +0 -172
- package/src/core/table/coreTablesFeature.ts +0 -19
- package/src/core/table/coreTablesFeature.types.ts +0 -216
- package/src/core/table/coreTablesFeature.utils.ts +0 -131
- package/src/features/column-faceting/columnFacetingFeature.ts +0 -89
- package/src/features/column-faceting/columnFacetingFeature.types.ts +0 -109
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +0 -145
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +0 -66
- package/src/features/column-faceting/createFacetedRowModel.ts +0 -85
- package/src/features/column-faceting/createFacetedUniqueValues.ts +0 -66
- package/src/features/column-filtering/columnFilteringFeature.ts +0 -86
- package/src/features/column-filtering/columnFilteringFeature.types.ts +0 -232
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +0 -331
- package/src/features/column-filtering/createFilteredRowModel.ts +0 -183
- package/src/features/column-filtering/filterRowsUtils.ts +0 -157
- package/src/features/column-grouping/columnGroupingFeature.ts +0 -115
- package/src/features/column-grouping/columnGroupingFeature.types.ts +0 -226
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +0 -354
- package/src/features/column-grouping/createGroupedRowModel.ts +0 -220
- package/src/features/column-ordering/columnOrderingFeature.ts +0 -73
- package/src/features/column-ordering/columnOrderingFeature.types.ts +0 -60
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +0 -241
- package/src/features/column-pinning/columnPinningFeature.ts +0 -316
- package/src/features/column-pinning/columnPinningFeature.types.ts +0 -192
- package/src/features/column-pinning/columnPinningFeature.utils.ts +0 -908
- package/src/features/column-resizing/columnResizingFeature.ts +0 -65
- package/src/features/column-resizing/columnResizingFeature.types.ts +0 -89
- package/src/features/column-resizing/columnResizingFeature.utils.ts +0 -364
- package/src/features/column-sizing/columnSizingFeature.ts +0 -145
- package/src/features/column-sizing/columnSizingFeature.types.ts +0 -102
- package/src/features/column-sizing/columnSizingFeature.utils.ts +0 -381
- package/src/features/column-visibility/columnVisibilityFeature.ts +0 -122
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +0 -112
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +0 -384
- 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 -118
- 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 -147
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +0 -374
- 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 -152
- 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 -140
- package/src/features/row-selection/rowSelectionFeature.types.ts +0 -151
- package/src/features/row-selection/rowSelectionFeature.utils.ts +0 -745
- package/src/features/row-sorting/createSortedRowModel.ts +0 -157
- package/src/features/row-sorting/rowSortingFeature.ts +0 -103
- package/src/features/row-sorting/rowSortingFeature.types.ts +0 -235
- package/src/features/row-sorting/rowSortingFeature.utils.ts +0 -489
- package/src/features/stockFeatures.ts +0 -53
- package/src/flex-render.ts +0 -70
- package/src/fns/aggregationFns.ts +0 -245
- package/src/fns/filterFns.ts +0 -382
- package/src/fns/sortFns.ts +0 -240
- package/src/helpers/columnHelper.ts +0 -122
- package/src/helpers/tableFeatures.ts +0 -24
- 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 -31
- package/src/store-reactivity-bindings.ts +0 -47
- package/src/types/Cell.ts +0 -21
- package/src/types/Column.ts +0 -51
- package/src/types/ColumnDef.ts +0 -228
- package/src/types/Header.ts +0 -23
- package/src/types/HeaderGroup.ts +0 -13
- package/src/types/Row.ts +0 -34
- package/src/types/RowModel.ts +0 -98
- package/src/types/RowModelFns.ts +0 -32
- package/src/types/Table.ts +0 -91
- package/src/types/TableFeatures.ts +0 -101
- package/src/types/TableOptions.ts +0 -101
- package/src/types/TableState.ts +0 -47
- package/src/types/type-utils.ts +0 -84
- package/src/utils.ts +0 -441
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/core/cells/constructCell.ts
|
|
3
|
-
/**
|
|
4
|
-
* Creates or retrieves the cell prototype for a table.
|
|
5
|
-
* The prototype is cached on the table and shared by all cell instances.
|
|
6
|
-
*/
|
|
7
|
-
function getCellPrototype(table) {
|
|
8
|
-
if (!table._cellPrototype) {
|
|
9
|
-
table._cellPrototype = { table };
|
|
10
|
-
const features = Object.values(table._features);
|
|
11
|
-
for (let i = 0; i < features.length; i++) {
|
|
12
|
-
var _assignCellPrototype, _ref;
|
|
13
|
-
(_assignCellPrototype = (_ref = features[i]).assignCellPrototype) === null || _assignCellPrototype === void 0 || _assignCellPrototype.call(_ref, table._cellPrototype, table);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return table._cellPrototype;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Constructs a cell instance from normalized table internals.
|
|
20
|
-
*
|
|
21
|
-
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
22
|
-
*/
|
|
23
|
-
function constructCell(column, row, table) {
|
|
24
|
-
const cellPrototype = getCellPrototype(table);
|
|
25
|
-
const cell = Object.create(cellPrototype);
|
|
26
|
-
cell.column = column;
|
|
27
|
-
cell.id = `${row.id}_${column.id}`;
|
|
28
|
-
cell.row = row;
|
|
29
|
-
return cell;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
exports.constructCell = constructCell;
|
|
34
|
-
//# sourceMappingURL=constructCell.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constructCell.cjs","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,MAAM;EAC/B,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,KAAK;EAChE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,KAAK;CAC5C,MAAM,OAAO,OAAO,OAAO,aAAa;CAOxC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO;AACT"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CellData, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Column } from "../../types/Column.cjs";
|
|
3
|
-
import { Row } from "../../types/Row.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
import { Table_Internal } from "../../types/Table.cjs";
|
|
6
|
-
import { Cell } from "../../types/Cell.cjs";
|
|
7
|
-
|
|
8
|
-
//#region src/core/cells/constructCell.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a cell instance from normalized table internals.
|
|
11
|
-
*
|
|
12
|
-
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
13
|
-
*/
|
|
14
|
-
declare function constructCell<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(column: Column<TFeatures, TData, TValue>, row: Row<TFeatures, TData>, table: Table_Internal<TFeatures, TData>): Cell<TFeatures, TData, TValue>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { constructCell };
|
|
17
|
-
//# sourceMappingURL=constructCell.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constructCell.js","names":[],"sources":["../../../src/core/cells/constructCell.ts"],"sourcesContent":["import type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Row } from '../../types/Row'\nimport type { Cell } from '../../types/Cell'\nimport type { Column } from '../../types/Column'\nimport type { Cell_CoreProperties } from './coreCellsFeature.types'\n\n/**\n * Creates or retrieves the cell prototype for a table.\n * The prototype is cached on the table and shared by all cell instances.\n */\nfunction getCellPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._cellPrototype) {\n table._cellPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignCellPrototype?.(table._cellPrototype, table)\n }\n }\n return table._cellPrototype\n}\n\n/**\n * Constructs a cell instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructCell<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n column: Column<TFeatures, TData, TValue>,\n row: Row<TFeatures, TData>,\n table: Table_Internal<TFeatures, TData>,\n): Cell<TFeatures, TData, TValue> {\n // Create cell with shared prototype for memory efficiency\n const cellPrototype = getCellPrototype(table)\n const cell = Object.create(cellPrototype) as Cell_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n cell.column = column\n cell.id = `${row.id}_${column.id}`\n cell.row = row\n\n return cell as Cell<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAYA,SAAS,iBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,gBAAgB;EACzB,MAAM,iBAAiB,EAAE,MAAM;EAC/B,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,yCAAS,IAAI,oGAAsB,MAAM,gBAAgB,KAAK;EAChE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,cAKd,QACA,KACA,OACgC;CAEhC,MAAM,gBAAgB,iBAAiB,KAAK;CAC5C,MAAM,OAAO,OAAO,OAAO,aAAa;CAOxC,KAAK,SAAS;CACd,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,OAAO;CAC9B,KAAK,MAAM;CAEX,OAAO;AACT"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_coreCellsFeature_utils = require('./coreCellsFeature.utils.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/core/cells/coreCellsFeature.ts
|
|
5
|
-
/**
|
|
6
|
-
* Core feature that adds cell value, render, and context APIs.
|
|
7
|
-
*/
|
|
8
|
-
const coreCellsFeature = { assignCellPrototype: (prototype, table) => {
|
|
9
|
-
require_utils.assignPrototypeAPIs("coreCellsFeature", prototype, table, {
|
|
10
|
-
cell_getValue: { fn: (cell) => require_coreCellsFeature_utils.cell_getValue(cell) },
|
|
11
|
-
cell_renderValue: { fn: (cell) => require_coreCellsFeature_utils.cell_renderValue(cell) },
|
|
12
|
-
cell_getContext: {
|
|
13
|
-
fn: (cell) => require_coreCellsFeature_utils.cell_getContext(cell),
|
|
14
|
-
memoDeps: (cell) => [cell]
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
} };
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.coreCellsFeature = coreCellsFeature;
|
|
21
|
-
//# sourceMappingURL=coreCellsFeature.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.cjs","names":["cell_getValue","cell_renderValue","cell_getContext"],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Core feature that adds cell value, render, and context APIs.\n */\nexport const coreCellsFeature: TableFeature = {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAWA,MAAa,mBAAiC,EAC5C,sBAAsB,WAAW,UAAU;CACzC,kCAAoB,oBAAoB,WAAW,OAAO;EACxD,eAAe,EACb,KAAK,SAASA,6CAAc,IAAI,EAClC;EACA,kBAAkB,EAChB,KAAK,SAASC,gDAAiB,IAAI,EACrC;EACA,iBAAiB;GACf,KAAK,SAASC,+CAAgB,IAAI;GAClC,WAAW,SAAS,CAAC,IAAI;EAC3B;CACF,CAAC;AACH,EACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TableFeature } from "../../types/TableFeatures.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/core/cells/coreCellsFeature.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Core feature that adds cell value, render, and context APIs.
|
|
6
|
-
*/
|
|
7
|
-
declare const coreCellsFeature: TableFeature;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { coreCellsFeature };
|
|
10
|
-
//# sourceMappingURL=coreCellsFeature.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs } from '../../utils'\nimport {\n cell_getContext,\n cell_getValue,\n cell_renderValue,\n} from './coreCellsFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Core feature that adds cell value, render, and context APIs.\n */\nexport const coreCellsFeature: TableFeature = {\n assignCellPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreCellsFeature', prototype, table, {\n cell_getValue: {\n fn: (cell) => cell_getValue(cell),\n },\n cell_renderValue: {\n fn: (cell) => cell_renderValue(cell),\n },\n cell_getContext: {\n fn: (cell) => cell_getContext(cell),\n memoDeps: (cell) => [cell],\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAWA,MAAa,mBAAiC,EAC5C,sBAAsB,WAAW,UAAU;CACzC,oBAAoB,oBAAoB,WAAW,OAAO;EACxD,eAAe,EACb,KAAK,SAAS,cAAc,IAAI,EAClC;EACA,kBAAkB,EAChB,KAAK,SAAS,iBAAiB,IAAI,EACrC;EACA,iBAAiB;GACf,KAAK,SAAS,gBAAgB,IAAI;GAClC,WAAW,SAAS,CAAC,IAAI;EAC3B;CACF,CAAC;AACH,EACF"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { CellData, Getter, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Column } from "../../types/Column.cjs";
|
|
3
|
-
import { Row } from "../../types/Row.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
import { Table, Table_Internal } from "../../types/Table.cjs";
|
|
6
|
-
import { Cell } from "../../types/Cell.cjs";
|
|
7
|
-
|
|
8
|
-
//#region src/core/cells/coreCellsFeature.types.d.ts
|
|
9
|
-
interface CellContext<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> {
|
|
10
|
-
cell: Cell<TFeatures, TData, TValue>;
|
|
11
|
-
column: Column<TFeatures, TData, TValue>;
|
|
12
|
-
getValue: Getter<TValue>;
|
|
13
|
-
renderValue: Getter<TValue | null>;
|
|
14
|
-
row: Row<TFeatures, TData>;
|
|
15
|
-
table: Table<TFeatures, TData>;
|
|
16
|
-
}
|
|
17
|
-
interface Cell_CoreProperties<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> {
|
|
18
|
-
/**
|
|
19
|
-
* The associated Column object for the cell.
|
|
20
|
-
*/
|
|
21
|
-
column: Column<TFeatures, TData, TValue>;
|
|
22
|
-
/**
|
|
23
|
-
* The unique ID for the cell across the entire table.
|
|
24
|
-
*/
|
|
25
|
-
id: string;
|
|
26
|
-
/**
|
|
27
|
-
* The associated Row object for the cell.
|
|
28
|
-
*/
|
|
29
|
-
row: Row<TFeatures, TData>;
|
|
30
|
-
/**
|
|
31
|
-
* Reference to the parent table instance.
|
|
32
|
-
*/
|
|
33
|
-
table: Table_Internal<TFeatures, TData>;
|
|
34
|
-
}
|
|
35
|
-
interface Cell_Cell<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> extends Cell_CoreProperties<TFeatures, TData, TValue> {
|
|
36
|
-
/**
|
|
37
|
-
* Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:
|
|
38
|
-
*/
|
|
39
|
-
getContext: () => CellContext<TFeatures, TData, TValue>;
|
|
40
|
-
/**
|
|
41
|
-
* Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
|
|
42
|
-
*/
|
|
43
|
-
getValue: CellContext<TFeatures, TData, TValue>['getValue'];
|
|
44
|
-
/**
|
|
45
|
-
* Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
46
|
-
*/
|
|
47
|
-
renderValue: CellContext<TFeatures, TData, TValue>['renderValue'];
|
|
48
|
-
}
|
|
49
|
-
interface TableOptions_Cell {
|
|
50
|
-
/**
|
|
51
|
-
* Value used when the desired value is not found in the data.
|
|
52
|
-
*/
|
|
53
|
-
renderFallbackValue?: any;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
export { CellContext, Cell_Cell, Cell_CoreProperties, TableOptions_Cell };
|
|
57
|
-
//# sourceMappingURL=coreCellsFeature.types.d.cts.map
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/core/cells/coreCellsFeature.utils.ts
|
|
3
|
-
/**
|
|
4
|
-
* Reads this cell's accessor value from its owning row and column.
|
|
5
|
-
*
|
|
6
|
-
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
7
|
-
* importing static APIs instead of calling methods from the cell prototype.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const value = cell_getValue(cell)
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
function cell_getValue(cell) {
|
|
15
|
-
return cell.row.getValue(cell.column.id);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Reads the value that should be rendered for this cell.
|
|
19
|
-
*
|
|
20
|
-
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
21
|
-
* matching the behavior of `cell.renderValue()`.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const rendered = cell_renderValue(cell)
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
function cell_renderValue(cell) {
|
|
29
|
-
return cell.getValue() ?? cell.table.options.renderFallbackValue;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Builds the render context passed to a column's `cell` template.
|
|
33
|
-
*
|
|
34
|
-
* The returned object includes stable references to the table, row, column, and
|
|
35
|
-
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const context = cell_getContext(cell)
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
function cell_getContext(cell) {
|
|
43
|
-
return {
|
|
44
|
-
table: cell.table,
|
|
45
|
-
column: cell.column,
|
|
46
|
-
row: cell.row,
|
|
47
|
-
cell,
|
|
48
|
-
getValue: () => cell.getValue(),
|
|
49
|
-
renderValue: () => cell.renderValue()
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
exports.cell_getContext = cell_getContext;
|
|
55
|
-
exports.cell_getValue = cell_getValue;
|
|
56
|
-
exports.cell_renderValue = cell_renderValue;
|
|
57
|
-
//# sourceMappingURL=coreCellsFeature.utils.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.utils.cjs","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,EAAE;AACzC;;;;;;;;;;;;AAaA,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,SAAS,KAAK,KAAK,MAAM,QAAQ;AAC/C;;;;;;;;;;;;AAaA,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,SAAS;EAC9B,mBAAmB,KAAK,YAAY;CACtC;AACF"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CellData, NoInfer, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Column } from "../../types/Column.cjs";
|
|
3
|
-
import { Row } from "../../types/Row.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
import { Table_Internal } from "../../types/Table.cjs";
|
|
6
|
-
import { Cell } from "../../types/Cell.cjs";
|
|
7
|
-
//#region src/core/cells/coreCellsFeature.utils.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Reads this cell's accessor value from its owning row and column.
|
|
10
|
-
*
|
|
11
|
-
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
12
|
-
* importing static APIs instead of calling methods from the cell prototype.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const value = cell_getValue(cell)
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function cell_getValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): TValue;
|
|
20
|
-
/**
|
|
21
|
-
* Reads the value that should be rendered for this cell.
|
|
22
|
-
*
|
|
23
|
-
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
24
|
-
* matching the behavior of `cell.renderValue()`.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const rendered = cell_renderValue(cell)
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
declare function cell_renderValue<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): any;
|
|
32
|
-
/**
|
|
33
|
-
* Builds the render context passed to a column's `cell` template.
|
|
34
|
-
*
|
|
35
|
-
* The returned object includes stable references to the table, row, column, and
|
|
36
|
-
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* const context = cell_getContext(cell)
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
declare function cell_getContext<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>): {
|
|
44
|
-
table: Table_Internal<TFeatures, TData>;
|
|
45
|
-
column: Column<TFeatures, TData, TValue>;
|
|
46
|
-
row: Row<TFeatures, TData>;
|
|
47
|
-
cell: Cell<TFeatures, TData, TValue>;
|
|
48
|
-
getValue: () => NoInfer<TValue>;
|
|
49
|
-
renderValue: () => NoInfer<TValue | null>;
|
|
50
|
-
};
|
|
51
|
-
//#endregion
|
|
52
|
-
export { cell_getContext, cell_getValue, cell_renderValue };
|
|
53
|
-
//# sourceMappingURL=coreCellsFeature.utils.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreCellsFeature.utils.js","names":[],"sources":["../../../src/core/cells/coreCellsFeature.utils.ts"],"sourcesContent":["import type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type { Cell } from '../../types/Cell'\n\n/**\n * Reads this cell's accessor value from its owning row and column.\n *\n * This is the standalone implementation behind `cell.getValue()`, useful when\n * importing static APIs instead of calling methods from the cell prototype.\n *\n * @example\n * ```ts\n * const value = cell_getValue(cell)\n * ```\n */\nexport function cell_getValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>): TValue {\n return cell.row.getValue(cell.column.id)\n}\n\n/**\n * Reads the value that should be rendered for this cell.\n *\n * Nullish accessor values are replaced with `table.options.renderFallbackValue`,\n * matching the behavior of `cell.renderValue()`.\n *\n * @example\n * ```ts\n * const rendered = cell_renderValue(cell)\n * ```\n */\nexport function cell_renderValue<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return cell.getValue() ?? cell.table.options.renderFallbackValue\n}\n\n/**\n * Builds the render context passed to a column's `cell` template.\n *\n * The returned object includes stable references to the table, row, column, and\n * cell, plus bound `getValue` and `renderValue` helpers for render functions.\n *\n * @example\n * ```ts\n * const context = cell_getContext(cell)\n * ```\n */\nexport function cell_getContext<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(cell: Cell<TFeatures, TData, TValue>) {\n return {\n table: cell.table,\n column: cell.column,\n row: cell.row,\n cell: cell,\n // Wrap in arrow functions to preserve `this` binding (methods are on prototype)\n getValue: () => cell.getValue(),\n renderValue: () => cell.renderValue(),\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,SAAgB,cAId,MAA8C;CAC9C,OAAO,KAAK,IAAI,SAAS,KAAK,OAAO,EAAE;AACzC;;;;;;;;;;;;AAaA,SAAgB,iBAId,MAAsC;CACtC,OAAO,KAAK,SAAS,KAAK,KAAK,MAAM,QAAQ;AAC/C;;;;;;;;;;;;AAaA,SAAgB,gBAId,MAAsC;CACtC,OAAO;EACL,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,KAAK,KAAK;EACJ;EAEN,gBAAgB,KAAK,SAAS;EAC9B,mBAAmB,KAAK,YAAY;CACtC;AACF"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/core/columns/constructColumn.ts
|
|
3
|
-
/**
|
|
4
|
-
* Creates or retrieves the column prototype for a table.
|
|
5
|
-
* The prototype is cached on the table and shared by all column instances.
|
|
6
|
-
*/
|
|
7
|
-
function getColumnPrototype(table) {
|
|
8
|
-
if (!table._columnPrototype) {
|
|
9
|
-
table._columnPrototype = { table };
|
|
10
|
-
const features = Object.values(table._features);
|
|
11
|
-
for (let i = 0; i < features.length; i++) {
|
|
12
|
-
var _assignColumnPrototyp, _ref;
|
|
13
|
-
(_assignColumnPrototyp = (_ref = features[i]).assignColumnPrototype) === null || _assignColumnPrototyp === void 0 || _assignColumnPrototyp.call(_ref, table._columnPrototype, table);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return table._columnPrototype;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Constructs a column instance from normalized table internals.
|
|
20
|
-
*
|
|
21
|
-
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
22
|
-
*/
|
|
23
|
-
function constructColumn(table, columnDef, depth, parent) {
|
|
24
|
-
const resolvedColumnDef = {
|
|
25
|
-
...table.getDefaultColumnDef(),
|
|
26
|
-
...columnDef
|
|
27
|
-
};
|
|
28
|
-
const accessorKey = resolvedColumnDef.accessorKey;
|
|
29
|
-
const id = resolvedColumnDef.id ?? (accessorKey ? accessorKey.replaceAll(".", "_") : void 0) ?? (typeof resolvedColumnDef.header === "string" ? resolvedColumnDef.header : void 0);
|
|
30
|
-
let accessorFn;
|
|
31
|
-
if (resolvedColumnDef.accessorFn) accessorFn = resolvedColumnDef.accessorFn;
|
|
32
|
-
else if (accessorKey) if (accessorKey.includes(".")) {
|
|
33
|
-
const keys = accessorKey.split(".");
|
|
34
|
-
accessorFn = (originalRow) => {
|
|
35
|
-
let result = originalRow;
|
|
36
|
-
for (let i = 0; i < keys.length; i++) {
|
|
37
|
-
const key = keys[i];
|
|
38
|
-
result = result === null || result === void 0 ? void 0 : result[key];
|
|
39
|
-
if (process.env.NODE_ENV === "development" && result === void 0) console.warn(`"${key}" in deeply nested key "${accessorKey}" returned undefined.`);
|
|
40
|
-
}
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
} else accessorFn = (originalRow) => originalRow[resolvedColumnDef.accessorKey];
|
|
44
|
-
if (!id) {
|
|
45
|
-
if (process.env.NODE_ENV === "development") throw new Error(resolvedColumnDef.accessorFn ? `coreColumnsFeature require an id when using an accessorFn` : `coreColumnsFeature require an id when using a non-string header`);
|
|
46
|
-
throw new Error();
|
|
47
|
-
}
|
|
48
|
-
const columnPrototype = getColumnPrototype(table);
|
|
49
|
-
const column = Object.create(columnPrototype);
|
|
50
|
-
column.accessorFn = accessorFn;
|
|
51
|
-
column.columnDef = resolvedColumnDef;
|
|
52
|
-
column.columns = [];
|
|
53
|
-
column.depth = depth;
|
|
54
|
-
column.id = `${String(id)}`;
|
|
55
|
-
column.parent = parent;
|
|
56
|
-
return column;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
exports.constructColumn = constructColumn;
|
|
61
|
-
//# sourceMappingURL=constructColumn.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constructColumn.cjs","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAEhB,OAAO;AACT"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CellData, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Column } from "../../types/Column.cjs";
|
|
3
|
-
import { ColumnDef } from "../../types/ColumnDef.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
import { Table_Internal } from "../../types/Table.cjs";
|
|
6
|
-
|
|
7
|
-
//#region src/core/columns/constructColumn.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Constructs a column instance from normalized table internals.
|
|
10
|
-
*
|
|
11
|
-
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
12
|
-
*/
|
|
13
|
-
declare function constructColumn<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>(table: Table_Internal<TFeatures, TData>, columnDef: ColumnDef<TFeatures, TData, TValue>, depth: number, parent?: Column<TFeatures, TData, TValue>): Column<TFeatures, TData, TValue>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { constructColumn };
|
|
16
|
-
//# sourceMappingURL=constructColumn.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constructColumn.js","names":[],"sources":["../../../src/core/columns/constructColumn.ts"],"sourcesContent":["import {} from '../../utils'\nimport type { Table_Internal } from '../../types/Table'\nimport type { CellData, RowData } from '../../types/type-utils'\nimport type { TableFeatures } from '../../types/TableFeatures'\nimport type {\n AccessorFn,\n ColumnDef,\n ColumnDefResolved,\n} from '../../types/ColumnDef'\nimport type { Column } from '../../types/Column'\nimport type { Column_CoreProperties } from './coreColumnsFeature.types'\n\n/**\n * Creates or retrieves the column prototype for a table.\n * The prototype is cached on the table and shared by all column instances.\n */\nfunction getColumnPrototype<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(table: Table_Internal<TFeatures, TData>): object {\n if (!table._columnPrototype) {\n table._columnPrototype = { table }\n const features = Object.values(table._features)\n for (let i = 0; i < features.length; i++) {\n features[i]!.assignColumnPrototype?.(table._columnPrototype, table)\n }\n }\n return table._columnPrototype\n}\n\n/**\n * Constructs a column instance from normalized table internals.\n *\n * This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.\n */\nexport function constructColumn<\n TFeatures extends TableFeatures,\n TData extends RowData,\n TValue extends CellData = CellData,\n>(\n table: Table_Internal<TFeatures, TData>,\n columnDef: ColumnDef<TFeatures, TData, TValue>,\n depth: number,\n parent?: Column<TFeatures, TData, TValue>,\n): Column<TFeatures, TData, TValue> {\n const defaultColumn = table.getDefaultColumnDef()\n\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef,\n } as ColumnDefResolved<{}, TData, TValue>\n\n const accessorKey = resolvedColumnDef.accessorKey\n\n const id =\n resolvedColumnDef.id ??\n (accessorKey ? accessorKey.replaceAll('.', '_') : undefined) ??\n (typeof resolvedColumnDef.header === 'string'\n ? resolvedColumnDef.header\n : undefined)\n\n let accessorFn: AccessorFn<TData, TValue> | undefined\n\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n const keys = accessorKey.split('.')\n accessorFn = (originalRow: TData) => {\n let result = originalRow as Record<string, any> | undefined\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]!\n result = result?.[key]\n if (process.env.NODE_ENV === 'development' && result === undefined) {\n console.warn(\n `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`,\n )\n }\n }\n\n return result as TValue\n }\n } else {\n accessorFn = (originalRow: TData) =>\n (originalRow as any)[resolvedColumnDef.accessorKey]\n }\n }\n\n if (!id) {\n if (process.env.NODE_ENV === 'development') {\n throw new Error(\n resolvedColumnDef.accessorFn\n ? `coreColumnsFeature require an id when using an accessorFn`\n : `coreColumnsFeature require an id when using a non-string header`,\n )\n }\n throw new Error()\n }\n\n // Create column with shared prototype for memory efficiency\n const columnPrototype = getColumnPrototype(table)\n const column = Object.create(columnPrototype) as Column_CoreProperties<\n TFeatures,\n TData,\n TValue\n >\n\n // Only assign instance-specific properties\n column.accessorFn = accessorFn\n column.columnDef = resolvedColumnDef as ColumnDef<TFeatures, TData, TValue>\n column.columns = []\n column.depth = depth\n column.id = `${String(id)}`\n column.parent = parent\n\n return column as Column<TFeatures, TData, TValue>\n}\n"],"mappings":";;;;;AAgBA,SAAS,mBAGP,OAAiD;CACjD,IAAI,CAAC,MAAM,kBAAkB;EAC3B,MAAM,mBAAmB,EAAE,MAAM;EACjC,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS;EAC9C,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;;GACxC,0CAAS,IAAI,wGAAwB,MAAM,kBAAkB,KAAK;EACpE;CACF;CACA,OAAO,MAAM;AACf;;;;;;AAOA,SAAgB,gBAKd,OACA,WACA,OACA,QACkC;CAGlC,MAAM,oBAAoB;EACxB,GAHoB,MAAM,oBAGX;EACf,GAAG;CACL;CAEA,MAAM,cAAc,kBAAkB;CAEtC,MAAM,KACJ,kBAAkB,OACjB,cAAc,YAAY,WAAW,KAAK,GAAG,IAAI,YACjD,OAAO,kBAAkB,WAAW,WACjC,kBAAkB,SAClB;CAEN,IAAI;CAEJ,IAAI,kBAAkB,YACpB,aAAa,kBAAkB;MAC1B,IAAI,aAET,IAAI,YAAY,SAAS,GAAG,GAAG;EAC7B,MAAM,OAAO,YAAY,MAAM,GAAG;EAClC,cAAc,gBAAuB;GACnC,IAAI,SAAS;GAEb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;IACpC,MAAM,MAAM,KAAK;IACjB,yDAAS,OAAS;IAClB,IAAI,QAAQ,IAAI,aAAa,iBAAiB,WAAW,QACvD,QAAQ,KACN,IAAI,IAAI,0BAA0B,YAAY,sBAChD;GAEJ;GAEA,OAAO;EACT;CACF,OACE,cAAc,gBACX,YAAoB,kBAAkB;CAI7C,IAAI,CAAC,IAAI;EACP,IAAI,QAAQ,IAAI,aAAa,eAC3B,MAAM,IAAI,MACR,kBAAkB,aACd,8DACA,iEACN;EAEF,MAAM,IAAI,MAAM;CAClB;CAGA,MAAM,kBAAkB,mBAAmB,KAAK;CAChD,MAAM,SAAS,OAAO,OAAO,eAAe;CAO5C,OAAO,aAAa;CACpB,OAAO,YAAY;CACnB,OAAO,UAAU,CAAC;CAClB,OAAO,QAAQ;CACf,OAAO,KAAK,GAAG,OAAO,EAAE;CACxB,OAAO,SAAS;CAEhB,OAAO;AACT"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../../utils.cjs');
|
|
2
|
-
const require_coreColumnsFeature_utils = require('./coreColumnsFeature.utils.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/core/columns/coreColumnsFeature.ts
|
|
5
|
-
/**
|
|
6
|
-
* Core feature that builds the column tree and exposes table/column column APIs.
|
|
7
|
-
*/
|
|
8
|
-
const coreColumnsFeature = {
|
|
9
|
-
assignColumnPrototype: (prototype, table) => {
|
|
10
|
-
require_utils.assignPrototypeAPIs("coreColumnsFeature", prototype, table, {
|
|
11
|
-
column_getFlatColumns: {
|
|
12
|
-
fn: (column) => require_coreColumnsFeature_utils.column_getFlatColumns(column),
|
|
13
|
-
memoDeps: (column) => [column.table.options.columns]
|
|
14
|
-
},
|
|
15
|
-
column_getLeafColumns: {
|
|
16
|
-
fn: (column) => require_coreColumnsFeature_utils.column_getLeafColumns(column),
|
|
17
|
-
memoDeps: (column) => {
|
|
18
|
-
var _column$table$atoms$c, _column$table$atoms$g;
|
|
19
|
-
return [
|
|
20
|
-
(_column$table$atoms$c = column.table.atoms.columnOrder) === null || _column$table$atoms$c === void 0 ? void 0 : _column$table$atoms$c.get(),
|
|
21
|
-
(_column$table$atoms$g = column.table.atoms.grouping) === null || _column$table$atoms$g === void 0 ? void 0 : _column$table$atoms$g.get(),
|
|
22
|
-
column.table.options.columns,
|
|
23
|
-
column.table.options.groupedColumnMode
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
constructTableAPIs: (table) => {
|
|
30
|
-
require_utils.assignTableAPIs("coreColumnsFeature", table, {
|
|
31
|
-
table_getDefaultColumnDef: {
|
|
32
|
-
fn: () => require_coreColumnsFeature_utils.table_getDefaultColumnDef(table),
|
|
33
|
-
memoDeps: () => [table.options.defaultColumn]
|
|
34
|
-
},
|
|
35
|
-
table_getAllColumns: {
|
|
36
|
-
fn: () => require_coreColumnsFeature_utils.table_getAllColumns(table),
|
|
37
|
-
memoDeps: () => [table.options.columns]
|
|
38
|
-
},
|
|
39
|
-
table_getAllFlatColumns: {
|
|
40
|
-
fn: () => require_coreColumnsFeature_utils.table_getAllFlatColumns(table),
|
|
41
|
-
memoDeps: () => [table.options.columns]
|
|
42
|
-
},
|
|
43
|
-
table_getAllFlatColumnsById: {
|
|
44
|
-
fn: () => require_coreColumnsFeature_utils.table_getAllFlatColumnsById(table),
|
|
45
|
-
memoDeps: () => [table.options.columns]
|
|
46
|
-
},
|
|
47
|
-
table_getAllLeafColumns: {
|
|
48
|
-
fn: () => require_coreColumnsFeature_utils.table_getAllLeafColumns(table),
|
|
49
|
-
memoDeps: () => {
|
|
50
|
-
var _table$atoms$columnOr, _table$atoms$grouping;
|
|
51
|
-
return [
|
|
52
|
-
(_table$atoms$columnOr = table.atoms.columnOrder) === null || _table$atoms$columnOr === void 0 ? void 0 : _table$atoms$columnOr.get(),
|
|
53
|
-
(_table$atoms$grouping = table.atoms.grouping) === null || _table$atoms$grouping === void 0 ? void 0 : _table$atoms$grouping.get(),
|
|
54
|
-
table.options.columns,
|
|
55
|
-
table.options.groupedColumnMode
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
table_getAllLeafColumnsById: {
|
|
60
|
-
fn: () => require_coreColumnsFeature_utils.table_getAllLeafColumnsById(table),
|
|
61
|
-
memoDeps: () => [table.getAllLeafColumns()]
|
|
62
|
-
},
|
|
63
|
-
table_getColumn: { fn: (columnId) => require_coreColumnsFeature_utils.table_getColumn(table, columnId) }
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
exports.coreColumnsFeature = coreColumnsFeature;
|
|
70
|
-
//# sourceMappingURL=coreColumnsFeature.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreColumnsFeature.cjs","names":["column_getFlatColumns","column_getLeafColumns","table_getDefaultColumnDef","table_getAllColumns","table_getAllFlatColumns","table_getAllFlatColumnsById","table_getAllLeafColumns","table_getAllLeafColumnsById","table_getColumn"],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Core feature that builds the column tree and exposes table/column column APIs.\n */\nexport const coreColumnsFeature: TableFeature = {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAiBA,MAAa,qBAAmC;CAC9C,wBAAwB,WAAW,UAAU;EAC3C,kCAAoB,sBAAsB,WAAW,OAAO;GAC1D,uBAAuB;IACrB,KAAK,WAAWA,uDAAsB,MAAM;IAC5C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,OAAO;GACrD;GACA,uBAAuB;IACrB,KAAK,WAAWC,uDAAsB,MAAM;IAC5C,WAAW,WAAW;;;+BACpB,OAAO,MAAM,MAAM,2FAAa,IAAI;+BACpC,OAAO,MAAM,MAAM,wFAAU,IAAI;MACjC,OAAO,MAAM,QAAQ;MACrB,OAAO,MAAM,QAAQ;KACvB;;GACF;EACF,CAAC;CACH;CAEA,qBAAqB,UAAU;EAC7B,8BAAgB,sBAAsB,OAAO;GAC3C,2BAA2B;IACzB,UAAUC,2DAA0B,KAAK;IACzC,gBAAgB,CAAC,MAAM,QAAQ,aAAa;GAC9C;GACA,qBAAqB;IACnB,UAAUC,qDAAoB,KAAK;IACnC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,yBAAyB;IACvB,UAAUC,yDAAwB,KAAK;IACvC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,6BAA6B;IAC3B,UAAUC,6DAA4B,KAAK;IAC3C,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,yBAAyB;IACvB,UAAUC,yDAAwB,KAAK;IACvC,gBAAgB;;;+BACd,MAAM,MAAM,2FAAa,IAAI;+BAC7B,MAAM,MAAM,wFAAU,IAAI;MAC1B,MAAM,QAAQ;MACd,MAAM,QAAQ;KAChB;;GACF;GACA,6BAA6B;IAC3B,UAAUC,6DAA4B,KAAK;IAC3C,gBAAgB,CAAC,MAAM,kBAAkB,CAAC;GAC5C;GACA,iBAAiB,EACf,KAAK,aAAaC,iDAAgB,OAAO,QAAQ,EACnD;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TableFeature } from "../../types/TableFeatures.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/core/columns/coreColumnsFeature.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Core feature that builds the column tree and exposes table/column column APIs.
|
|
6
|
-
*/
|
|
7
|
-
declare const coreColumnsFeature: TableFeature;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { coreColumnsFeature };
|
|
10
|
-
//# sourceMappingURL=coreColumnsFeature.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreColumnsFeature.js","names":[],"sources":["../../../src/core/columns/coreColumnsFeature.ts"],"sourcesContent":["import { assignPrototypeAPIs, assignTableAPIs } from '../../utils'\nimport {\n column_getFlatColumns,\n column_getLeafColumns,\n table_getAllColumns,\n table_getAllFlatColumns,\n table_getAllFlatColumnsById,\n table_getAllLeafColumns,\n table_getAllLeafColumnsById,\n table_getColumn,\n table_getDefaultColumnDef,\n} from './coreColumnsFeature.utils'\nimport type { TableFeature } from '../../types/TableFeatures'\n\n/**\n * Core feature that builds the column tree and exposes table/column column APIs.\n */\nexport const coreColumnsFeature: TableFeature = {\n assignColumnPrototype: (prototype, table) => {\n assignPrototypeAPIs('coreColumnsFeature', prototype, table, {\n column_getFlatColumns: {\n fn: (column) => column_getFlatColumns(column),\n memoDeps: (column) => [column.table.options.columns],\n },\n column_getLeafColumns: {\n fn: (column) => column_getLeafColumns(column),\n memoDeps: (column) => [\n column.table.atoms.columnOrder?.get(),\n column.table.atoms.grouping?.get(),\n column.table.options.columns,\n column.table.options.groupedColumnMode,\n ],\n },\n })\n },\n\n constructTableAPIs: (table) => {\n assignTableAPIs('coreColumnsFeature', table, {\n table_getDefaultColumnDef: {\n fn: () => table_getDefaultColumnDef(table),\n memoDeps: () => [table.options.defaultColumn],\n },\n table_getAllColumns: {\n fn: () => table_getAllColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumns: {\n fn: () => table_getAllFlatColumns(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllFlatColumnsById: {\n fn: () => table_getAllFlatColumnsById(table),\n memoDeps: () => [table.options.columns],\n },\n table_getAllLeafColumns: {\n fn: () => table_getAllLeafColumns(table),\n memoDeps: () => [\n table.atoms.columnOrder?.get(),\n table.atoms.grouping?.get(),\n table.options.columns,\n table.options.groupedColumnMode,\n ],\n },\n table_getAllLeafColumnsById: {\n fn: () => table_getAllLeafColumnsById(table),\n memoDeps: () => [table.getAllLeafColumns()],\n },\n table_getColumn: {\n fn: (columnId) => table_getColumn(table, columnId),\n },\n })\n },\n}\n"],"mappings":";;;;;;;AAiBA,MAAa,qBAAmC;CAC9C,wBAAwB,WAAW,UAAU;EAC3C,oBAAoB,sBAAsB,WAAW,OAAO;GAC1D,uBAAuB;IACrB,KAAK,WAAW,sBAAsB,MAAM;IAC5C,WAAW,WAAW,CAAC,OAAO,MAAM,QAAQ,OAAO;GACrD;GACA,uBAAuB;IACrB,KAAK,WAAW,sBAAsB,MAAM;IAC5C,WAAW,WAAW;;;+BACpB,OAAO,MAAM,MAAM,2FAAa,IAAI;+BACpC,OAAO,MAAM,MAAM,wFAAU,IAAI;MACjC,OAAO,MAAM,QAAQ;MACrB,OAAO,MAAM,QAAQ;KACvB;;GACF;EACF,CAAC;CACH;CAEA,qBAAqB,UAAU;EAC7B,gBAAgB,sBAAsB,OAAO;GAC3C,2BAA2B;IACzB,UAAU,0BAA0B,KAAK;IACzC,gBAAgB,CAAC,MAAM,QAAQ,aAAa;GAC9C;GACA,qBAAqB;IACnB,UAAU,oBAAoB,KAAK;IACnC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,yBAAyB;IACvB,UAAU,wBAAwB,KAAK;IACvC,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,6BAA6B;IAC3B,UAAU,4BAA4B,KAAK;IAC3C,gBAAgB,CAAC,MAAM,QAAQ,OAAO;GACxC;GACA,yBAAyB;IACvB,UAAU,wBAAwB,KAAK;IACvC,gBAAgB;;;+BACd,MAAM,MAAM,2FAAa,IAAI;+BAC7B,MAAM,MAAM,wFAAU,IAAI;MAC1B,MAAM,QAAQ;MACd,MAAM,QAAQ;KAChB;;GACF;GACA,6BAA6B;IAC3B,UAAU,4BAA4B,KAAK;IAC3C,gBAAgB,CAAC,MAAM,kBAAkB,CAAC;GAC5C;GACA,iBAAiB,EACf,KAAK,aAAa,gBAAgB,OAAO,QAAQ,EACnD;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { CellData, RowData } from "../../types/type-utils.cjs";
|
|
2
|
-
import { Column } from "../../types/Column.cjs";
|
|
3
|
-
import { AccessorFn, ColumnDef } from "../../types/ColumnDef.cjs";
|
|
4
|
-
import { TableFeatures } from "../../types/TableFeatures.cjs";
|
|
5
|
-
import { Table_Internal } from "../../types/Table.cjs";
|
|
6
|
-
|
|
7
|
-
//#region src/core/columns/coreColumnsFeature.types.d.ts
|
|
8
|
-
interface Column_CoreProperties<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> {
|
|
9
|
-
/**
|
|
10
|
-
* The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.
|
|
11
|
-
*/
|
|
12
|
-
accessorFn?: AccessorFn<TData, TValue>;
|
|
13
|
-
/**
|
|
14
|
-
* The original column def used to create the column.
|
|
15
|
-
*/
|
|
16
|
-
columnDef: ColumnDef<TFeatures, TData, TValue>;
|
|
17
|
-
/**
|
|
18
|
-
* The child column (if the column is a group column). Will be an empty array if the column is not a group column.
|
|
19
|
-
*/
|
|
20
|
-
columns: Array<Column<TFeatures, TData, TValue>>;
|
|
21
|
-
/**
|
|
22
|
-
* The depth of the column (if grouped) relative to the root column def array.
|
|
23
|
-
*/
|
|
24
|
-
depth: number;
|
|
25
|
-
/**
|
|
26
|
-
* The resolved unique identifier for the column resolved in this priority:
|
|
27
|
-
- A manual `id` property from the column def
|
|
28
|
-
- The accessor key from the column def
|
|
29
|
-
- The header string from the column def
|
|
30
|
-
*/
|
|
31
|
-
id: string;
|
|
32
|
-
/**
|
|
33
|
-
* The parent column for this column. Will be undefined if this is a root column.
|
|
34
|
-
*/
|
|
35
|
-
parent?: Column<TFeatures, TData, TValue>;
|
|
36
|
-
/**
|
|
37
|
-
* Reference to the parent table instance.
|
|
38
|
-
*/
|
|
39
|
-
table: Table_Internal<TFeatures, TData>;
|
|
40
|
-
}
|
|
41
|
-
interface Column_Column<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> extends Column_CoreProperties<TFeatures, TData, TValue> {
|
|
42
|
-
/**
|
|
43
|
-
* Flattens this column and every descendant column into a single array.
|
|
44
|
-
*/
|
|
45
|
-
getFlatColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
46
|
-
/**
|
|
47
|
-
* Collects the terminal leaf columns below this column, or the column itself
|
|
48
|
-
* when it has no children.
|
|
49
|
-
*/
|
|
50
|
-
getLeafColumns: () => Array<Column<TFeatures, TData, TValue>>;
|
|
51
|
-
}
|
|
52
|
-
interface TableOptions_Columns<TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData> {
|
|
53
|
-
/**
|
|
54
|
-
* The array of column defs to use for the table.
|
|
55
|
-
*/
|
|
56
|
-
columns: ReadonlyArray<ColumnDef<TFeatures, TData, TValue>>;
|
|
57
|
-
/**
|
|
58
|
-
* Default column options to use for all column defs supplied to the table.
|
|
59
|
-
*/
|
|
60
|
-
defaultColumn?: Partial<ColumnDef<TFeatures, TData, TValue>>;
|
|
61
|
-
}
|
|
62
|
-
interface Table_Columns<TFeatures extends TableFeatures, TData extends RowData> {
|
|
63
|
-
/**
|
|
64
|
-
* Returns a map of all flat columns by their ID.
|
|
65
|
-
*/
|
|
66
|
-
getAllFlatColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>;
|
|
67
|
-
/**
|
|
68
|
-
* Resolves built-in, feature-level, and user-defined default column options.
|
|
69
|
-
*/
|
|
70
|
-
getDefaultColumnDef: () => Partial<ColumnDef<TFeatures, TData, unknown>>;
|
|
71
|
-
/**
|
|
72
|
-
* Normalizes `options.columns` into the table's nested column hierarchy.
|
|
73
|
-
*/
|
|
74
|
-
getAllColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
75
|
-
/**
|
|
76
|
-
* Flattens the nested column hierarchy, including parent/group columns.
|
|
77
|
-
*/
|
|
78
|
-
getAllFlatColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
79
|
-
/**
|
|
80
|
-
* Collects all terminal leaf columns, excluding parent/group columns.
|
|
81
|
-
*/
|
|
82
|
-
getAllLeafColumns: () => Array<Column<TFeatures, TData, unknown>>;
|
|
83
|
-
/**
|
|
84
|
-
* Returns a map of all leaf-node columns by their ID. This does not include parent columns.
|
|
85
|
-
*/
|
|
86
|
-
getAllLeafColumnsById: () => Record<string, Column<TFeatures, TData, unknown>>;
|
|
87
|
-
/**
|
|
88
|
-
* Returns a single column by its ID.
|
|
89
|
-
*/
|
|
90
|
-
getColumn: (columnId: string) => Column<TFeatures, TData, unknown> | undefined;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
export { Column_Column, Column_CoreProperties, TableOptions_Columns, Table_Columns };
|
|
94
|
-
//# sourceMappingURL=coreColumnsFeature.types.d.cts.map
|