@tanstack/table-core 9.0.0-beta.58 → 9.0.0-beta.61
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/reactivity/coreReactivityFeature.types.d.ts +7 -0
- package/dist/core/reactivity/renderPhaseReactivity.d.ts +81 -0
- package/dist/core/reactivity/renderPhaseReactivity.js +95 -0
- package/dist/core/row-models/createCoreRowModel.js +16 -16
- package/dist/core/rows/coreRowsFeature.utils.js +1 -1
- package/dist/core/table/constructTable.js +27 -25
- package/dist/core/table/coreTablesFeature.types.d.ts +5 -5
- package/dist/core/table/coreTablesFeature.utils.d.ts +26 -5
- package/dist/core/table/coreTablesFeature.utils.js +32 -10
- package/dist/features/column-grouping/createGroupedRowModel.js +13 -2
- package/dist/reactivity.d.ts +2 -1
- package/dist/reactivity.js +2 -1
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/types/TableFeatures.d.ts +7 -4
- package/package.json +1 -1
- package/skills/aggregation/SKILL.md +1 -1
- package/skills/api-not-found/SKILL.md +1 -1
- package/skills/cell-selection/SKILL.md +1 -1
- package/skills/client-vs-server/SKILL.md +1 -1
- package/skills/column-faceting/SKILL.md +1 -1
- package/skills/column-filtering/SKILL.md +1 -1
- package/skills/column-ordering/SKILL.md +1 -1
- package/skills/column-pinning/SKILL.md +1 -1
- package/skills/column-resizing/SKILL.md +1 -1
- package/skills/column-sizing/SKILL.md +1 -1
- package/skills/column-visibility/SKILL.md +1 -1
- package/skills/core/SKILL.md +1 -1
- package/skills/custom-features/SKILL.md +1 -1
- package/skills/expanding/SKILL.md +1 -1
- package/skills/global-filtering/SKILL.md +1 -1
- package/skills/grouping/SKILL.md +1 -1
- package/skills/migrate-v8-to-v9/SKILL.md +1 -1
- package/skills/pagination/SKILL.md +1 -1
- package/skills/row-pinning/SKILL.md +1 -1
- package/skills/row-selection/SKILL.md +1 -1
- package/skills/sorting/SKILL.md +1 -1
- package/skills/table-features/SKILL.md +1 -1
- package/skills/typescript/SKILL.md +1 -1
|
@@ -17,6 +17,13 @@ interface TableAtomOptions<T> extends AtomOptions<T> {
|
|
|
17
17
|
interface TableReactivityBindings {
|
|
18
18
|
createOptionsStore: boolean;
|
|
19
19
|
wrapExternalAtoms: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Invalidates readonly atoms whose compute reads non-reactive inputs (plain
|
|
22
|
+
* options). Render-phase adapters call this after publishing captured
|
|
23
|
+
* controlled state from a host commit, including when no base atom changed,
|
|
24
|
+
* so controlled ownership changes still reach subscribers.
|
|
25
|
+
*/
|
|
26
|
+
commit?: () => void;
|
|
20
27
|
addSubscription: (subscription: Subscription) => void;
|
|
21
28
|
/**
|
|
22
29
|
* Creates a writable atom with an initial value.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { TableReactivityBindings } from "./coreReactivityFeature.types.js";
|
|
2
|
+
import { Atom, AtomOptions, ReadonlyAtom } from "@tanstack/store";
|
|
3
|
+
|
|
4
|
+
//#region src/core/reactivity/renderPhaseReactivity.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reactivity bindings for adapters whose options are plain values synchronized
|
|
7
|
+
* during the host framework's render phase, with a guaranteed `commit` hook.
|
|
8
|
+
*/
|
|
9
|
+
interface RenderPhaseReactivityBindings extends TableReactivityBindings {
|
|
10
|
+
commit: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Store primitives supplied by the adapter.
|
|
14
|
+
*
|
|
15
|
+
* They MUST come from the adapter's own store package (e.g.
|
|
16
|
+
* `@tanstack/react-store`) rather than table-core's copy: dependency tracking
|
|
17
|
+
* and batching share module-global state, so atoms created here must live in
|
|
18
|
+
* the same store instance as user-provided external atoms and adapter
|
|
19
|
+
* subscriptions.
|
|
20
|
+
*/
|
|
21
|
+
interface RenderPhaseReactivityPrimitives {
|
|
22
|
+
createAtom: {
|
|
23
|
+
<T>(getValue: (prev?: T) => T, options?: AtomOptions<T>): ReadonlyAtom<T>;
|
|
24
|
+
<T>(initialValue: T, options?: AtomOptions<T>): Atom<T>;
|
|
25
|
+
};
|
|
26
|
+
batch: (fn: () => void) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Overrides the deferred-scheduling primitive (defaults to
|
|
29
|
+
* `queueMicrotask`).
|
|
30
|
+
*/
|
|
31
|
+
schedule?: (fn: () => void) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates reactivity bindings for render-phase adapters (React, Preact, Lit):
|
|
35
|
+
* frameworks with plain, non-reactive options that are re-synchronized during
|
|
36
|
+
* component render, where store notifications must not fire until the host
|
|
37
|
+
* commits.
|
|
38
|
+
*
|
|
39
|
+
* Readonly atoms are exposed as live facades. `get()` re-evaluates the
|
|
40
|
+
* resolver against the options of the render in progress — a normal computed
|
|
41
|
+
* cannot know that plain `options.state` changed — and caches the result
|
|
42
|
+
* through the configured comparator so external-store consumers (e.g. React's
|
|
43
|
+
* `useSyncExternalStore`) see referentially stable snapshots. `subscribe()`
|
|
44
|
+
* goes through a hidden computed that tracks the resolver's real atom
|
|
45
|
+
* dependencies plus a commit version, so subscribers are invalidated by
|
|
46
|
+
* actual reactive writes and by the adapter's post-commit publication.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { batch, createAtom } from '@tanstack/react-store'
|
|
51
|
+
*
|
|
52
|
+
* export const reactReactivity = () =>
|
|
53
|
+
* renderPhaseReactivity({ createAtom, batch })
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function renderPhaseReactivity(primitives: RenderPhaseReactivityPrimitives): RenderPhaseReactivityBindings;
|
|
57
|
+
type SelectionSource<T> = {
|
|
58
|
+
get: () => T;
|
|
59
|
+
subscribe: (listener: (value: T) => void) => {
|
|
60
|
+
unsubscribe: () => void;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
interface RenderPhaseSource<T> extends SelectionSource<T> {
|
|
64
|
+
/**
|
|
65
|
+
* Records the snapshot observed by a render that actually committed.
|
|
66
|
+
*/
|
|
67
|
+
markCommitted: (snapshot: T) => void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates a render-phase source with an explicit commit baseline.
|
|
71
|
+
*
|
|
72
|
+
* Render-phase adapters publish controlled state after the host framework
|
|
73
|
+
* commits so isolated subscribers update, but the component that owns the
|
|
74
|
+
* table already rendered that exact snapshot — forwarding the notification to
|
|
75
|
+
* its root subscription would produce a redundant render. Unlike a last-read
|
|
76
|
+
* filter, speculative reads do not change notification behavior: only
|
|
77
|
+
* `markCommitted()` advances the baseline.
|
|
78
|
+
*/
|
|
79
|
+
declare function createRenderPhaseSource<T>(source: SelectionSource<T>, compare?: (committed: T, published: T) => boolean): RenderPhaseSource<T>;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { RenderPhaseReactivityBindings, RenderPhaseReactivityPrimitives, RenderPhaseSource, createRenderPhaseSource, renderPhaseReactivity };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
//#region src/core/reactivity/renderPhaseReactivity.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates reactivity bindings for render-phase adapters (React, Preact, Lit):
|
|
4
|
+
* frameworks with plain, non-reactive options that are re-synchronized during
|
|
5
|
+
* component render, where store notifications must not fire until the host
|
|
6
|
+
* commits.
|
|
7
|
+
*
|
|
8
|
+
* Readonly atoms are exposed as live facades. `get()` re-evaluates the
|
|
9
|
+
* resolver against the options of the render in progress — a normal computed
|
|
10
|
+
* cannot know that plain `options.state` changed — and caches the result
|
|
11
|
+
* through the configured comparator so external-store consumers (e.g. React's
|
|
12
|
+
* `useSyncExternalStore`) see referentially stable snapshots. `subscribe()`
|
|
13
|
+
* goes through a hidden computed that tracks the resolver's real atom
|
|
14
|
+
* dependencies plus a commit version, so subscribers are invalidated by
|
|
15
|
+
* actual reactive writes and by the adapter's post-commit publication.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { batch, createAtom } from '@tanstack/react-store'
|
|
20
|
+
*
|
|
21
|
+
* export const reactReactivity = () =>
|
|
22
|
+
* renderPhaseReactivity({ createAtom, batch })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
function renderPhaseReactivity(primitives) {
|
|
26
|
+
const { createAtom, batch } = primitives;
|
|
27
|
+
const commitAtom = createAtom(0);
|
|
28
|
+
return {
|
|
29
|
+
createOptionsStore: false,
|
|
30
|
+
wrapExternalAtoms: false,
|
|
31
|
+
addSubscription: () => {
|
|
32
|
+
throw new Error("Feature not supported in current reactivity implementation");
|
|
33
|
+
},
|
|
34
|
+
unmount: () => {
|
|
35
|
+
throw new Error("Feature not supported in current reactivity implementation");
|
|
36
|
+
},
|
|
37
|
+
schedule: primitives.schedule ?? ((fn) => queueMicrotask(fn)),
|
|
38
|
+
batch,
|
|
39
|
+
untrack: (fn) => fn(),
|
|
40
|
+
createReadonlyAtom: (fn, atomOptions) => {
|
|
41
|
+
const compare = atomOptions?.compare ?? Object.is;
|
|
42
|
+
let hasSnapshot = false;
|
|
43
|
+
let snapshot;
|
|
44
|
+
const getSnapshot = () => {
|
|
45
|
+
const nextSnapshot = fn();
|
|
46
|
+
if (!hasSnapshot || !compare(snapshot, nextSnapshot)) {
|
|
47
|
+
snapshot = nextSnapshot;
|
|
48
|
+
hasSnapshot = true;
|
|
49
|
+
}
|
|
50
|
+
return snapshot;
|
|
51
|
+
};
|
|
52
|
+
const reactiveAtom = createAtom(() => {
|
|
53
|
+
commitAtom.get();
|
|
54
|
+
return getSnapshot();
|
|
55
|
+
}, { compare });
|
|
56
|
+
return {
|
|
57
|
+
get: getSnapshot,
|
|
58
|
+
subscribe: reactiveAtom.subscribe.bind(reactiveAtom)
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
createWritableAtom: (value, atomOptions) => {
|
|
62
|
+
return createAtom(value, { compare: atomOptions?.compare });
|
|
63
|
+
},
|
|
64
|
+
commit: () => {
|
|
65
|
+
commitAtom.set((version) => version + 1);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates a render-phase source with an explicit commit baseline.
|
|
71
|
+
*
|
|
72
|
+
* Render-phase adapters publish controlled state after the host framework
|
|
73
|
+
* commits so isolated subscribers update, but the component that owns the
|
|
74
|
+
* table already rendered that exact snapshot — forwarding the notification to
|
|
75
|
+
* its root subscription would produce a redundant render. Unlike a last-read
|
|
76
|
+
* filter, speculative reads do not change notification behavior: only
|
|
77
|
+
* `markCommitted()` advances the baseline.
|
|
78
|
+
*/
|
|
79
|
+
function createRenderPhaseSource(source, compare = Object.is) {
|
|
80
|
+
let hasCommittedSnapshot = false;
|
|
81
|
+
let committedSnapshot;
|
|
82
|
+
return {
|
|
83
|
+
get: source.get,
|
|
84
|
+
markCommitted: (snapshot) => {
|
|
85
|
+
committedSnapshot = snapshot;
|
|
86
|
+
hasCommittedSnapshot = true;
|
|
87
|
+
},
|
|
88
|
+
subscribe: (listener) => source.subscribe((value) => {
|
|
89
|
+
if (!hasCommittedSnapshot || !compare(committedSnapshot, value)) listener(value);
|
|
90
|
+
})
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { createRenderPhaseSource, renderPhaseReactivity };
|
|
@@ -24,28 +24,28 @@ function createCoreRowModel() {
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
function accessRows(table, rowModel, originalRows, depth = 0, parentRow) {
|
|
28
|
+
const rows = [];
|
|
29
|
+
for (let i = 0; i < originalRows.length; i++) {
|
|
30
|
+
const originalRow = originalRows[i];
|
|
31
|
+
const row = constructRow(table, table.getRowId(originalRow, i, parentRow), originalRow, i, depth, void 0, parentRow?.id);
|
|
32
|
+
rowModel.flatRows.push(row);
|
|
33
|
+
rowModel.rowsById[row.id] = row;
|
|
34
|
+
rows.push(row);
|
|
35
|
+
if (table.options.getSubRows) {
|
|
36
|
+
row.originalSubRows = table.options.getSubRows(originalRow, i);
|
|
37
|
+
if (row.originalSubRows?.length) row.subRows = accessRows(table, rowModel, row.originalSubRows, depth + 1, row);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return rows;
|
|
41
|
+
}
|
|
27
42
|
function _createCoreRowModel(table, data) {
|
|
28
43
|
const rowModel = {
|
|
29
44
|
rows: [],
|
|
30
45
|
flatRows: [],
|
|
31
46
|
rowsById: makeObjectMap()
|
|
32
47
|
};
|
|
33
|
-
|
|
34
|
-
const rows = [];
|
|
35
|
-
for (let i = 0; i < originalRows.length; i++) {
|
|
36
|
-
const originalRow = originalRows[i];
|
|
37
|
-
const row = constructRow(table, table.getRowId(originalRow, i, parentRow), originalRow, i, depth, void 0, parentRow?.id);
|
|
38
|
-
rowModel.flatRows.push(row);
|
|
39
|
-
rowModel.rowsById[row.id] = row;
|
|
40
|
-
rows.push(row);
|
|
41
|
-
if (table.options.getSubRows) {
|
|
42
|
-
row.originalSubRows = table.options.getSubRows(originalRow, i);
|
|
43
|
-
if (row.originalSubRows?.length) row.subRows = accessRows(row.originalSubRows, depth + 1, row);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return rows;
|
|
47
|
-
};
|
|
48
|
-
rowModel.rows = accessRows(data);
|
|
48
|
+
rowModel.rows = accessRows(table, rowModel, data);
|
|
49
49
|
return rowModel;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -205,7 +205,7 @@ function row_getAllCellsByColumnId(row) {
|
|
|
205
205
|
* ```
|
|
206
206
|
*/
|
|
207
207
|
function table_getRowId(originalRow, table, index, parent) {
|
|
208
|
-
return table.options.getRowId?.(originalRow, index, parent) ??
|
|
208
|
+
return table.options.getRowId?.(originalRow, index, parent) ?? (parent ? `${parent.id}.${index}` : String(index));
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* Looks up a row by id from the current or full row model.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { cloneState } from "../../utils.js";
|
|
1
|
+
import { cloneState, hasOwn } from "../../utils.js";
|
|
2
2
|
import { table_syncExternalStateToBaseAtoms } from "./coreTablesFeature.utils.js";
|
|
3
3
|
import { coreFeatures } from "../coreFeatures.js";
|
|
4
4
|
import { atomToStore } from "../reactivity/coreReactivityFeature.utils.js";
|
|
5
|
+
import { shallow } from "@tanstack/store";
|
|
5
6
|
|
|
6
7
|
//#region src/core/table/constructTable.ts
|
|
7
8
|
/**
|
|
@@ -24,19 +25,24 @@ function constructTable(tableOptions) {
|
|
|
24
25
|
const _reactivity = tableOptions.features.coreReactivityFeature;
|
|
25
26
|
const { aggregationFns, columnMeta: _columnMeta, coreRowModel, expandedRowModel, facetedMinMaxValues, facetedRowModel, facetedUniqueValues, filterFns, filterMeta: _filterMeta, filteredRowModel, groupedRowModel, paginatedRowModel, sortFns, sortedRowModel, tableMeta: _tableMeta, ...features } = tableOptions.features;
|
|
26
27
|
const table = {
|
|
27
|
-
|
|
28
|
+
_cellInstanceInitFns: [],
|
|
29
|
+
_columnInstanceInitFns: [],
|
|
28
30
|
_features: {
|
|
29
31
|
...coreFeatures,
|
|
30
32
|
...features
|
|
31
33
|
},
|
|
32
|
-
|
|
34
|
+
_headerGroupInstanceInitFns: [],
|
|
35
|
+
_headerInstanceInitFns: [],
|
|
36
|
+
_reactivity,
|
|
37
|
+
_rowInstanceInitFns: [],
|
|
33
38
|
_rowModelFns: {
|
|
34
39
|
aggregationFns,
|
|
35
40
|
filterFns,
|
|
36
41
|
sortFns
|
|
37
42
|
},
|
|
38
|
-
|
|
39
|
-
atoms: {}
|
|
43
|
+
_rowModels: {},
|
|
44
|
+
atoms: {},
|
|
45
|
+
baseAtoms: {}
|
|
40
46
|
};
|
|
41
47
|
const featuresList = Object.values(table._features);
|
|
42
48
|
const mergedOptions = {
|
|
@@ -81,9 +87,12 @@ function constructTable(tableOptions) {
|
|
|
81
87
|
const key = stateKeys[i];
|
|
82
88
|
table.baseAtoms[key] = _reactivity.createWritableAtom(table.initialState[key], { debugName: `table/baseAtoms/${key}` });
|
|
83
89
|
table.atoms[key] = _reactivity.createReadonlyAtom(() => {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
const options = table.options;
|
|
91
|
+
const externalAtom = options.atoms?.[key];
|
|
92
|
+
const reactiveState = externalAtom ? externalAtom.get() : table.baseAtoms[key].get();
|
|
93
|
+
if (externalAtom) return reactiveState;
|
|
94
|
+
const controlledState = options.state;
|
|
95
|
+
return controlledState && hasOwn(controlledState, key) ? controlledState[key] : reactiveState;
|
|
87
96
|
}, { debugName: `table/atoms/${key}` });
|
|
88
97
|
}
|
|
89
98
|
table_syncExternalStateToBaseAtoms(table);
|
|
@@ -94,26 +103,20 @@ function constructTable(tableOptions) {
|
|
|
94
103
|
snapshot[key] = table.atoms[key].get();
|
|
95
104
|
}
|
|
96
105
|
return snapshot;
|
|
97
|
-
}, {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const headerInstanceInitFns = [];
|
|
102
|
-
const rowInstanceInitFns = [];
|
|
106
|
+
}, {
|
|
107
|
+
compare: shallow,
|
|
108
|
+
debugName: "table/store"
|
|
109
|
+
}));
|
|
103
110
|
for (let i = 0; i < featuresList.length; i++) {
|
|
104
111
|
const feature = featuresList[i];
|
|
105
|
-
if (feature.initCellInstanceData) cellInstanceInitFns.push(feature.initCellInstanceData.bind(feature));
|
|
106
|
-
if (feature.initColumnInstanceData) columnInstanceInitFns.push(feature.initColumnInstanceData.bind(feature));
|
|
107
|
-
if (feature.initHeaderGroupInstanceData) headerGroupInstanceInitFns.push(feature.initHeaderGroupInstanceData.bind(feature));
|
|
108
|
-
if (feature.initHeaderInstanceData) headerInstanceInitFns.push(feature.initHeaderInstanceData.bind(feature));
|
|
109
|
-
if (feature.initRowInstanceData) rowInstanceInitFns.push(feature.initRowInstanceData.bind(feature));
|
|
110
112
|
feature.initTableInstanceData?.(table);
|
|
113
|
+
if (feature.initCellInstanceData) table._cellInstanceInitFns.push(feature.initCellInstanceData.bind(feature));
|
|
114
|
+
if (feature.initColumnInstanceData) table._columnInstanceInitFns.push(feature.initColumnInstanceData.bind(feature));
|
|
115
|
+
if (feature.initHeaderGroupInstanceData) table._headerGroupInstanceInitFns.push(feature.initHeaderGroupInstanceData.bind(feature));
|
|
116
|
+
if (feature.initHeaderInstanceData) table._headerInstanceInitFns.push(feature.initHeaderInstanceData.bind(feature));
|
|
117
|
+
if (feature.initRowInstanceData) table._rowInstanceInitFns.push(feature.initRowInstanceData.bind(feature));
|
|
118
|
+
feature.constructTableAPIs?.(table);
|
|
111
119
|
}
|
|
112
|
-
table._cellInstanceInitFns = cellInstanceInitFns;
|
|
113
|
-
table._columnInstanceInitFns = columnInstanceInitFns;
|
|
114
|
-
table._headerGroupInstanceInitFns = headerGroupInstanceInitFns;
|
|
115
|
-
table._headerInstanceInitFns = headerInstanceInitFns;
|
|
116
|
-
table._rowInstanceInitFns = rowInstanceInitFns;
|
|
117
120
|
if (process.env.NODE_ENV === "development" && (tableOptions.debugAll || tableOptions.debugTable)) {
|
|
118
121
|
const features = Object.keys(table._features);
|
|
119
122
|
const rowModels = Object.entries({
|
|
@@ -136,7 +139,6 @@ function constructTable(tableOptions) {
|
|
|
136
139
|
|
|
137
140
|
States: ${states.join("\n ")}\n`, { table });
|
|
138
141
|
}
|
|
139
|
-
for (let i = 0; i < featuresList.length; i++) featuresList[i].constructTableAPIs?.(table);
|
|
140
142
|
return table;
|
|
141
143
|
}
|
|
142
144
|
|
|
@@ -122,7 +122,7 @@ interface Table_CoreProperties<in out TFeatures extends TableFeatures, in out TD
|
|
|
122
122
|
/**
|
|
123
123
|
* Cache of the `initCellInstanceData` functions for features that define one.
|
|
124
124
|
*/
|
|
125
|
-
_cellInstanceInitFns
|
|
125
|
+
_cellInstanceInitFns: Array<NonNullable<TableFeature['initCellInstanceData']>>;
|
|
126
126
|
/**
|
|
127
127
|
* Prototype cache for Cell objects - shared by all cells in this table
|
|
128
128
|
*/
|
|
@@ -130,7 +130,7 @@ interface Table_CoreProperties<in out TFeatures extends TableFeatures, in out TD
|
|
|
130
130
|
/**
|
|
131
131
|
* Cache of the `initColumnInstanceData` functions for features that define one.
|
|
132
132
|
*/
|
|
133
|
-
_columnInstanceInitFns
|
|
133
|
+
_columnInstanceInitFns: Array<NonNullable<TableFeature['initColumnInstanceData']>>;
|
|
134
134
|
/**
|
|
135
135
|
* Prototype cache for Column objects - shared by all columns in this table
|
|
136
136
|
*/
|
|
@@ -142,11 +142,11 @@ interface Table_CoreProperties<in out TFeatures extends TableFeatures, in out TD
|
|
|
142
142
|
/**
|
|
143
143
|
* Cache of the `initHeaderGroupInstanceData` functions for features that define one.
|
|
144
144
|
*/
|
|
145
|
-
_headerGroupInstanceInitFns
|
|
145
|
+
_headerGroupInstanceInitFns: Array<NonNullable<TableFeature['initHeaderGroupInstanceData']>>;
|
|
146
146
|
/**
|
|
147
147
|
* Cache of the `initHeaderInstanceData` functions for features that define one.
|
|
148
148
|
*/
|
|
149
|
-
_headerInstanceInitFns
|
|
149
|
+
_headerInstanceInitFns: Array<NonNullable<TableFeature['initHeaderInstanceData']>>;
|
|
150
150
|
/**
|
|
151
151
|
* Prototype cache for Header objects - shared by all headers in this table
|
|
152
152
|
*/
|
|
@@ -166,7 +166,7 @@ interface Table_CoreProperties<in out TFeatures extends TableFeatures, in out TD
|
|
|
166
166
|
/**
|
|
167
167
|
* Cache of the `initRowInstanceData` functions for features that define one.
|
|
168
168
|
*/
|
|
169
|
-
_rowInstanceInitFns
|
|
169
|
+
_rowInstanceInitFns: Array<NonNullable<TableFeature['initRowInstanceData']>>;
|
|
170
170
|
/**
|
|
171
171
|
* The readonly derived atoms for each `TableState` slice. Each derives from
|
|
172
172
|
* its corresponding `baseAtom` plus, optionally, a per-slice external atom or
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RowData, Updater } from "../../types/type-utils.js";
|
|
2
|
+
import { TableState } from "../../types/TableState.js";
|
|
2
3
|
import { TableOptions } from "../../types/TableOptions.js";
|
|
3
4
|
import { Table } from "../../types/Table.js";
|
|
4
5
|
import { TableFeatures } from "../../types/TableFeatures.js";
|
|
@@ -7,15 +8,32 @@ import { TableFeatures } from "../../types/TableFeatures.js";
|
|
|
7
8
|
/**
|
|
8
9
|
* Synchronizes externally controlled state slices into the table's base atoms.
|
|
9
10
|
*
|
|
10
|
-
* This keeps
|
|
11
|
-
*
|
|
11
|
+
* This keeps `options.state` values mirrored in the atom graph so derived
|
|
12
|
+
* atoms, stores, and table APIs read a consistent snapshot.
|
|
13
|
+
*
|
|
14
|
+
* Adapters that update options during their host's render phase pass the
|
|
15
|
+
* state snapshot captured by the committed render as `capturedState` — the
|
|
16
|
+
* shared options object may already hold values from a newer render that
|
|
17
|
+
* never commits. Pass `null` to publish nothing (a captured "no controlled
|
|
18
|
+
* state"); omitting the argument reads the current `table.options.state`
|
|
19
|
+
* instead. An optional `compare` suppresses semantically unchanged slice
|
|
20
|
+
* writes; the default remains reference equality.
|
|
12
21
|
*
|
|
13
22
|
* @example
|
|
14
23
|
* ```ts
|
|
15
24
|
* table_syncExternalStateToBaseAtoms(table)
|
|
25
|
+
* table_syncExternalStateToBaseAtoms(table, capturedState ?? null, shallow)
|
|
16
26
|
* ```
|
|
17
27
|
*/
|
|
18
|
-
declare function table_syncExternalStateToBaseAtoms<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData
|
|
28
|
+
declare function table_syncExternalStateToBaseAtoms<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, capturedState?: Partial<TableState<TFeatures>> | null, compare?: (currentState: unknown, externalState: unknown) => boolean): void;
|
|
29
|
+
/**
|
|
30
|
+
* Publishes captured controlled state after a host framework commits.
|
|
31
|
+
*
|
|
32
|
+
* Render-phase adapters stage options without synchronizing base atoms, then
|
|
33
|
+
* pass the state captured by the committed render here. The commit signal also
|
|
34
|
+
* invalidates ownership changes when no base atom was written.
|
|
35
|
+
*/
|
|
36
|
+
declare function table_publishExternalState<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, state: Partial<TableState<TFeatures>> | null, compare?: (currentState: unknown, externalState: unknown) => boolean): void;
|
|
19
37
|
/**
|
|
20
38
|
* Resets all internal table base atoms to `table.initialState`, then clears
|
|
21
39
|
* transient instance data through registered feature reset hooks.
|
|
@@ -52,8 +70,11 @@ declare function table_mergeOptions<TFeatures extends TableFeatures, TData exten
|
|
|
52
70
|
* @example
|
|
53
71
|
* ```ts
|
|
54
72
|
* table_setOptions(table, (old) => old)
|
|
73
|
+
* table_setOptions(table, (old) => old, { syncExternalState: false })
|
|
55
74
|
* ```
|
|
56
75
|
*/
|
|
57
|
-
declare function table_setOptions<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<TableOptions<TFeatures, TData
|
|
76
|
+
declare function table_setOptions<TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>, updater: Updater<TableOptions<TFeatures, TData>>, options?: {
|
|
77
|
+
syncExternalState?: boolean;
|
|
78
|
+
}): void;
|
|
58
79
|
//#endregion
|
|
59
|
-
export { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms };
|
|
80
|
+
export { table_mergeOptions, table_publishExternalState, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms };
|
|
@@ -4,27 +4,48 @@ import { cloneState, functionalUpdate } from "../../utils.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Synchronizes externally controlled state slices into the table's base atoms.
|
|
6
6
|
*
|
|
7
|
-
* This keeps
|
|
8
|
-
*
|
|
7
|
+
* This keeps `options.state` values mirrored in the atom graph so derived
|
|
8
|
+
* atoms, stores, and table APIs read a consistent snapshot.
|
|
9
|
+
*
|
|
10
|
+
* Adapters that update options during their host's render phase pass the
|
|
11
|
+
* state snapshot captured by the committed render as `capturedState` — the
|
|
12
|
+
* shared options object may already hold values from a newer render that
|
|
13
|
+
* never commits. Pass `null` to publish nothing (a captured "no controlled
|
|
14
|
+
* state"); omitting the argument reads the current `table.options.state`
|
|
15
|
+
* instead. An optional `compare` suppresses semantically unchanged slice
|
|
16
|
+
* writes; the default remains reference equality.
|
|
9
17
|
*
|
|
10
18
|
* @example
|
|
11
19
|
* ```ts
|
|
12
20
|
* table_syncExternalStateToBaseAtoms(table)
|
|
21
|
+
* table_syncExternalStateToBaseAtoms(table, capturedState ?? null, shallow)
|
|
13
22
|
* ```
|
|
14
23
|
*/
|
|
15
|
-
function table_syncExternalStateToBaseAtoms(table) {
|
|
16
|
-
const state = table.options.state;
|
|
17
|
-
if (!state) return;
|
|
24
|
+
function table_syncExternalStateToBaseAtoms(table, capturedState, compare = (currentState, externalState) => currentState === externalState) {
|
|
25
|
+
const state = capturedState === void 0 ? table.options.state : capturedState;
|
|
18
26
|
table._reactivity.batch(() => {
|
|
19
|
-
for (const key in state) {
|
|
27
|
+
if (state) for (const key in state) {
|
|
20
28
|
const baseAtom = table.baseAtoms[key];
|
|
21
29
|
if (!baseAtom) continue;
|
|
22
30
|
const externalState = state[key];
|
|
23
|
-
if (
|
|
31
|
+
if (!compare(table._reactivity.untrack(() => baseAtom.get()), externalState)) baseAtom.set(() => externalState);
|
|
24
32
|
}
|
|
25
33
|
});
|
|
26
34
|
}
|
|
27
35
|
/**
|
|
36
|
+
* Publishes captured controlled state after a host framework commits.
|
|
37
|
+
*
|
|
38
|
+
* Render-phase adapters stage options without synchronizing base atoms, then
|
|
39
|
+
* pass the state captured by the committed render here. The commit signal also
|
|
40
|
+
* invalidates ownership changes when no base atom was written.
|
|
41
|
+
*/
|
|
42
|
+
function table_publishExternalState(table, state, compare = (currentState, externalState) => currentState === externalState) {
|
|
43
|
+
table._reactivity.batch(() => {
|
|
44
|
+
table_syncExternalStateToBaseAtoms(table, state, compare);
|
|
45
|
+
table._reactivity.commit?.();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
28
49
|
* Resets all internal table base atoms to `table.initialState`, then clears
|
|
29
50
|
* transient instance data through registered feature reset hooks.
|
|
30
51
|
*
|
|
@@ -103,14 +124,15 @@ function table_mergeOptions(table, newOptions) {
|
|
|
103
124
|
* @example
|
|
104
125
|
* ```ts
|
|
105
126
|
* table_setOptions(table, (old) => old)
|
|
127
|
+
* table_setOptions(table, (old) => old, { syncExternalState: false })
|
|
106
128
|
* ```
|
|
107
129
|
*/
|
|
108
|
-
function table_setOptions(table, updater) {
|
|
130
|
+
function table_setOptions(table, updater, options) {
|
|
109
131
|
const mergedOptions = table_mergeOptions(table, functionalUpdate(updater, table.options));
|
|
110
132
|
if (table.optionsStore) table.optionsStore.set(() => mergedOptions);
|
|
111
133
|
else table.options = mergedOptions;
|
|
112
|
-
|
|
134
|
+
if (options?.syncExternalState !== false) table_publishExternalState(table, mergedOptions.state ?? null);
|
|
113
135
|
}
|
|
114
136
|
|
|
115
137
|
//#endregion
|
|
116
|
-
export { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms };
|
|
138
|
+
export { table_mergeOptions, table_publishExternalState, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms };
|
|
@@ -17,6 +17,9 @@ import { table_autoResetExpanded } from "../row-expanding/rowExpandingFeature.ut
|
|
|
17
17
|
function createGroupedRowModel() {
|
|
18
18
|
return (_table) => {
|
|
19
19
|
const table = _table;
|
|
20
|
+
let hasAutoResetDependencies = false;
|
|
21
|
+
let previousGrouping;
|
|
22
|
+
let previousPreGroupedRowModel;
|
|
20
23
|
return tableMemo({
|
|
21
24
|
feature: "columnGroupingFeature",
|
|
22
25
|
table,
|
|
@@ -28,8 +31,16 @@ function createGroupedRowModel() {
|
|
|
28
31
|
],
|
|
29
32
|
fn: () => _createGroupedRowModel(table),
|
|
30
33
|
onAfterUpdate: () => {
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
const grouping = table.atoms.grouping?.get();
|
|
35
|
+
const preGroupedRowModel = table.getPreGroupedRowModel();
|
|
36
|
+
const rowInputsChanged = !hasAutoResetDependencies || grouping !== previousGrouping || preGroupedRowModel !== previousPreGroupedRowModel;
|
|
37
|
+
previousGrouping = grouping;
|
|
38
|
+
previousPreGroupedRowModel = preGroupedRowModel;
|
|
39
|
+
hasAutoResetDependencies = true;
|
|
40
|
+
if (rowInputsChanged) {
|
|
41
|
+
table_autoResetExpanded(table);
|
|
42
|
+
table_autoResetPageIndex(table);
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
});
|
|
35
46
|
};
|
package/dist/reactivity.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { TableAtomOptions, TableReactivityBindings } from "./core/reactivity/coreReactivityFeature.types.js";
|
|
2
2
|
import { atomToStore } from "./core/reactivity/coreReactivityFeature.utils.js";
|
|
3
|
-
|
|
3
|
+
import { RenderPhaseReactivityBindings, RenderPhaseReactivityPrimitives, RenderPhaseSource, createRenderPhaseSource, renderPhaseReactivity } from "./core/reactivity/renderPhaseReactivity.js";
|
|
4
|
+
export { RenderPhaseReactivityBindings, RenderPhaseReactivityPrimitives, RenderPhaseSource, TableAtomOptions, TableReactivityBindings, atomToStore, createRenderPhaseSource, renderPhaseReactivity };
|
package/dist/reactivity.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { atomToStore } from "./core/reactivity/coreReactivityFeature.utils.js";
|
|
2
|
+
import { createRenderPhaseSource, renderPhaseReactivity } from "./core/reactivity/renderPhaseReactivity.js";
|
|
2
3
|
|
|
3
|
-
export { atomToStore };
|
|
4
|
+
export { atomToStore, createRenderPhaseSource, renderPhaseReactivity };
|
|
@@ -3,7 +3,7 @@ import { column_getFlatColumns, column_getLeafColumns, table_getAllColumns, tabl
|
|
|
3
3
|
import { header_getContext, header_getLeafHeaders, table_getFlatHeaders, table_getFooterGroups, table_getHeaderGroups, table_getLeafHeaders } from "./core/headers/coreHeadersFeature.utils.js";
|
|
4
4
|
import { row_getAllCells, row_getAllCellsByColumnId, row_getDisplayIndex, row_getLeafRows, row_getParentRow, row_getParentRows, row_getUniqueValues, row_getValue, row_renderValue, table_getMaxSubRowDepth, table_getRow, table_getRowId, table_getRowsInDisplayOrder } from "./core/rows/coreRowsFeature.utils.js";
|
|
5
5
|
import { table_getCoreRowModel, table_getExpandedRowModel, table_getFilteredRowModel, table_getGroupedRowModel, table_getPaginatedRowModel, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSortedRowModel, table_getRowModel, table_getSortedRowModel } from "./core/row-models/coreRowModelsFeature.utils.js";
|
|
6
|
-
import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
|
|
6
|
+
import { table_mergeOptions, table_publishExternalState, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
|
|
7
7
|
import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
|
|
8
8
|
import { cell_getCanSelect, cell_getIsFocused, cell_getIsSelected, cell_getSelectionEdges, cell_getSelectionExtendHandler, cell_getSelectionStartHandler, cell_getTabIndex, getDefaultCellSelectionState, table_autoResetCellSelection, table_extendCellSelection, table_getCellSelectionBounds, table_getCellSelectionColumnIds, table_getCellSelectionColumnIndexes, table_getCellSelectionRowIds, table_getFocusedCell, table_getSelectedCellCount, table_getSelectedCellIds, table_getSelectedCellRangesData, table_moveCellSelection, table_resetCellSelection, table_selectAllCells, table_selectCellRange, table_setCellSelection, table_setFocusedCell } from "./features/cell-selection/cellSelectionFeature.utils.js";
|
|
9
9
|
import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.js";
|
|
@@ -20,4 +20,4 @@ import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, t
|
|
|
20
20
|
import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinnedIndex, row_pin, table_getBottomRows, table_getCenterRows, table_getIsSomeRowsPinned, table_getTopRows, table_resetRowPinning, table_setRowPinning } from "./features/row-pinning/rowPinningFeature.utils.js";
|
|
21
21
|
import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
|
|
22
22
|
import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
|
|
23
|
-
export { aggregateColumnValue, cell_getCanSelect, cell_getContext, cell_getIsAggregated, cell_getIsFocused, cell_getIsGrouped, cell_getIsPlaceholder, cell_getIsSelected, cell_getSelectionEdges, cell_getSelectionExtendHandler, cell_getSelectionStartHandler, cell_getTabIndex, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultCellSelectionState, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetCellSelection, table_autoResetExpanded, table_autoResetPageIndex, table_extendCellSelection, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCellSelectionBounds, table_getCellSelectionColumnIds, table_getCellSelectionColumnIndexes, table_getCellSelectionRowIds, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFocusedCell, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedCellCount, table_getSelectedCellIds, table_getSelectedCellRangesData, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_moveCellSelection, table_nextPage, table_previousPage, table_reset, table_resetCellSelection, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_selectAllCells, table_selectCellRange, table_setCellSelection, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setFocusedCell, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
23
|
+
export { aggregateColumnValue, cell_getCanSelect, cell_getContext, cell_getIsAggregated, cell_getIsFocused, cell_getIsGrouped, cell_getIsPlaceholder, cell_getIsSelected, cell_getSelectionEdges, cell_getSelectionExtendHandler, cell_getSelectionStartHandler, cell_getTabIndex, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultCellSelectionState, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetCellSelection, table_autoResetExpanded, table_autoResetPageIndex, table_extendCellSelection, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCellSelectionBounds, table_getCellSelectionColumnIds, table_getCellSelectionColumnIndexes, table_getCellSelectionRowIds, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFocusedCell, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedCellCount, table_getSelectedCellIds, table_getSelectedCellRangesData, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_moveCellSelection, table_nextPage, table_previousPage, table_publishExternalState, table_reset, table_resetCellSelection, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_selectAllCells, table_selectCellRange, table_setCellSelection, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setFocusedCell, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
package/dist/static-functions.js
CHANGED
|
@@ -8,7 +8,7 @@ import { cell_getCanSelect, cell_getIsFocused, cell_getIsSelected, cell_getSelec
|
|
|
8
8
|
import { getDefaultPaginationState, table_autoResetPageIndex, table_firstPage, table_getCanNextPage, table_getCanPreviousPage, table_getPageCount, table_getPageOptions, table_getRowCount, table_lastPage, table_nextPage, table_previousPage, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_setPageIndex, table_setPageSize, table_setPagination } from "./features/row-pagination/rowPaginationFeature.utils.js";
|
|
9
9
|
import { table_getCoreRowModel, table_getExpandedRowModel, table_getFilteredRowModel, table_getGroupedRowModel, table_getPaginatedRowModel, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSortedRowModel, table_getRowModel, table_getSortedRowModel } from "./core/row-models/coreRowModelsFeature.utils.js";
|
|
10
10
|
import { row_getAllCells, row_getAllCellsByColumnId, row_getDisplayIndex, row_getLeafRows, row_getParentRow, row_getParentRows, row_getUniqueValues, row_getValue, row_renderValue, table_getMaxSubRowDepth, table_getRow, table_getRowId, table_getRowsInDisplayOrder } from "./core/rows/coreRowsFeature.utils.js";
|
|
11
|
-
import { table_mergeOptions, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
|
|
11
|
+
import { table_mergeOptions, table_publishExternalState, table_reset, table_setOptions, table_syncExternalStateToBaseAtoms } from "./core/table/coreTablesFeature.utils.js";
|
|
12
12
|
import { column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues } from "./features/column-faceting/columnFacetingFeature.utils.js";
|
|
13
13
|
import { aggregateColumnValue, cell_getIsAggregated, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, formatAggregatedCellValue, normalizeAggregationRows, normalizeUniqueAggregationRows } from "./features/row-aggregation/rowAggregationFeature.utils.js";
|
|
14
14
|
import { column_getAutoFilterFn, column_getCanFilter, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getIsFiltered, column_setFilterValue, getDefaultColumnFiltersState, shouldAutoRemoveFilter, table_resetColumnFilters, table_setColumnFilters } from "./features/column-filtering/columnFilteringFeature.utils.js";
|
|
@@ -21,4 +21,4 @@ import { getDefaultRowPinningState, row_getCanPin, row_getIsPinned, row_getPinne
|
|
|
21
21
|
import { getDefaultRowSelectionState, isRowSelected, isSubRowSelected, row_getCanMultiSelect, row_getCanSelect, row_getCanSelectSubRows, row_getIsAllSubRowsSelected, row_getIsSelected, row_getIsSomeSelected, row_getToggleSelectedHandler, row_toggleSelected, selectRowsFn, table_getFilteredSelectedRowModel, table_getGroupedSelectedRowModel, table_getIsAllPageRowsSelected, table_getIsAllRowsSelected, table_getIsSomePageRowsSelected, table_getIsSomeRowsSelected, table_getPreSelectedRowModel, table_getSelectedRowIds, table_getSelectedRowModel, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsSelectedHandler, table_resetRowSelection, table_setRowSelection, table_toggleAllPageRowsSelected, table_toggleAllRowsSelected } from "./features/row-selection/rowSelectionFeature.utils.js";
|
|
22
22
|
import { column_clearSorting, column_getAutoSortDir, column_getAutoSortFn, column_getCanMultiSort, column_getCanSort, column_getFirstSortDir, column_getIsSorted, column_getNextSortingOrder, column_getSortFn, column_getSortIndex, column_getToggleSortingHandler, column_toggleSorting, getDefaultSortingState, table_resetSorting, table_setSorting } from "./features/row-sorting/rowSortingFeature.utils.js";
|
|
23
23
|
|
|
24
|
-
export { aggregateColumnValue, cell_getCanSelect, cell_getContext, cell_getIsAggregated, cell_getIsFocused, cell_getIsGrouped, cell_getIsPlaceholder, cell_getIsSelected, cell_getSelectionEdges, cell_getSelectionExtendHandler, cell_getSelectionStartHandler, cell_getTabIndex, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultCellSelectionState, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetCellSelection, table_autoResetExpanded, table_autoResetPageIndex, table_extendCellSelection, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCellSelectionBounds, table_getCellSelectionColumnIds, table_getCellSelectionColumnIndexes, table_getCellSelectionRowIds, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFocusedCell, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedCellCount, table_getSelectedCellIds, table_getSelectedCellRangesData, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_moveCellSelection, table_nextPage, table_previousPage, table_reset, table_resetCellSelection, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_selectAllCells, table_selectCellRange, table_setCellSelection, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setFocusedCell, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
24
|
+
export { aggregateColumnValue, cell_getCanSelect, cell_getContext, cell_getIsAggregated, cell_getIsFocused, cell_getIsGrouped, cell_getIsPlaceholder, cell_getIsSelected, cell_getSelectionEdges, cell_getSelectionExtendHandler, cell_getSelectionStartHandler, cell_getTabIndex, cell_getValue, cell_renderValue, column_clearSorting, column_getAfter, column_getAggregationFns, column_getAggregationValue, column_getAutoAggregationFn, column_getAutoFilterFn, column_getAutoSortDir, column_getAutoSortFn, column_getCanFilter, column_getCanGlobalFilter, column_getCanGroup, column_getCanHide, column_getCanMultiSort, column_getCanPin, column_getCanResize, column_getCanSort, column_getFacetedMinMaxValues, column_getFacetedRowModel, column_getFacetedUniqueValues, column_getFilterFn, column_getFilterIndex, column_getFilterValue, column_getFirstSortDir, column_getFlatColumns, column_getGroupedIndex, column_getIndex, column_getIsFiltered, column_getIsFirstColumn, column_getIsGrouped, column_getIsLastColumn, column_getIsPinned, column_getIsResizing, column_getIsSorted, column_getIsVisible, column_getLeafColumns, column_getNextSortingOrder, column_getPinnedIndex, column_getSize, column_getSortFn, column_getSortIndex, column_getStart, column_getToggleGroupingHandler, column_getToggleSortingHandler, column_getToggleVisibilityHandler, column_pin, column_resetSize, column_setFilterValue, column_toggleGrouping, column_toggleSorting, column_toggleVisibility, formatAggregatedCellValue, getDefaultCellSelectionState, getDefaultColumnFiltersState, getDefaultColumnOrderState, getDefaultColumnPinningState, getDefaultColumnResizingState, getDefaultColumnSizingColumnDef, getDefaultColumnSizingState, getDefaultColumnVisibilityState, getDefaultExpandedState, getDefaultGroupingState, getDefaultPaginationState, getDefaultRowPinningState, getDefaultRowSelectionState, getDefaultSortingState, header_getContext, header_getLeafHeaders, header_getResizeHandler, header_getSize, header_getStart, isRowSelected, isSubRowSelected, isTouchStartEvent, normalizeAggregationRows, normalizeUniqueAggregationRows, orderColumns, passiveEventSupported, row_getAllCells, row_getAllCellsByColumnId, row_getCanExpand, row_getCanMultiSelect, row_getCanPin, row_getCanSelect, row_getCanSelectSubRows, row_getCenterVisibleCells, row_getDisplayIndex, row_getEndVisibleCells, row_getGroupingValue, row_getIsAllParentsExpanded, row_getIsAllSubRowsSelected, row_getIsExpanded, row_getIsGrouped, row_getIsPinned, row_getIsSelected, row_getIsSomeSelected, row_getLeafRows, row_getParentRow, row_getParentRows, row_getPinnedIndex, row_getStartVisibleCells, row_getToggleExpandedHandler, row_getToggleSelectedHandler, row_getUniqueValues, row_getValue, row_getVisibleCells, row_getVisibleCellsByColumnId, row_pin, row_renderValue, row_toggleExpanded, row_toggleSelected, selectRowsFn, shouldAutoRemoveFilter, table_autoResetCellSelection, table_autoResetExpanded, table_autoResetPageIndex, table_extendCellSelection, table_firstPage, table_getAllColumns, table_getAllFlatColumns, table_getAllFlatColumnsById, table_getAllLeafColumns, table_getAllLeafColumnsById, table_getBottomRows, table_getCanNextPage, table_getCanPreviousPage, table_getCanSomeRowsExpand, table_getCellSelectionBounds, table_getCellSelectionColumnIds, table_getCellSelectionColumnIndexes, table_getCellSelectionRowIds, table_getCenterFlatHeaders, table_getCenterFooterGroups, table_getCenterHeaderGroups, table_getCenterLeafColumns, table_getCenterLeafHeaders, table_getCenterRows, table_getCenterTotalSize, table_getCenterVisibleLeafColumns, table_getColumn, table_getColumnIndexes, table_getColumnOffsets, table_getCoreRowModel, table_getDefaultColumnDef, table_getEndFlatHeaders, table_getEndFooterGroups, table_getEndHeaderGroups, table_getEndLeafColumns, table_getEndLeafHeaders, table_getEndTotalSize, table_getEndVisibleLeafColumns, table_getExpandedDepth, table_getExpandedRowModel, table_getFilteredRowModel, table_getFilteredSelectedRowModel, table_getFlatHeaders, table_getFocusedCell, table_getFooterGroups, table_getGlobalAutoFilterFn, table_getGlobalFacetedMinMaxValues, table_getGlobalFacetedRowModel, table_getGlobalFacetedUniqueValues, table_getGlobalFilterFn, table_getGroupedRowModel, table_getGroupedSelectedRowModel, table_getHeaderGroups, table_getIsAllColumnsVisible, table_getIsAllPageRowsSelected, table_getIsAllRowsExpanded, table_getIsAllRowsSelected, table_getIsSomeColumnsPinned, table_getIsSomeColumnsVisible, table_getIsSomePageRowsSelected, table_getIsSomeRowsExpanded, table_getIsSomeRowsPinned, table_getIsSomeRowsSelected, table_getLeafHeaders, table_getMaxSubRowDepth, table_getOrderColumnsFn, table_getPageCount, table_getPageOptions, table_getPaginatedRowModel, table_getPinnedLeafColumns, table_getPinnedVisibleLeafColumns, table_getPreExpandedRowModel, table_getPreFilteredRowModel, table_getPreGroupedRowModel, table_getPrePaginatedRowModel, table_getPreSelectedRowModel, table_getPreSortedRowModel, table_getRow, table_getRowCount, table_getRowId, table_getRowModel, table_getRowsInDisplayOrder, table_getSelectedCellCount, table_getSelectedCellIds, table_getSelectedCellRangesData, table_getSelectedRowIds, table_getSelectedRowModel, table_getSortedRowModel, table_getStartFlatHeaders, table_getStartFooterGroups, table_getStartHeaderGroups, table_getStartLeafColumns, table_getStartLeafHeaders, table_getStartTotalSize, table_getStartVisibleLeafColumns, table_getToggleAllColumnsVisibilityHandler, table_getToggleAllPageRowsSelectedHandler, table_getToggleAllRowsExpandedHandler, table_getToggleAllRowsSelectedHandler, table_getTopRows, table_getTotalSize, table_getVisibleFlatColumns, table_getVisibleLeafColumns, table_lastPage, table_mergeOptions, table_moveCellSelection, table_nextPage, table_previousPage, table_publishExternalState, table_reset, table_resetCellSelection, table_resetColumnFilters, table_resetColumnOrder, table_resetColumnPinning, table_resetColumnSizing, table_resetColumnVisibility, table_resetExpanded, table_resetGlobalFilter, table_resetGrouping, table_resetHeaderSizeInfo, table_resetPageIndex, table_resetPageSize, table_resetPagination, table_resetRowPinning, table_resetRowSelection, table_resetSorting, table_selectAllCells, table_selectCellRange, table_setCellSelection, table_setColumnFilters, table_setColumnOrder, table_setColumnPinning, table_setColumnResizing, table_setColumnSizing, table_setColumnVisibility, table_setExpanded, table_setFocusedCell, table_setGlobalFilter, table_setGrouping, table_setOptions, table_setPageIndex, table_setPageSize, table_setPagination, table_setRowPinning, table_setRowSelection, table_setSorting, table_syncExternalStateToBaseAtoms, table_toggleAllColumnsVisible, table_toggleAllPageRowsSelected, table_toggleAllRowsExpanded, table_toggleAllRowsSelected };
|
|
@@ -346,10 +346,13 @@ interface TableFeature {
|
|
|
346
346
|
* instance.
|
|
347
347
|
*
|
|
348
348
|
* This runs once during table construction after options, state atoms, and
|
|
349
|
-
* the store are available
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
349
|
+
* the store are available. Features are processed in a single pass in
|
|
350
|
+
* registration order, with each feature's instance data initialized just
|
|
351
|
+
* before its own `constructTableAPIs` hook, so this hook may rely on data
|
|
352
|
+
* and APIs of features registered earlier. Use `constructTableAPIs`
|
|
353
|
+
* exclusively for assigning table methods. Table resets do not rerun this
|
|
354
|
+
* hook; use `resetTableInstanceData` to clear transient instance data
|
|
355
|
+
* instead.
|
|
353
356
|
*/
|
|
354
357
|
initTableInstanceData?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table<TFeatures, TData>) => void;
|
|
355
358
|
/**
|
package/package.json
CHANGED
package/skills/core/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
metadata:
|
|
6
6
|
type: sub-skill
|
|
7
7
|
library: '@tanstack/table-core'
|
|
8
|
-
library_version: '9.0.0-beta.
|
|
8
|
+
library_version: '9.0.0-beta.61'
|
|
9
9
|
requires: ['core', 'table-features', 'typescript']
|
|
10
10
|
sources:
|
|
11
11
|
- 'TanStack/table:docs/framework/react/guide/custom-features.md'
|
package/skills/grouping/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
metadata:
|
|
6
6
|
type: lifecycle
|
|
7
7
|
library: '@tanstack/table-core'
|
|
8
|
-
library_version: '9.0.0-beta.
|
|
8
|
+
library_version: '9.0.0-beta.61'
|
|
9
9
|
requires: ['core', 'table-features', 'typescript']
|
|
10
10
|
sources:
|
|
11
11
|
- 'TanStack/table:docs/framework/react/guide/migrating.md'
|
package/skills/sorting/SKILL.md
CHANGED