@hillac/mantine-react-table 0.0.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/LICENSE +21 -0
- package/README.md +38 -0
- package/UPSTREAM.md +11 -0
- package/dist/index.d.ts +1615 -0
- package/dist/index.js +3876 -0
- package/dist/index.js.map +1 -0
- package/package.json +75 -0
- package/styles.css +1366 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1615 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { MutableRefObject, HTMLProps, ReactNode, Dispatch, SetStateAction, RefObject, DragEventHandler, MouseEvent, ChangeEvent, JSX } from 'react';
|
|
3
|
+
import { Row, StockFeatures, DeepKeys, FilterFn, Column, Cell, Header, HeaderGroup, TableState, AggregationFnDef, SortFn, OnChangeFn, TableOptions, Updater, Table, ColumnDef, ColumnFiltersState, AccessorFn, DeepValue, ColumnOrderState, ColumnPinningState, columnResizingState, ColumnSizingState, ColumnVisibilityState, ExpandedState, GroupingState, PaginationState, RowSelectionState, SortingState, RowPinningPosition, Renderable } from '@tanstack/react-table';
|
|
4
|
+
import { Virtualizer, VirtualizerOptions, VirtualItem } from '@tanstack/react-virtual';
|
|
5
|
+
import { BoxProps, ActionIconProps, UnstyledButtonProps, ModalProps, SelectProps, TextInputProps, AutocompleteProps, CheckboxProps, MultiSelectProps, RangeSliderProps, HighlightProps, LoadingOverlayProps, PaginationProps, PaperProps, ProgressProps, RadioProps, SwitchProps, SkeletonProps, TableTdProps, TableTbodyProps, TableTrProps, TableThProps, TableTfootProps, TableTheadProps, TableProps, BadgeProps, AlertProps, FlexProps, MenuProps, MantineTheme } from '@mantine/core';
|
|
6
|
+
import { DateInputProps } from '@mantine/dates';
|
|
7
|
+
import * as _tanstack_table_core from '@tanstack/table-core';
|
|
8
|
+
import { RankingInfo } from '@tanstack/match-sorter-utils';
|
|
9
|
+
import * as _tabler_icons_react from '@tabler/icons-react';
|
|
10
|
+
|
|
11
|
+
declare const MRT_RowAggregationFns: {
|
|
12
|
+
sum: _tanstack_table_core.AggregationFnDef<any, any, unknown, number>;
|
|
13
|
+
min: _tanstack_table_core.AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
|
|
14
|
+
max: _tanstack_table_core.AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
|
|
15
|
+
extent: _tanstack_table_core.AggregationFnDef<any, any, unknown, [(number | Date) | undefined, (number | Date) | undefined]>;
|
|
16
|
+
mean: _tanstack_table_core.AggregationFnDef<any, any, unknown, number | undefined>;
|
|
17
|
+
median: _tanstack_table_core.AggregationFnDef<any, any, unknown, number | undefined>;
|
|
18
|
+
unique: _tanstack_table_core.AggregationFnDef<any, any, unknown, unknown[]>;
|
|
19
|
+
uniqueCount: _tanstack_table_core.AggregationFnDef<any, any, unknown, number>;
|
|
20
|
+
count: _tanstack_table_core.AggregationFnDef<any, any, unknown, number>;
|
|
21
|
+
first: _tanstack_table_core.AggregationFnDef<any, any, unknown, unknown>;
|
|
22
|
+
last: _tanstack_table_core.AggregationFnDef<any, any, unknown, unknown>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const MRT_FilterFns: {
|
|
26
|
+
between: {
|
|
27
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValues: [number | string, number | string]): boolean;
|
|
28
|
+
autoRemove(val: any): boolean;
|
|
29
|
+
};
|
|
30
|
+
betweenInclusive: {
|
|
31
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValues: [number | string, number | string]): boolean;
|
|
32
|
+
autoRemove(val: any): boolean;
|
|
33
|
+
};
|
|
34
|
+
contains: {
|
|
35
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
36
|
+
autoRemove(val: any): boolean;
|
|
37
|
+
};
|
|
38
|
+
empty: {
|
|
39
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, _filterValue: number | string): boolean;
|
|
40
|
+
autoRemove(val: any): boolean;
|
|
41
|
+
};
|
|
42
|
+
endsWith: {
|
|
43
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
44
|
+
autoRemove(val: any): boolean;
|
|
45
|
+
};
|
|
46
|
+
equals: {
|
|
47
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
48
|
+
autoRemove(val: any): boolean;
|
|
49
|
+
};
|
|
50
|
+
fuzzy: {
|
|
51
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, columnId: string, filterValue: number | string, addMeta: (item: RankingInfo) => void): boolean;
|
|
52
|
+
autoRemove(val: any): boolean;
|
|
53
|
+
};
|
|
54
|
+
greaterThan: {
|
|
55
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
56
|
+
autoRemove(val: any): boolean;
|
|
57
|
+
};
|
|
58
|
+
greaterThanOrEqualTo: {
|
|
59
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
60
|
+
autoRemove(val: any): boolean;
|
|
61
|
+
};
|
|
62
|
+
lessThan: {
|
|
63
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
64
|
+
autoRemove(val: any): boolean;
|
|
65
|
+
};
|
|
66
|
+
lessThanOrEqualTo: {
|
|
67
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
68
|
+
autoRemove(val: any): boolean;
|
|
69
|
+
};
|
|
70
|
+
notEmpty: {
|
|
71
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, _filterValue: number | string): boolean;
|
|
72
|
+
autoRemove(val: any): boolean;
|
|
73
|
+
};
|
|
74
|
+
notEquals: {
|
|
75
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
76
|
+
autoRemove(val: any): boolean;
|
|
77
|
+
};
|
|
78
|
+
startsWith: {
|
|
79
|
+
<TData extends MRT_RowData>(row: Row<StockFeatures, TData>, id: string, filterValue: number | string): boolean;
|
|
80
|
+
autoRemove(val: any): boolean;
|
|
81
|
+
};
|
|
82
|
+
arrIncludes: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
83
|
+
arrIncludesAll: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
84
|
+
arrHas: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
85
|
+
arrIncludesSome: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
86
|
+
equalsString: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
87
|
+
equalsStringSensitive: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
88
|
+
inDateRange: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
89
|
+
inNumberRange: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
90
|
+
includesString: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
91
|
+
includesStringSensitive: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
92
|
+
weakEquals: _tanstack_table_core.CreatedFilterFn<any, any>;
|
|
93
|
+
};
|
|
94
|
+
declare function localizedFilterOption(localization: MRT_Localization, option: MRT_FilterOption): string;
|
|
95
|
+
|
|
96
|
+
declare const MRT_SortFns: {
|
|
97
|
+
fuzzy: <TData extends MRT_RowData>(rowA: Row<StockFeatures, TData>, rowB: Row<StockFeatures, TData>, columnId: string) => number;
|
|
98
|
+
alphanumeric: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
99
|
+
alphanumericCaseSensitive: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
100
|
+
basic: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
101
|
+
datetime: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
102
|
+
text: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
103
|
+
textCaseSensitive: _tanstack_table_core.CreatedSortFn<any, any>;
|
|
104
|
+
};
|
|
105
|
+
declare const rankGlobalFuzzy: <TData extends MRT_RowData>(rowA: MRT_Row<TData>, rowB: MRT_Row<TData>) => number;
|
|
106
|
+
|
|
107
|
+
declare const MRT_Default_Icons: {
|
|
108
|
+
readonly IconArrowAutofitContent: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
109
|
+
readonly IconArrowsSort: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
110
|
+
readonly IconBaselineDensityLarge: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
111
|
+
readonly IconBaselineDensityMedium: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
112
|
+
readonly IconBaselineDensitySmall: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
113
|
+
readonly IconBoxMultiple: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
114
|
+
readonly IconChevronDown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
115
|
+
readonly IconChevronLeft: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
116
|
+
readonly IconChevronLeftPipe: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
117
|
+
readonly IconChevronRight: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
118
|
+
readonly IconChevronRightPipe: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
119
|
+
readonly IconChevronsDown: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
120
|
+
readonly IconCircleX: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
121
|
+
readonly IconClearAll: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
122
|
+
readonly IconColumns: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
123
|
+
readonly IconDeviceFloppy: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
124
|
+
readonly IconDots: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
125
|
+
readonly IconDotsVertical: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
126
|
+
readonly IconEdit: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
127
|
+
readonly IconEyeOff: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
128
|
+
readonly IconFilter: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
129
|
+
readonly IconFilterCog: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
130
|
+
readonly IconFilterOff: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
131
|
+
readonly IconGripHorizontal: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
132
|
+
readonly IconMaximize: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
133
|
+
readonly IconMinimize: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
134
|
+
readonly IconPinned: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
135
|
+
readonly IconPinnedOff: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
136
|
+
readonly IconSearch: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
137
|
+
readonly IconSearchOff: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
138
|
+
readonly IconSortAscending: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
139
|
+
readonly IconSortDescending: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
140
|
+
readonly IconX: react.ForwardRefExoticComponent<_tabler_icons_react.IconProps & react.RefAttributes<SVGSVGElement>>;
|
|
141
|
+
};
|
|
142
|
+
type MRT_Icons = Record<keyof typeof MRT_Default_Icons, any>;
|
|
143
|
+
|
|
144
|
+
type LiteralUnion<T extends U, U = string> = (Record<never, never> & U) | T;
|
|
145
|
+
type Prettify<T> = {
|
|
146
|
+
[K in keyof T]: T[K];
|
|
147
|
+
} & unknown;
|
|
148
|
+
type Xor<A, B> = Prettify<{
|
|
149
|
+
[k in keyof A]?: never;
|
|
150
|
+
} & B> | Prettify<{
|
|
151
|
+
[k in keyof B]?: never;
|
|
152
|
+
} & A>;
|
|
153
|
+
type HTMLPropsRef<T extends HTMLElement> = {
|
|
154
|
+
ref?: MutableRefObject<null | T> | null;
|
|
155
|
+
} & Omit<HTMLProps<T>, 'color' | 'data' | 'label' | 'ref' | 'size' | 'style' | 'type'>;
|
|
156
|
+
type MantineShade = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
157
|
+
type MRT_PaginationProps = {
|
|
158
|
+
rowsPerPageOptions?: Array<string>;
|
|
159
|
+
showRowsPerPage?: boolean;
|
|
160
|
+
} & Partial<PaginationProps>;
|
|
161
|
+
type MRT_DensityState = 'lg' | 'md' | 'sm' | 'xl' | 'xs';
|
|
162
|
+
type MRT_ColumnFilterFnsState = Record<string, MRT_FilterOption>;
|
|
163
|
+
type MRT_RowData = Record<string, any>;
|
|
164
|
+
type MRT_CellValue = unknown;
|
|
165
|
+
type MRT_ColumnFiltersState = ColumnFiltersState;
|
|
166
|
+
type MRT_ColumnOrderState = ColumnOrderState;
|
|
167
|
+
type MRT_ColumnPinningState = ColumnPinningState;
|
|
168
|
+
type MRT_ColumnResizingState = columnResizingState;
|
|
169
|
+
type MRT_ColumnSizingState = ColumnSizingState;
|
|
170
|
+
type MRT_ColumnVisibilityState = ColumnVisibilityState;
|
|
171
|
+
type MRT_ExpandedState = ExpandedState;
|
|
172
|
+
type MRT_GroupingState = GroupingState;
|
|
173
|
+
type MRT_PaginationState = PaginationState;
|
|
174
|
+
type MRT_RowSelectionState = RowSelectionState;
|
|
175
|
+
type MRT_SortingState = SortingState;
|
|
176
|
+
type MRT_Updater<T> = Updater<T>;
|
|
177
|
+
type MRT_VirtualItem = VirtualItem;
|
|
178
|
+
type MRT_VirtualizerOptions<TScrollElement extends Element | Window = Element | Window, TItemElement extends Element = Element> = VirtualizerOptions<TScrollElement, TItemElement>;
|
|
179
|
+
type MRT_ColumnVirtualizer<TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableCellElement> = {
|
|
180
|
+
virtualColumns: Array<MRT_VirtualItem>;
|
|
181
|
+
virtualPaddingLeft?: number;
|
|
182
|
+
virtualPaddingRight?: number;
|
|
183
|
+
} & Virtualizer<TScrollElement, TItemElement>;
|
|
184
|
+
type MRT_RowVirtualizer<TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableRowElement> = {
|
|
185
|
+
virtualRows: Array<MRT_VirtualItem>;
|
|
186
|
+
} & Virtualizer<TScrollElement, TItemElement>;
|
|
187
|
+
type MRT_ColumnHelper<TData extends MRT_RowData> = {
|
|
188
|
+
/**
|
|
189
|
+
* Creates a data column definition with either an `accessorKey` (string) or
|
|
190
|
+
* an `accessorFn` (function) to extract the cell value. Returns the
|
|
191
|
+
* appropriate column-def variant so the column shape is preserved.
|
|
192
|
+
* @example
|
|
193
|
+
* ```ts
|
|
194
|
+
* helper.accessor('firstName', { cell: (info) => info.getValue() })
|
|
195
|
+
* helper.accessor((row) => row.lastName, { id: 'lastName' })
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends (TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never)>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? MRT_DisplayColumnDef<TData, TValue> : MRT_IdentifiedColumnDef<TData, TValue>) => TAccessor extends AccessorFn<TData> ? MRT_AccessorFnColumnDef<TData, TValue> : MRT_AccessorKeyColumnDef<TData, TValue>;
|
|
199
|
+
/**
|
|
200
|
+
* Wraps an array of column definitions to preserve each column's individual
|
|
201
|
+
* `TValue` type. Uses variadic tuple types to infer element types before
|
|
202
|
+
* checking constraints, preventing type widening.
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* helper.columns([
|
|
206
|
+
* helper.accessor('firstName', {}),
|
|
207
|
+
* helper.accessor('age', {}),
|
|
208
|
+
* ])
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
columns: <TColumns extends ReadonlyArray<MRT_ColumnDef<TData, any>>>(columns: [...TColumns]) => Array<MRT_ColumnDef<TData, any>> & [...TColumns];
|
|
212
|
+
/**
|
|
213
|
+
* Creates a display column definition for non-data columns like row actions
|
|
214
|
+
* or row numbers.
|
|
215
|
+
*/
|
|
216
|
+
display: (column: MRT_DisplayColumnDef<TData>) => MRT_DisplayColumnDef<TData, unknown>;
|
|
217
|
+
/**
|
|
218
|
+
* Creates a group column definition that contains nested child columns.
|
|
219
|
+
*/
|
|
220
|
+
group: (column: MRT_GroupColumnDef<TData, unknown>) => MRT_GroupColumnDef<TData, unknown>;
|
|
221
|
+
};
|
|
222
|
+
interface MRT_Localization {
|
|
223
|
+
actions: string;
|
|
224
|
+
and: string;
|
|
225
|
+
cancel: string;
|
|
226
|
+
changeFilterMode: string;
|
|
227
|
+
changeSearchMode: string;
|
|
228
|
+
clearFilter: string;
|
|
229
|
+
clearSearch: string;
|
|
230
|
+
clearSelection: string;
|
|
231
|
+
clearSort: string;
|
|
232
|
+
clickToCopy: string;
|
|
233
|
+
collapse: string;
|
|
234
|
+
collapseAll: string;
|
|
235
|
+
columnActions: string;
|
|
236
|
+
copiedToClipboard: string;
|
|
237
|
+
copy: string;
|
|
238
|
+
dropToGroupBy: string;
|
|
239
|
+
edit: string;
|
|
240
|
+
expand: string;
|
|
241
|
+
expandAll: string;
|
|
242
|
+
filterArrIncludes: string;
|
|
243
|
+
filterArrIncludesAll: string;
|
|
244
|
+
filterArrIncludesSome: string;
|
|
245
|
+
filterBetween: string;
|
|
246
|
+
filterBetweenInclusive: string;
|
|
247
|
+
filterByColumn: string;
|
|
248
|
+
filterContains: string;
|
|
249
|
+
filterEmpty: string;
|
|
250
|
+
filterEndsWith: string;
|
|
251
|
+
filterEquals: string;
|
|
252
|
+
filterEqualsString: string;
|
|
253
|
+
filterFuzzy: string;
|
|
254
|
+
filterGreaterThan: string;
|
|
255
|
+
filterGreaterThanOrEqualTo: string;
|
|
256
|
+
filterIncludesString: string;
|
|
257
|
+
filterIncludesStringSensitive: string;
|
|
258
|
+
filteringByColumn: string;
|
|
259
|
+
filterInNumberRange: string;
|
|
260
|
+
filterLessThan: string;
|
|
261
|
+
filterLessThanOrEqualTo: string;
|
|
262
|
+
filterMode: string;
|
|
263
|
+
filterNotEmpty: string;
|
|
264
|
+
filterNotEquals: string;
|
|
265
|
+
filterStartsWith: string;
|
|
266
|
+
filterWeakEquals: string;
|
|
267
|
+
goToFirstPage: string;
|
|
268
|
+
goToLastPage: string;
|
|
269
|
+
goToNextPage: string;
|
|
270
|
+
goToPreviousPage: string;
|
|
271
|
+
grab: string;
|
|
272
|
+
groupByColumn: string;
|
|
273
|
+
groupedBy: string;
|
|
274
|
+
hideAll: string;
|
|
275
|
+
hideColumn: string;
|
|
276
|
+
max: string;
|
|
277
|
+
min: string;
|
|
278
|
+
move: string;
|
|
279
|
+
noRecordsToDisplay: string;
|
|
280
|
+
noResultsFound: string;
|
|
281
|
+
of: string;
|
|
282
|
+
or: string;
|
|
283
|
+
pin: string;
|
|
284
|
+
pinToLeft: string;
|
|
285
|
+
pinToRight: string;
|
|
286
|
+
resetColumnSize: string;
|
|
287
|
+
resetOrder: string;
|
|
288
|
+
rowActions: string;
|
|
289
|
+
rowNumber: string;
|
|
290
|
+
rowNumbers: string;
|
|
291
|
+
rowsPerPage: string;
|
|
292
|
+
save: string;
|
|
293
|
+
search: string;
|
|
294
|
+
select: string;
|
|
295
|
+
selectedCountOfRowCountRowsSelected: string;
|
|
296
|
+
showAll: string;
|
|
297
|
+
showAllColumns: string;
|
|
298
|
+
showHideColumns: string;
|
|
299
|
+
showHideFilters: string;
|
|
300
|
+
showHideSearch: string;
|
|
301
|
+
sortByColumnAsc: string;
|
|
302
|
+
sortByColumnDesc: string;
|
|
303
|
+
sortedByColumnAsc: string;
|
|
304
|
+
sortedByColumnDesc: string;
|
|
305
|
+
thenBy: string;
|
|
306
|
+
toggleDensity: string;
|
|
307
|
+
toggleFullScreen: string;
|
|
308
|
+
toggleSelectAll: string;
|
|
309
|
+
toggleSelectRow: string;
|
|
310
|
+
toggleVisibility: string;
|
|
311
|
+
ungroupByColumn: string;
|
|
312
|
+
unpin: string;
|
|
313
|
+
unpinAll: string;
|
|
314
|
+
}
|
|
315
|
+
interface MRT_RowModel<TData extends MRT_RowData> {
|
|
316
|
+
flatRows: Array<MRT_Row<TData>>;
|
|
317
|
+
rows: Array<MRT_Row<TData>>;
|
|
318
|
+
rowsById: {
|
|
319
|
+
[key: string]: MRT_Row<TData>;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
type MRT_TableInstance<TData extends MRT_RowData> = {
|
|
323
|
+
getAllColumns: () => Array<MRT_Column<TData>>;
|
|
324
|
+
getAllFlatColumns: () => Array<MRT_Column<TData>>;
|
|
325
|
+
getAllLeafColumns: () => Array<MRT_Column<TData>>;
|
|
326
|
+
getBottomRows: () => Array<MRT_Row<TData>>;
|
|
327
|
+
getCenterLeafColumns: () => Array<MRT_Column<TData>>;
|
|
328
|
+
getCenterRows: () => Array<MRT_Row<TData>>;
|
|
329
|
+
getColumn: (columnId: string) => MRT_Column<TData>;
|
|
330
|
+
getExpandedRowModel: () => MRT_RowModel<TData>;
|
|
331
|
+
getFilteredSelectedRowModel: () => MRT_RowModel<TData>;
|
|
332
|
+
getFlatHeaders: () => Array<MRT_Header<TData>>;
|
|
333
|
+
getHeaderGroups: () => Array<MRT_HeaderGroup<TData>>;
|
|
334
|
+
getStartLeafColumns: () => Array<MRT_Column<TData>>;
|
|
335
|
+
getPaginationRowModel: () => MRT_RowModel<TData>;
|
|
336
|
+
getPreFilteredRowModel: () => MRT_RowModel<TData>;
|
|
337
|
+
getPrePaginatedRowModel: () => MRT_RowModel<TData>;
|
|
338
|
+
getEndLeafColumns: () => Array<MRT_Column<TData>>;
|
|
339
|
+
getRowModel: () => MRT_RowModel<TData>;
|
|
340
|
+
getSelectedRowModel: () => MRT_RowModel<TData>;
|
|
341
|
+
getState: () => MRT_TableState<TData>;
|
|
342
|
+
getTopRows: () => Array<MRT_Row<TData>>;
|
|
343
|
+
options: MRT_StatefulTableOptions<TData>;
|
|
344
|
+
refs: {
|
|
345
|
+
bottomToolbarRef: MutableRefObject<HTMLDivElement | null>;
|
|
346
|
+
editInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
|
|
347
|
+
filterInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
|
|
348
|
+
lastSelectedRowId: MutableRefObject<null | string>;
|
|
349
|
+
searchInputRef: MutableRefObject<HTMLInputElement | null>;
|
|
350
|
+
tableContainerRef: MutableRefObject<HTMLDivElement | null>;
|
|
351
|
+
tableFooterRef: MutableRefObject<HTMLTableSectionElement | null>;
|
|
352
|
+
tableHeadCellRefs: MutableRefObject<Record<string, HTMLTableCellElement>>;
|
|
353
|
+
tableHeadRef: MutableRefObject<HTMLTableSectionElement | null>;
|
|
354
|
+
tablePaperRef: MutableRefObject<HTMLDivElement | null>;
|
|
355
|
+
topToolbarRef: MutableRefObject<HTMLDivElement | null>;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* The current full table state. Populated by useTable's `state => state` selector
|
|
359
|
+
* and enriched with MRT-only slices that v9's store doesn't track.
|
|
360
|
+
* Use this in place of v8's `table.getState()`.
|
|
361
|
+
*/
|
|
362
|
+
state: MRT_TableState<TData>;
|
|
363
|
+
/**
|
|
364
|
+
* v9 calls this `setcolumnResizing` (lowercase 'c') on the underlying table —
|
|
365
|
+
* we expose a normal camelCase alias here.
|
|
366
|
+
*/
|
|
367
|
+
setColumnResizing: (updater: Updater<MRT_TableState<TData>['columnResizing']>) => void;
|
|
368
|
+
setColumnFilterFns: Dispatch<SetStateAction<MRT_ColumnFilterFnsState>>;
|
|
369
|
+
setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
|
|
370
|
+
setDensity: Dispatch<SetStateAction<MRT_DensityState>>;
|
|
371
|
+
setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
|
372
|
+
setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
|
373
|
+
setEditingCell: Dispatch<SetStateAction<MRT_Cell<TData> | null>>;
|
|
374
|
+
setEditingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
|
375
|
+
setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
|
|
376
|
+
setHoveredColumn: Dispatch<SetStateAction<null | Partial<MRT_Column<TData>>>>;
|
|
377
|
+
setHoveredRow: Dispatch<SetStateAction<null | Partial<MRT_Row<TData>>>>;
|
|
378
|
+
setIsFullScreen: Dispatch<SetStateAction<boolean>>;
|
|
379
|
+
setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
|
|
380
|
+
setShowColumnFilters: Dispatch<SetStateAction<boolean>>;
|
|
381
|
+
setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
|
|
382
|
+
setShowToolbarDropZone: Dispatch<SetStateAction<boolean>>;
|
|
383
|
+
} & Omit<Table<StockFeatures, TData>, 'getAllColumns' | 'getAllFlatColumns' | 'getAllLeafColumns' | 'getBottomRows' | 'getCenterLeafColumns' | 'getCenterRows' | 'getColumn' | 'getExpandedRowModel' | 'getFlatHeaders' | 'getHeaderGroups' | 'getStartLeafColumns' | 'getPaginationRowModel' | 'getPreFilteredRowModel' | 'getPrePaginatedRowModel' | 'getEndLeafColumns' | 'getRowModel' | 'getSelectedRowModel' | 'getState' | 'getTopRows' | 'options'>;
|
|
384
|
+
type MRT_DefinedTableOptions<TData extends MRT_RowData> = {
|
|
385
|
+
icons: MRT_Icons;
|
|
386
|
+
localization: MRT_Localization;
|
|
387
|
+
} & Omit<MRT_TableOptions<TData>, 'icons' | 'localization'>;
|
|
388
|
+
type MRT_StatefulTableOptions<TData extends MRT_RowData> = {
|
|
389
|
+
state: Pick<MRT_TableState<TData>, 'columnFilterFns' | 'columnOrder' | 'columnResizing' | 'creatingRow' | 'density' | 'draggingColumn' | 'draggingRow' | 'editingCell' | 'editingRow' | 'globalFilterFn' | 'grouping' | 'hoveredColumn' | 'hoveredRow' | 'isFullScreen' | 'pagination' | 'showAlertBanner' | 'showColumnFilters' | 'showGlobalFilter' | 'showToolbarDropZone'>;
|
|
390
|
+
} & MRT_DefinedTableOptions<TData>;
|
|
391
|
+
type MRT_TableState<TData extends MRT_RowData> = Prettify<{
|
|
392
|
+
columnFilterFns: MRT_ColumnFilterFnsState;
|
|
393
|
+
creatingRow: MRT_Row<TData> | null;
|
|
394
|
+
density: MRT_DensityState;
|
|
395
|
+
draggingColumn: MRT_Column<TData> | null;
|
|
396
|
+
draggingRow: MRT_Row<TData> | null;
|
|
397
|
+
editingCell: MRT_Cell<TData> | null;
|
|
398
|
+
editingRow: MRT_Row<TData> | null;
|
|
399
|
+
globalFilterFn: MRT_FilterOption;
|
|
400
|
+
hoveredColumn: null | Partial<MRT_Column<TData>>;
|
|
401
|
+
hoveredRow: null | Partial<MRT_Row<TData>>;
|
|
402
|
+
isFullScreen: boolean;
|
|
403
|
+
isLoading: boolean;
|
|
404
|
+
isSaving: boolean;
|
|
405
|
+
showAlertBanner: boolean;
|
|
406
|
+
showColumnFilters: boolean;
|
|
407
|
+
showGlobalFilter: boolean;
|
|
408
|
+
showLoadingOverlay: boolean;
|
|
409
|
+
showProgressBars: boolean;
|
|
410
|
+
showSkeletons: boolean;
|
|
411
|
+
showToolbarDropZone: boolean;
|
|
412
|
+
} & TableState<StockFeatures>>;
|
|
413
|
+
type MRT_ColumnDef<TData extends MRT_RowData, TValue = unknown> = {
|
|
414
|
+
/**
|
|
415
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
|
416
|
+
* Specify a function here to point to the correct property in the data object.
|
|
417
|
+
*
|
|
418
|
+
* @example accessorFn: (row) => row.username
|
|
419
|
+
*/
|
|
420
|
+
accessorFn?: (originalRow: TData) => any;
|
|
421
|
+
/**
|
|
422
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
|
423
|
+
* Specify which key in the row this column should use to access the correct data.
|
|
424
|
+
* Also supports Deep Key Dot Notation.
|
|
425
|
+
*
|
|
426
|
+
* @example accessorKey: 'username' //simple
|
|
427
|
+
* @example accessorKey: 'name.firstName' //deep key dot notation
|
|
428
|
+
*/
|
|
429
|
+
accessorKey?: ({} & string) | DeepKeys<TData>;
|
|
430
|
+
AggregatedCell?: (props: {
|
|
431
|
+
cell: MRT_Cell<TData, TValue>;
|
|
432
|
+
column: MRT_Column<TData, TValue>;
|
|
433
|
+
row: MRT_Row<TData>;
|
|
434
|
+
table: MRT_TableInstance<TData>;
|
|
435
|
+
}) => ReactNode;
|
|
436
|
+
aggregationFn?: Array<MRT_RowAggregationOption | {
|
|
437
|
+
aggregationFn: MRT_RowAggregationFn<TData>;
|
|
438
|
+
id: string;
|
|
439
|
+
}> | MRT_RowAggregationFn<TData>;
|
|
440
|
+
Cell?: (props: {
|
|
441
|
+
cell: MRT_Cell<TData, TValue>;
|
|
442
|
+
column: MRT_Column<TData, TValue>;
|
|
443
|
+
renderedCellValue: number | ReactNode | string;
|
|
444
|
+
renderedColumnIndex?: number;
|
|
445
|
+
renderedRowIndex?: number;
|
|
446
|
+
row: MRT_Row<TData>;
|
|
447
|
+
rowRef?: RefObject<HTMLTableRowElement | null>;
|
|
448
|
+
table: MRT_TableInstance<TData>;
|
|
449
|
+
}) => ReactNode;
|
|
450
|
+
/**
|
|
451
|
+
* Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
|
|
452
|
+
* Leave this blank if you are just creating a normal data column.
|
|
453
|
+
*
|
|
454
|
+
* @default 'data'
|
|
455
|
+
*
|
|
456
|
+
* @example columnDefType: 'display'
|
|
457
|
+
*/
|
|
458
|
+
columnDefType?: 'data' | 'display' | 'group';
|
|
459
|
+
columnFilterModeOptions?: Array<LiteralUnion<MRT_FilterOption & string>> | null;
|
|
460
|
+
columns?: Array<MRT_ColumnDef<TData>>;
|
|
461
|
+
Edit?: (props: {
|
|
462
|
+
cell: MRT_Cell<TData, TValue>;
|
|
463
|
+
column: MRT_Column<TData, TValue>;
|
|
464
|
+
row: MRT_Row<TData>;
|
|
465
|
+
table: MRT_TableInstance<TData>;
|
|
466
|
+
}) => ReactNode;
|
|
467
|
+
editVariant?: 'multi-select' | 'select' | 'text';
|
|
468
|
+
enableCellHoverReveal?: boolean;
|
|
469
|
+
enableClickToCopy?: ((cell: MRT_Cell<TData>) => boolean) | boolean;
|
|
470
|
+
enableColumnActions?: boolean;
|
|
471
|
+
enableColumnDragging?: boolean;
|
|
472
|
+
enableColumnFilterModes?: boolean;
|
|
473
|
+
enableColumnOrdering?: boolean;
|
|
474
|
+
enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
|
475
|
+
enableFilterMatchHighlighting?: boolean;
|
|
476
|
+
Filter?: (props: {
|
|
477
|
+
column: MRT_Column<TData, TValue>;
|
|
478
|
+
header: MRT_Header<TData>;
|
|
479
|
+
rangeFilterIndex?: number;
|
|
480
|
+
table: MRT_TableInstance<TData>;
|
|
481
|
+
}) => ReactNode;
|
|
482
|
+
filterFn?: MRT_FilterFn<TData>;
|
|
483
|
+
filterTooltipValueFn?: MRT_FilterTooltipValueFn;
|
|
484
|
+
filterVariant?: 'autocomplete' | 'checkbox' | 'date' | 'date-range' | 'multi-select' | 'range' | 'range-slider' | 'select' | 'text';
|
|
485
|
+
Footer?: ((props: {
|
|
486
|
+
column: MRT_Column<TData, TValue>;
|
|
487
|
+
footer: MRT_Header<TData>;
|
|
488
|
+
table: MRT_TableInstance<TData>;
|
|
489
|
+
}) => ReactNode) | ReactNode;
|
|
490
|
+
/**
|
|
491
|
+
* footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
|
|
492
|
+
*/
|
|
493
|
+
footer?: string;
|
|
494
|
+
GroupedCell?: (props: {
|
|
495
|
+
cell: MRT_Cell<TData, TValue>;
|
|
496
|
+
column: MRT_Column<TData, TValue>;
|
|
497
|
+
row: MRT_Row<TData>;
|
|
498
|
+
table: MRT_TableInstance<TData>;
|
|
499
|
+
}) => ReactNode;
|
|
500
|
+
/**
|
|
501
|
+
* If `layoutMode` is `'grid'` or `'grid-no-grow'`, you can specify the flex grow value for individual columns to still grow and take up remaining space, or set to `false`/0 to not grow.
|
|
502
|
+
*/
|
|
503
|
+
grow?: boolean | number;
|
|
504
|
+
Header?: ((props: {
|
|
505
|
+
column: MRT_Column<TData, TValue>;
|
|
506
|
+
header: MRT_Header<TData>;
|
|
507
|
+
table: MRT_TableInstance<TData>;
|
|
508
|
+
}) => ReactNode) | ReactNode;
|
|
509
|
+
/**
|
|
510
|
+
* header must be a string. If you want custom JSX to render the header, you can also specify a `Header` option. (Capital H)
|
|
511
|
+
*/
|
|
512
|
+
header: string;
|
|
513
|
+
/**
|
|
514
|
+
* Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
|
|
515
|
+
*
|
|
516
|
+
* If you have also specified an `accessorFn`, MRT still needs to have a valid `id` to be able to identify the column uniquely.
|
|
517
|
+
*
|
|
518
|
+
* `id` defaults to the `accessorKey` or `header` if not specified.
|
|
519
|
+
*
|
|
520
|
+
* @default gets set to the same value as `accessorKey` by default
|
|
521
|
+
*/
|
|
522
|
+
id?: LiteralUnion<keyof TData & string>;
|
|
523
|
+
mantineColumnActionsButtonProps?: ((props: {
|
|
524
|
+
column: MRT_Column<TData, TValue>;
|
|
525
|
+
table: MRT_TableInstance<TData>;
|
|
526
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
527
|
+
mantineColumnDragHandleProps?: ((props: {
|
|
528
|
+
column: MRT_Column<TData, TValue>;
|
|
529
|
+
table: MRT_TableInstance<TData>;
|
|
530
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
531
|
+
mantineCopyButtonProps?: ((props: {
|
|
532
|
+
cell: MRT_Cell<TData, TValue>;
|
|
533
|
+
column: MRT_Column<TData, TValue>;
|
|
534
|
+
row: MRT_Row<TData>;
|
|
535
|
+
table: MRT_TableInstance<TData>;
|
|
536
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>);
|
|
537
|
+
mantineEditSelectProps?: ((props: {
|
|
538
|
+
cell: MRT_Cell<TData, TValue>;
|
|
539
|
+
column: MRT_Column<TData, TValue>;
|
|
540
|
+
row: MRT_Row<TData>;
|
|
541
|
+
table: MRT_TableInstance<TData>;
|
|
542
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
|
|
543
|
+
mantineEditTextInputProps?: ((props: {
|
|
544
|
+
cell: MRT_Cell<TData, TValue>;
|
|
545
|
+
column: MRT_Column<TData, TValue>;
|
|
546
|
+
row: MRT_Row<TData>;
|
|
547
|
+
table: MRT_TableInstance<TData>;
|
|
548
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
|
|
549
|
+
mantineFilterAutocompleteProps?: ((props: {
|
|
550
|
+
column: MRT_Column<TData, TValue>;
|
|
551
|
+
rangeFilterIndex?: number;
|
|
552
|
+
table: MRT_TableInstance<TData>;
|
|
553
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>);
|
|
554
|
+
mantineFilterCheckboxProps?: ((props: {
|
|
555
|
+
column: MRT_Column<TData, TValue>;
|
|
556
|
+
table: MRT_TableInstance<TData>;
|
|
557
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>);
|
|
558
|
+
mantineFilterDateInputProps?: ((props: {
|
|
559
|
+
column: MRT_Column<TData, TValue>;
|
|
560
|
+
rangeFilterIndex?: number;
|
|
561
|
+
table: MRT_TableInstance<TData>;
|
|
562
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>);
|
|
563
|
+
mantineFilterMultiSelectProps?: ((props: {
|
|
564
|
+
column: MRT_Column<TData, TValue>;
|
|
565
|
+
rangeFilterIndex?: number;
|
|
566
|
+
table: MRT_TableInstance<TData>;
|
|
567
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>);
|
|
568
|
+
mantineFilterRangeSliderProps?: ((props: {
|
|
569
|
+
column: MRT_Column<TData, TValue>;
|
|
570
|
+
rangeFilterIndex?: number;
|
|
571
|
+
table: MRT_TableInstance<TData>;
|
|
572
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>);
|
|
573
|
+
mantineFilterSelectProps?: ((props: {
|
|
574
|
+
column: MRT_Column<TData, TValue>;
|
|
575
|
+
rangeFilterIndex?: number;
|
|
576
|
+
table: MRT_TableInstance<TData>;
|
|
577
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
|
|
578
|
+
mantineFilterTextInputProps?: ((props: {
|
|
579
|
+
column: MRT_Column<TData, TValue>;
|
|
580
|
+
rangeFilterIndex?: number;
|
|
581
|
+
table: MRT_TableInstance<TData>;
|
|
582
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
|
|
583
|
+
mantineTableBodyCellProps?: ((props: {
|
|
584
|
+
cell: MRT_Cell<TData, TValue>;
|
|
585
|
+
column: MRT_Column<TData, TValue>;
|
|
586
|
+
renderedRowIndex?: number;
|
|
587
|
+
row: MRT_Row<TData>;
|
|
588
|
+
table: MRT_TableInstance<TData>;
|
|
589
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableTdProps) | (HTMLPropsRef<HTMLTableCellElement> & TableTdProps);
|
|
590
|
+
mantineTableFooterCellProps?: ((props: {
|
|
591
|
+
column: MRT_Column<TData, TValue>;
|
|
592
|
+
table: MRT_TableInstance<TData>;
|
|
593
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableThProps) | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
|
|
594
|
+
mantineTableHeadCellProps?: ((props: {
|
|
595
|
+
column: MRT_Column<TData, TValue>;
|
|
596
|
+
table: MRT_TableInstance<TData>;
|
|
597
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableThProps) | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
|
|
598
|
+
PlaceholderCell?: (props: {
|
|
599
|
+
cell: MRT_Cell<TData, TValue>;
|
|
600
|
+
column: MRT_Column<TData, TValue>;
|
|
601
|
+
row: MRT_Row<TData>;
|
|
602
|
+
table: MRT_TableInstance<TData>;
|
|
603
|
+
}) => ReactNode;
|
|
604
|
+
renderColumnActionsMenuItems?: (props: {
|
|
605
|
+
column: MRT_Column<TData, TValue>;
|
|
606
|
+
internalColumnMenuItems: ReactNode;
|
|
607
|
+
table: MRT_TableInstance<TData>;
|
|
608
|
+
}) => ReactNode;
|
|
609
|
+
renderColumnFilterModeMenuItems?: (props: {
|
|
610
|
+
column: MRT_Column<TData, TValue>;
|
|
611
|
+
internalFilterOptions: Array<MRT_InternalFilterOption>;
|
|
612
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
|
613
|
+
table: MRT_TableInstance<TData>;
|
|
614
|
+
}) => ReactNode;
|
|
615
|
+
sortFn?: MRT_SortFn<TData>;
|
|
616
|
+
visibleInShowHideMenu?: boolean;
|
|
617
|
+
} & Omit<ColumnDef<StockFeatures, TData, TValue>, 'accessorKey' | 'aggregatedCell' | 'aggregationFn' | 'cell' | 'columns' | 'filterFn' | 'footer' | 'header' | 'id' | 'sortFn'>;
|
|
618
|
+
type MRT_DisplayColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<MRT_ColumnDef<TData, TValue>, 'accessorFn' | 'accessorKey'>;
|
|
619
|
+
/**
|
|
620
|
+
* A data column with an `id` and optional `header`. Used as the input shape
|
|
621
|
+
* for `columnHelper.accessor(key, ...)` — the `id` defaults to the accessor key
|
|
622
|
+
* so it's not required at the call site. Mirrors v9's `IdentifiedColumnDef`.
|
|
623
|
+
*/
|
|
624
|
+
type MRT_IdentifiedColumnDef<TData extends MRT_RowData, TValue = unknown> = MRT_DisplayColumnDef<TData, TValue>;
|
|
625
|
+
/**
|
|
626
|
+
* The result type of `columnHelper.accessor(fn, ...)`. Has a required
|
|
627
|
+
* `accessorFn`. Mirrors v9's `AccessorFnColumnDef`.
|
|
628
|
+
*/
|
|
629
|
+
type MRT_AccessorFnColumnDef<TData extends MRT_RowData, TValue = unknown> = MRT_DisplayColumnDef<TData, TValue> & {
|
|
630
|
+
accessorFn: (originalRow: TData) => TValue;
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* The result type of `columnHelper.accessor(key, ...)`. Has a required
|
|
634
|
+
* `accessorKey`. Mirrors v9's `AccessorKeyColumnDef`.
|
|
635
|
+
*/
|
|
636
|
+
type MRT_AccessorKeyColumnDef<TData extends MRT_RowData, TValue = unknown> = MRT_DisplayColumnDef<TData, TValue> & {
|
|
637
|
+
accessorKey: DeepKeys<TData> | (string & {});
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Union of `MRT_AccessorFnColumnDef` and `MRT_AccessorKeyColumnDef`.
|
|
641
|
+
* Mirrors v9's `AccessorColumnDef`.
|
|
642
|
+
*/
|
|
643
|
+
type MRT_AccessorColumnDef<TData extends MRT_RowData, TValue = unknown> = MRT_AccessorFnColumnDef<TData, TValue> | MRT_AccessorKeyColumnDef<TData, TValue>;
|
|
644
|
+
type MRT_GroupColumnDef<TData extends MRT_RowData, TValue = unknown> = MRT_DisplayColumnDef<TData, TValue> & {
|
|
645
|
+
columns?: ReadonlyArray<MRT_ColumnDef<TData, any>>;
|
|
646
|
+
};
|
|
647
|
+
type MRT_DefinedColumnDef<TData extends MRT_RowData, TValue = unknown> = {
|
|
648
|
+
_filterFn: MRT_FilterOption;
|
|
649
|
+
defaultDisplayColumn: Partial<MRT_ColumnDef<TData, TValue>>;
|
|
650
|
+
id: string;
|
|
651
|
+
} & Omit<MRT_ColumnDef<TData, TValue>, 'defaultDisplayColumn' | 'id'>;
|
|
652
|
+
type MRT_Column<TData extends MRT_RowData, TValue = unknown> = {
|
|
653
|
+
columnDef: MRT_DefinedColumnDef<TData, TValue>;
|
|
654
|
+
columns?: Array<MRT_Column<TData>>;
|
|
655
|
+
filterFn?: MRT_FilterFn<TData>;
|
|
656
|
+
footer: string;
|
|
657
|
+
header: string;
|
|
658
|
+
} & Omit<Column<StockFeatures, TData, MRT_CellValue>, 'columnDef' | 'columns' | 'filterFn' | 'footer' | 'header'>;
|
|
659
|
+
type MRT_Header<TData extends MRT_RowData, TValue = unknown> = {
|
|
660
|
+
column: MRT_Column<TData, TValue>;
|
|
661
|
+
} & Omit<Header<StockFeatures, TData, MRT_CellValue>, 'column'>;
|
|
662
|
+
type MRT_HeaderGroup<TData extends MRT_RowData> = {
|
|
663
|
+
headers: Array<MRT_Header<TData>>;
|
|
664
|
+
} & Omit<HeaderGroup<StockFeatures, TData>, 'headers'>;
|
|
665
|
+
type MRT_Row<TData extends MRT_RowData> = {
|
|
666
|
+
_valuesCache: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
|
|
667
|
+
getAllCells: () => Array<MRT_Cell<TData>>;
|
|
668
|
+
getVisibleCells: () => Array<MRT_Cell<TData>>;
|
|
669
|
+
subRows?: Array<MRT_Row<TData>>;
|
|
670
|
+
} & Omit<Row<StockFeatures, TData>, '_valuesCache' | 'getAllCells' | 'getVisibleCells' | 'subRows'>;
|
|
671
|
+
type MRT_Cell<TData extends MRT_RowData, TValue = unknown> = {
|
|
672
|
+
column: MRT_Column<TData, TValue>;
|
|
673
|
+
row: MRT_Row<TData>;
|
|
674
|
+
} & Omit<Cell<StockFeatures, TData, TValue>, 'column' | 'row'>;
|
|
675
|
+
type MRT_RowAggregationOption = keyof typeof MRT_RowAggregationFns & string;
|
|
676
|
+
type MRT_RowAggregationFn<TData extends MRT_RowData> = AggregationFnDef<StockFeatures, TData, any, any> | MRT_RowAggregationOption;
|
|
677
|
+
type MRT_SortingOption = LiteralUnion<keyof typeof MRT_SortFns & string>;
|
|
678
|
+
type MRT_SortFn<TData extends MRT_RowData> = MRT_SortingOption | SortFn<StockFeatures, TData>;
|
|
679
|
+
type MRT_FilterOption = LiteralUnion<keyof typeof MRT_FilterFns & string>;
|
|
680
|
+
type MRT_FilterFn<TData extends MRT_RowData> = FilterFn<StockFeatures, TData> | MRT_FilterOption;
|
|
681
|
+
type MRT_FilterTooltipValueFn<TValue = any> = (value: TValue) => string;
|
|
682
|
+
type MRT_InternalFilterOption = {
|
|
683
|
+
divider: boolean;
|
|
684
|
+
label: string;
|
|
685
|
+
option: string;
|
|
686
|
+
symbol: string;
|
|
687
|
+
};
|
|
688
|
+
type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row-expand' | 'mrt-row-numbers' | 'mrt-row-pin' | 'mrt-row-select' | 'mrt-row-spacer';
|
|
689
|
+
type MRT_CreateTableFeature<TData extends MRT_RowData, TFeature = any> = (table: MRT_TableInstance<TData>) => TFeature;
|
|
690
|
+
/**
|
|
691
|
+
* `columns` and `data` props are the only required props, but there are over 150 other optional props.
|
|
692
|
+
*
|
|
693
|
+
* See more info on creating columns and data on the official docs site:
|
|
694
|
+
* @link https://www.mantine-react-table.com/docs/getting-started/usage
|
|
695
|
+
*
|
|
696
|
+
* See the full props list on the official docs site:
|
|
697
|
+
* @link https://www.mantine-react-table.com/docs/api/table-options
|
|
698
|
+
*/
|
|
699
|
+
type MRT_TableOptions<TData extends MRT_RowData> = {
|
|
700
|
+
/**
|
|
701
|
+
* Custom aggregation functions to apply to the table. These get merged with
|
|
702
|
+
* MRT's built-ins (`mean`, `min`, `max`, etc.) and passed into
|
|
703
|
+
* the aggregation feature registry.
|
|
704
|
+
*/
|
|
705
|
+
aggregationFns?: Record<string, AggregationFnDef<StockFeatures, TData, any, any>>;
|
|
706
|
+
/**
|
|
707
|
+
* Custom filter functions to apply to the table. These get merged with MRT's
|
|
708
|
+
* built-ins (`fuzzy`, `contains`, `between`, etc.) and passed into
|
|
709
|
+
* `createFilteredRowModel(...)`.
|
|
710
|
+
*/
|
|
711
|
+
filterFns?: Record<string, FilterFn<StockFeatures, TData>>;
|
|
712
|
+
/**
|
|
713
|
+
* Custom sort functions to apply to the table. These get merged with MRT's
|
|
714
|
+
* built-ins (`alphanumeric`, `fuzzy`, etc.) and passed into
|
|
715
|
+
* `createSortedRowModel(...)`.
|
|
716
|
+
*/
|
|
717
|
+
sortFns?: Record<string, SortFn<StockFeatures, TData>>;
|
|
718
|
+
columnFilterDisplayMode?: 'custom' | 'popover' | 'subheader';
|
|
719
|
+
columnFilterModeOptions?: Array<LiteralUnion<MRT_FilterOption & string>> | null;
|
|
720
|
+
/**
|
|
721
|
+
* The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
|
|
722
|
+
*
|
|
723
|
+
* See more info on creating columns on the official docs site:
|
|
724
|
+
* @link https://www.mantine-react-table.com/docs/guides/data-columns
|
|
725
|
+
* @link https://www.mantine-react-table.com/docs/guides/display-columns
|
|
726
|
+
*
|
|
727
|
+
* See all Columns Options on the official docs site:
|
|
728
|
+
* @link https://www.mantine-react-table.com/docs/api/column-options
|
|
729
|
+
*/
|
|
730
|
+
columns: Array<MRT_ColumnDef<TData>>;
|
|
731
|
+
columnVirtualizerInstanceRef?: MutableRefObject<null | Virtualizer<HTMLDivElement, HTMLTableCellElement>>;
|
|
732
|
+
columnVirtualizerOptions?: ((props: {
|
|
733
|
+
table: MRT_TableInstance<TData>;
|
|
734
|
+
}) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
|
|
735
|
+
createDisplayMode?: 'custom' | 'modal' | 'row';
|
|
736
|
+
/**
|
|
737
|
+
* Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
|
|
738
|
+
*
|
|
739
|
+
* See the usage guide for more info on creating columns and data:
|
|
740
|
+
* @link https://www.mantine-react-table.com/docs/getting-started/usage
|
|
741
|
+
*/
|
|
742
|
+
data: Array<TData>;
|
|
743
|
+
/**
|
|
744
|
+
* Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
|
|
745
|
+
*/
|
|
746
|
+
defaultColumn?: Partial<MRT_ColumnDef<TData>>;
|
|
747
|
+
/**
|
|
748
|
+
* Change the default options for display columns.
|
|
749
|
+
*/
|
|
750
|
+
defaultDisplayColumn?: Partial<MRT_DisplayColumnDef<TData>>;
|
|
751
|
+
displayColumnDefOptions?: Partial<{
|
|
752
|
+
[key in MRT_DisplayColumnIds]: Partial<MRT_DisplayColumnDef<TData>>;
|
|
753
|
+
}>;
|
|
754
|
+
editDisplayMode?: 'cell' | 'custom' | 'modal' | 'row' | 'table';
|
|
755
|
+
enableBatchRowSelection?: boolean;
|
|
756
|
+
enableBottomToolbar?: boolean;
|
|
757
|
+
enableClickToCopy?: ((cell: MRT_Cell<TData>) => boolean) | boolean;
|
|
758
|
+
enableColumnActions?: boolean;
|
|
759
|
+
enableColumnDragging?: boolean;
|
|
760
|
+
enableColumnFilterModes?: boolean;
|
|
761
|
+
enableColumnOrdering?: boolean;
|
|
762
|
+
enableColumnVirtualization?: boolean;
|
|
763
|
+
enableDensityToggle?: boolean;
|
|
764
|
+
enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
|
765
|
+
enableExpandAll?: boolean;
|
|
766
|
+
enableFacetedValues?: boolean;
|
|
767
|
+
enableFilterMatchHighlighting?: boolean;
|
|
768
|
+
enableFullScreenToggle?: boolean;
|
|
769
|
+
enableGlobalFilterModes?: boolean;
|
|
770
|
+
enableGlobalFilterRankedResults?: boolean;
|
|
771
|
+
enableHeaderActionsHoverReveal?: boolean;
|
|
772
|
+
enablePagination?: boolean;
|
|
773
|
+
enableRowActions?: boolean;
|
|
774
|
+
enableRowDragging?: boolean;
|
|
775
|
+
enableRowNumbers?: boolean;
|
|
776
|
+
enableRowOrdering?: boolean;
|
|
777
|
+
enableRowSelection?: ((row: MRT_Row<TData>) => boolean) | boolean;
|
|
778
|
+
enableRowVirtualization?: boolean;
|
|
779
|
+
enableSelectAll?: boolean;
|
|
780
|
+
enableStickyFooter?: boolean;
|
|
781
|
+
enableStickyHeader?: boolean;
|
|
782
|
+
enableTableFooter?: boolean;
|
|
783
|
+
enableTableHead?: boolean;
|
|
784
|
+
enableToolbarInternalActions?: boolean;
|
|
785
|
+
enableTopToolbar?: boolean;
|
|
786
|
+
expandRowsFn?: (dataRow: TData) => Array<TData>;
|
|
787
|
+
getRowId?: (originalRow: TData, index: number, parentRow: MRT_Row<TData>) => string | undefined;
|
|
788
|
+
globalFilterFn?: MRT_FilterOption;
|
|
789
|
+
globalFilterModeOptions?: Array<MRT_FilterOption> | null;
|
|
790
|
+
icons?: Partial<MRT_Icons>;
|
|
791
|
+
initialState?: Partial<MRT_TableState<TData>>;
|
|
792
|
+
/**
|
|
793
|
+
* Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
|
|
794
|
+
*/
|
|
795
|
+
layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
|
|
796
|
+
/**
|
|
797
|
+
* Pass in either a locale imported from `mantine-react-table/locales/*` or a custom locale object.
|
|
798
|
+
*
|
|
799
|
+
* See the localization (i18n) guide for more info:
|
|
800
|
+
* @link https://www.mantine-react-table.com/docs/guides/localization
|
|
801
|
+
*/
|
|
802
|
+
localization?: Partial<MRT_Localization>;
|
|
803
|
+
mantineBottomToolbarProps?: ((props: {
|
|
804
|
+
table: MRT_TableInstance<TData>;
|
|
805
|
+
}) => BoxProps & HTMLPropsRef<HTMLDivElement>) | (BoxProps & HTMLPropsRef<HTMLDivElement>);
|
|
806
|
+
mantineColumnActionsButtonProps?: ((props: {
|
|
807
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
808
|
+
table: MRT_TableInstance<TData>;
|
|
809
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
810
|
+
mantineColumnDragHandleProps?: ((props: {
|
|
811
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
812
|
+
table: MRT_TableInstance<TData>;
|
|
813
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
814
|
+
mantineCopyButtonProps?: ((props: {
|
|
815
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
816
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
817
|
+
row: MRT_Row<TData>;
|
|
818
|
+
table: MRT_TableInstance<TData>;
|
|
819
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<UnstyledButtonProps>);
|
|
820
|
+
mantineCreateRowModalProps?: ((props: {
|
|
821
|
+
row: MRT_Row<TData>;
|
|
822
|
+
table: MRT_TableInstance<TData>;
|
|
823
|
+
}) => HTMLPropsRef<HTMLDivElement> & Partial<ModalProps>) | (HTMLPropsRef<HTMLDivElement> & Partial<ModalProps>);
|
|
824
|
+
mantineDetailPanelProps?: ((props: {
|
|
825
|
+
row: MRT_Row<TData>;
|
|
826
|
+
table: MRT_TableInstance<TData>;
|
|
827
|
+
}) => BoxProps & HTMLPropsRef<HTMLTableCellElement>) | (BoxProps & HTMLPropsRef<HTMLTableCellElement>);
|
|
828
|
+
mantineEditRowModalProps?: ((props: {
|
|
829
|
+
row: MRT_Row<TData>;
|
|
830
|
+
table: MRT_TableInstance<TData>;
|
|
831
|
+
}) => HTMLPropsRef<HTMLDivElement> & Partial<ModalProps>) | (HTMLPropsRef<HTMLDivElement> & Partial<ModalProps>);
|
|
832
|
+
mantineEditSelectProps?: ((props: {
|
|
833
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
834
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
835
|
+
row: MRT_Row<TData>;
|
|
836
|
+
table: MRT_TableInstance<TData>;
|
|
837
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
|
|
838
|
+
mantineEditTextInputProps?: ((props: {
|
|
839
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
840
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
841
|
+
row: MRT_Row<TData>;
|
|
842
|
+
table: MRT_TableInstance<TData>;
|
|
843
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
|
|
844
|
+
mantineExpandAllButtonProps?: ((props: {
|
|
845
|
+
table: MRT_TableInstance<TData>;
|
|
846
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
847
|
+
mantineExpandButtonProps?: ((props: {
|
|
848
|
+
renderedRowIndex?: number;
|
|
849
|
+
row: MRT_Row<TData>;
|
|
850
|
+
table: MRT_TableInstance<TData>;
|
|
851
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
852
|
+
mantineFilterAutocompleteProps?: ((props: {
|
|
853
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
854
|
+
rangeFilterIndex?: number;
|
|
855
|
+
table: MRT_TableInstance<TData>;
|
|
856
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<AutocompleteProps>);
|
|
857
|
+
mantineFilterCheckboxProps?: ((props: {
|
|
858
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
859
|
+
table: MRT_TableInstance<TData>;
|
|
860
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<CheckboxProps>);
|
|
861
|
+
mantineFilterDateInputProps?: ((props: {
|
|
862
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
863
|
+
rangeFilterIndex?: number;
|
|
864
|
+
table: MRT_TableInstance<TData>;
|
|
865
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<DateInputProps>);
|
|
866
|
+
mantineFilterMultiSelectProps?: ((props: {
|
|
867
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
868
|
+
rangeFilterIndex?: number;
|
|
869
|
+
table: MRT_TableInstance<TData>;
|
|
870
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<MultiSelectProps>);
|
|
871
|
+
mantineFilterRangeSliderProps?: ((props: {
|
|
872
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
873
|
+
rangeFilterIndex?: number;
|
|
874
|
+
table: MRT_TableInstance<TData>;
|
|
875
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<RangeSliderProps>);
|
|
876
|
+
mantineFilterSelectProps?: ((props: {
|
|
877
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
878
|
+
rangeFilterIndex?: number;
|
|
879
|
+
table: MRT_TableInstance<TData>;
|
|
880
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<SelectProps>);
|
|
881
|
+
mantineFilterTextInputProps?: ((props: {
|
|
882
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
883
|
+
rangeFilterIndex?: number;
|
|
884
|
+
table: MRT_TableInstance<TData>;
|
|
885
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
|
|
886
|
+
mantineHighlightProps?: ((props: {
|
|
887
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
888
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
889
|
+
row: MRT_Row<TData>;
|
|
890
|
+
table: MRT_TableInstance<TData>;
|
|
891
|
+
}) => HTMLPropsRef<HTMLSpanElement> & Partial<HighlightProps>) | (HTMLPropsRef<HTMLSpanElement> & Partial<HighlightProps>);
|
|
892
|
+
mantineLoadingOverlayProps?: ((props: {
|
|
893
|
+
table: MRT_TableInstance<TData>;
|
|
894
|
+
}) => HTMLPropsRef<HTMLDivElement> & Partial<LoadingOverlayProps>) | (HTMLPropsRef<HTMLDivElement> & Partial<LoadingOverlayProps>);
|
|
895
|
+
mantinePaginationProps?: ((props: {
|
|
896
|
+
table: MRT_TableInstance<TData>;
|
|
897
|
+
}) => Partial<HTMLPropsRef<HTMLDivElement> & MRT_PaginationProps>) | Partial<HTMLPropsRef<HTMLDivElement> & MRT_PaginationProps>;
|
|
898
|
+
mantinePaperProps?: ((props: {
|
|
899
|
+
table: MRT_TableInstance<TData>;
|
|
900
|
+
}) => HTMLPropsRef<HTMLDivElement> & PaperProps) | (HTMLPropsRef<HTMLDivElement> & PaperProps);
|
|
901
|
+
mantineProgressProps?: ((props: {
|
|
902
|
+
isTopToolbar: boolean;
|
|
903
|
+
table: MRT_TableInstance<TData>;
|
|
904
|
+
}) => HTMLPropsRef<HTMLDivElement> & ProgressProps) | (HTMLPropsRef<HTMLDivElement> & ProgressProps);
|
|
905
|
+
mantineRowDragHandleProps?: ((props: {
|
|
906
|
+
row: MRT_Row<TData>;
|
|
907
|
+
table: MRT_TableInstance<TData>;
|
|
908
|
+
}) => HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>) | (HTMLPropsRef<HTMLButtonElement> & Partial<ActionIconProps>);
|
|
909
|
+
mantineSearchTextInputProps?: ((props: {
|
|
910
|
+
table: MRT_TableInstance<TData>;
|
|
911
|
+
}) => HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>) | (HTMLPropsRef<HTMLInputElement> & Partial<TextInputProps>);
|
|
912
|
+
mantineSelectAllCheckboxProps?: ((CheckboxProps | RadioProps | SwitchProps) & HTMLPropsRef<HTMLInputElement>) | ((props: {
|
|
913
|
+
table: MRT_TableInstance<TData>;
|
|
914
|
+
}) => (CheckboxProps | RadioProps | SwitchProps) & HTMLPropsRef<HTMLInputElement>);
|
|
915
|
+
mantineSelectCheckboxProps?: ((CheckboxProps | RadioProps | SwitchProps) & HTMLPropsRef<HTMLInputElement>) | ((props: {
|
|
916
|
+
renderedRowIndex?: number;
|
|
917
|
+
row: MRT_Row<TData>;
|
|
918
|
+
table: MRT_TableInstance<TData>;
|
|
919
|
+
}) => (CheckboxProps | RadioProps | SwitchProps) & HTMLPropsRef<HTMLInputElement>);
|
|
920
|
+
mantineSkeletonProps?: ((props: {
|
|
921
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
922
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
923
|
+
row: MRT_Row<TData>;
|
|
924
|
+
table: MRT_TableInstance<TData>;
|
|
925
|
+
}) => HTMLPropsRef<HTMLDivElement> & SkeletonProps) | (HTMLPropsRef<HTMLDivElement> & SkeletonProps);
|
|
926
|
+
mantineTableBodyCellProps?: ((props: {
|
|
927
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
928
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
929
|
+
renderedColumnIndex?: number;
|
|
930
|
+
renderedRowIndex?: number;
|
|
931
|
+
row: MRT_Row<TData>;
|
|
932
|
+
table: MRT_TableInstance<TData>;
|
|
933
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableTdProps) | (HTMLPropsRef<HTMLTableCellElement> & TableTdProps);
|
|
934
|
+
mantineTableBodyProps?: ((props: {
|
|
935
|
+
table: MRT_TableInstance<TData>;
|
|
936
|
+
}) => HTMLPropsRef<HTMLTableSectionElement> & TableTbodyProps) | (HTMLPropsRef<HTMLTableSectionElement> & TableTbodyProps);
|
|
937
|
+
mantineTableBodyRowProps?: ((props: {
|
|
938
|
+
isDetailPanel?: boolean;
|
|
939
|
+
renderedRowIndex?: number;
|
|
940
|
+
row: MRT_Row<TData>;
|
|
941
|
+
table: MRT_TableInstance<TData>;
|
|
942
|
+
}) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps) | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
|
|
943
|
+
mantineTableContainerProps?: ((props: {
|
|
944
|
+
table: MRT_TableInstance<TData>;
|
|
945
|
+
}) => BoxProps & HTMLPropsRef<HTMLDivElement>) | (BoxProps & HTMLPropsRef<HTMLDivElement>);
|
|
946
|
+
mantineTableFooterCellProps?: ((props: {
|
|
947
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
948
|
+
table: MRT_TableInstance<TData>;
|
|
949
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableThProps) | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
|
|
950
|
+
mantineTableFooterProps?: ((props: {
|
|
951
|
+
table: MRT_TableInstance<TData>;
|
|
952
|
+
}) => HTMLPropsRef<HTMLTableSectionElement> & TableTfootProps) | (HTMLPropsRef<HTMLTableSectionElement> & TableTfootProps);
|
|
953
|
+
mantineTableFooterRowProps?: ((props: {
|
|
954
|
+
footerGroup: MRT_HeaderGroup<TData>;
|
|
955
|
+
table: MRT_TableInstance<TData>;
|
|
956
|
+
}) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps) | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
|
|
957
|
+
mantineTableHeadCellProps?: ((props: {
|
|
958
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
959
|
+
table: MRT_TableInstance<TData>;
|
|
960
|
+
}) => HTMLPropsRef<HTMLTableCellElement> & TableThProps) | (HTMLPropsRef<HTMLTableCellElement> & TableThProps);
|
|
961
|
+
mantineTableHeadProps?: ((props: {
|
|
962
|
+
table: MRT_TableInstance<TData>;
|
|
963
|
+
}) => HTMLPropsRef<HTMLTableSectionElement> & TableTheadProps) | (HTMLPropsRef<HTMLTableSectionElement> & TableTheadProps);
|
|
964
|
+
mantineTableHeadRowProps?: ((props: {
|
|
965
|
+
headerGroup: MRT_HeaderGroup<TData>;
|
|
966
|
+
table: MRT_TableInstance<TData>;
|
|
967
|
+
}) => HTMLPropsRef<HTMLTableRowElement> & TableTrProps) | (HTMLPropsRef<HTMLTableRowElement> & TableTrProps);
|
|
968
|
+
mantineTableProps?: ((props: {
|
|
969
|
+
table: MRT_TableInstance<TData>;
|
|
970
|
+
}) => HTMLPropsRef<HTMLTableElement> & TableProps) | (HTMLPropsRef<HTMLTableElement> & TableProps);
|
|
971
|
+
mantineToolbarAlertBannerBadgeProps?: ((props: {
|
|
972
|
+
table: MRT_TableInstance<TData>;
|
|
973
|
+
}) => HTMLPropsRef<HTMLDivElement> & Partial<BadgeProps>) | (HTMLPropsRef<HTMLDivElement> & Partial<BadgeProps>);
|
|
974
|
+
mantineToolbarAlertBannerProps?: ((props: {
|
|
975
|
+
table: MRT_TableInstance<TData>;
|
|
976
|
+
}) => HTMLPropsRef<HTMLDivElement> & Partial<AlertProps>) | (HTMLPropsRef<HTMLDivElement> & Partial<AlertProps>);
|
|
977
|
+
mantineTopToolbarProps?: ((props: {
|
|
978
|
+
table: MRT_TableInstance<TData>;
|
|
979
|
+
}) => BoxProps & HTMLPropsRef<HTMLDivElement>) | (BoxProps & HTMLPropsRef<HTMLDivElement>);
|
|
980
|
+
/**
|
|
981
|
+
* Memoize cells, rows, or the entire table body to potentially improve render performance.
|
|
982
|
+
*
|
|
983
|
+
* @warning This will break some dynamic rendering features. See the memoization guide for more info:
|
|
984
|
+
* @link https://www.mantine-react-table.com/docs/guides/memoize-components
|
|
985
|
+
*/
|
|
986
|
+
memoMode?: 'cells' | 'rows' | 'table-body';
|
|
987
|
+
onColumnFilterFnsChange?: OnChangeFn<{
|
|
988
|
+
[key: string]: MRT_FilterOption;
|
|
989
|
+
}>;
|
|
990
|
+
onCreatingRowCancel?: (props: {
|
|
991
|
+
row: MRT_Row<TData>;
|
|
992
|
+
table: MRT_TableInstance<TData>;
|
|
993
|
+
}) => void;
|
|
994
|
+
onCreatingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
995
|
+
onCreatingRowSave?: (props: {
|
|
996
|
+
exitCreatingMode: () => void;
|
|
997
|
+
row: MRT_Row<TData>;
|
|
998
|
+
table: MRT_TableInstance<TData>;
|
|
999
|
+
values: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
|
|
1000
|
+
}) => void;
|
|
1001
|
+
onDensityChange?: OnChangeFn<MRT_DensityState>;
|
|
1002
|
+
onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
1003
|
+
onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
1004
|
+
onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
|
1005
|
+
onEditingRowCancel?: (props: {
|
|
1006
|
+
row: MRT_Row<TData>;
|
|
1007
|
+
table: MRT_TableInstance<TData>;
|
|
1008
|
+
}) => void;
|
|
1009
|
+
onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
1010
|
+
onEditingRowSave?: (props: {
|
|
1011
|
+
exitEditingMode: () => void;
|
|
1012
|
+
row: MRT_Row<TData>;
|
|
1013
|
+
table: MRT_TableInstance<TData>;
|
|
1014
|
+
values: Record<LiteralUnion<DeepKeys<TData> & string>, any>;
|
|
1015
|
+
}) => Promise<void> | void;
|
|
1016
|
+
onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
|
|
1017
|
+
onHoveredColumnChange?: OnChangeFn<null | Partial<MRT_Column<TData>>>;
|
|
1018
|
+
onHoveredRowChange?: OnChangeFn<null | Partial<MRT_Row<TData>>>;
|
|
1019
|
+
onIsFullScreenChange?: OnChangeFn<boolean>;
|
|
1020
|
+
onShowAlertBannerChange?: OnChangeFn<boolean>;
|
|
1021
|
+
onShowColumnFiltersChange?: OnChangeFn<boolean>;
|
|
1022
|
+
onShowGlobalFilterChange?: OnChangeFn<boolean>;
|
|
1023
|
+
onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
|
|
1024
|
+
paginationDisplayMode?: 'custom' | 'default' | 'pages';
|
|
1025
|
+
positionActionsColumn?: 'first' | 'last';
|
|
1026
|
+
positionCreatingRow?: 'bottom' | 'top' | number;
|
|
1027
|
+
positionExpandColumn?: 'first' | 'last';
|
|
1028
|
+
positionGlobalFilter?: 'left' | 'none' | 'right';
|
|
1029
|
+
positionPagination?: 'both' | 'bottom' | 'none' | 'top';
|
|
1030
|
+
positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
|
|
1031
|
+
positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
|
|
1032
|
+
renderBottomToolbar?: ((props: {
|
|
1033
|
+
table: MRT_TableInstance<TData>;
|
|
1034
|
+
}) => ReactNode) | ReactNode;
|
|
1035
|
+
renderBottomToolbarCustomActions?: (props: {
|
|
1036
|
+
table: MRT_TableInstance<TData>;
|
|
1037
|
+
}) => ReactNode;
|
|
1038
|
+
renderColumnActionsMenuItems?: (props: {
|
|
1039
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
1040
|
+
internalColumnMenuItems: ReactNode;
|
|
1041
|
+
table: MRT_TableInstance<TData>;
|
|
1042
|
+
}) => ReactNode;
|
|
1043
|
+
renderColumnFilterModeMenuItems?: (props: {
|
|
1044
|
+
column: MRT_Column<TData, MRT_CellValue>;
|
|
1045
|
+
internalFilterOptions: Array<MRT_InternalFilterOption>;
|
|
1046
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
|
1047
|
+
table: MRT_TableInstance<TData>;
|
|
1048
|
+
}) => ReactNode;
|
|
1049
|
+
renderCreateRowModalContent?: (props: {
|
|
1050
|
+
internalEditComponents: Array<ReactNode>;
|
|
1051
|
+
row: MRT_Row<TData>;
|
|
1052
|
+
table: MRT_TableInstance<TData>;
|
|
1053
|
+
}) => ReactNode;
|
|
1054
|
+
renderDetailPanel?: (props: {
|
|
1055
|
+
internalEditComponents: Array<ReactNode>;
|
|
1056
|
+
row: MRT_Row<TData>;
|
|
1057
|
+
table: MRT_TableInstance<TData>;
|
|
1058
|
+
}) => ReactNode;
|
|
1059
|
+
renderEditRowModalContent?: (props: {
|
|
1060
|
+
internalEditComponents: Array<ReactNode>;
|
|
1061
|
+
row: MRT_Row<TData>;
|
|
1062
|
+
table: MRT_TableInstance<TData>;
|
|
1063
|
+
}) => ReactNode;
|
|
1064
|
+
renderEmptyRowsFallback?: (props: {
|
|
1065
|
+
table: MRT_TableInstance<TData>;
|
|
1066
|
+
}) => ReactNode;
|
|
1067
|
+
renderGlobalFilterModeMenuItems?: (props: {
|
|
1068
|
+
internalFilterOptions: Array<MRT_InternalFilterOption>;
|
|
1069
|
+
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
|
1070
|
+
table: MRT_TableInstance<TData>;
|
|
1071
|
+
}) => ReactNode;
|
|
1072
|
+
renderRowActionMenuItems?: (props: {
|
|
1073
|
+
renderedRowIndex?: number;
|
|
1074
|
+
row: MRT_Row<TData>;
|
|
1075
|
+
table: MRT_TableInstance<TData>;
|
|
1076
|
+
}) => ReactNode;
|
|
1077
|
+
renderRowActions?: (props: {
|
|
1078
|
+
cell: MRT_Cell<TData, MRT_CellValue>;
|
|
1079
|
+
renderedRowIndex?: number;
|
|
1080
|
+
row: MRT_Row<TData>;
|
|
1081
|
+
table: MRT_TableInstance<TData>;
|
|
1082
|
+
}) => ReactNode;
|
|
1083
|
+
renderToolbarAlertBannerContent?: (props: {
|
|
1084
|
+
groupedAlert: null | ReactNode;
|
|
1085
|
+
selectedAlert: null | ReactNode;
|
|
1086
|
+
table: MRT_TableInstance<TData>;
|
|
1087
|
+
}) => ReactNode;
|
|
1088
|
+
renderToolbarInternalActions?: (props: {
|
|
1089
|
+
table: MRT_TableInstance<TData>;
|
|
1090
|
+
}) => ReactNode;
|
|
1091
|
+
renderTopToolbar?: ((props: {
|
|
1092
|
+
table: MRT_TableInstance<TData>;
|
|
1093
|
+
}) => ReactNode) | ReactNode;
|
|
1094
|
+
renderTopToolbarCustomActions?: (props: {
|
|
1095
|
+
table: MRT_TableInstance<TData>;
|
|
1096
|
+
}) => ReactNode;
|
|
1097
|
+
rowCount?: number;
|
|
1098
|
+
rowNumberDisplayMode?: 'original' | 'static';
|
|
1099
|
+
rowPinningDisplayMode?: 'bottom' | 'select-bottom' | 'select-sticky' | 'select-top' | 'sticky' | 'top' | 'top-and-bottom';
|
|
1100
|
+
rowVirtualizerInstanceRef?: MutableRefObject<null | Virtualizer<HTMLDivElement, HTMLTableRowElement>>;
|
|
1101
|
+
rowVirtualizerOptions?: ((props: {
|
|
1102
|
+
table: MRT_TableInstance<TData>;
|
|
1103
|
+
}) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>;
|
|
1104
|
+
selectAllMode?: 'all' | 'page';
|
|
1105
|
+
selectDisplayMode?: 'checkbox' | 'radio' | 'switch';
|
|
1106
|
+
/**
|
|
1107
|
+
* Manage state externally any way you want, then pass it back into MRT.
|
|
1108
|
+
*/
|
|
1109
|
+
state?: Partial<MRT_TableState<TData>>;
|
|
1110
|
+
} & Omit<Partial<TableOptions<StockFeatures, TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'getRowId' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'>;
|
|
1111
|
+
|
|
1112
|
+
interface MRT_TableBodyProps<TData extends MRT_RowData> extends TableTbodyProps {
|
|
1113
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1114
|
+
table: MRT_TableInstance<TData>;
|
|
1115
|
+
tableProps: Partial<TableProps>;
|
|
1116
|
+
}
|
|
1117
|
+
declare const MRT_TableBody: <TData extends MRT_RowData>({ columnVirtualizer, table, tableProps, ...rest }: MRT_TableBodyProps<TData>) => react.JSX.Element;
|
|
1118
|
+
declare const Memo_MRT_TableBody: typeof MRT_TableBody;
|
|
1119
|
+
|
|
1120
|
+
interface Props$R<TData extends MRT_RowData, TValue = MRT_CellValue> extends TableTdProps {
|
|
1121
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1122
|
+
numRows?: number;
|
|
1123
|
+
renderedColumnIndex?: number;
|
|
1124
|
+
renderedRowIndex?: number;
|
|
1125
|
+
rowRef: RefObject<HTMLTableRowElement | null>;
|
|
1126
|
+
table: MRT_TableInstance<TData>;
|
|
1127
|
+
virtualCell?: MRT_VirtualItem;
|
|
1128
|
+
}
|
|
1129
|
+
declare const MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, numRows, renderedColumnIndex, renderedRowIndex, rowRef, table, virtualCell, ...rest }: Props$R<TData>) => react.JSX.Element;
|
|
1130
|
+
declare const Memo_MRT_TableBodyCell: typeof MRT_TableBodyCell;
|
|
1131
|
+
|
|
1132
|
+
interface Props$Q<TData extends MRT_RowData, TValue = MRT_CellValue> {
|
|
1133
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1134
|
+
renderedColumnIndex?: number;
|
|
1135
|
+
renderedRowIndex?: number;
|
|
1136
|
+
table: MRT_TableInstance<TData>;
|
|
1137
|
+
}
|
|
1138
|
+
declare const MRT_TableBodyCellValue: <TData extends MRT_RowData>({ cell, renderedColumnIndex, renderedRowIndex, table, }: Props$Q<TData>) => react.ReactNode;
|
|
1139
|
+
|
|
1140
|
+
interface Props$P<TData extends MRT_RowData> extends TableTrProps {
|
|
1141
|
+
table: MRT_TableInstance<TData>;
|
|
1142
|
+
tableProps: Partial<TableProps>;
|
|
1143
|
+
}
|
|
1144
|
+
declare const MRT_TableBodyEmptyRow: <TData extends MRT_RowData>({ table, tableProps, ...commonRowProps }: Props$P<TData>) => react.JSX.Element;
|
|
1145
|
+
|
|
1146
|
+
interface Props$O<TData extends MRT_RowData> extends TableTrProps {
|
|
1147
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1148
|
+
numRows?: number;
|
|
1149
|
+
pinnedRowIds?: Array<string>;
|
|
1150
|
+
renderedRowIndex?: number;
|
|
1151
|
+
row: MRT_Row<TData>;
|
|
1152
|
+
rowVirtualizer?: MRT_RowVirtualizer;
|
|
1153
|
+
table: MRT_TableInstance<TData>;
|
|
1154
|
+
tableProps: Partial<TableProps>;
|
|
1155
|
+
virtualRow?: MRT_VirtualItem;
|
|
1156
|
+
}
|
|
1157
|
+
declare const MRT_TableBodyRow: <TData extends MRT_RowData>({ children, columnVirtualizer, numRows, pinnedRowIds, renderedRowIndex, row, rowVirtualizer, table, tableProps, virtualRow, ...rest }: Props$O<TData>) => react.JSX.Element;
|
|
1158
|
+
declare const Memo_MRT_TableBodyRow: typeof MRT_TableBodyRow;
|
|
1159
|
+
|
|
1160
|
+
interface Props$N<TData extends MRT_RowData> extends ActionIconProps {
|
|
1161
|
+
row: MRT_Row<TData>;
|
|
1162
|
+
rowRef: RefObject<HTMLTableRowElement>;
|
|
1163
|
+
table: MRT_TableInstance<TData>;
|
|
1164
|
+
}
|
|
1165
|
+
declare const MRT_TableBodyRowGrabHandle: <TData extends MRT_RowData>({ row, rowRef, table, ...rest }: Props$N<TData>) => react.JSX.Element;
|
|
1166
|
+
|
|
1167
|
+
interface Props$M<TData extends MRT_RowData> extends ActionIconProps {
|
|
1168
|
+
row: MRT_Row<TData>;
|
|
1169
|
+
table: MRT_TableInstance<TData>;
|
|
1170
|
+
}
|
|
1171
|
+
declare const MRT_TableBodyRowPinButton: <TData extends MRT_RowData>({ row, table, ...rest }: Props$M<TData>) => react.JSX.Element | null;
|
|
1172
|
+
|
|
1173
|
+
interface Props$L<TData extends MRT_RowData> extends TableTdProps {
|
|
1174
|
+
parentRowRef: RefObject<HTMLTableRowElement | null>;
|
|
1175
|
+
renderedRowIndex?: number;
|
|
1176
|
+
row: MRT_Row<TData>;
|
|
1177
|
+
rowVirtualizer?: MRT_RowVirtualizer;
|
|
1178
|
+
striped?: false | string;
|
|
1179
|
+
table: MRT_TableInstance<TData>;
|
|
1180
|
+
virtualRow?: MRT_VirtualItem;
|
|
1181
|
+
}
|
|
1182
|
+
declare const MRT_TableDetailPanel: <TData extends MRT_RowData>({ parentRowRef, renderedRowIndex, row, rowVirtualizer, striped, table, virtualRow, ...rest }: Props$L<TData>) => react.JSX.Element;
|
|
1183
|
+
|
|
1184
|
+
interface Props$K<TData extends MRT_RowData> {
|
|
1185
|
+
column: MRT_Column<TData>;
|
|
1186
|
+
table: MRT_TableInstance<TData>;
|
|
1187
|
+
}
|
|
1188
|
+
declare const MRT_ColumnPinningButtons: <TData extends MRT_RowData>({ column, table, }: Props$K<TData>) => react.JSX.Element;
|
|
1189
|
+
|
|
1190
|
+
interface Props$J<TData extends MRT_RowData, TValue = MRT_CellValue> extends UnstyledButtonProps {
|
|
1191
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1192
|
+
children: ReactNode;
|
|
1193
|
+
table: MRT_TableInstance<TData>;
|
|
1194
|
+
}
|
|
1195
|
+
declare const MRT_CopyButton: <TData extends MRT_RowData>({ cell, children, table, ...rest }: Props$J<TData>) => react.JSX.Element;
|
|
1196
|
+
|
|
1197
|
+
interface Props$I<TData extends MRT_RowData> extends BoxProps {
|
|
1198
|
+
row: MRT_Row<TData>;
|
|
1199
|
+
table: MRT_TableInstance<TData>;
|
|
1200
|
+
variant?: 'icon' | 'text';
|
|
1201
|
+
}
|
|
1202
|
+
declare const MRT_EditActionButtons: <TData extends MRT_RowData>({ row, table, variant, ...rest }: Props$I<TData>) => react.JSX.Element;
|
|
1203
|
+
|
|
1204
|
+
interface Props$H<TData extends MRT_RowData> extends ActionIconProps {
|
|
1205
|
+
table: MRT_TableInstance<TData>;
|
|
1206
|
+
}
|
|
1207
|
+
declare const MRT_ExpandAllButton: <TData extends MRT_RowData>({ table, ...rest }: Props$H<TData>) => react.JSX.Element;
|
|
1208
|
+
|
|
1209
|
+
interface Props$G<TData extends MRT_RowData> extends ActionIconProps {
|
|
1210
|
+
row: MRT_Row<TData>;
|
|
1211
|
+
table: MRT_TableInstance<TData>;
|
|
1212
|
+
}
|
|
1213
|
+
declare const MRT_ExpandButton: <TData extends MRT_RowData>({ row, table, ...rest }: Props$G<TData>) => react.JSX.Element;
|
|
1214
|
+
|
|
1215
|
+
interface Props$F<TData extends MRT_RowData> {
|
|
1216
|
+
actionIconProps?: ActionIconProps & HTMLPropsRef<HTMLButtonElement>;
|
|
1217
|
+
onDragEnd: DragEventHandler<HTMLButtonElement>;
|
|
1218
|
+
onDragStart: DragEventHandler<HTMLButtonElement>;
|
|
1219
|
+
table: MRT_TableInstance<TData>;
|
|
1220
|
+
}
|
|
1221
|
+
declare const MRT_GrabHandleButton: <TData extends MRT_RowData>({ actionIconProps, onDragEnd, onDragStart, table: { options: { icons: { IconGripHorizontal }, localization: { move }, }, }, }: Props$F<TData>) => react.JSX.Element;
|
|
1222
|
+
|
|
1223
|
+
interface Props$E<TData extends MRT_RowData> extends ActionIconProps {
|
|
1224
|
+
pinningPosition: RowPinningPosition;
|
|
1225
|
+
row: MRT_Row<TData>;
|
|
1226
|
+
table: MRT_TableInstance<TData>;
|
|
1227
|
+
}
|
|
1228
|
+
declare const MRT_RowPinButton: <TData extends MRT_RowData>({ pinningPosition, row, table, ...rest }: Props$E<TData>) => react.JSX.Element;
|
|
1229
|
+
|
|
1230
|
+
interface Props$D<TData extends MRT_RowData> extends ActionIconProps, HTMLPropsRef<HTMLButtonElement> {
|
|
1231
|
+
table: MRT_TableInstance<TData>;
|
|
1232
|
+
}
|
|
1233
|
+
declare const MRT_ShowHideColumnsButton: <TData extends MRT_RowData>({ table, title, ...rest }: Props$D<TData>) => react.JSX.Element;
|
|
1234
|
+
|
|
1235
|
+
interface Props$C<TData extends MRT_RowData> extends ActionIconProps, HTMLPropsRef<HTMLButtonElement> {
|
|
1236
|
+
table: MRT_TableInstance<TData>;
|
|
1237
|
+
}
|
|
1238
|
+
declare const MRT_ToggleDensePaddingButton: <TData extends MRT_RowData>({ table: { state, options: { icons: { IconBaselineDensityLarge, IconBaselineDensityMedium, IconBaselineDensitySmall, }, localization: { toggleDensity }, }, setDensity, }, title, ...rest }: Props$C<TData>) => react.JSX.Element;
|
|
1239
|
+
|
|
1240
|
+
interface Props$B<TData extends MRT_RowData> extends ActionIconProps, HTMLPropsRef<HTMLButtonElement> {
|
|
1241
|
+
table: MRT_TableInstance<TData>;
|
|
1242
|
+
}
|
|
1243
|
+
declare const MRT_ToggleFiltersButton: <TData extends MRT_RowData>({ table: { state, options: { icons: { IconFilter, IconFilterOff }, localization: { showHideFilters }, }, setShowColumnFilters, }, title, ...rest }: Props$B<TData>) => react.JSX.Element;
|
|
1244
|
+
|
|
1245
|
+
interface Props$A<TData extends MRT_RowData> extends ActionIconProps, HTMLPropsRef<HTMLButtonElement> {
|
|
1246
|
+
table: MRT_TableInstance<TData>;
|
|
1247
|
+
}
|
|
1248
|
+
declare const MRT_ToggleFullScreenButton: <TData extends MRT_RowData>({ table: { state, options: { icons: { IconMaximize, IconMinimize }, localization: { toggleFullScreen }, }, setIsFullScreen, }, title, ...rest }: Props$A<TData>) => react.JSX.Element;
|
|
1249
|
+
|
|
1250
|
+
interface Props$z<TData extends MRT_RowData> extends ActionIconProps, HTMLPropsRef<HTMLButtonElement> {
|
|
1251
|
+
table: MRT_TableInstance<TData>;
|
|
1252
|
+
}
|
|
1253
|
+
declare const MRT_ToggleGlobalFilterButton: <TData extends MRT_RowData>({ table: { state, options: { icons: { IconSearch, IconSearchOff }, localization: { showHideSearch }, }, refs: { searchInputRef }, setShowGlobalFilter, }, title, ...rest }: Props$z<TData>) => react.JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
interface Props$y<TData extends MRT_RowData, TValue = MRT_CellValue> {
|
|
1256
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1257
|
+
row: MRT_Row<TData>;
|
|
1258
|
+
table: MRT_TableInstance<TData>;
|
|
1259
|
+
}
|
|
1260
|
+
declare const MRT_ToggleRowActionMenuButton: <TData extends MRT_RowData>({ cell, row, table, }: Props$y<TData>) => react.JSX.Element;
|
|
1261
|
+
|
|
1262
|
+
interface Props$x<TData extends MRT_RowData> extends TableTfootProps {
|
|
1263
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1264
|
+
table: MRT_TableInstance<TData>;
|
|
1265
|
+
}
|
|
1266
|
+
declare const MRT_TableFooter: <TData extends MRT_RowData>({ columnVirtualizer, table, ...rest }: Props$x<TData>) => react.JSX.Element;
|
|
1267
|
+
|
|
1268
|
+
interface Props$w<TData extends MRT_RowData> extends TableThProps {
|
|
1269
|
+
footer: MRT_Header<TData>;
|
|
1270
|
+
renderedColumnIndex?: number;
|
|
1271
|
+
table: MRT_TableInstance<TData>;
|
|
1272
|
+
}
|
|
1273
|
+
declare const MRT_TableFooterCell: <TData extends MRT_RowData>({ footer, renderedColumnIndex, table, ...rest }: Props$w<TData>) => react.JSX.Element;
|
|
1274
|
+
|
|
1275
|
+
interface Props$v<TData extends MRT_RowData> extends TableTrProps {
|
|
1276
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1277
|
+
footerGroup: MRT_HeaderGroup<TData>;
|
|
1278
|
+
table: MRT_TableInstance<TData>;
|
|
1279
|
+
}
|
|
1280
|
+
declare const MRT_TableFooterRow: <TData extends MRT_RowData>({ columnVirtualizer, footerGroup, table, ...rest }: Props$v<TData>) => react.JSX.Element | null;
|
|
1281
|
+
|
|
1282
|
+
interface Props$u<TData extends MRT_RowData> extends TableTheadProps {
|
|
1283
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1284
|
+
table: MRT_TableInstance<TData>;
|
|
1285
|
+
}
|
|
1286
|
+
declare const MRT_TableHead: <TData extends MRT_RowData>({ columnVirtualizer, table, ...rest }: Props$u<TData>) => react.JSX.Element;
|
|
1287
|
+
|
|
1288
|
+
interface Props$t<TData extends MRT_RowData> extends TableThProps {
|
|
1289
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1290
|
+
header: MRT_Header<TData>;
|
|
1291
|
+
renderedHeaderIndex?: number;
|
|
1292
|
+
table: MRT_TableInstance<TData>;
|
|
1293
|
+
}
|
|
1294
|
+
declare const MRT_TableHeadCell: <TData extends MRT_RowData>({ columnVirtualizer, header, renderedHeaderIndex, table, ...rest }: Props$t<TData>) => react.JSX.Element;
|
|
1295
|
+
|
|
1296
|
+
interface Props$s<TData extends MRT_RowData> extends FlexProps {
|
|
1297
|
+
header: MRT_Header<TData>;
|
|
1298
|
+
table: MRT_TableInstance<TData>;
|
|
1299
|
+
}
|
|
1300
|
+
declare const MRT_TableHeadCellFilterContainer: <TData extends MRT_RowData>({ header, table, ...rest }: Props$s<TData>) => react.JSX.Element;
|
|
1301
|
+
|
|
1302
|
+
interface Props$r<TData extends MRT_RowData> extends ActionIconProps {
|
|
1303
|
+
header: MRT_Header<TData>;
|
|
1304
|
+
table: MRT_TableInstance<TData>;
|
|
1305
|
+
}
|
|
1306
|
+
declare const MRT_TableHeadCellFilterLabel: <TData extends MRT_RowData>({ header, table, ...rest }: Props$r<TData>) => react.JSX.Element;
|
|
1307
|
+
|
|
1308
|
+
interface Props$q<TData extends MRT_RowData, TValue = MRT_CellValue> extends ActionIconProps {
|
|
1309
|
+
column: MRT_Column<TData, TValue>;
|
|
1310
|
+
table: MRT_TableInstance<TData>;
|
|
1311
|
+
tableHeadCellRef: RefObject<HTMLTableCellElement>;
|
|
1312
|
+
}
|
|
1313
|
+
declare const MRT_TableHeadCellGrabHandle: <TData extends MRT_RowData>({ column, table, tableHeadCellRef, ...rest }: Props$q<TData>) => react.JSX.Element;
|
|
1314
|
+
|
|
1315
|
+
interface Props$p<TData extends MRT_RowData> extends BoxProps {
|
|
1316
|
+
header: MRT_Header<TData>;
|
|
1317
|
+
table: MRT_TableInstance<TData>;
|
|
1318
|
+
}
|
|
1319
|
+
declare const MRT_TableHeadCellResizeHandle: <TData extends MRT_RowData>({ header, table, ...rest }: Props$p<TData>) => react.JSX.Element;
|
|
1320
|
+
|
|
1321
|
+
interface Props$o<TData extends MRT_RowData> extends ActionIconProps {
|
|
1322
|
+
header: MRT_Header<TData>;
|
|
1323
|
+
table: MRT_TableInstance<TData>;
|
|
1324
|
+
}
|
|
1325
|
+
declare const MRT_TableHeadCellSortLabel: <TData extends MRT_RowData>({ header, table, ...rest }: Props$o<TData>) => react.JSX.Element;
|
|
1326
|
+
|
|
1327
|
+
interface Props$n<TData extends MRT_RowData> extends TableTrProps {
|
|
1328
|
+
columnVirtualizer?: MRT_ColumnVirtualizer;
|
|
1329
|
+
headerGroup: MRT_HeaderGroup<TData>;
|
|
1330
|
+
table: MRT_TableInstance<TData>;
|
|
1331
|
+
}
|
|
1332
|
+
declare const MRT_TableHeadRow: <TData extends MRT_RowData>({ columnVirtualizer, headerGroup, table, ...rest }: Props$n<TData>) => react.JSX.Element;
|
|
1333
|
+
|
|
1334
|
+
interface PropsTextInput<TData extends MRT_RowData, TValue = MRT_CellValue> extends TextInputProps {
|
|
1335
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1336
|
+
table: MRT_TableInstance<TData>;
|
|
1337
|
+
}
|
|
1338
|
+
interface PropsSelect<TData extends MRT_RowData, TValue = MRT_CellValue> extends SelectProps {
|
|
1339
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1340
|
+
table: MRT_TableInstance<TData>;
|
|
1341
|
+
}
|
|
1342
|
+
interface PropsMultiSelect<TData extends MRT_RowData, TValue = MRT_CellValue> extends MultiSelectProps {
|
|
1343
|
+
cell: MRT_Cell<TData, TValue>;
|
|
1344
|
+
table: MRT_TableInstance<TData>;
|
|
1345
|
+
}
|
|
1346
|
+
declare const MRT_EditCellTextInput: <TData extends MRT_RowData>({ cell, table, ...rest }: PropsMultiSelect<TData> | PropsSelect<TData> | PropsTextInput<TData>) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
1347
|
+
|
|
1348
|
+
interface Props$m<TData extends MRT_RowData, TValue = MRT_CellValue> extends CheckboxProps {
|
|
1349
|
+
column: MRT_Column<TData, TValue>;
|
|
1350
|
+
table: MRT_TableInstance<TData>;
|
|
1351
|
+
}
|
|
1352
|
+
declare const MRT_FilterCheckbox: <TData extends MRT_RowData>({ column, table, ...rest }: Props$m<TData>) => react.JSX.Element;
|
|
1353
|
+
|
|
1354
|
+
interface Props$l<TData extends MRT_RowData> extends BoxProps {
|
|
1355
|
+
header: MRT_Header<TData>;
|
|
1356
|
+
table: MRT_TableInstance<TData>;
|
|
1357
|
+
}
|
|
1358
|
+
declare const MRT_FilterRangeFields: <TData extends MRT_RowData>({ header, table, ...rest }: Props$l<TData>) => react.JSX.Element;
|
|
1359
|
+
|
|
1360
|
+
interface Props$k<TData extends MRT_RowData> extends RangeSliderProps {
|
|
1361
|
+
header: MRT_Header<TData>;
|
|
1362
|
+
table: MRT_TableInstance<TData>;
|
|
1363
|
+
}
|
|
1364
|
+
declare const MRT_FilterRangeSlider: <TData extends MRT_RowData>({ header, table, ...rest }: Props$k<TData>) => react.JSX.Element;
|
|
1365
|
+
|
|
1366
|
+
interface Props$j<TData extends MRT_RowData> extends TextInputProps {
|
|
1367
|
+
header: MRT_Header<TData>;
|
|
1368
|
+
rangeFilterIndex?: number;
|
|
1369
|
+
table: MRT_TableInstance<TData>;
|
|
1370
|
+
}
|
|
1371
|
+
declare const MRT_FilterTextInput: <TData extends MRT_RowData>({ header, rangeFilterIndex, table, ...rest }: Props$j<TData>) => react.JSX.Element;
|
|
1372
|
+
|
|
1373
|
+
interface Props$i<TData extends MRT_RowData> extends TextInputProps {
|
|
1374
|
+
table: MRT_TableInstance<TData>;
|
|
1375
|
+
}
|
|
1376
|
+
declare const MRT_GlobalFilterTextInput: <TData extends MRT_RowData>({ table, ...rest }: Props$i<TData>) => react.JSX.Element;
|
|
1377
|
+
|
|
1378
|
+
interface Props$h<TData extends MRT_RowData> extends CheckboxProps {
|
|
1379
|
+
renderedRowIndex?: number;
|
|
1380
|
+
row?: MRT_Row<TData>;
|
|
1381
|
+
table: MRT_TableInstance<TData>;
|
|
1382
|
+
}
|
|
1383
|
+
declare const MRT_SelectCheckbox: <TData extends MRT_RowData>({ renderedRowIndex, row, table, ...rest }: Props$h<TData>) => react.JSX.Element;
|
|
1384
|
+
|
|
1385
|
+
type TableInstanceProp<TData extends MRT_RowData> = {
|
|
1386
|
+
table: MRT_TableInstance<TData>;
|
|
1387
|
+
};
|
|
1388
|
+
type Props$g<TData extends MRT_RowData> = Xor<TableInstanceProp<TData>, MRT_TableOptions<TData>>;
|
|
1389
|
+
declare const MantineReactTable: <TData extends MRT_RowData>(props: Props$g<TData>) => react.JSX.Element;
|
|
1390
|
+
|
|
1391
|
+
interface Props$f<TData extends MRT_RowData> extends MenuProps {
|
|
1392
|
+
header: MRT_Header<TData>;
|
|
1393
|
+
table: MRT_TableInstance<TData>;
|
|
1394
|
+
}
|
|
1395
|
+
declare const MRT_ColumnActionMenu: <TData extends MRT_RowData>({ header, table, ...rest }: Props$f<TData>) => react.JSX.Element;
|
|
1396
|
+
|
|
1397
|
+
declare const mrtFilterOptions: (localization: MRT_Localization) => Array<MRT_InternalFilterOption>;
|
|
1398
|
+
interface Props$e<TData extends MRT_RowData> {
|
|
1399
|
+
header?: MRT_Header<TData>;
|
|
1400
|
+
onSelect?: () => void;
|
|
1401
|
+
table: MRT_TableInstance<TData>;
|
|
1402
|
+
}
|
|
1403
|
+
declare const MRT_FilterOptionMenu: <TData extends MRT_RowData>({ header, onSelect, table, }: Props$e<TData>) => react.JSX.Element;
|
|
1404
|
+
|
|
1405
|
+
interface Props$d<TData extends MRT_RowData> extends ActionIconProps {
|
|
1406
|
+
handleEdit: (event: MouseEvent) => void;
|
|
1407
|
+
row: MRT_Row<TData>;
|
|
1408
|
+
table: MRT_TableInstance<TData>;
|
|
1409
|
+
}
|
|
1410
|
+
declare const MRT_RowActionMenu: <TData extends MRT_RowData>({ handleEdit, row, table, ...rest }: Props$d<TData>) => react.JSX.Element;
|
|
1411
|
+
|
|
1412
|
+
interface Props$c<TData extends MRT_RowData> {
|
|
1413
|
+
table: MRT_TableInstance<TData>;
|
|
1414
|
+
}
|
|
1415
|
+
declare const MRT_ShowHideColumnsMenu: <TData extends MRT_RowData>({ table, }: Props$c<TData>) => react.JSX.Element;
|
|
1416
|
+
|
|
1417
|
+
interface Props$b<TData extends MRT_RowData, TValue = MRT_CellValue> {
|
|
1418
|
+
allColumns: Array<MRT_Column<TData>>;
|
|
1419
|
+
column: MRT_Column<TData, TValue>;
|
|
1420
|
+
hoveredColumn: MRT_Column<TData> | null;
|
|
1421
|
+
setHoveredColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
|
1422
|
+
table: MRT_TableInstance<TData>;
|
|
1423
|
+
}
|
|
1424
|
+
declare const MRT_ShowHideColumnsMenuItems: <TData extends MRT_RowData>({ allColumns, column, hoveredColumn, setHoveredColumn, table, }: Props$b<TData>) => react.JSX.Element | null;
|
|
1425
|
+
|
|
1426
|
+
interface Props$a<TData extends MRT_RowData> extends Partial<ModalProps> {
|
|
1427
|
+
open: boolean;
|
|
1428
|
+
table: MRT_TableInstance<TData>;
|
|
1429
|
+
}
|
|
1430
|
+
declare const MRT_EditRowModal: <TData extends MRT_RowData>({ open, table, ...rest }: Props$a<TData>) => react.JSX.Element;
|
|
1431
|
+
|
|
1432
|
+
interface Props$9<TData extends MRT_RowData> extends TableProps {
|
|
1433
|
+
table: MRT_TableInstance<TData>;
|
|
1434
|
+
}
|
|
1435
|
+
declare const MRT_Table: <TData extends MRT_RowData>({ table, ...rest }: Props$9<TData>) => react.JSX.Element;
|
|
1436
|
+
|
|
1437
|
+
interface Props$8<TData extends MRT_RowData> extends BoxProps {
|
|
1438
|
+
table: MRT_TableInstance<TData>;
|
|
1439
|
+
}
|
|
1440
|
+
declare const MRT_TableContainer: <TData extends MRT_RowData>({ table, ...rest }: Props$8<TData>) => react.JSX.Element;
|
|
1441
|
+
|
|
1442
|
+
interface Props$7<TData extends MRT_RowData> extends PaperProps {
|
|
1443
|
+
table: MRT_TableInstance<TData>;
|
|
1444
|
+
}
|
|
1445
|
+
declare const MRT_TablePaper: <TData extends MRT_RowData>({ table, ...rest }: Props$7<TData>) => react.JSX.Element;
|
|
1446
|
+
|
|
1447
|
+
interface Props$6<TData extends MRT_RowData> extends BoxProps {
|
|
1448
|
+
table: MRT_TableInstance<TData>;
|
|
1449
|
+
}
|
|
1450
|
+
declare const MRT_BottomToolbar: <TData extends MRT_RowData>({ table, ...rest }: Props$6<TData>) => react.JSX.Element;
|
|
1451
|
+
|
|
1452
|
+
interface Props$5<TData extends MRT_RowData> extends Partial<ProgressProps> {
|
|
1453
|
+
isTopToolbar: boolean;
|
|
1454
|
+
table: MRT_TableInstance<TData>;
|
|
1455
|
+
}
|
|
1456
|
+
declare const MRT_ProgressBar: <TData extends MRT_RowData>({ isTopToolbar, table, ...rest }: Props$5<TData>) => react.JSX.Element;
|
|
1457
|
+
|
|
1458
|
+
interface Props$4<TData extends MRT_RowData> extends Partial<PaginationProps> {
|
|
1459
|
+
position?: 'bottom' | 'top';
|
|
1460
|
+
table: MRT_TableInstance<TData>;
|
|
1461
|
+
}
|
|
1462
|
+
declare const MRT_TablePagination: <TData extends MRT_RowData>({ position, table, ...props }: Props$4<TData>) => react.JSX.Element;
|
|
1463
|
+
|
|
1464
|
+
interface Props$3<TData extends MRT_RowData> extends Partial<AlertProps> {
|
|
1465
|
+
stackAlertBanner?: boolean;
|
|
1466
|
+
table: MRT_TableInstance<TData>;
|
|
1467
|
+
}
|
|
1468
|
+
declare const MRT_ToolbarAlertBanner: <TData extends MRT_RowData>({ stackAlertBanner, table, ...rest }: Props$3<TData>) => react.JSX.Element;
|
|
1469
|
+
|
|
1470
|
+
interface Props$2<TData extends MRT_RowData> extends FlexProps {
|
|
1471
|
+
table: MRT_TableInstance<TData>;
|
|
1472
|
+
}
|
|
1473
|
+
declare const MRT_ToolbarDropZone: <TData extends MRT_RowData>({ table, ...rest }: Props$2<TData>) => react.JSX.Element;
|
|
1474
|
+
|
|
1475
|
+
interface Props$1<TData extends MRT_RowData> extends FlexProps {
|
|
1476
|
+
table: MRT_TableInstance<TData>;
|
|
1477
|
+
}
|
|
1478
|
+
declare const MRT_ToolbarInternalButtons: <TData extends MRT_RowData>({ table, ...rest }: Props$1<TData>) => react.JSX.Element;
|
|
1479
|
+
|
|
1480
|
+
interface Props<TData extends MRT_RowData> extends BoxProps {
|
|
1481
|
+
table: MRT_TableInstance<TData>;
|
|
1482
|
+
}
|
|
1483
|
+
declare const MRT_TopToolbar: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => react.JSX.Element;
|
|
1484
|
+
|
|
1485
|
+
declare const useMantineReactTable: <TData extends MRT_RowData>(tableOptions: MRT_TableOptions<TData>) => MRT_TableInstance<TData>;
|
|
1486
|
+
|
|
1487
|
+
declare const useMRT_ColumnVirtualizer: <TData extends MRT_RowData, TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableCellElement>(table: MRT_TableInstance<TData>) => MRT_ColumnVirtualizer | undefined;
|
|
1488
|
+
|
|
1489
|
+
declare const useMRT_Effects: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => void;
|
|
1490
|
+
|
|
1491
|
+
declare const useMRT_Rows: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => Array<MRT_Row<TData>>;
|
|
1492
|
+
|
|
1493
|
+
declare const useMRT_RowVirtualizer: <TData extends MRT_RowData, TScrollElement extends Element | Window = HTMLDivElement, TItemElement extends Element = HTMLTableRowElement>(table: MRT_TableInstance<TData>, rows?: Array<MRT_Row<TData>>) => MRT_RowVirtualizer<TScrollElement, TItemElement> | undefined;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* The MRT hook that wraps the TanStack `useTable` hook and adds MRT-specific
|
|
1497
|
+
* state, refs, and helpers. State management is built on top of TanStack
|
|
1498
|
+
* Store atoms (`useCreateAtom` from `@tanstack/react-store`):
|
|
1499
|
+
*
|
|
1500
|
+
* - **TanStack-aware slices** (`columnOrder`, `columnResizing`, `grouping`,
|
|
1501
|
+
* `pagination`) are passed via the `atoms` option on `useTable`. Library
|
|
1502
|
+
* writes (e.g. `table.setSorting(...)`, `table.firstPage()`) flow directly
|
|
1503
|
+
* through these atoms, and they're automatically tracked in
|
|
1504
|
+
* `table.state` by the v9 store.
|
|
1505
|
+
* - **MRT-only slices** (`density`, `isFullScreen`, `creatingRow`,
|
|
1506
|
+
* `editingCell`, `editingRow`, `draggingColumn`, `draggingRow`,
|
|
1507
|
+
* `hoveredColumn`, `hoveredRow`, `globalFilterFn`, `columnFilterFns`,
|
|
1508
|
+
* `showAlertBanner`, `showColumnFilters`, `showGlobalFilter`,
|
|
1509
|
+
* `showToolbarDropZone`) live in atoms outside the v9 store and are
|
|
1510
|
+
* merged into `table.state` after construction so MRT components can read
|
|
1511
|
+
* them via the same `state` surface.
|
|
1512
|
+
*
|
|
1513
|
+
* @param definedTableOptions - table options with proper defaults set
|
|
1514
|
+
* @returns the MRT table instance
|
|
1515
|
+
*/
|
|
1516
|
+
declare const useMRT_TableInstance: <TData extends MRT_RowData>(definedTableOptions: MRT_DefinedTableOptions<TData>) => MRT_TableInstance<TData>;
|
|
1517
|
+
|
|
1518
|
+
declare const MRT_DefaultColumn: {
|
|
1519
|
+
readonly filterVariant: "text";
|
|
1520
|
+
readonly maxSize: 1000;
|
|
1521
|
+
readonly minSize: 40;
|
|
1522
|
+
readonly size: 180;
|
|
1523
|
+
};
|
|
1524
|
+
declare const MRT_DefaultDisplayColumn: {
|
|
1525
|
+
readonly columnDefType: "display";
|
|
1526
|
+
readonly enableClickToCopy: false;
|
|
1527
|
+
readonly enableColumnActions: false;
|
|
1528
|
+
readonly enableColumnDragging: false;
|
|
1529
|
+
readonly enableColumnFilter: false;
|
|
1530
|
+
readonly enableColumnOrdering: false;
|
|
1531
|
+
readonly enableEditing: false;
|
|
1532
|
+
readonly enableGlobalFilter: false;
|
|
1533
|
+
readonly enableGrouping: false;
|
|
1534
|
+
readonly enableHiding: false;
|
|
1535
|
+
readonly enableResizing: false;
|
|
1536
|
+
readonly enableSorting: false;
|
|
1537
|
+
};
|
|
1538
|
+
declare const useMRT_TableOptions: <TData extends MRT_RowData>(tableOptions: MRT_TableOptions<TData>) => MRT_DefinedTableOptions<TData>;
|
|
1539
|
+
|
|
1540
|
+
declare const getColumnId: <TData extends MRT_RowData>(columnDef: MRT_ColumnDef<TData>) => string;
|
|
1541
|
+
declare const getAllLeafColumnDefs: <TData extends MRT_RowData>(columns: Array<MRT_ColumnDef<TData>>) => Array<MRT_ColumnDef<TData>>;
|
|
1542
|
+
declare const prepareColumns: <TData extends MRT_RowData>({ columnDefs, tableOptions, }: {
|
|
1543
|
+
columnDefs: Array<MRT_ColumnDef<TData>>;
|
|
1544
|
+
tableOptions: MRT_DefinedTableOptions<TData>;
|
|
1545
|
+
}) => Array<MRT_DefinedColumnDef<TData>>;
|
|
1546
|
+
declare const reorderColumn: <TData extends MRT_RowData>(draggedColumn: MRT_Column<TData>, targetColumn: MRT_Column<TData>, columnOrder: MRT_ColumnOrderState) => MRT_ColumnOrderState;
|
|
1547
|
+
declare const getDefaultColumnFilterFn: <TData extends MRT_RowData>(columnDef: MRT_ColumnDef<TData>) => MRT_FilterOption;
|
|
1548
|
+
|
|
1549
|
+
declare function defaultDisplayColumnProps<TData extends MRT_RowData>({ header, id, size, tableOptions, }: {
|
|
1550
|
+
header?: keyof MRT_Localization;
|
|
1551
|
+
id: MRT_DisplayColumnIds;
|
|
1552
|
+
size: number;
|
|
1553
|
+
tableOptions: MRT_DefinedTableOptions<TData>;
|
|
1554
|
+
}): MRT_ColumnDef<TData>;
|
|
1555
|
+
declare const showRowPinningColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1556
|
+
declare const showRowDragColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1557
|
+
declare const showRowExpandColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1558
|
+
declare const showRowActionsColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1559
|
+
declare const showRowSelectionColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1560
|
+
declare const showRowNumbersColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1561
|
+
declare const showRowSpacerColumn: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => boolean;
|
|
1562
|
+
declare const getLeadingDisplayColumnIds: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => Array<MRT_DisplayColumnIds>;
|
|
1563
|
+
declare const getTrailingDisplayColumnIds: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>) => Array<MRT_DisplayColumnIds>;
|
|
1564
|
+
declare const getDefaultColumnOrderIds: <TData extends MRT_RowData>(tableOptions: MRT_StatefulTableOptions<TData>, reset?: boolean) => string[];
|
|
1565
|
+
|
|
1566
|
+
declare const getMRT_Rows: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>, all?: boolean) => Array<MRT_Row<TData>>;
|
|
1567
|
+
declare const getCanRankRows: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => boolean | undefined;
|
|
1568
|
+
declare const getIsRankingRows: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>) => any;
|
|
1569
|
+
declare const getIsRowSelected: <TData extends MRT_RowData>({ row, table, }: {
|
|
1570
|
+
row: MRT_Row<TData>;
|
|
1571
|
+
table: MRT_TableInstance<TData>;
|
|
1572
|
+
}) => boolean | undefined;
|
|
1573
|
+
declare const getMRT_RowSelectionHandler: <TData extends MRT_RowData>({ renderedRowIndex, row, table, }: {
|
|
1574
|
+
renderedRowIndex?: number;
|
|
1575
|
+
row: MRT_Row<TData>;
|
|
1576
|
+
table: MRT_TableInstance<TData>;
|
|
1577
|
+
}) => (event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLTableRowElement>, value?: boolean) => void;
|
|
1578
|
+
declare const getMRT_SelectAllHandler: <TData extends MRT_RowData>({ table }: {
|
|
1579
|
+
table: MRT_TableInstance<TData>;
|
|
1580
|
+
}) => (event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLButtonElement>, value?: boolean, forceAll?: boolean) => void;
|
|
1581
|
+
|
|
1582
|
+
declare const parseCSSVarId: (id: string) => string;
|
|
1583
|
+
declare const getPrimaryShade: (theme: MantineTheme) => number;
|
|
1584
|
+
declare const getPrimaryColor: (theme: MantineTheme, shade?: MantineShade) => string;
|
|
1585
|
+
declare function dataVariable(name: string, value: boolean | number | string | undefined): {
|
|
1586
|
+
[x: string]: string;
|
|
1587
|
+
} | null;
|
|
1588
|
+
|
|
1589
|
+
declare const flexRender: (Comp: Renderable<any>, props: any) => JSX.Element | ReactNode;
|
|
1590
|
+
/**
|
|
1591
|
+
* A helper utility for creating MRT column definitions with type inference
|
|
1592
|
+
* for each individual column's `TValue`. Mirrors v9's `createColumnHelper`
|
|
1593
|
+
* surface (`accessor`, `columns`, `display`, `group`) but bound to MRT's
|
|
1594
|
+
* column-def shape (extra MRT-specific props, `StockFeatures` pre-bound).
|
|
1595
|
+
*
|
|
1596
|
+
* From a JavaScript perspective, `display` / `group` / `columns` are identity
|
|
1597
|
+
* functions — they exist purely to anchor TypeScript inference.
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* ```tsx
|
|
1601
|
+
* const helper = createMRTColumnHelper<Person>()
|
|
1602
|
+
* const columns = helper.columns([
|
|
1603
|
+
* helper.accessor('firstName', { header: 'First' }),
|
|
1604
|
+
* helper.accessor((row) => row.lastName, { id: 'lastName' }),
|
|
1605
|
+
* helper.display({ id: 'actions', header: 'Actions' }),
|
|
1606
|
+
* ])
|
|
1607
|
+
* ```
|
|
1608
|
+
*/
|
|
1609
|
+
declare function createMRTColumnHelper<TData extends MRT_RowData>(): MRT_ColumnHelper<TData>;
|
|
1610
|
+
declare const createRow: <TData extends MRT_RowData>(table: MRT_TableInstance<TData>, originalRow?: TData, rowIndex?: number, depth?: number, subRows?: Array<MRT_Row<TData>>, parentId?: string) => MRT_Row<TData>;
|
|
1611
|
+
|
|
1612
|
+
declare const parseFromValuesOrFunc: <T, U>(fn: ((arg: U) => T) | T | undefined, arg: U) => T | undefined;
|
|
1613
|
+
|
|
1614
|
+
export { MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextInput, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextInput, MRT_GlobalFilterTextInput, MRT_GrabHandleButton, MRT_ProgressBar, MRT_RowActionMenu, MRT_RowAggregationFns, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyEmptyRow, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MantineReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, createMRTColumnHelper, createRow, dataVariable, defaultDisplayColumnProps, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsRankingRows, getIsRowSelected, getLeadingDisplayColumnIds, getMRT_RowSelectionHandler, getMRT_Rows, getMRT_SelectAllHandler, getPrimaryColor, getPrimaryShade, getTrailingDisplayColumnIds, localizedFilterOption, mrtFilterOptions, parseCSSVarId, parseFromValuesOrFunc, prepareColumns, rankGlobalFuzzy, reorderColumn, showRowActionsColumn, showRowDragColumn, showRowExpandColumn, showRowNumbersColumn, showRowPinningColumn, showRowSelectionColumn, showRowSpacerColumn, useMRT_ColumnVirtualizer, useMRT_Effects, useMRT_RowVirtualizer, useMRT_Rows, useMRT_TableInstance, useMRT_TableOptions, useMantineReactTable };
|
|
1615
|
+
export type { HTMLPropsRef, LiteralUnion, MRT_AccessorColumnDef, MRT_AccessorFnColumnDef, MRT_AccessorKeyColumnDef, MRT_Cell, MRT_CellValue, MRT_Column, MRT_ColumnDef, MRT_ColumnFilterFnsState, MRT_ColumnFiltersState, MRT_ColumnHelper, MRT_ColumnOrderState, MRT_ColumnPinningState, MRT_ColumnResizingState, MRT_ColumnSizingState, MRT_ColumnVirtualizer, MRT_ColumnVisibilityState, MRT_CreateTableFeature, MRT_DefinedColumnDef, MRT_DefinedTableOptions, MRT_DensityState, MRT_DisplayColumnDef, MRT_DisplayColumnIds, MRT_ExpandedState, MRT_FilterFn, MRT_FilterOption, MRT_FilterTooltipValueFn, MRT_GroupColumnDef, MRT_GroupingState, MRT_Header, MRT_HeaderGroup, MRT_Icons, MRT_IdentifiedColumnDef, MRT_InternalFilterOption, MRT_Localization, MRT_PaginationProps, MRT_PaginationState, MRT_Row, MRT_RowAggregationFn, MRT_RowAggregationOption, MRT_RowData, MRT_RowModel, MRT_RowSelectionState, MRT_RowVirtualizer, MRT_SortFn, MRT_SortingOption, MRT_SortingState, MRT_StatefulTableOptions, MRT_TableBodyProps, MRT_TableInstance, MRT_TableOptions, MRT_TableState, MRT_Updater, MRT_VirtualItem, MRT_VirtualizerOptions, MantineShade, Prettify, Xor };
|