@czi-sds/data-viz 0.18.0 → 0.19.0
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 +27 -311
- package/dist/index.cjs.d.ts +3384 -288
- package/dist/index.cjs.js +25175 -19748
- package/dist/index.esm.d.ts +3384 -288
- package/dist/index.esm.js +17885 -17304
- package/package.json +11 -12
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1,307 +1,3403 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { HTMLAttributes } from "react";
|
|
2
|
+
import React$1, { CSSProperties, HTMLAttributes } from "react";
|
|
3
3
|
import { DatasetComponentOption, ECharts, EChartsOption, ScatterSeriesOption } from "echarts";
|
|
4
|
-
import {
|
|
4
|
+
import { TooltipProps } from "@mui/material";
|
|
5
|
+
import { Theme, TypographyStyle } from "@mui/material/styles";
|
|
6
|
+
//#region src/core/HeatmapChart/hooks/utils.d.ts
|
|
5
7
|
interface CreateChartOptionsProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
height: number;
|
|
58
|
-
width: number;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Customize the style of each cell item when mouse hovers on it, such as color, border, opacity, etc.
|
|
62
|
-
* https://echarts.apache.org/en/option.html#series-scatter.emphasis
|
|
63
|
-
*/
|
|
64
|
-
emphasis?: ScatterSeriesOption["emphasis"];
|
|
65
|
-
/**
|
|
66
|
-
* The data for the x axis
|
|
67
|
-
* For example:
|
|
68
|
-
* [{ value: "gene1", textStyle: { color: "red" } }, "gene2", "gene3"]
|
|
69
|
-
*/
|
|
70
|
-
xAxisData: CategoryAxisData;
|
|
71
|
-
/**
|
|
72
|
-
* The data for the y axis
|
|
73
|
-
* For example:
|
|
74
|
-
* [{ value: "cellType1", textStyle: { color: "red" } }, "cellType2", "cellType3"]
|
|
75
|
-
*/
|
|
76
|
-
yAxisData: CategoryAxisData;
|
|
77
|
-
/**
|
|
78
|
-
* The width of the chart in pixels
|
|
79
|
-
*/
|
|
80
|
-
width: number;
|
|
81
|
-
/**
|
|
82
|
-
* The height of the chart in pixels
|
|
83
|
-
*/
|
|
8
|
+
/**
|
|
9
|
+
* Display reference line and axis value under mouse pointer
|
|
10
|
+
* https://echarts.apache.org/en/option.html#axisPointer
|
|
11
|
+
*/
|
|
12
|
+
axisPointer?: EChartsOption["axisPointer"];
|
|
13
|
+
/**
|
|
14
|
+
* The data array to be visualized
|
|
15
|
+
* The data point object shape can be whatever you like, but it must be consistent with the `encode` option
|
|
16
|
+
* For example, if the data point shape is:
|
|
17
|
+
* {
|
|
18
|
+
* geneIndex: 0,
|
|
19
|
+
* cellTypeIndex: 0,
|
|
20
|
+
* percentage: 0.5
|
|
21
|
+
* }
|
|
22
|
+
* and you want geneIndex to be encoded to x axis and cellTypeIndex to be encoded to y axis, then make sure your encode option is:
|
|
23
|
+
* encode: {
|
|
24
|
+
* x: 'geneIndex',
|
|
25
|
+
* y: 'cellTypeIndex'
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
data: DatasetComponentOption["source"];
|
|
29
|
+
/**
|
|
30
|
+
* The `dataZoom` prop is utilized for implementing zoom functionality within a
|
|
31
|
+
* specific area of the chart. This feature empowers users to inspect data in
|
|
32
|
+
* granular detail, obtain an overview of the entire dataset, or eliminate
|
|
33
|
+
* outlier points.
|
|
34
|
+
* By applying the `dataZoom` prop while locking the zoom level, the chart
|
|
35
|
+
* efficiently renders a confined portion of the heatmap. This selective
|
|
36
|
+
* rendering strategy becomes especially advantageous when dealing with
|
|
37
|
+
* extensive datasets. Instead of rendering the entire heatmap at once,
|
|
38
|
+
* the chart dynamically loads and renders specific segments as the user
|
|
39
|
+
* scrolls through the data. This approach optimizes performance and enables
|
|
40
|
+
* the creation of heatmaps with large amounts of data.
|
|
41
|
+
* https://echarts.apache.org/en/option.html#dataZoom
|
|
42
|
+
*/
|
|
43
|
+
dataZoom?: EChartsOption["dataZoom"];
|
|
44
|
+
/**
|
|
45
|
+
* The `camera` prop is utilized for implementing camera view port functionality
|
|
46
|
+
* within a specific area of the chart. This feature empowers users to render
|
|
47
|
+
* a confined portion of the heatmap. This selective rendering strategy becomes
|
|
48
|
+
* especially advantageous when dealing with extensive datasets. Instead of
|
|
49
|
+
* rendering the entire heatmap at once, the chart dynamically loads and renders
|
|
50
|
+
* specific segments as the user scrolls through the data. This approach optimizes
|
|
51
|
+
* performance and enables the creation of heatmaps with large amounts of data.
|
|
52
|
+
*
|
|
53
|
+
* The `height` and `width` properties are used to specify the dimensions of the
|
|
54
|
+
* camera view port. The `active` property is used to enable or disable the camera
|
|
55
|
+
* view port functionality.
|
|
56
|
+
*/
|
|
57
|
+
camera?: {
|
|
58
|
+
active: boolean;
|
|
84
59
|
height: number;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
60
|
+
width: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Customize the style of each cell item when mouse hovers on it, such as color, border, opacity, etc.
|
|
64
|
+
* https://echarts.apache.org/en/option.html#series-scatter.emphasis
|
|
65
|
+
*/
|
|
66
|
+
emphasis?: ScatterSeriesOption["emphasis"];
|
|
67
|
+
/**
|
|
68
|
+
* The data for the x axis
|
|
69
|
+
* For example:
|
|
70
|
+
* [{ value: "gene1", textStyle: { color: "red" } }, "gene2", "gene3"]
|
|
71
|
+
*/
|
|
72
|
+
xAxisData: CategoryAxisData;
|
|
73
|
+
/**
|
|
74
|
+
* The data for the y axis
|
|
75
|
+
* For example:
|
|
76
|
+
* [{ value: "cellType1", textStyle: { color: "red" } }, "cellType2", "cellType3"]
|
|
77
|
+
*/
|
|
78
|
+
yAxisData: CategoryAxisData;
|
|
79
|
+
/**
|
|
80
|
+
* The width of the chart in pixels
|
|
81
|
+
*/
|
|
82
|
+
width: number;
|
|
83
|
+
/**
|
|
84
|
+
* The height of the chart in pixels
|
|
85
|
+
*/
|
|
86
|
+
height: number;
|
|
87
|
+
/**
|
|
88
|
+
* Provide a mapping of data key to x/y axis encoding
|
|
89
|
+
* For example, if the data is:
|
|
90
|
+
* {
|
|
91
|
+
* geneIndex: 0,
|
|
92
|
+
* cellTypeIndex: 0,
|
|
93
|
+
* percentage: 0.5
|
|
94
|
+
* }
|
|
95
|
+
* and we want to encode `geneIndex` to x axis and `cellTypeIndex` to y axis, then
|
|
96
|
+
* encode: {
|
|
97
|
+
* x: 'geneIndex',
|
|
98
|
+
* y: 'cellTypeIndex'
|
|
99
|
+
* }
|
|
100
|
+
* https://echarts.apache.org/en/option.html#series-scatter.encode
|
|
101
|
+
*/
|
|
102
|
+
encode?: {
|
|
103
|
+
x: string;
|
|
104
|
+
y: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Customize the style of each cell item, such as color, border, opacity, etc.
|
|
108
|
+
* https://echarts.apache.org/en/option.html#series-scatter.itemStyle
|
|
109
|
+
*/
|
|
110
|
+
itemStyle?: ScatterSeriesOption["itemStyle"];
|
|
111
|
+
/**
|
|
112
|
+
* The shape of the symbol.
|
|
113
|
+
*/
|
|
114
|
+
symbol?: "circle" | "rect" | "roundRect";
|
|
115
|
+
/**
|
|
116
|
+
* `symbolSize` can be set to single numbers like 10, or use an array to represent width and height. For example, [20, 10] means symbol width is 20, and height is 10.
|
|
117
|
+
*
|
|
118
|
+
* If size of symbols needs to be different, you can set with callback function in the following format:
|
|
119
|
+
*
|
|
120
|
+
* (value: Array|number, params: Object) => number|Array
|
|
121
|
+
*
|
|
122
|
+
* The first parameter value is the value in data, and the second parameter params is the rest parameters of data item.
|
|
123
|
+
* https://echarts.apache.org/en/option.html#series-scatter.symbolSize
|
|
124
|
+
*/
|
|
125
|
+
symbolSize?: ScatterSeriesOption["symbolSize"];
|
|
126
|
+
/**
|
|
127
|
+
* https://echarts.apache.org/en/option.html#grid
|
|
128
|
+
*/
|
|
129
|
+
grid?: EChartsOption["grid"] | ((defaultOption: EChartsOption["grid"]) => EChartsOption["grid"]);
|
|
130
|
+
/**
|
|
131
|
+
* The options object to be passed to echarts.setOption()
|
|
132
|
+
* https://echarts.apache.org/en/option.html
|
|
133
|
+
*/
|
|
134
|
+
options?: EChartsOption;
|
|
135
|
+
/**
|
|
136
|
+
* Event listeners for the chart
|
|
137
|
+
* https://echarts.apache.org/en/api.html#events
|
|
138
|
+
*/
|
|
139
|
+
onEvents?: Record<string, (event: unknown, chart: ECharts) => void>;
|
|
138
140
|
}
|
|
139
141
|
type OrdinalRawValue = string | number;
|
|
140
142
|
/**
|
|
141
143
|
* (thuang): This copies echarts' CategoryAxisBaseOption["data"] type, since it's not exported
|
|
142
144
|
*/
|
|
143
145
|
type CategoryAxisData = (OrdinalRawValue | {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
value: OrdinalRawValue;
|
|
147
|
+
/**
|
|
148
|
+
* (thuang): This should be echarts `TextCommonOption` type, but it's not exported
|
|
149
|
+
*/
|
|
150
|
+
textStyle?: never;
|
|
149
151
|
})[];
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/core/HeatmapChart/index.d.ts
|
|
150
154
|
interface HeatmapChartProps extends HTMLAttributes<HTMLDivElement>, CreateChartOptionsProps {
|
|
151
|
-
|
|
155
|
+
echartsRendererMode?: "svg" | "canvas";
|
|
152
156
|
}
|
|
153
157
|
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<HeatmapChartProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/utils.d.ts
|
|
160
|
+
type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
161
|
+
type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
162
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
163
|
+
type Getter<TValue> = <TTValue = TValue>() => NoInfer<TTValue>;
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/core/table.d.ts
|
|
166
|
+
interface CoreTableState {}
|
|
167
|
+
interface CoreOptions<TData extends RowData> {
|
|
168
|
+
/**
|
|
169
|
+
* An array of extra features that you can add to the table instance.
|
|
170
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#_features)
|
|
171
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
172
|
+
*/
|
|
173
|
+
_features?: TableFeature[];
|
|
174
|
+
/**
|
|
175
|
+
* Set this option to override any of the `autoReset...` feature options.
|
|
176
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#autoresetall)
|
|
177
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
178
|
+
*/
|
|
179
|
+
autoResetAll?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* The array of column defs to use for the table.
|
|
182
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#columns)
|
|
183
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
184
|
+
*/
|
|
185
|
+
columns: ColumnDef<TData, any>[];
|
|
186
|
+
/**
|
|
187
|
+
* The data for the table to display. This array should match the type you provided to `table.setRowType<...>`. Columns can access this data via string/index or a functional accessor. When the `data` option changes reference, the table will reprocess the data.
|
|
188
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#data)
|
|
189
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
190
|
+
*/
|
|
191
|
+
data: TData[];
|
|
192
|
+
/**
|
|
193
|
+
* Set this option to `true` to output all debugging information to the console.
|
|
194
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugall)
|
|
195
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
196
|
+
*/
|
|
197
|
+
debugAll?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Set this option to `true` to output cell debugging information to the console.
|
|
200
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugcells]
|
|
201
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
202
|
+
*/
|
|
203
|
+
debugCells?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Set this option to `true` to output column debugging information to the console.
|
|
206
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugcolumns)
|
|
207
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
208
|
+
*/
|
|
209
|
+
debugColumns?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Set this option to `true` to output header debugging information to the console.
|
|
212
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugheaders)
|
|
213
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
214
|
+
*/
|
|
215
|
+
debugHeaders?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Set this option to `true` to output row debugging information to the console.
|
|
218
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugrows)
|
|
219
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
220
|
+
*/
|
|
221
|
+
debugRows?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Set this option to `true` to output table debugging information to the console.
|
|
224
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugtable)
|
|
225
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
226
|
+
*/
|
|
227
|
+
debugTable?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Default column options to use for all column defs supplied to the table.
|
|
230
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#defaultcolumn)
|
|
231
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
232
|
+
*/
|
|
233
|
+
defaultColumn?: Partial<ColumnDef<TData, unknown>>;
|
|
234
|
+
/**
|
|
235
|
+
* This required option is a factory for a function that computes and returns the core row model for the table.
|
|
236
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getcorerowmodel)
|
|
237
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
238
|
+
*/
|
|
239
|
+
getCoreRowModel: (table: Table<any>) => () => RowModel<any>;
|
|
240
|
+
/**
|
|
241
|
+
* This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with `.` using their grandparents' index eg. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc.
|
|
242
|
+
* @example getRowId: row => row.userId
|
|
243
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getrowid)
|
|
244
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
245
|
+
*/
|
|
246
|
+
getRowId?: (originalRow: TData, index: number, parent?: Row<TData>) => string;
|
|
247
|
+
/**
|
|
248
|
+
* This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.
|
|
249
|
+
* @example getSubRows: row => row.subRows
|
|
250
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getsubrows)
|
|
251
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
252
|
+
*/
|
|
253
|
+
getSubRows?: (originalRow: TData, index: number) => undefined | TData[];
|
|
254
|
+
/**
|
|
255
|
+
* Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. `options.autoResetPageIndex`) or via functions like `table.resetRowSelection()`. Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state.
|
|
256
|
+
*
|
|
257
|
+
* Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable.
|
|
258
|
+
*
|
|
259
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#initialstate)
|
|
260
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
261
|
+
*/
|
|
262
|
+
initialState?: InitialTableState;
|
|
263
|
+
/**
|
|
264
|
+
* This option is used to optionally implement the merging of table options.
|
|
265
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#mergeoptions)
|
|
266
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
267
|
+
*/
|
|
268
|
+
mergeOptions?: (defaultOptions: TableOptions<TData>, options: Partial<TableOptions<TData>>) => TableOptions<TData>;
|
|
269
|
+
/**
|
|
270
|
+
* You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.
|
|
271
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#meta)
|
|
272
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
273
|
+
*/
|
|
274
|
+
meta?: TableMeta<TData>;
|
|
275
|
+
/**
|
|
276
|
+
* The `onStateChange` option can be used to optionally listen to state changes within the table.
|
|
277
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#onstatechange)
|
|
278
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
279
|
+
*/
|
|
280
|
+
onStateChange: (updater: Updater<TableState>) => void;
|
|
281
|
+
/**
|
|
282
|
+
* Value used when the desired value is not found in the data.
|
|
283
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#renderfallbackvalue)
|
|
284
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
285
|
+
*/
|
|
286
|
+
renderFallbackValue: any;
|
|
287
|
+
/**
|
|
288
|
+
* The `state` option can be used to optionally _control_ part or all of the table state. The state you pass here will merge with and overwrite the internal automatically-managed state to produce the final state for the table. You can also listen to state changes via the `onStateChange` option.
|
|
289
|
+
* > Note: Any state passed in here will override both the internal state and any other `initialState` you provide.
|
|
290
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#state)
|
|
291
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
292
|
+
*/
|
|
293
|
+
state: Partial<TableState>;
|
|
294
|
+
}
|
|
295
|
+
interface CoreInstance<TData extends RowData> {
|
|
296
|
+
_features: readonly TableFeature[];
|
|
297
|
+
_getAllFlatColumnsById: () => Record<string, Column<TData, unknown>>;
|
|
298
|
+
_getColumnDefs: () => ColumnDef<TData, unknown>[];
|
|
299
|
+
_getCoreRowModel?: () => RowModel<TData>;
|
|
300
|
+
_getDefaultColumnDef: () => Partial<ColumnDef<TData, unknown>>;
|
|
301
|
+
_getRowId: (_: TData, index: number, parent?: Row<TData>) => string;
|
|
302
|
+
_queue: (cb: () => void) => void;
|
|
303
|
+
/**
|
|
304
|
+
* Returns all columns in the table in their normalized and nested hierarchy.
|
|
305
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getallcolumns)
|
|
306
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
307
|
+
*/
|
|
308
|
+
getAllColumns: () => Column<TData, unknown>[];
|
|
309
|
+
/**
|
|
310
|
+
* Returns all columns in the table flattened to a single level.
|
|
311
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getallflatcolumns)
|
|
312
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
313
|
+
*/
|
|
314
|
+
getAllFlatColumns: () => Column<TData, unknown>[];
|
|
315
|
+
/**
|
|
316
|
+
* Returns all leaf-node columns in the table flattened to a single level. This does not include parent columns.
|
|
317
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getallleafcolumns)
|
|
318
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
319
|
+
*/
|
|
320
|
+
getAllLeafColumns: () => Column<TData, unknown>[];
|
|
321
|
+
/**
|
|
322
|
+
* Returns a single column by its ID.
|
|
323
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getcolumn)
|
|
324
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
325
|
+
*/
|
|
326
|
+
getColumn: (columnId: string) => Column<TData, unknown> | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* Returns the core row model before any processing has been applied.
|
|
329
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getcorerowmodel)
|
|
330
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
331
|
+
*/
|
|
332
|
+
getCoreRowModel: () => RowModel<TData>;
|
|
333
|
+
/**
|
|
334
|
+
* Returns the row with the given ID.
|
|
335
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getrow)
|
|
336
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
337
|
+
*/
|
|
338
|
+
getRow: (id: string, searchAll?: boolean) => Row<TData>;
|
|
339
|
+
/**
|
|
340
|
+
* Returns the final model after all processing from other used features has been applied. This is the row model that is most commonly used for rendering.
|
|
341
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getrowmodel)
|
|
342
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
343
|
+
*/
|
|
344
|
+
getRowModel: () => RowModel<TData>;
|
|
345
|
+
/**
|
|
346
|
+
* Call this function to get the table's current state. It's recommended to use this function and its state, especially when managing the table state manually. It is the exact same state used internally by the table for every feature and function it provides.
|
|
347
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#getstate)
|
|
348
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
349
|
+
*/
|
|
350
|
+
getState: () => TableState;
|
|
351
|
+
/**
|
|
352
|
+
* This is the resolved initial state of the table.
|
|
353
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#initialstate)
|
|
354
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
355
|
+
*/
|
|
356
|
+
initialState: TableState;
|
|
357
|
+
/**
|
|
358
|
+
* A read-only reference to the table's current options.
|
|
359
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#options)
|
|
360
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
361
|
+
*/
|
|
362
|
+
options: RequiredKeys<TableOptionsResolved<TData>, 'state'>;
|
|
363
|
+
/**
|
|
364
|
+
* Call this function to reset the table state to the initial state.
|
|
365
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#reset)
|
|
366
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
367
|
+
*/
|
|
368
|
+
reset: () => void;
|
|
369
|
+
/**
|
|
370
|
+
* This function can be used to update the table options.
|
|
371
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#setoptions)
|
|
372
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
373
|
+
*/
|
|
374
|
+
setOptions: (newOptions: Updater<TableOptionsResolved<TData>>) => void;
|
|
375
|
+
/**
|
|
376
|
+
* Call this function to update the table state.
|
|
377
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#setstate)
|
|
378
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
|
|
379
|
+
*/
|
|
380
|
+
setState: (updater: Updater<TableState>) => void;
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnVisibility.d.ts
|
|
384
|
+
type VisibilityState = Record<string, boolean>;
|
|
385
|
+
interface VisibilityTableState {
|
|
386
|
+
columnVisibility: VisibilityState;
|
|
387
|
+
}
|
|
388
|
+
interface VisibilityOptions {
|
|
389
|
+
/**
|
|
390
|
+
* Whether to enable column hiding. Defaults to `true`.
|
|
391
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#enablehiding)
|
|
392
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
393
|
+
*/
|
|
394
|
+
enableHiding?: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnVisibility` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
397
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#oncolumnvisibilitychange)
|
|
398
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
399
|
+
*/
|
|
400
|
+
onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
|
|
401
|
+
}
|
|
402
|
+
interface VisibilityInstance<TData extends RowData> {
|
|
403
|
+
/**
|
|
404
|
+
* If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table.
|
|
405
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getcentervisibleleafcolumns)
|
|
406
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
407
|
+
*/
|
|
408
|
+
getCenterVisibleLeafColumns: () => Column<TData, unknown>[];
|
|
409
|
+
/**
|
|
410
|
+
* Returns whether all columns are visible
|
|
411
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getisallcolumnsvisible)
|
|
412
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
413
|
+
*/
|
|
414
|
+
getIsAllColumnsVisible: () => boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Returns whether any columns are visible
|
|
417
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getissomecolumnsvisible)
|
|
418
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
419
|
+
*/
|
|
420
|
+
getIsSomeColumnsVisible: () => boolean;
|
|
421
|
+
/**
|
|
422
|
+
* If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table.
|
|
423
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getleftvisibleleafcolumns)
|
|
424
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
425
|
+
*/
|
|
426
|
+
getLeftVisibleLeafColumns: () => Column<TData, unknown>[];
|
|
427
|
+
/**
|
|
428
|
+
* If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table.
|
|
429
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getrightvisibleleafcolumns)
|
|
430
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
431
|
+
*/
|
|
432
|
+
getRightVisibleLeafColumns: () => Column<TData, unknown>[];
|
|
433
|
+
/**
|
|
434
|
+
* Returns a handler for toggling the visibility of all columns, meant to be bound to a `input[type=checkbox]` element.
|
|
435
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#gettoggleallcolumnsvisibilityhandler)
|
|
436
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
437
|
+
*/
|
|
438
|
+
getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void;
|
|
439
|
+
/**
|
|
440
|
+
* Returns a flat array of columns that are visible, including parent columns.
|
|
441
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getvisibleflatcolumns)
|
|
442
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
443
|
+
*/
|
|
444
|
+
getVisibleFlatColumns: () => Column<TData, unknown>[];
|
|
445
|
+
/**
|
|
446
|
+
* Returns a flat array of leaf-node columns that are visible.
|
|
447
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getvisibleleafcolumns)
|
|
448
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
449
|
+
*/
|
|
450
|
+
getVisibleLeafColumns: () => Column<TData, unknown>[];
|
|
451
|
+
/**
|
|
452
|
+
* Resets the column visibility state to the initial state. If `defaultState` is provided, the state will be reset to `{}`
|
|
453
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#resetcolumnvisibility)
|
|
454
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
455
|
+
*/
|
|
456
|
+
resetColumnVisibility: (defaultState?: boolean) => void;
|
|
457
|
+
/**
|
|
458
|
+
* Sets or updates the `state.columnVisibility` state.
|
|
459
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#setcolumnvisibility)
|
|
460
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
461
|
+
*/
|
|
462
|
+
setColumnVisibility: (updater: Updater<VisibilityState>) => void;
|
|
463
|
+
/**
|
|
464
|
+
* Toggles the visibility of all columns.
|
|
465
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#toggleallcolumnsvisible)
|
|
466
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
467
|
+
*/
|
|
468
|
+
toggleAllColumnsVisible: (value?: boolean) => void;
|
|
469
|
+
}
|
|
470
|
+
interface VisibilityColumnDef {
|
|
471
|
+
enableHiding?: boolean;
|
|
472
|
+
}
|
|
473
|
+
interface VisibilityRow<TData extends RowData> {
|
|
474
|
+
_getAllVisibleCells: () => Cell<TData, unknown>[];
|
|
475
|
+
/**
|
|
476
|
+
* Returns an array of cells that account for column visibility for the row.
|
|
477
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getvisiblecells)
|
|
478
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
479
|
+
*/
|
|
480
|
+
getVisibleCells: () => Cell<TData, unknown>[];
|
|
481
|
+
}
|
|
482
|
+
interface VisibilityColumn {
|
|
483
|
+
/**
|
|
484
|
+
* Returns whether the column can be hidden
|
|
485
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getcanhide)
|
|
486
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
487
|
+
*/
|
|
488
|
+
getCanHide: () => boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Returns whether the column is visible
|
|
491
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#getisvisible)
|
|
492
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
493
|
+
*/
|
|
494
|
+
getIsVisible: () => boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to a checkbox.
|
|
497
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#gettogglevisibilityhandler)
|
|
498
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
499
|
+
*/
|
|
500
|
+
getToggleVisibilityHandler: () => (event: unknown) => void;
|
|
501
|
+
/**
|
|
502
|
+
* Toggles the visibility of the column.
|
|
503
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#togglevisibility)
|
|
504
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
505
|
+
*/
|
|
506
|
+
toggleVisibility: (value?: boolean) => void;
|
|
507
|
+
}
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnOrdering.d.ts
|
|
510
|
+
interface ColumnOrderTableState {
|
|
511
|
+
columnOrder: ColumnOrderState;
|
|
512
|
+
}
|
|
513
|
+
type ColumnOrderState = string[];
|
|
514
|
+
interface ColumnOrderOptions {
|
|
515
|
+
/**
|
|
516
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnOrder` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
517
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#oncolumnorderchange)
|
|
518
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
519
|
+
*/
|
|
520
|
+
onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
|
|
521
|
+
}
|
|
522
|
+
interface ColumnOrderColumn {
|
|
523
|
+
/**
|
|
524
|
+
* Returns the index of the column in the order of the visible columns. Optionally pass a `position` parameter to get the index of the column in a sub-section of the table
|
|
525
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#getindex)
|
|
526
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
527
|
+
*/
|
|
528
|
+
getIndex: (position?: ColumnPinningPosition | 'center') => number;
|
|
529
|
+
/**
|
|
530
|
+
* Returns `true` if the column is the first column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the first in a sub-section of the table.
|
|
531
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#getisfirstcolumn)
|
|
532
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
533
|
+
*/
|
|
534
|
+
getIsFirstColumn: (position?: ColumnPinningPosition | 'center') => boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Returns `true` if the column is the last column in the order of the visible columns. Optionally pass a `position` parameter to check if the column is the last in a sub-section of the table.
|
|
537
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#getislastcolumn)
|
|
538
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
539
|
+
*/
|
|
540
|
+
getIsLastColumn: (position?: ColumnPinningPosition | 'center') => boolean;
|
|
541
|
+
}
|
|
542
|
+
interface ColumnOrderInstance<TData extends RowData> {
|
|
543
|
+
_getOrderColumnsFn: () => (columns: Column<TData, unknown>[]) => Column<TData, unknown>[];
|
|
544
|
+
/**
|
|
545
|
+
* Resets the **columnOrder** state to `initialState.columnOrder`, or `true` can be passed to force a default blank state reset to `[]`.
|
|
546
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#resetcolumnorder)
|
|
547
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
548
|
+
*/
|
|
549
|
+
resetColumnOrder: (defaultState?: boolean) => void;
|
|
550
|
+
/**
|
|
551
|
+
* Sets or updates the `state.columnOrder` state.
|
|
552
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-ordering#setcolumnorder)
|
|
553
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-ordering)
|
|
554
|
+
*/
|
|
555
|
+
setColumnOrder: (updater: Updater<ColumnOrderState>) => void;
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnPinning.d.ts
|
|
559
|
+
type ColumnPinningPosition = false | 'left' | 'right';
|
|
560
|
+
interface ColumnPinningState {
|
|
561
|
+
left?: string[];
|
|
562
|
+
right?: string[];
|
|
563
|
+
}
|
|
564
|
+
interface ColumnPinningTableState {
|
|
565
|
+
columnPinning: ColumnPinningState;
|
|
566
|
+
}
|
|
567
|
+
interface ColumnPinningOptions {
|
|
568
|
+
/**
|
|
569
|
+
* Enables/disables column pinning for the table. Defaults to `true`.
|
|
570
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#enablecolumnpinning)
|
|
571
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
572
|
+
*/
|
|
573
|
+
enableColumnPinning?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* @deprecated Use `enableColumnPinning` or `enableRowPinning` instead.
|
|
576
|
+
* Enables/disables all pinning for the table. Defaults to `true`.
|
|
577
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#enablepinning)
|
|
578
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
579
|
+
*/
|
|
580
|
+
enablePinning?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnPinning` changes. This overrides the default internal state management, so you will also need to supply `state.columnPinning` from your own managed state.
|
|
583
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#oncolumnpinningchange)
|
|
584
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/oncolumnpinningchange)
|
|
585
|
+
*/
|
|
586
|
+
onColumnPinningChange?: OnChangeFn<ColumnPinningState>;
|
|
587
|
+
}
|
|
588
|
+
interface ColumnPinningColumnDef {
|
|
589
|
+
/**
|
|
590
|
+
* Enables/disables column pinning for this column. Defaults to `true`.
|
|
591
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#enablepinning-1)
|
|
592
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
593
|
+
*/
|
|
594
|
+
enablePinning?: boolean;
|
|
595
|
+
}
|
|
596
|
+
interface ColumnPinningColumn {
|
|
597
|
+
/**
|
|
598
|
+
* Returns whether or not the column can be pinned.
|
|
599
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getcanpin)
|
|
600
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
601
|
+
*/
|
|
602
|
+
getCanPin: () => boolean;
|
|
603
|
+
/**
|
|
604
|
+
* Returns the pinned position of the column. (`'left'`, `'right'` or `false`)
|
|
605
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getispinned)
|
|
606
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
607
|
+
*/
|
|
608
|
+
getIsPinned: () => ColumnPinningPosition;
|
|
609
|
+
/**
|
|
610
|
+
* Returns the numeric pinned index of the column within a pinned column group.
|
|
611
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getpinnedindex)
|
|
612
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
613
|
+
*/
|
|
614
|
+
getPinnedIndex: () => number;
|
|
615
|
+
/**
|
|
616
|
+
* Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed.
|
|
617
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#pin)
|
|
618
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
619
|
+
*/
|
|
620
|
+
pin: (position: ColumnPinningPosition) => void;
|
|
621
|
+
}
|
|
622
|
+
interface ColumnPinningRow<TData extends RowData> {
|
|
623
|
+
/**
|
|
624
|
+
* Returns all center pinned (unpinned) leaf cells in the row.
|
|
625
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getcentervisiblecells)
|
|
626
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
627
|
+
*/
|
|
628
|
+
getCenterVisibleCells: () => Cell<TData, unknown>[];
|
|
629
|
+
/**
|
|
630
|
+
* Returns all left pinned leaf cells in the row.
|
|
631
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getleftvisiblecells)
|
|
632
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
633
|
+
*/
|
|
634
|
+
getLeftVisibleCells: () => Cell<TData, unknown>[];
|
|
635
|
+
/**
|
|
636
|
+
* Returns all right pinned leaf cells in the row.
|
|
637
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getrightvisiblecells)
|
|
638
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
639
|
+
*/
|
|
640
|
+
getRightVisibleCells: () => Cell<TData, unknown>[];
|
|
641
|
+
}
|
|
642
|
+
interface ColumnPinningInstance<TData extends RowData> {
|
|
643
|
+
/**
|
|
644
|
+
* Returns all center pinned (unpinned) leaf columns.
|
|
645
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getcenterleafcolumns)
|
|
646
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
647
|
+
*/
|
|
648
|
+
getCenterLeafColumns: () => Column<TData, unknown>[];
|
|
649
|
+
/**
|
|
650
|
+
* Returns whether or not any columns are pinned. Optionally specify to only check for pinned columns in either the `left` or `right` position.
|
|
651
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getissomecolumnspinned)
|
|
652
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
653
|
+
*/
|
|
654
|
+
getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean;
|
|
655
|
+
/**
|
|
656
|
+
* Returns all left pinned leaf columns.
|
|
657
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getleftleafcolumns)
|
|
658
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
659
|
+
*/
|
|
660
|
+
getLeftLeafColumns: () => Column<TData, unknown>[];
|
|
661
|
+
/**
|
|
662
|
+
* Returns all right pinned leaf columns.
|
|
663
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#getrightleafcolumns)
|
|
664
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
665
|
+
*/
|
|
666
|
+
getRightLeafColumns: () => Column<TData, unknown>[];
|
|
667
|
+
/**
|
|
668
|
+
* Resets the **columnPinning** state to `initialState.columnPinning`, or `true` can be passed to force a default blank state reset to `{ left: [], right: [], }`.
|
|
669
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#resetcolumnpinning)
|
|
670
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
671
|
+
*/
|
|
672
|
+
resetColumnPinning: (defaultState?: boolean) => void;
|
|
673
|
+
/**
|
|
674
|
+
* Sets or updates the `state.columnPinning` state.
|
|
675
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#setcolumnpinning)
|
|
676
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
677
|
+
*/
|
|
678
|
+
setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
679
|
+
}
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/RowPinning.d.ts
|
|
682
|
+
type RowPinningPosition = false | 'top' | 'bottom';
|
|
683
|
+
interface RowPinningState {
|
|
684
|
+
bottom?: string[];
|
|
685
|
+
top?: string[];
|
|
686
|
+
}
|
|
687
|
+
interface RowPinningTableState {
|
|
688
|
+
rowPinning: RowPinningState;
|
|
689
|
+
}
|
|
690
|
+
interface RowPinningOptions<TData extends RowData> {
|
|
691
|
+
/**
|
|
692
|
+
* Enables/disables row pinning for the table. Defaults to `true`.
|
|
693
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#enablerowpinning)
|
|
694
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
695
|
+
*/
|
|
696
|
+
enableRowPinning?: boolean | ((row: Row<TData>) => boolean);
|
|
697
|
+
/**
|
|
698
|
+
* When `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`.
|
|
699
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#keeppinnedrows)
|
|
700
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
701
|
+
*/
|
|
702
|
+
keepPinnedRows?: boolean;
|
|
703
|
+
/**
|
|
704
|
+
* If provided, this function will be called with an `updaterFn` when `state.rowPinning` changes. This overrides the default internal state management, so you will also need to supply `state.rowPinning` from your own managed state.
|
|
705
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#onrowpinningchange)
|
|
706
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/onrowpinningchange)
|
|
707
|
+
*/
|
|
708
|
+
onRowPinningChange?: OnChangeFn<RowPinningState>;
|
|
709
|
+
}
|
|
710
|
+
interface RowPinningRow {
|
|
711
|
+
/**
|
|
712
|
+
* Returns whether or not the row can be pinned.
|
|
713
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getcanpin-1)
|
|
714
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
715
|
+
*/
|
|
716
|
+
getCanPin: () => boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`)
|
|
719
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getispinned-1)
|
|
720
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
721
|
+
*/
|
|
722
|
+
getIsPinned: () => RowPinningPosition;
|
|
723
|
+
/**
|
|
724
|
+
* Returns the numeric pinned index of the row within a pinned row group.
|
|
725
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getpinnedindex-1)
|
|
726
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
727
|
+
*/
|
|
728
|
+
getPinnedIndex: () => number;
|
|
729
|
+
/**
|
|
730
|
+
* Pins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed.
|
|
731
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#pin-1)
|
|
732
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
733
|
+
*/
|
|
734
|
+
pin: (position: RowPinningPosition, includeLeafRows?: boolean, includeParentRows?: boolean) => void;
|
|
735
|
+
}
|
|
736
|
+
interface RowPinningInstance<TData extends RowData> {
|
|
737
|
+
_getPinnedRows: (visiblePinnedRows: Array<Row<TData>>, pinnedRowIds: Array<string> | undefined, position: 'top' | 'bottom') => Row<TData>[];
|
|
738
|
+
/**
|
|
739
|
+
* Returns all bottom pinned rows.
|
|
740
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getbottomrows)
|
|
741
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
742
|
+
*/
|
|
743
|
+
getBottomRows: () => Row<TData>[];
|
|
744
|
+
/**
|
|
745
|
+
* Returns all rows that are not pinned to the top or bottom.
|
|
746
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getcenterrows)
|
|
747
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
748
|
+
*/
|
|
749
|
+
getCenterRows: () => Row<TData>[];
|
|
750
|
+
/**
|
|
751
|
+
* Returns whether or not any rows are pinned. Optionally specify to only check for pinned rows in either the `top` or `bottom` position.
|
|
752
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#getissomerowspinned)
|
|
753
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
754
|
+
*/
|
|
755
|
+
getIsSomeRowsPinned: (position?: RowPinningPosition) => boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Returns all top pinned rows.
|
|
758
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#gettoprows)
|
|
759
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
760
|
+
*/
|
|
761
|
+
getTopRows: () => Row<TData>[];
|
|
762
|
+
/**
|
|
763
|
+
* Resets the **rowPinning** state to `initialState.rowPinning`, or `true` can be passed to force a default blank state reset to `{ top: [], bottom: [], }`.
|
|
764
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#resetrowpinning)
|
|
765
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
766
|
+
*/
|
|
767
|
+
resetRowPinning: (defaultState?: boolean) => void;
|
|
768
|
+
/**
|
|
769
|
+
* Sets or updates the `state.rowPinning` state.
|
|
770
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#setrowpinning)
|
|
771
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
772
|
+
*/
|
|
773
|
+
setRowPinning: (updater: Updater<RowPinningState>) => void;
|
|
774
|
+
}
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/core/headers.d.ts
|
|
777
|
+
interface CoreHeaderGroup<TData extends RowData> {
|
|
778
|
+
depth: number;
|
|
779
|
+
headers: Header<TData, unknown>[];
|
|
780
|
+
id: string;
|
|
781
|
+
}
|
|
782
|
+
interface HeaderContext<TData, TValue> {
|
|
783
|
+
/**
|
|
784
|
+
* An instance of a column.
|
|
785
|
+
*/
|
|
786
|
+
column: Column<TData, TValue>;
|
|
787
|
+
/**
|
|
788
|
+
* An instance of a header.
|
|
789
|
+
*/
|
|
790
|
+
header: Header<TData, TValue>;
|
|
791
|
+
/**
|
|
792
|
+
* The table instance.
|
|
793
|
+
*/
|
|
794
|
+
table: Table<TData>;
|
|
795
|
+
}
|
|
796
|
+
interface CoreHeader<TData extends RowData, TValue> {
|
|
797
|
+
/**
|
|
798
|
+
* The col-span for the header.
|
|
799
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#colspan)
|
|
800
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
801
|
+
*/
|
|
802
|
+
colSpan: number;
|
|
803
|
+
/**
|
|
804
|
+
* The header's associated column object.
|
|
805
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#column)
|
|
806
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
807
|
+
*/
|
|
808
|
+
column: Column<TData, TValue>;
|
|
809
|
+
/**
|
|
810
|
+
* The depth of the header, zero-indexed based.
|
|
811
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#depth)
|
|
812
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
813
|
+
*/
|
|
814
|
+
depth: number;
|
|
815
|
+
/**
|
|
816
|
+
* Returns the rendering context (or props) for column-based components like headers, footers and filters.
|
|
817
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#getcontext)
|
|
818
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
819
|
+
*/
|
|
820
|
+
getContext: () => HeaderContext<TData, TValue>;
|
|
821
|
+
/**
|
|
822
|
+
* Returns the leaf headers hierarchically nested under this header.
|
|
823
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#getleafheaders)
|
|
824
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
825
|
+
*/
|
|
826
|
+
getLeafHeaders: () => Header<TData, unknown>[];
|
|
827
|
+
/**
|
|
828
|
+
* The header's associated header group object.
|
|
829
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#headergroup)
|
|
830
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
831
|
+
*/
|
|
832
|
+
headerGroup: HeaderGroup<TData>;
|
|
833
|
+
/**
|
|
834
|
+
* The unique identifier for the header.
|
|
835
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#id)
|
|
836
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
837
|
+
*/
|
|
838
|
+
id: string;
|
|
839
|
+
/**
|
|
840
|
+
* The index for the header within the header group.
|
|
841
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#index)
|
|
842
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
843
|
+
*/
|
|
844
|
+
index: number;
|
|
845
|
+
/**
|
|
846
|
+
* A boolean denoting if the header is a placeholder header.
|
|
847
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#isplaceholder)
|
|
848
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
849
|
+
*/
|
|
850
|
+
isPlaceholder: boolean;
|
|
851
|
+
/**
|
|
852
|
+
* If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.
|
|
853
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#placeholderid)
|
|
854
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
855
|
+
*/
|
|
856
|
+
placeholderId?: string;
|
|
857
|
+
/**
|
|
858
|
+
* The row-span for the header.
|
|
859
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#rowspan)
|
|
860
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
861
|
+
*/
|
|
862
|
+
rowSpan: number;
|
|
863
|
+
/**
|
|
864
|
+
* The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.
|
|
865
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#subheaders)
|
|
866
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
867
|
+
*/
|
|
868
|
+
subHeaders: Header<TData, TValue>[];
|
|
869
|
+
}
|
|
870
|
+
interface HeadersInstance<TData extends RowData> {
|
|
871
|
+
/**
|
|
872
|
+
* Returns all header groups for the table.
|
|
873
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getheadergroups)
|
|
874
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
875
|
+
*/
|
|
876
|
+
getHeaderGroups: () => HeaderGroup<TData>[];
|
|
877
|
+
/**
|
|
878
|
+
* If pinning, returns the header groups for the left pinned columns.
|
|
879
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleftheadergroups)
|
|
880
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
881
|
+
*/
|
|
882
|
+
getLeftHeaderGroups: () => HeaderGroup<TData>[];
|
|
883
|
+
/**
|
|
884
|
+
* If pinning, returns the header groups for columns that are not pinned.
|
|
885
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getcenterheadergroups)
|
|
886
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
887
|
+
*/
|
|
888
|
+
getCenterHeaderGroups: () => HeaderGroup<TData>[];
|
|
889
|
+
/**
|
|
890
|
+
* If pinning, returns the header groups for the right pinned columns.
|
|
891
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getrightheadergroups)
|
|
892
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
893
|
+
*/
|
|
894
|
+
getRightHeaderGroups: () => HeaderGroup<TData>[];
|
|
895
|
+
/**
|
|
896
|
+
* Returns the footer groups for the table.
|
|
897
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getfootergroups)
|
|
898
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
899
|
+
*/
|
|
900
|
+
getFooterGroups: () => HeaderGroup<TData>[];
|
|
901
|
+
/**
|
|
902
|
+
* If pinning, returns the footer groups for the left pinned columns.
|
|
903
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleftfootergroups)
|
|
904
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
905
|
+
*/
|
|
906
|
+
getLeftFooterGroups: () => HeaderGroup<TData>[];
|
|
907
|
+
/**
|
|
908
|
+
* If pinning, returns the footer groups for columns that are not pinned.
|
|
909
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getcenterfootergroups)
|
|
910
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
911
|
+
*/
|
|
912
|
+
getCenterFooterGroups: () => HeaderGroup<TData>[];
|
|
913
|
+
/**
|
|
914
|
+
* If pinning, returns the footer groups for the right pinned columns.
|
|
915
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getrightfootergroups)
|
|
916
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
917
|
+
*/
|
|
918
|
+
getRightFooterGroups: () => HeaderGroup<TData>[];
|
|
919
|
+
/**
|
|
920
|
+
* Returns headers for all columns in the table, including parent headers.
|
|
921
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getflatheaders)
|
|
922
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
923
|
+
*/
|
|
924
|
+
getFlatHeaders: () => Header<TData, unknown>[];
|
|
925
|
+
/**
|
|
926
|
+
* If pinning, returns headers for all left pinned columns in the table, including parent headers.
|
|
927
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleftflatheaders)
|
|
928
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
929
|
+
*/
|
|
930
|
+
getLeftFlatHeaders: () => Header<TData, unknown>[];
|
|
931
|
+
/**
|
|
932
|
+
* If pinning, returns headers for all columns that are not pinned, including parent headers.
|
|
933
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getcenterflatheaders)
|
|
934
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
935
|
+
*/
|
|
936
|
+
getCenterFlatHeaders: () => Header<TData, unknown>[];
|
|
937
|
+
/**
|
|
938
|
+
* If pinning, returns headers for all right pinned columns in the table, including parent headers.
|
|
939
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getrightflatheaders)
|
|
940
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
941
|
+
*/
|
|
942
|
+
getRightFlatHeaders: () => Header<TData, unknown>[];
|
|
943
|
+
/**
|
|
944
|
+
* Returns headers for all leaf columns in the table, (not including parent headers).
|
|
945
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleafheaders)
|
|
946
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
947
|
+
*/
|
|
948
|
+
getLeafHeaders: () => Header<TData, unknown>[];
|
|
949
|
+
/**
|
|
950
|
+
* If pinning, returns headers for all left pinned leaf columns in the table, (not including parent headers).
|
|
951
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleftleafheaders)
|
|
952
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
953
|
+
*/
|
|
954
|
+
getLeftLeafHeaders: () => Header<TData, unknown>[];
|
|
955
|
+
/**
|
|
956
|
+
* If pinning, returns headers for all columns that are not pinned, (not including parent headers).
|
|
957
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getcenterleafheaders)
|
|
958
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
959
|
+
*/
|
|
960
|
+
getCenterLeafHeaders: () => Header<TData, unknown>[];
|
|
961
|
+
/**
|
|
962
|
+
* If pinning, returns headers for all right pinned leaf columns in the table, (not including parent headers).
|
|
963
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getrightleafheaders)
|
|
964
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
|
|
965
|
+
*/
|
|
966
|
+
getRightLeafHeaders: () => Header<TData, unknown>[];
|
|
967
|
+
}
|
|
968
|
+
//#endregion
|
|
969
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnFaceting.d.ts
|
|
970
|
+
interface FacetedColumn<TData extends RowData> {
|
|
971
|
+
_getFacetedMinMaxValues?: () => undefined | [number, number];
|
|
972
|
+
_getFacetedRowModel?: () => RowModel<TData>;
|
|
973
|
+
_getFacetedUniqueValues?: () => Map<any, number>;
|
|
974
|
+
/**
|
|
975
|
+
* A function that **computes and returns** a min/max tuple derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.
|
|
976
|
+
* > ⚠️ Requires that you pass a valid `getFacetedMinMaxValues` function to `options.getFacetedMinMaxValues`. A default implementation is provided via the exported `getFacetedMinMaxValues` function.
|
|
977
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfacetedminmaxvalues)
|
|
978
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
979
|
+
*/
|
|
980
|
+
getFacetedMinMaxValues: () => undefined | [number, number];
|
|
981
|
+
/**
|
|
982
|
+
* Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.
|
|
983
|
+
* > ⚠️ Requires that you pass a valid `getFacetedRowModel` function to `options.facetedRowModel`. A default implementation is provided via the exported `getFacetedRowModel` function.
|
|
984
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfacetedrowmodel)
|
|
985
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
986
|
+
*/
|
|
987
|
+
getFacetedRowModel: () => RowModel<TData>;
|
|
988
|
+
/**
|
|
989
|
+
* A function that **computes and returns** a `Map` of unique values and their occurrences derived from `column.getFacetedRowModel`. Useful for displaying faceted result values.
|
|
990
|
+
* > ⚠️ Requires that you pass a valid `getFacetedUniqueValues` function to `options.getFacetedUniqueValues`. A default implementation is provided via the exported `getFacetedUniqueValues` function.
|
|
991
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#getfaceteduniquevalues)
|
|
992
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
993
|
+
*/
|
|
994
|
+
getFacetedUniqueValues: () => Map<any, number>;
|
|
995
|
+
}
|
|
996
|
+
interface FacetedOptions<TData extends RowData> {
|
|
997
|
+
getFacetedMinMaxValues?: (table: Table<TData>, columnId: string) => () => undefined | [number, number];
|
|
998
|
+
getFacetedRowModel?: (table: Table<TData>, columnId: string) => () => RowModel<TData>;
|
|
999
|
+
getFacetedUniqueValues?: (table: Table<TData>, columnId: string) => () => Map<any, number>;
|
|
1000
|
+
}
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/GlobalFaceting.d.ts
|
|
1003
|
+
interface GlobalFacetingInstance<TData extends RowData> {
|
|
1004
|
+
_getGlobalFacetedMinMaxValues?: () => undefined | [number, number];
|
|
1005
|
+
_getGlobalFacetedRowModel?: () => RowModel<TData>;
|
|
1006
|
+
_getGlobalFacetedUniqueValues?: () => Map<any, number>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided.
|
|
1009
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-faceting#getglobalautofilterfn)
|
|
1010
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-faceting)
|
|
1011
|
+
*/
|
|
1012
|
+
getGlobalFacetedMinMaxValues: () => undefined | [number, number];
|
|
1013
|
+
/**
|
|
1014
|
+
* Returns the row model for the table after **global** filtering has been applied.
|
|
1015
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-faceting#getglobalfacetedrowmodel)
|
|
1016
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-faceting)
|
|
1017
|
+
*/
|
|
1018
|
+
getGlobalFacetedRowModel: () => RowModel<TData>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Returns the faceted unique values for the global filter.
|
|
1021
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-faceting#getglobalfaceteduniquevalues)
|
|
1022
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-faceting)
|
|
1023
|
+
*/
|
|
1024
|
+
getGlobalFacetedUniqueValues: () => Map<any, number>;
|
|
1025
|
+
}
|
|
1026
|
+
//#endregion
|
|
1027
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/filterFns.d.ts
|
|
1028
|
+
declare const filterFns: {
|
|
1029
|
+
includesString: FilterFn<any>;
|
|
1030
|
+
includesStringSensitive: FilterFn<any>;
|
|
1031
|
+
equalsString: FilterFn<any>;
|
|
1032
|
+
arrIncludes: FilterFn<any>;
|
|
1033
|
+
arrIncludesAll: FilterFn<any>;
|
|
1034
|
+
arrIncludesSome: FilterFn<any>;
|
|
1035
|
+
equals: FilterFn<any>;
|
|
1036
|
+
weakEquals: FilterFn<any>;
|
|
1037
|
+
inNumberRange: FilterFn<any>;
|
|
1038
|
+
};
|
|
1039
|
+
type BuiltInFilterFn = keyof typeof filterFns;
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnFiltering.d.ts
|
|
1042
|
+
interface ColumnFiltersTableState {
|
|
1043
|
+
columnFilters: ColumnFiltersState;
|
|
1044
|
+
}
|
|
1045
|
+
type ColumnFiltersState = ColumnFilter[];
|
|
1046
|
+
interface ColumnFilter {
|
|
1047
|
+
id: string;
|
|
1048
|
+
value: unknown;
|
|
1049
|
+
}
|
|
1050
|
+
interface FilterFn<TData extends RowData> {
|
|
1051
|
+
(row: Row<TData>, columnId: string, filterValue: any, addMeta: (meta: FilterMeta) => void): boolean;
|
|
1052
|
+
autoRemove?: ColumnFilterAutoRemoveTestFn<TData>;
|
|
1053
|
+
resolveFilterValue?: TransformFilterValueFn<TData>;
|
|
1054
|
+
}
|
|
1055
|
+
type TransformFilterValueFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => unknown;
|
|
1056
|
+
type ColumnFilterAutoRemoveTestFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => boolean;
|
|
1057
|
+
type FilterFnOption<TData extends RowData> = 'auto' | BuiltInFilterFn | keyof FilterFns | FilterFn<TData>;
|
|
1058
|
+
interface ColumnFiltersColumnDef<TData extends RowData> {
|
|
1059
|
+
/**
|
|
1060
|
+
* Enables/disables the **column** filter for this column.
|
|
1061
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#enablecolumnfilter)
|
|
1062
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1063
|
+
*/
|
|
1064
|
+
enableColumnFilter?: boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.
|
|
1067
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#filterfn)
|
|
1068
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1069
|
+
*/
|
|
1070
|
+
filterFn?: FilterFnOption<TData>;
|
|
1071
|
+
}
|
|
1072
|
+
interface ColumnFiltersColumn<TData extends RowData> {
|
|
1073
|
+
/**
|
|
1074
|
+
* Returns an automatically calculated filter function for the column based off of the columns first known value.
|
|
1075
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getautofilterfn)
|
|
1076
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1077
|
+
*/
|
|
1078
|
+
getAutoFilterFn: () => FilterFn<TData> | undefined;
|
|
1079
|
+
/**
|
|
1080
|
+
* Returns whether or not the column can be **column** filtered.
|
|
1081
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getcanfilter)
|
|
1082
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1083
|
+
*/
|
|
1084
|
+
getCanFilter: () => boolean;
|
|
1085
|
+
/**
|
|
1086
|
+
* Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.
|
|
1087
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getfilterfn)
|
|
1088
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1089
|
+
*/
|
|
1090
|
+
getFilterFn: () => FilterFn<TData> | undefined;
|
|
1091
|
+
/**
|
|
1092
|
+
* Returns the index (including `-1`) of the column filter in the table's `state.columnFilters` array.
|
|
1093
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getfilterindex)
|
|
1094
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1095
|
+
*/
|
|
1096
|
+
getFilterIndex: () => number;
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns the current filter value for the column.
|
|
1099
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getfiltervalue)
|
|
1100
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1101
|
+
*/
|
|
1102
|
+
getFilterValue: () => unknown;
|
|
1103
|
+
/**
|
|
1104
|
+
* Returns whether or not the column is currently filtered.
|
|
1105
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getisfiltered)
|
|
1106
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1107
|
+
*/
|
|
1108
|
+
getIsFiltered: () => boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values.
|
|
1111
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#setfiltervalue)
|
|
1112
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1113
|
+
*/
|
|
1114
|
+
setFilterValue: (updater: Updater<any>) => void;
|
|
1115
|
+
}
|
|
1116
|
+
interface ColumnFiltersRow<TData extends RowData> {
|
|
1117
|
+
/**
|
|
1118
|
+
* The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.
|
|
1119
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#columnfilters)
|
|
1120
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1121
|
+
*/
|
|
1122
|
+
columnFilters: Record<string, boolean>;
|
|
1123
|
+
/**
|
|
1124
|
+
* The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.
|
|
1125
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#columnfiltersmeta)
|
|
1126
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1127
|
+
*/
|
|
1128
|
+
columnFiltersMeta: Record<string, FilterMeta>;
|
|
1129
|
+
}
|
|
1130
|
+
interface ColumnFiltersOptionsBase<TData extends RowData> {
|
|
1131
|
+
/**
|
|
1132
|
+
* Enables/disables **column** filtering for all columns.
|
|
1133
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#enablecolumnfilters)
|
|
1134
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1135
|
+
*/
|
|
1136
|
+
enableColumnFilters?: boolean;
|
|
1137
|
+
/**
|
|
1138
|
+
* Enables/disables all filtering for the table.
|
|
1139
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#enablefilters)
|
|
1140
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1141
|
+
*/
|
|
1142
|
+
enableFilters?: boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included).
|
|
1145
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#filterfromleafrows)
|
|
1146
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1147
|
+
*/
|
|
1148
|
+
filterFromLeafRows?: boolean;
|
|
1149
|
+
/**
|
|
1150
|
+
* If provided, this function is called **once** per table and should return a **new function** which will calculate and return the row model for the table when it's filtered.
|
|
1151
|
+
* - For server-side filtering, this function is unnecessary and can be ignored since the server should already return the filtered row model.
|
|
1152
|
+
* - For client-side filtering, this function is required. A default implementation is provided via any table adapter's `{ getFilteredRowModel }` export.
|
|
1153
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getfilteredrowmodel)
|
|
1154
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1155
|
+
*/
|
|
1156
|
+
getFilteredRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
1157
|
+
/**
|
|
1158
|
+
* Disables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering.
|
|
1159
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#manualfiltering)
|
|
1160
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1161
|
+
*/
|
|
1162
|
+
manualFiltering?: boolean;
|
|
1163
|
+
/**
|
|
1164
|
+
* By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on.
|
|
1165
|
+
* This is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter.
|
|
1166
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#maxleafrowfilterdepth)
|
|
1167
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1168
|
+
*/
|
|
1169
|
+
maxLeafRowFilterDepth?: number;
|
|
1170
|
+
/**
|
|
1171
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnFilters` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
1172
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#oncolumnfilterschange)
|
|
1173
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1174
|
+
*/
|
|
1175
|
+
onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
|
|
1176
|
+
}
|
|
1177
|
+
type ResolvedFilterFns = keyof FilterFns extends never ? {
|
|
1178
|
+
filterFns?: Record<string, FilterFn<any>>;
|
|
1179
|
+
} : {
|
|
1180
|
+
filterFns: Record<keyof FilterFns, FilterFn<any>>;
|
|
1181
|
+
};
|
|
1182
|
+
interface ColumnFiltersOptions<TData extends RowData> extends ColumnFiltersOptionsBase<TData>, ResolvedFilterFns {}
|
|
1183
|
+
interface ColumnFiltersInstance<TData extends RowData> {
|
|
1184
|
+
_getFilteredRowModel?: () => RowModel<TData>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Returns the row model for the table after **column** filtering has been applied.
|
|
1187
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getfilteredrowmodel)
|
|
1188
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1189
|
+
*/
|
|
1190
|
+
getFilteredRowModel: () => RowModel<TData>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Returns the row model for the table before any **column** filtering has been applied.
|
|
1193
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#getprefilteredrowmodel)
|
|
1194
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1195
|
+
*/
|
|
1196
|
+
getPreFilteredRowModel: () => RowModel<TData>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Resets the **columnFilters** state to `initialState.columnFilters`, or `true` can be passed to force a default blank state reset to `[]`.
|
|
1199
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#resetcolumnfilters)
|
|
1200
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1201
|
+
*/
|
|
1202
|
+
resetColumnFilters: (defaultState?: boolean) => void;
|
|
1203
|
+
/**
|
|
1204
|
+
* Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`.
|
|
1205
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#resetglobalfilter)
|
|
1206
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1207
|
+
*/
|
|
1208
|
+
resetGlobalFilter: (defaultState?: boolean) => void;
|
|
1209
|
+
/**
|
|
1210
|
+
* Sets or updates the `state.columnFilters` state.
|
|
1211
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#setcolumnfilters)
|
|
1212
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1213
|
+
*/
|
|
1214
|
+
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void;
|
|
1215
|
+
/**
|
|
1216
|
+
* Sets or updates the `state.globalFilter` state.
|
|
1217
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#setglobalfilter)
|
|
1218
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
1219
|
+
*/
|
|
1220
|
+
setGlobalFilter: (updater: Updater<any>) => void;
|
|
1221
|
+
}
|
|
1222
|
+
//#endregion
|
|
1223
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/GlobalFiltering.d.ts
|
|
1224
|
+
interface GlobalFilterTableState {
|
|
1225
|
+
globalFilter: any;
|
|
1226
|
+
}
|
|
1227
|
+
interface GlobalFilterColumnDef {
|
|
1228
|
+
/**
|
|
1229
|
+
* Enables/disables the **global** filter for this column.
|
|
1230
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#enableglobalfilter)
|
|
1231
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1232
|
+
*/
|
|
1233
|
+
enableGlobalFilter?: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
interface GlobalFilterColumn {
|
|
1236
|
+
/**
|
|
1237
|
+
* Returns whether or not the column can be **globally** filtered. Set to `false` to disable a column from being scanned during global filtering.
|
|
1238
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#getcanglobalfilter)
|
|
1239
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1240
|
+
*/
|
|
1241
|
+
getCanGlobalFilter: () => boolean;
|
|
1242
|
+
}
|
|
1243
|
+
interface GlobalFilterOptions<TData extends RowData> {
|
|
1244
|
+
/**
|
|
1245
|
+
* Enables/disables **global** filtering for all columns.
|
|
1246
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#enableglobalfilter)
|
|
1247
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1248
|
+
*/
|
|
1249
|
+
enableGlobalFilter?: boolean;
|
|
1250
|
+
/**
|
|
1251
|
+
* If provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering.
|
|
1252
|
+
*
|
|
1253
|
+
* This is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`).
|
|
1254
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#getcolumncanglobalfilter)
|
|
1255
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1256
|
+
*/
|
|
1257
|
+
getColumnCanGlobalFilter?: (column: Column<TData, unknown>) => boolean;
|
|
1258
|
+
/**
|
|
1259
|
+
* The filter function to use for global filtering.
|
|
1260
|
+
* - A `string` referencing a built-in filter function
|
|
1261
|
+
* - A `string` that references a custom filter functions provided via the `tableOptions.filterFns` option
|
|
1262
|
+
* - A custom filter function
|
|
1263
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#globalfilterfn)
|
|
1264
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1265
|
+
*/
|
|
1266
|
+
globalFilterFn?: FilterFnOption<TData>;
|
|
1267
|
+
/**
|
|
1268
|
+
* If provided, this function will be called with an `updaterFn` when `state.globalFilter` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
1269
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#onglobalfilterchange)
|
|
1270
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1271
|
+
*/
|
|
1272
|
+
onGlobalFilterChange?: OnChangeFn<any>;
|
|
1273
|
+
}
|
|
1274
|
+
interface GlobalFilterInstance<TData extends RowData> {
|
|
1275
|
+
/**
|
|
1276
|
+
* Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided.
|
|
1277
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#getglobalautofilterfn)
|
|
1278
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1279
|
+
*/
|
|
1280
|
+
getGlobalAutoFilterFn: () => FilterFn<TData> | undefined;
|
|
1281
|
+
/**
|
|
1282
|
+
* Returns the filter function (either user-defined or automatic, depending on configuration) for the global filter.
|
|
1283
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#getglobalfilterfn)
|
|
1284
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1285
|
+
*/
|
|
1286
|
+
getGlobalFilterFn: () => FilterFn<TData> | undefined;
|
|
1287
|
+
/**
|
|
1288
|
+
* Resets the **globalFilter** state to `initialState.globalFilter`, or `true` can be passed to force a default blank state reset to `undefined`.
|
|
1289
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#resetglobalfilter)
|
|
1290
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1291
|
+
*/
|
|
1292
|
+
resetGlobalFilter: (defaultState?: boolean) => void;
|
|
1293
|
+
/**
|
|
1294
|
+
* Sets or updates the `state.globalFilter` state.
|
|
1295
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#setglobalfilter)
|
|
1296
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
1297
|
+
*/
|
|
1298
|
+
setGlobalFilter: (updater: Updater<any>) => void;
|
|
1299
|
+
}
|
|
1300
|
+
//#endregion
|
|
1301
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/sortingFns.d.ts
|
|
1302
|
+
declare const sortingFns: {
|
|
1303
|
+
alphanumeric: SortingFn<any>;
|
|
1304
|
+
alphanumericCaseSensitive: SortingFn<any>;
|
|
1305
|
+
text: SortingFn<any>;
|
|
1306
|
+
textCaseSensitive: SortingFn<any>;
|
|
1307
|
+
datetime: SortingFn<any>;
|
|
1308
|
+
basic: SortingFn<any>;
|
|
1309
|
+
};
|
|
1310
|
+
type BuiltInSortingFn = keyof typeof sortingFns;
|
|
1311
|
+
//#endregion
|
|
1312
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/RowSorting.d.ts
|
|
1313
|
+
type SortDirection = 'asc' | 'desc';
|
|
1314
|
+
interface ColumnSort {
|
|
1315
|
+
desc: boolean;
|
|
1316
|
+
id: string;
|
|
1317
|
+
}
|
|
1318
|
+
type SortingState = ColumnSort[];
|
|
1319
|
+
interface SortingTableState {
|
|
1320
|
+
sorting: SortingState;
|
|
1321
|
+
}
|
|
1322
|
+
interface SortingFn<TData extends RowData> {
|
|
1323
|
+
(rowA: Row<TData>, rowB: Row<TData>, columnId: string): number;
|
|
1324
|
+
}
|
|
1325
|
+
type SortingFnOption<TData extends RowData> = 'auto' | keyof SortingFns | BuiltInSortingFn | SortingFn<TData>;
|
|
1326
|
+
interface SortingColumnDef<TData extends RowData> {
|
|
1327
|
+
/**
|
|
1328
|
+
* Enables/Disables multi-sorting for this column.
|
|
1329
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablemultisort)
|
|
1330
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1331
|
+
*/
|
|
1332
|
+
enableMultiSort?: boolean;
|
|
1333
|
+
/**
|
|
1334
|
+
* Enables/Disables sorting for this column.
|
|
1335
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablesorting)
|
|
1336
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1337
|
+
*/
|
|
1338
|
+
enableSorting?: boolean;
|
|
1339
|
+
/**
|
|
1340
|
+
* Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring
|
|
1341
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#invertsorting)
|
|
1342
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1343
|
+
*/
|
|
1344
|
+
invertSorting?: boolean;
|
|
1345
|
+
/**
|
|
1346
|
+
* Set to `true` for sorting toggles on this column to start in the descending direction.
|
|
1347
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortdescfirst)
|
|
1348
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1349
|
+
*/
|
|
1350
|
+
sortDescFirst?: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* The sorting function to use with this column.
|
|
1353
|
+
* - A `string` referencing a built-in sorting function
|
|
1354
|
+
* - A custom sorting function
|
|
1355
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortingfn)
|
|
1356
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1357
|
+
*/
|
|
1358
|
+
sortingFn?: SortingFnOption<TData>;
|
|
1359
|
+
/**
|
|
1360
|
+
* The priority of undefined values when sorting this column.
|
|
1361
|
+
* - `false`
|
|
1362
|
+
* - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)
|
|
1363
|
+
* - `-1`
|
|
1364
|
+
* - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
|
|
1365
|
+
* - `1`
|
|
1366
|
+
* - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
|
|
1367
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortundefined)
|
|
1368
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1369
|
+
*/
|
|
1370
|
+
sortUndefined?: false | -1 | 1 | 'first' | 'last';
|
|
1371
|
+
}
|
|
1372
|
+
interface SortingColumn<TData extends RowData> {
|
|
1373
|
+
/**
|
|
1374
|
+
* Removes this column from the table's sorting state
|
|
1375
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#clearsorting)
|
|
1376
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1377
|
+
*/
|
|
1378
|
+
clearSorting: () => void;
|
|
1379
|
+
/**
|
|
1380
|
+
* Returns a sort direction automatically inferred based on the columns values.
|
|
1381
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getautosortdir)
|
|
1382
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1383
|
+
*/
|
|
1384
|
+
getAutoSortDir: () => SortDirection;
|
|
1385
|
+
/**
|
|
1386
|
+
* Returns a sorting function automatically inferred based on the columns values.
|
|
1387
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getautosortingfn)
|
|
1388
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1389
|
+
*/
|
|
1390
|
+
getAutoSortingFn: () => SortingFn<TData>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Returns whether this column can be multi-sorted.
|
|
1393
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getcanmultisort)
|
|
1394
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1395
|
+
*/
|
|
1396
|
+
getCanMultiSort: () => boolean;
|
|
1397
|
+
/**
|
|
1398
|
+
* Returns whether this column can be sorted.
|
|
1399
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getcansort)
|
|
1400
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1401
|
+
*/
|
|
1402
|
+
getCanSort: () => boolean;
|
|
1403
|
+
/**
|
|
1404
|
+
* Returns the first direction that should be used when sorting this column.
|
|
1405
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getfirstsortdir)
|
|
1406
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1407
|
+
*/
|
|
1408
|
+
getFirstSortDir: () => SortDirection;
|
|
1409
|
+
/**
|
|
1410
|
+
* Returns the current sort direction of this column.
|
|
1411
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getissorted)
|
|
1412
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1413
|
+
*/
|
|
1414
|
+
getIsSorted: () => false | SortDirection;
|
|
1415
|
+
/**
|
|
1416
|
+
* Returns the next sorting order.
|
|
1417
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getnextsortingorder)
|
|
1418
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1419
|
+
*/
|
|
1420
|
+
getNextSortingOrder: () => SortDirection | false;
|
|
1421
|
+
/**
|
|
1422
|
+
* Returns the index position of this column's sorting within the sorting state
|
|
1423
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getsortindex)
|
|
1424
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1425
|
+
*/
|
|
1426
|
+
getSortIndex: () => number;
|
|
1427
|
+
/**
|
|
1428
|
+
* Returns the resolved sorting function to be used for this column
|
|
1429
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getsortingfn)
|
|
1430
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1431
|
+
*/
|
|
1432
|
+
getSortingFn: () => SortingFn<TData>;
|
|
1433
|
+
/**
|
|
1434
|
+
* Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.
|
|
1435
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#gettogglesortinghandler)
|
|
1436
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1437
|
+
*/
|
|
1438
|
+
getToggleSortingHandler: () => undefined | ((event: unknown) => void);
|
|
1439
|
+
/**
|
|
1440
|
+
* Toggles this columns sorting state. If `desc` is provided, it will force the sort direction to that value. If `isMulti` is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).
|
|
1441
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#togglesorting)
|
|
1442
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1443
|
+
*/
|
|
1444
|
+
toggleSorting: (desc?: boolean, isMulti?: boolean) => void;
|
|
1445
|
+
}
|
|
1446
|
+
interface SortingOptionsBase {
|
|
1447
|
+
/**
|
|
1448
|
+
* Enables/disables the ability to remove multi-sorts
|
|
1449
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablemultiremove)
|
|
1450
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1451
|
+
*/
|
|
1452
|
+
enableMultiRemove?: boolean;
|
|
1453
|
+
/**
|
|
1454
|
+
* Enables/Disables multi-sorting for the table.
|
|
1455
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablemultisort)
|
|
1456
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1457
|
+
*/
|
|
1458
|
+
enableMultiSort?: boolean;
|
|
1459
|
+
/**
|
|
1460
|
+
* Enables/Disables sorting for the table.
|
|
1461
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablesorting)
|
|
1462
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1463
|
+
*/
|
|
1464
|
+
enableSorting?: boolean;
|
|
1465
|
+
/**
|
|
1466
|
+
* Enables/Disables the ability to remove sorting for the table.
|
|
1467
|
+
* - If `true` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'none' -> ...
|
|
1468
|
+
* - If `false` then changing sort order will circle like: 'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...
|
|
1469
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#enablesortingremoval)
|
|
1470
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1471
|
+
*/
|
|
1472
|
+
enableSortingRemoval?: boolean;
|
|
1473
|
+
/**
|
|
1474
|
+
* This function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported `getSortedRowModel()` from your adapter to your table or implement your own.
|
|
1475
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getsortedrowmodel)
|
|
1476
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1477
|
+
*/
|
|
1478
|
+
getSortedRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
1479
|
+
/**
|
|
1480
|
+
* Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return `true` if the event should trigger a multi-sort.
|
|
1481
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#ismultisortevent)
|
|
1482
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1483
|
+
*/
|
|
1484
|
+
isMultiSortEvent?: (e: unknown) => boolean;
|
|
1485
|
+
/**
|
|
1486
|
+
* Enables manual sorting for the table. If this is `true`, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting.
|
|
1487
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#manualsorting)
|
|
1488
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1489
|
+
*/
|
|
1490
|
+
manualSorting?: boolean;
|
|
1491
|
+
/**
|
|
1492
|
+
* Set a maximum number of columns that can be multi-sorted.
|
|
1493
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#maxmultisortcolcount)
|
|
1494
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1495
|
+
*/
|
|
1496
|
+
maxMultiSortColCount?: number;
|
|
1497
|
+
/**
|
|
1498
|
+
* If provided, this function will be called with an `updaterFn` when `state.sorting` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
1499
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#onsortingchange)
|
|
1500
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1501
|
+
*/
|
|
1502
|
+
onSortingChange?: OnChangeFn<SortingState>;
|
|
1503
|
+
/**
|
|
1504
|
+
* If `true`, all sorts will default to descending as their first toggle state.
|
|
1505
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#sortdescfirst)
|
|
1506
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1507
|
+
*/
|
|
1508
|
+
sortDescFirst?: boolean;
|
|
1509
|
+
}
|
|
1510
|
+
type ResolvedSortingFns = keyof SortingFns extends never ? {
|
|
1511
|
+
sortingFns?: Record<string, SortingFn<any>>;
|
|
1512
|
+
} : {
|
|
1513
|
+
sortingFns: Record<keyof SortingFns, SortingFn<any>>;
|
|
1514
|
+
};
|
|
1515
|
+
interface SortingOptions<TData extends RowData> extends SortingOptionsBase, ResolvedSortingFns {}
|
|
1516
|
+
interface SortingInstance<TData extends RowData> {
|
|
1517
|
+
_getSortedRowModel?: () => RowModel<TData>;
|
|
1518
|
+
/**
|
|
1519
|
+
* Returns the row model for the table before any sorting has been applied.
|
|
1520
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getpresortedrowmodel)
|
|
1521
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1522
|
+
*/
|
|
1523
|
+
getPreSortedRowModel: () => RowModel<TData>;
|
|
1524
|
+
/**
|
|
1525
|
+
* Returns the row model for the table after sorting has been applied.
|
|
1526
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#getsortedrowmodel)
|
|
1527
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1528
|
+
*/
|
|
1529
|
+
getSortedRowModel: () => RowModel<TData>;
|
|
1530
|
+
/**
|
|
1531
|
+
* Resets the **sorting** state to `initialState.sorting`, or `true` can be passed to force a default blank state reset to `[]`.
|
|
1532
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#resetsorting)
|
|
1533
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1534
|
+
*/
|
|
1535
|
+
resetSorting: (defaultState?: boolean) => void;
|
|
1536
|
+
/**
|
|
1537
|
+
* Sets or updates the `state.sorting` state.
|
|
1538
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#setsorting)
|
|
1539
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
1540
|
+
*/
|
|
1541
|
+
setSorting: (updater: Updater<SortingState>) => void;
|
|
1542
|
+
}
|
|
1543
|
+
//#endregion
|
|
1544
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/aggregationFns.d.ts
|
|
1545
|
+
declare const aggregationFns: {
|
|
1546
|
+
sum: AggregationFn<any>;
|
|
1547
|
+
min: AggregationFn<any>;
|
|
1548
|
+
max: AggregationFn<any>;
|
|
1549
|
+
extent: AggregationFn<any>;
|
|
1550
|
+
mean: AggregationFn<any>;
|
|
1551
|
+
median: AggregationFn<any>;
|
|
1552
|
+
unique: AggregationFn<any>;
|
|
1553
|
+
uniqueCount: AggregationFn<any>;
|
|
1554
|
+
count: AggregationFn<any>;
|
|
1555
|
+
};
|
|
1556
|
+
type BuiltInAggregationFn = keyof typeof aggregationFns;
|
|
1557
|
+
//#endregion
|
|
1558
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnGrouping.d.ts
|
|
1559
|
+
type GroupingState = string[];
|
|
1560
|
+
interface GroupingTableState {
|
|
1561
|
+
grouping: GroupingState;
|
|
1562
|
+
}
|
|
1563
|
+
type AggregationFn<TData extends RowData> = (columnId: string, leafRows: Row<TData>[], childRows: Row<TData>[]) => any;
|
|
1564
|
+
type AggregationFnOption<TData extends RowData> = 'auto' | keyof AggregationFns | BuiltInAggregationFn | AggregationFn<TData>;
|
|
1565
|
+
interface GroupingColumnDef<TData extends RowData, TValue> {
|
|
1566
|
+
/**
|
|
1567
|
+
* The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).
|
|
1568
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#aggregatedcell)
|
|
1569
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1570
|
+
*/
|
|
1571
|
+
aggregatedCell?: ColumnDefTemplate<ReturnType<Cell<TData, TValue>['getContext']>>;
|
|
1572
|
+
/**
|
|
1573
|
+
* The resolved aggregation function for the column.
|
|
1574
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#aggregationfn)
|
|
1575
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1576
|
+
*/
|
|
1577
|
+
aggregationFn?: AggregationFnOption<TData>;
|
|
1578
|
+
/**
|
|
1579
|
+
* Enables/disables grouping for this column.
|
|
1580
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#enablegrouping)
|
|
1581
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1582
|
+
*/
|
|
1583
|
+
enableGrouping?: boolean;
|
|
1584
|
+
/**
|
|
1585
|
+
* Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead.
|
|
1586
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getgroupingvalue)
|
|
1587
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1588
|
+
*/
|
|
1589
|
+
getGroupingValue?: (row: TData) => any;
|
|
1590
|
+
}
|
|
1591
|
+
interface GroupingColumn<TData extends RowData> {
|
|
1592
|
+
/**
|
|
1593
|
+
* Returns the aggregation function for the column.
|
|
1594
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getaggregationfn)
|
|
1595
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1596
|
+
*/
|
|
1597
|
+
getAggregationFn: () => AggregationFn<TData> | undefined;
|
|
1598
|
+
/**
|
|
1599
|
+
* Returns the automatically inferred aggregation function for the column.
|
|
1600
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getautoaggregationfn)
|
|
1601
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1602
|
+
*/
|
|
1603
|
+
getAutoAggregationFn: () => AggregationFn<TData> | undefined;
|
|
1604
|
+
/**
|
|
1605
|
+
* Returns whether or not the column can be grouped.
|
|
1606
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getcangroup)
|
|
1607
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1608
|
+
*/
|
|
1609
|
+
getCanGroup: () => boolean;
|
|
1610
|
+
/**
|
|
1611
|
+
* Returns the index of the column in the grouping state.
|
|
1612
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getgroupedindex)
|
|
1613
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1614
|
+
*/
|
|
1615
|
+
getGroupedIndex: () => number;
|
|
1616
|
+
/**
|
|
1617
|
+
* Returns whether or not the column is currently grouped.
|
|
1618
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getisgrouped)
|
|
1619
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1620
|
+
*/
|
|
1621
|
+
getIsGrouped: () => boolean;
|
|
1622
|
+
/**
|
|
1623
|
+
* Returns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button.
|
|
1624
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#gettogglegroupinghandler)
|
|
1625
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1626
|
+
*/
|
|
1627
|
+
getToggleGroupingHandler: () => () => void;
|
|
1628
|
+
/**
|
|
1629
|
+
* Toggles the grouping state of the column.
|
|
1630
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#togglegrouping)
|
|
1631
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1632
|
+
*/
|
|
1633
|
+
toggleGrouping: () => void;
|
|
1634
|
+
}
|
|
1635
|
+
interface GroupingRow {
|
|
1636
|
+
_groupingValuesCache: Record<string, any>;
|
|
1637
|
+
/**
|
|
1638
|
+
* Returns the grouping value for any row and column (including leaf rows).
|
|
1639
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getgroupingvalue)
|
|
1640
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1641
|
+
*/
|
|
1642
|
+
getGroupingValue: (columnId: string) => unknown;
|
|
1643
|
+
/**
|
|
1644
|
+
* Returns whether or not the row is currently grouped.
|
|
1645
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getisgrouped)
|
|
1646
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1647
|
+
*/
|
|
1648
|
+
getIsGrouped: () => boolean;
|
|
1649
|
+
/**
|
|
1650
|
+
* If this row is grouped, this is the id of the column that this row is grouped by.
|
|
1651
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#groupingcolumnid)
|
|
1652
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1653
|
+
*/
|
|
1654
|
+
groupingColumnId?: string;
|
|
1655
|
+
/**
|
|
1656
|
+
* If this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group.
|
|
1657
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#groupingvalue)
|
|
1658
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1659
|
+
*/
|
|
1660
|
+
groupingValue?: unknown;
|
|
1661
|
+
}
|
|
1662
|
+
interface GroupingCell {
|
|
1663
|
+
/**
|
|
1664
|
+
* Returns whether or not the cell is currently aggregated.
|
|
1665
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getisaggregated)
|
|
1666
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1667
|
+
*/
|
|
1668
|
+
getIsAggregated: () => boolean;
|
|
1669
|
+
/**
|
|
1670
|
+
* Returns whether or not the cell is currently grouped.
|
|
1671
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getisgrouped)
|
|
1672
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1673
|
+
*/
|
|
1674
|
+
getIsGrouped: () => boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* Returns whether or not the cell is currently a placeholder cell.
|
|
1677
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getisplaceholder)
|
|
1678
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1679
|
+
*/
|
|
1680
|
+
getIsPlaceholder: () => boolean;
|
|
1681
|
+
}
|
|
1682
|
+
interface GroupingOptionsBase {
|
|
1683
|
+
/**
|
|
1684
|
+
* Enables/disables grouping for the table.
|
|
1685
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#enablegrouping)
|
|
1686
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1687
|
+
*/
|
|
1688
|
+
enableGrouping?: boolean;
|
|
1689
|
+
/**
|
|
1690
|
+
* Returns the row model after grouping has taken place, but no further.
|
|
1691
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getgroupedrowmodel)
|
|
1692
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1693
|
+
*/
|
|
1694
|
+
getGroupedRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.
|
|
1697
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#groupedcolumnmode)
|
|
1698
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1699
|
+
*/
|
|
1700
|
+
groupedColumnMode?: false | 'reorder' | 'remove';
|
|
1701
|
+
/**
|
|
1702
|
+
* Enables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation.
|
|
1703
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#manualgrouping)
|
|
1704
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1705
|
+
*/
|
|
1706
|
+
manualGrouping?: boolean;
|
|
1707
|
+
/**
|
|
1708
|
+
* If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.grouping` option.
|
|
1709
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#ongroupingchange)
|
|
1710
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1711
|
+
*/
|
|
1712
|
+
onGroupingChange?: OnChangeFn<GroupingState>;
|
|
1713
|
+
}
|
|
1714
|
+
type ResolvedAggregationFns = keyof AggregationFns extends never ? {
|
|
1715
|
+
aggregationFns?: Record<string, AggregationFn<any>>;
|
|
1716
|
+
} : {
|
|
1717
|
+
aggregationFns: Record<keyof AggregationFns, AggregationFn<any>>;
|
|
1718
|
+
};
|
|
1719
|
+
interface GroupingOptions extends GroupingOptionsBase, ResolvedAggregationFns {}
|
|
1720
|
+
interface GroupingInstance<TData extends RowData> {
|
|
1721
|
+
_getGroupedRowModel?: () => RowModel<TData>;
|
|
1722
|
+
/**
|
|
1723
|
+
* Returns the row model for the table after grouping has been applied.
|
|
1724
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getgroupedrowmodel)
|
|
1725
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1726
|
+
*/
|
|
1727
|
+
getGroupedRowModel: () => RowModel<TData>;
|
|
1728
|
+
/**
|
|
1729
|
+
* Returns the row model for the table before any grouping has been applied.
|
|
1730
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#getpregroupedrowmodel)
|
|
1731
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1732
|
+
*/
|
|
1733
|
+
getPreGroupedRowModel: () => RowModel<TData>;
|
|
1734
|
+
/**
|
|
1735
|
+
* Resets the **grouping** state to `initialState.grouping`, or `true` can be passed to force a default blank state reset to `[]`.
|
|
1736
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#resetgrouping)
|
|
1737
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1738
|
+
*/
|
|
1739
|
+
resetGrouping: (defaultState?: boolean) => void;
|
|
1740
|
+
/**
|
|
1741
|
+
* Updates the grouping state of the table via an update function or value.
|
|
1742
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#setgrouping)
|
|
1743
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
1744
|
+
*/
|
|
1745
|
+
setGrouping: (updater: Updater<GroupingState>) => void;
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/RowExpanding.d.ts
|
|
1749
|
+
type ExpandedState = true | Record<string, boolean>;
|
|
1750
|
+
interface ExpandedTableState {
|
|
1751
|
+
expanded: ExpandedState;
|
|
1752
|
+
}
|
|
1753
|
+
interface ExpandedRow {
|
|
1754
|
+
/**
|
|
1755
|
+
* Returns whether the row can be expanded.
|
|
1756
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getcanexpand)
|
|
1757
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1758
|
+
*/
|
|
1759
|
+
getCanExpand: () => boolean;
|
|
1760
|
+
/**
|
|
1761
|
+
* Returns whether all parent rows of the row are expanded.
|
|
1762
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getisallparentsexpanded)
|
|
1763
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1764
|
+
*/
|
|
1765
|
+
getIsAllParentsExpanded: () => boolean;
|
|
1766
|
+
/**
|
|
1767
|
+
* Returns whether the row is expanded.
|
|
1768
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getisexpanded)
|
|
1769
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1770
|
+
*/
|
|
1771
|
+
getIsExpanded: () => boolean;
|
|
1772
|
+
/**
|
|
1773
|
+
* Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button.
|
|
1774
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#gettoggleexpandedhandler)
|
|
1775
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1776
|
+
*/
|
|
1777
|
+
getToggleExpandedHandler: () => () => void;
|
|
1778
|
+
/**
|
|
1779
|
+
* Toggles the expanded state (or sets it if `expanded` is provided) for the row.
|
|
1780
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#toggleexpanded)
|
|
1781
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1782
|
+
*/
|
|
1783
|
+
toggleExpanded: (expanded?: boolean) => void;
|
|
1784
|
+
}
|
|
1785
|
+
interface ExpandedOptions<TData extends RowData> {
|
|
1786
|
+
/**
|
|
1787
|
+
* Enable this setting to automatically reset the expanded state of the table when expanding state changes.
|
|
1788
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#autoresetexpanded)
|
|
1789
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1790
|
+
*/
|
|
1791
|
+
autoResetExpanded?: boolean;
|
|
1792
|
+
/**
|
|
1793
|
+
* Enable/disable expanding for all rows.
|
|
1794
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#enableexpanding)
|
|
1795
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1796
|
+
*/
|
|
1797
|
+
enableExpanding?: boolean;
|
|
1798
|
+
/**
|
|
1799
|
+
* This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported `getExpandedRowModel` function to get the expanded row model or implement your own.
|
|
1800
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getexpandedrowmodel)
|
|
1801
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1802
|
+
*/
|
|
1803
|
+
getExpandedRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
1804
|
+
/**
|
|
1805
|
+
* If provided, allows you to override the default behavior of determining whether a row is currently expanded.
|
|
1806
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getisrowexpanded)
|
|
1807
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1808
|
+
*/
|
|
1809
|
+
getIsRowExpanded?: (row: Row<TData>) => boolean;
|
|
1810
|
+
/**
|
|
1811
|
+
* If provided, allows you to override the default behavior of determining whether a row can be expanded.
|
|
1812
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getrowcanexpand)
|
|
1813
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1814
|
+
*/
|
|
1815
|
+
getRowCanExpand?: (row: Row<TData>) => boolean;
|
|
1816
|
+
/**
|
|
1817
|
+
* Enables manual row expansion. If this is set to `true`, `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion.
|
|
1818
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#manualexpanding)
|
|
1819
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1820
|
+
*/
|
|
1821
|
+
manualExpanding?: boolean;
|
|
1822
|
+
/**
|
|
1823
|
+
* This function is called when the `expanded` table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the `tableOptions.state.expanded` option.
|
|
1824
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#onexpandedchange)
|
|
1825
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1826
|
+
*/
|
|
1827
|
+
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
1828
|
+
/**
|
|
1829
|
+
* If `true` expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If `false` expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size)
|
|
1830
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#paginateexpandedrows)
|
|
1831
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1832
|
+
*/
|
|
1833
|
+
paginateExpandedRows?: boolean;
|
|
1834
|
+
}
|
|
1835
|
+
interface ExpandedInstance<TData extends RowData> {
|
|
1836
|
+
_autoResetExpanded: () => void;
|
|
1837
|
+
_getExpandedRowModel?: () => RowModel<TData>;
|
|
1838
|
+
/**
|
|
1839
|
+
* Returns whether there are any rows that can be expanded.
|
|
1840
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getcansomerowsexpand)
|
|
1841
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1842
|
+
*/
|
|
1843
|
+
getCanSomeRowsExpand: () => boolean;
|
|
1844
|
+
/**
|
|
1845
|
+
* Returns the maximum depth of the expanded rows.
|
|
1846
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getexpandeddepth)
|
|
1847
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1848
|
+
*/
|
|
1849
|
+
getExpandedDepth: () => number;
|
|
1850
|
+
/**
|
|
1851
|
+
* Returns the row model after expansion has been applied.
|
|
1852
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getexpandedrowmodel)
|
|
1853
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1854
|
+
*/
|
|
1855
|
+
getExpandedRowModel: () => RowModel<TData>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Returns whether all rows are currently expanded.
|
|
1858
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getisallrowsexpanded)
|
|
1859
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1860
|
+
*/
|
|
1861
|
+
getIsAllRowsExpanded: () => boolean;
|
|
1862
|
+
/**
|
|
1863
|
+
* Returns whether there are any rows that are currently expanded.
|
|
1864
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getissomerowsexpanded)
|
|
1865
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1866
|
+
*/
|
|
1867
|
+
getIsSomeRowsExpanded: () => boolean;
|
|
1868
|
+
/**
|
|
1869
|
+
* Returns the row model before expansion has been applied.
|
|
1870
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#getpreexpandedrowmodel)
|
|
1871
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1872
|
+
*/
|
|
1873
|
+
getPreExpandedRowModel: () => RowModel<TData>;
|
|
1874
|
+
/**
|
|
1875
|
+
* Returns a handler that can be used to toggle the expanded state of all rows. This handler is meant to be used with an `input[type=checkbox]` element.
|
|
1876
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#gettoggleallrowsexpandedhandler)
|
|
1877
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1878
|
+
*/
|
|
1879
|
+
getToggleAllRowsExpandedHandler: () => (event: unknown) => void;
|
|
1880
|
+
/**
|
|
1881
|
+
* Resets the expanded state of the table to the initial state.
|
|
1882
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#resetexpanded)
|
|
1883
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1884
|
+
*/
|
|
1885
|
+
resetExpanded: (defaultState?: boolean) => void;
|
|
1886
|
+
/**
|
|
1887
|
+
* Updates the expanded state of the table via an update function or value.
|
|
1888
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#setexpanded)
|
|
1889
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1890
|
+
*/
|
|
1891
|
+
setExpanded: (updater: Updater<ExpandedState>) => void;
|
|
1892
|
+
/**
|
|
1893
|
+
* Toggles the expanded state for all rows.
|
|
1894
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#toggleallrowsexpanded)
|
|
1895
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
1896
|
+
*/
|
|
1897
|
+
toggleAllRowsExpanded: (expanded?: boolean) => void;
|
|
1898
|
+
}
|
|
1899
|
+
//#endregion
|
|
1900
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/ColumnSizing.d.ts
|
|
1901
|
+
interface ColumnSizingTableState {
|
|
1902
|
+
columnSizing: ColumnSizingState;
|
|
1903
|
+
columnSizingInfo: ColumnSizingInfoState;
|
|
1904
|
+
}
|
|
1905
|
+
type ColumnSizingState = Record<string, number>;
|
|
1906
|
+
interface ColumnSizingInfoState {
|
|
1907
|
+
columnSizingStart: [string, number][];
|
|
1908
|
+
deltaOffset: null | number;
|
|
1909
|
+
deltaPercentage: null | number;
|
|
1910
|
+
isResizingColumn: false | string;
|
|
1911
|
+
startOffset: null | number;
|
|
1912
|
+
startSize: null | number;
|
|
1913
|
+
}
|
|
1914
|
+
type ColumnResizeMode = 'onChange' | 'onEnd';
|
|
1915
|
+
type ColumnResizeDirection = 'ltr' | 'rtl';
|
|
1916
|
+
interface ColumnSizingOptions {
|
|
1917
|
+
/**
|
|
1918
|
+
* Determines when the columnSizing state is updated. `onChange` updates the state when the user is dragging the resize handle. `onEnd` updates the state when the user releases the resize handle.
|
|
1919
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#columnresizemode)
|
|
1920
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1921
|
+
*/
|
|
1922
|
+
columnResizeMode?: ColumnResizeMode;
|
|
1923
|
+
/**
|
|
1924
|
+
* Enables or disables column resizing for the column.
|
|
1925
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#enablecolumnresizing)
|
|
1926
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1927
|
+
*/
|
|
1928
|
+
enableColumnResizing?: boolean;
|
|
1929
|
+
/**
|
|
1930
|
+
* Enables or disables right-to-left support for resizing the column. defaults to 'ltr'.
|
|
1931
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#columnResizeDirection)
|
|
1932
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1933
|
+
*/
|
|
1934
|
+
columnResizeDirection?: ColumnResizeDirection;
|
|
1935
|
+
/**
|
|
1936
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnSizing` changes. This overrides the default internal state management, so you will also need to supply `state.columnSizing` from your own managed state.
|
|
1937
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#oncolumnsizingchange)
|
|
1938
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1939
|
+
*/
|
|
1940
|
+
onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
|
|
1941
|
+
/**
|
|
1942
|
+
* If provided, this function will be called with an `updaterFn` when `state.columnSizingInfo` changes. This overrides the default internal state management, so you will also need to supply `state.columnSizingInfo` from your own managed state.
|
|
1943
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#oncolumnsizinginfochange)
|
|
1944
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1945
|
+
*/
|
|
1946
|
+
onColumnSizingInfoChange?: OnChangeFn<ColumnSizingInfoState>;
|
|
1947
|
+
}
|
|
1948
|
+
interface ColumnSizingInstance {
|
|
1949
|
+
/**
|
|
1950
|
+
* If pinning, returns the total size of the center portion of the table by calculating the sum of the sizes of all unpinned/center leaf-columns.
|
|
1951
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getcentertotalsize)
|
|
1952
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1953
|
+
*/
|
|
1954
|
+
getCenterTotalSize: () => number;
|
|
1955
|
+
/**
|
|
1956
|
+
* Returns the total size of the left portion of the table by calculating the sum of the sizes of all left leaf-columns.
|
|
1957
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getlefttotalsize)
|
|
1958
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1959
|
+
*/
|
|
1960
|
+
getLeftTotalSize: () => number;
|
|
1961
|
+
/**
|
|
1962
|
+
* Returns the total size of the right portion of the table by calculating the sum of the sizes of all right leaf-columns.
|
|
1963
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getrighttotalsize)
|
|
1964
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1965
|
+
*/
|
|
1966
|
+
getRightTotalSize: () => number;
|
|
1967
|
+
/**
|
|
1968
|
+
* Returns the total size of the table by calculating the sum of the sizes of all leaf-columns.
|
|
1969
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#gettotalsize)
|
|
1970
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1971
|
+
*/
|
|
1972
|
+
getTotalSize: () => number;
|
|
1973
|
+
/**
|
|
1974
|
+
* Resets column sizing to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.
|
|
1975
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#resetcolumnsizing)
|
|
1976
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1977
|
+
*/
|
|
1978
|
+
resetColumnSizing: (defaultState?: boolean) => void;
|
|
1979
|
+
/**
|
|
1980
|
+
* Resets column sizing info to its initial state. If `defaultState` is `true`, the default state for the table will be used instead of the initialValue provided to the table.
|
|
1981
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#resetheadersizeinfo)
|
|
1982
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1983
|
+
*/
|
|
1984
|
+
resetHeaderSizeInfo: (defaultState?: boolean) => void;
|
|
1985
|
+
/**
|
|
1986
|
+
* Sets the column sizing state using an updater function or a value. This will trigger the underlying `onColumnSizingChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.
|
|
1987
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#setcolumnsizing)
|
|
1988
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1989
|
+
*/
|
|
1990
|
+
setColumnSizing: (updater: Updater<ColumnSizingState>) => void;
|
|
1991
|
+
/**
|
|
1992
|
+
* Sets the column sizing info state using an updater function or a value. This will trigger the underlying `onColumnSizingInfoChange` function if one is passed to the table options, otherwise the state will be managed automatically by the table.
|
|
1993
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#setcolumnsizinginfo)
|
|
1994
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
1995
|
+
*/
|
|
1996
|
+
setColumnSizingInfo: (updater: Updater<ColumnSizingInfoState>) => void;
|
|
1997
|
+
}
|
|
1998
|
+
interface ColumnSizingColumnDef {
|
|
1999
|
+
/**
|
|
2000
|
+
* Enables or disables column resizing for the column.
|
|
2001
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#enableresizing)
|
|
2002
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2003
|
+
*/
|
|
2004
|
+
enableResizing?: boolean;
|
|
2005
|
+
/**
|
|
2006
|
+
* The maximum allowed size for the column
|
|
2007
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#maxsize)
|
|
2008
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2009
|
+
*/
|
|
2010
|
+
maxSize?: number;
|
|
2011
|
+
/**
|
|
2012
|
+
* The minimum allowed size for the column
|
|
2013
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#minsize)
|
|
2014
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2015
|
+
*/
|
|
2016
|
+
minSize?: number;
|
|
2017
|
+
/**
|
|
2018
|
+
* The desired size for the column
|
|
2019
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#size)
|
|
2020
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2021
|
+
*/
|
|
2022
|
+
size?: number;
|
|
2023
|
+
}
|
|
2024
|
+
interface ColumnSizingColumn {
|
|
2025
|
+
/**
|
|
2026
|
+
* Returns `true` if the column can be resized.
|
|
2027
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getcanresize)
|
|
2028
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2029
|
+
*/
|
|
2030
|
+
getCanResize: () => boolean;
|
|
2031
|
+
/**
|
|
2032
|
+
* Returns `true` if the column is currently being resized.
|
|
2033
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getisresizing)
|
|
2034
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2035
|
+
*/
|
|
2036
|
+
getIsResizing: () => boolean;
|
|
2037
|
+
/**
|
|
2038
|
+
* Returns the current size of the column.
|
|
2039
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getsize)
|
|
2040
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2041
|
+
*/
|
|
2042
|
+
getSize: () => number;
|
|
2043
|
+
/**
|
|
2044
|
+
* Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding (left) headers in relation to the current column.
|
|
2045
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getstart)
|
|
2046
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2047
|
+
*/
|
|
2048
|
+
getStart: (position?: ColumnPinningPosition | 'center') => number;
|
|
2049
|
+
/**
|
|
2050
|
+
* Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all succeeding (right) headers in relation to the current column.
|
|
2051
|
+
*/
|
|
2052
|
+
getAfter: (position?: ColumnPinningPosition | 'center') => number;
|
|
2053
|
+
/**
|
|
2054
|
+
* Resets the column to its initial size.
|
|
2055
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#resetsize)
|
|
2056
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2057
|
+
*/
|
|
2058
|
+
resetSize: () => void;
|
|
2059
|
+
}
|
|
2060
|
+
interface ColumnSizingHeader {
|
|
2061
|
+
/**
|
|
2062
|
+
* Returns an event handler function that can be used to resize the header. It can be used as an:
|
|
2063
|
+
* - `onMouseDown` handler
|
|
2064
|
+
* - `onTouchStart` handler
|
|
2065
|
+
*
|
|
2066
|
+
* The dragging and release events are automatically handled for you.
|
|
2067
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getresizehandler)
|
|
2068
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2069
|
+
*/
|
|
2070
|
+
getResizeHandler: (context?: Document) => (event: unknown) => void;
|
|
2071
|
+
/**
|
|
2072
|
+
* Returns the current size of the header.
|
|
2073
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getsize)
|
|
2074
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2075
|
+
*/
|
|
2076
|
+
getSize: () => number;
|
|
2077
|
+
/**
|
|
2078
|
+
* Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
|
|
2079
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#getstart)
|
|
2080
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
2081
|
+
*/
|
|
2082
|
+
getStart: (position?: ColumnPinningPosition) => number;
|
|
2083
|
+
}
|
|
2084
|
+
//#endregion
|
|
2085
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/RowPagination.d.ts
|
|
2086
|
+
interface PaginationState {
|
|
2087
|
+
pageIndex: number;
|
|
2088
|
+
pageSize: number;
|
|
2089
|
+
}
|
|
2090
|
+
interface PaginationTableState {
|
|
2091
|
+
pagination: PaginationState;
|
|
2092
|
+
}
|
|
2093
|
+
interface PaginationInitialTableState {
|
|
2094
|
+
pagination?: Partial<PaginationState>;
|
|
2095
|
+
}
|
|
2096
|
+
interface PaginationOptions {
|
|
2097
|
+
/**
|
|
2098
|
+
* If set to `true`, pagination will be reset to the first page when page-altering state changes eg. `data` is updated, filters change, grouping changes, etc.
|
|
2099
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#autoresetpageindex)
|
|
2100
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2101
|
+
*/
|
|
2102
|
+
autoResetPageIndex?: boolean;
|
|
2103
|
+
/**
|
|
2104
|
+
* Returns the row model after pagination has taken place, but no further.
|
|
2105
|
+
*
|
|
2106
|
+
* Pagination columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.
|
|
2107
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getpaginationrowmodel)
|
|
2108
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2109
|
+
*/
|
|
2110
|
+
getPaginationRowModel?: (table: Table<any>) => () => RowModel<any>;
|
|
2111
|
+
/**
|
|
2112
|
+
* Enables manual pagination. If this option is set to `true`, the table will not automatically paginate rows using `getPaginationRowModel()` and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation.
|
|
2113
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#manualpagination)
|
|
2114
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2115
|
+
*/
|
|
2116
|
+
manualPagination?: boolean;
|
|
2117
|
+
/**
|
|
2118
|
+
* If this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the `tableOptions.state.pagination` option.
|
|
2119
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#onpaginationchange)
|
|
2120
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2121
|
+
*/
|
|
2122
|
+
onPaginationChange?: OnChangeFn<PaginationState>;
|
|
2123
|
+
/**
|
|
2124
|
+
* When manually controlling pagination, you can supply a total `pageCount` value to the table if you know it (Or supply a `rowCount` and `pageCount` will be calculated). If you do not know how many pages there are, you can set this to `-1`.
|
|
2125
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#pagecount)
|
|
2126
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2127
|
+
*/
|
|
2128
|
+
pageCount?: number;
|
|
2129
|
+
/**
|
|
2130
|
+
* When manually controlling pagination, you can supply a total `rowCount` value to the table if you know it. The `pageCount` can be calculated from this value and the `pageSize`.
|
|
2131
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#rowcount)
|
|
2132
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2133
|
+
*/
|
|
2134
|
+
rowCount?: number;
|
|
2135
|
+
}
|
|
2136
|
+
interface PaginationInstance<TData extends RowData> {
|
|
2137
|
+
_autoResetPageIndex: () => void;
|
|
2138
|
+
_getPaginationRowModel?: () => RowModel<TData>;
|
|
2139
|
+
/**
|
|
2140
|
+
* Returns whether the table can go to the next page.
|
|
2141
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getcannextpage)
|
|
2142
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2143
|
+
*/
|
|
2144
|
+
getCanNextPage: () => boolean;
|
|
2145
|
+
/**
|
|
2146
|
+
* Returns whether the table can go to the previous page.
|
|
2147
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getcanpreviouspage)
|
|
2148
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2149
|
+
*/
|
|
2150
|
+
getCanPreviousPage: () => boolean;
|
|
2151
|
+
/**
|
|
2152
|
+
* Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the `options.pageCount` table option, otherwise it will be calculated from the table data using the total row count and current page size.
|
|
2153
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getpagecount)
|
|
2154
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2155
|
+
*/
|
|
2156
|
+
getPageCount: () => number;
|
|
2157
|
+
/**
|
|
2158
|
+
* Returns the row count. If manually paginating or controlling the pagination state, this will come directly from the `options.rowCount` table option, otherwise it will be calculated from the table data.
|
|
2159
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getrowcount)
|
|
2160
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2161
|
+
*/
|
|
2162
|
+
getRowCount: () => number;
|
|
2163
|
+
/**
|
|
2164
|
+
* Returns an array of page options (zero-index-based) for the current page size.
|
|
2165
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getpageoptions)
|
|
2166
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2167
|
+
*/
|
|
2168
|
+
getPageOptions: () => number[];
|
|
2169
|
+
/**
|
|
2170
|
+
* Returns the row model for the table after pagination has been applied.
|
|
2171
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getpaginationrowmodel)
|
|
2172
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2173
|
+
*/
|
|
2174
|
+
getPaginationRowModel: () => RowModel<TData>;
|
|
2175
|
+
/**
|
|
2176
|
+
* Returns the row model for the table before any pagination has been applied.
|
|
2177
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#getprepaginationrowmodel)
|
|
2178
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2179
|
+
*/
|
|
2180
|
+
getPrePaginationRowModel: () => RowModel<TData>;
|
|
2181
|
+
/**
|
|
2182
|
+
* Increments the page index by one, if possible.
|
|
2183
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#nextpage)
|
|
2184
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2185
|
+
*/
|
|
2186
|
+
nextPage: () => void;
|
|
2187
|
+
/**
|
|
2188
|
+
* Decrements the page index by one, if possible.
|
|
2189
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#previouspage)
|
|
2190
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2191
|
+
*/
|
|
2192
|
+
previousPage: () => void;
|
|
2193
|
+
/**
|
|
2194
|
+
* Sets the page index to `0`.
|
|
2195
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#firstpage)
|
|
2196
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2197
|
+
*/
|
|
2198
|
+
firstPage: () => void;
|
|
2199
|
+
/**
|
|
2200
|
+
* Sets the page index to the last page.
|
|
2201
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#lastpage)
|
|
2202
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2203
|
+
*/
|
|
2204
|
+
lastPage: () => void;
|
|
2205
|
+
/**
|
|
2206
|
+
* Resets the page index to its initial state. If `defaultState` is `true`, the page index will be reset to `0` regardless of initial state.
|
|
2207
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#resetpageindex)
|
|
2208
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2209
|
+
*/
|
|
2210
|
+
resetPageIndex: (defaultState?: boolean) => void;
|
|
2211
|
+
/**
|
|
2212
|
+
* Resets the page size to its initial state. If `defaultState` is `true`, the page size will be reset to `10` regardless of initial state.
|
|
2213
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#resetpagesize)
|
|
2214
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2215
|
+
*/
|
|
2216
|
+
resetPageSize: (defaultState?: boolean) => void;
|
|
2217
|
+
/**
|
|
2218
|
+
* Resets the **pagination** state to `initialState.pagination`, or `true` can be passed to force a default blank state reset to `[]`.
|
|
2219
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#resetpagination)
|
|
2220
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2221
|
+
*/
|
|
2222
|
+
resetPagination: (defaultState?: boolean) => void;
|
|
2223
|
+
/**
|
|
2224
|
+
* @deprecated The page count no longer exists in the pagination state. Just pass as a table option instead.
|
|
2225
|
+
*/
|
|
2226
|
+
setPageCount: (updater: Updater<number>) => void;
|
|
2227
|
+
/**
|
|
2228
|
+
* Updates the page index using the provided function or value in the `state.pagination.pageIndex` state.
|
|
2229
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#setpageindex)
|
|
2230
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2231
|
+
*/
|
|
2232
|
+
setPageIndex: (updater: Updater<number>) => void;
|
|
2233
|
+
/**
|
|
2234
|
+
* Updates the page size using the provided function or value in the `state.pagination.pageSize` state.
|
|
2235
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#setpagesize)
|
|
2236
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2237
|
+
*/
|
|
2238
|
+
setPageSize: (updater: Updater<number>) => void;
|
|
2239
|
+
/**
|
|
2240
|
+
* Sets or updates the `state.pagination` state.
|
|
2241
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#setpagination)
|
|
2242
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
2243
|
+
*/
|
|
2244
|
+
setPagination: (updater: Updater<PaginationState>) => void;
|
|
2245
|
+
}
|
|
2246
|
+
//#endregion
|
|
2247
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/features/RowSelection.d.ts
|
|
2248
|
+
type RowSelectionState = Record<string, boolean>;
|
|
2249
|
+
interface RowSelectionTableState {
|
|
2250
|
+
rowSelection: RowSelectionState;
|
|
2251
|
+
}
|
|
2252
|
+
interface RowSelectionOptions<TData extends RowData> {
|
|
2253
|
+
/**
|
|
2254
|
+
* - Enables/disables multiple row selection for all rows in the table OR
|
|
2255
|
+
* - A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren
|
|
2256
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#enablemultirowselection)
|
|
2257
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2258
|
+
*/
|
|
2259
|
+
enableMultiRowSelection?: boolean | ((row: Row<TData>) => boolean);
|
|
2260
|
+
/**
|
|
2261
|
+
* - Enables/disables row selection for all rows in the table OR
|
|
2262
|
+
* - A function that given a row, returns whether to enable/disable row selection for that row
|
|
2263
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#enablerowselection)
|
|
2264
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2265
|
+
*/
|
|
2266
|
+
enableRowSelection?: boolean | ((row: Row<TData>) => boolean);
|
|
2267
|
+
/**
|
|
2268
|
+
* Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row.
|
|
2269
|
+
* (Use in combination with expanding or grouping features)
|
|
2270
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#enablesubrowselection)
|
|
2271
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2272
|
+
*/
|
|
2273
|
+
enableSubRowSelection?: boolean | ((row: Row<TData>) => boolean);
|
|
2274
|
+
/**
|
|
2275
|
+
* If provided, this function will be called with an `updaterFn` when `state.rowSelection` changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table.
|
|
2276
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#onrowselectionchange)
|
|
2277
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2278
|
+
*/
|
|
2279
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
2280
|
+
}
|
|
2281
|
+
interface RowSelectionRow {
|
|
2282
|
+
/**
|
|
2283
|
+
* Returns whether or not the row can multi-select.
|
|
2284
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getcanmultiselect)
|
|
2285
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2286
|
+
*/
|
|
2287
|
+
getCanMultiSelect: () => boolean;
|
|
2288
|
+
/**
|
|
2289
|
+
* Returns whether or not the row can be selected.
|
|
2290
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getcanselect)
|
|
2291
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2292
|
+
*/
|
|
2293
|
+
getCanSelect: () => boolean;
|
|
2294
|
+
/**
|
|
2295
|
+
* Returns whether or not the row can select sub rows automatically when the parent row is selected.
|
|
2296
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getcanselectsubrows)
|
|
2297
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2298
|
+
*/
|
|
2299
|
+
getCanSelectSubRows: () => boolean;
|
|
2300
|
+
/**
|
|
2301
|
+
* Returns whether or not all of the row's sub rows are selected.
|
|
2302
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getisallsubrowsselected)
|
|
2303
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2304
|
+
*/
|
|
2305
|
+
getIsAllSubRowsSelected: () => boolean;
|
|
2306
|
+
/**
|
|
2307
|
+
* Returns whether or not the row is selected.
|
|
2308
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getisselected)
|
|
2309
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2310
|
+
*/
|
|
2311
|
+
getIsSelected: () => boolean;
|
|
2312
|
+
/**
|
|
2313
|
+
* Returns whether or not some of the row's sub rows are selected.
|
|
2314
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getissomeselected)
|
|
2315
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2316
|
+
*/
|
|
2317
|
+
getIsSomeSelected: () => boolean;
|
|
2318
|
+
/**
|
|
2319
|
+
* Returns a handler that can be used to toggle the row.
|
|
2320
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#gettoggleselectedhandler)
|
|
2321
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2322
|
+
*/
|
|
2323
|
+
getToggleSelectedHandler: () => (event: unknown) => void;
|
|
2324
|
+
/**
|
|
2325
|
+
* Selects/deselects the row.
|
|
2326
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#toggleselected)
|
|
2327
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2328
|
+
*/
|
|
2329
|
+
toggleSelected: (value?: boolean, opts?: {
|
|
2330
|
+
selectChildren?: boolean;
|
|
2331
|
+
}) => void;
|
|
2332
|
+
}
|
|
2333
|
+
interface RowSelectionInstance<TData extends RowData> {
|
|
2334
|
+
/**
|
|
2335
|
+
* Returns the row model of all rows that are selected after filtering has been applied.
|
|
2336
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getfilteredselectedrowmodel)
|
|
2337
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2338
|
+
*/
|
|
2339
|
+
getFilteredSelectedRowModel: () => RowModel<TData>;
|
|
2340
|
+
/**
|
|
2341
|
+
* Returns the row model of all rows that are selected after grouping has been applied.
|
|
2342
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getgroupedselectedrowmodel)
|
|
2343
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2344
|
+
*/
|
|
2345
|
+
getGroupedSelectedRowModel: () => RowModel<TData>;
|
|
2346
|
+
/**
|
|
2347
|
+
* Returns whether or not all rows on the current page are selected.
|
|
2348
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getisallpagerowsselected)
|
|
2349
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2350
|
+
*/
|
|
2351
|
+
getIsAllPageRowsSelected: () => boolean;
|
|
2352
|
+
/**
|
|
2353
|
+
* Returns whether or not all rows in the table are selected.
|
|
2354
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getisallrowsselected)
|
|
2355
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2356
|
+
*/
|
|
2357
|
+
getIsAllRowsSelected: () => boolean;
|
|
2358
|
+
/**
|
|
2359
|
+
* Returns whether or not any rows on the current page are selected.
|
|
2360
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getissomepagerowsselected)
|
|
2361
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2362
|
+
*/
|
|
2363
|
+
getIsSomePageRowsSelected: () => boolean;
|
|
2364
|
+
/**
|
|
2365
|
+
* Returns whether or not any rows in the table are selected.
|
|
2366
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getissomerowsselected)
|
|
2367
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2368
|
+
*/
|
|
2369
|
+
getIsSomeRowsSelected: () => boolean;
|
|
2370
|
+
/**
|
|
2371
|
+
* Returns the core row model of all rows before row selection has been applied.
|
|
2372
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getpreselectedrowmodel)
|
|
2373
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2374
|
+
*/
|
|
2375
|
+
getPreSelectedRowModel: () => RowModel<TData>;
|
|
2376
|
+
/**
|
|
2377
|
+
* Returns the row model of all rows that are selected.
|
|
2378
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#getselectedrowmodel)
|
|
2379
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2380
|
+
*/
|
|
2381
|
+
getSelectedRowModel: () => RowModel<TData>;
|
|
2382
|
+
/**
|
|
2383
|
+
* Returns a handler that can be used to toggle all rows on the current page.
|
|
2384
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#gettoggleallpagerowsselectedhandler)
|
|
2385
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2386
|
+
*/
|
|
2387
|
+
getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void;
|
|
2388
|
+
/**
|
|
2389
|
+
* Returns a handler that can be used to toggle all rows in the table.
|
|
2390
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#gettoggleallrowsselectedhandler)
|
|
2391
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2392
|
+
*/
|
|
2393
|
+
getToggleAllRowsSelectedHandler: () => (event: unknown) => void;
|
|
2394
|
+
/**
|
|
2395
|
+
* Resets the **rowSelection** state to the `initialState.rowSelection`, or `true` can be passed to force a default blank state reset to `{}`.
|
|
2396
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#resetrowselection)
|
|
2397
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2398
|
+
*/
|
|
2399
|
+
resetRowSelection: (defaultState?: boolean) => void;
|
|
2400
|
+
/**
|
|
2401
|
+
* Sets or updates the `state.rowSelection` state.
|
|
2402
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#setrowselection)
|
|
2403
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2404
|
+
*/
|
|
2405
|
+
setRowSelection: (updater: Updater<RowSelectionState>) => void;
|
|
2406
|
+
/**
|
|
2407
|
+
* Selects/deselects all rows on the current page.
|
|
2408
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#toggleallpagerowsselected)
|
|
2409
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2410
|
+
*/
|
|
2411
|
+
toggleAllPageRowsSelected: (value?: boolean) => void;
|
|
2412
|
+
/**
|
|
2413
|
+
* Selects/deselects all rows in the table.
|
|
2414
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#toggleallrowsselected)
|
|
2415
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
2416
|
+
*/
|
|
2417
|
+
toggleAllRowsSelected: (value?: boolean) => void;
|
|
2418
|
+
}
|
|
2419
|
+
//#endregion
|
|
2420
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/core/row.d.ts
|
|
2421
|
+
interface CoreRow<TData extends RowData> {
|
|
2422
|
+
_getAllCellsByColumnId: () => Record<string, Cell<TData, unknown>>;
|
|
2423
|
+
_uniqueValuesCache: Record<string, unknown>;
|
|
2424
|
+
_valuesCache: Record<string, unknown>;
|
|
2425
|
+
/**
|
|
2426
|
+
* The depth of the row (if nested or grouped) relative to the root row array.
|
|
2427
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#depth)
|
|
2428
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2429
|
+
*/
|
|
2430
|
+
depth: number;
|
|
2431
|
+
/**
|
|
2432
|
+
* Returns all of the cells for the row.
|
|
2433
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getallcells)
|
|
2434
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2435
|
+
*/
|
|
2436
|
+
getAllCells: () => Cell<TData, unknown>[];
|
|
2437
|
+
/**
|
|
2438
|
+
* Returns the leaf rows for the row, not including any parent rows.
|
|
2439
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getleafrows)
|
|
2440
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2441
|
+
*/
|
|
2442
|
+
getLeafRows: () => Row<TData>[];
|
|
2443
|
+
/**
|
|
2444
|
+
* Returns the parent row for the row, if it exists.
|
|
2445
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getparentrow)
|
|
2446
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2447
|
+
*/
|
|
2448
|
+
getParentRow: () => Row<TData> | undefined;
|
|
2449
|
+
/**
|
|
2450
|
+
* Returns the parent rows for the row, all the way up to a root row.
|
|
2451
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getparentrows)
|
|
2452
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2453
|
+
*/
|
|
2454
|
+
getParentRows: () => Row<TData>[];
|
|
2455
|
+
/**
|
|
2456
|
+
* Returns a unique array of values from the row for a given columnId.
|
|
2457
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getuniquevalues)
|
|
2458
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2459
|
+
*/
|
|
2460
|
+
getUniqueValues: <TValue>(columnId: string) => TValue[];
|
|
2461
|
+
/**
|
|
2462
|
+
* Returns the value from the row for a given columnId.
|
|
2463
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#getvalue)
|
|
2464
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2465
|
+
*/
|
|
2466
|
+
getValue: <TValue>(columnId: string) => TValue;
|
|
2467
|
+
/**
|
|
2468
|
+
* The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).
|
|
2469
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#id)
|
|
2470
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2471
|
+
*/
|
|
2472
|
+
id: string;
|
|
2473
|
+
/**
|
|
2474
|
+
* The index of the row within its parent array (or the root data array).
|
|
2475
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#index)
|
|
2476
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2477
|
+
*/
|
|
2478
|
+
index: number;
|
|
2479
|
+
/**
|
|
2480
|
+
* The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.
|
|
2481
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#original)
|
|
2482
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2483
|
+
*/
|
|
2484
|
+
original: TData;
|
|
2485
|
+
/**
|
|
2486
|
+
* An array of the original subRows as returned by the `options.getSubRows` option.
|
|
2487
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#originalsubrows)
|
|
2488
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2489
|
+
*/
|
|
2490
|
+
originalSubRows?: TData[];
|
|
2491
|
+
/**
|
|
2492
|
+
* If nested, this row's parent row id.
|
|
2493
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#parentid)
|
|
2494
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2495
|
+
*/
|
|
2496
|
+
parentId?: string;
|
|
2497
|
+
/**
|
|
2498
|
+
* Renders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
2499
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#rendervalue)
|
|
2500
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2501
|
+
*/
|
|
2502
|
+
renderValue: <TValue>(columnId: string) => TValue;
|
|
2503
|
+
/**
|
|
2504
|
+
* An array of subRows for the row as returned and created by the `options.getSubRows` option.
|
|
2505
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/row#subrows)
|
|
2506
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/rows)
|
|
2507
|
+
*/
|
|
2508
|
+
subRows: Row<TData>[];
|
|
2509
|
+
}
|
|
2510
|
+
//#endregion
|
|
2511
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/core/cell.d.ts
|
|
2512
|
+
interface CellContext<TData extends RowData, TValue> {
|
|
2513
|
+
cell: Cell<TData, TValue>;
|
|
2514
|
+
column: Column<TData, TValue>;
|
|
2515
|
+
getValue: Getter<TValue>;
|
|
2516
|
+
renderValue: Getter<TValue | null>;
|
|
2517
|
+
row: Row<TData>;
|
|
2518
|
+
table: Table<TData>;
|
|
2519
|
+
}
|
|
2520
|
+
interface CoreCell<TData extends RowData, TValue> {
|
|
2521
|
+
/**
|
|
2522
|
+
* The associated Column object for the cell.
|
|
2523
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#column)
|
|
2524
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2525
|
+
*/
|
|
2526
|
+
column: Column<TData, TValue>;
|
|
2527
|
+
/**
|
|
2528
|
+
* 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:
|
|
2529
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#getcontext)
|
|
2530
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2531
|
+
*/
|
|
2532
|
+
getContext: () => CellContext<TData, TValue>;
|
|
2533
|
+
/**
|
|
2534
|
+
* Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
|
|
2535
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#getvalue)
|
|
2536
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2537
|
+
*/
|
|
2538
|
+
getValue: CellContext<TData, TValue>['getValue'];
|
|
2539
|
+
/**
|
|
2540
|
+
* The unique ID for the cell across the entire table.
|
|
2541
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#id)
|
|
2542
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2543
|
+
*/
|
|
2544
|
+
id: string;
|
|
2545
|
+
/**
|
|
2546
|
+
* Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
2547
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#rendervalue)
|
|
2548
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2549
|
+
*/
|
|
2550
|
+
renderValue: CellContext<TData, TValue>['renderValue'];
|
|
2551
|
+
/**
|
|
2552
|
+
* The associated Row object for the cell.
|
|
2553
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/cell#row)
|
|
2554
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/cells)
|
|
2555
|
+
*/
|
|
2556
|
+
row: Row<TData>;
|
|
2557
|
+
}
|
|
2558
|
+
//#endregion
|
|
2559
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/core/column.d.ts
|
|
2560
|
+
interface CoreColumn<TData extends RowData, TValue> {
|
|
2561
|
+
/**
|
|
2562
|
+
* 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.
|
|
2563
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#accessorfn)
|
|
2564
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2565
|
+
*/
|
|
2566
|
+
accessorFn?: AccessorFn<TData, TValue>;
|
|
2567
|
+
/**
|
|
2568
|
+
* The original column def used to create the column.
|
|
2569
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#columndef)
|
|
2570
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2571
|
+
*/
|
|
2572
|
+
columnDef: ColumnDef<TData, TValue>;
|
|
2573
|
+
/**
|
|
2574
|
+
* The child column (if the column is a group column). Will be an empty array if the column is not a group column.
|
|
2575
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#columns)
|
|
2576
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2577
|
+
*/
|
|
2578
|
+
columns: Column<TData, TValue>[];
|
|
2579
|
+
/**
|
|
2580
|
+
* The depth of the column (if grouped) relative to the root column def array.
|
|
2581
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#depth)
|
|
2582
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2583
|
+
*/
|
|
2584
|
+
depth: number;
|
|
2585
|
+
/**
|
|
2586
|
+
* Returns the flattened array of this column and all child/grand-child columns for this column.
|
|
2587
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#getflatcolumns)
|
|
2588
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2589
|
+
*/
|
|
2590
|
+
getFlatColumns: () => Column<TData, TValue>[];
|
|
2591
|
+
/**
|
|
2592
|
+
* Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.
|
|
2593
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#getleafcolumns)
|
|
2594
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2595
|
+
*/
|
|
2596
|
+
getLeafColumns: () => Column<TData, TValue>[];
|
|
2597
|
+
/**
|
|
2598
|
+
* The resolved unique identifier for the column resolved in this priority:
|
|
2599
|
+
- A manual `id` property from the column def
|
|
2600
|
+
- The accessor key from the column def
|
|
2601
|
+
- The header string from the column def
|
|
2602
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#id)
|
|
2603
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2604
|
+
*/
|
|
2605
|
+
id: string;
|
|
2606
|
+
/**
|
|
2607
|
+
* The parent column for this column. Will be undefined if this is a root column.
|
|
2608
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/core/column#parent)
|
|
2609
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-defs)
|
|
2610
|
+
*/
|
|
2611
|
+
parent?: Column<TData, TValue>;
|
|
2612
|
+
}
|
|
2613
|
+
//#endregion
|
|
2614
|
+
//#region ../../node_modules/@tanstack/table-core/build/lib/types.d.ts
|
|
2615
|
+
interface TableFeature<TData extends RowData = any> {
|
|
2616
|
+
createCell?: (cell: Cell<TData, unknown>, column: Column<TData>, row: Row<TData>, table: Table<TData>) => void;
|
|
2617
|
+
createColumn?: (column: Column<TData, unknown>, table: Table<TData>) => void;
|
|
2618
|
+
createHeader?: (header: Header<TData, unknown>, table: Table<TData>) => void;
|
|
2619
|
+
createRow?: (row: Row<TData>, table: Table<TData>) => void;
|
|
2620
|
+
createTable?: (table: Table<TData>) => void;
|
|
2621
|
+
getDefaultColumnDef?: () => Partial<ColumnDef<TData, unknown>>;
|
|
2622
|
+
getDefaultOptions?: (table: Table<TData>) => Partial<TableOptionsResolved<TData>>;
|
|
2623
|
+
getInitialState?: (initialState?: InitialTableState) => Partial<TableState>;
|
|
2624
|
+
}
|
|
2625
|
+
interface TableMeta<TData extends RowData> {}
|
|
2626
|
+
interface ColumnMeta<TData extends RowData, TValue> {}
|
|
2627
|
+
interface FilterMeta {}
|
|
2628
|
+
interface FilterFns {}
|
|
2629
|
+
interface SortingFns {}
|
|
2630
|
+
interface AggregationFns {}
|
|
2631
|
+
type Updater<T> = T | ((old: T) => T);
|
|
2632
|
+
type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void;
|
|
2633
|
+
type RowData = unknown | object | any[];
|
|
2634
|
+
interface Table<TData extends RowData> extends CoreInstance<TData>, HeadersInstance<TData>, VisibilityInstance<TData>, ColumnOrderInstance<TData>, ColumnPinningInstance<TData>, RowPinningInstance<TData>, ColumnFiltersInstance<TData>, GlobalFilterInstance<TData>, GlobalFacetingInstance<TData>, SortingInstance<TData>, GroupingInstance<TData>, ColumnSizingInstance, ExpandedInstance<TData>, PaginationInstance<TData>, RowSelectionInstance<TData> {}
|
|
2635
|
+
interface FeatureOptions<TData extends RowData> extends VisibilityOptions, ColumnOrderOptions, ColumnPinningOptions, RowPinningOptions<TData>, FacetedOptions<TData>, ColumnFiltersOptions<TData>, GlobalFilterOptions<TData>, SortingOptions<TData>, GroupingOptions, ExpandedOptions<TData>, ColumnSizingOptions, PaginationOptions, RowSelectionOptions<TData> {}
|
|
2636
|
+
interface TableOptionsResolved<TData extends RowData> extends CoreOptions<TData>, FeatureOptions<TData> {}
|
|
2637
|
+
interface TableOptions<TData extends RowData> extends PartialKeys<TableOptionsResolved<TData>, 'state' | 'onStateChange' | 'renderFallbackValue'> {}
|
|
2638
|
+
interface TableState extends CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, RowPinningTableState, ColumnFiltersTableState, GlobalFilterTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationTableState, RowSelectionTableState {}
|
|
2639
|
+
interface CompleteInitialTableState extends CoreTableState, VisibilityTableState, ColumnOrderTableState, ColumnPinningTableState, RowPinningTableState, ColumnFiltersTableState, GlobalFilterTableState, SortingTableState, ExpandedTableState, GroupingTableState, ColumnSizingTableState, PaginationInitialTableState, RowSelectionTableState {}
|
|
2640
|
+
interface InitialTableState extends Partial<CompleteInitialTableState> {}
|
|
2641
|
+
interface Row<TData extends RowData> extends CoreRow<TData>, VisibilityRow<TData>, ColumnPinningRow<TData>, RowPinningRow, ColumnFiltersRow<TData>, GroupingRow, RowSelectionRow, ExpandedRow {}
|
|
2642
|
+
interface RowModel<TData extends RowData> {
|
|
2643
|
+
rows: Row<TData>[];
|
|
2644
|
+
flatRows: Row<TData>[];
|
|
2645
|
+
rowsById: Record<string, Row<TData>>;
|
|
2646
|
+
}
|
|
2647
|
+
type AccessorFn<TData extends RowData, TValue = unknown> = (originalRow: TData, index: number) => TValue;
|
|
2648
|
+
type ColumnDefTemplate<TProps extends object> = string | ((props: TProps) => any);
|
|
2649
|
+
type StringOrTemplateHeader<TData, TValue> = string | ColumnDefTemplate<HeaderContext<TData, TValue>>;
|
|
2650
|
+
interface StringHeaderIdentifier {
|
|
2651
|
+
header: string;
|
|
2652
|
+
id?: string;
|
|
2653
|
+
}
|
|
2654
|
+
interface IdIdentifier<TData extends RowData, TValue> {
|
|
2655
|
+
id: string;
|
|
2656
|
+
header?: StringOrTemplateHeader<TData, TValue>;
|
|
2657
|
+
}
|
|
2658
|
+
type ColumnIdentifiers<TData extends RowData, TValue> = IdIdentifier<TData, TValue> | StringHeaderIdentifier;
|
|
2659
|
+
interface ColumnDefExtensions<TData extends RowData, TValue = unknown> extends VisibilityColumnDef, ColumnPinningColumnDef, ColumnFiltersColumnDef<TData>, GlobalFilterColumnDef, SortingColumnDef<TData>, GroupingColumnDef<TData, TValue>, ColumnSizingColumnDef {}
|
|
2660
|
+
interface ColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefExtensions<TData, TValue> {
|
|
2661
|
+
getUniqueValues?: AccessorFn<TData, unknown[]>;
|
|
2662
|
+
footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
|
|
2663
|
+
cell?: ColumnDefTemplate<CellContext<TData, TValue>>;
|
|
2664
|
+
meta?: ColumnMeta<TData, TValue>;
|
|
2665
|
+
}
|
|
2666
|
+
type DisplayColumnDef<TData extends RowData, TValue = unknown> = ColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>;
|
|
2667
|
+
interface GroupColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
|
|
2668
|
+
columns?: ColumnDef<TData, any>[];
|
|
2669
|
+
}
|
|
2670
|
+
type GroupColumnDef<TData extends RowData, TValue = unknown> = GroupColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>;
|
|
2671
|
+
interface AccessorFnColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
|
|
2672
|
+
accessorFn: AccessorFn<TData, TValue>;
|
|
2673
|
+
}
|
|
2674
|
+
type AccessorFnColumnDef<TData extends RowData, TValue = unknown> = AccessorFnColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>;
|
|
2675
|
+
interface AccessorKeyColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
|
|
2676
|
+
id?: string;
|
|
2677
|
+
accessorKey: (string & {}) | keyof TData;
|
|
2678
|
+
}
|
|
2679
|
+
type AccessorKeyColumnDef<TData extends RowData, TValue = unknown> = AccessorKeyColumnDefBase<TData, TValue> & Partial<ColumnIdentifiers<TData, TValue>>;
|
|
2680
|
+
type AccessorColumnDef<TData extends RowData, TValue = unknown> = AccessorKeyColumnDef<TData, TValue> | AccessorFnColumnDef<TData, TValue>;
|
|
2681
|
+
type ColumnDef<TData extends RowData, TValue = unknown> = DisplayColumnDef<TData, TValue> | GroupColumnDef<TData, TValue> | AccessorColumnDef<TData, TValue>;
|
|
2682
|
+
interface Column<TData extends RowData, TValue = unknown> extends CoreColumn<TData, TValue>, VisibilityColumn, ColumnPinningColumn, FacetedColumn<TData>, ColumnFiltersColumn<TData>, GlobalFilterColumn, SortingColumn<TData>, GroupingColumn<TData>, ColumnSizingColumn, ColumnOrderColumn {}
|
|
2683
|
+
interface Cell<TData extends RowData, TValue> extends CoreCell<TData, TValue>, GroupingCell {}
|
|
2684
|
+
interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader {}
|
|
2685
|
+
interface HeaderGroup<TData extends RowData> extends CoreHeaderGroup<TData> {}
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region ../components/dist/index.cjs.d.ts
|
|
2688
|
+
//#endregion
|
|
2689
|
+
//#region src/core/styles/common/types.d.ts
|
|
2690
|
+
interface AccentColor {
|
|
2691
|
+
surfacePrimary: string;
|
|
2692
|
+
surfaceSecondary: string;
|
|
2693
|
+
surfaceSecondaryOnDark: string;
|
|
2694
|
+
textAction: string;
|
|
2695
|
+
textActionHover: string;
|
|
2696
|
+
textActionPressed: string;
|
|
2697
|
+
fillHover: string;
|
|
2698
|
+
fillPressed: string;
|
|
2699
|
+
fillPrimary: string;
|
|
2700
|
+
foreground: string;
|
|
2701
|
+
foregroundOnDark: string;
|
|
2702
|
+
foregroundInteraction: string;
|
|
2703
|
+
foregroundInteractionOnDark: string;
|
|
2704
|
+
foregroundPressed: string;
|
|
2705
|
+
foregroundPressedOnDark: string;
|
|
2706
|
+
foregroundActive: string;
|
|
2707
|
+
fillInteraction: string;
|
|
2708
|
+
border: string;
|
|
2709
|
+
borderHover: string;
|
|
2710
|
+
borderPressed: string;
|
|
2711
|
+
borderOpen: string;
|
|
2712
|
+
borderFocus: string;
|
|
2713
|
+
borderSelected: string;
|
|
2714
|
+
ornament: string;
|
|
2715
|
+
ornamentHover: string;
|
|
2716
|
+
ornamentPressed: string;
|
|
2717
|
+
ornamentOpen: string;
|
|
2718
|
+
ornamentFocus: string;
|
|
2719
|
+
ornamentSelected: string;
|
|
2720
|
+
}
|
|
2721
|
+
interface BaseColor {
|
|
2722
|
+
backgroundPrimary: string;
|
|
2723
|
+
backgroundPrimaryDark: string;
|
|
2724
|
+
backgroundPrimaryInverse: string;
|
|
2725
|
+
backgroundSecondary: string;
|
|
2726
|
+
backgroundSecondaryDark: string;
|
|
2727
|
+
backgroundSecondaryInverse: string;
|
|
2728
|
+
backgroundTertiary: string;
|
|
2729
|
+
surfacePrimary: string;
|
|
2730
|
+
surfaceSecondary: string;
|
|
2731
|
+
surfacePrimaryDark: string;
|
|
2732
|
+
surfaceInverse: string;
|
|
2733
|
+
textPrimary: string;
|
|
2734
|
+
textPrimaryOnDark: string;
|
|
2735
|
+
textPrimaryInverse: string;
|
|
2736
|
+
textSecondary: string;
|
|
2737
|
+
textSecondaryOnDark: string;
|
|
2738
|
+
textSecondaryInverse: string;
|
|
2739
|
+
textTertiary: string;
|
|
2740
|
+
textTertiaryOnDark: string;
|
|
2741
|
+
textTertiaryInverse: string;
|
|
2742
|
+
textDisabled: string;
|
|
2743
|
+
textDisabledOnDark: string;
|
|
2744
|
+
textDisabledInverse: string;
|
|
2745
|
+
textOnFill: string;
|
|
2746
|
+
fillPrimaryInteraction: string;
|
|
2747
|
+
fillPrimaryInteractionOnDark: string;
|
|
2748
|
+
fillHoverInverse: string;
|
|
2749
|
+
fillPrimaryPressed: string;
|
|
2750
|
+
fillPrimaryPressedOnDark: string;
|
|
2751
|
+
fillPressedInverse: string;
|
|
2752
|
+
fillPrimary: string;
|
|
2753
|
+
fillOpenInverse: string;
|
|
2754
|
+
fillSelected: string;
|
|
2755
|
+
fillDisabled: string;
|
|
2756
|
+
fillSecondary: string;
|
|
2757
|
+
fillSecondaryInteraction: string;
|
|
2758
|
+
fillSecondaryPressed: string;
|
|
2759
|
+
fillSecondaryOnDark: string;
|
|
2760
|
+
fillSecondaryInteractionOnDark: string;
|
|
2761
|
+
fillSecondaryPressedOnDark: string;
|
|
2762
|
+
fillDisabledOnDark: string;
|
|
2763
|
+
divider: string;
|
|
2764
|
+
dividerOnDark: string;
|
|
2765
|
+
dividerInverse: string;
|
|
2766
|
+
borderPrimary: string;
|
|
2767
|
+
borderPrimaryOnDark: string;
|
|
2768
|
+
borderPrimaryInverse: string;
|
|
2769
|
+
borderSecondary: string;
|
|
2770
|
+
borderPrimaryInteraction: string;
|
|
2771
|
+
borderPrimaryInteractionOnDark: string;
|
|
2772
|
+
borderPrimaryHoverInverse: string;
|
|
2773
|
+
borderOnFill: string;
|
|
2774
|
+
borderPrimaryPressedInverse: string;
|
|
2775
|
+
borderPrimaryDisabled: string;
|
|
2776
|
+
borderPrimaryDisabledOnDark: string;
|
|
2777
|
+
borderPrimaryDisabledInverse: string;
|
|
2778
|
+
borderSecondaryOnDark: string;
|
|
2779
|
+
ornamentDisabled: string;
|
|
2780
|
+
ornamentDisabledOnDark: string;
|
|
2781
|
+
ornamentDisabledInverse: string;
|
|
2782
|
+
ornamentOnFill: string;
|
|
2783
|
+
ornamentPrimary: string;
|
|
2784
|
+
ornamentPrimaryOnDark: string;
|
|
2785
|
+
ornamentPrimaryInverse: string;
|
|
2786
|
+
ornamentSecondary: string;
|
|
2787
|
+
ornamentSecondaryOnDark: string;
|
|
2788
|
+
ornamentSecondaryInverse: string;
|
|
2789
|
+
ornamentSecondaryInteraction: string;
|
|
2790
|
+
ornamentSecondaryInteractionOnDark: string;
|
|
2791
|
+
ornamentSecondaryHoverInverse: string;
|
|
2792
|
+
ornamentSecondaryPressedInverse: string;
|
|
2793
|
+
}
|
|
2794
|
+
interface IntentColor {
|
|
2795
|
+
surfacePrimary: string;
|
|
2796
|
+
surfaceSecondary: string;
|
|
2797
|
+
text: string;
|
|
2798
|
+
fillPrimary: string;
|
|
2799
|
+
fillSecondary: string;
|
|
2800
|
+
fillHover: string;
|
|
2801
|
+
fillPressed: string;
|
|
2802
|
+
border: string;
|
|
2803
|
+
ornament: string;
|
|
2804
|
+
foreground: string;
|
|
2805
|
+
foregroundOnDark: string;
|
|
2806
|
+
foregroundInteraction: string;
|
|
2807
|
+
foregroundInteractionOnDark: string;
|
|
2808
|
+
foregroundPressed: string;
|
|
2809
|
+
foregroundPressedOnDark: string;
|
|
2810
|
+
fillInteraction: string;
|
|
2811
|
+
}
|
|
2812
|
+
/**
|
|
2813
|
+
* (masoudmanson): The SDSPalette is a custom palette based on
|
|
2814
|
+
* the semantic design tokens for the SDS components.
|
|
2815
|
+
*/
|
|
2816
|
+
interface SDSPalette {
|
|
2817
|
+
accent: AccentColor;
|
|
2818
|
+
base: BaseColor;
|
|
2819
|
+
beta: IntentColor;
|
|
2820
|
+
info: IntentColor;
|
|
2821
|
+
negative: IntentColor;
|
|
2822
|
+
notice: IntentColor;
|
|
2823
|
+
neutral: IntentColor;
|
|
2824
|
+
positive: IntentColor;
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
* (masoudmanson): Using module augmentation to extend the MUI Palette
|
|
2828
|
+
* https://mui.com/material-ui/customization/palette/#typescript
|
|
2829
|
+
*/
|
|
2830
|
+
declare module "@mui/material/styles" {
|
|
2831
|
+
interface Palette {
|
|
2832
|
+
sds: SDSPalette;
|
|
2833
|
+
}
|
|
2834
|
+
interface PaletteOptions {
|
|
2835
|
+
sds?: SDSPalette;
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* @see https://mui.com/material-ui/customization/breakpoints/#custom-breakpoints
|
|
2839
|
+
* (masoudmanson): ModuleAugmentation is required for TypeScript to recognize the
|
|
2840
|
+
* custom breakpoints added to the theme.
|
|
2841
|
+
*/
|
|
2842
|
+
interface BreakpointOverrides {
|
|
2843
|
+
xs: false;
|
|
2844
|
+
sm: true;
|
|
2845
|
+
md: true;
|
|
2846
|
+
lg: true;
|
|
2847
|
+
xl: false;
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
interface SDSTheme extends Theme {
|
|
2851
|
+
app?: AppTheme;
|
|
2852
|
+
}
|
|
2853
|
+
interface AppTheme {
|
|
2854
|
+
borders?: Borders;
|
|
2855
|
+
colors: Colors;
|
|
2856
|
+
corners: Corners;
|
|
2857
|
+
fontWeights: FontWeights;
|
|
2858
|
+
iconSizes: IconSizes;
|
|
2859
|
+
shadows: Shadows;
|
|
2860
|
+
spacing: Spaces;
|
|
2861
|
+
typography: Typography;
|
|
2862
|
+
}
|
|
2863
|
+
interface Shadows {
|
|
2864
|
+
none: "none";
|
|
2865
|
+
s: string;
|
|
2866
|
+
m: string;
|
|
2867
|
+
l: string;
|
|
2868
|
+
}
|
|
2869
|
+
interface TypographyStyles {
|
|
2870
|
+
body: {
|
|
2871
|
+
regular: {
|
|
2872
|
+
l: TypographyStyle;
|
|
2873
|
+
m: TypographyStyle;
|
|
2874
|
+
s: TypographyStyle;
|
|
2875
|
+
xs: TypographyStyle;
|
|
2876
|
+
xxs: TypographyStyle;
|
|
2877
|
+
xxxs: TypographyStyle;
|
|
2878
|
+
xxxxs: TypographyStyle;
|
|
2879
|
+
};
|
|
2880
|
+
medium: {
|
|
2881
|
+
l: TypographyStyle;
|
|
2882
|
+
m: TypographyStyle;
|
|
2883
|
+
s: TypographyStyle;
|
|
2884
|
+
xs: TypographyStyle;
|
|
2885
|
+
xxs: TypographyStyle;
|
|
2886
|
+
xxxs: TypographyStyle;
|
|
2887
|
+
xxxxs: TypographyStyle;
|
|
2888
|
+
};
|
|
2889
|
+
semibold: {
|
|
2890
|
+
l: TypographyStyle;
|
|
2891
|
+
m: TypographyStyle;
|
|
2892
|
+
s: TypographyStyle;
|
|
2893
|
+
xs: TypographyStyle;
|
|
2894
|
+
xxs: TypographyStyle;
|
|
2895
|
+
xxxs: TypographyStyle;
|
|
2896
|
+
xxxxs: TypographyStyle;
|
|
2897
|
+
};
|
|
2898
|
+
};
|
|
2899
|
+
caps: {
|
|
2900
|
+
semibold: {
|
|
2901
|
+
xxs: TypographyStyle;
|
|
2902
|
+
xxxs: TypographyStyle;
|
|
2903
|
+
xxxxs: TypographyStyle;
|
|
2904
|
+
};
|
|
2905
|
+
};
|
|
2906
|
+
code: {
|
|
2907
|
+
regular: {
|
|
2908
|
+
s: TypographyStyle;
|
|
2909
|
+
xs: TypographyStyle;
|
|
2910
|
+
};
|
|
2911
|
+
medium: {
|
|
2912
|
+
s: TypographyStyle;
|
|
2913
|
+
xs: TypographyStyle;
|
|
2914
|
+
};
|
|
2915
|
+
semibold: {
|
|
2916
|
+
s: TypographyStyle;
|
|
2917
|
+
xs: TypographyStyle;
|
|
2918
|
+
};
|
|
2919
|
+
};
|
|
2920
|
+
header: {
|
|
2921
|
+
semibold: {
|
|
2922
|
+
xxl: TypographyStyle;
|
|
2923
|
+
xl: TypographyStyle;
|
|
2924
|
+
l: TypographyStyle;
|
|
2925
|
+
m: TypographyStyle;
|
|
2926
|
+
s: TypographyStyle;
|
|
2927
|
+
xs: TypographyStyle;
|
|
2928
|
+
xxs: TypographyStyle;
|
|
2929
|
+
xxxs: TypographyStyle;
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
link: {
|
|
2933
|
+
regular: {
|
|
2934
|
+
l: TypographyStyle;
|
|
2935
|
+
m: TypographyStyle;
|
|
2936
|
+
s: TypographyStyle;
|
|
2937
|
+
xs: TypographyStyle;
|
|
2938
|
+
xxs: TypographyStyle;
|
|
2939
|
+
xxxs: TypographyStyle;
|
|
2940
|
+
xxxxs: TypographyStyle;
|
|
2941
|
+
};
|
|
2942
|
+
medium: {
|
|
2943
|
+
l: TypographyStyle;
|
|
2944
|
+
m: TypographyStyle;
|
|
2945
|
+
s: TypographyStyle;
|
|
2946
|
+
xs: TypographyStyle;
|
|
2947
|
+
xxs: TypographyStyle;
|
|
2948
|
+
xxxs: TypographyStyle;
|
|
2949
|
+
xxxxs: TypographyStyle;
|
|
2950
|
+
};
|
|
2951
|
+
semibold: {
|
|
2952
|
+
l: TypographyStyle;
|
|
2953
|
+
m: TypographyStyle;
|
|
2954
|
+
s: TypographyStyle;
|
|
2955
|
+
xs: TypographyStyle;
|
|
2956
|
+
xxs: TypographyStyle;
|
|
2957
|
+
xxxs: TypographyStyle;
|
|
2958
|
+
xxxxs: TypographyStyle;
|
|
2959
|
+
};
|
|
2960
|
+
};
|
|
2961
|
+
tabular: {
|
|
2962
|
+
regular: {
|
|
2963
|
+
s: TypographyStyle;
|
|
2964
|
+
xs: TypographyStyle;
|
|
2965
|
+
xxs: TypographyStyle;
|
|
2966
|
+
xxxs: TypographyStyle;
|
|
2967
|
+
xxxxs: TypographyStyle;
|
|
2968
|
+
};
|
|
2969
|
+
medium: {
|
|
2970
|
+
s: TypographyStyle;
|
|
2971
|
+
xs: TypographyStyle;
|
|
2972
|
+
xxs: TypographyStyle;
|
|
2973
|
+
xxxs: TypographyStyle;
|
|
2974
|
+
xxxxs: TypographyStyle;
|
|
2975
|
+
};
|
|
2976
|
+
semibold: {
|
|
2977
|
+
s: TypographyStyle;
|
|
2978
|
+
xs: TypographyStyle;
|
|
2979
|
+
xxs: TypographyStyle;
|
|
2980
|
+
xxxs: TypographyStyle;
|
|
2981
|
+
xxxxs: TypographyStyle;
|
|
2982
|
+
};
|
|
2983
|
+
};
|
|
2984
|
+
title: {
|
|
2985
|
+
bold: {
|
|
2986
|
+
s: TypographyStyle;
|
|
2987
|
+
m: TypographyStyle;
|
|
2988
|
+
l: TypographyStyle;
|
|
2989
|
+
};
|
|
2990
|
+
};
|
|
2991
|
+
}
|
|
2992
|
+
interface Typography {
|
|
2993
|
+
fontFamily: {
|
|
2994
|
+
body: CSSProperties["fontFamily"];
|
|
2995
|
+
caps?: CSSProperties["fontFamily"];
|
|
2996
|
+
code?: CSSProperties["fontFamily"];
|
|
2997
|
+
header?: CSSProperties["fontFamily"];
|
|
2998
|
+
link?: CSSProperties["fontFamily"];
|
|
2999
|
+
tabular?: CSSProperties["fontFamily"];
|
|
3000
|
+
title?: CSSProperties["fontFamily"];
|
|
3001
|
+
};
|
|
3002
|
+
wideStyles: TypographyStyles;
|
|
3003
|
+
narrowStyles: TypographyStyles;
|
|
3004
|
+
}
|
|
3005
|
+
interface FontWeights {
|
|
3006
|
+
bold: number;
|
|
3007
|
+
light: number;
|
|
3008
|
+
medium: number;
|
|
3009
|
+
regular: number;
|
|
3010
|
+
semibold: number;
|
|
3011
|
+
}
|
|
3012
|
+
interface Corners {
|
|
3013
|
+
none: number;
|
|
3014
|
+
s: number;
|
|
3015
|
+
m: number;
|
|
3016
|
+
l: number;
|
|
3017
|
+
xl: number;
|
|
3018
|
+
rounded: number;
|
|
3019
|
+
}
|
|
3020
|
+
interface Spaces {
|
|
3021
|
+
default: number;
|
|
3022
|
+
xxxs: number;
|
|
3023
|
+
xxs: number;
|
|
3024
|
+
xs: number;
|
|
3025
|
+
s: number;
|
|
3026
|
+
m: number;
|
|
3027
|
+
l: number;
|
|
3028
|
+
xl: number;
|
|
3029
|
+
xxl: number;
|
|
3030
|
+
xxxl: number;
|
|
3031
|
+
}
|
|
3032
|
+
/**
|
|
3033
|
+
* @deprecated
|
|
3034
|
+
*
|
|
3035
|
+
* (masoudmanson): The Spacings type is an alias for the Spaces type and
|
|
3036
|
+
* is deprecated. It is recommended to use the Spaces type instead.
|
|
3037
|
+
*/
|
|
3038
|
+
interface Color {
|
|
3039
|
+
900?: string;
|
|
3040
|
+
800: string;
|
|
3041
|
+
700: string;
|
|
3042
|
+
600: string;
|
|
3043
|
+
500: string;
|
|
3044
|
+
400: string;
|
|
3045
|
+
300: string;
|
|
3046
|
+
200: string;
|
|
3047
|
+
100: string;
|
|
3048
|
+
75?: string;
|
|
3049
|
+
50?: string;
|
|
3050
|
+
}
|
|
3051
|
+
interface Colors {
|
|
3052
|
+
blue: Color;
|
|
3053
|
+
gray: Color;
|
|
3054
|
+
indigo: Color;
|
|
3055
|
+
green: Color;
|
|
3056
|
+
purple: Color;
|
|
3057
|
+
red: Color;
|
|
3058
|
+
yellow: Color;
|
|
3059
|
+
}
|
|
3060
|
+
interface IconSize {
|
|
3061
|
+
height: number;
|
|
3062
|
+
width: number;
|
|
3063
|
+
}
|
|
3064
|
+
interface IconSizes {
|
|
3065
|
+
xxs: IconSize;
|
|
3066
|
+
xs: IconSize;
|
|
3067
|
+
s: IconSize;
|
|
3068
|
+
l: IconSize;
|
|
3069
|
+
xl: IconSize;
|
|
3070
|
+
input: IconSize;
|
|
3071
|
+
}
|
|
3072
|
+
interface Border {
|
|
3073
|
+
default?: string;
|
|
3074
|
+
divider?: string;
|
|
3075
|
+
dividerInverse?: string;
|
|
3076
|
+
black?: string;
|
|
3077
|
+
solid?: string;
|
|
3078
|
+
dashed?: string;
|
|
3079
|
+
hover?: string;
|
|
3080
|
+
inverse?: string;
|
|
3081
|
+
disabled?: string;
|
|
3082
|
+
table?: string;
|
|
3083
|
+
pressed?: string;
|
|
3084
|
+
open?: string;
|
|
3085
|
+
focused?: string;
|
|
3086
|
+
selected?: string;
|
|
3087
|
+
thick?: string;
|
|
3088
|
+
extraThick?: string;
|
|
3089
|
+
}
|
|
3090
|
+
interface Borders {
|
|
3091
|
+
accent: Border;
|
|
3092
|
+
base: Border;
|
|
3093
|
+
beta: Border;
|
|
3094
|
+
info: Border;
|
|
3095
|
+
link: Border;
|
|
3096
|
+
negative: Border;
|
|
3097
|
+
neutral: Border;
|
|
3098
|
+
none: string;
|
|
3099
|
+
notice: Border;
|
|
3100
|
+
positive: Border;
|
|
3101
|
+
} //#endregion
|
|
3102
|
+
//#region src/core/styles/common/defaultTheme.d.ts
|
|
3103
|
+
/**
|
|
3104
|
+
* Theme adaptor with light/dark mode support.
|
|
3105
|
+
*
|
|
3106
|
+
* @param t The theme to use. Currently supports a light and dark variant.
|
|
3107
|
+
* @returns The selected theme object to be used in the ThemeProvider
|
|
3108
|
+
*/
|
|
3109
|
+
//#endregion
|
|
3110
|
+
//#region src/core/styles/common/selectors/theme.d.ts
|
|
3111
|
+
interface CommonThemeProps {
|
|
3112
|
+
theme?: SDSTheme;
|
|
3113
|
+
}
|
|
3114
|
+
//#endregion
|
|
3115
|
+
//#region src/core/Tooltip/style.d.ts
|
|
3116
|
+
interface TooltipExtraProps extends CommonThemeProps {
|
|
3117
|
+
arrowOffset?: number;
|
|
3118
|
+
followCursor?: boolean;
|
|
3119
|
+
inverted?: boolean;
|
|
3120
|
+
sdsStyle?: "dark" | "light";
|
|
3121
|
+
hasInvertedStyle?: boolean;
|
|
3122
|
+
title?: React.ReactNode;
|
|
3123
|
+
subtitle?: React.ReactNode;
|
|
3124
|
+
width?: "default" | "wide";
|
|
3125
|
+
textAlign?: "left" | "center" | "right";
|
|
3126
|
+
componentSlot?: React.ReactNode;
|
|
3127
|
+
/**
|
|
3128
|
+
* (v9): MUI removed the Tooltip `PopperComponent` prop in favor of
|
|
3129
|
+
* `slots.popper`. We keep `PopperComponent` as an SDS prop for backward
|
|
3130
|
+
* compatibility and map it to `slots.popper` internally.
|
|
3131
|
+
*/
|
|
3132
|
+
PopperComponent?: React.ElementType;
|
|
3133
|
+
} //#endregion
|
|
3134
|
+
//#region src/core/Tooltip/index.d.ts
|
|
3135
|
+
type TooltipProps$1 = TooltipExtraProps & TooltipProps;
|
|
3136
|
+
/**
|
|
3137
|
+
* @see https://mui.com/material-ui/react-tooltip/
|
|
3138
|
+
*
|
|
3139
|
+
* @warning If the tooltip wraps a disabled component, please make sure to
|
|
3140
|
+
* wrap the children in a `<span>` tag.
|
|
3141
|
+
* https://mui.com/components/tooltips/#disabled-elements
|
|
3142
|
+
*/
|
|
3143
|
+
//#endregion
|
|
3144
|
+
//#region src/core/CellHeader/style.d.ts
|
|
3145
|
+
interface CellHeaderExtraProps extends CommonThemeProps {
|
|
3146
|
+
active?: boolean;
|
|
3147
|
+
hideSortIcon?: boolean;
|
|
3148
|
+
horizontalAlign?: "left" | "center" | "right";
|
|
3149
|
+
hover?: boolean;
|
|
3150
|
+
shouldTruncate?: boolean;
|
|
3151
|
+
} //#endregion
|
|
3152
|
+
//#region src/core/CellHeader/index.d.ts
|
|
3153
|
+
type CellHeaderDirection = "asc" | "desc";
|
|
3154
|
+
interface CellHeaderContentProps {
|
|
3155
|
+
active?: boolean;
|
|
3156
|
+
direction?: CellHeaderDirection;
|
|
3157
|
+
hideSortIcon?: boolean;
|
|
3158
|
+
horizontalAlign?: "left" | "center" | "right";
|
|
3159
|
+
children: React$1.ReactNode;
|
|
3160
|
+
hover?: boolean;
|
|
3161
|
+
shouldTruncate?: boolean;
|
|
3162
|
+
}
|
|
3163
|
+
interface CellHeaderRawProps extends Omit<React$1.HTMLProps<HTMLDivElement>, "as"> {
|
|
3164
|
+
as?: React$1.ElementType;
|
|
3165
|
+
tooltipText?: string;
|
|
3166
|
+
tooltipSubtitle?: string;
|
|
3167
|
+
shouldShowTooltipOnHover?: boolean;
|
|
3168
|
+
tooltipProps?: Partial<TooltipProps$1>;
|
|
3169
|
+
}
|
|
3170
|
+
type CellHeaderProps = CellHeaderRawProps & CellHeaderExtraProps & CellHeaderContentProps;
|
|
3171
|
+
//#endregion
|
|
3172
|
+
//#region src/core/PreComposedTable/index.d.ts
|
|
3173
|
+
declare module "@tanstack/react-table" {
|
|
3174
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
3175
|
+
pinning?: "left" | "right";
|
|
3176
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
3177
|
+
isGrow?: boolean;
|
|
3178
|
+
widthPercentage?: number;
|
|
3179
|
+
headerCellProps?: Partial<CellHeaderProps>;
|
|
3180
|
+
filterComponent?: (props: {
|
|
3181
|
+
column: Column<TData, unknown>;
|
|
3182
|
+
table: Table<TData>;
|
|
3183
|
+
}) => React$1.ReactNode;
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
//#endregion
|
|
3187
|
+
//#region src/core/TooltipTable/style.d.ts
|
|
3188
|
+
interface TooltipTableExtraProps extends CommonThemeProps {
|
|
3189
|
+
data?: Array<{
|
|
3190
|
+
label?: string;
|
|
3191
|
+
dataRows: {
|
|
3192
|
+
label: string;
|
|
3193
|
+
value: string | number;
|
|
3194
|
+
}[];
|
|
177
3195
|
disabled?: boolean;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
3196
|
+
}>;
|
|
3197
|
+
contentAlert?: string | JSX.Element;
|
|
3198
|
+
itemAlign?: "left" | "right";
|
|
3199
|
+
showSectionHeader?: boolean;
|
|
3200
|
+
} //#endregion
|
|
3201
|
+
//#region src/core/TooltipTable/index.d.ts
|
|
3202
|
+
type TooltipTableContentProps = TooltipTableExtraProps;
|
|
3203
|
+
/**
|
|
3204
|
+
* @see https://mui.com/material-ui/react-table/
|
|
3205
|
+
*/
|
|
3206
|
+
//#endregion
|
|
3207
|
+
//#region src/common/helpers/discreteColorGenerator.d.ts
|
|
3208
|
+
interface DiscreteColorGeneratorOptions {
|
|
3209
|
+
/**
|
|
3210
|
+
* Whether dark mode is enabled (reverses color order for better contrast)
|
|
3211
|
+
* @default false
|
|
3212
|
+
*/
|
|
3213
|
+
isDarkMode?: boolean;
|
|
3214
|
+
/**
|
|
3215
|
+
* Starting hue in degrees (0-360)
|
|
3216
|
+
* @default 250
|
|
3217
|
+
*/
|
|
3218
|
+
start?: number;
|
|
3219
|
+
/**
|
|
3220
|
+
* Number of rotations around the color wheel
|
|
3221
|
+
* @default 0.85
|
|
3222
|
+
*/
|
|
3223
|
+
rotations?: number;
|
|
3224
|
+
/**
|
|
3225
|
+
* Gamma correction value (affects color distribution)
|
|
3226
|
+
* @default 0.7
|
|
3227
|
+
*/
|
|
3228
|
+
gamma?: number;
|
|
3229
|
+
/**
|
|
3230
|
+
* Lightness range [min, max] (0-1)
|
|
3231
|
+
* @default [0.4, 0.7]
|
|
3232
|
+
*/
|
|
3233
|
+
lightness?: [number, number];
|
|
3234
|
+
/**
|
|
3235
|
+
* Whether to apply lightness correction for perceptual uniformity
|
|
3236
|
+
* @default true
|
|
3237
|
+
*/
|
|
3238
|
+
correctLightness?: boolean;
|
|
3239
|
+
}
|
|
3240
|
+
/**
|
|
3241
|
+
* Generate colors using the cubehelix color scale
|
|
3242
|
+
* @param count - Number of colors to generate
|
|
3243
|
+
* @param options - Configuration options for color generation
|
|
3244
|
+
* @returns Array of color strings in hex format
|
|
3245
|
+
*/
|
|
3246
|
+
//#endregion
|
|
3247
|
+
//#region src/core/StackedBarChart/StackedBarChart.types.d.ts
|
|
3248
|
+
interface StackedBarChartDataItem {
|
|
3249
|
+
/**
|
|
3250
|
+
* Display name for the segment
|
|
3251
|
+
*/
|
|
3252
|
+
name: string;
|
|
3253
|
+
/**
|
|
3254
|
+
* Numeric value for the segment
|
|
3255
|
+
*/
|
|
3256
|
+
value: number;
|
|
3257
|
+
/**
|
|
3258
|
+
* Color for the segment (hex or CSS color)
|
|
3259
|
+
* If not provided, colors will be automatically generated using cubehelix palette
|
|
3260
|
+
*/
|
|
3261
|
+
color?: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* Unit label to display with the value in cumulative mode (e.g., "GB", "datasets", "MB")
|
|
3264
|
+
* Only shown in legend when mode is "cumulative"
|
|
3265
|
+
*/
|
|
3266
|
+
unit?: string;
|
|
3267
|
+
/**
|
|
3268
|
+
* Disable the item (prevents all events on the corresponding legend item and bar segment)
|
|
3269
|
+
* @default false
|
|
3270
|
+
*/
|
|
3271
|
+
disabled?: boolean;
|
|
3272
|
+
/**
|
|
3273
|
+
* Optional tooltip to display when hovering over the segment
|
|
3274
|
+
*/
|
|
3275
|
+
tooltip?: TooltipTableContentProps;
|
|
182
3276
|
}
|
|
183
3277
|
interface StackedBarChartProps extends HTMLAttributes<HTMLDivElement> {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
3278
|
+
/**
|
|
3279
|
+
* Title to display above the chart
|
|
3280
|
+
*/
|
|
3281
|
+
title?: string;
|
|
3282
|
+
/**
|
|
3283
|
+
* Badge text to display next to the title
|
|
3284
|
+
* If not provided, defaults to showing item count based on selection:
|
|
3285
|
+
* - No selection: total count (e.g., "5")
|
|
3286
|
+
* - Partial selection: selected count (e.g., "3 of 5")
|
|
3287
|
+
* - All selected: "All"
|
|
3288
|
+
*/
|
|
3289
|
+
badge?: string;
|
|
3290
|
+
/**
|
|
3291
|
+
* Hide the badge when true
|
|
3292
|
+
* @default false
|
|
3293
|
+
*/
|
|
3294
|
+
hideBadge?: boolean;
|
|
3295
|
+
/**
|
|
3296
|
+
* Array of data items to display in the stacked bar
|
|
3297
|
+
*/
|
|
3298
|
+
data: StackedBarChartDataItem[];
|
|
3299
|
+
/**
|
|
3300
|
+
* Width of the chart - accepts any CSS width value (e.g., "100%", "20vw", "300px", or number for pixels)
|
|
3301
|
+
* @default 100%
|
|
3302
|
+
*/
|
|
3303
|
+
width?: number | string;
|
|
3304
|
+
/**
|
|
3305
|
+
* Height of the bar in pixels (minimum 1px)
|
|
3306
|
+
* @default 16
|
|
3307
|
+
*/
|
|
3308
|
+
barHeight?: number;
|
|
3309
|
+
/**
|
|
3310
|
+
* Whether to show the legend below the chart
|
|
3311
|
+
* @default true
|
|
3312
|
+
*/
|
|
3313
|
+
showLegend?: boolean;
|
|
3314
|
+
/**
|
|
3315
|
+
* Whether to show percentage values in the legend
|
|
3316
|
+
* @default true
|
|
3317
|
+
*/
|
|
3318
|
+
showLegendValues?: boolean;
|
|
3319
|
+
/**
|
|
3320
|
+
* Format for legend values
|
|
3321
|
+
* - "percentage": Shows percentage of the item in the bar chart (e.g., "20%")
|
|
3322
|
+
* - "count": Shows the count from the data object with the unit defined by the unit prop
|
|
3323
|
+
* @default "percentage"
|
|
3324
|
+
*/
|
|
3325
|
+
legendValueFormat?: "percentage" | "count";
|
|
3326
|
+
/**
|
|
3327
|
+
* Array of selected item indices (controlled component)
|
|
3328
|
+
*/
|
|
3329
|
+
selectedIndices?: number[];
|
|
3330
|
+
/**
|
|
3331
|
+
* Callback when legend selection changes
|
|
3332
|
+
*/
|
|
3333
|
+
onSelectionChange?: (selectedIndices: number[], selectedData: StackedBarChartDataItem[]) => void;
|
|
3334
|
+
/**
|
|
3335
|
+
* Callback when mouse enters a bar segment
|
|
3336
|
+
*/
|
|
3337
|
+
onSegmentMouseEnter?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3338
|
+
/**
|
|
3339
|
+
* Callback when mouse leaves a bar segment
|
|
3340
|
+
*/
|
|
3341
|
+
onSegmentMouseLeave?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3342
|
+
/**
|
|
3343
|
+
* Callback when mouse enters a legend item
|
|
3344
|
+
*/
|
|
3345
|
+
onLegendItemMouseEnter?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3346
|
+
/**
|
|
3347
|
+
* Callback when mouse leaves a legend item
|
|
3348
|
+
*/
|
|
3349
|
+
onLegendItemMouseLeave?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3350
|
+
/**
|
|
3351
|
+
* Callback when a bar segment is clicked
|
|
3352
|
+
*/
|
|
3353
|
+
onSegmentClick?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3354
|
+
/**
|
|
3355
|
+
* Callback when a legend item is clicked
|
|
3356
|
+
*/
|
|
3357
|
+
onLegendItemClick?: (item: StackedBarChartDataItem, index: number) => void;
|
|
3358
|
+
/**
|
|
3359
|
+
* Behavior to apply when items are selected
|
|
3360
|
+
* - "dim": Non-selected segments become semi-transparent (20% opacity)
|
|
3361
|
+
* - "hide": Non-selected segments are hidden from the bar chart
|
|
3362
|
+
* @default "dim"
|
|
3363
|
+
*/
|
|
3364
|
+
selectionBehavior?: "dim" | "hide";
|
|
3365
|
+
/**
|
|
3366
|
+
* Chart mode - controls how segments are calculated
|
|
3367
|
+
* - "proportional": Segments fill entire bar (100%), proportional to their values
|
|
3368
|
+
* - "cumulative": Segments sized based on actual values relative to maxAmount
|
|
3369
|
+
* @default "proportional"
|
|
3370
|
+
*/
|
|
3371
|
+
mode?: "proportional" | "cumulative";
|
|
3372
|
+
/**
|
|
3373
|
+
* Maximum amount for the bar (used only in "cumulative" mode)
|
|
3374
|
+
* If not provided, defaults to sum of all values (no remaining segment)
|
|
3375
|
+
* If provided and sum < maxAmount, shows gray "remaining" segment
|
|
3376
|
+
*/
|
|
3377
|
+
maxAmount?: number;
|
|
3378
|
+
/**
|
|
3379
|
+
* Label for the remaining/unknown segment in cumulative mode
|
|
3380
|
+
* @default "Remaining"
|
|
3381
|
+
*/
|
|
3382
|
+
remainingLabel?: string;
|
|
3383
|
+
/**
|
|
3384
|
+
* Unit to display with the remaining segment value in cumulative mode
|
|
3385
|
+
* If not provided, uses the unit from the first data item (if available)
|
|
3386
|
+
*/
|
|
3387
|
+
remainingUnit?: string;
|
|
3388
|
+
/**
|
|
3389
|
+
* Global unit to display with values in cumulative mode (e.g., "GB", "datasets", "K")
|
|
3390
|
+
* Individual data items can override this with their own unit property
|
|
3391
|
+
* Only shown when mode is "cumulative"
|
|
3392
|
+
*/
|
|
3393
|
+
unit?: string;
|
|
3394
|
+
/**
|
|
3395
|
+
* Options for the color generator
|
|
3396
|
+
*/
|
|
3397
|
+
colorGeneratorOptions?: DiscreteColorGeneratorOptions;
|
|
304
3398
|
}
|
|
3399
|
+
//#endregion
|
|
3400
|
+
//#region src/core/StackedBarChart/index.d.ts
|
|
305
3401
|
declare const StackedBarChart: (props: StackedBarChartProps) => JSX.Element;
|
|
306
|
-
|
|
307
|
-
export
|
|
3402
|
+
//#endregion
|
|
3403
|
+
export { _default as HeatmapChart, HeatmapChartProps, StackedBarChart, type StackedBarChartDataItem, type StackedBarChartProps };
|