@tanstack/table-core 9.0.0-beta.15 → 9.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/cells/constructCell.d.cts +2 -2
- package/dist/core/cells/constructCell.d.ts +2 -2
- package/dist/core/cells/coreCellsFeature.types.d.cts +2 -2
- package/dist/core/cells/coreCellsFeature.types.d.ts +2 -2
- package/dist/core/cells/coreCellsFeature.utils.d.cts +2 -2
- package/dist/core/cells/coreCellsFeature.utils.d.ts +2 -2
- package/dist/core/columns/constructColumn.d.cts +2 -2
- package/dist/core/columns/constructColumn.d.ts +2 -2
- package/dist/core/columns/coreColumnsFeature.types.d.cts +2 -2
- package/dist/core/columns/coreColumnsFeature.types.d.ts +2 -2
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +8 -8
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +8 -8
- package/dist/core/headers/buildHeaderGroups.d.cts +2 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +2 -2
- package/dist/core/headers/constructHeader.d.cts +2 -2
- package/dist/core/headers/constructHeader.d.ts +2 -2
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +6 -6
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +6 -6
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +13 -13
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +13 -13
- package/dist/core/row-models/createCoreRowModel.d.cts +2 -2
- package/dist/core/row-models/createCoreRowModel.d.ts +2 -2
- package/dist/core/rows/constructRow.d.cts +2 -2
- package/dist/core/rows/constructRow.d.ts +2 -2
- package/dist/core/rows/coreRowsFeature.types.d.cts +2 -2
- package/dist/core/rows/coreRowsFeature.types.d.ts +2 -2
- package/dist/core/rows/coreRowsFeature.utils.d.cts +3 -3
- package/dist/core/rows/coreRowsFeature.utils.d.ts +3 -3
- package/dist/core/table/coreTablesFeature.types.d.cts +1 -1
- package/dist/core/table/coreTablesFeature.types.d.ts +1 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +5 -5
- package/dist/core/table/coreTablesFeature.utils.d.ts +5 -5
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +8 -8
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +8 -8
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +12 -12
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +12 -12
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +11 -11
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +11 -11
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +9 -9
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +9 -9
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +29 -29
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +29 -29
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +6 -6
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +6 -6
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +12 -12
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +12 -12
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +14 -14
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +14 -14
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +6 -6
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +6 -6
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +10 -10
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +10 -10
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +17 -17
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +17 -17
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +7 -7
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +7 -7
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +15 -15
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +15 -15
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +16 -16
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +16 -16
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/types/Column.d.cts +2 -4
- package/dist/types/Column.d.ts +2 -4
- package/dist/types/Table.d.cts +3 -16
- package/dist/types/Table.d.ts +3 -16
- package/dist/types/TableFeatures.d.cts +7 -7
- package/dist/types/TableFeatures.d.ts +7 -7
- package/dist/utils.d.cts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +2 -2
- package/src/core/headers/coreHeadersFeature.types.ts +2 -2
- package/src/types/Column.ts +3 -1
|
@@ -5,7 +5,7 @@ import { Row } from "./Row.cjs";
|
|
|
5
5
|
import { FilterFn } from "../features/column-filtering/columnFilteringFeature.types.cjs";
|
|
6
6
|
import { TableState_All } from "./TableState.cjs";
|
|
7
7
|
import { TableOptions_All } from "./TableOptions.cjs";
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import { ColumnDefBase_All } from "./ColumnDef.cjs";
|
|
10
10
|
import { StockFeatures } from "../features/stockFeatures.cjs";
|
|
11
11
|
import { RowModel } from "../core/row-models/coreRowModelsFeature.types.cjs";
|
|
@@ -179,29 +179,29 @@ interface TableFeature {
|
|
|
179
179
|
* Assigns Cell APIs to the cell prototype for memory-efficient method sharing.
|
|
180
180
|
* This is called once per table to build a shared prototype for all cells.
|
|
181
181
|
*/
|
|
182
|
-
assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
182
|
+
assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
183
183
|
/**
|
|
184
184
|
* Assigns Column APIs to the column prototype for memory-efficient method sharing.
|
|
185
185
|
* This is called once per table to build a shared prototype for all columns.
|
|
186
186
|
*/
|
|
187
|
-
assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
187
|
+
assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
188
188
|
/**
|
|
189
189
|
* Assigns Header APIs to the header prototype for memory-efficient method sharing.
|
|
190
190
|
* This is called once per table to build a shared prototype for all headers.
|
|
191
191
|
*/
|
|
192
|
-
assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
192
|
+
assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
193
193
|
/**
|
|
194
194
|
* Assigns Row APIs to the row prototype for memory-efficient method sharing.
|
|
195
195
|
* This is called once per table to build a shared prototype for all rows.
|
|
196
196
|
*/
|
|
197
|
-
assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
197
|
+
assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
198
198
|
/**
|
|
199
199
|
* Assigns Table APIs to the table instance.
|
|
200
200
|
* Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
|
|
201
201
|
*/
|
|
202
|
-
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
202
|
+
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>) => void;
|
|
203
203
|
getDefaultColumnDef?: <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue>;
|
|
204
|
-
getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
204
|
+
getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>) => Partial<TableOptions_All<TFeatures, TData>>;
|
|
205
205
|
getInitialState?: (initialState: Partial<TableState_All>) => TableState_All;
|
|
206
206
|
/**
|
|
207
207
|
* Initializes instance-specific data on each row (e.g., caches).
|
|
@@ -5,7 +5,7 @@ import { Row } from "./Row.js";
|
|
|
5
5
|
import { FilterFn } from "../features/column-filtering/columnFilteringFeature.types.js";
|
|
6
6
|
import { TableState_All } from "./TableState.js";
|
|
7
7
|
import { TableOptions_All } from "./TableOptions.js";
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
import { ColumnDefBase_All } from "./ColumnDef.js";
|
|
10
10
|
import { StockFeatures } from "../features/stockFeatures.js";
|
|
11
11
|
import { RowModel } from "../core/row-models/coreRowModelsFeature.types.js";
|
|
@@ -179,29 +179,29 @@ interface TableFeature {
|
|
|
179
179
|
* Assigns Cell APIs to the cell prototype for memory-efficient method sharing.
|
|
180
180
|
* This is called once per table to build a shared prototype for all cells.
|
|
181
181
|
*/
|
|
182
|
-
assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
182
|
+
assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
183
183
|
/**
|
|
184
184
|
* Assigns Column APIs to the column prototype for memory-efficient method sharing.
|
|
185
185
|
* This is called once per table to build a shared prototype for all columns.
|
|
186
186
|
*/
|
|
187
|
-
assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
187
|
+
assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
188
188
|
/**
|
|
189
189
|
* Assigns Header APIs to the header prototype for memory-efficient method sharing.
|
|
190
190
|
* This is called once per table to build a shared prototype for all headers.
|
|
191
191
|
*/
|
|
192
|
-
assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
192
|
+
assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
193
193
|
/**
|
|
194
194
|
* Assigns Row APIs to the row prototype for memory-efficient method sharing.
|
|
195
195
|
* This is called once per table to build a shared prototype for all rows.
|
|
196
196
|
*/
|
|
197
|
-
assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table:
|
|
197
|
+
assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
198
198
|
/**
|
|
199
199
|
* Assigns Table APIs to the table instance.
|
|
200
200
|
* Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
|
|
201
201
|
*/
|
|
202
|
-
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
202
|
+
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>) => void;
|
|
203
203
|
getDefaultColumnDef?: <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue>;
|
|
204
|
-
getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table:
|
|
204
|
+
getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>) => Partial<TableOptions_All<TFeatures, TData>>;
|
|
205
205
|
getInitialState?: (initialState: Partial<TableState_All>) => TableState_All;
|
|
206
206
|
/**
|
|
207
207
|
* Initializes instance-specific data on each row (e.g., caches).
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NoInfer, RowData, Updater } from "./types/type-utils.cjs";
|
|
2
2
|
import { TableState, TableState_All } from "./types/TableState.cjs";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { TableFeatures } from "./types/TableFeatures.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/utils.d.ts
|
|
@@ -64,7 +64,7 @@ interface TableMemoOptions<TFeatures extends TableFeatures, TDeps extends Readon
|
|
|
64
64
|
fnName: string;
|
|
65
65
|
objectId?: string;
|
|
66
66
|
onAfterUpdate?: () => void;
|
|
67
|
-
table:
|
|
67
|
+
table: Table<TFeatures, any>;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Creates a table-aware memoized function.
|
|
@@ -96,7 +96,7 @@ declare function getFunctionNameInfo(staticFnName: string, splitBy?: '_' | '.'):
|
|
|
96
96
|
* Assigns Table API methods directly to the table instance.
|
|
97
97
|
* Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
|
|
98
98
|
*/
|
|
99
|
-
declare function assignTableAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, table:
|
|
99
|
+
declare function assignTableAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, table: Table<TFeatures, TData>, apis: APIObject<TDeps, NoInfer<TDepArgs>>): void;
|
|
100
100
|
interface PrototypeAPI<TDeps extends ReadonlyArray<any>, TDepArgs> {
|
|
101
101
|
fn: (self: any, ...args: any) => any;
|
|
102
102
|
memoDeps?: (self: any, depArgs?: any) => [...any] | undefined;
|
|
@@ -109,7 +109,7 @@ type PrototypeAPIObject<TDeps extends ReadonlyArray<any>, TDepArgs> = Record<str
|
|
|
109
109
|
* For memoized methods, the memo state is lazily created and stored on each instance.
|
|
110
110
|
* This provides the best of both worlds: shared method code + per-instance caching.
|
|
111
111
|
*/
|
|
112
|
-
declare function assignPrototypeAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, prototype: Record<string, any>, table:
|
|
112
|
+
declare function assignPrototypeAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, prototype: Record<string, any>, table: Table<TFeatures, TData>, apis: PrototypeAPIObject<TDeps, NoInfer<TDepArgs>>): void;
|
|
113
113
|
/**
|
|
114
114
|
* Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in.
|
|
115
115
|
*/
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NoInfer, RowData, Updater } from "./types/type-utils.js";
|
|
2
2
|
import { TableState, TableState_All } from "./types/TableState.js";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { TableFeatures } from "./types/TableFeatures.js";
|
|
5
5
|
|
|
6
6
|
//#region src/utils.d.ts
|
|
@@ -64,7 +64,7 @@ interface TableMemoOptions<TFeatures extends TableFeatures, TDeps extends Readon
|
|
|
64
64
|
fnName: string;
|
|
65
65
|
objectId?: string;
|
|
66
66
|
onAfterUpdate?: () => void;
|
|
67
|
-
table:
|
|
67
|
+
table: Table<TFeatures, any>;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Creates a table-aware memoized function.
|
|
@@ -96,7 +96,7 @@ declare function getFunctionNameInfo(staticFnName: string, splitBy?: '_' | '.'):
|
|
|
96
96
|
* Assigns Table API methods directly to the table instance.
|
|
97
97
|
* Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
|
|
98
98
|
*/
|
|
99
|
-
declare function assignTableAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, table:
|
|
99
|
+
declare function assignTableAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, table: Table<TFeatures, TData>, apis: APIObject<TDeps, NoInfer<TDepArgs>>): void;
|
|
100
100
|
interface PrototypeAPI<TDeps extends ReadonlyArray<any>, TDepArgs> {
|
|
101
101
|
fn: (self: any, ...args: any) => any;
|
|
102
102
|
memoDeps?: (self: any, depArgs?: any) => [...any] | undefined;
|
|
@@ -109,7 +109,7 @@ type PrototypeAPIObject<TDeps extends ReadonlyArray<any>, TDepArgs> = Record<str
|
|
|
109
109
|
* For memoized methods, the memo state is lazily created and stored on each instance.
|
|
110
110
|
* This provides the best of both worlds: shared method code + per-instance caching.
|
|
111
111
|
*/
|
|
112
|
-
declare function assignPrototypeAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, prototype: Record<string, any>, table:
|
|
112
|
+
declare function assignPrototypeAPIs<TFeatures extends TableFeatures, TData extends RowData, TDeps extends ReadonlyArray<any>, TDepArgs>(feature: keyof TFeatures & string, prototype: Record<string, any>, table: Table<TFeatures, TData>, apis: PrototypeAPIObject<TDeps, NoInfer<TDepArgs>>): void;
|
|
113
113
|
/**
|
|
114
114
|
* Looks to run the memoized function with the builder pattern on the object if it exists, otherwise fallback to the static method passed in.
|
|
115
115
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.16",
|
|
4
4
|
"description": "Headless UI for building powerful tables & datagrids for TS/JS.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"test:lib:dev": "pnpm test:lib --watch",
|
|
74
74
|
"test:types": "tsc && tsc -p tests/tsconfig.declaration-emit.json",
|
|
75
75
|
"test:build": "publint --strict",
|
|
76
|
-
"build": "tsdown"
|
|
76
|
+
"build": "tsdown && node ../../scripts/rewrite-table-core-dts.mjs"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CellData, RowData } from '../../types/type-utils'
|
|
2
2
|
import type { TableFeatures } from '../../types/TableFeatures'
|
|
3
|
-
import type { Table } from '../../types/Table'
|
|
3
|
+
import type { Table, Table_Internal } from '../../types/Table'
|
|
4
4
|
import type { Header } from '../../types/Header'
|
|
5
5
|
import type { HeaderGroup } from '../../types/HeaderGroup'
|
|
6
6
|
import type { Column } from '../../types/Column'
|
|
@@ -96,7 +96,7 @@ export interface Header_CoreProperties<
|
|
|
96
96
|
/**
|
|
97
97
|
* Reference to the parent table instance.
|
|
98
98
|
*/
|
|
99
|
-
table:
|
|
99
|
+
table: Table_Internal<TFeatures, TData>
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export interface Header_Header<
|
package/src/types/Column.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Table_Internal } from './Table'
|
|
1
2
|
import type { Column_RowSorting } from '../features/row-sorting/rowSortingFeature.types'
|
|
2
3
|
import type { Column_ColumnFaceting } from '../features/column-faceting/columnFacetingFeature.types'
|
|
3
4
|
import type { Column_ColumnFiltering } from '../features/column-filtering/columnFilteringFeature.types'
|
|
@@ -46,6 +47,7 @@ export interface Column_Internal<
|
|
|
46
47
|
in out TFeatures extends TableFeatures,
|
|
47
48
|
in out TData extends RowData,
|
|
48
49
|
TValue = unknown,
|
|
49
|
-
> extends Omit<Column_Core<TFeatures, TData, TValue>, 'columnDef'> {
|
|
50
|
+
> extends Omit<Column_Core<TFeatures, TData, TValue>, 'columnDef' | 'table'> {
|
|
50
51
|
columnDef: ColumnDefBase_All<TFeatures, TData, TValue>
|
|
52
|
+
table: Table_Internal<TFeatures, TData>
|
|
51
53
|
}
|