@uselets/ui 1.20.3 → 1.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/cli/uselets.mjs +3 -3
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/anchor.js +1 -1
- package/dist/components/anchor.js.map +1 -1
- package/dist/components/area-chart.js +1 -1
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/bottom-nav.js +1 -1
- package/dist/components/bottom-nav.js.map +1 -1
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/center.js +1 -1
- package/dist/components/center.js.map +1 -1
- package/dist/components/chart.js +2 -2
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/code.js.map +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.js +1 -1
- package/dist/components/container.js.map +1 -1
- package/dist/components/data-table.d.ts +138 -2
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.js +1 -1
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.js +1 -1
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/flex.js +1 -1
- package/dist/components/flex.js.map +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/grid.js.map +1 -1
- package/dist/components/group.js +1 -1
- package/dist/components/group.js.map +1 -1
- package/dist/components/heading.js +1 -1
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/list.js.map +1 -1
- package/dist/components/logo.js +1 -1
- package/dist/components/marker.js +1 -1
- package/dist/components/marker.js.map +1 -1
- package/dist/components/mask-input.js +1 -1
- package/dist/components/mask-input.js.map +1 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.d.ts +3 -0
- package/dist/components/phone-input.js +1 -1
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pie-chart.js +1 -1
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.js +1 -1
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.js +1 -1
- package/dist/components/simple-grid.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +1 -1
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stack.js +1 -1
- package/dist/components/stack.js.map +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.js +1 -1
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.js +1 -1
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.js +1 -1
- package/dist/components/unstyled-button.js.map +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.js.map +1 -1
- package/dist/hooks/use-breakpoint-value.js.map +1 -1
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-mask.js.map +1 -1
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/color.js.map +1 -1
- package/dist/lib/compose-refs.js +1 -1
- package/dist/lib/compose-refs.js.map +1 -1
- package/dist/lib/progress.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/logo--R3_XDgA.js +2 -0
- package/dist/logo--R3_XDgA.js.map +1 -0
- package/dist/postcss.config.js.map +1 -1
- package/dist/skills/uselets-ui/SKILL.md +1 -0
- package/dist/skills/uselets-ui/references/package-guide.md +16 -0
- package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
- package/package.json +12 -12
- package/skills/uselets-ui/SKILL.md +1 -0
- package/skills/uselets-ui/references/package-guide.md +16 -0
- package/dist/data-table-DWWVGWbU.d.ts +0 -4184
- package/dist/logo-B0thHtTS.js +0 -2
- package/dist/logo-B0thHtTS.js.map +0 -1
|
@@ -1,4184 +0,0 @@
|
|
|
1
|
-
import { t as __name } from "./rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import { Button } from "./components/button.js";
|
|
3
|
-
import { TableProps } from "./components/table.js";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { Column, ColumnDef, ReactTable, RowData, RowData as RowData$1 } from "@tanstack/react-table";
|
|
6
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/type-utils.d.ts
|
|
7
|
-
//#region src/types/type-utils.d.ts
|
|
8
|
-
type Updater<T> = T | ((old: T) => T);
|
|
9
|
-
type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void;
|
|
10
|
-
type RowData$2 = Record<string, any> | Array<any>;
|
|
11
|
-
type CellData = unknown;
|
|
12
|
-
/**
|
|
13
|
-
* Normalizes a row's value before a filter or sort comparator sees it.
|
|
14
|
-
*
|
|
15
|
-
* Attach as `resolveDataValue` on filter/sort functions built with
|
|
16
|
-
* `constructFilterFn`/`constructSortFn` (e.g. to lowercase or strip diacritics).
|
|
17
|
-
*/
|
|
18
|
-
type TransformDataValueFn = (dataValue: any) => any;
|
|
19
|
-
type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends ((x: infer R) => any) ? R : never;
|
|
20
|
-
type NoInfer$1<T> = [T][T extends any ? 0 : never];
|
|
21
|
-
type Getter<TValue> = <TTValue = TValue>() => NoInfer$1<TTValue>;
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.d.ts
|
|
24
|
-
//#region src/core/columns/coreColumnsFeature.d.ts
|
|
25
|
-
/**
|
|
26
|
-
* Core feature that builds the column tree and exposes table/column APIs.
|
|
27
|
-
*/
|
|
28
|
-
declare const coreColumnsFeature: TableFeature;
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.d.ts
|
|
31
|
-
//#region src/core/headers/coreHeadersFeature.d.ts
|
|
32
|
-
/**
|
|
33
|
-
* Core feature that builds header groups and exposes header context APIs.
|
|
34
|
-
*/
|
|
35
|
-
declare const coreHeadersFeature: TableFeature;
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.d.ts
|
|
38
|
-
//#region src/core/row-models/coreRowModelsFeature.d.ts
|
|
39
|
-
/**
|
|
40
|
-
* Core feature that wires table row-model accessors and row-model caches.
|
|
41
|
-
*/
|
|
42
|
-
declare const coreRowModelsFeature: TableFeature;
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.d.ts
|
|
45
|
-
//#region src/core/rows/coreRowsFeature.d.ts
|
|
46
|
-
/**
|
|
47
|
-
* Core feature that creates row APIs for values, cells, and tree traversal.
|
|
48
|
-
*/
|
|
49
|
-
declare const coreRowsFeature: TableFeature;
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.d.ts
|
|
52
|
-
//#region src/core/table/coreTablesFeature.d.ts
|
|
53
|
-
/**
|
|
54
|
-
* Core feature that adds base table instance APIs such as reset and setOptions.
|
|
55
|
-
*/
|
|
56
|
-
declare const coreTablesFeature: TableFeature;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region ../../node_modules/@tanstack/store/dist/types.d.ts
|
|
59
|
-
interface InteropSubscribable<T> {
|
|
60
|
-
subscribe: (observer: Observer<T>) => Subscription;
|
|
61
|
-
}
|
|
62
|
-
type Observer<T> = {
|
|
63
|
-
next?: (value: T) => void;
|
|
64
|
-
error?: (err: unknown) => void;
|
|
65
|
-
complete?: () => void;
|
|
66
|
-
};
|
|
67
|
-
interface Subscription {
|
|
68
|
-
unsubscribe: () => void;
|
|
69
|
-
}
|
|
70
|
-
interface Subscribable<T> extends InteropSubscribable<T> {
|
|
71
|
-
subscribe: ((observer: Observer<T>) => Subscription) & ((next: (value: T) => void, error?: (error: any) => void, complete?: () => void) => Subscription);
|
|
72
|
-
}
|
|
73
|
-
interface Readable<T> extends Subscribable<T> {
|
|
74
|
-
get: () => T;
|
|
75
|
-
}
|
|
76
|
-
interface BaseAtom<T> extends Subscribable<T>, Readable<T> {}
|
|
77
|
-
interface Atom<T> extends BaseAtom<T> {
|
|
78
|
-
/** Sets the value of the atom using a function. */
|
|
79
|
-
set: ((fn: (prevVal: T) => T) => void) & ((value: T) => void);
|
|
80
|
-
}
|
|
81
|
-
interface AtomOptions<T> {
|
|
82
|
-
compare?: (prev: T, next: T) => boolean;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* An atom that is read-only and cannot be set.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
*
|
|
89
|
-
* ```ts
|
|
90
|
-
* const atom = createAtom(() => 42);
|
|
91
|
-
* // @ts-expect-error - Cannot set a readonly atom
|
|
92
|
-
* atom.set(43);
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
interface ReadonlyAtom<T> extends BaseAtom<T> {}
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region ../../node_modules/@tanstack/store/dist/store.d.ts
|
|
98
|
-
//#region src/store.d.ts
|
|
99
|
-
type StoreAction = (...args: Array<any>) => any;
|
|
100
|
-
type StoreActionMap = Record<string, StoreAction>;
|
|
101
|
-
type StoreActionsFactory<T, TActions extends StoreActionMap> = (store: {
|
|
102
|
-
setState: Store<T>['setState'];
|
|
103
|
-
get: Store<T>['get'];
|
|
104
|
-
}) => TActions;
|
|
105
|
-
type NonFunction<T> = T extends ((...args: Array<any>) => any) ? never : T;
|
|
106
|
-
declare class Store<T, TActions extends StoreActionMap = never> {
|
|
107
|
-
private atom;
|
|
108
|
-
readonly actions: TActions;
|
|
109
|
-
constructor(getValue: (prev?: NoInfer<T>) => T);
|
|
110
|
-
constructor(initialValue: T);
|
|
111
|
-
constructor(initialValue: NonFunction<T>, actionsFactory: StoreActionsFactory<T, TActions>);
|
|
112
|
-
setState(updater: (prev: T) => T): void;
|
|
113
|
-
get state(): T;
|
|
114
|
-
get(): T;
|
|
115
|
-
subscribe(observerOrFn: Observer<T> | ((value: T) => void)): Subscription;
|
|
116
|
-
}
|
|
117
|
-
declare class ReadonlyStore<T> implements Omit<Store<T>, 'setState' | 'actions'> {
|
|
118
|
-
private atom;
|
|
119
|
-
constructor(getValue: (prev?: NoInfer<T>) => T);
|
|
120
|
-
constructor(initialValue: T);
|
|
121
|
-
get state(): T;
|
|
122
|
-
get(): T;
|
|
123
|
-
subscribe(observerOrFn: Observer<T> | ((value: T) => void)): Subscription;
|
|
124
|
-
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.types.d.ts
|
|
127
|
-
//#region src/core/reactivity/coreReactivityFeature.types.d.ts
|
|
128
|
-
interface TableAtomOptions<T> extends AtomOptions<T> {
|
|
129
|
-
/**
|
|
130
|
-
* A debug name for the atom, useful for debugging.
|
|
131
|
-
*/
|
|
132
|
-
debugName: string;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Framework reactivity bindings used by table-core.
|
|
136
|
-
*
|
|
137
|
-
* Adapters (React, Solid, Vue, etc.) provide concrete implementations so
|
|
138
|
-
* core features can create derived/writable atoms and integrate with their
|
|
139
|
-
* scheduling primitives.
|
|
140
|
-
*/
|
|
141
|
-
interface TableReactivityBindings {
|
|
142
|
-
createOptionsStore: boolean;
|
|
143
|
-
wrapExternalAtoms: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Invalidates readonly atoms whose compute reads non-reactive inputs (plain
|
|
146
|
-
* options). Render-phase adapters call this after publishing captured
|
|
147
|
-
* controlled state from a host commit, including when no base atom changed,
|
|
148
|
-
* so controlled ownership changes still reach subscribers.
|
|
149
|
-
*/
|
|
150
|
-
commit?: () => void;
|
|
151
|
-
addSubscription: (subscription: Subscription) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Creates a writable atom with an initial value.
|
|
154
|
-
*/
|
|
155
|
-
createWritableAtom: <T>(initialValue: T, options?: TableAtomOptions<T>) => Atom<T>;
|
|
156
|
-
/**
|
|
157
|
-
* Creates a readonly/derived atom from a compute function.
|
|
158
|
-
*/
|
|
159
|
-
createReadonlyAtom: <T>(fn: () => T, options?: TableAtomOptions<T>) => ReadonlyAtom<T>;
|
|
160
|
-
/**
|
|
161
|
-
* Evaluates a function without tracking reactive dependencies.
|
|
162
|
-
*/
|
|
163
|
-
untrack: <T>(fn: () => T) => T;
|
|
164
|
-
/**
|
|
165
|
-
* Batches reactive updates to avoid intermediate recomputation.
|
|
166
|
-
*/
|
|
167
|
-
batch: (fn: () => void) => void;
|
|
168
|
-
/**
|
|
169
|
-
* Schedules a function to run. This is used to defer updates after the current call stack (render, etc.) has finished
|
|
170
|
-
*/
|
|
171
|
-
schedule: (fn: () => void) => void;
|
|
172
|
-
/**
|
|
173
|
-
* Unmounts the table, performing any necessary cleanup. This is called when the table is destroyed or unmounted in the framework adapter.
|
|
174
|
-
*/
|
|
175
|
-
unmount?: () => void;
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/coreFeatures.d.ts
|
|
179
|
-
//#region src/core/coreFeatures.d.ts
|
|
180
|
-
interface CoreFeatures {
|
|
181
|
-
coreReactivityFeature?: TableReactivityBindings;
|
|
182
|
-
coreCellsFeature: typeof coreCellsFeature;
|
|
183
|
-
coreColumnsFeature: typeof coreColumnsFeature;
|
|
184
|
-
coreHeadersFeature: typeof coreHeadersFeature;
|
|
185
|
-
coreRowModelsFeature: typeof coreRowModelsFeature;
|
|
186
|
-
coreRowsFeature: typeof coreRowsFeature;
|
|
187
|
-
coreTablesFeature: typeof coreTablesFeature;
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-sorting/sortFns.d.ts
|
|
191
|
-
/**
|
|
192
|
-
* The built-in sorting function registry.
|
|
193
|
-
*
|
|
194
|
-
* Registering this full object opts out of tree-shaking: every built-in
|
|
195
|
-
* sorting function ends up in your bundle. Prefer importing the `sortFn_*`
|
|
196
|
-
* functions you actually use and registering just those in the `sortFns`
|
|
197
|
-
* slot, or passing them directly to the `sortFn` column option.
|
|
198
|
-
*
|
|
199
|
-
* @deprecated Import individual `sortFn_*` functions instead for a smaller
|
|
200
|
-
* bundle. This export still works and is not going away in v9, but built-in
|
|
201
|
-
* name resolution (including `sortFn: 'auto'`) only finds functions you
|
|
202
|
-
* register yourself.
|
|
203
|
-
*/
|
|
204
|
-
declare const sortFns: {
|
|
205
|
-
alphanumeric: CreatedSortFn<any, any>;
|
|
206
|
-
alphanumericCaseSensitive: CreatedSortFn<any, any>;
|
|
207
|
-
basic: CreatedSortFn<any, any>;
|
|
208
|
-
datetime: CreatedSortFn<any, any>;
|
|
209
|
-
text: CreatedSortFn<any, any>;
|
|
210
|
-
textCaseSensitive: CreatedSortFn<any, any>;
|
|
211
|
-
};
|
|
212
|
-
type BuiltInSortFn = keyof typeof sortFns;
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.types.d.ts
|
|
215
|
-
//#region src/features/column-sizing/columnSizingFeature.types.d.ts
|
|
216
|
-
interface TableState_ColumnSizing {
|
|
217
|
-
columnSizing: ColumnSizingState;
|
|
218
|
-
}
|
|
219
|
-
type ColumnSizingState = Record<string, number>;
|
|
220
|
-
interface ColumnOffsets {
|
|
221
|
-
/**
|
|
222
|
-
* Offset from the start edge of the region to each column's start edge,
|
|
223
|
-
* keyed by column id.
|
|
224
|
-
*/
|
|
225
|
-
starts: Record<string, number>;
|
|
226
|
-
/**
|
|
227
|
-
* Offset from the end edge of the region to each column's end edge, keyed by
|
|
228
|
-
* column id.
|
|
229
|
-
*/
|
|
230
|
-
afters: Record<string, number>;
|
|
231
|
-
}
|
|
232
|
-
interface ColumnOffsetsByPosition {
|
|
233
|
-
/**
|
|
234
|
-
* Offsets across all visible leaf columns, ignoring pinning regions.
|
|
235
|
-
*/
|
|
236
|
-
all: ColumnOffsets;
|
|
237
|
-
/**
|
|
238
|
-
* Offsets within the center (unpinned) region.
|
|
239
|
-
*/
|
|
240
|
-
center: ColumnOffsets;
|
|
241
|
-
/**
|
|
242
|
-
* Offsets within the logical start pinned region.
|
|
243
|
-
*
|
|
244
|
-
* In LTR languages/layouts, start usually corresponds to left. In RTL
|
|
245
|
-
* languages/layouts, start usually corresponds to right.
|
|
246
|
-
*/
|
|
247
|
-
start: ColumnOffsets;
|
|
248
|
-
/**
|
|
249
|
-
* Offsets within the logical end pinned region.
|
|
250
|
-
*
|
|
251
|
-
* In LTR languages/layouts, end usually corresponds to right. In RTL
|
|
252
|
-
* languages/layouts, end usually corresponds to left.
|
|
253
|
-
*/
|
|
254
|
-
end: ColumnOffsets;
|
|
255
|
-
}
|
|
256
|
-
interface TableOptions_ColumnSizing {
|
|
257
|
-
/**
|
|
258
|
-
* Called with an updater when committed column sizing state changes. Pair
|
|
259
|
-
* this with `state.columnSizing` when using external state; external atoms
|
|
260
|
-
* can own the slice without this callback.
|
|
261
|
-
*/
|
|
262
|
-
onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
|
|
263
|
-
}
|
|
264
|
-
interface Table_ColumnSizing {
|
|
265
|
-
/**
|
|
266
|
-
* Sums the current sizes of visible center-region leaf columns.
|
|
267
|
-
*/
|
|
268
|
-
getCenterTotalSize: () => number;
|
|
269
|
-
/**
|
|
270
|
-
* Returns memoized column offset maps (start and after offsets keyed by
|
|
271
|
-
* column id) for each pinning region plus the full visible leaf column list.
|
|
272
|
-
*
|
|
273
|
-
* Backs `column.getStart()` and `column.getAfter()` with O(1) lookups.
|
|
274
|
-
*/
|
|
275
|
-
getColumnOffsets: () => ColumnOffsetsByPosition;
|
|
276
|
-
/**
|
|
277
|
-
* Sums the current sizes of visible logical start-pinned leaf columns.
|
|
278
|
-
*/
|
|
279
|
-
getStartTotalSize: () => number;
|
|
280
|
-
/**
|
|
281
|
-
* Sums the current sizes of visible logical end-pinned leaf columns.
|
|
282
|
-
*/
|
|
283
|
-
getEndTotalSize: () => number;
|
|
284
|
-
/**
|
|
285
|
-
* Sums the current sizes of all visible leaf columns.
|
|
286
|
-
*/
|
|
287
|
-
getTotalSize: () => number;
|
|
288
|
-
/**
|
|
289
|
-
* Resets column sizing to `initialState.columnSizing`. Pass `true` to reset
|
|
290
|
-
* to the feature default of `{}`.
|
|
291
|
-
*/
|
|
292
|
-
resetColumnSizing: (defaultState?: boolean) => void;
|
|
293
|
-
/**
|
|
294
|
-
* Updates committed column sizing state with a next map or updater function.
|
|
295
|
-
*/
|
|
296
|
-
setColumnSizing: (updater: Updater<ColumnSizingState>) => void;
|
|
297
|
-
}
|
|
298
|
-
interface ColumnDef_ColumnSizing {
|
|
299
|
-
/**
|
|
300
|
-
* Upper bound used when resolving this column's size.
|
|
301
|
-
*/
|
|
302
|
-
maxSize?: number;
|
|
303
|
-
/**
|
|
304
|
-
* Lower bound used when resolving this column's size.
|
|
305
|
-
*/
|
|
306
|
-
minSize?: number;
|
|
307
|
-
/**
|
|
308
|
-
* Initial size used before column sizing state overrides it.
|
|
309
|
-
*/
|
|
310
|
-
size?: number;
|
|
311
|
-
}
|
|
312
|
-
interface Column_ColumnSizing {
|
|
313
|
-
/**
|
|
314
|
-
* Measures the offset from this column's end edge to the end of its region.
|
|
315
|
-
*
|
|
316
|
-
* Pass a pinned region to measure within that logical region. The value is
|
|
317
|
-
* the sum of visible leaf column sizes after this column.
|
|
318
|
-
*/
|
|
319
|
-
getAfter: (position?: ColumnPinningPosition | 'center') => number;
|
|
320
|
-
/**
|
|
321
|
-
* Resolves the column's current size after state and min/max constraints.
|
|
322
|
-
*/
|
|
323
|
-
getSize: () => number;
|
|
324
|
-
/**
|
|
325
|
-
* Measures the offset from the start of this column's region to its start
|
|
326
|
-
* edge.
|
|
327
|
-
*
|
|
328
|
-
* Pass a pinned region to measure within that logical region. The value is
|
|
329
|
-
* the sum of visible leaf column sizes before this column.
|
|
330
|
-
*/
|
|
331
|
-
getStart: (position?: ColumnPinningPosition | 'center') => number;
|
|
332
|
-
/**
|
|
333
|
-
* Resets the column to its initial size.
|
|
334
|
-
*/
|
|
335
|
-
resetSize: () => void;
|
|
336
|
-
}
|
|
337
|
-
interface Header_ColumnSizing {
|
|
338
|
-
/**
|
|
339
|
-
* Computes this header's rendered size from its leaf columns.
|
|
340
|
-
*/
|
|
341
|
-
getSize: () => number;
|
|
342
|
-
/**
|
|
343
|
-
* Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
|
|
344
|
-
*/
|
|
345
|
-
getStart: (position?: ColumnPinningPosition) => number;
|
|
346
|
-
}
|
|
347
|
-
//#endregion
|
|
348
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.types.d.ts
|
|
349
|
-
//#region src/features/column-resizing/columnResizingFeature.types.d.ts
|
|
350
|
-
interface TableState_ColumnResizing {
|
|
351
|
-
columnResizing: columnResizingState;
|
|
352
|
-
}
|
|
353
|
-
interface columnResizingState {
|
|
354
|
-
columnSizingStart: Array<[string, number]>;
|
|
355
|
-
deltaOffset: null | number;
|
|
356
|
-
deltaPercentage: null | number;
|
|
357
|
-
isResizingColumn: false | string;
|
|
358
|
-
startOffset: null | number;
|
|
359
|
-
startSize: null | number;
|
|
360
|
-
}
|
|
361
|
-
type ColumnResizeMode = 'onChange' | 'onEnd';
|
|
362
|
-
type ColumnResizeDirection = 'ltr' | 'rtl';
|
|
363
|
-
interface TableOptions_ColumnResizing {
|
|
364
|
-
/**
|
|
365
|
-
* Determines when committed `columnSizing` values are updated. `onChange`
|
|
366
|
-
* commits sizes while the resize handle is dragged; `onEnd` commits when the
|
|
367
|
-
* resize interaction finishes.
|
|
368
|
-
*/
|
|
369
|
-
columnResizeMode?: ColumnResizeMode;
|
|
370
|
-
/**
|
|
371
|
-
* Enables or disables column resizing for the whole table.
|
|
372
|
-
*/
|
|
373
|
-
enableColumnResizing?: boolean;
|
|
374
|
-
/**
|
|
375
|
-
* Sets the resize direction used to calculate drag offsets. Defaults to `ltr`.
|
|
376
|
-
*/
|
|
377
|
-
columnResizeDirection?: ColumnResizeDirection;
|
|
378
|
-
/**
|
|
379
|
-
* Called with an updater when the transient `columnResizing` state changes.
|
|
380
|
-
* Pair this with `state.columnResizing` when using external state; external
|
|
381
|
-
* atoms can own the slice without this callback.
|
|
382
|
-
*/
|
|
383
|
-
onColumnResizingChange?: OnChangeFn<columnResizingState>;
|
|
384
|
-
}
|
|
385
|
-
interface Table_ColumnResizing {
|
|
386
|
-
/**
|
|
387
|
-
* Resets `columnResizing` to `initialState.columnResizing`.
|
|
388
|
-
*
|
|
389
|
-
* Pass `true` to ignore initial state and reset to the no-drag default state.
|
|
390
|
-
*/
|
|
391
|
-
resetHeaderSizeInfo: (defaultState?: boolean) => void;
|
|
392
|
-
/**
|
|
393
|
-
* Updates transient resize interaction state with a next state or updater function.
|
|
394
|
-
*/
|
|
395
|
-
setColumnResizing: (updater: Updater<columnResizingState>) => void;
|
|
396
|
-
}
|
|
397
|
-
interface ColumnDef_ColumnResizing {
|
|
398
|
-
/**
|
|
399
|
-
* Enables or disables column resizing for the column.
|
|
400
|
-
*/
|
|
401
|
-
enableResizing?: boolean;
|
|
402
|
-
}
|
|
403
|
-
interface Column_ColumnResizing {
|
|
404
|
-
/**
|
|
405
|
-
* Checks whether this column can start a resize interaction.
|
|
406
|
-
*/
|
|
407
|
-
getCanResize: () => boolean;
|
|
408
|
-
/**
|
|
409
|
-
* Checks whether this column is the active resize target.
|
|
410
|
-
*/
|
|
411
|
-
getIsResizing: () => boolean;
|
|
412
|
-
}
|
|
413
|
-
interface Header_ColumnResizing {
|
|
414
|
-
/**
|
|
415
|
-
* Creates the `onMouseDown`/`onTouchStart` handler for a resize handle.
|
|
416
|
-
*
|
|
417
|
-
* Dragging and release listeners are installed and cleaned up automatically.
|
|
418
|
-
*/
|
|
419
|
-
getResizeHandler: (context?: Document) => (event: unknown) => void;
|
|
420
|
-
}
|
|
421
|
-
//#endregion
|
|
422
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/Header.d.ts
|
|
423
|
-
//#region src/types/Header.d.ts
|
|
424
|
-
interface Header_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> extends Header_Header<TFeatures, TData, TValue> {}
|
|
425
|
-
interface Header_FeatureMap {
|
|
426
|
-
columnSizingFeature: Header_ColumnSizing;
|
|
427
|
-
columnResizingFeature: Header_ColumnResizing;
|
|
428
|
-
}
|
|
429
|
-
type Header<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = Header_Core<TFeatures, TData, TValue> & ExtractFeatureMapTypes<TFeatures, Header_FeatureMap>;
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.types.d.ts
|
|
432
|
-
type ExpandedState = true | Record<string, boolean>;
|
|
433
|
-
interface TableState_RowExpanding {
|
|
434
|
-
expanded: ExpandedState;
|
|
435
|
-
}
|
|
436
|
-
interface Row_RowExpanding {
|
|
437
|
-
/**
|
|
438
|
-
* Checks whether this row can be expanded.
|
|
439
|
-
*/
|
|
440
|
-
getCanExpand: () => boolean;
|
|
441
|
-
/**
|
|
442
|
-
* Checks whether every ancestor of this row is expanded.
|
|
443
|
-
*/
|
|
444
|
-
getIsAllParentsExpanded: () => boolean;
|
|
445
|
-
/**
|
|
446
|
-
* Checks whether this row is currently expanded.
|
|
447
|
-
*/
|
|
448
|
-
getIsExpanded: () => boolean;
|
|
449
|
-
/**
|
|
450
|
-
* Creates a handler that toggles this row's expanded state.
|
|
451
|
-
*/
|
|
452
|
-
getToggleExpandedHandler: () => () => void;
|
|
453
|
-
/**
|
|
454
|
-
* Toggles the expanded state (or sets it if `expanded` is provided) for the row.
|
|
455
|
-
*/
|
|
456
|
-
toggleExpanded: (expanded?: boolean) => void;
|
|
457
|
-
}
|
|
458
|
-
interface TableOptions_RowExpanding<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
459
|
-
/**
|
|
460
|
-
* Enables automatic expanded-state resets when page-altering table state changes.
|
|
461
|
-
*/
|
|
462
|
-
autoResetExpanded?: boolean;
|
|
463
|
-
/**
|
|
464
|
-
* Allows rows with subRows to be expanded.
|
|
465
|
-
*/
|
|
466
|
-
enableExpanding?: boolean;
|
|
467
|
-
/**
|
|
468
|
-
* If provided, allows you to override the default behavior of determining whether a row is currently expanded.
|
|
469
|
-
*/
|
|
470
|
-
getIsRowExpanded?: (row: Row<TFeatures, TData>) => boolean;
|
|
471
|
-
/**
|
|
472
|
-
* If provided, allows you to override the default behavior of determining whether a row can be expanded.
|
|
473
|
-
*/
|
|
474
|
-
getRowCanExpand?: (row: Row<TFeatures, TData>) => boolean;
|
|
475
|
-
/**
|
|
476
|
-
* Enables manual row expansion. If this is set to `true`, `getExpandedRowModel` will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion.
|
|
477
|
-
*/
|
|
478
|
-
manualExpanding?: boolean;
|
|
479
|
-
/**
|
|
480
|
-
* Called with an updater when expanded state changes. Pair this with
|
|
481
|
-
* `state.expanded` when using external state; external atoms can own the
|
|
482
|
-
* slice without this callback.
|
|
483
|
-
*/
|
|
484
|
-
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
485
|
-
/**
|
|
486
|
-
* If `true` expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If `false` expanded rows will not be considered for pagination (which means expanded rows will always render on their parent's page). This also means more rows will be rendered than the set page size.
|
|
487
|
-
*/
|
|
488
|
-
paginateExpandedRows?: boolean;
|
|
489
|
-
}
|
|
490
|
-
interface Table_RowExpanding<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
491
|
-
autoResetExpanded: () => void;
|
|
492
|
-
/**
|
|
493
|
-
* Checks whether at least one row can be expanded.
|
|
494
|
-
*/
|
|
495
|
-
getCanSomeRowsExpand: () => boolean;
|
|
496
|
-
/**
|
|
497
|
-
* Computes the deepest expanded row id depth.
|
|
498
|
-
*/
|
|
499
|
-
getExpandedDepth: () => number;
|
|
500
|
-
/**
|
|
501
|
-
* Checks whether all rows in the current row model are expanded.
|
|
502
|
-
*/
|
|
503
|
-
getIsAllRowsExpanded: () => boolean;
|
|
504
|
-
/**
|
|
505
|
-
* Checks whether any row is currently expanded.
|
|
506
|
-
*/
|
|
507
|
-
getIsSomeRowsExpanded: () => boolean;
|
|
508
|
-
/**
|
|
509
|
-
* Creates a handler that toggles all rows expanded.
|
|
510
|
-
*/
|
|
511
|
-
getToggleAllRowsExpandedHandler: () => (event: unknown) => void;
|
|
512
|
-
/**
|
|
513
|
-
* Resets `expanded` to `initialState.expanded`.
|
|
514
|
-
*
|
|
515
|
-
* Pass `true` to ignore initial state and reset to `{}`.
|
|
516
|
-
*/
|
|
517
|
-
resetExpanded: (defaultState?: boolean) => void;
|
|
518
|
-
/**
|
|
519
|
-
* Updates expanded state with `true`, a row-id map, or an updater function.
|
|
520
|
-
*/
|
|
521
|
-
setExpanded: (updater: Updater<ExpandedState>) => void;
|
|
522
|
-
/**
|
|
523
|
-
* Toggles the expanded state for all rows.
|
|
524
|
-
*/
|
|
525
|
-
toggleAllRowsExpanded: (expanded?: boolean) => void;
|
|
526
|
-
}
|
|
527
|
-
interface Table_RowModels_Expanded<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
528
|
-
/**
|
|
529
|
-
* Resolves the row model after expanded rows have been flattened into view.
|
|
530
|
-
*/
|
|
531
|
-
getExpandedRowModel: () => RowModel<TFeatures, TData>;
|
|
532
|
-
/**
|
|
533
|
-
* Reads the row model immediately before expansion.
|
|
534
|
-
*/
|
|
535
|
-
getPreExpandedRowModel: () => RowModel<TFeatures, TData>;
|
|
536
|
-
}
|
|
537
|
-
interface CachedRowModel_Expanded<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
538
|
-
expandedRowModel: () => RowModel<TFeatures, TData>;
|
|
539
|
-
}
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-filtering/filterFns.d.ts
|
|
542
|
-
/**
|
|
543
|
-
* The built-in filter function registry.
|
|
544
|
-
*
|
|
545
|
-
* Registering this full object opts out of tree-shaking: every built-in
|
|
546
|
-
* filter function ends up in your bundle. Prefer importing the `filterFn_*`
|
|
547
|
-
* functions you actually use and registering just those in the `filterFns`
|
|
548
|
-
* slot, or passing them directly to the `filterFn` column option.
|
|
549
|
-
*
|
|
550
|
-
* @deprecated Import individual `filterFn_*` functions instead for a smaller
|
|
551
|
-
* bundle. This export still works and is not going away in v9, but built-in
|
|
552
|
-
* name resolution (including `filterFn: 'auto'`) only finds functions you
|
|
553
|
-
* register yourself.
|
|
554
|
-
*/
|
|
555
|
-
declare const filterFns: {
|
|
556
|
-
arrIncludes: CreatedFilterFn<any, any>;
|
|
557
|
-
arrIncludesAll: CreatedFilterFn<any, any>;
|
|
558
|
-
arrHas: CreatedFilterFn<any, any>;
|
|
559
|
-
arrIncludesSome: CreatedFilterFn<any, any>;
|
|
560
|
-
between: CreatedFilterFn<any, any>;
|
|
561
|
-
betweenInclusive: CreatedFilterFn<any, any>;
|
|
562
|
-
empty: CreatedFilterFn<any, any>;
|
|
563
|
-
endsWith: CreatedFilterFn<any, any>;
|
|
564
|
-
equals: CreatedFilterFn<any, any>;
|
|
565
|
-
equalsString: CreatedFilterFn<any, any>;
|
|
566
|
-
equalsStringSensitive: CreatedFilterFn<any, any>;
|
|
567
|
-
inDateRange: CreatedFilterFn<any, any>;
|
|
568
|
-
inNumberRange: CreatedFilterFn<any, any>;
|
|
569
|
-
includesString: CreatedFilterFn<any, any>;
|
|
570
|
-
includesStringSensitive: CreatedFilterFn<any, any>;
|
|
571
|
-
notEmpty: CreatedFilterFn<any, any>;
|
|
572
|
-
startsWith: CreatedFilterFn<any, any>;
|
|
573
|
-
weakEquals: CreatedFilterFn<any, any>;
|
|
574
|
-
};
|
|
575
|
-
type BuiltInFilterFn = keyof typeof filterFns;
|
|
576
|
-
//#endregion
|
|
577
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.types.d.ts
|
|
578
|
-
//#region src/features/column-filtering/columnFilteringFeature.types.d.ts
|
|
579
|
-
interface FilterMeta {}
|
|
580
|
-
/**
|
|
581
|
-
* Resolves the type of the filter meta attached to rows for a feature set.
|
|
582
|
-
*
|
|
583
|
-
* When the features object declares a `filterMeta` type-only slot
|
|
584
|
-
* (`tableFeatures({ ..., filterMeta: {} as MyFilterMeta })`), that type wins.
|
|
585
|
-
* Otherwise this falls back to the global declaration-merged `FilterMeta`
|
|
586
|
-
* interface.
|
|
587
|
-
*/
|
|
588
|
-
type ExtractFilterMeta<TFeatures extends TableFeatures> = IsAny<TFeatures> extends true ? FilterMeta : TFeatures extends {
|
|
589
|
-
filterMeta: infer TFilterMeta extends object;
|
|
590
|
-
} ? TFilterMeta : FilterMeta;
|
|
591
|
-
interface FilterFns {}
|
|
592
|
-
interface TableState_ColumnFiltering {
|
|
593
|
-
columnFilters: ColumnFiltersState;
|
|
594
|
-
}
|
|
595
|
-
type ColumnFiltersState = Array<ColumnFilter>;
|
|
596
|
-
interface ColumnFilter {
|
|
597
|
-
id: string;
|
|
598
|
-
value: unknown;
|
|
599
|
-
}
|
|
600
|
-
interface RowModelFns_ColumnFiltering<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
601
|
-
filterFns: Record<string, FilterFn<TFeatures, TData>>;
|
|
602
|
-
}
|
|
603
|
-
interface FilterFn<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
604
|
-
(row: Row<TFeatures, TData>, columnId: string, filterValue: any, addMeta?: (meta: ExtractFilterMeta<TFeatures>) => void): boolean;
|
|
605
|
-
/**
|
|
606
|
-
* Removes the filter from `state.columnFilters` when the filter value fails
|
|
607
|
-
* this test (e.g. empty strings for text filters).
|
|
608
|
-
*
|
|
609
|
-
* When provided, this test is authoritative: values it keeps stay in filter
|
|
610
|
-
* state even when they are empty strings, which the default heuristic would
|
|
611
|
-
* otherwise remove. An `undefined` filter value always clears the filter
|
|
612
|
-
* regardless.
|
|
613
|
-
*/
|
|
614
|
-
autoRemove?: ColumnFilterAutoRemoveTestFn<TFeatures, TData>;
|
|
615
|
-
/**
|
|
616
|
-
* Normalizes the filter value before filtering runs.
|
|
617
|
-
*
|
|
618
|
-
* The table applies this once per filter (not per row) and passes the
|
|
619
|
-
* resolved value to the filter function as `filterValue`.
|
|
620
|
-
*/
|
|
621
|
-
resolveFilterValue?: TransformFilterValueFn<TFeatures, TData>;
|
|
622
|
-
/**
|
|
623
|
-
* Normalizes each row's value before it is compared against the filter
|
|
624
|
-
* value. Only honored by filter functions built with `constructFilterFn`
|
|
625
|
-
* (including all built-in filter functions).
|
|
626
|
-
*/
|
|
627
|
-
resolveDataValue?: TransformDataValueFn;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* The definition object accepted by `constructFilterFn`.
|
|
631
|
-
*
|
|
632
|
-
* `filter` is a value-level comparator: it receives the row's (resolved) data
|
|
633
|
-
* value and the (resolved) filter value instead of the whole row, so
|
|
634
|
-
* normalization concerns stay in `resolveDataValue`/`resolveFilterValue`.
|
|
635
|
-
*/
|
|
636
|
-
interface FilterFnDef<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
637
|
-
filter: (dataValue: any, filterValue: any, row: Row<TFeatures, TData>, columnId: string, addMeta?: (meta: ExtractFilterMeta<TFeatures>) => void) => boolean;
|
|
638
|
-
autoRemove?: (filterValue: any) => boolean;
|
|
639
|
-
resolveFilterValue?: (filterValue: any) => any;
|
|
640
|
-
resolveDataValue?: TransformDataValueFn;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* The shape returned by `constructFilterFn`: a `FilterFn` with its definition
|
|
644
|
-
* attached, so variants can be built by spreading it into another
|
|
645
|
-
* `constructFilterFn` call.
|
|
646
|
-
*
|
|
647
|
-
* The call signature is generic so a created filter function can be used with
|
|
648
|
-
* any table's rows, regardless of the feature set it was defined against.
|
|
649
|
-
*/
|
|
650
|
-
interface CreatedFilterFn<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends FilterFnDef<TFeatures, TData> {
|
|
651
|
-
<TRowFeatures extends TableFeatures, TRowData extends RowData$2>(row: Row<TRowFeatures, TRowData>, columnId: string, filterValue: any, addMeta?: (meta: ExtractFilterMeta<TRowFeatures>) => void): boolean;
|
|
652
|
-
}
|
|
653
|
-
type TransformFilterValueFn<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = (value: any, column?: Column$2<TFeatures, TData, TValue>) => TValue;
|
|
654
|
-
type ColumnFilterAutoRemoveTestFn<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = (value: any, column?: Column$2<TFeatures, TData, TValue>) => boolean;
|
|
655
|
-
/**
|
|
656
|
-
* Resolves the valid string names for `columnDef.filterFn` and
|
|
657
|
-
* `options.globalFilterFn` for a feature set.
|
|
658
|
-
*
|
|
659
|
-
* When the features object declares a `filterFns` registry
|
|
660
|
-
* (`tableFeatures({ ..., filterFns })`), its keys are the only valid names; a
|
|
661
|
-
* name is only assignable if a filter function is actually registered for it.
|
|
662
|
-
* Otherwise this falls back to the global declaration-merged `FilterFns`
|
|
663
|
-
* interface.
|
|
664
|
-
*/
|
|
665
|
-
type ExtractFilterFnKeys<TFeatures extends TableFeatures> = IsAny<TFeatures> extends true ? keyof FilterFns | BuiltInFilterFn : TFeatures extends {
|
|
666
|
-
filterFns: infer TFilterFns extends object;
|
|
667
|
-
} ? Extract<keyof TFilterFns, string> : keyof FilterFns;
|
|
668
|
-
type FilterFnOption<TFeatures extends TableFeatures, TData extends RowData$2> = 'auto' | ExtractFilterFnKeys<TFeatures> | FilterFn<TFeatures, TData>;
|
|
669
|
-
interface ColumnDef_ColumnFiltering<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
670
|
-
/**
|
|
671
|
-
* Enables this column to participate in column-specific filtering.
|
|
672
|
-
*
|
|
673
|
-
* Defaults to `true`; table-level `enableColumnFilters` and `enableFilters`
|
|
674
|
-
* must also allow filtering.
|
|
675
|
-
*/
|
|
676
|
-
enableColumnFilter?: boolean;
|
|
677
|
-
/**
|
|
678
|
-
* The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.
|
|
679
|
-
*/
|
|
680
|
-
filterFn?: FilterFnOption<TFeatures, TData>;
|
|
681
|
-
}
|
|
682
|
-
interface Column_ColumnFiltering<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
683
|
-
/**
|
|
684
|
-
* Returns an automatically calculated filter function for the column based off of the columns first known value.
|
|
685
|
-
*/
|
|
686
|
-
getAutoFilterFn: () => FilterFn<TFeatures, TData>;
|
|
687
|
-
/**
|
|
688
|
-
* Checks whether this accessor column can currently be column-filtered.
|
|
689
|
-
*/
|
|
690
|
-
getCanFilter: () => boolean;
|
|
691
|
-
/**
|
|
692
|
-
* Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.
|
|
693
|
-
*/
|
|
694
|
-
getFilterFn: () => FilterFn<TFeatures, TData>;
|
|
695
|
-
/**
|
|
696
|
-
* Returns the index (including `-1`) of the column filter in the table's `state.columnFilters` array.
|
|
697
|
-
*/
|
|
698
|
-
getFilterIndex: () => number;
|
|
699
|
-
/**
|
|
700
|
-
* Reads this column's current value from `state.columnFilters`.
|
|
701
|
-
*/
|
|
702
|
-
getFilterValue: () => unknown;
|
|
703
|
-
/**
|
|
704
|
-
* Checks whether this column has an active entry in `state.columnFilters`.
|
|
705
|
-
*/
|
|
706
|
-
getIsFiltered: () => boolean;
|
|
707
|
-
/**
|
|
708
|
-
* Adds, updates, or removes this column's filter value.
|
|
709
|
-
*
|
|
710
|
-
* Updater functions receive the previous filter value. Values that satisfy
|
|
711
|
-
* the filter function's `autoRemove` rule are removed from filter state.
|
|
712
|
-
*/
|
|
713
|
-
setFilterValue: (updater: Updater<any>) => void;
|
|
714
|
-
}
|
|
715
|
-
interface Row_ColumnFiltering<in out TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
716
|
-
/**
|
|
717
|
-
* The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.
|
|
718
|
-
*/
|
|
719
|
-
columnFilters: Record<string, boolean>;
|
|
720
|
-
/**
|
|
721
|
-
* The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.
|
|
722
|
-
*/
|
|
723
|
-
columnFiltersMeta: Record<string, ExtractFilterMeta<TFeatures>>;
|
|
724
|
-
}
|
|
725
|
-
interface TableOptions_ColumnFiltering<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
726
|
-
/**
|
|
727
|
-
* Enables column-specific filtering for all columns that also allow it.
|
|
728
|
-
*/
|
|
729
|
-
enableColumnFilters?: boolean;
|
|
730
|
-
/**
|
|
731
|
-
* Enables all filtering features for the table.
|
|
732
|
-
*
|
|
733
|
-
* Set this to `false` to disable both column filtering and global filtering.
|
|
734
|
-
*/
|
|
735
|
-
enableFilters?: boolean;
|
|
736
|
-
/**
|
|
737
|
-
* By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to `true` will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included).
|
|
738
|
-
*/
|
|
739
|
-
filterFromLeafRows?: boolean;
|
|
740
|
-
/**
|
|
741
|
-
* Disables the `getFilteredRowModel` from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering.
|
|
742
|
-
*/
|
|
743
|
-
manualFiltering?: boolean;
|
|
744
|
-
/**
|
|
745
|
-
* By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to `0` will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to `1` will cause filtering to only be applied to child leaf rows 1 level deep, and so on.
|
|
746
|
-
* This is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter.
|
|
747
|
-
*/
|
|
748
|
-
maxLeafRowFilterDepth?: number;
|
|
749
|
-
/**
|
|
750
|
-
* Called with an updater when column filter state changes. Pair this with
|
|
751
|
-
* `state.columnFilters` when using external state; external atoms can own the
|
|
752
|
-
* slice without this callback.
|
|
753
|
-
*/
|
|
754
|
-
onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
|
|
755
|
-
}
|
|
756
|
-
interface Table_ColumnFiltering {
|
|
757
|
-
/**
|
|
758
|
-
* Resets `columnFilters` to `initialState.columnFilters`.
|
|
759
|
-
*
|
|
760
|
-
* Pass `true` to ignore initial state and reset to `[]`.
|
|
761
|
-
*/
|
|
762
|
-
resetColumnFilters: (defaultState?: boolean) => void;
|
|
763
|
-
/**
|
|
764
|
-
* Updates column filter state with a next array or updater function.
|
|
765
|
-
*/
|
|
766
|
-
setColumnFilters: (updater: Updater<ColumnFiltersState>) => void;
|
|
767
|
-
}
|
|
768
|
-
interface Table_RowModels_Filtered<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
769
|
-
/**
|
|
770
|
-
* Resolves the row model after column and global filters have been applied.
|
|
771
|
-
*/
|
|
772
|
-
getFilteredRowModel: () => RowModel<TFeatures, TData>;
|
|
773
|
-
/**
|
|
774
|
-
* Reads the row model immediately before filtering.
|
|
775
|
-
*/
|
|
776
|
-
getPreFilteredRowModel: () => RowModel<TFeatures, TData>;
|
|
777
|
-
}
|
|
778
|
-
interface CachedRowModel_Filtered<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
779
|
-
filteredRowModel: () => RowModel<TFeatures, TData>;
|
|
780
|
-
}
|
|
781
|
-
//#endregion
|
|
782
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.types.d.ts
|
|
783
|
-
//#region src/features/row-pagination/rowPaginationFeature.types.d.ts
|
|
784
|
-
interface PaginationState {
|
|
785
|
-
pageIndex: number;
|
|
786
|
-
/**
|
|
787
|
-
* The number of rows per page. Set to `Infinity` to place all rows on a
|
|
788
|
-
* single page.
|
|
789
|
-
*/
|
|
790
|
-
pageSize: number;
|
|
791
|
-
}
|
|
792
|
-
interface TableState_RowPagination {
|
|
793
|
-
pagination: PaginationState;
|
|
794
|
-
}
|
|
795
|
-
interface TableOptions_RowPagination {
|
|
796
|
-
/**
|
|
797
|
-
* If set to `true`, pagination will be reset to the first page when page-altering state changes e.g. `data` is updated, filters change, grouping changes, etc.
|
|
798
|
-
*/
|
|
799
|
-
autoResetPageIndex?: boolean;
|
|
800
|
-
/**
|
|
801
|
-
* Enables manual pagination. If this option is set to `true`, the table will not automatically paginate rows using `getPaginatedRowModel()` and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation.
|
|
802
|
-
*/
|
|
803
|
-
manualPagination?: boolean;
|
|
804
|
-
/**
|
|
805
|
-
* Called with an updater when pagination state changes. Pair this with
|
|
806
|
-
* `state.pagination` when using external state; external atoms can own the
|
|
807
|
-
* slice without this callback.
|
|
808
|
-
*/
|
|
809
|
-
onPaginationChange?: OnChangeFn<PaginationState>;
|
|
810
|
-
/**
|
|
811
|
-
* When manually controlling pagination, you can supply a total `pageCount` value to the table if you know it (Or supply a `rowCount` and `pageCount` will be calculated). If you do not know how many pages there are, you can set this to `-1`.
|
|
812
|
-
*/
|
|
813
|
-
pageCount?: number;
|
|
814
|
-
/**
|
|
815
|
-
* When manually controlling pagination, you can supply a total `rowCount` value to the table if you know it. The `pageCount` can be calculated from this value and the `pageSize`.
|
|
816
|
-
*/
|
|
817
|
-
rowCount?: number;
|
|
818
|
-
}
|
|
819
|
-
interface Table_RowPagination<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
820
|
-
_autoResetPageIndex: () => void;
|
|
821
|
-
/**
|
|
822
|
-
* Checks whether the current page index can move forward.
|
|
823
|
-
*/
|
|
824
|
-
getCanNextPage: () => boolean;
|
|
825
|
-
/**
|
|
826
|
-
* Checks whether a known, finite last page exists after the current page.
|
|
827
|
-
*/
|
|
828
|
-
getCanLastPage: () => boolean;
|
|
829
|
-
/**
|
|
830
|
-
* Checks whether the current page index can move backward.
|
|
831
|
-
*/
|
|
832
|
-
getCanPreviousPage: () => boolean;
|
|
833
|
-
/**
|
|
834
|
-
* Resolves the current page count from `options.pageCount` or row count and
|
|
835
|
-
* page size.
|
|
836
|
-
*/
|
|
837
|
-
getPageCount: () => number;
|
|
838
|
-
/**
|
|
839
|
-
* Resolves the row count used for pagination math.
|
|
840
|
-
*
|
|
841
|
-
* `options.rowCount` wins; otherwise the pre-paginated row model is counted.
|
|
842
|
-
*/
|
|
843
|
-
getRowCount: () => number;
|
|
844
|
-
/**
|
|
845
|
-
* Builds zero-based page indexes for the current page count.
|
|
846
|
-
*/
|
|
847
|
-
getPageOptions: () => Array<number>;
|
|
848
|
-
/**
|
|
849
|
-
* Increments the page index by one, if possible.
|
|
850
|
-
*/
|
|
851
|
-
nextPage: () => void;
|
|
852
|
-
/**
|
|
853
|
-
* Decrements the page index by one, if possible.
|
|
854
|
-
*/
|
|
855
|
-
previousPage: () => void;
|
|
856
|
-
/**
|
|
857
|
-
* Sets the page index to `0`.
|
|
858
|
-
*/
|
|
859
|
-
firstPage: () => void;
|
|
860
|
-
/**
|
|
861
|
-
* Sets the page index to the last known page. Does nothing when the page
|
|
862
|
-
* count is unknown, empty, or non-finite.
|
|
863
|
-
*/
|
|
864
|
-
lastPage: () => void;
|
|
865
|
-
/**
|
|
866
|
-
* Resets `pagination.pageIndex` to initial state, or to `0` when
|
|
867
|
-
* `defaultState` is `true`.
|
|
868
|
-
*/
|
|
869
|
-
resetPageIndex: (defaultState?: boolean) => void;
|
|
870
|
-
/**
|
|
871
|
-
* Resets `pagination.pageSize` to initial state, or to `10` when
|
|
872
|
-
* `defaultState` is `true`.
|
|
873
|
-
*/
|
|
874
|
-
resetPageSize: (defaultState?: boolean) => void;
|
|
875
|
-
/**
|
|
876
|
-
* Resets `pagination` to `initialState.pagination`.
|
|
877
|
-
*
|
|
878
|
-
* Pass `true` to ignore initial state and reset to
|
|
879
|
-
* `{ pageIndex: 0, pageSize: 10 }`.
|
|
880
|
-
*/
|
|
881
|
-
resetPagination: (defaultState?: boolean) => void;
|
|
882
|
-
/**
|
|
883
|
-
* Updates `pagination.pageIndex` using a value or updater.
|
|
884
|
-
*/
|
|
885
|
-
setPageIndex: (updater: Updater<number>) => void;
|
|
886
|
-
/**
|
|
887
|
-
* Updates `pagination.pageSize` using a value or updater.
|
|
888
|
-
*/
|
|
889
|
-
setPageSize: (updater: Updater<number>) => void;
|
|
890
|
-
/**
|
|
891
|
-
* Updates pagination state with a next state or updater function.
|
|
892
|
-
*/
|
|
893
|
-
setPagination: (updater: Updater<PaginationState>) => void;
|
|
894
|
-
}
|
|
895
|
-
interface Table_RowModels_Paginated<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
896
|
-
/**
|
|
897
|
-
* Resolves the row model after pagination has sliced the current page.
|
|
898
|
-
*/
|
|
899
|
-
getPaginatedRowModel: () => RowModel<TFeatures, TData>;
|
|
900
|
-
/**
|
|
901
|
-
* Reads the row model immediately before pagination.
|
|
902
|
-
*/
|
|
903
|
-
getPrePaginatedRowModel: () => RowModel<TFeatures, TData>;
|
|
904
|
-
}
|
|
905
|
-
interface CachedRowModel_Paginated<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
906
|
-
paginatedRowModel: () => RowModel<TFeatures, TData>;
|
|
907
|
-
}
|
|
908
|
-
//#endregion
|
|
909
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.types.d.ts
|
|
910
|
-
//#region src/features/column-faceting/columnFacetingFeature.types.d.ts
|
|
911
|
-
interface Column_ColumnFaceting<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
912
|
-
/**
|
|
913
|
-
* Computes min/max numeric facet values for this column.
|
|
914
|
-
*/
|
|
915
|
-
getFacetedMinMaxValues: () => undefined | [number, number];
|
|
916
|
-
/**
|
|
917
|
-
* Computes the row model used to derive this column's facet values.
|
|
918
|
-
*
|
|
919
|
-
* Other column filters are applied, while this column's own filter is
|
|
920
|
-
* excluded.
|
|
921
|
-
*/
|
|
922
|
-
getFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
923
|
-
/**
|
|
924
|
-
* Computes unique facet values and occurrence counts for this column.
|
|
925
|
-
*/
|
|
926
|
-
getFacetedUniqueValues: () => Map<any, number>;
|
|
927
|
-
}
|
|
928
|
-
interface Table_RowModels_Faceted<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
929
|
-
/**
|
|
930
|
-
* Computes min/max numeric facet values for the active faceting context.
|
|
931
|
-
*
|
|
932
|
-
* Requires a `facetedMinMaxValues` row-model factory on the `features` option.
|
|
933
|
-
*/
|
|
934
|
-
getFacetedMinMaxValues: () => undefined | [number, number];
|
|
935
|
-
/**
|
|
936
|
-
* Computes the row model used to derive facet values.
|
|
937
|
-
*
|
|
938
|
-
* Requires a `facetedRowModel` row-model factory on the `features` option.
|
|
939
|
-
*/
|
|
940
|
-
getFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
941
|
-
/**
|
|
942
|
-
* Computes unique facet values and occurrence counts.
|
|
943
|
-
*
|
|
944
|
-
* Requires a `facetedUniqueValues` row-model factory on the `features` option.
|
|
945
|
-
*/
|
|
946
|
-
getFacetedUniqueValues: () => Map<any, number>;
|
|
947
|
-
}
|
|
948
|
-
interface CachedRowModel_Faceted<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
949
|
-
facetedRowModels?: Record<string, () => RowModel<TFeatures, TData>>;
|
|
950
|
-
facetedMinMaxValues?: Record<string, () => undefined | [number, number]>;
|
|
951
|
-
facetedUniqueValues?: Record<string, () => Map<any, number>>;
|
|
952
|
-
globalFacetedRowModel?: () => RowModel<TFeatures, TData>;
|
|
953
|
-
globalFacetedMinMaxValues?: () => undefined | [number, number];
|
|
954
|
-
globalFacetedUniqueValues?: () => Map<any, number>;
|
|
955
|
-
}
|
|
956
|
-
interface Table_ColumnFaceting<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
957
|
-
/**
|
|
958
|
-
* Returns the min and max values for the global filter.
|
|
959
|
-
*/
|
|
960
|
-
getGlobalFacetedMinMaxValues: () => undefined | [number, number];
|
|
961
|
-
/**
|
|
962
|
-
* Computes the row model used to derive global facet values.
|
|
963
|
-
*/
|
|
964
|
-
getGlobalFacetedRowModel: () => RowModel<TFeatures, TData>;
|
|
965
|
-
/**
|
|
966
|
-
* Returns the faceted unique values for the global filter.
|
|
967
|
-
*/
|
|
968
|
-
getGlobalFacetedUniqueValues: () => Map<any, number>;
|
|
969
|
-
}
|
|
970
|
-
//#endregion
|
|
971
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.types.d.ts
|
|
972
|
-
//#region src/core/row-models/coreRowModelsFeature.types.d.ts
|
|
973
|
-
interface RowModel<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
974
|
-
rows: Array<Row<TFeatures, TData>>;
|
|
975
|
-
flatRows: Array<Row<TFeatures, TData>>;
|
|
976
|
-
rowsById: Record<string, Row<TFeatures, TData>>;
|
|
977
|
-
}
|
|
978
|
-
interface CachedRowModel_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
979
|
-
coreRowModel: () => RowModel<TFeatures, TData>;
|
|
980
|
-
}
|
|
981
|
-
interface Table_RowModels_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
982
|
-
/**
|
|
983
|
-
* Returns the core row model before any processing has been applied.
|
|
984
|
-
*/
|
|
985
|
-
getCoreRowModel: () => RowModel<TFeatures, TData>;
|
|
986
|
-
/**
|
|
987
|
-
* Returns the final model after all processing from other used features has been applied. This is the row model that is most commonly used for rendering.
|
|
988
|
-
*/
|
|
989
|
-
getRowModel: () => RowModel<TFeatures, TData>;
|
|
990
|
-
}
|
|
991
|
-
type Table_RowModels<TFeatures extends TableFeatures, TData extends RowData$2> = Table_RowModels_Core<TFeatures, TData> & Table_RowModels_Faceted<TFeatures, TData> & Table_RowModels_Filtered<TFeatures, TData> & Table_RowModels_Grouped<TFeatures, TData> & Table_RowModels_Expanded<TFeatures, TData> & Table_RowModels_Paginated<TFeatures, TData> & Table_RowModels_Sorted<TFeatures, TData>;
|
|
992
|
-
//#endregion
|
|
993
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.types.d.ts
|
|
994
|
-
//#region src/features/column-grouping/columnGroupingFeature.types.d.ts
|
|
995
|
-
type GroupingState = Array<string>;
|
|
996
|
-
interface TableState_ColumnGrouping {
|
|
997
|
-
grouping: GroupingState;
|
|
998
|
-
}
|
|
999
|
-
interface ColumnDef_ColumnGrouping<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1000
|
-
/**
|
|
1001
|
-
* Allows this column to be added to grouping state.
|
|
1002
|
-
*
|
|
1003
|
-
* Defaults to `true`; table-level `enableGrouping` must also allow grouping.
|
|
1004
|
-
*/
|
|
1005
|
-
enableGrouping?: boolean;
|
|
1006
|
-
/**
|
|
1007
|
-
* Returns the value used to group rows for this column.
|
|
1008
|
-
*
|
|
1009
|
-
* When omitted, grouping uses the value derived from this column's
|
|
1010
|
-
* `accessorKey` or `accessorFn`.
|
|
1011
|
-
*/
|
|
1012
|
-
getGroupingValue?: (originalRow: TData, index: number, row: Row<TFeatures, TData>) => any;
|
|
1013
|
-
}
|
|
1014
|
-
interface Column_ColumnGrouping {
|
|
1015
|
-
/**
|
|
1016
|
-
* Checks whether this column can currently be grouped.
|
|
1017
|
-
*/
|
|
1018
|
-
getCanGroup: () => boolean;
|
|
1019
|
-
/**
|
|
1020
|
-
* Finds this column's position in the ordered grouping state.
|
|
1021
|
-
*/
|
|
1022
|
-
getGroupedIndex: () => number;
|
|
1023
|
-
/**
|
|
1024
|
-
* Checks whether this column id is present in grouping state.
|
|
1025
|
-
*/
|
|
1026
|
-
getIsGrouped: () => boolean;
|
|
1027
|
-
/**
|
|
1028
|
-
* Returns a function that toggles the grouping state of the column. This is useful for passing to the `onClick` prop of a button.
|
|
1029
|
-
*/
|
|
1030
|
-
getToggleGroupingHandler: () => () => void;
|
|
1031
|
-
/**
|
|
1032
|
-
* Toggles the grouping state of the column.
|
|
1033
|
-
*/
|
|
1034
|
-
toggleGrouping: () => void;
|
|
1035
|
-
}
|
|
1036
|
-
interface Row_ColumnGrouping {
|
|
1037
|
-
_groupingValuesCache: Record<string, any>;
|
|
1038
|
-
/**
|
|
1039
|
-
* Reads the value used to group this row for a column id.
|
|
1040
|
-
*/
|
|
1041
|
-
getGroupingValue: (columnId: string) => unknown;
|
|
1042
|
-
/**
|
|
1043
|
-
* Checks whether this row represents a grouped row.
|
|
1044
|
-
*/
|
|
1045
|
-
getIsGrouped: () => boolean;
|
|
1046
|
-
/**
|
|
1047
|
-
* If this row is grouped, this is the id of the column that this row is grouped by.
|
|
1048
|
-
*/
|
|
1049
|
-
groupingColumnId?: string;
|
|
1050
|
-
/**
|
|
1051
|
-
* If this row is grouped, this is the unique/shared value for the `groupingColumnId` for all of the rows in this group.
|
|
1052
|
-
*/
|
|
1053
|
-
groupingValue?: unknown;
|
|
1054
|
-
}
|
|
1055
|
-
interface Cell_ColumnGrouping {
|
|
1056
|
-
/**
|
|
1057
|
-
* Checks whether this cell represents the active grouping column.
|
|
1058
|
-
*/
|
|
1059
|
-
getIsGrouped: () => boolean;
|
|
1060
|
-
/**
|
|
1061
|
-
* Checks whether this cell is hidden as a grouping placeholder.
|
|
1062
|
-
*/
|
|
1063
|
-
getIsPlaceholder: () => boolean;
|
|
1064
|
-
}
|
|
1065
|
-
interface TableOptions_ColumnGrouping {
|
|
1066
|
-
/**
|
|
1067
|
-
* Allows columns to be grouped for this table.
|
|
1068
|
-
*/
|
|
1069
|
-
enableGrouping?: boolean;
|
|
1070
|
-
/**
|
|
1071
|
-
* Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here.
|
|
1072
|
-
*/
|
|
1073
|
-
groupedColumnMode?: false | 'reorder' | 'remove';
|
|
1074
|
-
/**
|
|
1075
|
-
* Enables manual grouping. If this option is set to `true`, the table will not automatically group rows using `getGroupedRowModel()` and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation.
|
|
1076
|
-
*/
|
|
1077
|
-
manualGrouping?: boolean;
|
|
1078
|
-
/**
|
|
1079
|
-
* Called with an updater when grouping state changes. Pair this with
|
|
1080
|
-
* `state.grouping` when using external state; external atoms can own the
|
|
1081
|
-
* slice without this callback.
|
|
1082
|
-
*/
|
|
1083
|
-
onGroupingChange?: OnChangeFn<GroupingState>;
|
|
1084
|
-
}
|
|
1085
|
-
interface Table_ColumnGrouping<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
1086
|
-
/**
|
|
1087
|
-
* Resets `grouping` to `initialState.grouping`.
|
|
1088
|
-
*
|
|
1089
|
-
* Pass `true` to ignore initial state and reset to `[]`.
|
|
1090
|
-
*/
|
|
1091
|
-
resetGrouping: (defaultState?: boolean) => void;
|
|
1092
|
-
/**
|
|
1093
|
-
* Updates grouping state with a next ordered id array or updater function.
|
|
1094
|
-
*/
|
|
1095
|
-
setGrouping: (updater: Updater<GroupingState>) => void;
|
|
1096
|
-
}
|
|
1097
|
-
interface Table_RowModels_Grouped<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1098
|
-
/**
|
|
1099
|
-
* Resolves the row model after grouping has been applied.
|
|
1100
|
-
*/
|
|
1101
|
-
getGroupedRowModel: () => RowModel<TFeatures, TData>;
|
|
1102
|
-
/**
|
|
1103
|
-
* Reads the row model immediately before grouping.
|
|
1104
|
-
*/
|
|
1105
|
-
getPreGroupedRowModel: () => RowModel<TFeatures, TData>;
|
|
1106
|
-
}
|
|
1107
|
-
interface CachedRowModel_Grouped<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1108
|
-
groupedRowModel: () => RowModel<TFeatures, TData>;
|
|
1109
|
-
}
|
|
1110
|
-
//#endregion
|
|
1111
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.types.d.ts
|
|
1112
|
-
//#region src/features/global-filtering/globalFilteringFeature.types.d.ts
|
|
1113
|
-
interface TableState_GlobalFiltering {
|
|
1114
|
-
globalFilter: any;
|
|
1115
|
-
}
|
|
1116
|
-
interface ColumnDef_GlobalFiltering {
|
|
1117
|
-
/**
|
|
1118
|
-
* Allows this column to be scanned by global filtering.
|
|
1119
|
-
*
|
|
1120
|
-
* Defaults to `true`; table-level global filtering and `enableFilters` must
|
|
1121
|
-
* also allow filtering.
|
|
1122
|
-
*/
|
|
1123
|
-
enableGlobalFilter?: boolean;
|
|
1124
|
-
}
|
|
1125
|
-
interface Column_GlobalFiltering {
|
|
1126
|
-
/**
|
|
1127
|
-
* Checks whether this accessor column participates in global filtering.
|
|
1128
|
-
*/
|
|
1129
|
-
getCanGlobalFilter: () => boolean;
|
|
1130
|
-
}
|
|
1131
|
-
interface TableOptions_GlobalFiltering<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1132
|
-
/**
|
|
1133
|
-
* Enables global filtering across columns that allow it.
|
|
1134
|
-
*/
|
|
1135
|
-
enableGlobalFilter?: boolean;
|
|
1136
|
-
/**
|
|
1137
|
-
* If provided, this function will be called with the column and should return `true` or `false` to indicate whether this column should be used for global filtering.
|
|
1138
|
-
* This is useful if the column can contain data that is not `string` or `number` (i.e. `undefined`).
|
|
1139
|
-
*/
|
|
1140
|
-
getColumnCanGlobalFilter?: <TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData>(column: Column$2<TFeatures, TData, TValue>) => boolean;
|
|
1141
|
-
/**
|
|
1142
|
-
* The filter function to use for global filtering.
|
|
1143
|
-
* - A `string` referencing a built-in filter function
|
|
1144
|
-
* - A `string` that references a custom filter functions provided via the `tableOptions.filterFns` option
|
|
1145
|
-
* - A custom filter function
|
|
1146
|
-
*/
|
|
1147
|
-
globalFilterFn?: FilterFnOption<TFeatures, TData>;
|
|
1148
|
-
/**
|
|
1149
|
-
* Called with an updater when global filter state changes. Pair this with
|
|
1150
|
-
* `state.globalFilter` when using external state; external atoms can own the
|
|
1151
|
-
* slice without this callback.
|
|
1152
|
-
*/
|
|
1153
|
-
onGlobalFilterChange?: OnChangeFn<any>;
|
|
1154
|
-
}
|
|
1155
|
-
interface Table_GlobalFiltering<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1156
|
-
/**
|
|
1157
|
-
* Currently, this function returns the built-in `includesString` filter function. In future releases, it may return more dynamic filter functions based on the nature of the data provided.
|
|
1158
|
-
*/
|
|
1159
|
-
getGlobalAutoFilterFn: () => FilterFn<TFeatures, TData> | undefined;
|
|
1160
|
-
/**
|
|
1161
|
-
* Returns the filter function (either user-defined or automatic, depending on configuration) for the global filter.
|
|
1162
|
-
*/
|
|
1163
|
-
getGlobalFilterFn: () => FilterFn<TFeatures, TData> | undefined;
|
|
1164
|
-
/**
|
|
1165
|
-
* Resets `globalFilter` to `initialState.globalFilter`.
|
|
1166
|
-
*
|
|
1167
|
-
* Pass `true` to ignore initial state and reset to `undefined`.
|
|
1168
|
-
*/
|
|
1169
|
-
resetGlobalFilter: (defaultState?: boolean) => void;
|
|
1170
|
-
/**
|
|
1171
|
-
* Updates global filter state with a next value or updater function.
|
|
1172
|
-
*/
|
|
1173
|
-
setGlobalFilter: (updater: Updater<any>) => void;
|
|
1174
|
-
}
|
|
1175
|
-
//#endregion
|
|
1176
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-aggregation/aggregationFns.d.ts
|
|
1177
|
-
//#region src/features/row-aggregation/aggregationFns.d.ts
|
|
1178
|
-
type RangeValue = Date | number;
|
|
1179
|
-
/**
|
|
1180
|
-
* Full built-in registry. Register individual definitions for tree-shaking.
|
|
1181
|
-
*
|
|
1182
|
-
* @deprecated Import individual `aggregationFn_*` definitions instead for a
|
|
1183
|
-
* smaller bundle. This registry remains available for compatibility.
|
|
1184
|
-
*/
|
|
1185
|
-
declare const aggregationFns: {
|
|
1186
|
-
sum: AggregationFnDef<any, any, unknown, number>;
|
|
1187
|
-
min: AggregationFnDef<any, any, unknown, RangeValue | undefined>;
|
|
1188
|
-
max: AggregationFnDef<any, any, unknown, RangeValue | undefined>;
|
|
1189
|
-
extent: AggregationFnDef<any, any, unknown, [RangeValue | undefined, RangeValue | undefined]>;
|
|
1190
|
-
mean: AggregationFnDef<any, any, unknown, number | undefined>;
|
|
1191
|
-
median: AggregationFnDef<any, any, unknown, number | undefined>;
|
|
1192
|
-
unique: AggregationFnDef<any, any, unknown, unknown[]>;
|
|
1193
|
-
uniqueCount: AggregationFnDef<any, any, unknown, number>;
|
|
1194
|
-
count: AggregationFnDef<any, any, unknown, number>;
|
|
1195
|
-
first: AggregationFnDef<any, any, unknown, unknown>;
|
|
1196
|
-
last: AggregationFnDef<any, any, unknown, unknown>;
|
|
1197
|
-
};
|
|
1198
|
-
type BuiltInAggregationFn = keyof typeof aggregationFns;
|
|
1199
|
-
//#endregion
|
|
1200
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.types.d.ts
|
|
1201
|
-
//#region src/features/column-ordering/columnOrderingFeature.types.d.ts
|
|
1202
|
-
type ColumnOrderState = Array<string>;
|
|
1203
|
-
interface ColumnIndexes {
|
|
1204
|
-
/**
|
|
1205
|
-
* Maps each visible leaf column id to its index in the full visible column list.
|
|
1206
|
-
*/
|
|
1207
|
-
all: Record<string, number>;
|
|
1208
|
-
/**
|
|
1209
|
-
* Maps each unpinned visible leaf column id to its index within the center region.
|
|
1210
|
-
*/
|
|
1211
|
-
center: Record<string, number>;
|
|
1212
|
-
/**
|
|
1213
|
-
* Maps each start-pinned visible leaf column id to its index within the start region.
|
|
1214
|
-
*/
|
|
1215
|
-
start: Record<string, number>;
|
|
1216
|
-
/**
|
|
1217
|
-
* Maps each end-pinned visible leaf column id to its index within the end region.
|
|
1218
|
-
*/
|
|
1219
|
-
end: Record<string, number>;
|
|
1220
|
-
}
|
|
1221
|
-
interface TableState_ColumnOrdering {
|
|
1222
|
-
columnOrder: ColumnOrderState;
|
|
1223
|
-
}
|
|
1224
|
-
interface TableOptions_ColumnOrdering {
|
|
1225
|
-
/**
|
|
1226
|
-
* Called with an updater when column order state changes. Pair this with
|
|
1227
|
-
* `state.columnOrder` when using external state; external atoms can own the
|
|
1228
|
-
* slice without this callback.
|
|
1229
|
-
*/
|
|
1230
|
-
onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
|
|
1231
|
-
}
|
|
1232
|
-
interface Column_ColumnOrdering {
|
|
1233
|
-
/**
|
|
1234
|
-
* Finds this column's zero-based index among visible columns.
|
|
1235
|
-
*
|
|
1236
|
-
* Pass `'start'`, `'center'`, or `'end'` to measure within that pinned
|
|
1237
|
-
* region instead of the full visible leaf order.
|
|
1238
|
-
*/
|
|
1239
|
-
getIndex: (position?: ColumnPinningPosition | 'center') => number;
|
|
1240
|
-
/**
|
|
1241
|
-
* Checks whether this column is the first visible column.
|
|
1242
|
-
*
|
|
1243
|
-
* Pass a pinned region to check the first column within that region.
|
|
1244
|
-
*/
|
|
1245
|
-
getIsFirstColumn: (position?: ColumnPinningPosition | 'center') => boolean;
|
|
1246
|
-
/**
|
|
1247
|
-
* Checks whether this column is the last visible column.
|
|
1248
|
-
*
|
|
1249
|
-
* Pass a pinned region to check the last column within that region.
|
|
1250
|
-
*/
|
|
1251
|
-
getIsLastColumn: (position?: ColumnPinningPosition | 'center') => boolean;
|
|
1252
|
-
}
|
|
1253
|
-
interface Table_ColumnOrdering<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
1254
|
-
/**
|
|
1255
|
-
* Builds column-id to index records for each visible pinning region.
|
|
1256
|
-
*
|
|
1257
|
-
* This is the memoized source that `column.getIndex` reads from; most apps
|
|
1258
|
-
* will not need to call it directly.
|
|
1259
|
-
*/
|
|
1260
|
-
getColumnIndexes: () => ColumnIndexes;
|
|
1261
|
-
/**
|
|
1262
|
-
* Resets `columnOrder` to `initialState.columnOrder`.
|
|
1263
|
-
*
|
|
1264
|
-
* Pass `true` to ignore initial state and reset to `[]`.
|
|
1265
|
-
*/
|
|
1266
|
-
resetColumnOrder: (defaultState?: boolean) => void;
|
|
1267
|
-
/**
|
|
1268
|
-
* Updates column order state with a next ordered id array or updater function.
|
|
1269
|
-
*/
|
|
1270
|
-
setColumnOrder: (updater: Updater<ColumnOrderState>) => void;
|
|
1271
|
-
}
|
|
1272
|
-
//#endregion
|
|
1273
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.types.d.ts
|
|
1274
|
-
//#region src/core/columns/coreColumnsFeature.types.d.ts
|
|
1275
|
-
interface Column_CoreProperties<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
1276
|
-
/**
|
|
1277
|
-
* The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.
|
|
1278
|
-
*/
|
|
1279
|
-
accessorFn?: AccessorFn<TData, TValue>;
|
|
1280
|
-
/**
|
|
1281
|
-
* The original column def used to create the column.
|
|
1282
|
-
*/
|
|
1283
|
-
columnDef: ColumnDef$2<TFeatures, TData, TValue>;
|
|
1284
|
-
/**
|
|
1285
|
-
* The child column (if the column is a group column). Will be an empty array if the column is not a group column.
|
|
1286
|
-
*/
|
|
1287
|
-
columns: Array<Column$2<TFeatures, TData, TValue>>;
|
|
1288
|
-
/**
|
|
1289
|
-
* The depth of the column (if grouped) relative to the root column def array.
|
|
1290
|
-
*/
|
|
1291
|
-
depth: number;
|
|
1292
|
-
/**
|
|
1293
|
-
* The resolved unique identifier for the column resolved in this priority:
|
|
1294
|
-
- A manual `id` property from the column def
|
|
1295
|
-
- The accessor key from the column def
|
|
1296
|
-
- The header string from the column def
|
|
1297
|
-
*/
|
|
1298
|
-
id: string;
|
|
1299
|
-
/**
|
|
1300
|
-
* The parent column for this column. Will be undefined if this is a root column.
|
|
1301
|
-
*/
|
|
1302
|
-
parent?: Column$2<TFeatures, TData, TValue>;
|
|
1303
|
-
/**
|
|
1304
|
-
* Reference to the parent table instance.
|
|
1305
|
-
*/
|
|
1306
|
-
table: Table<TFeatures, TData>;
|
|
1307
|
-
}
|
|
1308
|
-
interface Column_Column<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> extends Column_CoreProperties<TFeatures, TData, TValue> {
|
|
1309
|
-
/**
|
|
1310
|
-
* Flattens this column and every descendant column into a single array.
|
|
1311
|
-
*/
|
|
1312
|
-
getFlatColumns: () => Array<Column$2<TFeatures, TData, TValue>>;
|
|
1313
|
-
/**
|
|
1314
|
-
* Collects the terminal leaf columns below this column, or the column itself
|
|
1315
|
-
* when it has no children.
|
|
1316
|
-
*/
|
|
1317
|
-
getLeafColumns: () => Array<Column$2<TFeatures, TData, TValue>>;
|
|
1318
|
-
}
|
|
1319
|
-
interface TableOptions_Columns<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
1320
|
-
/**
|
|
1321
|
-
* The array of column defs to use for the table.
|
|
1322
|
-
*/
|
|
1323
|
-
columns: ReadonlyArray<ColumnDef$2<TFeatures, TData, TValue>>;
|
|
1324
|
-
/**
|
|
1325
|
-
* Default column options to use for all column defs supplied to the table.
|
|
1326
|
-
*/
|
|
1327
|
-
defaultColumn?: Partial<ColumnDef$2<TFeatures, TData, TValue>>;
|
|
1328
|
-
}
|
|
1329
|
-
interface Table_Columns<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1330
|
-
/**
|
|
1331
|
-
* Returns a map of all flat columns by their ID.
|
|
1332
|
-
*/
|
|
1333
|
-
getAllFlatColumnsById: () => Record<string, Column$2<TFeatures, TData, unknown>>;
|
|
1334
|
-
/**
|
|
1335
|
-
* Resolves built-in, feature-level, and user-defined default column options.
|
|
1336
|
-
*/
|
|
1337
|
-
getDefaultColumnDef: () => Partial<ColumnDef$2<TFeatures, TData, unknown>>;
|
|
1338
|
-
/**
|
|
1339
|
-
* Normalizes `options.columns` into the table's nested column hierarchy.
|
|
1340
|
-
*/
|
|
1341
|
-
getAllColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
1342
|
-
/**
|
|
1343
|
-
* Flattens the nested column hierarchy, including parent/group columns.
|
|
1344
|
-
*/
|
|
1345
|
-
getAllFlatColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
1346
|
-
/**
|
|
1347
|
-
* Collects all terminal leaf columns, excluding parent/group columns.
|
|
1348
|
-
*/
|
|
1349
|
-
getAllLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
1350
|
-
/**
|
|
1351
|
-
* Returns a map of all leaf-node columns by their ID. This does not include parent columns.
|
|
1352
|
-
*/
|
|
1353
|
-
getAllLeafColumnsById: () => Record<string, Column$2<TFeatures, TData, unknown>>;
|
|
1354
|
-
/**
|
|
1355
|
-
* Returns a single column by its ID.
|
|
1356
|
-
*/
|
|
1357
|
-
getColumn: (columnId: string) => Column$2<TFeatures, TData, unknown> | undefined;
|
|
1358
|
-
}
|
|
1359
|
-
//#endregion
|
|
1360
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.types.d.ts
|
|
1361
|
-
//#region src/features/column-visibility/columnVisibilityFeature.types.d.ts
|
|
1362
|
-
type ColumnVisibilityState = Record<string, boolean>;
|
|
1363
|
-
interface TableState_ColumnVisibility {
|
|
1364
|
-
columnVisibility: ColumnVisibilityState;
|
|
1365
|
-
}
|
|
1366
|
-
interface TableOptions_ColumnVisibility {
|
|
1367
|
-
/**
|
|
1368
|
-
* Whether to enable column hiding. Defaults to `true`.
|
|
1369
|
-
*/
|
|
1370
|
-
enableHiding?: boolean;
|
|
1371
|
-
/**
|
|
1372
|
-
* Called with an updater when column visibility state changes. Pair this with
|
|
1373
|
-
* `state.columnVisibility` when using external state; external atoms can own
|
|
1374
|
-
* the slice without this callback.
|
|
1375
|
-
*/
|
|
1376
|
-
onColumnVisibilityChange?: OnChangeFn<ColumnVisibilityState>;
|
|
1377
|
-
}
|
|
1378
|
-
interface Table_ColumnVisibility<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1379
|
-
/**
|
|
1380
|
-
* Checks whether every leaf column is currently visible.
|
|
1381
|
-
*/
|
|
1382
|
-
getIsAllColumnsVisible: () => boolean;
|
|
1383
|
-
/**
|
|
1384
|
-
* Checks whether at least one leaf column is currently visible.
|
|
1385
|
-
*/
|
|
1386
|
-
getIsSomeColumnsVisible: () => boolean;
|
|
1387
|
-
/**
|
|
1388
|
-
* Creates a checkbox-style handler that shows or hides all columns.
|
|
1389
|
-
*/
|
|
1390
|
-
getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void;
|
|
1391
|
-
/**
|
|
1392
|
-
* Lists visible columns in flat table order, including parent columns that
|
|
1393
|
-
* have visible descendants.
|
|
1394
|
-
*/
|
|
1395
|
-
getVisibleFlatColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
1396
|
-
/**
|
|
1397
|
-
* Lists visible leaf columns in the order used for row cells and headers.
|
|
1398
|
-
*/
|
|
1399
|
-
getVisibleLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
1400
|
-
/**
|
|
1401
|
-
* Resets `columnVisibility` to `initialState.columnVisibility`.
|
|
1402
|
-
*
|
|
1403
|
-
* Pass `true` to ignore initial state and reset to `{}`.
|
|
1404
|
-
*/
|
|
1405
|
-
resetColumnVisibility: (defaultState?: boolean) => void;
|
|
1406
|
-
/**
|
|
1407
|
-
* Updates column visibility state with a next map or updater function.
|
|
1408
|
-
*/
|
|
1409
|
-
setColumnVisibility: (updater: Updater<ColumnVisibilityState>) => void;
|
|
1410
|
-
/**
|
|
1411
|
-
* Toggles the visibility of all columns.
|
|
1412
|
-
*/
|
|
1413
|
-
toggleAllColumnsVisible: (value?: boolean) => void;
|
|
1414
|
-
}
|
|
1415
|
-
interface ColumnDef_ColumnVisibility {
|
|
1416
|
-
/**
|
|
1417
|
-
* Allows this column to be hidden. Defaults to `true`.
|
|
1418
|
-
*/
|
|
1419
|
-
enableHiding?: boolean;
|
|
1420
|
-
}
|
|
1421
|
-
interface Row_ColumnVisibility<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1422
|
-
/**
|
|
1423
|
-
* Gets this row's cells for currently visible columns.
|
|
1424
|
-
*/
|
|
1425
|
-
getVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>;
|
|
1426
|
-
/**
|
|
1427
|
-
* Maps this row's currently visible cells by column id.
|
|
1428
|
-
*/
|
|
1429
|
-
getVisibleCellsByColumnId: () => Record<string, Cell<TFeatures, TData, unknown>>;
|
|
1430
|
-
}
|
|
1431
|
-
interface Column_ColumnVisibility {
|
|
1432
|
-
/**
|
|
1433
|
-
* Checks whether this column is allowed to be hidden.
|
|
1434
|
-
*/
|
|
1435
|
-
getCanHide: () => boolean;
|
|
1436
|
-
/**
|
|
1437
|
-
* Checks whether this column is currently visible.
|
|
1438
|
-
*/
|
|
1439
|
-
getIsVisible: () => boolean;
|
|
1440
|
-
/**
|
|
1441
|
-
* Creates a checkbox-style handler that toggles this column's visibility.
|
|
1442
|
-
*/
|
|
1443
|
-
getToggleVisibilityHandler: () => (event: unknown) => void;
|
|
1444
|
-
/**
|
|
1445
|
-
* Toggles the visibility of the column.
|
|
1446
|
-
*/
|
|
1447
|
-
toggleVisibility: (value?: boolean) => void;
|
|
1448
|
-
}
|
|
1449
|
-
//#endregion
|
|
1450
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.types.d.ts
|
|
1451
|
-
//#region src/features/row-pinning/rowPinningFeature.types.d.ts
|
|
1452
|
-
type RowPinningPosition = false | 'top' | 'bottom';
|
|
1453
|
-
interface RowPinningState {
|
|
1454
|
-
bottom: Array<string>;
|
|
1455
|
-
top: Array<string>;
|
|
1456
|
-
}
|
|
1457
|
-
interface TableState_RowPinning {
|
|
1458
|
-
rowPinning: RowPinningState;
|
|
1459
|
-
}
|
|
1460
|
-
interface TableOptions_RowPinning<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1461
|
-
/**
|
|
1462
|
-
* Allows rows to be pinned to top or bottom regions.
|
|
1463
|
-
*
|
|
1464
|
-
* Provide a predicate to decide per row. Defaults to `true`.
|
|
1465
|
-
*/
|
|
1466
|
-
enableRowPinning?: boolean | ((row: Row<TFeatures, TData>) => boolean);
|
|
1467
|
-
/**
|
|
1468
|
-
* When `false`, pinned rows will not be visible if they are filtered or paginated out of the table. When `true`, pinned rows will always be visible regardless of filtering or pagination. Defaults to `true`.
|
|
1469
|
-
*/
|
|
1470
|
-
keepPinnedRows?: boolean;
|
|
1471
|
-
/**
|
|
1472
|
-
* Called with an updater when row pinning state changes. Pair this with
|
|
1473
|
-
* `state.rowPinning` when using external state; external atoms can own the
|
|
1474
|
-
* slice without this callback.
|
|
1475
|
-
*/
|
|
1476
|
-
onRowPinningChange?: OnChangeFn<RowPinningState>;
|
|
1477
|
-
}
|
|
1478
|
-
interface Row_RowPinning {
|
|
1479
|
-
/**
|
|
1480
|
-
* Checks whether this row can be pinned.
|
|
1481
|
-
*/
|
|
1482
|
-
getCanPin: () => boolean;
|
|
1483
|
-
/**
|
|
1484
|
-
* Returns the pinned position of the row. (`'top'`, `'bottom'` or `false`)
|
|
1485
|
-
*/
|
|
1486
|
-
getIsPinned: () => RowPinningPosition;
|
|
1487
|
-
/**
|
|
1488
|
-
* Returns the numeric pinned index of the row within a pinned row group.
|
|
1489
|
-
*/
|
|
1490
|
-
getPinnedIndex: () => number;
|
|
1491
|
-
/**
|
|
1492
|
-
* Pins a row to the `'top'` or `'bottom'`, or unpins the row to the center if `false` is passed.
|
|
1493
|
-
*/
|
|
1494
|
-
pin: (position: RowPinningPosition, includeLeafRows?: boolean, includeParentRows?: boolean) => void;
|
|
1495
|
-
}
|
|
1496
|
-
interface Table_RowPinning<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1497
|
-
/**
|
|
1498
|
-
* Gets rows pinned to the bottom region.
|
|
1499
|
-
*/
|
|
1500
|
-
getBottomRows: () => Array<Row<TFeatures, TData>>;
|
|
1501
|
-
/**
|
|
1502
|
-
* Gets rows that are not pinned to the top or bottom region.
|
|
1503
|
-
*/
|
|
1504
|
-
getCenterRows: () => Array<Row<TFeatures, TData>>;
|
|
1505
|
-
/**
|
|
1506
|
-
* Checks whether any rows are pinned, optionally limited to one region.
|
|
1507
|
-
*/
|
|
1508
|
-
getIsSomeRowsPinned: (position?: RowPinningPosition) => boolean;
|
|
1509
|
-
/**
|
|
1510
|
-
* Gets rows pinned to the top region.
|
|
1511
|
-
*/
|
|
1512
|
-
getTopRows: () => Array<Row<TFeatures, TData>>;
|
|
1513
|
-
/**
|
|
1514
|
-
* Resets `rowPinning` to `initialState.rowPinning`.
|
|
1515
|
-
*
|
|
1516
|
-
* Pass `true` to ignore initial state and reset to empty top/bottom arrays.
|
|
1517
|
-
*/
|
|
1518
|
-
resetRowPinning: (defaultState?: boolean) => void;
|
|
1519
|
-
/**
|
|
1520
|
-
* Updates row pinning state with a next state or updater function.
|
|
1521
|
-
*/
|
|
1522
|
-
setRowPinning: (updater: Updater<RowPinningState>) => void;
|
|
1523
|
-
}
|
|
1524
|
-
//#endregion
|
|
1525
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.types.d.ts
|
|
1526
|
-
//#region src/features/row-selection/rowSelectionFeature.types.d.ts
|
|
1527
|
-
type RowSelectionState = Record<string, true>;
|
|
1528
|
-
/**
|
|
1529
|
-
* Controls how toggling a row affects its descendants and ancestors.
|
|
1530
|
-
*/
|
|
1531
|
-
interface ToggleSelectedOptions {
|
|
1532
|
-
/**
|
|
1533
|
-
* Whether selectable child rows should be toggled recursively. Defaults to
|
|
1534
|
-
* `true`.
|
|
1535
|
-
*/
|
|
1536
|
-
selectChildren?: boolean;
|
|
1537
|
-
/**
|
|
1538
|
-
* Whether ancestor row ids should be removed from the selection when this
|
|
1539
|
-
* row is deselected. Useful after a parent cascade wrote the parent id into
|
|
1540
|
-
* state and a child is later deselected. Defaults to `false`.
|
|
1541
|
-
*
|
|
1542
|
-
* Ancestor ids are removed even when the ancestor itself cannot be selected.
|
|
1543
|
-
* Like the other targeted deselection paths, pruning is not gated by
|
|
1544
|
-
* `enableRowSelection`; only the bulk select-all paths preserve
|
|
1545
|
-
* non-selectable rows.
|
|
1546
|
-
*/
|
|
1547
|
-
deselectParents?: boolean;
|
|
1548
|
-
}
|
|
1549
|
-
interface TableState_RowSelection {
|
|
1550
|
-
rowSelection: RowSelectionState;
|
|
1551
|
-
}
|
|
1552
|
-
interface TableOptions_RowSelection<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1553
|
-
/**
|
|
1554
|
-
* Enables inclusive row range selection through
|
|
1555
|
-
* `row.getToggleSelectedHandler()`. Defaults to `true`.
|
|
1556
|
-
*/
|
|
1557
|
-
enableRowRangeSelection?: boolean;
|
|
1558
|
-
/**
|
|
1559
|
-
* Allows rows to be selected alongside other rows.
|
|
1560
|
-
*
|
|
1561
|
-
* Provide a predicate to decide per row. Defaults to `true`.
|
|
1562
|
-
*/
|
|
1563
|
-
enableMultiRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean);
|
|
1564
|
-
/**
|
|
1565
|
-
* Allows rows to be selected.
|
|
1566
|
-
*
|
|
1567
|
-
* Provide a predicate to decide per row. Defaults to `true`.
|
|
1568
|
-
*/
|
|
1569
|
-
enableRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean);
|
|
1570
|
-
/**
|
|
1571
|
-
* Controls whether selecting a parent row also selects its subRows.
|
|
1572
|
-
*
|
|
1573
|
-
* Provide a predicate to decide per row. This is most useful with expanding or
|
|
1574
|
-
* grouping features and defaults to `true`. Select-all and the all-selected
|
|
1575
|
-
* getters also skip descendants of parents that block sub-row selection.
|
|
1576
|
-
*/
|
|
1577
|
-
enableSubRowSelection?: boolean | ((row: Row<TFeatures, TData>) => boolean);
|
|
1578
|
-
/**
|
|
1579
|
-
* Determines whether a row-selection handler event should select or
|
|
1580
|
-
* deselect the inclusive range from the most recent handler interaction.
|
|
1581
|
-
*
|
|
1582
|
-
* By default, events with `shiftKey` directly on the event or on
|
|
1583
|
-
* `event.nativeEvent` are treated as range-selection events.
|
|
1584
|
-
*/
|
|
1585
|
-
isRowRangeSelectionEvent?: (event: unknown) => boolean;
|
|
1586
|
-
/**
|
|
1587
|
-
* Called with an updater when row selection state changes. Pair this with
|
|
1588
|
-
* `state.rowSelection` when using external state; external atoms can own the
|
|
1589
|
-
* slice without this callback.
|
|
1590
|
-
*/
|
|
1591
|
-
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
1592
|
-
}
|
|
1593
|
-
interface Row_RowSelection {
|
|
1594
|
-
/**
|
|
1595
|
-
* Checks whether this row can be selected alongside other rows.
|
|
1596
|
-
*/
|
|
1597
|
-
getCanMultiSelect: () => boolean;
|
|
1598
|
-
/**
|
|
1599
|
-
* Checks whether this row can currently be selected.
|
|
1600
|
-
*/
|
|
1601
|
-
getCanSelect: () => boolean;
|
|
1602
|
-
/**
|
|
1603
|
-
* Checks whether selecting this row should also select its subRows.
|
|
1604
|
-
*/
|
|
1605
|
-
getCanSelectSubRows: () => boolean;
|
|
1606
|
-
/**
|
|
1607
|
-
* Checks whether all selectable descendants are selected.
|
|
1608
|
-
*/
|
|
1609
|
-
getIsAllSubRowsSelected: () => boolean;
|
|
1610
|
-
/**
|
|
1611
|
-
* Checks whether this row id is selected.
|
|
1612
|
-
*/
|
|
1613
|
-
getIsSelected: () => boolean;
|
|
1614
|
-
/**
|
|
1615
|
-
* Checks whether some selectable descendants are selected.
|
|
1616
|
-
*/
|
|
1617
|
-
getIsSomeSelected: () => boolean;
|
|
1618
|
-
/**
|
|
1619
|
-
* Creates a checkbox-style handler that toggles this row's selected state.
|
|
1620
|
-
* Pass the original checkbox click event, or a framework event whose
|
|
1621
|
-
* `nativeEvent` is that click, so Shift range selection can detect the
|
|
1622
|
-
* modifier key.
|
|
1623
|
-
*/
|
|
1624
|
-
getToggleSelectedHandler: (opts?: ToggleSelectedOptions) => (event: unknown) => void;
|
|
1625
|
-
/**
|
|
1626
|
-
* Selects/deselects the row.
|
|
1627
|
-
*/
|
|
1628
|
-
toggleSelected: (value?: boolean, opts?: ToggleSelectedOptions) => void;
|
|
1629
|
-
}
|
|
1630
|
-
interface Table_RowSelection<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1631
|
-
/**
|
|
1632
|
-
* The most recent row interacted with through the row selection handler.
|
|
1633
|
-
*
|
|
1634
|
-
* @internal
|
|
1635
|
-
*/
|
|
1636
|
-
_lastSelectedRowId: string | null;
|
|
1637
|
-
/**
|
|
1638
|
-
* Builds a selected-row model from rows after filtering.
|
|
1639
|
-
*/
|
|
1640
|
-
getFilteredSelectedRowModel: () => RowModel<TFeatures, TData>;
|
|
1641
|
-
/**
|
|
1642
|
-
* Builds a selected-row model from rows after grouping.
|
|
1643
|
-
*/
|
|
1644
|
-
getGroupedSelectedRowModel: () => RowModel<TFeatures, TData>;
|
|
1645
|
-
/**
|
|
1646
|
-
* Returns the ids of all selected rows.
|
|
1647
|
-
*/
|
|
1648
|
-
getSelectedRowIds: () => Array<string>;
|
|
1649
|
-
/**
|
|
1650
|
-
* Checks whether every selectable row on the current page is selected.
|
|
1651
|
-
* Sub-rows whose ancestors block sub-row selection are ignored.
|
|
1652
|
-
*/
|
|
1653
|
-
getIsAllPageRowsSelected: () => boolean;
|
|
1654
|
-
/**
|
|
1655
|
-
* Checks whether every selectable filtered row is selected.
|
|
1656
|
-
* Sub-rows whose ancestors block sub-row selection are ignored.
|
|
1657
|
-
*/
|
|
1658
|
-
getIsAllRowsSelected: () => boolean;
|
|
1659
|
-
/**
|
|
1660
|
-
* Checks whether at least one selectable row on the current page is selected.
|
|
1661
|
-
*/
|
|
1662
|
-
getIsSomePageRowsSelected: () => boolean;
|
|
1663
|
-
/**
|
|
1664
|
-
* Checks whether at least one row id is selected.
|
|
1665
|
-
*/
|
|
1666
|
-
getIsSomeRowsSelected: () => boolean;
|
|
1667
|
-
/**
|
|
1668
|
-
* Returns the core row model of all rows before row selection has been applied.
|
|
1669
|
-
*/
|
|
1670
|
-
getPreSelectedRowModel: () => RowModel<TFeatures, TData>;
|
|
1671
|
-
/**
|
|
1672
|
-
* Builds a selected-row model from the core row model.
|
|
1673
|
-
*/
|
|
1674
|
-
getSelectedRowModel: () => RowModel<TFeatures, TData>;
|
|
1675
|
-
/**
|
|
1676
|
-
* Creates a checkbox-style handler that toggles all current-page rows.
|
|
1677
|
-
*/
|
|
1678
|
-
getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void;
|
|
1679
|
-
/**
|
|
1680
|
-
* Creates a checkbox-style handler that toggles all selectable rows.
|
|
1681
|
-
*/
|
|
1682
|
-
getToggleAllRowsSelectedHandler: () => (event: unknown) => void;
|
|
1683
|
-
/**
|
|
1684
|
-
* Resets `rowSelection` to `initialState.rowSelection`.
|
|
1685
|
-
*
|
|
1686
|
-
* Pass `true` to ignore initial state and reset to `{}`.
|
|
1687
|
-
*/
|
|
1688
|
-
resetRowSelection: (defaultState?: boolean) => void;
|
|
1689
|
-
/**
|
|
1690
|
-
* Updates row selection state with a next map or updater function.
|
|
1691
|
-
*/
|
|
1692
|
-
setRowSelection: (updater: Updater<RowSelectionState>) => void;
|
|
1693
|
-
/**
|
|
1694
|
-
* Selects/deselects all rows on the current page.
|
|
1695
|
-
*/
|
|
1696
|
-
toggleAllPageRowsSelected: (value?: boolean, opts?: {
|
|
1697
|
-
deselectAll?: boolean;
|
|
1698
|
-
}) => void;
|
|
1699
|
-
/**
|
|
1700
|
-
* Selects/deselects all rows in the table.
|
|
1701
|
-
*
|
|
1702
|
-
* Deselecting keeps rows that cannot be selected in the selection map unless
|
|
1703
|
-
* `opts.deselectAll` is `true`.
|
|
1704
|
-
*/
|
|
1705
|
-
toggleAllRowsSelected: (value?: boolean, opts?: {
|
|
1706
|
-
deselectAll?: boolean;
|
|
1707
|
-
}) => void;
|
|
1708
|
-
}
|
|
1709
|
-
//#endregion
|
|
1710
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.types.d.ts
|
|
1711
|
-
//#region src/core/rows/coreRowsFeature.types.d.ts
|
|
1712
|
-
interface Row_CoreProperties<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1713
|
-
_cellsCache?: WeakMap<Column$2<TFeatures, TData, unknown>, Cell<TFeatures, TData, unknown>>;
|
|
1714
|
-
/**
|
|
1715
|
-
* Internal cache used while resolving the current display order.
|
|
1716
|
-
*
|
|
1717
|
-
* This value may be stale until display order is recomputed. Use
|
|
1718
|
-
* `row.getDisplayIndex()` instead; it refreshes and validates the cached
|
|
1719
|
-
* position before returning it.
|
|
1720
|
-
*
|
|
1721
|
-
* @internal
|
|
1722
|
-
*/
|
|
1723
|
-
_displayIndexCache: number;
|
|
1724
|
-
_uniqueValuesCache: Record<string, unknown>;
|
|
1725
|
-
_valuesCache: Record<string, unknown>;
|
|
1726
|
-
/**
|
|
1727
|
-
* The depth of the row (if nested or grouped) relative to the root row array.
|
|
1728
|
-
*/
|
|
1729
|
-
depth: number;
|
|
1730
|
-
/**
|
|
1731
|
-
* The resolved unique identifier for the row resolved via the `options.getRowId` option. Defaults to the row's index (or relative index if it is a subRow).
|
|
1732
|
-
*/
|
|
1733
|
-
id: string;
|
|
1734
|
-
/**
|
|
1735
|
-
* The index of the row within its parent array (or the root data array).
|
|
1736
|
-
*/
|
|
1737
|
-
index: number;
|
|
1738
|
-
/**
|
|
1739
|
-
* The original row object provided to the table. If the row is a grouped row, the original row object will be the first original in the group.
|
|
1740
|
-
*/
|
|
1741
|
-
original: TData;
|
|
1742
|
-
/**
|
|
1743
|
-
* An array of the original subRows as returned by the `options.getSubRows` option.
|
|
1744
|
-
*/
|
|
1745
|
-
originalSubRows?: ReadonlyArray<TData>;
|
|
1746
|
-
/**
|
|
1747
|
-
* If nested, this row's parent row id.
|
|
1748
|
-
*/
|
|
1749
|
-
parentId?: string;
|
|
1750
|
-
/**
|
|
1751
|
-
* An array of subRows for the row as returned and created by the `options.getSubRows` option.
|
|
1752
|
-
*/
|
|
1753
|
-
subRows: Array<Row<TFeatures, TData>>;
|
|
1754
|
-
/**
|
|
1755
|
-
* Reference to the parent table instance.
|
|
1756
|
-
*/
|
|
1757
|
-
table: Table<TFeatures, TData>;
|
|
1758
|
-
}
|
|
1759
|
-
interface Row_Row<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends Row_CoreProperties<TFeatures, TData> {
|
|
1760
|
-
/**
|
|
1761
|
-
* Returns the zero-based index of the row in the current display order
|
|
1762
|
-
* before pagination, or `-1` if the row is not in that model. Use this for
|
|
1763
|
-
* display row-number columns instead of `row.index` or the internal
|
|
1764
|
-
* `_displayIndexCache` field.
|
|
1765
|
-
*/
|
|
1766
|
-
getDisplayIndex: () => number;
|
|
1767
|
-
/**
|
|
1768
|
-
* Builds a lookup of this row's cells keyed by leaf column id.
|
|
1769
|
-
*/
|
|
1770
|
-
getAllCellsByColumnId: () => Record<string, Cell<TFeatures, TData, unknown>>;
|
|
1771
|
-
/**
|
|
1772
|
-
* Builds one cell for each leaf column, including cells for hidden columns.
|
|
1773
|
-
*/
|
|
1774
|
-
getAllCells: () => Array<Cell<TFeatures, TData, unknown>>;
|
|
1775
|
-
/**
|
|
1776
|
-
* Returns the leaf rows for the row, not including any parent rows.
|
|
1777
|
-
*/
|
|
1778
|
-
getLeafRows: () => Array<Row<TFeatures, TData>>;
|
|
1779
|
-
/**
|
|
1780
|
-
* Returns the parent row for the row, if it exists.
|
|
1781
|
-
*/
|
|
1782
|
-
getParentRow: () => Row<TFeatures, TData> | undefined;
|
|
1783
|
-
/**
|
|
1784
|
-
* Returns the parent rows for the row, all the way up to a root row.
|
|
1785
|
-
*/
|
|
1786
|
-
getParentRows: () => Array<Row<TFeatures, TData>>;
|
|
1787
|
-
/**
|
|
1788
|
-
* Reads the values this row contributes to faceting/grouping for a column.
|
|
1789
|
-
*/
|
|
1790
|
-
getUniqueValues: <TValue>(columnId: string) => Array<TValue>;
|
|
1791
|
-
/**
|
|
1792
|
-
* Reads this row's accessor value for a column id and caches the result.
|
|
1793
|
-
*/
|
|
1794
|
-
getValue: <TValue>(columnId: string) => TValue;
|
|
1795
|
-
/**
|
|
1796
|
-
* Renders the value for the row in a given columnId the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
1797
|
-
*/
|
|
1798
|
-
renderValue: <TValue>(columnId: string) => TValue;
|
|
1799
|
-
}
|
|
1800
|
-
interface TableOptions_Rows<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1801
|
-
/**
|
|
1802
|
-
* This optional function is used to derive a unique ID for any given row. If not provided the row's index is used (nested rows join together with `.` using their grandparents' index e.g. `index.index.index`). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity e.g. a userId, taskId, database ID field, etc.
|
|
1803
|
-
* @example getRowId: row => row.userId
|
|
1804
|
-
*/
|
|
1805
|
-
getRowId?: (originalRow: TData, index: number, parent?: Row<TFeatures, TData>) => string;
|
|
1806
|
-
/**
|
|
1807
|
-
* This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.
|
|
1808
|
-
* @example getSubRows: row => row.subRows
|
|
1809
|
-
*/
|
|
1810
|
-
getSubRows?: (originalRow: TData, index: number) => undefined | ReadonlyArray<TData>;
|
|
1811
|
-
}
|
|
1812
|
-
interface Table_Rows<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1813
|
-
/**
|
|
1814
|
-
* Returns the deepest structural row depth in the core row model.
|
|
1815
|
-
* Root rows are depth `0`, direct sub-rows are depth `1`, and so on.
|
|
1816
|
-
*/
|
|
1817
|
-
getMaxSubRowDepth: () => number;
|
|
1818
|
-
/**
|
|
1819
|
-
* Returns the rows in the current display order and assigns their display
|
|
1820
|
-
* indexes. When expanded rows bypass pagination, expanded descendants are
|
|
1821
|
-
* included in this order. This is the memoized source for
|
|
1822
|
-
* `row.getDisplayIndex()`.
|
|
1823
|
-
*/
|
|
1824
|
-
getRowsInDisplayOrder: () => Array<Row<TFeatures, TData>>;
|
|
1825
|
-
/**
|
|
1826
|
-
* Returns the row id for a given row.
|
|
1827
|
-
*/
|
|
1828
|
-
getRowId: (_: TData, index: number, parent?: Row<TFeatures, TData>) => string;
|
|
1829
|
-
/**
|
|
1830
|
-
* Returns the row with the given ID.
|
|
1831
|
-
*/
|
|
1832
|
-
getRow: (id: string, searchAll?: boolean) => Row<TFeatures, TData>;
|
|
1833
|
-
}
|
|
1834
|
-
//#endregion
|
|
1835
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/RowModel.d.ts
|
|
1836
|
-
//#region src/types/RowModel.d.ts
|
|
1837
|
-
interface CachedRowModels_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1838
|
-
columnFacetingFeature: CachedRowModel_Faceted<TFeatures, TData>;
|
|
1839
|
-
columnFilteringFeature: CachedRowModel_Filtered<TFeatures, TData>;
|
|
1840
|
-
rowExpandingFeature: CachedRowModel_Expanded<TFeatures, TData>;
|
|
1841
|
-
columnGroupingFeature: CachedRowModel_Grouped<TFeatures, TData>;
|
|
1842
|
-
rowPaginationFeature: CachedRowModel_Paginated<TFeatures, TData>;
|
|
1843
|
-
rowSortingFeature: CachedRowModel_Sorted<TFeatures, TData>;
|
|
1844
|
-
}
|
|
1845
|
-
type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData$2> = Partial<CachedRowModel_Core<TFeatures, TData>> & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
|
|
1846
|
-
//#endregion
|
|
1847
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/RowModelFns.d.ts
|
|
1848
|
-
interface RowModelFns_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1849
|
-
rowAggregationFeature: RowModelFns_RowAggregation<TFeatures, TData>;
|
|
1850
|
-
columnFilteringFeature: RowModelFns_ColumnFiltering<TFeatures, TData>;
|
|
1851
|
-
rowSortingFeature: RowModelFns_RowSorting<TFeatures, TData>;
|
|
1852
|
-
}
|
|
1853
|
-
type RowModelFns<TFeatures extends TableFeatures, TData extends RowData$2> = Partial<ExtractFeatureMapTypes<TFeatures, RowModelFns_FeatureMap<TFeatures, TData>>>;
|
|
1854
|
-
//#endregion
|
|
1855
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/TableState.d.ts
|
|
1856
|
-
//#region src/types/TableState.d.ts
|
|
1857
|
-
interface TableState_FeatureMap {
|
|
1858
|
-
cellSelectionFeature: TableState_CellSelection;
|
|
1859
|
-
columnFilteringFeature: TableState_ColumnFiltering;
|
|
1860
|
-
columnGroupingFeature: TableState_ColumnGrouping;
|
|
1861
|
-
columnOrderingFeature: TableState_ColumnOrdering;
|
|
1862
|
-
columnPinningFeature: TableState_ColumnPinning;
|
|
1863
|
-
columnResizingFeature: TableState_ColumnResizing;
|
|
1864
|
-
columnSizingFeature: TableState_ColumnSizing;
|
|
1865
|
-
columnVisibilityFeature: TableState_ColumnVisibility;
|
|
1866
|
-
globalFilteringFeature: TableState_GlobalFiltering;
|
|
1867
|
-
rowExpandingFeature: TableState_RowExpanding;
|
|
1868
|
-
rowPaginationFeature: TableState_RowPagination;
|
|
1869
|
-
rowPinningFeature: TableState_RowPinning;
|
|
1870
|
-
rowSelectionFeature: TableState_RowSelection;
|
|
1871
|
-
rowSortingFeature: TableState_RowSorting;
|
|
1872
|
-
}
|
|
1873
|
-
/**
|
|
1874
|
-
* Complete table state for a specific feature set.
|
|
1875
|
-
*
|
|
1876
|
-
* State slices are included only when their feature is present in `TFeatures`,
|
|
1877
|
-
* then custom feature/plugin state is mixed in.
|
|
1878
|
-
*/
|
|
1879
|
-
type TableState<TFeatures extends TableFeatures> = ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>;
|
|
1880
|
-
/**
|
|
1881
|
-
* Internal broad state shape containing every registered feature state slice.
|
|
1882
|
-
*
|
|
1883
|
-
* Feature internals use this when they may need to inspect optional slices owned
|
|
1884
|
-
* by other features.
|
|
1885
|
-
*/
|
|
1886
|
-
interface TableState_All extends Partial<TableState_CellSelection & TableState_ColumnFiltering & TableState_ColumnGrouping & TableState_ColumnOrdering & TableState_ColumnPinning & TableState_ColumnResizing & TableState_ColumnSizing & TableState_ColumnVisibility & TableState_GlobalFiltering & TableState_RowExpanding & TableState_RowPagination & TableState_RowPinning & TableState_RowSelection & TableState_RowSorting> {}
|
|
1887
|
-
//#endregion
|
|
1888
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.types.d.ts
|
|
1889
|
-
//#region src/features/cell-spanning/cellSpanningFeature.types.d.ts
|
|
1890
|
-
/**
|
|
1891
|
-
* The table's cell span index for the rows that are currently rendered.
|
|
1892
|
-
*
|
|
1893
|
-
* Cell APIs read this; it is exposed for devtools and for virtualizers that
|
|
1894
|
-
* need to know where a run's anchor sits relative to the rendered window.
|
|
1895
|
-
*/
|
|
1896
|
-
interface CellSpanIndex<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
1897
|
-
/**
|
|
1898
|
-
* Column spans per render-order row position, indexed by render-order column
|
|
1899
|
-
* position. Holes are the common case: only rows that declared a column span
|
|
1900
|
-
* get an array. In a stored array, the spanning cell holds its span and the
|
|
1901
|
-
* cells it covers hold `0`; every other cell holds `1`.
|
|
1902
|
-
*/
|
|
1903
|
-
colSpans: Array<Int32Array | undefined>;
|
|
1904
|
-
/**
|
|
1905
|
-
* Render-order index for every visible column id. Hidden columns are absent.
|
|
1906
|
-
*/
|
|
1907
|
-
columnIndexes: Record<string, number>;
|
|
1908
|
-
/**
|
|
1909
|
-
* Row spans per column id, indexed by render-order row position. Only columns
|
|
1910
|
-
* that produced at least one run longer than one row appear here; a missing
|
|
1911
|
-
* column means every cell in it spans exactly one row. In a stored array, the
|
|
1912
|
-
* run's anchor row holds the run length and the rows it covers hold `0`.
|
|
1913
|
-
*/
|
|
1914
|
-
rowSpans: Record<string, Int32Array>;
|
|
1915
|
-
/**
|
|
1916
|
-
* The exact ordered rows this index was built from, in render order:
|
|
1917
|
-
* top-pinned rows, then the (paginated) center rows, then bottom-pinned
|
|
1918
|
-
* rows. Cell reads compare against this to reject stale row positions.
|
|
1919
|
-
*/
|
|
1920
|
-
rows: ReadonlyArray<Row<TFeatures, TData>>;
|
|
1921
|
-
}
|
|
1922
|
-
/**
|
|
1923
|
-
* Context passed to a `spanRows` predicate for each candidate row.
|
|
1924
|
-
*
|
|
1925
|
-
* The run is anchored: `anchorRow` is the row whose cell will render the
|
|
1926
|
-
* merged content, and every later row in the run is tested against it, which
|
|
1927
|
-
* keeps runs transitive by construction. `previousRow` is provided for
|
|
1928
|
-
* predicates that want a step-wise comparison instead.
|
|
1929
|
-
*/
|
|
1930
|
-
interface RowSpanContext<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
1931
|
-
anchorRow: Row<TFeatures, TData>;
|
|
1932
|
-
anchorValue: TValue;
|
|
1933
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
1934
|
-
previousRow: Row<TFeatures, TData>;
|
|
1935
|
-
row: Row<TFeatures, TData>;
|
|
1936
|
-
table: Table<TFeatures, TData>;
|
|
1937
|
-
value: TValue;
|
|
1938
|
-
}
|
|
1939
|
-
/**
|
|
1940
|
-
* Context passed to a `spanColumns` resolver for each rendered row.
|
|
1941
|
-
*/
|
|
1942
|
-
interface ColSpanContext<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
1943
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
1944
|
-
row: Row<TFeatures, TData>;
|
|
1945
|
-
table: Table<TFeatures, TData>;
|
|
1946
|
-
}
|
|
1947
|
-
interface ColumnDef_CellSpanning<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
1948
|
-
/**
|
|
1949
|
-
* Turns this column off for cell spanning even when the table allows it.
|
|
1950
|
-
* Defaults to `true`.
|
|
1951
|
-
*/
|
|
1952
|
-
enableCellSpanning?: boolean;
|
|
1953
|
-
/**
|
|
1954
|
-
* Makes this column's cell span the given number of columns per row,
|
|
1955
|
-
* starting at itself and counted in the order columns actually render.
|
|
1956
|
-
*
|
|
1957
|
-
* Return `1` or less for no span. Larger values are clamped to the end of
|
|
1958
|
-
* the cell's pinned region, so a span can never cross the start-pinned,
|
|
1959
|
-
* center, or end-pinned boundary; pass `Infinity` for "the rest of my
|
|
1960
|
-
* region". Hidden columns are not counted.
|
|
1961
|
-
*
|
|
1962
|
-
* @example
|
|
1963
|
-
* ```ts
|
|
1964
|
-
* { accessorKey: 'label', spanColumns: ({ row }) => row.original.isSummary ? Infinity : 1 }
|
|
1965
|
-
* ```
|
|
1966
|
-
*/
|
|
1967
|
-
spanColumns?: number | ((context: ColSpanContext<TFeatures, TData, TValue>) => number);
|
|
1968
|
-
/**
|
|
1969
|
-
* Merges adjacent rows in this column into a single vertically spanning
|
|
1970
|
-
* cell.
|
|
1971
|
-
*
|
|
1972
|
-
* `true` merges rows whose values for this column are the same value
|
|
1973
|
-
* (`Object.is`). Nullish values never merge under the default comparison.
|
|
1974
|
-
*
|
|
1975
|
-
* A predicate replaces the comparison entirely and decides whether `row`
|
|
1976
|
-
* joins the run anchored at `anchorRow`; it may merge nullish values. It is
|
|
1977
|
-
* called once per candidate row each time the span index rebuilds, and each
|
|
1978
|
-
* call allocates one context object, so keep it cheap.
|
|
1979
|
-
*
|
|
1980
|
-
* Spans are always recomputed from the rows that are actually rendered, so
|
|
1981
|
-
* sorting, filtering, and paging only change which rows are adjacent. Runs
|
|
1982
|
-
* never cross a page boundary, a pinned-row section boundary, a change of
|
|
1983
|
-
* position in the row tree, or a grouped row. Ignored while this column is
|
|
1984
|
-
* grouped.
|
|
1985
|
-
*
|
|
1986
|
-
* @example
|
|
1987
|
-
* ```ts
|
|
1988
|
-
* { accessorKey: 'department', spanRows: true }
|
|
1989
|
-
* ```
|
|
1990
|
-
*/
|
|
1991
|
-
spanRows?: boolean | ((context: RowSpanContext<TFeatures, TData, TValue>) => boolean);
|
|
1992
|
-
}
|
|
1993
|
-
interface TableOptions_CellSpanning {
|
|
1994
|
-
/**
|
|
1995
|
-
* Allows cells to span rows or columns. When `false` every cell reports a
|
|
1996
|
-
* span of `1` and the span index is never built. Defaults to `true`.
|
|
1997
|
-
*/
|
|
1998
|
-
enableCellSpanning?: boolean;
|
|
1999
|
-
}
|
|
2000
|
-
interface Cell_CellSpanning {
|
|
2001
|
-
/**
|
|
2002
|
-
* Number of columns this cell spans when rendered. `1` when it does not
|
|
2003
|
-
* span, and `0` when another cell's column span covers it.
|
|
2004
|
-
*
|
|
2005
|
-
* Never render a `0` as a `colSpan` attribute; skip the cell instead. See
|
|
2006
|
-
* `getIsCovered`.
|
|
2007
|
-
*/
|
|
2008
|
-
getColSpan: () => number;
|
|
2009
|
-
/**
|
|
2010
|
-
* Whether another cell's span covers this cell. Skip rendering covered
|
|
2011
|
-
* cells; the cell that covers them carries the content and the span
|
|
2012
|
-
* attributes.
|
|
2013
|
-
*/
|
|
2014
|
-
getIsCovered: () => boolean;
|
|
2015
|
-
/**
|
|
2016
|
-
* Number of rows this cell spans when rendered. `1` when it does not span,
|
|
2017
|
-
* and `0` when a spanning cell above it covers it, matching the
|
|
2018
|
-
* `header.rowSpan` convention.
|
|
2019
|
-
*
|
|
2020
|
-
* Never render a `0` as a `rowSpan` attribute: in HTML, `rowspan="0"` means
|
|
2021
|
-
* "span to the end of the row group", which merges the cell down the entire
|
|
2022
|
-
* table section. Skip the cell instead. See `getIsCovered`.
|
|
2023
|
-
*/
|
|
2024
|
-
getRowSpan: () => number;
|
|
2025
|
-
}
|
|
2026
|
-
interface Table_CellSpanning<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2027
|
-
/**
|
|
2028
|
-
* The memoized span index for the rows that are currently rendered.
|
|
2029
|
-
*/
|
|
2030
|
-
getCellSpanIndex: () => CellSpanIndex<TFeatures, TData>;
|
|
2031
|
-
}
|
|
2032
|
-
//#endregion
|
|
2033
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/TableOptions.d.ts
|
|
2034
|
-
//#region src/types/TableOptions.d.ts
|
|
2035
|
-
/**
|
|
2036
|
-
* Core options that are always available on a table, before optional feature
|
|
2037
|
-
* options are mixed in.
|
|
2038
|
-
*/
|
|
2039
|
-
interface TableOptions_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends TableOptions_Table<TFeatures, TData>, TableOptions_Cell, TableOptions_Columns<TFeatures, TData>, TableOptions_Rows<TFeatures, TData> {}
|
|
2040
|
-
type DebugKeysFor<TFeatures extends TableFeatures> = { [K in Exclude<keyof TFeatures & string, NonFeatureKeys> as `debug${Capitalize<K>}`]?: boolean; };
|
|
2041
|
-
type DebugOptions<TFeatures extends TableFeatures> = {
|
|
2042
|
-
debugAll?: boolean;
|
|
2043
|
-
debugCache?: boolean;
|
|
2044
|
-
debugCells?: boolean;
|
|
2045
|
-
debugColumns?: boolean;
|
|
2046
|
-
debugHeaders?: boolean;
|
|
2047
|
-
debugRows?: boolean;
|
|
2048
|
-
debugTable?: boolean;
|
|
2049
|
-
} & DebugKeysFor<CoreFeatures & TFeatures>;
|
|
2050
|
-
interface TableOptions_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2051
|
-
cellSelectionFeature: TableOptions_CellSelection<TFeatures, TData>;
|
|
2052
|
-
cellSpanningFeature: TableOptions_CellSpanning;
|
|
2053
|
-
columnFilteringFeature: TableOptions_ColumnFiltering<TFeatures, TData>;
|
|
2054
|
-
columnGroupingFeature: TableOptions_ColumnGrouping;
|
|
2055
|
-
columnOrderingFeature: TableOptions_ColumnOrdering;
|
|
2056
|
-
columnPinningFeature: TableOptions_ColumnPinning;
|
|
2057
|
-
columnResizingFeature: TableOptions_ColumnResizing;
|
|
2058
|
-
columnSizingFeature: TableOptions_ColumnSizing;
|
|
2059
|
-
columnVisibilityFeature: TableOptions_ColumnVisibility;
|
|
2060
|
-
globalFilteringFeature: TableOptions_GlobalFiltering<TFeatures, TData>;
|
|
2061
|
-
rowAggregationFeature: TableOptions_RowAggregation;
|
|
2062
|
-
rowExpandingFeature: TableOptions_RowExpanding<TFeatures, TData>;
|
|
2063
|
-
rowPaginationFeature: TableOptions_RowPagination;
|
|
2064
|
-
rowPinningFeature: TableOptions_RowPinning<TFeatures, TData>;
|
|
2065
|
-
rowSelectionFeature: TableOptions_RowSelection<TFeatures, TData>;
|
|
2066
|
-
rowSortingFeature: TableOptions_RowSorting;
|
|
2067
|
-
}
|
|
2068
|
-
type TableOptions_StockFeatureKeys = 'cellSelectionFeature' | 'cellSpanningFeature' | 'columnFilteringFeature' | 'columnGroupingFeature' | 'columnOrderingFeature' | 'columnPinningFeature' | 'columnResizingFeature' | 'columnSizingFeature' | 'columnVisibilityFeature' | 'globalFilteringFeature' | 'rowAggregationFeature' | 'rowExpandingFeature' | 'rowPaginationFeature' | 'rowPinningFeature' | 'rowSelectionFeature' | 'rowSortingFeature';
|
|
2069
|
-
/**
|
|
2070
|
-
* Plugin entries declaration-merged into `TableOptions_FeatureMap`, i.e. keys
|
|
2071
|
-
* beyond the stock set. Resolves to `unknown` (an intersection no-op) when no
|
|
2072
|
-
* plugins are merged so the common case skips the union-to-intersection work.
|
|
2073
|
-
*/
|
|
2074
|
-
type TableOptions_PluginFeatureMapTypes<TFeatures extends TableFeatures, TData extends RowData$2> = [Exclude<keyof TableOptions_FeatureMap<TFeatures, TData>, TableOptions_StockFeatureKeys>] extends [never] ? unknown : UnionToIntersection<TableOptions_FeatureMap<TFeatures, TData>[Exclude<keyof TableOptions_FeatureMap<TFeatures, TData>, TableOptions_StockFeatureKeys>]>;
|
|
2075
|
-
/**
|
|
2076
|
-
* Complete table options for a specific feature set.
|
|
2077
|
-
*
|
|
2078
|
-
* Feature options are included only when their feature is present in
|
|
2079
|
-
* `TFeatures`, then custom feature/plugin options and debug options are mixed
|
|
2080
|
-
* in.
|
|
2081
|
-
*/
|
|
2082
|
-
type TableOptions<TFeatures extends TableFeatures, TData extends RowData$2> = TableOptions_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, TableOptions_FeatureMap<TFeatures, TData>> & DebugOptions<TFeatures>;
|
|
2083
|
-
/**
|
|
2084
|
-
* Internal broad option shape used where feature code may need to read options
|
|
2085
|
-
* from features that are not present in the current generic feature set.
|
|
2086
|
-
*/
|
|
2087
|
-
type TableOptions_All<TFeatures extends TableFeatures, TData extends RowData$2> = TableOptions_Core<TFeatures, TData> & Partial<TableOptions_RowAggregation & TableOptions_CellSelection<TFeatures, TData> & TableOptions_CellSpanning & TableOptions_ColumnFiltering<TFeatures, TData> & TableOptions_ColumnGrouping & TableOptions_ColumnOrdering & TableOptions_ColumnPinning & TableOptions_ColumnResizing & TableOptions_ColumnSizing & TableOptions_ColumnVisibility & TableOptions_GlobalFiltering<TFeatures, TData> & TableOptions_RowExpanding<TFeatures, TData> & TableOptions_RowPagination & TableOptions_RowPinning<TFeatures, TData> & TableOptions_RowSelection<TFeatures, TData> & TableOptions_RowSorting & TableOptions_PluginFeatureMapTypes<TFeatures, TData>>;
|
|
2088
|
-
//#endregion
|
|
2089
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/table/coreTablesFeature.types.d.ts
|
|
2090
|
-
//#region src/core/table/coreTablesFeature.types.d.ts
|
|
2091
|
-
interface TableMeta<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {}
|
|
2092
|
-
/**
|
|
2093
|
-
* Resolves the type of `options.meta` for a feature set.
|
|
2094
|
-
*
|
|
2095
|
-
* When the features object declares a `tableMeta` type-only slot
|
|
2096
|
-
* (`tableFeatures({ ..., tableMeta: {} as MyTableMeta })`), that type wins.
|
|
2097
|
-
* Otherwise this falls back to the global declaration-merged `TableMeta`
|
|
2098
|
-
* interface.
|
|
2099
|
-
*/
|
|
2100
|
-
type ExtractTableMeta<TFeatures extends TableFeatures, TData extends RowData$2> = IsAny<TFeatures> extends true ? TableMeta<TFeatures, TData> : TFeatures extends {
|
|
2101
|
-
tableMeta: infer TMeta extends object;
|
|
2102
|
-
} ? TMeta : TableMeta<TFeatures, TData>;
|
|
2103
|
-
/**
|
|
2104
|
-
* A map of writable atoms, one per `TableState` slice. These are the internal
|
|
2105
|
-
* writable atoms that the library always writes to via `makeStateUpdater`.
|
|
2106
|
-
*/
|
|
2107
|
-
type BaseAtoms<TFeatures extends TableFeatures> = { [K in keyof TableState<TFeatures>]-?: Atom<TableState<TFeatures>[K]>; };
|
|
2108
|
-
/**
|
|
2109
|
-
* A map of readonly derived atoms, one per `TableState` slice. Each derives
|
|
2110
|
-
* from its corresponding `baseAtom` plus, optionally, a per-slice external
|
|
2111
|
-
* atom or external state value.
|
|
2112
|
-
*
|
|
2113
|
-
* Precedence: `options.atoms[key]` > `options.state[key]` > `baseAtoms[key]`.
|
|
2114
|
-
*/
|
|
2115
|
-
type Atoms<TFeatures extends TableFeatures> = { [K in keyof TableState<TFeatures>]-?: ReadonlyAtom<TableState<TFeatures>[K]>; };
|
|
2116
|
-
/**
|
|
2117
|
-
* A map of optional external atoms, one per `TableState` slice. Consumers can
|
|
2118
|
-
* provide their own writable atom for any state slice to take over ownership
|
|
2119
|
-
* of that slice.
|
|
2120
|
-
*/
|
|
2121
|
-
type ExternalAtoms<TFeatures extends TableFeatures> = Partial<{ [K in keyof TableState<TFeatures>]: Atom<TableState<TFeatures>[K]>; }>;
|
|
2122
|
-
interface TableOptions_Table<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2123
|
-
/**
|
|
2124
|
-
* The feature modules registered on this table instance.
|
|
2125
|
-
*
|
|
2126
|
-
* Feature registration controls which state slices, options, and prototype
|
|
2127
|
-
* APIs are available. This object also carries the table's row model
|
|
2128
|
-
* factories (`sortedRowModel`, `filteredRowModel`, etc.), row model function
|
|
2129
|
-
* registries (`sortFns`, `filterFns`, `aggregationFns`), and type-only meta
|
|
2130
|
-
* slots (`tableMeta`, `columnMeta`).
|
|
2131
|
-
*/
|
|
2132
|
-
readonly features: TFeatures & ValidateFeatureSlots<TFeatures>;
|
|
2133
|
-
/**
|
|
2134
|
-
* Optionally, provide your own external writable atoms for individual state slices.
|
|
2135
|
-
* When an atom is provided for a given slice, it takes precedence over `options.state[key]`
|
|
2136
|
-
* and the internal base atom for that slice. Feature state update APIs write through
|
|
2137
|
-
* the corresponding atom updater, so external atoms are the preferred v9 ownership
|
|
2138
|
-
* model for app-managed table state slices.
|
|
2139
|
-
*/
|
|
2140
|
-
readonly atoms?: ExternalAtoms<TFeatures>;
|
|
2141
|
-
/**
|
|
2142
|
-
* Set this option to override any of the `autoReset...` feature options.
|
|
2143
|
-
*/
|
|
2144
|
-
readonly autoResetAll?: boolean;
|
|
2145
|
-
/**
|
|
2146
|
-
* The data for the table to display. When the `data` option changes reference, the table will reprocess the data.
|
|
2147
|
-
*/
|
|
2148
|
-
readonly data: ReadonlyArray<TData>;
|
|
2149
|
-
/**
|
|
2150
|
-
* Optional key used to identify this table instance.
|
|
2151
|
-
*
|
|
2152
|
-
* This is used by TanStack Table Devtools to register and select tables. It is
|
|
2153
|
-
* not required unless the table is passed to devtools.
|
|
2154
|
-
*/
|
|
2155
|
-
readonly key?: string;
|
|
2156
|
-
/**
|
|
2157
|
-
* Optionally provide starting values for registered table state slices.
|
|
2158
|
-
* Feature reset APIs use this value by default, and many reset APIs accept
|
|
2159
|
-
* `true` to reset to that feature's blank/default state instead. Changing this
|
|
2160
|
-
* object later does not reset table state, so it does not need to be stable.
|
|
2161
|
-
*/
|
|
2162
|
-
readonly initialState?: Partial<TableState<TFeatures>>;
|
|
2163
|
-
/**
|
|
2164
|
-
* This option is used to optionally implement the merging of table options.
|
|
2165
|
-
*/
|
|
2166
|
-
readonly mergeOptions?: (defaultOptions: TableOptions<TFeatures, TData>, options: Partial<TableOptions<TFeatures, TData>>) => TableOptions<TFeatures, TData>;
|
|
2167
|
-
/**
|
|
2168
|
-
* You can pass any object to `options.meta` and access it anywhere the `table` is available via `table.options.meta`.
|
|
2169
|
-
*
|
|
2170
|
-
* Declare its type per-table via the `tableMeta` type-only slot on the
|
|
2171
|
-
* `features` option, or globally via declaration merging on `TableMeta`.
|
|
2172
|
-
*/
|
|
2173
|
-
readonly meta?: ExtractTableMeta<TFeatures, TData>;
|
|
2174
|
-
/**
|
|
2175
|
-
* Optionally provide externally managed values for individual state slices.
|
|
2176
|
-
*
|
|
2177
|
-
* Pair each slice with its matching `on[State]Change` callback so table state
|
|
2178
|
-
* updates can be persisted outside the table. External atoms take precedence
|
|
2179
|
-
* over this option when both are provided for the same slice.
|
|
2180
|
-
*/
|
|
2181
|
-
readonly state?: Partial<TableState<TFeatures>>;
|
|
2182
|
-
}
|
|
2183
|
-
interface Table_CoreProperties<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2184
|
-
/**
|
|
2185
|
-
* Table reactivity bindings for interacting with TanStack Store.
|
|
2186
|
-
*/
|
|
2187
|
-
readonly _reactivity: TableReactivityBindings;
|
|
2188
|
-
/**
|
|
2189
|
-
* Cache of the `initCellInstanceData` functions for features that define one.
|
|
2190
|
-
*/
|
|
2191
|
-
_cellInstanceInitFns: Array<NonNullable<TableFeature['initCellInstanceData']>>;
|
|
2192
|
-
/**
|
|
2193
|
-
* Prototype cache for Cell objects - shared by all cells in this table
|
|
2194
|
-
*/
|
|
2195
|
-
_cellPrototype?: object;
|
|
2196
|
-
/**
|
|
2197
|
-
* Cache of the `initColumnInstanceData` functions for features that define one.
|
|
2198
|
-
*/
|
|
2199
|
-
_columnInstanceInitFns: Array<NonNullable<TableFeature['initColumnInstanceData']>>;
|
|
2200
|
-
/**
|
|
2201
|
-
* Prototype cache for Column objects - shared by all columns in this table
|
|
2202
|
-
*/
|
|
2203
|
-
_columnPrototype?: object;
|
|
2204
|
-
/**
|
|
2205
|
-
* The features that are enabled for the table.
|
|
2206
|
-
*/
|
|
2207
|
-
readonly _features: Partial<CoreFeatures> & TFeatures;
|
|
2208
|
-
/**
|
|
2209
|
-
* Cache of the `initHeaderGroupInstanceData` functions for features that define one.
|
|
2210
|
-
*/
|
|
2211
|
-
_headerGroupInstanceInitFns: Array<NonNullable<TableFeature['initHeaderGroupInstanceData']>>;
|
|
2212
|
-
/**
|
|
2213
|
-
* Cache of the `initHeaderInstanceData` functions for features that define one.
|
|
2214
|
-
*/
|
|
2215
|
-
_headerInstanceInitFns: Array<NonNullable<TableFeature['initHeaderInstanceData']>>;
|
|
2216
|
-
/**
|
|
2217
|
-
* Prototype cache for Header objects - shared by all headers in this table
|
|
2218
|
-
*/
|
|
2219
|
-
_headerPrototype?: object;
|
|
2220
|
-
/**
|
|
2221
|
-
* The row model processing functions that are used to process the data by features.
|
|
2222
|
-
*/
|
|
2223
|
-
readonly _rowModelFns: RowModelFns<TFeatures, TData>;
|
|
2224
|
-
/**
|
|
2225
|
-
* The row models that are enabled for the table.
|
|
2226
|
-
*/
|
|
2227
|
-
readonly _rowModels: CachedRowModels<TFeatures, TData>;
|
|
2228
|
-
/**
|
|
2229
|
-
* Prototype cache for Row objects - shared by all rows in this table
|
|
2230
|
-
*/
|
|
2231
|
-
_rowPrototype?: object;
|
|
2232
|
-
/**
|
|
2233
|
-
* Cache of the `initRowInstanceData` functions for features that define one.
|
|
2234
|
-
*/
|
|
2235
|
-
_rowInstanceInitFns: Array<NonNullable<TableFeature['initRowInstanceData']>>;
|
|
2236
|
-
/**
|
|
2237
|
-
* The readonly derived atoms for each `TableState` slice. Each derives from
|
|
2238
|
-
* its corresponding `baseAtom` plus, optionally, a per-slice external atom or
|
|
2239
|
-
* external state value (precedence: external atom > external state > base atom).
|
|
2240
|
-
*/
|
|
2241
|
-
readonly atoms: Atoms<TFeatures>;
|
|
2242
|
-
/**
|
|
2243
|
-
* The internal writable atoms for each `TableState` slice. This is the library's
|
|
2244
|
-
* single write surface — all state mutations from features land here.
|
|
2245
|
-
*/
|
|
2246
|
-
readonly baseAtoms: BaseAtoms<TFeatures>;
|
|
2247
|
-
/**
|
|
2248
|
-
* This is the resolved initial state of the table.
|
|
2249
|
-
*/
|
|
2250
|
-
readonly initialState: TableState<TFeatures>;
|
|
2251
|
-
/**
|
|
2252
|
-
* A read-only reference to the table's current options.
|
|
2253
|
-
*/
|
|
2254
|
-
readonly options: TableOptions<TFeatures, TData>;
|
|
2255
|
-
/**
|
|
2256
|
-
* Writable atom for table options. Only created when `createOptionsStore` is
|
|
2257
|
-
* true on the active core reactivity bindings. Adapters that opt out keep
|
|
2258
|
-
* options as plain resolved data instead of backing them with an atom.
|
|
2259
|
-
*/
|
|
2260
|
-
readonly optionsStore?: Atom<TableOptions<TFeatures, TData>> | undefined;
|
|
2261
|
-
/**
|
|
2262
|
-
* The readonly flat store for the table state. Derives from `table.atoms`
|
|
2263
|
-
* only; never reads external state directly.
|
|
2264
|
-
*/
|
|
2265
|
-
readonly store: ReadonlyStore<TableState<TFeatures>>;
|
|
2266
|
-
}
|
|
2267
|
-
interface Table_Table<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends Table_CoreProperties<TFeatures, TData> {
|
|
2268
|
-
/**
|
|
2269
|
-
* Resets the table's internal base atoms to `table.initialState`.
|
|
2270
|
-
*
|
|
2271
|
-
* Prefer feature-specific reset APIs, such as `resetPagination`, when a state
|
|
2272
|
-
* slice may be owned by an external atom or needs that feature's blank/default
|
|
2273
|
-
* reset behavior. After resetting internal atoms, this also invokes feature
|
|
2274
|
-
* reset hooks for mutable, transient table-instance data.
|
|
2275
|
-
*/
|
|
2276
|
-
reset: () => void;
|
|
2277
|
-
/**
|
|
2278
|
-
* Updates the table options by applying a value or updater to the current
|
|
2279
|
-
* resolved options and then merging them through `options.mergeOptions`.
|
|
2280
|
-
*/
|
|
2281
|
-
setOptions: (newOptions: Updater<TableOptions<TFeatures, TData>>) => void;
|
|
2282
|
-
}
|
|
2283
|
-
//#endregion
|
|
2284
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/Table.d.ts
|
|
2285
|
-
//#region src/types/Table.d.ts
|
|
2286
|
-
/**
|
|
2287
|
-
* The core table object that only includes the core table functionality such as column, header, row, and table APIS.
|
|
2288
|
-
* No features are included.
|
|
2289
|
-
*/
|
|
2290
|
-
interface Table_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends Table_Table<TFeatures, TData>, Table_Columns<TFeatures, TData>, Table_Rows<TFeatures, TData>, Table_RowModels<TFeatures, TData>, Table_Headers<TFeatures, TData> {}
|
|
2291
|
-
interface Table_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2292
|
-
cellSelectionFeature: Table_CellSelection<TFeatures, TData>;
|
|
2293
|
-
cellSpanningFeature: Table_CellSpanning<TFeatures, TData>;
|
|
2294
|
-
columnFacetingFeature: Table_ColumnFaceting<TFeatures, TData>;
|
|
2295
|
-
columnFilteringFeature: Table_ColumnFiltering;
|
|
2296
|
-
columnGroupingFeature: Table_ColumnGrouping<TFeatures, TData>;
|
|
2297
|
-
columnOrderingFeature: Table_ColumnOrdering<TFeatures, TData>;
|
|
2298
|
-
columnPinningFeature: Table_ColumnPinning<TFeatures, TData>;
|
|
2299
|
-
columnResizingFeature: Table_ColumnResizing;
|
|
2300
|
-
columnSizingFeature: Table_ColumnSizing;
|
|
2301
|
-
columnVisibilityFeature: Table_ColumnVisibility<TFeatures, TData>;
|
|
2302
|
-
globalFilteringFeature: Table_GlobalFiltering<TFeatures, TData>;
|
|
2303
|
-
rowExpandingFeature: Table_RowExpanding<TFeatures, TData>;
|
|
2304
|
-
rowPaginationFeature: Table_RowPagination<TFeatures, TData>;
|
|
2305
|
-
rowPinningFeature: Table_RowPinning<TFeatures, TData>;
|
|
2306
|
-
rowSelectionFeature: Table_RowSelection<TFeatures, TData>;
|
|
2307
|
-
rowSortingFeature: Table_RowSorting<TFeatures, TData>;
|
|
2308
|
-
}
|
|
2309
|
-
/**
|
|
2310
|
-
* The table object that includes both the core table functionality and the features that are enabled via the `features` table option.
|
|
2311
|
-
*/
|
|
2312
|
-
type Table<TFeatures extends TableFeatures, TData extends RowData$2> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>>;
|
|
2313
|
-
//#endregion
|
|
2314
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.types.d.ts
|
|
2315
|
-
//#region src/core/cells/coreCellsFeature.types.d.ts
|
|
2316
|
-
interface CellContext<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2317
|
-
cell: Cell<TFeatures, TData, TValue>;
|
|
2318
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2319
|
-
getValue: Getter<TValue>;
|
|
2320
|
-
renderValue: Getter<TValue | null>;
|
|
2321
|
-
row: Row<TFeatures, TData>;
|
|
2322
|
-
table: Table<TFeatures, TData>;
|
|
2323
|
-
}
|
|
2324
|
-
interface Cell_CoreProperties<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2325
|
-
/**
|
|
2326
|
-
* The associated Column object for the cell.
|
|
2327
|
-
*/
|
|
2328
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2329
|
-
/**
|
|
2330
|
-
* The unique ID for the cell across the entire table.
|
|
2331
|
-
*/
|
|
2332
|
-
id: string;
|
|
2333
|
-
/**
|
|
2334
|
-
* The associated Row object for the cell.
|
|
2335
|
-
*/
|
|
2336
|
-
row: Row<TFeatures, TData>;
|
|
2337
|
-
/**
|
|
2338
|
-
* Reference to the parent table instance.
|
|
2339
|
-
*/
|
|
2340
|
-
table: Table<TFeatures, TData>;
|
|
2341
|
-
}
|
|
2342
|
-
interface Cell_Cell<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> extends Cell_CoreProperties<TFeatures, TData, TValue> {
|
|
2343
|
-
/**
|
|
2344
|
-
* Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:
|
|
2345
|
-
*/
|
|
2346
|
-
getContext: () => CellContext<TFeatures, TData, TValue>;
|
|
2347
|
-
/**
|
|
2348
|
-
* Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
|
|
2349
|
-
*/
|
|
2350
|
-
getValue: CellContext<TFeatures, TData, TValue>['getValue'];
|
|
2351
|
-
/**
|
|
2352
|
-
* Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
2353
|
-
*/
|
|
2354
|
-
renderValue: CellContext<TFeatures, TData, TValue>['renderValue'];
|
|
2355
|
-
}
|
|
2356
|
-
interface TableOptions_Cell {
|
|
2357
|
-
/**
|
|
2358
|
-
* Value used when the desired value is not found in the data.
|
|
2359
|
-
*/
|
|
2360
|
-
renderFallbackValue?: any;
|
|
2361
|
-
}
|
|
2362
|
-
//#endregion
|
|
2363
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/Cell.d.ts
|
|
2364
|
-
//#region src/types/Cell.d.ts
|
|
2365
|
-
interface Cell_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> extends Cell_Cell<TFeatures, TData, TValue> {}
|
|
2366
|
-
interface Cell_FeatureMap {
|
|
2367
|
-
cellSelectionFeature: Cell_CellSelection;
|
|
2368
|
-
cellSpanningFeature: Cell_CellSpanning;
|
|
2369
|
-
columnGroupingFeature: Cell_ColumnGrouping;
|
|
2370
|
-
rowAggregationFeature: Cell_RowAggregation;
|
|
2371
|
-
}
|
|
2372
|
-
type Cell<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = Cell_Core<TFeatures, TData, TValue> & ExtractFeatureMapTypes<TFeatures, Cell_FeatureMap>;
|
|
2373
|
-
//#endregion
|
|
2374
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.types.d.ts
|
|
2375
|
-
//#region src/features/cell-selection/cellSelectionFeature.types.d.ts
|
|
2376
|
-
/**
|
|
2377
|
-
* A single rectangular cell selection, stored as its two defining corners.
|
|
2378
|
-
*
|
|
2379
|
-
* The `anchor` corner stays put while the `focus` corner moves during a
|
|
2380
|
-
* shift-extend or a drag, so the pair carries strictly more information than a
|
|
2381
|
-
* normalized min/max rectangle would. Corners are stored as flat row and column
|
|
2382
|
-
* ids rather than nested objects or a packed `rowId_columnId` key, because
|
|
2383
|
-
* `getRowId` is user-supplied and may return ids containing any separator.
|
|
2384
|
-
*/
|
|
2385
|
-
interface CellSelectionRange {
|
|
2386
|
-
anchorColumnId: string;
|
|
2387
|
-
anchorRowId: string;
|
|
2388
|
-
focusColumnId: string;
|
|
2389
|
-
focusRowId: string;
|
|
2390
|
-
/**
|
|
2391
|
-
* How this range changes the selection produced by the ranges before it.
|
|
2392
|
-
* Defaults to `include`.
|
|
2393
|
-
*/
|
|
2394
|
-
operation?: CellSelectionRangeOperation;
|
|
2395
|
-
}
|
|
2396
|
-
type CellSelectionRangeOperation = 'include' | 'exclude';
|
|
2397
|
-
/**
|
|
2398
|
-
* Ordered range operations that produce the final selection. The last entry is
|
|
2399
|
-
* the active operation that shift-extend and drag operate on.
|
|
2400
|
-
*
|
|
2401
|
-
* A bare array, matching `SortingState` and `ColumnFiltersState`. Drag session
|
|
2402
|
-
* state deliberately lives outside this slice as non-reactive instance data, so
|
|
2403
|
-
* nothing here is transient and the whole slice is safe to persist.
|
|
2404
|
-
*/
|
|
2405
|
-
type CellSelectionState = Array<CellSelectionRange>;
|
|
2406
|
-
interface TableState_CellSelection {
|
|
2407
|
-
cellSelection: CellSelectionState;
|
|
2408
|
-
}
|
|
2409
|
-
/**
|
|
2410
|
-
* A range resolved into inclusive display-order indexes.
|
|
2411
|
-
*
|
|
2412
|
-
* Ranges whose corners no longer resolve are omitted rather than clamped, so a
|
|
2413
|
-
* range with a filtered-out corner contributes nothing while remaining in state.
|
|
2414
|
-
*/
|
|
2415
|
-
interface CellSelectionBounds {
|
|
2416
|
-
maxColumnIndex: number;
|
|
2417
|
-
maxRowIndex: number;
|
|
2418
|
-
minColumnIndex: number;
|
|
2419
|
-
minRowIndex: number;
|
|
2420
|
-
}
|
|
2421
|
-
/**
|
|
2422
|
-
* Which sides of a selected cell sit on the outer boundary of the selection.
|
|
2423
|
-
*/
|
|
2424
|
-
interface CellSelectionEdges {
|
|
2425
|
-
bottom: boolean;
|
|
2426
|
-
left: boolean;
|
|
2427
|
-
right: boolean;
|
|
2428
|
-
top: boolean;
|
|
2429
|
-
}
|
|
2430
|
-
type CellSelectionDirection = 'up' | 'down' | 'left' | 'right';
|
|
2431
|
-
type CellSelectionRangeMode = 'replace' | 'include' | 'exclude';
|
|
2432
|
-
interface SelectCellRangeOptions {
|
|
2433
|
-
/**
|
|
2434
|
-
* Whether to replace the selection, add the range, or subtract the range.
|
|
2435
|
-
* Defaults to `replace`.
|
|
2436
|
-
*/
|
|
2437
|
-
mode?: CellSelectionRangeMode;
|
|
2438
|
-
/**
|
|
2439
|
-
* Whether the range should be added alongside existing ranges rather than
|
|
2440
|
-
* replacing them. Defaults to `false`.
|
|
2441
|
-
*
|
|
2442
|
-
* @deprecated Use `mode: 'include'` instead.
|
|
2443
|
-
*/
|
|
2444
|
-
additive?: boolean;
|
|
2445
|
-
}
|
|
2446
|
-
interface TableOptions_CellSelection<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2447
|
-
/**
|
|
2448
|
-
* Resets cell selection to `initialState.cellSelection` whenever `data`
|
|
2449
|
-
* changes. Defaults to `true`.
|
|
2450
|
-
*
|
|
2451
|
-
* Ranges are stored as row and column ids, so new data would otherwise leave
|
|
2452
|
-
* a selection pointing at rows that no longer exist, or silently re-select
|
|
2453
|
-
* cells if the new data happens to reuse ids. Set to `false` to keep ranges
|
|
2454
|
-
* across data changes, and note `autoResetAll` overrides this.
|
|
2455
|
-
*/
|
|
2456
|
-
autoResetCellSelection?: boolean;
|
|
2457
|
-
/**
|
|
2458
|
-
* Enables inclusive cell range selection through shift-click and drag.
|
|
2459
|
-
* Defaults to `true`.
|
|
2460
|
-
*/
|
|
2461
|
-
enableCellRangeSelection?: boolean;
|
|
2462
|
-
/**
|
|
2463
|
-
* Allows cells to be selected.
|
|
2464
|
-
*
|
|
2465
|
-
* Provide a predicate to decide per cell. A column def may also opt out with
|
|
2466
|
-
* its own `enableCellSelection: false`. Defaults to `true`.
|
|
2467
|
-
*/
|
|
2468
|
-
enableCellSelection?: boolean | ((cell: Cell<TFeatures, TData, any>) => boolean);
|
|
2469
|
-
/**
|
|
2470
|
-
* Enables extending a selection by dragging across cells. Defaults to `true`.
|
|
2471
|
-
*/
|
|
2472
|
-
enableCellSelectionDrag?: boolean;
|
|
2473
|
-
/**
|
|
2474
|
-
* Allows modifier interactions to add or subtract ranges. Defaults to `true`.
|
|
2475
|
-
*/
|
|
2476
|
-
enableMultiCellRangeSelection?: boolean;
|
|
2477
|
-
/**
|
|
2478
|
-
* Determines whether a selection-start event should extend the active range
|
|
2479
|
-
* instead of replacing the selection.
|
|
2480
|
-
*
|
|
2481
|
-
* By default, events with `shiftKey` directly on the event or on
|
|
2482
|
-
* `event.nativeEvent` are treated as range-selection events.
|
|
2483
|
-
*/
|
|
2484
|
-
isCellRangeSelectionEvent?: (event: unknown) => boolean;
|
|
2485
|
-
/**
|
|
2486
|
-
* Determines whether a selection-start event should add or subtract a new
|
|
2487
|
-
* rectangle. The operation depends on whether the starting cell is selected.
|
|
2488
|
-
*
|
|
2489
|
-
* By default, events with `ctrlKey` or `metaKey` directly on the event or on
|
|
2490
|
-
* `event.nativeEvent` are treated as multi-range events.
|
|
2491
|
-
*/
|
|
2492
|
-
isMultiCellRangeSelectionEvent?: (event: unknown) => boolean;
|
|
2493
|
-
/**
|
|
2494
|
-
* Called with an updater when cell selection state changes. Pair this with
|
|
2495
|
-
* `state.cellSelection` when using external state; external atoms can own the
|
|
2496
|
-
* slice without this callback.
|
|
2497
|
-
*
|
|
2498
|
-
* A drag emits one change per cell crossed. Subscribe to
|
|
2499
|
-
* `table.atoms.cellSelection` for finer-grained reads when that matters.
|
|
2500
|
-
*/
|
|
2501
|
-
onCellSelectionChange?: OnChangeFn<CellSelectionState>;
|
|
2502
|
-
}
|
|
2503
|
-
interface ColumnDef_CellSelection {
|
|
2504
|
-
/**
|
|
2505
|
-
* Allows cells in this column to be selected. Defaults to `true`.
|
|
2506
|
-
*/
|
|
2507
|
-
enableCellSelection?: boolean;
|
|
2508
|
-
}
|
|
2509
|
-
interface Cell_CellSelection {
|
|
2510
|
-
/**
|
|
2511
|
-
* Checks whether this cell can currently be selected.
|
|
2512
|
-
*/
|
|
2513
|
-
getCanSelect: () => boolean;
|
|
2514
|
-
/**
|
|
2515
|
-
* Checks whether this cell is the active cell, i.e. the anchor of the most
|
|
2516
|
-
* recent range.
|
|
2517
|
-
*/
|
|
2518
|
-
getIsFocused: () => boolean;
|
|
2519
|
-
/**
|
|
2520
|
-
* Checks whether this cell falls inside the final positive selection.
|
|
2521
|
-
*/
|
|
2522
|
-
getIsSelected: () => boolean;
|
|
2523
|
-
/**
|
|
2524
|
-
* Returns which sides of this cell sit on the outer boundary of the
|
|
2525
|
-
* selection, for rendering a spreadsheet-style outline without each cell
|
|
2526
|
-
* inspecting its neighbours.
|
|
2527
|
-
*
|
|
2528
|
-
* All sides are `false` when the cell is not selected.
|
|
2529
|
-
*/
|
|
2530
|
-
getSelectionEdges: () => CellSelectionEdges;
|
|
2531
|
-
/**
|
|
2532
|
-
* Creates a handler that extends the active range to this cell while a drag
|
|
2533
|
-
* is in progress. Bind it to `mouseenter`.
|
|
2534
|
-
*
|
|
2535
|
-
* The handler no-ops unless a drag is open, and skips redundant writes when
|
|
2536
|
-
* the active range already focuses this cell.
|
|
2537
|
-
*/
|
|
2538
|
-
getSelectionExtendHandler: () => (event: unknown) => void;
|
|
2539
|
-
/**
|
|
2540
|
-
* Creates a handler that begins a selection at this cell. Bind it to
|
|
2541
|
-
* `mousedown`.
|
|
2542
|
-
*
|
|
2543
|
-
* Pass the original mouse event, or a framework event whose `nativeEvent` is
|
|
2544
|
-
* that event, so modifier keys can be detected. The handler attaches its own
|
|
2545
|
-
* document-level `mouseup` listener so a drag released outside the table
|
|
2546
|
-
* still ends correctly; pass `contextDocument` when the table renders into
|
|
2547
|
-
* another document, such as an iframe or popout window.
|
|
2548
|
-
*/
|
|
2549
|
-
getSelectionStartHandler: (contextDocument?: Document) => (event: unknown) => void;
|
|
2550
|
-
/**
|
|
2551
|
-
* Returns `0` for the focused cell and `-1` otherwise, for roving tabindex.
|
|
2552
|
-
*/
|
|
2553
|
-
getTabIndex: () => number;
|
|
2554
|
-
}
|
|
2555
|
-
interface Table_CellSelection<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2556
|
-
/**
|
|
2557
|
-
* Whether a drag selection is currently open.
|
|
2558
|
-
*
|
|
2559
|
-
* Non-reactive instance data rather than state: only the mouse handlers read
|
|
2560
|
-
* it, nothing renders from it, and keeping it out of the slice means a
|
|
2561
|
-
* selection persisted mid-drag cannot rehydrate into a stuck drag.
|
|
2562
|
-
*
|
|
2563
|
-
* @internal
|
|
2564
|
-
*/
|
|
2565
|
-
_isSelectingCells: boolean;
|
|
2566
|
-
/**
|
|
2567
|
-
* Schedules a cell selection reset after `data` changes.
|
|
2568
|
-
*
|
|
2569
|
-
* Honors `autoResetAll` and `autoResetCellSelection`. Called by the core row
|
|
2570
|
-
* model; you rarely need to invoke it yourself.
|
|
2571
|
-
*/
|
|
2572
|
-
autoResetCellSelection: () => void;
|
|
2573
|
-
/**
|
|
2574
|
-
* Extends the active range one step in a direction, keeping its anchor fixed.
|
|
2575
|
-
*/
|
|
2576
|
-
extendCellSelection: (direction: CellSelectionDirection) => void;
|
|
2577
|
-
/**
|
|
2578
|
-
* Returns the final positive selection as disjoint, inclusive display-order
|
|
2579
|
-
* index rectangles after all include and exclude operations are applied.
|
|
2580
|
-
*
|
|
2581
|
-
* This is the memoized cache every per-cell read goes through. Ranges whose
|
|
2582
|
-
* corners no longer resolve are omitted.
|
|
2583
|
-
*/
|
|
2584
|
-
getCellSelectionBounds: () => Array<CellSelectionBounds>;
|
|
2585
|
-
/**
|
|
2586
|
-
* Returns the merged-cell rectangles of the rendered rows in selection's
|
|
2587
|
-
* display-order index space, or an empty array when `cellSpanningFeature`
|
|
2588
|
-
* is not registered.
|
|
2589
|
-
*
|
|
2590
|
-
* Selection rectangles expand to fully enclose these, so a merged cell is
|
|
2591
|
-
* always entirely selected or entirely unselected.
|
|
2592
|
-
*/
|
|
2593
|
-
getCellSelectionMergeBounds: () => Array<CellSelectionBounds>;
|
|
2594
|
-
/**
|
|
2595
|
-
* Returns the ids of all columns intersected by the selection.
|
|
2596
|
-
*/
|
|
2597
|
-
getCellSelectionColumnIds: () => Array<string>;
|
|
2598
|
-
/**
|
|
2599
|
-
* Returns a column id to display-index map for the current column order.
|
|
2600
|
-
*
|
|
2601
|
-
* Registered so the lookup stays memoized even when `columnOrderingFeature`
|
|
2602
|
-
* is absent, since its `getColumnIndexes` static rebuilds on every call.
|
|
2603
|
-
*
|
|
2604
|
-
* @internal
|
|
2605
|
-
*/
|
|
2606
|
-
getCellSelectionColumnIndexes: () => Record<string, number>;
|
|
2607
|
-
/**
|
|
2608
|
-
* Returns the ids of all rows intersected by the selection.
|
|
2609
|
-
*/
|
|
2610
|
-
getCellSelectionRowIds: () => Array<string>;
|
|
2611
|
-
/**
|
|
2612
|
-
* Returns the active cell, i.e. the anchor of the most recent operation.
|
|
2613
|
-
* An exclusion's active cell is focused even though it is not selected.
|
|
2614
|
-
*/
|
|
2615
|
-
getFocusedCell: () => Cell<TFeatures, TData, any> | undefined;
|
|
2616
|
-
/**
|
|
2617
|
-
* Returns the number of selected cells.
|
|
2618
|
-
*
|
|
2619
|
-
* Computed with rectangle arithmetic unless a per-cell
|
|
2620
|
-
* `enableCellSelection` predicate requires enumeration.
|
|
2621
|
-
*/
|
|
2622
|
-
getSelectedCellCount: () => number;
|
|
2623
|
-
/**
|
|
2624
|
-
* Returns the unique ids of all selected cells, in row-major order.
|
|
2625
|
-
*
|
|
2626
|
-
* This expands the selection, so it costs one pass over the selected area.
|
|
2627
|
-
* It is memoized and never runs unless called.
|
|
2628
|
-
*/
|
|
2629
|
-
getSelectedCellIds: () => Array<string>;
|
|
2630
|
-
/**
|
|
2631
|
-
* Returns each final positive selection region's values as a row-major grid.
|
|
2632
|
-
*
|
|
2633
|
-
* Indexed as `[regionIndex][rowIndex][columnIndex]`. Serializing this to
|
|
2634
|
-
* clipboard text is left to userland, since the delimiter, the null
|
|
2635
|
-
* representation, and any quoting rules are application decisions.
|
|
2636
|
-
*/
|
|
2637
|
-
getSelectedCellRangesData: () => Array<Array<Array<unknown>>>;
|
|
2638
|
-
/**
|
|
2639
|
-
* Moves the selection one step in a direction, collapsing it to a single
|
|
2640
|
-
* cell. Columns that cannot be selected are skipped over.
|
|
2641
|
-
*/
|
|
2642
|
-
moveCellSelection: (direction: CellSelectionDirection) => void;
|
|
2643
|
-
/**
|
|
2644
|
-
* Resets `cellSelection` to `initialState.cellSelection`.
|
|
2645
|
-
*
|
|
2646
|
-
* Pass `true` to ignore initial state and reset to an empty selection.
|
|
2647
|
-
*/
|
|
2648
|
-
resetCellSelection: (defaultState?: boolean) => void;
|
|
2649
|
-
/**
|
|
2650
|
-
* Selects every selectable cell in the table as one range.
|
|
2651
|
-
*/
|
|
2652
|
-
selectAllCells: () => void;
|
|
2653
|
-
/**
|
|
2654
|
-
* Selects a rectangle using the requested replace/include/exclude mode.
|
|
2655
|
-
*/
|
|
2656
|
-
selectCellRange: (range: CellSelectionRange, opts?: SelectCellRangeOptions) => void;
|
|
2657
|
-
/**
|
|
2658
|
-
* Updates cell selection state with a next value or updater function.
|
|
2659
|
-
*/
|
|
2660
|
-
setCellSelection: (updater: Updater<CellSelectionState>) => void;
|
|
2661
|
-
/**
|
|
2662
|
-
* Collapses the selection to a single cell at the given coordinates.
|
|
2663
|
-
*/
|
|
2664
|
-
setFocusedCell: (rowId: string, columnId: string) => void;
|
|
2665
|
-
}
|
|
2666
|
-
//#endregion
|
|
2667
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/ColumnDef.d.ts
|
|
2668
|
-
//#region src/types/ColumnDef.d.ts
|
|
2669
|
-
interface ColumnMeta<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {}
|
|
2670
|
-
/**
|
|
2671
|
-
* Resolves the type of `columnDef.meta` for a feature set.
|
|
2672
|
-
*
|
|
2673
|
-
* When the features object declares a `columnMeta` type-only slot
|
|
2674
|
-
* (`tableFeatures({ ..., columnMeta: {} as MyColumnMeta })`), that type wins.
|
|
2675
|
-
* Otherwise this falls back to the global declaration-merged `ColumnMeta`
|
|
2676
|
-
* interface.
|
|
2677
|
-
*/
|
|
2678
|
-
type ExtractColumnMeta<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = IsAny<TFeatures> extends true ? ColumnMeta<TFeatures, TData, TValue> : TFeatures extends {
|
|
2679
|
-
columnMeta: infer TMeta extends object;
|
|
2680
|
-
} ? TMeta : ColumnMeta<TFeatures, TData, TValue>;
|
|
2681
|
-
/**
|
|
2682
|
-
* Reads a cell value from an original row object.
|
|
2683
|
-
*
|
|
2684
|
-
* The row index is provided for accessors that need stable position-aware
|
|
2685
|
-
* derived values.
|
|
2686
|
-
*/
|
|
2687
|
-
type AccessorFn<TData extends RowData$2, TValue extends CellData = CellData> = (originalRow: TData, index: number) => TValue;
|
|
2688
|
-
/**
|
|
2689
|
-
* A renderable column template value.
|
|
2690
|
-
*
|
|
2691
|
-
* Strings render directly; functions receive the relevant cell/header context
|
|
2692
|
-
* and can return framework-specific render output.
|
|
2693
|
-
*/
|
|
2694
|
-
type ColumnDefTemplate<TProps extends object> = string | ((props: TProps) => any);
|
|
2695
|
-
type StringOrTemplateHeader<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = string | ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>;
|
|
2696
|
-
interface StringHeaderIdentifier {
|
|
2697
|
-
/**
|
|
2698
|
-
* Header text used both for rendering and as a fallback column id.
|
|
2699
|
-
*/
|
|
2700
|
-
header: string;
|
|
2701
|
-
/**
|
|
2702
|
-
* Optional explicit id that overrides the header-derived id.
|
|
2703
|
-
*/
|
|
2704
|
-
id?: string;
|
|
2705
|
-
}
|
|
2706
|
-
interface IdIdentifier<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2707
|
-
/**
|
|
2708
|
-
* Explicit stable column id.
|
|
2709
|
-
*/
|
|
2710
|
-
id: string;
|
|
2711
|
-
/**
|
|
2712
|
-
* Header text or template used to render this column's header.
|
|
2713
|
-
*/
|
|
2714
|
-
header?: StringOrTemplateHeader<TFeatures, TData, TValue>;
|
|
2715
|
-
}
|
|
2716
|
-
type ColumnIdentifiers<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = IdIdentifier<TFeatures, TData, TValue> | StringHeaderIdentifier;
|
|
2717
|
-
interface ColumnDefBase_Core<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2718
|
-
/**
|
|
2719
|
-
* Produces the values used by faceting/grouping for this column.
|
|
2720
|
-
*
|
|
2721
|
-
* When omitted, the normal accessor value is wrapped in a single-item array.
|
|
2722
|
-
*/
|
|
2723
|
-
getUniqueValues?: AccessorFn<TData, ReadonlyArray<unknown>>;
|
|
2724
|
-
/**
|
|
2725
|
-
* Footer template rendered with header context.
|
|
2726
|
-
*/
|
|
2727
|
-
footer?: ColumnDefTemplate<HeaderContext<TFeatures, TData, TValue>>;
|
|
2728
|
-
/**
|
|
2729
|
-
* Cell template rendered with cell context.
|
|
2730
|
-
*/
|
|
2731
|
-
cell?: ColumnDefTemplate<CellContext<TFeatures, TData, TValue>>;
|
|
2732
|
-
/**
|
|
2733
|
-
* User-defined metadata available on the resolved column definition.
|
|
2734
|
-
*
|
|
2735
|
-
* Declare its type per-table via the `columnMeta` type-only slot on the
|
|
2736
|
-
* `features` option, or globally via declaration merging on `ColumnMeta`.
|
|
2737
|
-
*/
|
|
2738
|
-
meta?: ExtractColumnMeta<TFeatures, TData, TValue>;
|
|
2739
|
-
}
|
|
2740
|
-
interface ColumnDef_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData> {
|
|
2741
|
-
cellSelectionFeature: ColumnDef_CellSelection;
|
|
2742
|
-
cellSpanningFeature: ColumnDef_CellSpanning<TFeatures, TData, TValue>;
|
|
2743
|
-
columnFilteringFeature: ColumnDef_ColumnFiltering<TFeatures, TData>;
|
|
2744
|
-
columnGroupingFeature: ColumnDef_ColumnGrouping<TFeatures, TData>;
|
|
2745
|
-
columnPinningFeature: ColumnDef_ColumnPinning;
|
|
2746
|
-
columnResizingFeature: ColumnDef_ColumnResizing;
|
|
2747
|
-
columnSizingFeature: ColumnDef_ColumnSizing;
|
|
2748
|
-
columnVisibilityFeature: ColumnDef_ColumnVisibility;
|
|
2749
|
-
globalFilteringFeature: ColumnDef_GlobalFiltering;
|
|
2750
|
-
rowAggregationFeature: ColumnDef_RowAggregation<TFeatures, TData, TValue>;
|
|
2751
|
-
rowSortingFeature: ColumnDef_RowSorting<TFeatures, TData>;
|
|
2752
|
-
}
|
|
2753
|
-
type ColumnDefBase<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase_Core<TFeatures, TData, TValue> & ExtractFeatureMapTypes<TFeatures, ColumnDef_FeatureMap<TFeatures, TData, TValue>>;
|
|
2754
|
-
type ColumnDefBase_All<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase_Core<TFeatures, TData, TValue> & Partial<ColumnDef_RowAggregation<TFeatures, TData, TValue> & ColumnDef_CellSelection & ColumnDef_CellSpanning<TFeatures, TData, TValue> & ColumnDef_ColumnVisibility & ColumnDef_ColumnPinning & ColumnDef_ColumnFiltering<TFeatures, TData> & ColumnDef_GlobalFiltering & ColumnDef_RowSorting<TFeatures, TData> & ColumnDef_ColumnGrouping<TFeatures, TData> & ColumnDef_ColumnSizing & ColumnDef_ColumnResizing>;
|
|
2755
|
-
type DisplayColumnDef<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;
|
|
2756
|
-
type GroupColumnDefBase<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase<TFeatures, TData, TValue> & {
|
|
2757
|
-
columns?: ReadonlyArray<ColumnDef$2<TFeatures, TData, unknown>>;
|
|
2758
|
-
};
|
|
2759
|
-
type GroupColumnDef<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = GroupColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;
|
|
2760
|
-
type AccessorFnColumnDefBase<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase<TFeatures, TData, TValue> & {
|
|
2761
|
-
accessorFn: AccessorFn<TData, TValue>;
|
|
2762
|
-
};
|
|
2763
|
-
type AccessorFnColumnDef<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = AccessorFnColumnDefBase<TFeatures, TData, TValue> & ColumnIdentifiers<TFeatures, TData, TValue>;
|
|
2764
|
-
type AccessorKeyColumnDefBase<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = ColumnDefBase<TFeatures, TData, TValue> & {
|
|
2765
|
-
id?: string;
|
|
2766
|
-
accessorKey: (string & {}) | keyof TData;
|
|
2767
|
-
};
|
|
2768
|
-
type AccessorKeyColumnDef<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = AccessorKeyColumnDefBase<TFeatures, TData, TValue> & Partial<ColumnIdentifiers<TFeatures, TData, TValue>>;
|
|
2769
|
-
type AccessorColumnDef<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = AccessorKeyColumnDef<TFeatures, TData, TValue> | AccessorFnColumnDef<TFeatures, TData, TValue>;
|
|
2770
|
-
type ColumnDef$2<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> = DisplayColumnDef<TFeatures, TData, TValue> | GroupColumnDef<TFeatures, TData, TValue> | AccessorColumnDef<TFeatures, TData, TValue>;
|
|
2771
|
-
//#endregion
|
|
2772
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.types.d.ts
|
|
2773
|
-
//#region src/features/row-aggregation/rowAggregationFeature.types.d.ts
|
|
2774
|
-
/** Declaration-merging fallback for named aggregation definitions. */
|
|
2775
|
-
interface AggregationFns {}
|
|
2776
|
-
/** Values and table objects available while one aggregation is evaluated. */
|
|
2777
|
-
interface AggregationContext<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown> {
|
|
2778
|
-
/** The column whose values are being aggregated. */
|
|
2779
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2780
|
-
/** Convenience alias for `column.id`. */
|
|
2781
|
-
columnId: string;
|
|
2782
|
-
/** Maximum relative sub-row depth used to select `rows`. */
|
|
2783
|
-
maxDepth: number;
|
|
2784
|
-
/**
|
|
2785
|
-
* Immediate sub-rows for grouped aggregation. This property is omitted
|
|
2786
|
-
* for root or caller-supplied-row aggregation. At a terminal grouping level
|
|
2787
|
-
* these are the direct data rows; at a nested level they are sub-row groups.
|
|
2788
|
-
*/
|
|
2789
|
-
subRows?: ReadonlyArray<Row<TFeatures, TData>>;
|
|
2790
|
-
/** Reads this column's value from one of `rows`. */
|
|
2791
|
-
getValue: (row: Row<TFeatures, TData>) => TValue;
|
|
2792
|
-
/**
|
|
2793
|
-
* The synthetic grouped row receiving this result. This property is omitted
|
|
2794
|
-
* for root or caller-supplied-row aggregation. Its `depth` identifies the
|
|
2795
|
-
* grouping level when grouped aggregation needs that distinction.
|
|
2796
|
-
*/
|
|
2797
|
-
groupingRow?: Row<TFeatures, TData>;
|
|
2798
|
-
/**
|
|
2799
|
-
* Unique rows selected at `maxDepth`. Branches that end before `maxDepth`
|
|
2800
|
-
* contribute their deepest available row.
|
|
2801
|
-
*/
|
|
2802
|
-
rows: ReadonlyArray<Row<TFeatures, TData>>;
|
|
2803
|
-
/** The table that owns the column and rows. */
|
|
2804
|
-
table: Table<TFeatures, TData>;
|
|
2805
|
-
}
|
|
2806
|
-
/** Additional values available when merging nested grouped results. */
|
|
2807
|
-
interface AggregationMergeContext<TFeatures extends TableFeatures, TData extends RowData$2, TValue, TResult> extends AggregationContext<TFeatures, TData, TValue> {
|
|
2808
|
-
/** Results produced for each immediate sub-row group, in sub-row order. */
|
|
2809
|
-
subRowResults: ReadonlyArray<TResult>;
|
|
2810
|
-
/** Immediate sub-row groups corresponding to `subRowResults`. */
|
|
2811
|
-
subRows: ReadonlyArray<Row<TFeatures, TData>>;
|
|
2812
|
-
}
|
|
2813
|
-
/** A context-based aggregation definition and optional grouped-result merge. */
|
|
2814
|
-
interface AggregationFnDef<TFeatures extends TableFeatures = any, TData extends RowData$2 = any, TValue = unknown, TResult = unknown> {
|
|
2815
|
-
/** Computes a result directly from the selected `rows`. */
|
|
2816
|
-
aggregate: (context: AggregationContext<TFeatures, TData, TValue>) => TResult;
|
|
2817
|
-
/**
|
|
2818
|
-
* Combines already-computed immediate sub-row results. When omitted,
|
|
2819
|
-
* nested grouping falls back to `aggregate` over the group's selected rows.
|
|
2820
|
-
*/
|
|
2821
|
-
merge?: (context: AggregationMergeContext<TFeatures, TData, TValue, TResult>) => TResult;
|
|
2822
|
-
}
|
|
2823
|
-
/** Aggregation-definition registry carried by a table feature set. */
|
|
2824
|
-
interface RowModelFns_RowAggregation<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2825
|
-
aggregationFns: Record<string, AggregationFnDef<TFeatures, TData, any, any>>;
|
|
2826
|
-
}
|
|
2827
|
-
/** String names available from a feature set's aggregation registry. */
|
|
2828
|
-
type ExtractAggregationFnKeys<TFeatures extends TableFeatures> = IsAny<TFeatures> extends true ? keyof AggregationFns | BuiltInAggregationFn : TFeatures extends {
|
|
2829
|
-
aggregationFns: infer TAggregationFns extends object;
|
|
2830
|
-
} ? Extract<keyof TAggregationFns, string> : keyof AggregationFns;
|
|
2831
|
-
/** A registered name, automatic inference, or inline aggregation definition. */
|
|
2832
|
-
type AggregationFnRef<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown, TResult = unknown> = 'auto' | ExtractAggregationFnKeys<TFeatures> | AggregationFnDef<TFeatures, TData, TValue, TResult>;
|
|
2833
|
-
/** Gives an aggregation reference a stable key in a multiple result. */
|
|
2834
|
-
interface AggregationFnDescriptor<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown, TResult = unknown> {
|
|
2835
|
-
/** The named, automatic, or inline definition to execute. */
|
|
2836
|
-
aggregationFn: AggregationFnRef<TFeatures, TData, TValue, TResult>;
|
|
2837
|
-
/** Stable key used in the object returned by a multiple aggregation. */
|
|
2838
|
-
id: string;
|
|
2839
|
-
}
|
|
2840
|
-
/** One named or explicitly keyed entry in a multiple aggregation option. */
|
|
2841
|
-
type AggregationFnListItem<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown> = 'auto' | ExtractAggregationFnKeys<TFeatures> | AggregationFnDescriptor<TFeatures, TData, TValue, any>;
|
|
2842
|
-
/** A scalar aggregation reference or a list that produces a keyed object. */
|
|
2843
|
-
type AggregationFnOption<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown> = AggregationFnRef<TFeatures, TData, TValue, any> | ReadonlyArray<AggregationFnListItem<TFeatures, TData, TValue>>;
|
|
2844
|
-
/** Extracts the result type produced by an aggregation definition. */
|
|
2845
|
-
type AggregationResultOf<TDefinition> = TDefinition extends AggregationFnDef<any, any, any, infer TResult> ? TResult : unknown;
|
|
2846
|
-
type RegisteredAggregationResult<TFeatures extends TableFeatures> = TFeatures extends {
|
|
2847
|
-
aggregationFns: infer TRegistry extends Record<string, unknown>;
|
|
2848
|
-
} ? AggregationResultOf<TRegistry[keyof TRegistry]> : unknown;
|
|
2849
|
-
/** Default public result union when a column's precise option is not known. */
|
|
2850
|
-
type ColumnAggregationValue<TFeatures extends TableFeatures> = RegisteredAggregationResult<TFeatures> | Record<string, RegisteredAggregationResult<TFeatures> | undefined> | undefined;
|
|
2851
|
-
/** A validated aggregation entry returned by `column.getAggregationFns()`. */
|
|
2852
|
-
interface ResolvedAggregationFn<TFeatures extends TableFeatures, TData extends RowData$2> {
|
|
2853
|
-
/** Resolved definition, or `undefined` when configuration is invalid. */
|
|
2854
|
-
aggregationFn: AggregationFnDef<TFeatures, TData, any, any> | undefined;
|
|
2855
|
-
/** Key used for a multiple result; scalar inline definitions have no id. */
|
|
2856
|
-
id: string | undefined;
|
|
2857
|
-
}
|
|
2858
|
-
/** Column-definition options installed by `rowAggregationFeature`. */
|
|
2859
|
-
interface ColumnDef_RowAggregation<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2860
|
-
/** Renderer used for a grouped row's aggregated cell. */
|
|
2861
|
-
aggregatedCell?: ColumnDefTemplate<ReturnType<Cell<TFeatures, TData, TValue>['getContext']>>;
|
|
2862
|
-
/**
|
|
2863
|
-
* One aggregation reference for a scalar result, or an array for a keyed
|
|
2864
|
-
* result object. Inline definitions in an array require an explicit `id`.
|
|
2865
|
-
*/
|
|
2866
|
-
aggregationFn?: AggregationFnOption<TFeatures, TData, TValue>;
|
|
2867
|
-
/**
|
|
2868
|
-
* Maximum relative sub-row depth used for grouped aggregation and cached
|
|
2869
|
-
* default totals. `0` selects the supplied root rows, `1` their direct
|
|
2870
|
-
* sub-rows, and so on. Defaults to `0`.
|
|
2871
|
-
*/
|
|
2872
|
-
maxAggregationDepth?: number;
|
|
2873
|
-
/**
|
|
2874
|
-
* Optionally supplies a precomputed aggregation value for this column.
|
|
2875
|
-
* Return `{ value }` to handle the request, including `{ value: undefined }`;
|
|
2876
|
-
* return `undefined` to use the local aggregation fallback.
|
|
2877
|
-
*/
|
|
2878
|
-
getAggregationValue?: (context: AggregationValueContext<TFeatures, TData, TValue>) => AggregationValueResult | undefined;
|
|
2879
|
-
}
|
|
2880
|
-
/** Column instance APIs installed by `rowAggregationFeature`. */
|
|
2881
|
-
interface Column_RowAggregation<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2882
|
-
/** Resolves the configured scalar or multiple aggregation definitions. */
|
|
2883
|
-
getAggregationFns: () => ReadonlyArray<ResolvedAggregationFn<TFeatures, TData>>;
|
|
2884
|
-
/**
|
|
2885
|
-
* Aggregates this column over the default pre-grouped row model, or over a
|
|
2886
|
-
* caller-provided array of rows. `options.maxDepth` overrides the column's
|
|
2887
|
-
* `maxAggregationDepth`. Explicit-row calls are intentionally not cached.
|
|
2888
|
-
*/
|
|
2889
|
-
getAggregationValue: <TResult = ColumnAggregationValue<TFeatures>>(options?: AggregationValueOptions<TFeatures, TData>) => TResult;
|
|
2890
|
-
/** Infers `sum` for a numeric first row and `extent` for a Date first row. */
|
|
2891
|
-
getAutoAggregationFn: () => AggregationFnDef<TFeatures, TData, any, any> | undefined;
|
|
2892
|
-
}
|
|
2893
|
-
/** Options for a caller-requested column aggregation value. */
|
|
2894
|
-
interface AggregationValueOptions<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2895
|
-
/** Overrides the column's `maxAggregationDepth` for this request. */
|
|
2896
|
-
maxDepth?: number;
|
|
2897
|
-
/** Rows to aggregate instead of the default pre-grouped row model. */
|
|
2898
|
-
rows?: ReadonlyArray<Row<TFeatures, TData>>;
|
|
2899
|
-
}
|
|
2900
|
-
/** Cell instance APIs installed by `rowAggregationFeature`. */
|
|
2901
|
-
interface Cell_RowAggregation {
|
|
2902
|
-
/** Whether this cell displays an aggregate on a synthetic grouped row. */
|
|
2903
|
-
getIsAggregated: () => boolean;
|
|
2904
|
-
}
|
|
2905
|
-
/** Internal per-row cache used while grouped aggregates are evaluated. */
|
|
2906
|
-
interface Row_RowAggregation {
|
|
2907
|
-
/** Cached aggregate results keyed by column id; created lazily on grouped rows. */
|
|
2908
|
-
_aggregationValuesCache?: Record<string, unknown>;
|
|
2909
|
-
}
|
|
2910
|
-
/** Values passed to a column-level aggregation-value provider. */
|
|
2911
|
-
interface AggregationValueContext<TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2912
|
-
/** The column whose value was requested. */
|
|
2913
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2914
|
-
/** Maximum relative sub-row depth used for the request. */
|
|
2915
|
-
maxDepth: number;
|
|
2916
|
-
/** Caller-provided rows, or `undefined` for the default row model. */
|
|
2917
|
-
rows?: ReadonlyArray<Row<TFeatures, TData>>;
|
|
2918
|
-
/** The table that owns the column. */
|
|
2919
|
-
table: Table<TFeatures, TData>;
|
|
2920
|
-
}
|
|
2921
|
-
/** Marks an aggregation-value override as handled. */
|
|
2922
|
-
interface AggregationValueResult<TResult = unknown> {
|
|
2923
|
-
/** The supplied value. `undefined` is still a handled result. */
|
|
2924
|
-
value: TResult;
|
|
2925
|
-
}
|
|
2926
|
-
/** Table options installed by `rowAggregationFeature`. */
|
|
2927
|
-
interface TableOptions_RowAggregation {
|
|
2928
|
-
/**
|
|
2929
|
-
* Disables local `column.getAggregationValue()` calculation when a column
|
|
2930
|
-
* override does not handle the request. Group values supplied by manually
|
|
2931
|
-
* grouped rows remain the responsibility of the data owner.
|
|
2932
|
-
*/
|
|
2933
|
-
manualAggregation?: boolean;
|
|
2934
|
-
}
|
|
2935
|
-
//#endregion
|
|
2936
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/Column.d.ts
|
|
2937
|
-
//#region src/types/Column.d.ts
|
|
2938
|
-
interface Column_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue = unknown> extends Column_Column<TFeatures, TData, TValue> {}
|
|
2939
|
-
interface Column_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2940
|
-
rowAggregationFeature: Column_RowAggregation<TFeatures, TData>;
|
|
2941
|
-
columnFacetingFeature: Column_ColumnFaceting<TFeatures, TData>;
|
|
2942
|
-
columnFilteringFeature: Column_ColumnFiltering<TFeatures, TData>;
|
|
2943
|
-
columnGroupingFeature: Column_ColumnGrouping;
|
|
2944
|
-
columnOrderingFeature: Column_ColumnOrdering;
|
|
2945
|
-
columnPinningFeature: Column_ColumnPinning;
|
|
2946
|
-
columnResizingFeature: Column_ColumnResizing;
|
|
2947
|
-
columnSizingFeature: Column_ColumnSizing;
|
|
2948
|
-
columnVisibilityFeature: Column_ColumnVisibility;
|
|
2949
|
-
globalFilteringFeature: Column_GlobalFiltering;
|
|
2950
|
-
rowSortingFeature: Column_RowSorting<TFeatures, TData>;
|
|
2951
|
-
}
|
|
2952
|
-
type Column$2<TFeatures extends TableFeatures, TData extends RowData$2, TValue = unknown> = Column_Core<TFeatures, TData, TValue> & ExtractFeatureMapTypes<TFeatures, Column_FeatureMap<TFeatures, TData>>;
|
|
2953
|
-
//#endregion
|
|
2954
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.types.d.ts
|
|
2955
|
-
//#region src/core/headers/coreHeadersFeature.types.d.ts
|
|
2956
|
-
interface Table_Headers<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
2957
|
-
/**
|
|
2958
|
-
* Builds the visible header groups for the current column tree, visibility,
|
|
2959
|
-
* and pinning state.
|
|
2960
|
-
*/
|
|
2961
|
-
getHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
2962
|
-
/**
|
|
2963
|
-
* Builds footer groups by reversing the current header group order.
|
|
2964
|
-
*/
|
|
2965
|
-
getFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
2966
|
-
/**
|
|
2967
|
-
* Flattens every header from every header group, including parent and
|
|
2968
|
-
* placeholder headers.
|
|
2969
|
-
*/
|
|
2970
|
-
getFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
2971
|
-
/**
|
|
2972
|
-
* Collects only leaf headers, excluding parent/group headers.
|
|
2973
|
-
*/
|
|
2974
|
-
getLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
2975
|
-
}
|
|
2976
|
-
interface HeaderContext<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2977
|
-
/**
|
|
2978
|
-
* An instance of a column.
|
|
2979
|
-
*/
|
|
2980
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2981
|
-
/**
|
|
2982
|
-
* An instance of a header.
|
|
2983
|
-
*/
|
|
2984
|
-
header: Header<TFeatures, TData, TValue>;
|
|
2985
|
-
/**
|
|
2986
|
-
* The table instance.
|
|
2987
|
-
*/
|
|
2988
|
-
table: Table<TFeatures, TData>;
|
|
2989
|
-
}
|
|
2990
|
-
interface Header_CoreProperties<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
2991
|
-
/**
|
|
2992
|
-
* The col-span for the header.
|
|
2993
|
-
*/
|
|
2994
|
-
colSpan: number;
|
|
2995
|
-
/**
|
|
2996
|
-
* The header's associated column object.
|
|
2997
|
-
*/
|
|
2998
|
-
column: Column$2<TFeatures, TData, TValue>;
|
|
2999
|
-
/**
|
|
3000
|
-
* The depth of the header, zero-indexed.
|
|
3001
|
-
*/
|
|
3002
|
-
depth: number;
|
|
3003
|
-
/**
|
|
3004
|
-
* The header's associated header group object.
|
|
3005
|
-
*/
|
|
3006
|
-
headerGroup: HeaderGroup<TFeatures, TData> | null;
|
|
3007
|
-
/**
|
|
3008
|
-
* The unique identifier for the header.
|
|
3009
|
-
*/
|
|
3010
|
-
id: string;
|
|
3011
|
-
/**
|
|
3012
|
-
* The index for the header within the header group.
|
|
3013
|
-
*/
|
|
3014
|
-
index: number;
|
|
3015
|
-
/**
|
|
3016
|
-
* A boolean denoting if the header is a placeholder header. Placeholder
|
|
3017
|
-
* headers fill the rows above a shallow leaf column's real header so that
|
|
3018
|
-
* every header group row accounts for every visible column. Render them as
|
|
3019
|
-
* empty cells, or use `header.rowSpan` to merge each chain of placeholders
|
|
3020
|
-
* into one vertically spanning header cell.
|
|
3021
|
-
*/
|
|
3022
|
-
isPlaceholder: boolean;
|
|
3023
|
-
/**
|
|
3024
|
-
* If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.
|
|
3025
|
-
*/
|
|
3026
|
-
placeholderId?: string;
|
|
3027
|
-
/**
|
|
3028
|
-
* The number of header group rows the header should span when merging header
|
|
3029
|
-
* cells vertically. A leaf column that is shallower than the deepest leaf
|
|
3030
|
-
* column produces a chain of placeholder headers above its real header; the
|
|
3031
|
-
* placeholder at the top of the chain reports the chain's full span, and
|
|
3032
|
-
* every header it covers (including the real leaf header in the bottom row)
|
|
3033
|
-
* reports 0. To merge vertically, skip headers with a rowSpan of 0 and
|
|
3034
|
-
* render every other header with the `rowSpan` attribute and its column's
|
|
3035
|
-
* header content, even when it is a placeholder. Headers in even column
|
|
3036
|
-
* trees always report 1.
|
|
3037
|
-
*/
|
|
3038
|
-
rowSpan: number;
|
|
3039
|
-
/**
|
|
3040
|
-
* The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.
|
|
3041
|
-
*/
|
|
3042
|
-
subHeaders: Array<Header<TFeatures, TData, TValue>>;
|
|
3043
|
-
/**
|
|
3044
|
-
* Reference to the parent table instance.
|
|
3045
|
-
*/
|
|
3046
|
-
table: Table<TFeatures, TData>;
|
|
3047
|
-
}
|
|
3048
|
-
interface Header_Header<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> extends Header_CoreProperties<TFeatures, TData, TValue> {
|
|
3049
|
-
/**
|
|
3050
|
-
* Returns the rendering context (or props) for column-based components like headers, footers and filters.
|
|
3051
|
-
*/
|
|
3052
|
-
getContext: () => HeaderContext<TFeatures, TData, TValue>;
|
|
3053
|
-
/**
|
|
3054
|
-
* Returns the leaf headers hierarchically nested under this header.
|
|
3055
|
-
*/
|
|
3056
|
-
getLeafHeaders: () => Array<Header<TFeatures, TData, TValue>>;
|
|
3057
|
-
}
|
|
3058
|
-
interface HeaderGroup_Header<in out TFeatures extends TableFeatures, in out TData extends RowData$2, TValue extends CellData = CellData> {
|
|
3059
|
-
depth: number;
|
|
3060
|
-
headers: Array<Header<TFeatures, TData, TValue>>;
|
|
3061
|
-
id: string;
|
|
3062
|
-
}
|
|
3063
|
-
//#endregion
|
|
3064
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/HeaderGroup.d.ts
|
|
3065
|
-
//#region src/types/HeaderGroup.d.ts
|
|
3066
|
-
interface HeaderGroup_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends HeaderGroup_Header<TFeatures, TData> {}
|
|
3067
|
-
interface HeaderGroup<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends HeaderGroup_Core<TFeatures, TData> {}
|
|
3068
|
-
//#endregion
|
|
3069
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.types.d.ts
|
|
3070
|
-
//#region src/features/column-pinning/columnPinningFeature.types.d.ts
|
|
3071
|
-
/**
|
|
3072
|
-
* Logical column pinning region.
|
|
3073
|
-
*
|
|
3074
|
-
* In LTR languages/layouts, `start` usually corresponds to left and `end`
|
|
3075
|
-
* usually corresponds to right. In RTL languages/layouts, `start` usually
|
|
3076
|
-
* corresponds to right and `end` usually corresponds to left.
|
|
3077
|
-
*/
|
|
3078
|
-
type ColumnPinningPosition = false | 'start' | 'end';
|
|
3079
|
-
interface ColumnPinningState {
|
|
3080
|
-
start: Array<string>;
|
|
3081
|
-
end: Array<string>;
|
|
3082
|
-
}
|
|
3083
|
-
interface TableState_ColumnPinning {
|
|
3084
|
-
columnPinning: ColumnPinningState;
|
|
3085
|
-
}
|
|
3086
|
-
interface TableOptions_ColumnPinning {
|
|
3087
|
-
/**
|
|
3088
|
-
* Allows columns to be pinned into logical start and end regions.
|
|
3089
|
-
*
|
|
3090
|
-
* In LTR languages/layouts, start usually corresponds to left and end to
|
|
3091
|
-
* right. In RTL languages/layouts, start usually corresponds to right and end
|
|
3092
|
-
* to left.
|
|
3093
|
-
*
|
|
3094
|
-
* Defaults to `true`; column-level `enablePinning` can still opt individual
|
|
3095
|
-
* columns out.
|
|
3096
|
-
*/
|
|
3097
|
-
enableColumnPinning?: boolean;
|
|
3098
|
-
/**
|
|
3099
|
-
* Called with an updater when column pinning state changes. Pair this with
|
|
3100
|
-
* `state.columnPinning` when using external state; external atoms can own the
|
|
3101
|
-
* slice without this callback.
|
|
3102
|
-
*/
|
|
3103
|
-
onColumnPinningChange?: OnChangeFn<ColumnPinningState>;
|
|
3104
|
-
}
|
|
3105
|
-
interface ColumnDef_ColumnPinning {
|
|
3106
|
-
/**
|
|
3107
|
-
* Allows this column's leaf columns to be pinned.
|
|
3108
|
-
*
|
|
3109
|
-
* Defaults to `true`; table-level `enableColumnPinning` must also allow
|
|
3110
|
-
* pinning.
|
|
3111
|
-
*/
|
|
3112
|
-
enablePinning?: boolean;
|
|
3113
|
-
}
|
|
3114
|
-
interface Column_ColumnPinning {
|
|
3115
|
-
/**
|
|
3116
|
-
* Checks whether this column or any of its leaves can be pinned.
|
|
3117
|
-
*/
|
|
3118
|
-
getCanPin: () => boolean;
|
|
3119
|
-
/**
|
|
3120
|
-
* Reads the column's logical pinned position: `'start'`, `'end'`, or `false`.
|
|
3121
|
-
*/
|
|
3122
|
-
getIsPinned: () => ColumnPinningPosition;
|
|
3123
|
-
/**
|
|
3124
|
-
* Finds this column's index within its pinned region.
|
|
3125
|
-
*/
|
|
3126
|
-
getPinnedIndex: () => number;
|
|
3127
|
-
/**
|
|
3128
|
-
* Pins this column's leaf columns to logical start or end, or unpins them
|
|
3129
|
-
* when `false` is passed.
|
|
3130
|
-
*/
|
|
3131
|
-
pin: (position: ColumnPinningPosition) => void;
|
|
3132
|
-
}
|
|
3133
|
-
interface Row_ColumnPinning<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3134
|
-
/**
|
|
3135
|
-
* Gets visible row cells whose columns are not pinned start or end.
|
|
3136
|
-
*/
|
|
3137
|
-
getCenterVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>;
|
|
3138
|
-
/**
|
|
3139
|
-
* Gets visible row cells whose columns are pinned to logical start.
|
|
3140
|
-
*/
|
|
3141
|
-
getStartVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>;
|
|
3142
|
-
/**
|
|
3143
|
-
* Gets visible row cells whose columns are pinned to logical end.
|
|
3144
|
-
*/
|
|
3145
|
-
getEndVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>;
|
|
3146
|
-
}
|
|
3147
|
-
interface Table_ColumnPinning<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3148
|
-
/**
|
|
3149
|
-
* Builds flat center-region headers for columns that are not pinned,
|
|
3150
|
-
* including parent headers.
|
|
3151
|
-
*/
|
|
3152
|
-
getCenterFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3153
|
-
/**
|
|
3154
|
-
* Builds footer groups for the center region of unpinned columns.
|
|
3155
|
-
*/
|
|
3156
|
-
getCenterFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3157
|
-
/**
|
|
3158
|
-
* Builds header groups for the center region of unpinned columns.
|
|
3159
|
-
*/
|
|
3160
|
-
getCenterHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3161
|
-
/**
|
|
3162
|
-
* Gets leaf columns that are not pinned start or end.
|
|
3163
|
-
*/
|
|
3164
|
-
getCenterLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3165
|
-
/**
|
|
3166
|
-
* Builds center-region leaf headers for columns that are not pinned.
|
|
3167
|
-
*/
|
|
3168
|
-
getCenterLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3169
|
-
/**
|
|
3170
|
-
* Lists visible leaf columns in the unpinned center region.
|
|
3171
|
-
*/
|
|
3172
|
-
getCenterVisibleLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3173
|
-
/**
|
|
3174
|
-
* Checks whether any columns are pinned, optionally limited to one side.
|
|
3175
|
-
*/
|
|
3176
|
-
getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean;
|
|
3177
|
-
/**
|
|
3178
|
-
* Builds flat logical start-region headers for pinned columns, including parent
|
|
3179
|
-
* headers.
|
|
3180
|
-
*/
|
|
3181
|
-
getStartFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3182
|
-
/**
|
|
3183
|
-
* Builds footer groups for logical start-pinned columns.
|
|
3184
|
-
*/
|
|
3185
|
-
getStartFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3186
|
-
/**
|
|
3187
|
-
* Builds header groups for logical start-pinned columns.
|
|
3188
|
-
*/
|
|
3189
|
-
getStartHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3190
|
-
/**
|
|
3191
|
-
* Gets leaf columns pinned to the logical start region in pinning-state order.
|
|
3192
|
-
*/
|
|
3193
|
-
getStartLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3194
|
-
/**
|
|
3195
|
-
* Builds leaf headers for logical start-pinned columns.
|
|
3196
|
-
*/
|
|
3197
|
-
getStartLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3198
|
-
/**
|
|
3199
|
-
* Lists visible leaf columns in the logical start pinned region.
|
|
3200
|
-
*/
|
|
3201
|
-
getStartVisibleLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3202
|
-
/**
|
|
3203
|
-
* Builds flat logical end-region headers for pinned columns, including parent
|
|
3204
|
-
* headers.
|
|
3205
|
-
*/
|
|
3206
|
-
getEndFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3207
|
-
/**
|
|
3208
|
-
* Builds footer groups for logical end-pinned columns.
|
|
3209
|
-
*/
|
|
3210
|
-
getEndFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3211
|
-
/**
|
|
3212
|
-
* Builds header groups for logical end-pinned columns.
|
|
3213
|
-
*/
|
|
3214
|
-
getEndHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>;
|
|
3215
|
-
/**
|
|
3216
|
-
* Gets leaf columns pinned to the logical end region in pinning-state order.
|
|
3217
|
-
*/
|
|
3218
|
-
getEndLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3219
|
-
/**
|
|
3220
|
-
* Builds leaf headers for logical end-pinned columns.
|
|
3221
|
-
*/
|
|
3222
|
-
getEndLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>;
|
|
3223
|
-
/**
|
|
3224
|
-
* Lists visible leaf columns in the logical end pinned region.
|
|
3225
|
-
*/
|
|
3226
|
-
getEndVisibleLeafColumns: () => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3227
|
-
/**
|
|
3228
|
-
* Resets `columnPinning` to `initialState.columnPinning`.
|
|
3229
|
-
*
|
|
3230
|
-
* Pass `true` to ignore initial state and reset to empty start/end arrays.
|
|
3231
|
-
*/
|
|
3232
|
-
resetColumnPinning: (defaultState?: boolean) => void;
|
|
3233
|
-
/**
|
|
3234
|
-
* Updates column pinning state with a next state or updater function.
|
|
3235
|
-
*/
|
|
3236
|
-
setColumnPinning: (updater: Updater<ColumnPinningState>) => void;
|
|
3237
|
-
/**
|
|
3238
|
-
* Returns pinned leaf columns for the requested pinning region.
|
|
3239
|
-
*/
|
|
3240
|
-
getPinnedLeafColumns: (position: ColumnPinningPosition | 'center') => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3241
|
-
/**
|
|
3242
|
-
* Lists visible leaf columns for the requested pinning region.
|
|
3243
|
-
*/
|
|
3244
|
-
getPinnedVisibleLeafColumns: (position: ColumnPinningPosition | 'center') => Array<Column$2<TFeatures, TData, unknown>>;
|
|
3245
|
-
}
|
|
3246
|
-
//#endregion
|
|
3247
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/Row.d.ts
|
|
3248
|
-
//#region src/types/Row.d.ts
|
|
3249
|
-
interface Row_Core<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends Row_Row<TFeatures, TData> {}
|
|
3250
|
-
interface Row_FeatureMap<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3251
|
-
rowAggregationFeature: Row_RowAggregation;
|
|
3252
|
-
columnFilteringFeature: Row_ColumnFiltering<TFeatures, TData>;
|
|
3253
|
-
columnGroupingFeature: Row_ColumnGrouping;
|
|
3254
|
-
columnPinningFeature: Row_ColumnPinning<TFeatures, TData>;
|
|
3255
|
-
columnVisibilityFeature: Row_ColumnVisibility<TFeatures, TData>;
|
|
3256
|
-
rowExpandingFeature: Row_RowExpanding;
|
|
3257
|
-
rowPinningFeature: Row_RowPinning;
|
|
3258
|
-
rowSelectionFeature: Row_RowSelection;
|
|
3259
|
-
}
|
|
3260
|
-
type Row<TFeatures extends TableFeatures, TData extends RowData$2> = Row_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Row_FeatureMap<TFeatures, TData>>;
|
|
3261
|
-
//#endregion
|
|
3262
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.types.d.ts
|
|
3263
|
-
//#region src/features/row-sorting/rowSortingFeature.types.d.ts
|
|
3264
|
-
type SortDirection = 'asc' | 'desc';
|
|
3265
|
-
interface ColumnSort {
|
|
3266
|
-
desc: boolean;
|
|
3267
|
-
id: string;
|
|
3268
|
-
}
|
|
3269
|
-
type SortingState = Array<ColumnSort>;
|
|
3270
|
-
interface TableState_RowSorting {
|
|
3271
|
-
sorting: SortingState;
|
|
3272
|
-
}
|
|
3273
|
-
interface RowModelFns_RowSorting<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3274
|
-
sortFns: Record<string, SortFn<TFeatures, TData>>;
|
|
3275
|
-
}
|
|
3276
|
-
interface SortFns {}
|
|
3277
|
-
interface SortFn<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3278
|
-
(rowA: Row<TFeatures, TData>, rowB: Row<TFeatures, TData>, columnId: string): number;
|
|
3279
|
-
/**
|
|
3280
|
-
* Normalizes each row's value before the two sides are compared. Only
|
|
3281
|
-
* honored by sorting functions built with `constructSortFn` (including all
|
|
3282
|
-
* built-in sorting functions).
|
|
3283
|
-
*/
|
|
3284
|
-
resolveDataValue?: TransformDataValueFn;
|
|
3285
|
-
}
|
|
3286
|
-
/**
|
|
3287
|
-
* The definition object accepted by `constructSortFn`.
|
|
3288
|
-
*
|
|
3289
|
-
* `sort` is a value-level comparator: it receives both rows' (resolved) data
|
|
3290
|
-
* values instead of the whole rows, so normalization concerns stay in
|
|
3291
|
-
* `resolveDataValue`.
|
|
3292
|
-
*/
|
|
3293
|
-
interface SortFnDef<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3294
|
-
sort: (dataValueA: any, dataValueB: any, rowA: Row<TFeatures, TData>, rowB: Row<TFeatures, TData>, columnId: string) => number;
|
|
3295
|
-
resolveDataValue?: TransformDataValueFn;
|
|
3296
|
-
}
|
|
3297
|
-
/**
|
|
3298
|
-
* The shape returned by `constructSortFn`: a `SortFn` with its definition
|
|
3299
|
-
* attached, so variants can be built by spreading it into another
|
|
3300
|
-
* `constructSortFn` call.
|
|
3301
|
-
*
|
|
3302
|
-
* The call signature is generic so a created sorting function can be used
|
|
3303
|
-
* with any table's rows, regardless of the feature set it was defined
|
|
3304
|
-
* against.
|
|
3305
|
-
*/
|
|
3306
|
-
interface CreatedSortFn<in out TFeatures extends TableFeatures, in out TData extends RowData$2> extends SortFnDef<TFeatures, TData> {
|
|
3307
|
-
<TRowFeatures extends TableFeatures, TRowData extends RowData$2>(rowA: Row<TRowFeatures, TRowData>, rowB: Row<TRowFeatures, TRowData>, columnId: string): number;
|
|
3308
|
-
}
|
|
3309
|
-
/**
|
|
3310
|
-
* Resolves the valid string names for `columnDef.sortFn` for a feature set.
|
|
3311
|
-
*
|
|
3312
|
-
* When the features object declares a `sortFns` registry
|
|
3313
|
-
* (`tableFeatures({ ..., sortFns })`), its keys are the only valid names; a
|
|
3314
|
-
* name is only assignable if a sorting function is actually registered for it.
|
|
3315
|
-
* Otherwise this falls back to the global declaration-merged `SortFns`
|
|
3316
|
-
* interface.
|
|
3317
|
-
*/
|
|
3318
|
-
type ExtractSortFnKeys<TFeatures extends TableFeatures> = IsAny<TFeatures> extends true ? keyof SortFns | BuiltInSortFn : TFeatures extends {
|
|
3319
|
-
sortFns: infer TSortFns extends object;
|
|
3320
|
-
} ? Extract<keyof TSortFns, string> : keyof SortFns;
|
|
3321
|
-
type SortFnOption<TFeatures extends TableFeatures, TData extends RowData$2> = 'auto' | ExtractSortFnKeys<TFeatures> | SortFn<TFeatures, TData>;
|
|
3322
|
-
interface ColumnDef_RowSorting<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3323
|
-
/**
|
|
3324
|
-
* Enables/Disables multi-sorting for this column.
|
|
3325
|
-
*/
|
|
3326
|
-
enableMultiSort?: boolean;
|
|
3327
|
-
/**
|
|
3328
|
-
* Enables/Disables sorting for this column.
|
|
3329
|
-
*/
|
|
3330
|
-
enableSorting?: boolean;
|
|
3331
|
-
/**
|
|
3332
|
-
* Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, e.g. a ranking (1st, 2nd, 3rd) or golf-like scoring
|
|
3333
|
-
*/
|
|
3334
|
-
invertSorting?: boolean;
|
|
3335
|
-
/**
|
|
3336
|
-
* Set to `true` for sorting toggles on this column to start in the descending direction.
|
|
3337
|
-
*/
|
|
3338
|
-
sortDescFirst?: boolean;
|
|
3339
|
-
/**
|
|
3340
|
-
* The sorting function to use with this column.
|
|
3341
|
-
* - A `string` referencing a built-in sorting function
|
|
3342
|
-
* - A custom sorting function
|
|
3343
|
-
*/
|
|
3344
|
-
sortFn?: SortFnOption<TFeatures, TData>;
|
|
3345
|
-
/**
|
|
3346
|
-
* The priority of undefined values when sorting this column.
|
|
3347
|
-
* - `false`
|
|
3348
|
-
* - Undefined values will be passed to the sorting function like any other value with no special handling; the sorting function is responsible for handling them
|
|
3349
|
-
* - `-1`
|
|
3350
|
-
* - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
|
|
3351
|
-
* - `1`
|
|
3352
|
-
* - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
|
|
3353
|
-
* - `'first'`
|
|
3354
|
-
* - Undefined values will be pushed to the beginning of the list regardless of sort direction
|
|
3355
|
-
* - `'last'`
|
|
3356
|
-
* - Undefined values will be pushed to the end of the list regardless of sort direction
|
|
3357
|
-
*/
|
|
3358
|
-
sortUndefined?: false | -1 | 1 | 'first' | 'last';
|
|
3359
|
-
}
|
|
3360
|
-
interface Column_RowSorting<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3361
|
-
/**
|
|
3362
|
-
* Removes this column from the table's sorting state
|
|
3363
|
-
*/
|
|
3364
|
-
clearSorting: () => void;
|
|
3365
|
-
/**
|
|
3366
|
-
* Returns a sort direction automatically inferred based on the columns values.
|
|
3367
|
-
*/
|
|
3368
|
-
getAutoSortDir: () => SortDirection;
|
|
3369
|
-
/**
|
|
3370
|
-
* Returns a sorting function automatically inferred based on the columns values.
|
|
3371
|
-
*/
|
|
3372
|
-
getAutoSortFn: () => SortFn<TFeatures, TData>;
|
|
3373
|
-
/**
|
|
3374
|
-
* Returns whether this column can be multi-sorted.
|
|
3375
|
-
*/
|
|
3376
|
-
getCanMultiSort: () => boolean;
|
|
3377
|
-
/**
|
|
3378
|
-
* Returns whether this column can be sorted.
|
|
3379
|
-
*/
|
|
3380
|
-
getCanSort: () => boolean;
|
|
3381
|
-
/**
|
|
3382
|
-
* Returns the first direction that should be used when sorting this column.
|
|
3383
|
-
*/
|
|
3384
|
-
getFirstSortDir: () => SortDirection;
|
|
3385
|
-
/**
|
|
3386
|
-
* Reads this column's current sort direction, or `false` when unsorted.
|
|
3387
|
-
*/
|
|
3388
|
-
getIsSorted: () => false | SortDirection;
|
|
3389
|
-
/**
|
|
3390
|
-
* Returns the next sorting order. Pass `multi` to resolve the order for a
|
|
3391
|
-
* multi-sort toggle, where `enableMultiRemove` governs whether the cycle can
|
|
3392
|
-
* remove the sort.
|
|
3393
|
-
*/
|
|
3394
|
-
getNextSortingOrder: (multi?: boolean) => SortDirection | false;
|
|
3395
|
-
/**
|
|
3396
|
-
* Finds this column's position in the ordered sorting state.
|
|
3397
|
-
*/
|
|
3398
|
-
getSortIndex: () => number;
|
|
3399
|
-
/**
|
|
3400
|
-
* Returns the resolved sorting function to be used for this column
|
|
3401
|
-
*/
|
|
3402
|
-
getSortFn: () => SortFn<TFeatures, TData>;
|
|
3403
|
-
/**
|
|
3404
|
-
* Creates a header/control handler that toggles this column's sorting state.
|
|
3405
|
-
*/
|
|
3406
|
-
getToggleSortingHandler: () => undefined | ((event: unknown) => void);
|
|
3407
|
-
/**
|
|
3408
|
-
* Toggles this column's sorting state. If `desc` is provided, it will force the sort direction to that value. If `isMulti` is provided, it will additively multi-sort the column (or toggle it if it is already sorted).
|
|
3409
|
-
*/
|
|
3410
|
-
toggleSorting: (desc?: boolean, isMulti?: boolean) => void;
|
|
3411
|
-
}
|
|
3412
|
-
interface TableOptions_RowSorting {
|
|
3413
|
-
/**
|
|
3414
|
-
* Resets sorting to its initial state when the `data` option changes.
|
|
3415
|
-
*
|
|
3416
|
-
* This is disabled by default. `autoResetAll` overrides this option when it
|
|
3417
|
-
* is explicitly set.
|
|
3418
|
-
*/
|
|
3419
|
-
autoResetSorting?: boolean;
|
|
3420
|
-
/**
|
|
3421
|
-
* Allows multi-sort toggles to remove a column from sorting state.
|
|
3422
|
-
*/
|
|
3423
|
-
enableMultiRemove?: boolean;
|
|
3424
|
-
/**
|
|
3425
|
-
* Enables/Disables multi-sorting for the table.
|
|
3426
|
-
*/
|
|
3427
|
-
enableMultiSort?: boolean;
|
|
3428
|
-
/**
|
|
3429
|
-
* Enables/Disables sorting for the table.
|
|
3430
|
-
*/
|
|
3431
|
-
enableSorting?: boolean;
|
|
3432
|
-
/**
|
|
3433
|
-
* Enables/Disables the ability to remove sorting for the table.
|
|
3434
|
-
* - If `true` then changing sort order will cycle like: 'none' -> 'desc' -> 'asc' -> 'none' -> ...
|
|
3435
|
-
* - If `false` then changing sort order will cycle like: 'none' -> 'desc' -> 'asc' -> 'desc' -> 'asc' -> ...
|
|
3436
|
-
*/
|
|
3437
|
-
enableSortingRemoval?: boolean;
|
|
3438
|
-
/**
|
|
3439
|
-
* Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return `true` if the event should trigger a multi-sort.
|
|
3440
|
-
*/
|
|
3441
|
-
isMultiSortEvent?: (e: unknown) => boolean;
|
|
3442
|
-
/**
|
|
3443
|
-
* Enables manual sorting for the table. If this is `true`, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting.
|
|
3444
|
-
*/
|
|
3445
|
-
manualSorting?: boolean;
|
|
3446
|
-
/**
|
|
3447
|
-
* Set a maximum number of columns that can be multi-sorted.
|
|
3448
|
-
*/
|
|
3449
|
-
maxMultiSortColCount?: number;
|
|
3450
|
-
/**
|
|
3451
|
-
* Called with an updater when sorting state changes. Pair this with
|
|
3452
|
-
* `state.sorting` when using external state; external atoms can own the slice
|
|
3453
|
-
* without this callback.
|
|
3454
|
-
*/
|
|
3455
|
-
onSortingChange?: OnChangeFn<SortingState>;
|
|
3456
|
-
/**
|
|
3457
|
-
* If `true`, all sorts will default to descending as their first toggle state.
|
|
3458
|
-
*/
|
|
3459
|
-
sortDescFirst?: boolean;
|
|
3460
|
-
}
|
|
3461
|
-
interface Table_RowSorting<in out _TFeatures extends TableFeatures, in out _TData extends RowData$2> {
|
|
3462
|
-
/**
|
|
3463
|
-
* Resets `sorting` to `initialState.sorting`.
|
|
3464
|
-
*
|
|
3465
|
-
* Pass `true` to ignore initial state and reset to `[]`.
|
|
3466
|
-
*/
|
|
3467
|
-
resetSorting: (defaultState?: boolean) => void;
|
|
3468
|
-
/**
|
|
3469
|
-
* Updates sorting state with a next ordered array or updater function.
|
|
3470
|
-
*/
|
|
3471
|
-
setSorting: (updater: Updater<SortingState>) => void;
|
|
3472
|
-
}
|
|
3473
|
-
interface Table_RowModels_Sorted<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3474
|
-
/**
|
|
3475
|
-
* Reads the row model immediately before sorting.
|
|
3476
|
-
*/
|
|
3477
|
-
getPreSortedRowModel: () => RowModel<TFeatures, TData>;
|
|
3478
|
-
/**
|
|
3479
|
-
* Resolves the row model after sorting has been applied.
|
|
3480
|
-
*/
|
|
3481
|
-
getSortedRowModel: () => RowModel<TFeatures, TData>;
|
|
3482
|
-
}
|
|
3483
|
-
interface CachedRowModel_Sorted<in out TFeatures extends TableFeatures, in out TData extends RowData$2> {
|
|
3484
|
-
sortedRowModel: () => RowModel<TFeatures, TData>;
|
|
3485
|
-
}
|
|
3486
|
-
//#endregion
|
|
3487
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/cell-selection/cellSelectionFeature.d.ts
|
|
3488
|
-
//#region src/features/cell-selection/cellSelectionFeature.d.ts
|
|
3489
|
-
/**
|
|
3490
|
-
* Feature that adds spreadsheet-style cell range selection state and APIs.
|
|
3491
|
-
*/
|
|
3492
|
-
declare const cellSelectionFeature: TableFeature;
|
|
3493
|
-
//#endregion
|
|
3494
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/cell-spanning/cellSpanningFeature.d.ts
|
|
3495
|
-
//#region src/features/cell-spanning/cellSpanningFeature.d.ts
|
|
3496
|
-
/**
|
|
3497
|
-
* Feature that merges adjacent cells that share a value into row-spanning
|
|
3498
|
-
* cells, and lets a column def declare column-spanning cells per row.
|
|
3499
|
-
*
|
|
3500
|
-
* Stateless: spans are always derived from the rows that are currently
|
|
3501
|
-
* rendered, so there is nothing to persist and nothing to configure beyond the
|
|
3502
|
-
* column defs.
|
|
3503
|
-
*/
|
|
3504
|
-
declare const cellSpanningFeature: TableFeature;
|
|
3505
|
-
//#endregion
|
|
3506
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-faceting/columnFacetingFeature.d.ts
|
|
3507
|
-
//#region src/features/column-faceting/columnFacetingFeature.d.ts
|
|
3508
|
-
/**
|
|
3509
|
-
* Feature that derives faceted row models, unique values, and min/max values for filters.
|
|
3510
|
-
*
|
|
3511
|
-
* These APIs are deliberately not memoized at this layer: the stock
|
|
3512
|
-
* `createFaceted*` factories memoize internally (like every other stock row
|
|
3513
|
-
* model), and an extra memo layer here would freeze custom factories whose
|
|
3514
|
-
* data changes independently of the faceted row model. Custom factories own
|
|
3515
|
-
* their memoization.
|
|
3516
|
-
*/
|
|
3517
|
-
declare const columnFacetingFeature: TableFeature;
|
|
3518
|
-
//#endregion
|
|
3519
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-aggregation/rowAggregationFeature.d.ts
|
|
3520
|
-
//#region src/features/row-aggregation/rowAggregationFeature.d.ts
|
|
3521
|
-
/**
|
|
3522
|
-
* Independent aggregation feature for grouped values and root/custom-row totals.
|
|
3523
|
-
*/
|
|
3524
|
-
declare const rowAggregationFeature: TableFeature;
|
|
3525
|
-
//#endregion
|
|
3526
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-filtering/columnFilteringFeature.d.ts
|
|
3527
|
-
//#region src/features/column-filtering/columnFilteringFeature.d.ts
|
|
3528
|
-
/**
|
|
3529
|
-
* Feature that adds per-column filtering state, options, and column/table filter APIs.
|
|
3530
|
-
*/
|
|
3531
|
-
declare const columnFilteringFeature$1: TableFeature;
|
|
3532
|
-
//#endregion
|
|
3533
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-grouping/columnGroupingFeature.d.ts
|
|
3534
|
-
//#region src/features/column-grouping/columnGroupingFeature.d.ts
|
|
3535
|
-
/**
|
|
3536
|
-
* Feature that adds column grouping state and grouped row APIs.
|
|
3537
|
-
*/
|
|
3538
|
-
declare const columnGroupingFeature: TableFeature;
|
|
3539
|
-
//#endregion
|
|
3540
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-ordering/columnOrderingFeature.d.ts
|
|
3541
|
-
//#region src/features/column-ordering/columnOrderingFeature.d.ts
|
|
3542
|
-
/**
|
|
3543
|
-
* Feature that adds column ordering state and APIs for ordering leaf columns.
|
|
3544
|
-
*/
|
|
3545
|
-
declare const columnOrderingFeature: TableFeature;
|
|
3546
|
-
//#endregion
|
|
3547
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-pinning/columnPinningFeature.d.ts
|
|
3548
|
-
//#region src/features/column-pinning/columnPinningFeature.d.ts
|
|
3549
|
-
/**
|
|
3550
|
-
* Feature that adds column pinning state and APIs for logical start, center,
|
|
3551
|
-
* and end regions.
|
|
3552
|
-
*
|
|
3553
|
-
* In LTR languages/layouts, start usually corresponds to left and end to
|
|
3554
|
-
* right. In RTL languages/layouts, start usually corresponds to right and end
|
|
3555
|
-
* to left.
|
|
3556
|
-
*/
|
|
3557
|
-
declare const columnPinningFeature: TableFeature;
|
|
3558
|
-
//#endregion
|
|
3559
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-resizing/columnResizingFeature.d.ts
|
|
3560
|
-
//#region src/features/column-resizing/columnResizingFeature.d.ts
|
|
3561
|
-
/**
|
|
3562
|
-
* Feature that adds column resizing state, options, and resize handlers.
|
|
3563
|
-
*/
|
|
3564
|
-
declare const columnResizingFeature: TableFeature;
|
|
3565
|
-
//#endregion
|
|
3566
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-sizing/columnSizingFeature.d.ts
|
|
3567
|
-
//#region src/features/column-sizing/columnSizingFeature.d.ts
|
|
3568
|
-
/**
|
|
3569
|
-
* Feature that adds column sizing state, defaults, and size measurement APIs.
|
|
3570
|
-
*/
|
|
3571
|
-
declare const columnSizingFeature: TableFeature;
|
|
3572
|
-
//#endregion
|
|
3573
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.d.ts
|
|
3574
|
-
//#region src/features/column-visibility/columnVisibilityFeature.d.ts
|
|
3575
|
-
/**
|
|
3576
|
-
* Feature that adds column visibility state and APIs for hiding and showing columns.
|
|
3577
|
-
*/
|
|
3578
|
-
declare const columnVisibilityFeature$1: TableFeature;
|
|
3579
|
-
//#endregion
|
|
3580
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/global-filtering/globalFilteringFeature.d.ts
|
|
3581
|
-
//#region src/features/global-filtering/globalFilteringFeature.d.ts
|
|
3582
|
-
/**
|
|
3583
|
-
* Feature that adds global filtering state, defaults, and global filter APIs.
|
|
3584
|
-
*/
|
|
3585
|
-
declare const globalFilteringFeature: TableFeature;
|
|
3586
|
-
//#endregion
|
|
3587
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-expanding/rowExpandingFeature.d.ts
|
|
3588
|
-
//#region src/features/row-expanding/rowExpandingFeature.d.ts
|
|
3589
|
-
/**
|
|
3590
|
-
* Feature that adds row expansion state and APIs for expandable row trees.
|
|
3591
|
-
*/
|
|
3592
|
-
declare const rowExpandingFeature: TableFeature;
|
|
3593
|
-
//#endregion
|
|
3594
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-pagination/rowPaginationFeature.d.ts
|
|
3595
|
-
//#region src/features/row-pagination/rowPaginationFeature.d.ts
|
|
3596
|
-
/**
|
|
3597
|
-
* Feature that adds pagination state and table APIs for page navigation.
|
|
3598
|
-
*/
|
|
3599
|
-
declare const rowPaginationFeature$1: TableFeature;
|
|
3600
|
-
//#endregion
|
|
3601
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-pinning/rowPinningFeature.d.ts
|
|
3602
|
-
//#region src/features/row-pinning/rowPinningFeature.d.ts
|
|
3603
|
-
/**
|
|
3604
|
-
* Feature that adds row pinning state and APIs for top, center, and bottom rows.
|
|
3605
|
-
*/
|
|
3606
|
-
declare const rowPinningFeature: TableFeature;
|
|
3607
|
-
//#endregion
|
|
3608
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.d.ts
|
|
3609
|
-
//#region src/features/row-selection/rowSelectionFeature.d.ts
|
|
3610
|
-
/**
|
|
3611
|
-
* Feature that adds row selection state and APIs for row and page selection.
|
|
3612
|
-
*/
|
|
3613
|
-
declare const rowSelectionFeature$1: TableFeature;
|
|
3614
|
-
//#endregion
|
|
3615
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.d.ts
|
|
3616
|
-
//#region src/features/row-sorting/rowSortingFeature.d.ts
|
|
3617
|
-
/**
|
|
3618
|
-
* Feature that adds row sorting state, defaults, and column/table sorting APIs.
|
|
3619
|
-
*/
|
|
3620
|
-
declare const rowSortingFeature$1: TableFeature;
|
|
3621
|
-
//#endregion
|
|
3622
|
-
//#region ../../node_modules/@tanstack/table-core/dist/features/stockFeatures.d.ts
|
|
3623
|
-
//#region src/features/stockFeatures.d.ts
|
|
3624
|
-
interface StockFeatures {
|
|
3625
|
-
cellSelectionFeature: typeof cellSelectionFeature;
|
|
3626
|
-
cellSpanningFeature: typeof cellSpanningFeature;
|
|
3627
|
-
columnFacetingFeature: typeof columnFacetingFeature;
|
|
3628
|
-
columnFilteringFeature: typeof columnFilteringFeature$1;
|
|
3629
|
-
columnGroupingFeature: typeof columnGroupingFeature;
|
|
3630
|
-
columnOrderingFeature: typeof columnOrderingFeature;
|
|
3631
|
-
columnPinningFeature: typeof columnPinningFeature;
|
|
3632
|
-
columnResizingFeature: typeof columnResizingFeature;
|
|
3633
|
-
columnSizingFeature: typeof columnSizingFeature;
|
|
3634
|
-
columnVisibilityFeature: typeof columnVisibilityFeature$1;
|
|
3635
|
-
globalFilteringFeature: typeof globalFilteringFeature;
|
|
3636
|
-
rowAggregationFeature: typeof rowAggregationFeature;
|
|
3637
|
-
rowExpandingFeature: typeof rowExpandingFeature;
|
|
3638
|
-
rowPaginationFeature: typeof rowPaginationFeature$1;
|
|
3639
|
-
rowPinningFeature: typeof rowPinningFeature;
|
|
3640
|
-
rowSelectionFeature: typeof rowSelectionFeature$1;
|
|
3641
|
-
rowSortingFeature: typeof rowSortingFeature$1;
|
|
3642
|
-
}
|
|
3643
|
-
//#endregion
|
|
3644
|
-
//#region ../../node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts
|
|
3645
|
-
//#region src/types/TableFeatures.d.ts
|
|
3646
|
-
/**
|
|
3647
|
-
* Detects whether a type is `any`.
|
|
3648
|
-
*
|
|
3649
|
-
* Several feature-map helpers need a separate `any` path so broad generic
|
|
3650
|
-
* usage still exposes all known feature APIs instead of narrowing to no keys.
|
|
3651
|
-
*/
|
|
3652
|
-
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
3653
|
-
/**
|
|
3654
|
-
* Converts a union to an intersection, returning `{}` for `never`.
|
|
3655
|
-
*
|
|
3656
|
-
* This keeps empty feature-map lookups usable as an intersection member.
|
|
3657
|
-
*/
|
|
3658
|
-
type UnionToIntersectionOrEmpty<T> = [T] extends [never] ? {} : UnionToIntersection<T> & {};
|
|
3659
|
-
/**
|
|
3660
|
-
* Extracts the API/types contributed by the features present in `TFeatures`.
|
|
3661
|
-
*
|
|
3662
|
-
* `TFeatureMap` maps feature keys to the types they contribute. When
|
|
3663
|
-
* `TFeatures` is `any`, all feature-map entries are included to preserve the
|
|
3664
|
-
* permissive behavior expected by broad table types. Otherwise, only entries
|
|
3665
|
-
* whose keys are present in `TFeatures` are intersected together.
|
|
3666
|
-
*/
|
|
3667
|
-
type ExtractFeatureMapTypes<TFeatures extends TableFeatures, TFeatureMap extends object> = IsAny<TFeatures> extends true ? UnionToIntersection<TFeatureMap[keyof TFeatureMap]> : UnionToIntersectionOrEmpty<TFeatureMap[Extract<keyof TFeatures, keyof TFeatureMap>]>;
|
|
3668
|
-
/**
|
|
3669
|
-
* Declaration-merge target for custom table features.
|
|
3670
|
-
*
|
|
3671
|
-
* Add custom feature keys here so `TableFeatures` can accept them in the
|
|
3672
|
-
* `features` option and use the same feature-map extraction system as built-in
|
|
3673
|
-
* features.
|
|
3674
|
-
*/
|
|
3675
|
-
interface Plugins {}
|
|
3676
|
-
/**
|
|
3677
|
-
* Keys of the `features` option that are not table features themselves.
|
|
3678
|
-
*
|
|
3679
|
-
* These slots carry per-table types (`tableMeta`, `columnMeta`), row model
|
|
3680
|
-
* factories, and row model function registries. They are stripped from the
|
|
3681
|
-
* table's registered `_features` at runtime and excluded from feature-derived
|
|
3682
|
-
* options such as the generated `debug*` keys.
|
|
3683
|
-
*/
|
|
3684
|
-
type NonFeatureKeys = 'aggregationFns' | 'columnMeta' | 'coreRowModel' | 'expandedRowModel' | 'facetedMinMaxValues' | 'facetedRowModel' | 'facetedUniqueValues' | 'filterFns' | 'filterMeta' | 'filteredRowModel' | 'groupedRowModel' | 'paginatedRowModel' | 'sortFns' | 'sortedRowModel' | 'tableMeta';
|
|
3685
|
-
/**
|
|
3686
|
-
* Maps each row model and fn registry slot to the feature(s) that must be
|
|
3687
|
-
* registered alongside it in the same features object.
|
|
3688
|
-
*
|
|
3689
|
-
* Custom features can declaration-merge their own slot prerequisites into this
|
|
3690
|
-
* interface to get the same validation from `tableFeatures()`.
|
|
3691
|
-
*/
|
|
3692
|
-
interface FeatureSlotPrereqs {
|
|
3693
|
-
/**
|
|
3694
|
-
* Named aggregation functions require the independent aggregation feature.
|
|
3695
|
-
*/
|
|
3696
|
-
aggregationFns: 'rowAggregationFeature';
|
|
3697
|
-
/**
|
|
3698
|
-
* Column resizing builds on the column sizing state and APIs.
|
|
3699
|
-
*/
|
|
3700
|
-
columnResizingFeature: 'columnSizingFeature';
|
|
3701
|
-
/**
|
|
3702
|
-
* Expanded row-model factories require row expanding APIs and state.
|
|
3703
|
-
*/
|
|
3704
|
-
expandedRowModel: 'rowExpandingFeature';
|
|
3705
|
-
/**
|
|
3706
|
-
* Faceted min/max factories require column faceting APIs.
|
|
3707
|
-
*/
|
|
3708
|
-
facetedMinMaxValues: 'columnFacetingFeature';
|
|
3709
|
-
/**
|
|
3710
|
-
* Faceted row-model factories require column faceting APIs.
|
|
3711
|
-
*/
|
|
3712
|
-
facetedRowModel: 'columnFacetingFeature';
|
|
3713
|
-
/**
|
|
3714
|
-
* Faceted unique-value factories require column faceting APIs.
|
|
3715
|
-
*/
|
|
3716
|
-
facetedUniqueValues: 'columnFacetingFeature';
|
|
3717
|
-
/**
|
|
3718
|
-
* Filtered row-model factories require column filtering APIs and state.
|
|
3719
|
-
*/
|
|
3720
|
-
filteredRowModel: 'columnFilteringFeature';
|
|
3721
|
-
/**
|
|
3722
|
-
* Named filter functions are only meaningful when column filtering is enabled.
|
|
3723
|
-
*/
|
|
3724
|
-
filterFns: 'columnFilteringFeature';
|
|
3725
|
-
/**
|
|
3726
|
-
* Filter metadata types are only read and written by filtering features.
|
|
3727
|
-
*/
|
|
3728
|
-
filterMeta: 'columnFilteringFeature';
|
|
3729
|
-
/**
|
|
3730
|
-
* Global filtering builds on column filtering state and filter functions.
|
|
3731
|
-
*/
|
|
3732
|
-
globalFilteringFeature: 'columnFilteringFeature';
|
|
3733
|
-
/**
|
|
3734
|
-
* Grouped row-model factories require column grouping APIs and state.
|
|
3735
|
-
*/
|
|
3736
|
-
groupedRowModel: 'columnGroupingFeature';
|
|
3737
|
-
/**
|
|
3738
|
-
* Paginated row-model factories require row pagination APIs and state.
|
|
3739
|
-
*/
|
|
3740
|
-
paginatedRowModel: 'rowPaginationFeature';
|
|
3741
|
-
/**
|
|
3742
|
-
* Sorted row-model factories require row sorting APIs and state.
|
|
3743
|
-
*/
|
|
3744
|
-
sortedRowModel: 'rowSortingFeature';
|
|
3745
|
-
/**
|
|
3746
|
-
* Named sorting functions are only meaningful when row sorting is enabled.
|
|
3747
|
-
*/
|
|
3748
|
-
sortFns: 'rowSortingFeature';
|
|
3749
|
-
}
|
|
3750
|
-
/**
|
|
3751
|
-
* Validates that every row model and fn registry slot in a features object is
|
|
3752
|
-
* accompanied by its prerequisite feature.
|
|
3753
|
-
*
|
|
3754
|
-
* Slots whose prerequisite is missing have their type replaced with a literal
|
|
3755
|
-
* error message, so the offending property fails to type-check with a message
|
|
3756
|
-
* naming the feature that needs to be added.
|
|
3757
|
-
*/
|
|
3758
|
-
type ValidateFeatureSlots<TFeatures extends TableFeatures> = IsAny<TFeatures> extends true ? {} : { [K in keyof TFeatures as K extends keyof FeatureSlotPrereqs ? K : never]: K extends keyof FeatureSlotPrereqs ? [Extract<FeatureSlotPrereqs[K], keyof TFeatures>] extends [never] ? `Error: '${K & string}' requires '${FeatureSlotPrereqs[K] & string}' to be included in this table's features.` : TFeatures[K] : never; };
|
|
3759
|
-
/**
|
|
3760
|
-
* Complete feature registry for a table.
|
|
3761
|
-
*
|
|
3762
|
-
* This type combines core features, stock features, declaration-merged custom
|
|
3763
|
-
* plugins, row-model factory slots, function registries, and type-only meta
|
|
3764
|
-
* slots. The concrete `features` object passed to `tableFeatures()` determines
|
|
3765
|
-
* which feature APIs are included throughout table, row, column, cell, header,
|
|
3766
|
-
* options, and state types.
|
|
3767
|
-
*/
|
|
3768
|
-
interface TableFeatures extends Partial<CoreFeatures>, Partial<StockFeatures>, Partial<Plugins> {
|
|
3769
|
-
/**
|
|
3770
|
-
* Registry of aggregation functions available to this table by name.
|
|
3771
|
-
*
|
|
3772
|
-
* Keys registered here become the valid string values for `aggregationFn` on
|
|
3773
|
-
* column definitions, with full inference. Import the built-in aggregation
|
|
3774
|
-
* functions you use individually and register them by their conventional
|
|
3775
|
-
* names: `aggregationFns: { sum: aggregationFn_sum, myCustomAggregationFn }`.
|
|
3776
|
-
* Spreading the exported `aggregationFns` registry also works, but puts
|
|
3777
|
-
* every built-in aggregation function in your bundle.
|
|
3778
|
-
*/
|
|
3779
|
-
aggregationFns?: Record<string, AggregationFnDef<any, any, any, any>>;
|
|
3780
|
-
/**
|
|
3781
|
-
* Type-only slot for declaring the type of `columnDef.meta` for all columns
|
|
3782
|
-
* of this table.
|
|
3783
|
-
*
|
|
3784
|
-
* Pass a phantom value: `columnMeta: {} as MyColumnMeta`. The value itself is
|
|
3785
|
-
* ignored and stripped from the table's registered features at runtime — only
|
|
3786
|
-
* its type is used, inferred wherever `TFeatures` flows.
|
|
3787
|
-
*
|
|
3788
|
-
* When omitted, the global declaration-merged `ColumnMeta` interface applies.
|
|
3789
|
-
*/
|
|
3790
|
-
columnMeta?: object;
|
|
3791
|
-
/**
|
|
3792
|
-
* Factory for the table's core (unmodified) row model. Defaults to the
|
|
3793
|
-
* built-in `createCoreRowModel()` when omitted.
|
|
3794
|
-
*/
|
|
3795
|
-
coreRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3796
|
-
/**
|
|
3797
|
-
* Factory for the client-side expanded row model. Pass the exported
|
|
3798
|
-
* `createExpandedRowModel()` or implement your own. Not needed for
|
|
3799
|
-
* server-side expansion.
|
|
3800
|
-
*/
|
|
3801
|
-
expandedRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3802
|
-
/**
|
|
3803
|
-
* Factory for per-column faceted min/max values. Pass the exported
|
|
3804
|
-
* `createFacetedMinMaxValues()` or implement your own. Not needed for
|
|
3805
|
-
* server-side faceting.
|
|
3806
|
-
*/
|
|
3807
|
-
facetedMinMaxValues?: (table: any, columnId: string) => () => [number, number] | undefined;
|
|
3808
|
-
/**
|
|
3809
|
-
* Factory for the per-column faceted row model. Pass the exported
|
|
3810
|
-
* `createFacetedRowModel()` or implement your own. Not needed for
|
|
3811
|
-
* server-side faceting.
|
|
3812
|
-
*/
|
|
3813
|
-
facetedRowModel?: (table: any, columnId: string) => () => RowModel<any, any>;
|
|
3814
|
-
/**
|
|
3815
|
-
* Factory for per-column faceted unique values. Pass the exported
|
|
3816
|
-
* `createFacetedUniqueValues()` or implement your own. Not needed for
|
|
3817
|
-
* server-side faceting.
|
|
3818
|
-
*/
|
|
3819
|
-
facetedUniqueValues?: (table: any, columnId: string) => () => Map<any, number>;
|
|
3820
|
-
/**
|
|
3821
|
-
* Factory for the client-side filtered row model. Pass the exported
|
|
3822
|
-
* `createFilteredRowModel()` or implement your own. Not needed for
|
|
3823
|
-
* server-side filtering.
|
|
3824
|
-
*/
|
|
3825
|
-
filteredRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3826
|
-
/**
|
|
3827
|
-
* Registry of filter functions available to this table by name.
|
|
3828
|
-
*
|
|
3829
|
-
* Keys registered here become the valid string values for `filterFn` on
|
|
3830
|
-
* column definitions and the `globalFilterFn` option, with full inference.
|
|
3831
|
-
* Import the built-in filter functions you use individually and register
|
|
3832
|
-
* them by their conventional names:
|
|
3833
|
-
* `filterFns: { includesString: filterFn_includesString, myCustomFilterFn }`.
|
|
3834
|
-
* Spreading the exported `filterFns` registry also works, but puts every
|
|
3835
|
-
* built-in filter function in your bundle.
|
|
3836
|
-
*/
|
|
3837
|
-
filterFns?: Record<string, FilterFn<any, any>>;
|
|
3838
|
-
/**
|
|
3839
|
-
* Type-only slot for declaring the type of the filter meta that filter
|
|
3840
|
-
* functions attach to rows via `addMeta` and that is read back from
|
|
3841
|
-
* `row.columnFiltersMeta`.
|
|
3842
|
-
*
|
|
3843
|
-
* Pass a phantom value: `filterMeta: {} as MyFilterMeta` (or
|
|
3844
|
-
* `metaHelper<MyFilterMeta>()`). The value itself is ignored and stripped
|
|
3845
|
-
* from the table's registered features at runtime; only its type is used.
|
|
3846
|
-
*
|
|
3847
|
-
* When omitted, the global declaration-merged `FilterMeta` interface applies.
|
|
3848
|
-
*/
|
|
3849
|
-
filterMeta?: object;
|
|
3850
|
-
/**
|
|
3851
|
-
* Factory for the client-side grouped row model. Pass the exported
|
|
3852
|
-
* `createGroupedRowModel()` or implement your own. Not needed for
|
|
3853
|
-
* server-side grouping.
|
|
3854
|
-
*/
|
|
3855
|
-
groupedRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3856
|
-
/**
|
|
3857
|
-
* Factory for the client-side paginated row model. Pass the exported
|
|
3858
|
-
* `createPaginatedRowModel()` or implement your own. Not needed for
|
|
3859
|
-
* server-side pagination.
|
|
3860
|
-
*/
|
|
3861
|
-
paginatedRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3862
|
-
/**
|
|
3863
|
-
* Factory for the client-side sorted row model. Pass the exported
|
|
3864
|
-
* `createSortedRowModel()` or implement your own. Not needed for
|
|
3865
|
-
* server-side sorting.
|
|
3866
|
-
*/
|
|
3867
|
-
sortedRowModel?: (table: any) => () => RowModel<any, any>;
|
|
3868
|
-
/**
|
|
3869
|
-
* Registry of sorting functions available to this table by name.
|
|
3870
|
-
*
|
|
3871
|
-
* Keys registered here become the valid string values for `sortFn` on column
|
|
3872
|
-
* definitions, with full inference. Import the built-in sorting functions
|
|
3873
|
-
* you use individually and register them by their conventional names:
|
|
3874
|
-
* `sortFns: { alphanumeric: sortFn_alphanumeric, myCustomSortFn }`. Spreading
|
|
3875
|
-
* the exported `sortFns` registry also works, but puts every built-in
|
|
3876
|
-
* sorting function in your bundle.
|
|
3877
|
-
*/
|
|
3878
|
-
sortFns?: Record<string, SortFn<any, any>>;
|
|
3879
|
-
/**
|
|
3880
|
-
* Type-only slot for declaring the type of this table's `options.meta`.
|
|
3881
|
-
*
|
|
3882
|
-
* Pass a phantom value: `tableMeta: {} as MyTableMeta`. The value itself is
|
|
3883
|
-
* ignored and stripped from the table's registered features at runtime — only
|
|
3884
|
-
* its type is used, inferred wherever `TFeatures` flows.
|
|
3885
|
-
*
|
|
3886
|
-
* When omitted, the global declaration-merged `TableMeta` interface applies.
|
|
3887
|
-
*/
|
|
3888
|
-
tableMeta?: object;
|
|
3889
|
-
}
|
|
3890
|
-
/**
|
|
3891
|
-
* Lifecycle hooks and defaults contributed by a table feature.
|
|
3892
|
-
*
|
|
3893
|
-
* Feature objects are registered in the table's `features` option. They can
|
|
3894
|
-
* contribute default state/options, default column definitions, table APIs,
|
|
3895
|
-
* shared prototype APIs for rows/columns/headers/cells, and per-instance data
|
|
3896
|
-
* for tables, columns, rows, headers, header groups, and cells.
|
|
3897
|
-
*/
|
|
3898
|
-
interface TableFeature {
|
|
3899
|
-
/**
|
|
3900
|
-
* Adds feature methods to the shared cell prototype for a table.
|
|
3901
|
-
*
|
|
3902
|
-
* This runs lazily the first time a cell is constructed for a table. Methods
|
|
3903
|
-
* assigned here are shared by every cell instance created by that table, so
|
|
3904
|
-
* this hook should be used for APIs and memoized methods rather than
|
|
3905
|
-
* per-cell mutable data.
|
|
3906
|
-
*/
|
|
3907
|
-
assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData$2>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
3908
|
-
/**
|
|
3909
|
-
* Adds feature methods to the shared column prototype for a table.
|
|
3910
|
-
*
|
|
3911
|
-
* This runs lazily the first time a column is constructed for a table.
|
|
3912
|
-
* Methods assigned here are shared by every column instance created by that
|
|
3913
|
-
* table, so this hook should be used for APIs and memoized methods rather
|
|
3914
|
-
* than per-column mutable data.
|
|
3915
|
-
*/
|
|
3916
|
-
assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData$2>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
3917
|
-
/**
|
|
3918
|
-
* Adds feature methods to the shared header prototype for a table.
|
|
3919
|
-
*
|
|
3920
|
-
* This runs lazily the first time a header is constructed for a table.
|
|
3921
|
-
* Methods assigned here are shared by every header instance created by that
|
|
3922
|
-
* table, so this hook should be used for APIs and memoized methods rather
|
|
3923
|
-
* than per-header mutable data.
|
|
3924
|
-
*/
|
|
3925
|
-
assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData$2>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
3926
|
-
/**
|
|
3927
|
-
* Adds feature methods to the shared row prototype for a table.
|
|
3928
|
-
*
|
|
3929
|
-
* This runs lazily the first time a row is constructed for a table. Methods
|
|
3930
|
-
* assigned here are shared by every row instance created by that table, so
|
|
3931
|
-
* this hook should be used for APIs and memoized methods rather than per-row
|
|
3932
|
-
* mutable data.
|
|
3933
|
-
*/
|
|
3934
|
-
assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData$2>(prototype: Record<string, any>, table: Table<TFeatures, TData>) => void;
|
|
3935
|
-
/**
|
|
3936
|
-
* Adds feature APIs directly to the table instance.
|
|
3937
|
-
*
|
|
3938
|
-
* The table is a singleton, unlike rows, columns, headers, and cells, so
|
|
3939
|
-
* table APIs are assigned directly instead of through a shared prototype.
|
|
3940
|
-
* This hook is exclusively for assigning table methods. It runs after
|
|
3941
|
-
* options, state atoms, and the store have been created and after every
|
|
3942
|
-
* feature's `initTableInstanceData` hook has completed.
|
|
3943
|
-
*/
|
|
3944
|
-
constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData$2>(table: Table<TFeatures, TData>) => void;
|
|
3945
|
-
/**
|
|
3946
|
-
* Returns default column definition options contributed by this feature.
|
|
3947
|
-
*
|
|
3948
|
-
* These defaults are merged into the table's default column definition before
|
|
3949
|
-
* `options.defaultColumn` and before each user-supplied column definition is
|
|
3950
|
-
* resolved, so users can override values supplied here.
|
|
3951
|
-
*/
|
|
3952
|
-
getDefaultColumnDef?: <TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue>;
|
|
3953
|
-
/**
|
|
3954
|
-
* Returns default table options contributed by this feature.
|
|
3955
|
-
*
|
|
3956
|
-
* This runs while table options are being resolved. Use it for option
|
|
3957
|
-
* defaults such as feature enablement flags and default state-updater
|
|
3958
|
-
* callbacks. User-supplied table options take precedence over values returned
|
|
3959
|
-
* here.
|
|
3960
|
-
*/
|
|
3961
|
-
getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData$2>(table: Table<TFeatures, TData>) => Partial<TableOptions_All<TFeatures, TData>>;
|
|
3962
|
-
/**
|
|
3963
|
-
* Returns this feature's initial table state.
|
|
3964
|
-
*
|
|
3965
|
-
* The incoming `initialState` contains state accumulated from earlier
|
|
3966
|
-
* features and user-provided initial state. Return a complete state object
|
|
3967
|
-
* for this feature, preserving `initialState` so user-provided values can
|
|
3968
|
-
* override feature defaults.
|
|
3969
|
-
*/
|
|
3970
|
-
getInitialState?: (initialState: Partial<TableState_All>) => TableState_All;
|
|
3971
|
-
/**
|
|
3972
|
-
* Initializes mutable, non-reactive data owned by this feature on the table
|
|
3973
|
-
* instance.
|
|
3974
|
-
*
|
|
3975
|
-
* This runs once during table construction after options, state atoms, and
|
|
3976
|
-
* the store are available. Features are processed in a single pass in
|
|
3977
|
-
* registration order, with each feature's instance data initialized just
|
|
3978
|
-
* before its own `constructTableAPIs` hook, so this hook may rely on data
|
|
3979
|
-
* and APIs of features registered earlier. Use `constructTableAPIs`
|
|
3980
|
-
* exclusively for assigning table methods. Table resets do not rerun this
|
|
3981
|
-
* hook; use `resetTableInstanceData` to clear transient instance data
|
|
3982
|
-
* instead.
|
|
3983
|
-
*/
|
|
3984
|
-
initTableInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2>(table: Table<TFeatures, TData>) => void;
|
|
3985
|
-
/**
|
|
3986
|
-
* Initializes instance-specific data on each cell.
|
|
3987
|
-
*
|
|
3988
|
-
* This runs for every constructed cell after core cell fields such as `id`,
|
|
3989
|
-
* `column`, and `row` have been assigned. Cells are constructed lazily on
|
|
3990
|
-
* first access per row/column pair and cached, so this runs once per cell
|
|
3991
|
-
* instance. Use this for per-cell mutable data, caches, or annotations.
|
|
3992
|
-
* Shared methods should be assigned via `assignCellPrototype` instead.
|
|
3993
|
-
*/
|
|
3994
|
-
initCellInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData>(cell: Cell<TFeatures, TData, TValue>) => void;
|
|
3995
|
-
/**
|
|
3996
|
-
* Initializes instance-specific data on each column.
|
|
3997
|
-
*
|
|
3998
|
-
* This runs for every constructed column after core column fields such as
|
|
3999
|
-
* `id`, `depth`, `parent`, `columnDef`, and `columns` have been assigned.
|
|
4000
|
-
* Use this for per-column mutable data, caches, or annotations. Shared
|
|
4001
|
-
* methods should be assigned via `assignColumnPrototype` instead.
|
|
4002
|
-
*/
|
|
4003
|
-
initColumnInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData>(column: Column$2<TFeatures, TData, TValue>) => void;
|
|
4004
|
-
/**
|
|
4005
|
-
* Initializes instance-specific data on each header group.
|
|
4006
|
-
*
|
|
4007
|
-
* This runs for every constructed header group after `depth`, `id`, and the
|
|
4008
|
-
* fully populated `headers` array have been assigned. Header groups have no
|
|
4009
|
-
* shared prototype, so this is their only per-instance extension point.
|
|
4010
|
-
* Header groups are reconstructed whenever they recompute (e.g. column
|
|
4011
|
-
* visibility, order, or pinning changes), so this reruns on every rebuild.
|
|
4012
|
-
*/
|
|
4013
|
-
initHeaderGroupInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2>(headerGroup: HeaderGroup<TFeatures, TData>) => void;
|
|
4014
|
-
/**
|
|
4015
|
-
* Initializes instance-specific data on each header.
|
|
4016
|
-
*
|
|
4017
|
-
* This runs for every constructed header after core header fields such as
|
|
4018
|
-
* `id`, `column`, `depth`, `index`, and `isPlaceholder` have been assigned,
|
|
4019
|
-
* but before `subHeaders` are populated and before `headerGroup` is linked.
|
|
4020
|
-
* Headers are reconstructed on every header group rebuild, so this reruns
|
|
4021
|
-
* on every rebuild. Use this for per-header mutable data, caches, or
|
|
4022
|
-
* annotations. Shared methods should be assigned via `assignHeaderPrototype`
|
|
4023
|
-
* instead.
|
|
4024
|
-
*/
|
|
4025
|
-
initHeaderInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2, TValue extends CellData = CellData>(header: Header<TFeatures, TData, TValue>) => void;
|
|
4026
|
-
/**
|
|
4027
|
-
* Initializes instance-specific data on each row.
|
|
4028
|
-
*
|
|
4029
|
-
* This runs for every constructed row after core row fields such as `id`,
|
|
4030
|
-
* `index`, `depth`, `original`, `parentId`, and `subRows` have been assigned.
|
|
4031
|
-
* Use this for per-row mutable data, caches, or annotations. Shared methods
|
|
4032
|
-
* should be assigned via `assignRowPrototype` instead.
|
|
4033
|
-
*/
|
|
4034
|
-
initRowInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2>(row: Row<TFeatures, TData>) => void;
|
|
4035
|
-
/**
|
|
4036
|
-
* Resets mutable, non-reactive table-instance data owned by this feature.
|
|
4037
|
-
*
|
|
4038
|
-
* This runs after internally owned state atoms have been restored to
|
|
4039
|
-
* `table.initialState` by `table.reset()`. It is intended for transient
|
|
4040
|
-
* feature data, not table state slices or externally controlled state.
|
|
4041
|
-
*/
|
|
4042
|
-
resetTableInstanceData?: <TFeatures extends TableFeatures, TData extends RowData$2>(table: Table<TFeatures, TData>) => void;
|
|
4043
|
-
}
|
|
4044
|
-
//#endregion
|
|
4045
|
-
//#region ../../node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.d.ts
|
|
4046
|
-
//#region src/core/cells/coreCellsFeature.d.ts
|
|
4047
|
-
/**
|
|
4048
|
-
* Core feature that adds cell value, render, and context APIs.
|
|
4049
|
-
*/
|
|
4050
|
-
declare const coreCellsFeature: TableFeature;
|
|
4051
|
-
//#endregion
|
|
4052
|
-
//#region src/components/data-table.d.ts
|
|
4053
|
-
declare const features: {
|
|
4054
|
-
columnFilteringFeature: TableFeature;
|
|
4055
|
-
rowSortingFeature: TableFeature;
|
|
4056
|
-
rowPaginationFeature: TableFeature;
|
|
4057
|
-
rowSelectionFeature: TableFeature;
|
|
4058
|
-
columnVisibilityFeature: TableFeature;
|
|
4059
|
-
filteredRowModel: (table: Table<any, any>) => () => RowModel<any, any>;
|
|
4060
|
-
sortedRowModel: (table: Table<any, any>) => () => RowModel<any, any>;
|
|
4061
|
-
paginatedRowModel: (table: Table<any, any>) => () => RowModel<any, any>;
|
|
4062
|
-
filterFns: {
|
|
4063
|
-
includesString: CreatedFilterFn<any, any>;
|
|
4064
|
-
inNumberRange: CreatedFilterFn<any, any>;
|
|
4065
|
-
equals: CreatedFilterFn<any, any>;
|
|
4066
|
-
arrIncludes: CreatedFilterFn<any, any>;
|
|
4067
|
-
inDateRange: CreatedFilterFn<any, any>;
|
|
4068
|
-
weakEquals: CreatedFilterFn<any, any>;
|
|
4069
|
-
};
|
|
4070
|
-
sortFns: {
|
|
4071
|
-
alphanumeric: CreatedSortFn<any, any>;
|
|
4072
|
-
text: CreatedSortFn<any, any>;
|
|
4073
|
-
datetime: CreatedSortFn<any, any>;
|
|
4074
|
-
basic: CreatedSortFn<any, any>;
|
|
4075
|
-
};
|
|
4076
|
-
};
|
|
4077
|
-
type ColumnDef$1<TData extends RowData, TValue = unknown> = ColumnDef<typeof features, TData, TValue>;
|
|
4078
|
-
type Column$1<TData extends RowData, TValue = unknown> = Column<typeof features, TData, TValue>;
|
|
4079
|
-
type TanStackTable<TData extends RowData> = ReactTable<typeof features, TData>;
|
|
4080
|
-
type DataTableToolbarActions<TData extends RowData> = React.ReactNode | ((table: TanStackTable<TData>) => React.ReactNode);
|
|
4081
|
-
type DataTableLabels = {
|
|
4082
|
-
filterPlaceholder: string;
|
|
4083
|
-
filterColumnSelectorLabel: string;
|
|
4084
|
-
emptyMessage: React.ReactNode;
|
|
4085
|
-
columnsButton: string;
|
|
4086
|
-
rowsPerPage: string;
|
|
4087
|
-
pageOf: (current: number, total: number) => React.ReactNode;
|
|
4088
|
-
goToFirstPage: string;
|
|
4089
|
-
goToPreviousPage: string;
|
|
4090
|
-
goToNextPage: string;
|
|
4091
|
-
goToLastPage: string;
|
|
4092
|
-
selectAllRows: string;
|
|
4093
|
-
selectRow: string;
|
|
4094
|
-
};
|
|
4095
|
-
declare const defaultDataTableLabels: DataTableLabels;
|
|
4096
|
-
type DataTableProps<TData extends RowData, TValue = unknown> = {
|
|
4097
|
-
columns: ColumnDef$1<TData, TValue>[];
|
|
4098
|
-
data: TData[];
|
|
4099
|
-
getRowId?: (originalRow: TData, index: number, parent?: {
|
|
4100
|
-
id: string;
|
|
4101
|
-
}) => string;
|
|
4102
|
-
filterColumns?: string | string[];
|
|
4103
|
-
pageSize?: number;
|
|
4104
|
-
pageSizeOptions?: number[];
|
|
4105
|
-
enableRowSelection?: boolean;
|
|
4106
|
-
enableSorting?: boolean;
|
|
4107
|
-
showPagination?: boolean;
|
|
4108
|
-
showColumnVisibility?: boolean;
|
|
4109
|
-
toolbarActions?: DataTableToolbarActions<TData>;
|
|
4110
|
-
labels?: Partial<DataTableLabels>;
|
|
4111
|
-
className?: string;
|
|
4112
|
-
tableClassName?: string;
|
|
4113
|
-
variant?: TableProps['variant'];
|
|
4114
|
-
};
|
|
4115
|
-
type DataTableColumnHeaderProps<TData extends RowData, TValue> = React.ComponentProps<'div'> & {
|
|
4116
|
-
column: Column$1<TData, TValue>;
|
|
4117
|
-
title: React.ReactNode;
|
|
4118
|
-
};
|
|
4119
|
-
type DataTablePaginationProps<TData extends RowData> = React.ComponentProps<'div'> & {
|
|
4120
|
-
table?: TanStackTable<TData>;
|
|
4121
|
-
pageSizeOptions?: number[];
|
|
4122
|
-
labels?: Partial<DataTableLabels>;
|
|
4123
|
-
};
|
|
4124
|
-
type DataTableViewOptionsProps<TData extends RowData> = React.ComponentProps<typeof Button> & {
|
|
4125
|
-
table?: TanStackTable<TData>;
|
|
4126
|
-
label?: React.ReactNode;
|
|
4127
|
-
};
|
|
4128
|
-
type UseDataTableOptions<TData extends RowData, TValue = unknown> = {
|
|
4129
|
-
columns: ColumnDef$1<TData, TValue>[];
|
|
4130
|
-
data: TData[];
|
|
4131
|
-
getRowId?: (originalRow: TData, index: number, parent?: {
|
|
4132
|
-
id: string;
|
|
4133
|
-
}) => string;
|
|
4134
|
-
pageSize?: number;
|
|
4135
|
-
enableRowSelection?: boolean;
|
|
4136
|
-
enableSorting?: boolean;
|
|
4137
|
-
enablePagination?: boolean;
|
|
4138
|
-
labels?: Partial<DataTableLabels>;
|
|
4139
|
-
};
|
|
4140
|
-
type DataTableRootProps<TData extends RowData, TValue = unknown> = {
|
|
4141
|
-
labels?: Partial<DataTableLabels>;
|
|
4142
|
-
className?: string;
|
|
4143
|
-
children: React.ReactNode;
|
|
4144
|
-
} & ({
|
|
4145
|
-
table: TanStackTable<TData>;
|
|
4146
|
-
columns?: never;
|
|
4147
|
-
data?: never;
|
|
4148
|
-
} | (Omit<UseDataTableOptions<TData, TValue>, 'labels'> & {
|
|
4149
|
-
table?: never;
|
|
4150
|
-
}));
|
|
4151
|
-
type DataTableToolbarProps<TData extends RowData> = {
|
|
4152
|
-
filterColumns?: string | string[];
|
|
4153
|
-
showColumnVisibility?: boolean;
|
|
4154
|
-
toolbarActions?: DataTableToolbarActions<TData>;
|
|
4155
|
-
labels?: Partial<DataTableLabels>;
|
|
4156
|
-
className?: string;
|
|
4157
|
-
};
|
|
4158
|
-
type DataTableHeaderProps = {
|
|
4159
|
-
className?: string;
|
|
4160
|
-
};
|
|
4161
|
-
type DataTableBodyProps = {
|
|
4162
|
-
emptyMessage?: React.ReactNode;
|
|
4163
|
-
className?: string;
|
|
4164
|
-
};
|
|
4165
|
-
type DataTableContextValue<TData extends RowData> = {
|
|
4166
|
-
table: TanStackTable<TData>;
|
|
4167
|
-
labels: DataTableLabels;
|
|
4168
|
-
};
|
|
4169
|
-
declare function useDataTableContext<TData extends RowData>(): DataTableContextValue<TData>;
|
|
4170
|
-
declare function useDataTable<TData extends RowData, TValue = unknown>({ columns, data, getRowId, pageSize, enableRowSelection, enableSorting, enablePagination, labels }: UseDataTableOptions<TData, TValue>): TanStackTable<TData>;
|
|
4171
|
-
declare function DataTableRoot<TData extends RowData, TValue = unknown>(props: DataTableRootProps<TData, TValue>): React.JSX.Element;
|
|
4172
|
-
declare function DataTableColumnHeader<TData extends RowData, TValue>({ column, title, className, ...props }: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element;
|
|
4173
|
-
declare function DataTableViewOptions<TData extends RowData>({ table: tableProp, label, className, ...props }: DataTableViewOptionsProps<TData>): React.JSX.Element | null;
|
|
4174
|
-
declare function DataTableToolbar<TData extends RowData>({ filterColumns, showColumnVisibility, toolbarActions, labels: labelsOverride, className }: DataTableToolbarProps<TData>): React.JSX.Element | null;
|
|
4175
|
-
declare function DataTableHeader<TData extends RowData>({ className }?: DataTableHeaderProps): React.JSX.Element;
|
|
4176
|
-
declare function DataTableBody<TData extends RowData>({ emptyMessage, className }?: DataTableBodyProps): React.JSX.Element;
|
|
4177
|
-
declare function DataTablePagination<TData extends RowData>({ table: tableProp, pageSizeOptions, labels: labelsOverride, className, ...props }: DataTablePaginationProps<TData>): React.JSX.Element;
|
|
4178
|
-
declare function createDataTableSelectColumn<TData extends RowData>(options?: {
|
|
4179
|
-
labels?: Pick<Partial<DataTableLabels>, 'selectAllRows' | 'selectRow'>;
|
|
4180
|
-
}): ColumnDef$1<TData>;
|
|
4181
|
-
declare function DataTable<TData extends RowData, TValue = unknown>({ columns, data, getRowId, filterColumns, pageSize, pageSizeOptions, enableRowSelection, enableSorting, showPagination, showColumnVisibility, toolbarActions, labels, className, tableClassName, variant }: DataTableProps<TData, TValue>): React.JSX.Element;
|
|
4182
|
-
//#endregion
|
|
4183
|
-
export { createDataTableSelectColumn as C, useDataTableContext as E, UseDataTableOptions as S, useDataTable as T, DataTableToolbarProps as _, DataTableBodyProps as a, RowData$1 as b, DataTableHeader as c, DataTablePagination as d, DataTablePaginationProps as f, DataTableToolbar as g, DataTableRootProps as h, DataTableBody as i, DataTableHeaderProps as l, DataTableRoot as m, ColumnDef$1 as n, DataTableColumnHeader as o, DataTableProps as p, DataTable as r, DataTableColumnHeaderProps as s, Column$1 as t, DataTableLabels as u, DataTableViewOptions as v, defaultDataTableLabels as w, TanStackTable as x, DataTableViewOptionsProps as y };
|
|
4184
|
-
//# sourceMappingURL=data-table-DWWVGWbU.d.ts.map
|