@infinite-table/infinite-react 0.3.22 → 0.4.2
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 +1 -1
- package/index.css +101 -67
- package/index.d.ts +1166 -868
- package/index.esm.css +101 -67
- package/index.esm.js +5372 -3810
- package/index.js +6073 -4529
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefCallback, MutableRefObject,
|
|
2
|
+
import { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent } from 'react';
|
|
3
3
|
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare type SortDir = 1 | -1;
|
|
5
|
+
declare type MultisortInfo<T> = {
|
|
6
|
+
/**
|
|
7
|
+
* The sorting direction
|
|
8
|
+
*/
|
|
9
|
+
dir: SortDir;
|
|
10
|
+
/**
|
|
11
|
+
* for now 'string' and 'number' are known types, meaning they have
|
|
12
|
+
* sort functions already implemented
|
|
13
|
+
*/
|
|
14
|
+
type?: string;
|
|
15
|
+
fn?: (a: any, b: any) => number;
|
|
16
|
+
/**
|
|
17
|
+
* a property whose value to use for sorting on the array items
|
|
18
|
+
*/
|
|
19
|
+
field?: keyof T;
|
|
20
|
+
/**
|
|
21
|
+
* or a function to retrieve the item value to use for sorting
|
|
22
|
+
*/
|
|
23
|
+
valueGetter?: (item: T) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const multisort: {
|
|
26
|
+
<T>(sortInfo: MultisortInfo<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
|
|
27
|
+
knownTypes: {
|
|
28
|
+
[key: string]: (first: any, second: any) => number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
7
31
|
|
|
8
32
|
declare type VoidFn$1 = () => void;
|
|
9
33
|
declare type Pair<KeyType, ValueType> = {
|
|
10
34
|
value?: ValueType;
|
|
11
35
|
map?: Map<KeyType, Pair<KeyType, ValueType>>;
|
|
36
|
+
length: number;
|
|
12
37
|
revision?: number;
|
|
13
38
|
};
|
|
14
39
|
declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn$1) => void;
|
|
@@ -19,9 +44,12 @@ declare class DeepMap<KeyType, ValueType> {
|
|
|
19
44
|
private emptyKey;
|
|
20
45
|
static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
|
|
21
46
|
constructor(initial?: [KeyType[], ValueType][]);
|
|
22
|
-
|
|
23
|
-
|
|
47
|
+
fill(initial?: [KeyType[], ValueType][]): void;
|
|
48
|
+
getValuesStartingWith(keys: KeyType[], excludeSelf?: boolean, depthLimit?: number): ValueType[];
|
|
49
|
+
getKeysStartingWith(keys: KeyType[], excludeSelf?: boolean, depthLimit?: number): KeyType[][];
|
|
24
50
|
private getStartingWith;
|
|
51
|
+
private getMapAt;
|
|
52
|
+
getAllChildrenSizeFor(keys: KeyType[]): number;
|
|
25
53
|
getDirectChildrenSizeFor(keys: KeyType[]): number;
|
|
26
54
|
set(keys: KeyType[] & {
|
|
27
55
|
length: Omit<number, 0>;
|
|
@@ -36,6 +64,7 @@ declare class DeepMap<KeyType, ValueType> {
|
|
|
36
64
|
visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn$1 | undefined) => void) => void;
|
|
37
65
|
private visitWithNext;
|
|
38
66
|
private getArray;
|
|
67
|
+
valuesAt(keys: KeyType[]): ValueType[];
|
|
39
68
|
values(): Generator<ValueType, void, unknown>;
|
|
40
69
|
keys(): Generator<KeyType[], void, unknown>;
|
|
41
70
|
entries(): Generator<[KeyType[], ValueType], void, unknown>;
|
|
@@ -45,34 +74,27 @@ declare class DeepMap<KeyType, ValueType> {
|
|
|
45
74
|
private sortedIterator;
|
|
46
75
|
}
|
|
47
76
|
|
|
48
|
-
declare
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
declare type Renderable = React$1.ReactNode | JSX.Element;
|
|
71
|
-
|
|
72
|
-
interface Size {
|
|
73
|
-
width: number;
|
|
74
|
-
height: number;
|
|
75
|
-
}
|
|
77
|
+
declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
|
|
78
|
+
getComponentState: () => T_STATE;
|
|
79
|
+
componentState: T_STATE;
|
|
80
|
+
componentActions: T_ACTIONS;
|
|
81
|
+
};
|
|
82
|
+
declare type ComponentStateGeneratedActions<T_STATE> = {
|
|
83
|
+
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
84
|
+
};
|
|
85
|
+
declare type ComponentInterceptedActions<T_STATE> = {
|
|
86
|
+
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
87
|
+
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
88
|
+
state: T_STATE;
|
|
89
|
+
}) => void | boolean;
|
|
90
|
+
};
|
|
91
|
+
declare type ComponentMappedCallbacks<T_STATE> = {
|
|
92
|
+
[k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
|
|
93
|
+
callbackName: string;
|
|
94
|
+
callbackParams: any[];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
76
98
|
|
|
77
99
|
declare enum InfiniteTableActionType {
|
|
78
100
|
SET_COLUMN_SIZE = 0,
|
|
@@ -91,69 +113,316 @@ declare type InfiniteTableAction = {
|
|
|
91
113
|
payload?: any;
|
|
92
114
|
};
|
|
93
115
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
declare
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
116
|
+
declare type Renderable = React$1.ReactNode | JSX.Element;
|
|
117
|
+
|
|
118
|
+
declare function useInfiniteHeaderCell<T>(): InfiniteTableColumnHeaderParam<T, InfiniteTableComputedColumn<T>>;
|
|
119
|
+
|
|
120
|
+
declare function useInfiniteColumnCell<T>(): InfiniteTableColumnCellContextType<T>;
|
|
121
|
+
|
|
122
|
+
declare const InfiniteTableClassName: string;
|
|
123
|
+
declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => JSX.Element)>;
|
|
124
|
+
declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
|
|
125
|
+
declare namespace InfiniteTable {
|
|
126
|
+
var defaultProps: {
|
|
127
|
+
rowHeight: number;
|
|
128
|
+
columnHeaderHeight: string;
|
|
129
|
+
};
|
|
102
130
|
}
|
|
103
131
|
|
|
104
|
-
interface
|
|
105
|
-
|
|
106
|
-
|
|
132
|
+
interface Size {
|
|
133
|
+
width: number;
|
|
134
|
+
height: number;
|
|
107
135
|
}
|
|
108
|
-
declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
|
|
109
136
|
|
|
110
|
-
declare type
|
|
137
|
+
declare type InfiniteTableBaseCellProps<T> = {
|
|
138
|
+
column: InfiniteTableComputedColumn<T>;
|
|
139
|
+
renderChildren: () => Renderable;
|
|
140
|
+
width: number;
|
|
141
|
+
cssEllipsis?: boolean;
|
|
142
|
+
contentStyle?: CSSProperties;
|
|
143
|
+
contentClassName?: string;
|
|
144
|
+
virtualized?: boolean;
|
|
145
|
+
skipColumnShifting?: boolean;
|
|
146
|
+
beforeChildren?: Renderable;
|
|
147
|
+
afterChildren?: Renderable;
|
|
148
|
+
cssPosition?: CSSProperties['position'];
|
|
149
|
+
domRef?: React.RefCallback<HTMLElement>;
|
|
150
|
+
};
|
|
151
|
+
declare type InfiniteTableCellProps<T> = ({
|
|
152
|
+
cellType: 'header';
|
|
153
|
+
} & InfiniteTableBaseCellProps<T>) | ({
|
|
154
|
+
cellType: 'body';
|
|
155
|
+
} & InfiniteTableBaseCellProps<T>);
|
|
111
156
|
|
|
112
|
-
declare type
|
|
113
|
-
|
|
157
|
+
declare type DiscriminatedUnion<A, B> = (A & {
|
|
158
|
+
[K in keyof B]?: undefined;
|
|
159
|
+
}) | (B & {
|
|
160
|
+
[K in keyof A]?: undefined;
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
164
|
+
declare type InfiniteTableSelectRowFn = (id: any) => void;
|
|
165
|
+
declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
166
|
+
domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
|
|
167
|
+
dragging: boolean;
|
|
168
|
+
column: COL_TYPE;
|
|
169
|
+
columnsMap: Map<string, COL_TYPE>;
|
|
170
|
+
columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
|
|
171
|
+
columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
|
|
172
|
+
selectionMode: DataSourcePropSelectionMode;
|
|
173
|
+
allRowsSelected: boolean;
|
|
174
|
+
someRowsSelected: boolean;
|
|
175
|
+
api: InfiniteTableApi<DATA_TYPE>;
|
|
176
|
+
renderBag: {
|
|
177
|
+
header: string | number | Renderable;
|
|
178
|
+
sortIcon?: Renderable;
|
|
179
|
+
selectionCheckBox?: Renderable;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
183
|
+
domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
|
|
184
|
+
value: string | number | Renderable;
|
|
185
|
+
renderBag: {
|
|
186
|
+
value: string | number | Renderable;
|
|
187
|
+
groupIcon?: Renderable;
|
|
188
|
+
selectionCheckBox?: Renderable;
|
|
189
|
+
};
|
|
190
|
+
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
114
191
|
rowIndex: number;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
192
|
+
rowActive: boolean;
|
|
193
|
+
column: COL_TYPE;
|
|
194
|
+
columnsMap: Map<string, COL_TYPE>;
|
|
195
|
+
toggleCurrentGroupRow: () => void;
|
|
196
|
+
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
197
|
+
toggleCurrentGroupRowSelection: () => void;
|
|
198
|
+
selectCurrentRow: () => void;
|
|
199
|
+
selectRow: InfiniteTableSelectRowFn;
|
|
200
|
+
deselectRow: InfiniteTableSelectRowFn;
|
|
201
|
+
deselectCurrentRow: () => void;
|
|
202
|
+
toggleRowSelection: InfiniteTableSelectRowFn;
|
|
203
|
+
selectionMode: DataSourcePropSelectionMode | undefined;
|
|
204
|
+
groupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
205
|
+
pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
|
|
120
206
|
};
|
|
121
|
-
declare type
|
|
122
|
-
declare type
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
colspan?: SpanFunction;
|
|
207
|
+
declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
|
|
208
|
+
declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
|
|
209
|
+
declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
210
|
+
declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
211
|
+
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
212
|
+
data: DATA_TYPE | Partial<DATA_TYPE> | null;
|
|
213
|
+
dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
|
|
214
|
+
rowIndex: number;
|
|
215
|
+
column: COL_TYPE;
|
|
131
216
|
};
|
|
132
|
-
declare type
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
217
|
+
declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
218
|
+
isGroupRow: true;
|
|
219
|
+
}) => Renderable | null;
|
|
220
|
+
declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
221
|
+
declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
|
|
222
|
+
declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
223
|
+
declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
224
|
+
declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
225
|
+
declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
|
|
226
|
+
declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
227
|
+
declare type InfiniteTableColumnStyleFnParams<T> = {
|
|
228
|
+
value: Renderable;
|
|
229
|
+
column: InfiniteTableComputedColumn<T>;
|
|
230
|
+
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
231
|
+
declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
232
|
+
declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
|
|
233
|
+
declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React.CSSProperties;
|
|
234
|
+
declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
235
|
+
declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
236
|
+
declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
|
|
237
|
+
declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
238
|
+
declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
|
|
239
|
+
declare type InfiniteTableColumnValueGetterParams<T> = {
|
|
240
|
+
data: T;
|
|
241
|
+
field?: keyof T;
|
|
137
242
|
};
|
|
138
|
-
declare type
|
|
139
|
-
|
|
140
|
-
|
|
243
|
+
declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
|
|
244
|
+
declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
245
|
+
declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
|
|
246
|
+
declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
|
|
247
|
+
declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
248
|
+
declare type InfiniteTableBaseColumn<T> = {
|
|
249
|
+
sortable?: boolean;
|
|
250
|
+
draggable?: boolean;
|
|
251
|
+
resizable?: boolean;
|
|
252
|
+
comparer?: InfiniteTableColumnComparer<T>;
|
|
253
|
+
defaultHiddenWhenGroupedBy?: '*' | keyof T | {
|
|
254
|
+
[k in keyof Partial<T>]: true;
|
|
255
|
+
};
|
|
256
|
+
align?: InfiniteTableColumnAlign;
|
|
257
|
+
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
258
|
+
columnGroup?: string;
|
|
259
|
+
header?: InfiniteTableColumnHeader<T>;
|
|
260
|
+
renderHeader?: InfiniteTableColumnHeaderRenderFunction<T>;
|
|
261
|
+
name?: Renderable;
|
|
262
|
+
cssEllipsis?: boolean;
|
|
263
|
+
headerCssEllipsis?: boolean;
|
|
264
|
+
type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
|
|
265
|
+
dataType?: InfiniteTableDataTypeNames;
|
|
266
|
+
sortType?: string;
|
|
267
|
+
filterType?: string;
|
|
268
|
+
style?: InfiniteTableColumnStyle<T>;
|
|
269
|
+
headerStyle?: InfiniteTableColumnHeaderStyle<T>;
|
|
270
|
+
headerClassName?: InfiniteTableColumnHeaderClassName<T>;
|
|
271
|
+
className?: InfiniteTableColumnClassName<T>;
|
|
272
|
+
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
273
|
+
field?: keyof T;
|
|
274
|
+
render?: InfiniteTableColumnRenderFunction<T>;
|
|
275
|
+
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
276
|
+
renderGroupValue?: InfiniteTableColumnRenderFunction<T>;
|
|
277
|
+
renderLeafValue?: InfiniteTableColumnRenderFunction<T>;
|
|
278
|
+
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
279
|
+
valueFormatter?: InfiniteTableColumnValueFormatter<T>;
|
|
280
|
+
defaultWidth?: number;
|
|
281
|
+
defaultFlex?: number;
|
|
282
|
+
defaultFilterable?: boolean;
|
|
283
|
+
minWidth?: number;
|
|
284
|
+
maxWidth?: number;
|
|
285
|
+
renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
|
|
286
|
+
renderSortIcon?: InfiniteTableColumnHeaderRenderFunction<T>;
|
|
287
|
+
renderSelectionCheckBox?: boolean | InfiniteTableColumnRenderFunction<T>;
|
|
288
|
+
renderHeaderSelectionCheckBox?: boolean | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
289
|
+
components?: {
|
|
290
|
+
ColumnCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
|
|
291
|
+
HeaderCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
|
|
292
|
+
};
|
|
141
293
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
declare
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Defines a column in the table.
|
|
296
|
+
*
|
|
297
|
+
* @typeParam DATA_TYPE The type of the data in the table.
|
|
298
|
+
*
|
|
299
|
+
* Can be bound to a field which is a `keyof DATA_TYPE`.
|
|
300
|
+
*/
|
|
301
|
+
declare type InfiniteTableColumn<DATA_TYPE> = {} & InfiniteTableBaseColumn<DATA_TYPE>;
|
|
302
|
+
declare type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
303
|
+
groupByField: string | string[];
|
|
304
|
+
id?: string;
|
|
305
|
+
};
|
|
306
|
+
declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
|
|
307
|
+
declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
308
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
309
|
+
pivotTotalColumnGroup?: true;
|
|
310
|
+
pivotGroupKeys: KeyType[];
|
|
311
|
+
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
312
|
+
pivotGroupKey: KeyType;
|
|
313
|
+
pivotIndex: number;
|
|
314
|
+
};
|
|
315
|
+
declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
|
|
316
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
317
|
+
pivotColumn: true;
|
|
318
|
+
pivotTotalColumn: boolean;
|
|
319
|
+
pivotAggregator: AggregationReducer<DataType, any>;
|
|
320
|
+
pivotAggregatorIndex: number;
|
|
321
|
+
pivotGroupKeys: KeyType[];
|
|
322
|
+
pivotByAtIndex?: PivotBy<DataType, KeyType>;
|
|
323
|
+
pivotIndex: number;
|
|
324
|
+
pivotGroupKey: KeyType;
|
|
325
|
+
};
|
|
326
|
+
declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
327
|
+
declare type InfiniteTableComputedColumnBase<T> = {
|
|
328
|
+
computedFilterType: string;
|
|
329
|
+
computedSortType: string;
|
|
330
|
+
computedDataType: string;
|
|
331
|
+
computedWidth: number;
|
|
332
|
+
computedFlex: number | null;
|
|
333
|
+
computedMinWidth: number;
|
|
334
|
+
computedMaxWidth: number;
|
|
335
|
+
computedOffset: number;
|
|
336
|
+
computedPinningOffset: number;
|
|
337
|
+
computedAbsoluteOffset: number;
|
|
338
|
+
computedSortable: boolean;
|
|
339
|
+
computedSortInfo: DataSourceSingleSortInfo<T> | null;
|
|
340
|
+
computedSorted: boolean;
|
|
341
|
+
computedSortedAsc: boolean;
|
|
342
|
+
computedSortedDesc: boolean;
|
|
343
|
+
computedSortIndex: number;
|
|
344
|
+
computedVisibleIndex: number;
|
|
345
|
+
computedVisibleIndexInCategory: number;
|
|
346
|
+
computedMultiSort: boolean;
|
|
347
|
+
computedFiltered: boolean;
|
|
348
|
+
computedFilterable: boolean;
|
|
349
|
+
computedFilterValue: DataSourceFilterValueItem<T> | null;
|
|
350
|
+
computedPinned: InfiniteTableColumnPinnedValues;
|
|
351
|
+
computedDraggable: boolean;
|
|
352
|
+
computedResizable: boolean;
|
|
353
|
+
computedFirstInCategory: boolean;
|
|
354
|
+
computedLastInCategory: boolean;
|
|
355
|
+
computedFirst: boolean;
|
|
356
|
+
computedLast: boolean;
|
|
357
|
+
toggleSort: () => void;
|
|
358
|
+
id: string;
|
|
359
|
+
};
|
|
360
|
+
declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
|
|
361
|
+
declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
|
|
362
|
+
|
|
363
|
+
interface LogFn {
|
|
364
|
+
(...args: any[]): LogFn;
|
|
365
|
+
extend: (channelName: string) => LogFn;
|
|
366
|
+
}
|
|
367
|
+
declare class Logger {
|
|
368
|
+
debug: LogFn;
|
|
369
|
+
error: LogFn;
|
|
370
|
+
constructor(channelName: string);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
interface ScrollPosition {
|
|
374
|
+
scrollTop: number;
|
|
375
|
+
scrollLeft: number;
|
|
376
|
+
}
|
|
377
|
+
declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
|
|
378
|
+
|
|
379
|
+
declare type VoidFn = () => void;
|
|
380
|
+
|
|
381
|
+
declare type FixedPosition = false | 'start' | 'end';
|
|
382
|
+
declare type SpanFunction = ({ rowIndex, colIndex, }: {
|
|
383
|
+
rowIndex: number;
|
|
384
|
+
colIndex: number;
|
|
385
|
+
}) => number;
|
|
386
|
+
declare type RenderRangeType = {
|
|
387
|
+
startIndex: number;
|
|
388
|
+
endIndex: number;
|
|
389
|
+
};
|
|
390
|
+
declare type ItemSizeFunction = (index: number) => number;
|
|
391
|
+
declare type MatrixBrainOptions = {
|
|
392
|
+
width: number;
|
|
393
|
+
height: number;
|
|
394
|
+
cols: number;
|
|
395
|
+
rows: number;
|
|
396
|
+
rowHeight: number | ItemSizeFunction;
|
|
397
|
+
colWidth: number | ItemSizeFunction;
|
|
398
|
+
rowspan?: SpanFunction;
|
|
399
|
+
colspan?: SpanFunction;
|
|
400
|
+
};
|
|
401
|
+
declare type TableRenderRange = {
|
|
402
|
+
start: [number, number];
|
|
403
|
+
end: [number, number];
|
|
404
|
+
rowFixed?: FixedPosition;
|
|
405
|
+
colFixed?: FixedPosition;
|
|
406
|
+
};
|
|
407
|
+
declare type WhichDirection = {
|
|
408
|
+
horizontal?: boolean;
|
|
409
|
+
vertical?: boolean;
|
|
410
|
+
};
|
|
411
|
+
declare type FnOnRenderRangeChange = (range: TableRenderRange) => void;
|
|
412
|
+
declare type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
|
|
413
|
+
declare type FnOnRenderCountChange = ({ horizontal, vertical, }: {
|
|
414
|
+
horizontal: number;
|
|
415
|
+
vertical: number;
|
|
416
|
+
}) => void;
|
|
417
|
+
declare type OnAvailableSizeChange = (size: Size) => void;
|
|
418
|
+
declare class MatrixBrain extends Logger {
|
|
419
|
+
private scrolling;
|
|
420
|
+
private width;
|
|
421
|
+
private height;
|
|
422
|
+
private cols;
|
|
423
|
+
private rows;
|
|
424
|
+
private rowHeight;
|
|
425
|
+
private colWidth;
|
|
157
426
|
private rowspan;
|
|
158
427
|
private colspan;
|
|
159
428
|
private rowspanParent;
|
|
@@ -367,6 +636,164 @@ declare class MatrixBrain extends Logger {
|
|
|
367
636
|
destroy: () => void;
|
|
368
637
|
}
|
|
369
638
|
|
|
639
|
+
declare type RowSelectionStateItem = (any | any[])[];
|
|
640
|
+
declare type RowSelectionStateObject = {
|
|
641
|
+
selectedRows: RowSelectionStateItem;
|
|
642
|
+
deselectedRows: RowSelectionStateItem;
|
|
643
|
+
defaultSelection: boolean;
|
|
644
|
+
} | {
|
|
645
|
+
defaultSelection: true;
|
|
646
|
+
deselectedRows: RowSelectionStateItem;
|
|
647
|
+
selectedRows?: RowSelectionStateItem;
|
|
648
|
+
} | {
|
|
649
|
+
defaultSelection: false;
|
|
650
|
+
selectedRows: RowSelectionStateItem;
|
|
651
|
+
deselectedRows?: RowSelectionStateItem;
|
|
652
|
+
};
|
|
653
|
+
declare type RowSelectionStateConfig<T> = {
|
|
654
|
+
groupBy: DataSourceState<T>['groupBy'];
|
|
655
|
+
groupDeepMap: DataSourceState<T>['groupDeepMap'];
|
|
656
|
+
totalCount: number;
|
|
657
|
+
indexer: DataSourceState<T>['indexer'];
|
|
658
|
+
lazyLoad: boolean;
|
|
659
|
+
};
|
|
660
|
+
declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
|
|
661
|
+
declare type RowSelectionStateOverrideForTesting = {
|
|
662
|
+
getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
|
|
663
|
+
getGroupByLength: RowSelectionState<any>['getGroupByLength'];
|
|
664
|
+
getGroupCount: RowSelectionState<any>['getGroupCount'];
|
|
665
|
+
getGroupKeysDirectlyInsideGroup: RowSelectionState<any>['getGroupKeysDirectlyInsideGroup'];
|
|
666
|
+
};
|
|
667
|
+
declare class RowSelectionState<T = any> {
|
|
668
|
+
selectedRows: RowSelectionStateItem | null;
|
|
669
|
+
deselectedRows: RowSelectionStateItem | null;
|
|
670
|
+
defaultSelection: boolean;
|
|
671
|
+
selectedMap: DeepMap<any, true>;
|
|
672
|
+
deselectedMap: DeepMap<any, true>;
|
|
673
|
+
selectionCache: DeepMap<any, boolean | null>;
|
|
674
|
+
selectionCountCache: DeepMap<any, {
|
|
675
|
+
selectedCount: number;
|
|
676
|
+
deselectedCount: number;
|
|
677
|
+
}>;
|
|
678
|
+
getConfig: GetRowSelectionStateConfig<T>;
|
|
679
|
+
getGroupKeysForPrimaryKey(pk: any): any[];
|
|
680
|
+
getGroupDeepMap(): DeepMap<any, DeepMapGroupValueType<T, any>> | undefined;
|
|
681
|
+
getGroupCount(groupKeys: any[]): number;
|
|
682
|
+
getGroupKeysDirectlyInsideGroup(groupKeys: any[]): any[][];
|
|
683
|
+
getGroupByLength(): number;
|
|
684
|
+
static from<T>(rowSeleStateObject: RowSelectionStateObject, getConfig: GetRowSelectionStateConfig<T>, _forTestingOnly?: RowSelectionStateOverrideForTesting): RowSelectionState<T>;
|
|
685
|
+
constructor(state: RowSelectionStateObject | RowSelectionState, getConfig: GetRowSelectionStateConfig<T>, _forTestingOnly?: RowSelectionStateOverrideForTesting);
|
|
686
|
+
mapSet: (name: 'selected' | 'deselected', key: any | any[]) => void;
|
|
687
|
+
_selectedMapSet: (key: any | any[]) => void;
|
|
688
|
+
_deselectedMapSet: (key: any | any[]) => void;
|
|
689
|
+
update(stateObject: RowSelectionStateObject): void;
|
|
690
|
+
private xcache;
|
|
691
|
+
getState(): RowSelectionStateObject;
|
|
692
|
+
deselectAll(): void;
|
|
693
|
+
selectAll(): void;
|
|
694
|
+
isRowDefaultSelected(): boolean;
|
|
695
|
+
isRowDefaultDeselected(): boolean;
|
|
696
|
+
/**
|
|
697
|
+
*
|
|
698
|
+
* @param key the id of the row - if a row in a grouped datasource, this is the final row id, without the group keys
|
|
699
|
+
* @param groupKeys the keys of row parents, in order
|
|
700
|
+
* @returns Whether the row is selected or not.
|
|
701
|
+
*/
|
|
702
|
+
isRowSelected(key: any, groupKeys?: any[]): boolean;
|
|
703
|
+
isRowDeselected(key: any, groupKeys?: any[]): boolean;
|
|
704
|
+
setRowSelected(key: string | number, selected: boolean, groupKeys?: any[]): void;
|
|
705
|
+
/**
|
|
706
|
+
* Returns if the selection state ('full','partial','none') for the current group
|
|
707
|
+
*
|
|
708
|
+
* The selection state will be full (true) if either of those are true:
|
|
709
|
+
* * the group keys are specified as selected
|
|
710
|
+
* * all the children are specified as selected
|
|
711
|
+
*
|
|
712
|
+
* The selection state will be partial (null) if either of those are true:
|
|
713
|
+
* * the group keys are partially selected
|
|
714
|
+
* * some of the children are specified as selected
|
|
715
|
+
*
|
|
716
|
+
*
|
|
717
|
+
* @param groupKeys the keys of the group row
|
|
718
|
+
* @param children leaf children that belong to the group
|
|
719
|
+
* @returns boolean
|
|
720
|
+
*/
|
|
721
|
+
getGroupRowSelectionState(initialGroupKeys: any[]): boolean | null;
|
|
722
|
+
private getGroupRowBooleanSelectionStateFromParent;
|
|
723
|
+
isGroupRowPartlySelected(groupKeys: any[]): boolean;
|
|
724
|
+
isGroupRowSelected(groupKeys: any[]): boolean;
|
|
725
|
+
isGroupRowDeselected(groupKeys: any[]): boolean;
|
|
726
|
+
selectGroupRow(groupKeys: any[]): void;
|
|
727
|
+
deselectGroupRow(groupKeys: any[]): void;
|
|
728
|
+
setRowAsSelected(key: string | number, groupKeys?: any[]): void;
|
|
729
|
+
setRowAsDeselected(key: string | number, groupKeys?: any[]): void;
|
|
730
|
+
deselectRow(key: any, groupKeys?: any[]): void;
|
|
731
|
+
selectRow(key: any, groupKeys?: any[]): void;
|
|
732
|
+
toggleGroupRowSelection(groupKeys: any[]): void;
|
|
733
|
+
toggleRowSelection(key: string | number, groupKeys?: any[] | undefined): void;
|
|
734
|
+
getSelectedCount(): number;
|
|
735
|
+
getDeselectedCount(): number;
|
|
736
|
+
getSelectionCountFor(groupKeys?: any[], parentSelected?: boolean): {
|
|
737
|
+
selectedCount: number;
|
|
738
|
+
deselectedCount: number;
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare type MultiRowSelectorOptions = {
|
|
743
|
+
getIdForIndex: (index: number) => string | number;
|
|
744
|
+
};
|
|
745
|
+
declare class MultiRowSelector {
|
|
746
|
+
getIdForIndex: MultiRowSelectorOptions['getIdForIndex'];
|
|
747
|
+
multiSelectStartIndex: number;
|
|
748
|
+
multiSelectEndIndex?: number;
|
|
749
|
+
_rowSelectionState: RowSelectionState;
|
|
750
|
+
constructor(options: MultiRowSelectorOptions);
|
|
751
|
+
set rowSelectionState(rowSelectionState: RowSelectionState);
|
|
752
|
+
get rowSelectionState(): RowSelectionState;
|
|
753
|
+
private selectRange;
|
|
754
|
+
private deselectRange;
|
|
755
|
+
/**
|
|
756
|
+
* This is the single click, without any modifier
|
|
757
|
+
*/
|
|
758
|
+
resetClick(index: number): void;
|
|
759
|
+
/**
|
|
760
|
+
* This is the click with ctrl/cmd key pressed
|
|
761
|
+
* @param index
|
|
762
|
+
*/
|
|
763
|
+
singleAddClick(index: number): void;
|
|
764
|
+
multiSelectClick(index: number): void;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
interface InfiniteTableComputedValues<T> {
|
|
768
|
+
scrollbars: {
|
|
769
|
+
vertical: boolean;
|
|
770
|
+
horizontal: boolean;
|
|
771
|
+
};
|
|
772
|
+
multiRowSelector: MultiRowSelector;
|
|
773
|
+
showColumnFilters: boolean;
|
|
774
|
+
renderSelectionCheckBox: boolean;
|
|
775
|
+
rowspan?: MatrixBrainOptions['rowspan'];
|
|
776
|
+
computedPinnedStartOverflow: boolean;
|
|
777
|
+
computedPinnedEndOverflow: boolean;
|
|
778
|
+
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
779
|
+
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
780
|
+
computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
|
|
781
|
+
computedVisibleColumns: InfiniteTableComputedColumn<T>[];
|
|
782
|
+
computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
|
|
783
|
+
computedColumnVisibility: InfiniteTablePropColumnVisibility;
|
|
784
|
+
computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
|
|
785
|
+
computedPinnedStartColumnsWidth: number;
|
|
786
|
+
computedPinnedStartWidth: number;
|
|
787
|
+
computedPinnedEndColumnsWidth: number;
|
|
788
|
+
computedPinnedEndWidth: number;
|
|
789
|
+
computedUnpinnedColumnsWidth: number;
|
|
790
|
+
computedUnpinnedOffset: number;
|
|
791
|
+
computedPinnedEndOffset: number;
|
|
792
|
+
computedRemainingSpace: number;
|
|
793
|
+
toggleGroupRow: (groupKeys: any[]) => void;
|
|
794
|
+
columnSize: (colIndex: number) => number;
|
|
795
|
+
}
|
|
796
|
+
|
|
370
797
|
declare type TableRenderCellFnParam = {
|
|
371
798
|
domRef: RefCallback<HTMLElement>;
|
|
372
799
|
rowIndex: number;
|
|
@@ -459,21 +886,10 @@ declare class ReactHeadlessTableRenderer extends Logger {
|
|
|
459
886
|
reset(): void;
|
|
460
887
|
}
|
|
461
888
|
|
|
462
|
-
declare type
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
componentActions: T_ACTIONS;
|
|
466
|
-
};
|
|
467
|
-
declare type ComponentStateGeneratedActions<T_STATE> = {
|
|
468
|
-
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
469
|
-
};
|
|
470
|
-
declare type ComponentInterceptedActions<T_STATE> = {
|
|
471
|
-
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
472
|
-
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
473
|
-
state: T_STATE;
|
|
474
|
-
}) => void | boolean;
|
|
889
|
+
declare type CellPosition = {
|
|
890
|
+
rowIndex: number;
|
|
891
|
+
colIndex: number;
|
|
475
892
|
};
|
|
476
|
-
declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
477
893
|
|
|
478
894
|
declare type NonUndefined<T> = T extends undefined ? never : T;
|
|
479
895
|
|
|
@@ -506,7 +922,11 @@ interface InfiniteTableSetupState<T> {
|
|
|
506
922
|
activeCellIndicatorDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
507
923
|
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
508
924
|
onColumnHeaderHeightCSSVarChange: SubscriptionCallback<number>;
|
|
509
|
-
|
|
925
|
+
cellClick: SubscriptionCallback<CellPosition & {
|
|
926
|
+
event: MouseEvent;
|
|
927
|
+
}>;
|
|
928
|
+
keyDown: SubscriptionCallback<KeyboardEvent>;
|
|
929
|
+
columnsWhenGrouping?: InfiniteTableColumnsMap<T>;
|
|
510
930
|
bodySize: Size;
|
|
511
931
|
brain: MatrixBrain;
|
|
512
932
|
headerBrain: MatrixBrain;
|
|
@@ -531,7 +951,7 @@ interface InfiniteTableMappedState<T> {
|
|
|
531
951
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
532
952
|
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
533
953
|
components: InfiniteTableProps<T>['components'];
|
|
534
|
-
columns:
|
|
954
|
+
columns: InfiniteTableColumnsMap<T>;
|
|
535
955
|
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
536
956
|
onReady: InfiniteTableProps<T>['onReady'];
|
|
537
957
|
onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
|
|
@@ -567,6 +987,7 @@ interface InfiniteTableMappedState<T> {
|
|
|
567
987
|
draggableColumns: NonUndefined<InfiniteTableProps<T>['draggableColumns']>;
|
|
568
988
|
sortable: NonUndefined<InfiniteTableProps<T>['sortable']>;
|
|
569
989
|
hideEmptyGroupColumns: NonUndefined<InfiniteTableProps<T>['hideEmptyGroupColumns']>;
|
|
990
|
+
keyboardSelection: NonUndefined<InfiniteTableProps<T>['keyboardSelection']>;
|
|
570
991
|
columnOrder: NonUndefined<InfiniteTableProps<T>['columnOrder']>;
|
|
571
992
|
showZebraRows: NonUndefined<InfiniteTableProps<T>['showZebraRows']>;
|
|
572
993
|
showHoverRows: NonUndefined<InfiniteTableProps<T>['showHoverRows']>;
|
|
@@ -600,499 +1021,374 @@ declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<
|
|
|
600
1021
|
interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
|
|
601
1022
|
}
|
|
602
1023
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
declare type
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
|
|
616
|
-
declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
617
|
-
declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
618
|
-
declare type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
619
|
-
declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
620
|
-
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
621
|
-
field?: keyof T;
|
|
1024
|
+
interface InfiniteTableContextValue<T> {
|
|
1025
|
+
imperativeApi: InfiniteTableApi<T>;
|
|
1026
|
+
componentState: InfiniteTableState<T>;
|
|
1027
|
+
componentActions: InfiniteTableActions<T>;
|
|
1028
|
+
computed: InfiniteTableComputedValues<T>;
|
|
1029
|
+
getComputed: () => InfiniteTableComputedValues<T>;
|
|
1030
|
+
getState: () => InfiniteTableState<T>;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
declare type RenderRange = {
|
|
1034
|
+
renderStartIndex: number;
|
|
1035
|
+
renderEndIndex: number;
|
|
622
1036
|
};
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
declare
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
declare type
|
|
696
|
-
declare type
|
|
697
|
-
|
|
698
|
-
header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
|
|
699
|
-
};
|
|
700
|
-
declare type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
701
|
-
id: string;
|
|
702
|
-
groupOffset: number;
|
|
703
|
-
computedWidth: number;
|
|
704
|
-
uniqueGroupId: string[];
|
|
705
|
-
columns: string[];
|
|
706
|
-
depth: number;
|
|
707
|
-
};
|
|
708
|
-
declare type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
709
|
-
groupIndexForColumn?: number;
|
|
710
|
-
groupByForColumn?: DataSourceGroupBy<T>;
|
|
711
|
-
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
712
|
-
groupCount: number;
|
|
713
|
-
groupBy: DataSourceGroupBy<T>[];
|
|
714
|
-
pivotBy?: DataSourcePivotBy<T>[];
|
|
715
|
-
};
|
|
716
|
-
declare type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
717
|
-
column: COL_TYPE;
|
|
718
|
-
groupBy: DataSourcePropGroupBy<T>;
|
|
719
|
-
pivotBy: DataSourcePropPivotBy<T>;
|
|
720
|
-
};
|
|
721
|
-
declare type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
722
|
-
declare type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
|
|
723
|
-
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
724
|
-
renderGroupIcon?: InfiniteTableGroupColumnRenderIconFunction<T>;
|
|
1037
|
+
|
|
1038
|
+
declare type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
|
|
1039
|
+
declare type BooleanDeepCollectionStateObject<KeyType> = {
|
|
1040
|
+
positiveItems: BooleanDeepCollectionStateKeys<KeyType>;
|
|
1041
|
+
negativeItems: BooleanDeepCollectionStateKeys<KeyType>;
|
|
1042
|
+
};
|
|
1043
|
+
declare abstract class BooleanDeepCollectionState<StateObject, KeyType extends any = any> {
|
|
1044
|
+
protected positiveMap?: DeepMap<KeyType, true>;
|
|
1045
|
+
protected negativeMap?: DeepMap<KeyType, true>;
|
|
1046
|
+
protected allNegative: boolean;
|
|
1047
|
+
protected allPositive: boolean;
|
|
1048
|
+
private initialState;
|
|
1049
|
+
constructor(state: BooleanDeepCollectionStateObject<KeyType> | BooleanDeepCollectionState<StateObject, KeyType>);
|
|
1050
|
+
abstract getPositiveFromState(state: StateObject): BooleanDeepCollectionStateKeys<KeyType>;
|
|
1051
|
+
abstract getNegativeFromState(state: StateObject): BooleanDeepCollectionStateKeys<KeyType>;
|
|
1052
|
+
abstract getState(): StateObject;
|
|
1053
|
+
protected getInitialState(): BooleanDeepCollectionStateObject<KeyType>;
|
|
1054
|
+
destroy(): void;
|
|
1055
|
+
private update;
|
|
1056
|
+
protected areAllNegative(): boolean;
|
|
1057
|
+
protected areAllPositive(): boolean;
|
|
1058
|
+
protected makeAllNegative(): void;
|
|
1059
|
+
protected makeAllPositive(): void;
|
|
1060
|
+
protected isItemPositive(keys: KeyType[]): boolean | undefined;
|
|
1061
|
+
protected isItemNegative(keys: KeyType[]): boolean;
|
|
1062
|
+
protected setItemValue(keys: KeyType[], shouldMakePositive: boolean): void;
|
|
1063
|
+
protected makeItemNegative(keys: KeyType[]): void;
|
|
1064
|
+
protected makeItemPositive(keys: KeyType[]): void;
|
|
1065
|
+
protected toggleItem(keys: KeyType[]): void;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
declare class GroupRowsState<KeyType extends any = any> extends BooleanDeepCollectionState<DataSourcePropGroupRowsStateObject<KeyType>, KeyType> {
|
|
1069
|
+
constructor(state: DataSourcePropGroupRowsStateObject<KeyType> | GroupRowsState<KeyType>);
|
|
1070
|
+
getState(): DataSourcePropGroupRowsStateObject<KeyType>;
|
|
1071
|
+
getPositiveFromState(state: DataSourcePropGroupRowsStateObject<KeyType>): DataSourceGroupRowsList<KeyType>;
|
|
1072
|
+
getNegativeFromState(state: DataSourcePropGroupRowsStateObject<KeyType>): DataSourceGroupRowsList<KeyType>;
|
|
1073
|
+
areAllCollapsed(): boolean;
|
|
1074
|
+
areAllExpanded(): boolean;
|
|
1075
|
+
collapseAll(): void;
|
|
1076
|
+
expandAll(): void;
|
|
1077
|
+
isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
|
|
1078
|
+
isGroupRowCollapsed(keys: KeyType[]): boolean;
|
|
1079
|
+
setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
|
|
1080
|
+
collapseGroupRow(keys: KeyType[]): void;
|
|
1081
|
+
expandGroupRow(keys: KeyType[]): void;
|
|
1082
|
+
toggleGroupRow(keys: KeyType[]): void;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
declare class Indexer<DataType, PrimaryKeyType = string> {
|
|
1086
|
+
primaryKeyToData: Map<string, DataType>;
|
|
1087
|
+
add: (primaryKey: PrimaryKeyType, data: DataType) => void;
|
|
1088
|
+
clear: () => void;
|
|
1089
|
+
getDataForPrimaryKey: (primaryKey: PrimaryKeyType) => DataType | undefined;
|
|
1090
|
+
indexArray: (arr: DataType[], toPrimaryKey: (data: DataType) => PrimaryKeyType) => void;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
interface DataSourceDataParams<T> {
|
|
1094
|
+
originalDataArray: T[];
|
|
1095
|
+
sortInfo?: DataSourceSortInfo<T>;
|
|
1096
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
1097
|
+
pivotBy?: DataSourcePropPivotBy<T>;
|
|
1098
|
+
filterValue?: DataSourcePropFilterValue<T>;
|
|
1099
|
+
groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
|
|
1100
|
+
lazyLoadBatchSize?: number;
|
|
1101
|
+
lazyLoadStartIndex?: number;
|
|
1102
|
+
groupKeys?: any[];
|
|
1103
|
+
append?: boolean;
|
|
1104
|
+
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1105
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1106
|
+
__cursorId?: DataSourceSetupState<T>['cursorId'];
|
|
1107
|
+
changes?: DataSourceDataParamsChanges<T>;
|
|
1108
|
+
}
|
|
1109
|
+
declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
|
|
1110
|
+
declare type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
1111
|
+
field?: keyof T;
|
|
725
1112
|
id?: string;
|
|
726
1113
|
};
|
|
727
|
-
declare type
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
declare type
|
|
731
|
-
declare type
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
lastVisibleRowIndex: number;
|
|
1114
|
+
declare type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
1115
|
+
declare type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
1116
|
+
declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
1117
|
+
declare type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
|
|
1118
|
+
declare type DataSourceRemoteData<T> = {
|
|
1119
|
+
data: T[] | LazyGroupDataItem<T>[];
|
|
1120
|
+
mappings?: DataSourceMappings;
|
|
1121
|
+
cache?: boolean;
|
|
1122
|
+
error?: string;
|
|
1123
|
+
totalCount?: number;
|
|
1124
|
+
totalCountUnfiltered?: number;
|
|
1125
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
740
1126
|
};
|
|
741
|
-
declare type
|
|
742
|
-
declare type
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
filterValue: T;
|
|
747
|
-
className: string;
|
|
748
|
-
onChange: (value: T | undefined) => void;
|
|
1127
|
+
declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
1128
|
+
declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
1129
|
+
declare type DataSourcePropGroupRowsStateObject<KeyType> = {
|
|
1130
|
+
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
1131
|
+
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
749
1132
|
};
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
773
|
-
columnGroups?: InfiniteTablePropColumnGroups;
|
|
774
|
-
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
775
|
-
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
776
|
-
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
777
|
-
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
778
|
-
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
779
|
-
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
780
|
-
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
781
|
-
rowHeight: number | string;
|
|
782
|
-
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
783
|
-
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
784
|
-
columnHeaderHeight: number | string;
|
|
785
|
-
domProps?: React$1.HTMLProps<HTMLDivElement>;
|
|
786
|
-
showZebraRows?: boolean;
|
|
787
|
-
showHoverRows?: boolean;
|
|
788
|
-
sortable?: boolean;
|
|
789
|
-
keyboardNavigation?: InfiniteTablePropKeyboardNavigation;
|
|
790
|
-
defaultActiveRowIndex?: number | null;
|
|
791
|
-
activeRowIndex?: number | null;
|
|
792
|
-
onActiveRowIndexChange?: (activeRowIndex: number) => void;
|
|
793
|
-
onActiveCellIndexChange?: (activeCellIndex: [number, number]) => void;
|
|
794
|
-
activeCellIndex?: [number, number] | null;
|
|
795
|
-
defaultActiveCellIndex?: [number, number] | null;
|
|
796
|
-
draggableColumns?: boolean;
|
|
797
|
-
header?: boolean;
|
|
798
|
-
headerOptions?: InfiniteTablePropHeaderOptions;
|
|
799
|
-
focusedClassName?: string;
|
|
800
|
-
focusedWithinClassName?: string;
|
|
801
|
-
focusedStyle?: React$1.CSSProperties;
|
|
802
|
-
focusedWithinStyle?: React$1.CSSProperties;
|
|
803
|
-
columnCssEllipsis?: boolean;
|
|
804
|
-
columnHeaderCssEllipsis?: boolean;
|
|
805
|
-
columnDefaultWidth?: number;
|
|
806
|
-
columnMinWidth?: number;
|
|
807
|
-
columnMaxWidth?: number;
|
|
808
|
-
resizableColumns?: boolean;
|
|
809
|
-
virtualizeColumns?: InfiniteTablePropVirtualizeColumns<T>;
|
|
810
|
-
virtualizeRows?: boolean;
|
|
811
|
-
onSelfFocus?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
812
|
-
onSelfBlur?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
813
|
-
onFocusWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
814
|
-
onBlurWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
815
|
-
onScrollToTop?: () => void;
|
|
816
|
-
onScrollToBottom?: () => void;
|
|
817
|
-
scrollStopDelay?: number;
|
|
818
|
-
onScrollStop?: (param: ScrollStopInfo) => void;
|
|
819
|
-
scrollToBottomOffset?: number;
|
|
820
|
-
defaultColumnOrder?: InfiniteTablePropColumnOrder;
|
|
821
|
-
columnOrder?: InfiniteTablePropColumnOrder;
|
|
822
|
-
onColumnOrderChange?: (columnOrder: InfiniteTablePropColumnOrderNormalized) => void;
|
|
823
|
-
onRowHeightChange?: (rowHeight: number) => void;
|
|
824
|
-
filterEditors?: InfiniteTablePropFilterEditors<T>;
|
|
825
|
-
onReady?: (api: InfiniteTableImperativeApi<T>) => void;
|
|
826
|
-
rowProps?: React$1.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React$1.HTMLProps<HTMLDivElement>);
|
|
827
|
-
licenseKey?: string;
|
|
828
|
-
scrollTopKey?: string | number;
|
|
829
|
-
autoSizeColumnsKey?: InfiniteTablePropAutoSizeColumnsKey;
|
|
1133
|
+
declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
1134
|
+
declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
1135
|
+
interface DataSourceMappedState<T> {
|
|
1136
|
+
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
1137
|
+
livePagination: DataSourceProps<T>['livePagination'];
|
|
1138
|
+
isRowSelected: DataSourceProps<T>['isRowSelected'];
|
|
1139
|
+
lazyLoad: DataSourceProps<T>['lazyLoad'];
|
|
1140
|
+
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
1141
|
+
data: DataSourceProps<T>['data'];
|
|
1142
|
+
sortMode: DataSourceProps<T>['sortMode'];
|
|
1143
|
+
filterFunction: DataSourceProps<T>['filterFunction'];
|
|
1144
|
+
filterValue: DataSourceProps<T>['filterValue'];
|
|
1145
|
+
filterTypes: NonUndefined<DataSourceProps<T>['filterTypes']>;
|
|
1146
|
+
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
1147
|
+
filterDelay: NonUndefined<DataSourceProps<T>['filterDelay']>;
|
|
1148
|
+
groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
|
|
1149
|
+
groupRowsState: GroupRowsState<T>;
|
|
1150
|
+
pivotBy: DataSourceProps<T>['pivotBy'];
|
|
1151
|
+
loading: NonUndefined<DataSourceProps<T>['loading']>;
|
|
1152
|
+
sortTypes: NonUndefined<DataSourceProps<T>['sortTypes']>;
|
|
1153
|
+
collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
|
|
1154
|
+
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
830
1155
|
}
|
|
831
|
-
declare type
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
1156
|
+
declare type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
1157
|
+
name?: string;
|
|
1158
|
+
field?: keyof T;
|
|
1159
|
+
initialValue?: AggregationResultType;
|
|
1160
|
+
getter?: (data: T) => any;
|
|
1161
|
+
reducer: string | ((accumulator: any, value: any, data: T, index: number, groupKeys: any[] | undefined) => AggregationResultType | any);
|
|
1162
|
+
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
1163
|
+
pivotColumn?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<T>>> | (({ column, }: {
|
|
1164
|
+
column: InfiniteTablePivotFinalColumnVariant<T>;
|
|
1165
|
+
}) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
|
|
840
1166
|
};
|
|
841
|
-
declare type
|
|
842
|
-
|
|
843
|
-
horizontal: boolean;
|
|
1167
|
+
declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
|
|
1168
|
+
inheritFromColumn?: string | boolean;
|
|
844
1169
|
};
|
|
845
|
-
declare type
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1170
|
+
declare type DataSourceMappings = Record<'totals' | 'values', string>;
|
|
1171
|
+
declare type LazyGroupDataItem<DataType> = {
|
|
1172
|
+
data: Partial<DataType>;
|
|
1173
|
+
keys: any[];
|
|
1174
|
+
aggregations?: Record<string, any>;
|
|
1175
|
+
dataset?: DataSourceRemoteData<DataType>;
|
|
1176
|
+
totalChildrenCount?: number;
|
|
1177
|
+
pivot?: {
|
|
1178
|
+
values: Record<string, any>;
|
|
1179
|
+
totals?: Record<string, any>;
|
|
851
1180
|
};
|
|
852
|
-
showColumnFilters: boolean;
|
|
853
|
-
rowspan?: MatrixBrainOptions['rowspan'];
|
|
854
|
-
computedPinnedStartOverflow: boolean;
|
|
855
|
-
computedPinnedEndOverflow: boolean;
|
|
856
|
-
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
857
|
-
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
858
|
-
computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
|
|
859
|
-
computedVisibleColumns: InfiniteTableComputedColumn<T>[];
|
|
860
|
-
computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
|
|
861
|
-
computedColumnVisibility: InfiniteTablePropColumnVisibility;
|
|
862
|
-
computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
|
|
863
|
-
computedPinnedStartColumnsWidth: number;
|
|
864
|
-
computedPinnedStartWidth: number;
|
|
865
|
-
computedPinnedEndColumnsWidth: number;
|
|
866
|
-
computedPinnedEndWidth: number;
|
|
867
|
-
computedUnpinnedColumnsWidth: number;
|
|
868
|
-
computedUnpinnedOffset: number;
|
|
869
|
-
computedPinnedEndOffset: number;
|
|
870
|
-
computedRemainingSpace: number;
|
|
871
|
-
toggleGroupRow: (groupKeys: any[]) => void;
|
|
872
|
-
columnSize: (colIndex: number) => number;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
interface InfiniteTableContextValue<T> {
|
|
876
|
-
imperativeApi: InfiniteTableImperativeApi<T>;
|
|
877
|
-
componentState: InfiniteTableState<T>;
|
|
878
|
-
componentActions: InfiniteTableActions<T>;
|
|
879
|
-
computed: InfiniteTableComputedValues<T>;
|
|
880
|
-
getComputed: () => InfiniteTableComputedValues<T>;
|
|
881
|
-
getState: () => InfiniteTableState<T>;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
declare type InfiniteTableBaseCellProps<T> = {
|
|
885
|
-
column: InfiniteTableComputedColumn<T>;
|
|
886
|
-
renderChildren: () => Renderable;
|
|
887
|
-
width: number;
|
|
888
|
-
cssEllipsis?: boolean;
|
|
889
|
-
contentStyle?: CSSProperties;
|
|
890
|
-
contentClassName?: string;
|
|
891
|
-
virtualized?: boolean;
|
|
892
|
-
skipColumnShifting?: boolean;
|
|
893
|
-
beforeChildren?: Renderable;
|
|
894
|
-
afterChildren?: Renderable;
|
|
895
|
-
cssPosition?: CSSProperties['position'];
|
|
896
|
-
domRef?: React.RefCallback<HTMLElement>;
|
|
897
1181
|
};
|
|
898
|
-
declare type
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
}
|
|
910
|
-
|
|
1182
|
+
declare type LazyRowInfoGroup<DataType> = {
|
|
1183
|
+
/**
|
|
1184
|
+
* Those are direct children of the current lazy group row
|
|
1185
|
+
*/
|
|
1186
|
+
children: LazyGroupDataItem<DataType>[];
|
|
1187
|
+
childrenLoading: boolean;
|
|
1188
|
+
childrenAvailable: boolean;
|
|
1189
|
+
cache: boolean;
|
|
1190
|
+
totalCount: number;
|
|
1191
|
+
totalCountUnfiltered: number;
|
|
1192
|
+
error?: string;
|
|
1193
|
+
};
|
|
1194
|
+
declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
|
|
1195
|
+
interface DataSourceSetupState<T> {
|
|
1196
|
+
indexer: Indexer<T, any>;
|
|
1197
|
+
unfilteredCount: number;
|
|
1198
|
+
filteredCount: number;
|
|
1199
|
+
lazyLoadCacheOfLoadedBatches: DeepMap<string, true>;
|
|
1200
|
+
pivotMappings?: DataSourceMappings;
|
|
1201
|
+
propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
|
|
1202
|
+
showSeparatePivotColumnForSingleAggregation: boolean;
|
|
1203
|
+
dataParams?: DataSourceDataParams<T>;
|
|
1204
|
+
originalLazyGroupData: LazyGroupDataDeepMap<T>;
|
|
1205
|
+
originalLazyGroupDataChangeDetect: number | string;
|
|
1206
|
+
scrollStopDelayUpdatedByTable: number;
|
|
1207
|
+
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
1208
|
+
notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
|
|
1209
|
+
notifyRenderRangeChange: SubscriptionCallback<RenderRange>;
|
|
1210
|
+
originalDataArray: T[];
|
|
1211
|
+
lastFilterDataArray?: T[];
|
|
1212
|
+
lastSortDataArray?: T[];
|
|
1213
|
+
lastGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
1214
|
+
dataArray: InfiniteTableRowInfo<T>[];
|
|
1215
|
+
groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
|
|
1216
|
+
reducerResults?: Record<string, AggregationReducerResult>;
|
|
1217
|
+
allRowsSelected: boolean;
|
|
1218
|
+
someRowsSelected: boolean;
|
|
1219
|
+
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
1220
|
+
pivotGrandTotalColumnPosition: InfiniteTablePropPivotGrandTotalColumnPosition;
|
|
1221
|
+
cursorId: number | symbol | DataSourceLivePaginationCursorValue;
|
|
1222
|
+
updatedAt: number;
|
|
1223
|
+
reducedAt: number;
|
|
1224
|
+
groupedAt: number;
|
|
1225
|
+
sortedAt: number;
|
|
1226
|
+
filteredAt: number;
|
|
1227
|
+
generateGroupRows: boolean;
|
|
1228
|
+
postFilterDataArray?: T[];
|
|
1229
|
+
postSortDataArray?: T[];
|
|
1230
|
+
postGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
1231
|
+
pivotColumns?: Map<string, InfiniteTableColumn<T>>;
|
|
1232
|
+
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
1233
|
+
}
|
|
1234
|
+
declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
1235
|
+
declare type DataSourcePropMultiRowSelectionChangeParamType = RowSelectionStateObject;
|
|
1236
|
+
declare type DataSourcePropRowSelection = DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
|
|
1237
|
+
declare type DataSourcePropRowSelection_MultiRow = RowSelectionStateObject;
|
|
1238
|
+
declare type DataSourcePropRowSelection_SingleRow = null | string | number;
|
|
1239
|
+
declare type DataSourcePropCellSelection = any;
|
|
1240
|
+
declare type DataSourcePropSelectionMode = false | 'single-cell' | 'single-row' | 'multi-cell' | 'multi-row';
|
|
1241
|
+
declare type DataSourcePropOnRowSelectionChange_MultiRow = (rowSelection: DataSourcePropRowSelection_MultiRow, selectionMode: 'multi-row') => void;
|
|
1242
|
+
declare type DataSourcePropOnRowSelectionChange_SingleRow = (rowSelection: DataSourcePropRowSelection_SingleRow, selectionMode: 'single-row') => void;
|
|
1243
|
+
declare type DataSourcePropOnRowSelectionChange = DataSourcePropOnRowSelectionChange_SingleRow | DataSourcePropOnRowSelectionChange_MultiRow;
|
|
1244
|
+
declare type DataSourcePropOnCellSelectionChange = (cellSelectionParams: any) => void;
|
|
1245
|
+
declare type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>, rowSelectionState: RowSelectionState, selectionMode: 'multi-row') => boolean | null;
|
|
1246
|
+
declare type DataSourceProps<T> = {
|
|
1247
|
+
children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
|
|
1248
|
+
primaryKey: keyof T | ((data: T) => string);
|
|
1249
|
+
fields?: (keyof T)[];
|
|
1250
|
+
data: DataSourceData<T>;
|
|
1251
|
+
selectionMode?: DataSourcePropSelectionMode;
|
|
1252
|
+
rowSelection?: DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
|
|
1253
|
+
defaultRowSelection?: DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
|
|
1254
|
+
cellSelection?: DataSourcePropCellSelection;
|
|
1255
|
+
defaultCellSelection?: DataSourcePropCellSelection;
|
|
1256
|
+
onCellSelectionChange?: DataSourcePropOnCellSelectionChange;
|
|
1257
|
+
isRowSelected?: DataSourcePropIsRowSelected<T>;
|
|
1258
|
+
lazyLoad?: boolean | {
|
|
1259
|
+
batchSize?: number;
|
|
1260
|
+
};
|
|
1261
|
+
loading?: boolean;
|
|
1262
|
+
defaultLoading?: boolean;
|
|
1263
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
1264
|
+
pivotBy?: DataSourcePropPivotBy<T>;
|
|
1265
|
+
defaultPivotBy?: DataSourcePropPivotBy<T>;
|
|
1266
|
+
onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
|
|
1267
|
+
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1268
|
+
defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1269
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
1270
|
+
defaultGroupBy?: DataSourcePropGroupBy<T>;
|
|
1271
|
+
onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
|
|
1272
|
+
groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
|
|
1273
|
+
defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
|
|
1274
|
+
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
1275
|
+
collapseGroupRowsOnDataFunctionChange?: boolean;
|
|
1276
|
+
sortInfo?: DataSourceSortInfo<T>;
|
|
1277
|
+
defaultSortInfo?: DataSourceSortInfo<T>;
|
|
1278
|
+
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
1279
|
+
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
1280
|
+
livePagination?: boolean;
|
|
1281
|
+
livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
|
|
1282
|
+
onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
|
|
1283
|
+
filterFunction?: DataSourcePropFilterFunction<T>;
|
|
1284
|
+
sortMode?: 'local' | 'remote';
|
|
1285
|
+
filterMode?: 'local' | 'remote';
|
|
1286
|
+
filterValue?: DataSourcePropFilterValue<T>;
|
|
1287
|
+
defaultFilterValue?: DataSourcePropFilterValue<T>;
|
|
1288
|
+
onFilterValueChange?: (filterValue: DataSourcePropFilterValue<T>) => void;
|
|
1289
|
+
filterDelay?: number;
|
|
1290
|
+
filterTypes?: DataSourcePropFilterTypes<T>;
|
|
1291
|
+
sortTypes?: DataSourcePropSortTypes;
|
|
1292
|
+
} & ({
|
|
1293
|
+
selectionMode?: 'multi-row';
|
|
1294
|
+
rowSelection?: DataSourcePropRowSelection_MultiRow;
|
|
1295
|
+
defaultRowSelection?: DataSourcePropRowSelection_MultiRow;
|
|
1296
|
+
onRowSelectionChange?: DataSourcePropOnRowSelectionChange_MultiRow;
|
|
1297
|
+
} | {
|
|
1298
|
+
selectionMode?: 'single-row';
|
|
1299
|
+
rowSelection?: DataSourcePropRowSelection_SingleRow;
|
|
1300
|
+
defaultRowSelection?: DataSourcePropRowSelection_SingleRow;
|
|
1301
|
+
onRowSelectionChange?: DataSourcePropOnRowSelectionChange_SingleRow;
|
|
1302
|
+
} | {
|
|
1303
|
+
selectionMode?: 'single-cell';
|
|
1304
|
+
} | {
|
|
1305
|
+
selectionMode?: 'multi-cell';
|
|
1306
|
+
} | {
|
|
1307
|
+
selectionMode?: false;
|
|
911
1308
|
});
|
|
912
|
-
|
|
913
|
-
declare type
|
|
914
|
-
declare type
|
|
915
|
-
domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
|
|
916
|
-
sortTool: JSX.Element | null;
|
|
917
|
-
dragging: boolean;
|
|
918
|
-
column: COL_TYPE;
|
|
919
|
-
columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
|
|
920
|
-
columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
|
|
921
|
-
};
|
|
922
|
-
declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
923
|
-
domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
|
|
924
|
-
value: string | number | Renderable;
|
|
925
|
-
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
926
|
-
rowIndex: number;
|
|
927
|
-
rowActive: boolean;
|
|
928
|
-
column: COL_TYPE;
|
|
929
|
-
toggleCurrentGroupRow: () => void;
|
|
930
|
-
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
931
|
-
groupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
932
|
-
pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
|
|
933
|
-
};
|
|
934
|
-
declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
|
|
935
|
-
declare type InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & {
|
|
936
|
-
rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<DATA_TYPE>;
|
|
937
|
-
isGroupRow: true;
|
|
938
|
-
data: Partial<DATA_TYPE> | null;
|
|
939
|
-
};
|
|
940
|
-
declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
|
|
941
|
-
declare type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> & {
|
|
942
|
-
collapsed: boolean;
|
|
943
|
-
groupIcon: Renderable;
|
|
944
|
-
};
|
|
945
|
-
declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
946
|
-
declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
947
|
-
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
948
|
-
data: DATA_TYPE | Partial<DATA_TYPE> | null;
|
|
949
|
-
dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
|
|
950
|
-
rowIndex: number;
|
|
951
|
-
column: COL_TYPE;
|
|
952
|
-
};
|
|
953
|
-
declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
954
|
-
declare type InfiniteTableGroupColumnRenderIconFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (param: InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
955
|
-
declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParams<T>) => Renderable;
|
|
956
|
-
declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
957
|
-
declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
958
|
-
declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
959
|
-
declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
|
|
960
|
-
declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
961
|
-
declare type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
|
|
962
|
-
/**
|
|
963
|
-
* Determines the field property of the column.
|
|
964
|
-
*/
|
|
965
|
-
field?: keyof T;
|
|
966
|
-
render?: InfiniteTableColumnRenderFunction<T>;
|
|
967
|
-
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
968
|
-
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
969
|
-
valueFormatter?: InfiniteTableColumnValueFormatter<T>;
|
|
970
|
-
}, 'render' | 'renderValue' | 'field' | 'valueGetter' | 'valueFormatter'>;
|
|
971
|
-
declare type InfiniteTableColumnStyleFnParams<T> = {
|
|
972
|
-
value: Renderable;
|
|
973
|
-
column: InfiniteTableColumn<T>;
|
|
974
|
-
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
975
|
-
declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
976
|
-
declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParams<T>) => undefined | string;
|
|
977
|
-
declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParams<T>) => undefined | React.CSSProperties;
|
|
978
|
-
declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
979
|
-
declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
980
|
-
declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
|
|
981
|
-
declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
982
|
-
declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
|
|
983
|
-
declare type InfiniteTableColumnValueGetterParams<T> = {
|
|
1309
|
+
declare type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
|
|
1310
|
+
declare type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
|
|
1311
|
+
declare type DataSourceFilterFunctionParam<T> = {
|
|
984
1312
|
data: T;
|
|
985
|
-
|
|
1313
|
+
index: number;
|
|
1314
|
+
dataArray: T[];
|
|
1315
|
+
primaryKey: any;
|
|
986
1316
|
};
|
|
987
|
-
declare type
|
|
988
|
-
declare type
|
|
989
|
-
declare type
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
};
|
|
1000
|
-
align?: InfiniteTableColumnAlign;
|
|
1001
|
-
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
1002
|
-
columnGroup?: string;
|
|
1003
|
-
header?: InfiniteTableColumnHeader<T>;
|
|
1004
|
-
name?: Renderable;
|
|
1005
|
-
cssEllipsis?: boolean;
|
|
1006
|
-
headerCssEllipsis?: boolean;
|
|
1007
|
-
type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
|
|
1008
|
-
dataType?: InfiniteTableDataTypeNames;
|
|
1009
|
-
sortType?: string;
|
|
1010
|
-
filterType?: string;
|
|
1011
|
-
style?: InfiniteTableColumnStyle<T>;
|
|
1012
|
-
headerStyle?: InfiniteTableColumnHeaderStyle<T>;
|
|
1013
|
-
headerClassName?: InfiniteTableColumnHeaderClassName<T>;
|
|
1014
|
-
className?: InfiniteTableColumnClassName<T>;
|
|
1015
|
-
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
1016
|
-
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
1017
|
-
valueFormatter?: InfiniteTableColumnValueFormatter<T>;
|
|
1018
|
-
defaultWidth?: number;
|
|
1019
|
-
defaultFlex?: number;
|
|
1020
|
-
defaultFilterable?: boolean;
|
|
1021
|
-
minWidth?: number;
|
|
1022
|
-
maxWidth?: number;
|
|
1023
|
-
components?: {
|
|
1024
|
-
ColumnCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
|
|
1025
|
-
HeaderCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
|
|
1026
|
-
};
|
|
1317
|
+
declare type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
|
|
1318
|
+
declare type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
|
|
1319
|
+
declare type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
|
|
1320
|
+
field: keyof T;
|
|
1321
|
+
}, {
|
|
1322
|
+
id: string;
|
|
1323
|
+
}> & {
|
|
1324
|
+
valueGetter?: DataSourceFilterValueItemValueGetter<T>;
|
|
1325
|
+
filterValue: any;
|
|
1326
|
+
disabled?: boolean;
|
|
1327
|
+
filterType: string;
|
|
1328
|
+
operator: string;
|
|
1027
1329
|
};
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
*/
|
|
1035
|
-
declare type InfiniteTableColumn<DATA_TYPE> = {} & InfiniteTableBaseColumn<DATA_TYPE> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<DATA_TYPE>;
|
|
1036
|
-
declare type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
1037
|
-
groupByField: string | string[];
|
|
1038
|
-
id?: string;
|
|
1330
|
+
declare type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T>) => any;
|
|
1331
|
+
declare type DataSourceFilterType<T> = {
|
|
1332
|
+
emptyValues: Set<any>;
|
|
1333
|
+
label?: string;
|
|
1334
|
+
defaultOperator: string;
|
|
1335
|
+
operators: DataSourceFilterOperator<T>[];
|
|
1039
1336
|
};
|
|
1040
|
-
declare type
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
pivotGroupKeys: KeyType[];
|
|
1045
|
-
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
1046
|
-
pivotGroupKey: KeyType;
|
|
1047
|
-
pivotIndex: number;
|
|
1337
|
+
declare type DataSourceFilterOperator<T> = {
|
|
1338
|
+
name: string;
|
|
1339
|
+
label?: string;
|
|
1340
|
+
fn: DataSourceFilterOperatorFunction<T>;
|
|
1048
1341
|
};
|
|
1049
|
-
declare type
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1342
|
+
declare type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
|
|
1343
|
+
declare type DataSourceFilterOperatorFunctionParam<T> = {
|
|
1344
|
+
currentValue: any;
|
|
1345
|
+
filterValue: any;
|
|
1346
|
+
emptyValues: Set<any>;
|
|
1347
|
+
} & DataSourceFilterFunctionParam<T>;
|
|
1348
|
+
declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
1349
|
+
declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
1350
|
+
declare type DataSourceLivePaginationCursorParams<T> = {
|
|
1351
|
+
array: T[];
|
|
1352
|
+
lastItem: T | Partial<T> | null;
|
|
1353
|
+
length: number;
|
|
1059
1354
|
};
|
|
1060
|
-
declare type
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
computedSorted: boolean;
|
|
1075
|
-
computedSortedAsc: boolean;
|
|
1076
|
-
computedSortedDesc: boolean;
|
|
1077
|
-
computedSortIndex: number;
|
|
1078
|
-
computedVisibleIndex: number;
|
|
1079
|
-
computedVisibleIndexInCategory: number;
|
|
1080
|
-
computedMultiSort: boolean;
|
|
1081
|
-
computedFiltered: boolean;
|
|
1082
|
-
computedFilterable: boolean;
|
|
1083
|
-
computedFilterValue: DataSourceFilterValueItem<T> | null;
|
|
1084
|
-
computedPinned: InfiniteTableColumnPinnedValues;
|
|
1085
|
-
computedDraggable: boolean;
|
|
1086
|
-
computedResizable: boolean;
|
|
1087
|
-
computedFirstInCategory: boolean;
|
|
1088
|
-
computedLastInCategory: boolean;
|
|
1089
|
-
computedFirst: boolean;
|
|
1090
|
-
computedLast: boolean;
|
|
1091
|
-
toggleSort: () => void;
|
|
1092
|
-
id: string;
|
|
1355
|
+
declare type DataSourceLivePaginationCursorValue = string | number | null;
|
|
1356
|
+
interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
1357
|
+
}
|
|
1358
|
+
declare type DataSourceDerivedState<T> = {
|
|
1359
|
+
toPrimaryKey: (data: T) => any;
|
|
1360
|
+
operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
|
|
1361
|
+
filterMode: NonUndefined<DataSourceProps<T>['filterMode']>;
|
|
1362
|
+
multiSort: boolean;
|
|
1363
|
+
controlledSort: boolean;
|
|
1364
|
+
controlledFilter: boolean;
|
|
1365
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1366
|
+
lazyLoadBatchSize?: number;
|
|
1367
|
+
rowSelection: RowSelectionState | null | number | string;
|
|
1368
|
+
selectionMode: NonUndefined<DataSourceProps<T>['selectionMode']>;
|
|
1093
1369
|
};
|
|
1094
|
-
declare type
|
|
1095
|
-
|
|
1370
|
+
declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
1371
|
+
interface DataSourceContextValue<T> {
|
|
1372
|
+
getState: () => DataSourceState<T>;
|
|
1373
|
+
componentState: DataSourceState<T>;
|
|
1374
|
+
componentActions: DataSourceComponentActions<T>;
|
|
1375
|
+
}
|
|
1376
|
+
declare enum DataSourceActionType {
|
|
1377
|
+
INIT = "INIT"
|
|
1378
|
+
}
|
|
1379
|
+
interface DataSourceAction<T> {
|
|
1380
|
+
type: DataSourceActionType;
|
|
1381
|
+
payload: T;
|
|
1382
|
+
}
|
|
1383
|
+
interface DataSourceReducer<T> {
|
|
1384
|
+
(state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
|
|
1388
|
+
|
|
1389
|
+
declare function useDataSource<T>(): DataSourceState<T>;
|
|
1390
|
+
|
|
1391
|
+
declare function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
1096
1392
|
|
|
1097
1393
|
declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
1098
1394
|
id: string;
|
|
@@ -1134,6 +1430,7 @@ declare type InfiniteTable_RowInfoBase<_T> = {
|
|
|
1134
1430
|
id: any;
|
|
1135
1431
|
value?: any;
|
|
1136
1432
|
indexInAll: number;
|
|
1433
|
+
rowSelected: boolean | null;
|
|
1137
1434
|
};
|
|
1138
1435
|
declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
|
|
1139
1436
|
dataSourceHasGrouping: true;
|
|
@@ -1154,12 +1451,30 @@ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
|
|
|
1154
1451
|
/**
|
|
1155
1452
|
* The count of all leaf nodes (normal rows) that are inside this group.
|
|
1156
1453
|
* This count is the same as the length of the groupData array property.
|
|
1454
|
+
*
|
|
1157
1455
|
*/
|
|
1158
1456
|
groupCount: number;
|
|
1159
1457
|
/**
|
|
1160
1458
|
* The array of all leaf nodes (normal rows) that are inside this group.
|
|
1161
1459
|
*/
|
|
1162
|
-
groupData: T[];
|
|
1460
|
+
groupData: T[];
|
|
1461
|
+
/**
|
|
1462
|
+
* The count of all selected leaf nodes (normal rows) inside the group that are selected
|
|
1463
|
+
*/
|
|
1464
|
+
selectedChildredCount: number;
|
|
1465
|
+
/**
|
|
1466
|
+
* The count of all deselected leaf nodes (normal rows) inside the group that are selected
|
|
1467
|
+
*/
|
|
1468
|
+
deselectedChildredCount: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* Will be used only with lazy loading, if the server provides this info on the data items.
|
|
1471
|
+
*
|
|
1472
|
+
* Represents the total count of all leaf nodes (normal rows) that are under this group
|
|
1473
|
+
* at any level (so not only direct children). This is needed for multiple selection to work properly,
|
|
1474
|
+
* so the table component knows how many rows are on the remote backend, and whether to show a group as selected or not
|
|
1475
|
+
* when it has a certain number of rows selected
|
|
1476
|
+
*/
|
|
1477
|
+
totalChildrenCount?: number;
|
|
1163
1478
|
/**
|
|
1164
1479
|
* The count of all leaf nodes (normal rows) inside the group that are not being visible
|
|
1165
1480
|
* due to collapsing (either the current row is collapsed or any of its children)
|
|
@@ -1309,6 +1624,7 @@ declare type DeepMapGroupValueType<DataType, KeyType> = {
|
|
|
1309
1624
|
commonData?: Partial<DataType>;
|
|
1310
1625
|
childrenLoading: boolean;
|
|
1311
1626
|
childrenAvailable: boolean;
|
|
1627
|
+
totalChildrenCount?: number;
|
|
1312
1628
|
cache: boolean;
|
|
1313
1629
|
error?: string;
|
|
1314
1630
|
reducerResults: Record<string, AggregationReducerResult>;
|
|
@@ -1344,312 +1660,287 @@ declare type DataGroupResult<DataType, KeyType extends any> = {
|
|
|
1344
1660
|
declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
|
|
1345
1661
|
declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
|
|
1346
1662
|
|
|
1347
|
-
declare type
|
|
1348
|
-
declare type
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
* sort functions already implemented
|
|
1356
|
-
*/
|
|
1357
|
-
type?: string;
|
|
1358
|
-
fn?: (a: any, b: any) => number;
|
|
1359
|
-
/**
|
|
1360
|
-
* a property whose value to use for sorting on the array items
|
|
1361
|
-
*/
|
|
1362
|
-
field?: keyof T;
|
|
1363
|
-
/**
|
|
1364
|
-
* or a function to retrieve the item value to use for sorting
|
|
1365
|
-
*/
|
|
1366
|
-
valueGetter?: (item: T) => any;
|
|
1367
|
-
};
|
|
1368
|
-
declare const multisort: {
|
|
1369
|
-
<T>(sortInfo: MultisortInfo<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
|
|
1370
|
-
knownTypes: {
|
|
1371
|
-
[key: string]: (first: any, second: any) => number;
|
|
1372
|
-
};
|
|
1373
|
-
};
|
|
1663
|
+
declare type InfiniteCheckBoxPropChecked = true | false | null;
|
|
1664
|
+
declare type InfiniteCheckBoxProps = {
|
|
1665
|
+
checked?: InfiniteCheckBoxPropChecked;
|
|
1666
|
+
defaultChecked?: InfiniteCheckBoxPropChecked;
|
|
1667
|
+
onChange?: (checked: InfiniteCheckBoxPropChecked) => void;
|
|
1668
|
+
domProps?: React$1.HTMLProps<HTMLElement>;
|
|
1669
|
+
};
|
|
1670
|
+
declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): JSX.Element;
|
|
1374
1671
|
|
|
1375
|
-
declare type
|
|
1376
|
-
|
|
1377
|
-
|
|
1672
|
+
declare type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
|
|
1673
|
+
declare type InfiniteTableSelectionApi = {
|
|
1674
|
+
get allRowsSelected(): boolean;
|
|
1675
|
+
isRowSelected(pk: any, groupKeys?: any[]): boolean;
|
|
1676
|
+
isRowDeselected(pk: any, groupKeys?: any[]): boolean;
|
|
1677
|
+
selectRow(pk: any, groupKeys?: any[]): void;
|
|
1678
|
+
deselectRow(pk: any, groupKeys?: any[]): void;
|
|
1679
|
+
toggleRowSelection(pk: any, groupKeys?: any[]): void;
|
|
1680
|
+
selectGroupRow(groupKeys: any[], children?: ArrayOfIds): void;
|
|
1681
|
+
deselectGroupRow(groupKeys: any[], children?: ArrayOfIds): void;
|
|
1682
|
+
toggleGroupRowSelection(groupKeys: any[], children?: ArrayOfIds): void;
|
|
1683
|
+
getGroupRowSelectionState(groupKeys: any[]): boolean | null;
|
|
1684
|
+
getSelectedPrimaryKeys(): (string | number)[];
|
|
1685
|
+
selectAll(): void;
|
|
1686
|
+
deselectAll(): void;
|
|
1378
1687
|
};
|
|
1379
1688
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
groupBy?: DataSourcePropGroupBy<T>;
|
|
1384
|
-
pivotBy?: DataSourcePropPivotBy<T>;
|
|
1385
|
-
filterValue?: DataSourcePropFilterValue<T>;
|
|
1386
|
-
groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
|
|
1387
|
-
lazyLoadBatchSize?: number;
|
|
1388
|
-
lazyLoadStartIndex?: number;
|
|
1389
|
-
groupKeys?: any[];
|
|
1390
|
-
append?: boolean;
|
|
1391
|
-
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1392
|
-
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1393
|
-
__cursorId?: DataSourceSetupState<T>['cursorId'];
|
|
1394
|
-
changes?: DataSourceDataParamsChanges<T>;
|
|
1395
|
-
}
|
|
1396
|
-
declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
|
|
1397
|
-
declare type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
1398
|
-
field?: keyof T;
|
|
1399
|
-
id?: string;
|
|
1400
|
-
};
|
|
1401
|
-
declare type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
1402
|
-
declare type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
1403
|
-
declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
1404
|
-
declare type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
|
|
1405
|
-
declare type DataSourceRemoteData<T> = {
|
|
1406
|
-
data: T[] | LazyGroupDataItem<T>[];
|
|
1407
|
-
mappings?: DataSourceMappings;
|
|
1408
|
-
cache?: boolean;
|
|
1409
|
-
error?: string;
|
|
1410
|
-
totalCount?: number;
|
|
1411
|
-
totalCountUnfiltered?: number;
|
|
1412
|
-
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1413
|
-
};
|
|
1414
|
-
declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
1415
|
-
declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
1416
|
-
declare type DataSourcePropGroupRowsStateObject<KeyType> = {
|
|
1417
|
-
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
1418
|
-
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
1689
|
+
declare type LoadMaskProps = {
|
|
1690
|
+
visible: boolean;
|
|
1691
|
+
children: Renderable;
|
|
1419
1692
|
};
|
|
1420
|
-
declare type
|
|
1421
|
-
declare type
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
|
|
1435
|
-
groupRowsState: GroupRowsState<T>;
|
|
1436
|
-
pivotBy: DataSourceProps<T>['pivotBy'];
|
|
1437
|
-
loading: NonUndefined<DataSourceProps<T>['loading']>;
|
|
1438
|
-
sortTypes: NonUndefined<DataSourceProps<T>['sortTypes']>;
|
|
1439
|
-
collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
|
|
1440
|
-
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
1441
|
-
}
|
|
1442
|
-
declare type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
1443
|
-
name?: string;
|
|
1693
|
+
declare type InfiniteTablePropColumnOrderNormalized = string[];
|
|
1694
|
+
declare type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
1695
|
+
declare type InfiniteTablePropColumnVisibility = Record<string, false>;
|
|
1696
|
+
declare type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
|
|
1697
|
+
declare type InfiniteTablePropColumnPinning = Record<string, true | 'start' | 'end'>;
|
|
1698
|
+
declare type InfiniteTableRowStyleFnParams<T> = {
|
|
1699
|
+
rowIndex: number;
|
|
1700
|
+
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
1701
|
+
declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
|
|
1702
|
+
declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
1703
|
+
declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
1704
|
+
declare type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
1705
|
+
declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
1706
|
+
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
1444
1707
|
field?: keyof T;
|
|
1445
|
-
initialValue?: AggregationResultType;
|
|
1446
|
-
getter?: (data: T) => any;
|
|
1447
|
-
reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
|
|
1448
|
-
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
1449
|
-
pivotColumn?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<T>>> | (({ column, }: {
|
|
1450
|
-
column: InfiniteTablePivotFinalColumnVariant<T>;
|
|
1451
|
-
}) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
|
|
1452
|
-
};
|
|
1453
|
-
declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
|
|
1454
|
-
inheritFromColumn?: string | boolean;
|
|
1455
1708
|
};
|
|
1456
|
-
declare type
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1709
|
+
declare type InfiniteTableColumnType<T> = {
|
|
1710
|
+
minWidth?: number;
|
|
1711
|
+
maxWidth?: number;
|
|
1712
|
+
filterType?: string;
|
|
1713
|
+
sortType?: string;
|
|
1714
|
+
dataType?: InfiniteTableDataTypeNames;
|
|
1715
|
+
defaultWidth?: number;
|
|
1716
|
+
defaultFlex?: number;
|
|
1717
|
+
defaultPinned?: InfiniteTableColumnPinnedValues;
|
|
1718
|
+
defaultFilterable?: boolean;
|
|
1719
|
+
defaultHiddenWhenGroupedBy?: InfiniteTableColumn<T>['defaultHiddenWhenGroupedBy'];
|
|
1720
|
+
header?: InfiniteTableColumn<T>['header'];
|
|
1721
|
+
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
1722
|
+
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
1723
|
+
sortable?: InfiniteTableColumn<T>['sortable'];
|
|
1724
|
+
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
1725
|
+
align?: InfiniteTableColumn<T>['align'];
|
|
1726
|
+
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
1727
|
+
columnGroup?: string;
|
|
1728
|
+
cssEllipsis?: boolean;
|
|
1729
|
+
headerCssEllipsis?: boolean;
|
|
1730
|
+
field?: keyof T;
|
|
1731
|
+
components?: InfiniteTableColumn<T>['components'];
|
|
1732
|
+
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
1733
|
+
render?: InfiniteTableColumn<T>['render'];
|
|
1734
|
+
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
1735
|
+
valueFormatter?: InfiniteTableColumn<T>['valueFormatter'];
|
|
1736
|
+
style?: InfiniteTableColumn<T>['style'];
|
|
1737
|
+
headerStyle?: InfiniteTableColumn<T>['headerStyle'];
|
|
1738
|
+
headerClassName?: InfiniteTableColumn<T>['headerClassName'];
|
|
1466
1739
|
};
|
|
1467
|
-
declare type
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
childrenAvailable: boolean;
|
|
1474
|
-
cache: boolean;
|
|
1475
|
-
totalCount: number;
|
|
1476
|
-
totalCountUnfiltered: number;
|
|
1477
|
-
error?: string;
|
|
1740
|
+
declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
1741
|
+
declare type InfiniteTableColumnSizingOptions = {
|
|
1742
|
+
flex?: number;
|
|
1743
|
+
width?: number;
|
|
1744
|
+
minWidth?: number;
|
|
1745
|
+
maxWidth?: number;
|
|
1478
1746
|
};
|
|
1479
|
-
declare type
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
sortedAt: number;
|
|
1507
|
-
filteredAt: number;
|
|
1508
|
-
generateGroupRows: boolean;
|
|
1509
|
-
postFilterDataArray?: T[];
|
|
1510
|
-
postSortDataArray?: T[];
|
|
1511
|
-
postGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
1512
|
-
pivotColumns?: Map<string, InfiniteTableColumn<T>>;
|
|
1513
|
-
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
1514
|
-
}
|
|
1515
|
-
declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
1516
|
-
declare type DataSourceProps<T> = {
|
|
1517
|
-
children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
|
|
1518
|
-
primaryKey: keyof T | (({ data, index }: {
|
|
1519
|
-
data: T;
|
|
1520
|
-
index: number;
|
|
1521
|
-
}) => string);
|
|
1522
|
-
fields?: (keyof T)[];
|
|
1523
|
-
data: DataSourceData<T>;
|
|
1524
|
-
lazyLoad?: boolean | {
|
|
1525
|
-
batchSize?: number;
|
|
1526
|
-
};
|
|
1527
|
-
loading?: boolean;
|
|
1528
|
-
defaultLoading?: boolean;
|
|
1529
|
-
onLoadingChange?: (loading: boolean) => void;
|
|
1530
|
-
pivotBy?: DataSourcePropPivotBy<T>;
|
|
1531
|
-
defaultPivotBy?: DataSourcePropPivotBy<T>;
|
|
1532
|
-
onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
|
|
1533
|
-
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1534
|
-
defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
1535
|
-
groupBy?: DataSourcePropGroupBy<T>;
|
|
1536
|
-
defaultGroupBy?: DataSourcePropGroupBy<T>;
|
|
1537
|
-
onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
|
|
1538
|
-
groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
|
|
1539
|
-
defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
|
|
1540
|
-
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
1541
|
-
collapseGroupRowsOnDataFunctionChange?: boolean;
|
|
1542
|
-
sortInfo?: DataSourceSortInfo<T>;
|
|
1543
|
-
defaultSortInfo?: DataSourceSortInfo<T>;
|
|
1544
|
-
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
1545
|
-
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
1546
|
-
livePagination?: boolean;
|
|
1547
|
-
livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
|
|
1548
|
-
onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
|
|
1549
|
-
filterFunction?: DataSourcePropFilterFunction<T>;
|
|
1550
|
-
sortMode?: 'local' | 'remote';
|
|
1551
|
-
filterMode?: 'local' | 'remote';
|
|
1552
|
-
filterValue?: DataSourcePropFilterValue<T>;
|
|
1553
|
-
defaultFilterValue?: DataSourcePropFilterValue<T>;
|
|
1554
|
-
onFilterValueChange?: (filterValue: DataSourcePropFilterValue<T>) => void;
|
|
1555
|
-
filterDelay?: number;
|
|
1556
|
-
filterTypes?: DataSourcePropFilterTypes<T>;
|
|
1557
|
-
sortTypes?: DataSourcePropSortTypes;
|
|
1747
|
+
declare type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
|
|
1748
|
+
declare type InfiniteTableApi<T> = {
|
|
1749
|
+
get selectionApi(): InfiniteTableSelectionApi;
|
|
1750
|
+
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
1751
|
+
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
1752
|
+
x?: T;
|
|
1753
|
+
get scrollLeft(): number;
|
|
1754
|
+
set scrollLeft(value: number);
|
|
1755
|
+
get scrollTop(): number;
|
|
1756
|
+
set scrollTop(value: number);
|
|
1757
|
+
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1758
|
+
collapseGroupRow: (groupKeys: any[]) => boolean;
|
|
1759
|
+
expandGroupRow: (groupKeys: any[]) => boolean;
|
|
1760
|
+
scrollRowIntoView: (rowIndex: number, config?: {
|
|
1761
|
+
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
1762
|
+
offset?: number;
|
|
1763
|
+
}) => boolean;
|
|
1764
|
+
scrollColumnIntoView: (colId: string, config?: {
|
|
1765
|
+
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
1766
|
+
offset?: number;
|
|
1767
|
+
}) => boolean;
|
|
1768
|
+
scrollCellIntoView: (rowIndex: number, colIdOrIndex: string | number, config?: {
|
|
1769
|
+
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
1770
|
+
offset?: number;
|
|
1771
|
+
}) => boolean;
|
|
1772
|
+
getState: () => InfiniteTableState<T>;
|
|
1773
|
+
getDataSourceState: () => DataSourceState<T>;
|
|
1558
1774
|
};
|
|
1559
|
-
declare type
|
|
1560
|
-
declare type
|
|
1561
|
-
declare type
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1775
|
+
declare type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
|
|
1776
|
+
declare type InfiniteTableColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
|
|
1777
|
+
declare type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = Record<string, ColumnType> | InfiniteTableColumnsMap<T, ColumnType>;
|
|
1778
|
+
declare type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
|
|
1779
|
+
declare type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
|
|
1780
|
+
declare type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
|
|
1781
|
+
declare type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
|
|
1782
|
+
declare type InfiniteTableColumnGroupHeaderRenderParams = {
|
|
1783
|
+
columnGroup: InfiniteTableComputedColumnGroup;
|
|
1566
1784
|
};
|
|
1567
|
-
declare type
|
|
1568
|
-
declare type
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
}
|
|
1785
|
+
declare type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
|
|
1786
|
+
declare type InfiniteTableColumnGroup = {
|
|
1787
|
+
columnGroup?: string;
|
|
1788
|
+
header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
|
|
1789
|
+
};
|
|
1790
|
+
declare type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
1572
1791
|
id: string;
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1792
|
+
groupOffset: number;
|
|
1793
|
+
computedWidth: number;
|
|
1794
|
+
uniqueGroupId: string[];
|
|
1795
|
+
columns: string[];
|
|
1796
|
+
depth: number;
|
|
1797
|
+
};
|
|
1798
|
+
declare type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
1799
|
+
groupIndexForColumn?: number;
|
|
1800
|
+
groupByForColumn?: DataSourceGroupBy<T>;
|
|
1801
|
+
selectionMode: DataSourcePropSelectionMode;
|
|
1802
|
+
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
1803
|
+
groupCount: number;
|
|
1804
|
+
groupBy: DataSourceGroupBy<T>[];
|
|
1805
|
+
pivotBy?: DataSourcePivotBy<T>[];
|
|
1806
|
+
};
|
|
1807
|
+
declare type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
1808
|
+
column: COL_TYPE;
|
|
1809
|
+
groupBy: DataSourcePropGroupBy<T>;
|
|
1810
|
+
pivotBy: DataSourcePropPivotBy<T>;
|
|
1811
|
+
};
|
|
1812
|
+
declare type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
1813
|
+
declare type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
|
|
1814
|
+
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
1815
|
+
renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
|
|
1816
|
+
id?: string;
|
|
1817
|
+
};
|
|
1818
|
+
declare type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
1819
|
+
renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
|
|
1820
|
+
};
|
|
1821
|
+
declare type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
1822
|
+
declare type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
1823
|
+
declare type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
1824
|
+
declare type InfiniteTablePropComponents = {
|
|
1825
|
+
LoadMask?: React$1.FC<LoadMaskProps>;
|
|
1826
|
+
CheckBox?: React$1.FC<InfiniteCheckBoxProps>;
|
|
1827
|
+
};
|
|
1828
|
+
declare type ScrollStopInfo = {
|
|
1829
|
+
scrollTop: number;
|
|
1830
|
+
firstVisibleRowIndex: number;
|
|
1831
|
+
lastVisibleRowIndex: number;
|
|
1832
|
+
};
|
|
1833
|
+
declare type InfiniteTablePropFilterEditors<T> = Record<string, React$1.FC<InfiniteTableFilterEditorProps<T>>>;
|
|
1834
|
+
declare type InfiniteTableFilterEditorProps<T extends any> = {
|
|
1577
1835
|
filterType: string;
|
|
1578
1836
|
operator: string;
|
|
1837
|
+
ariaLabel: string;
|
|
1838
|
+
filterValue: T;
|
|
1839
|
+
className: string;
|
|
1840
|
+
onChange: (value: T | undefined) => void;
|
|
1579
1841
|
};
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1842
|
+
interface InfiniteTableProps<T> {
|
|
1843
|
+
columns: InfiniteTablePropColumns<T>;
|
|
1844
|
+
pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
1845
|
+
loadingText?: Renderable;
|
|
1846
|
+
components?: InfiniteTablePropComponents;
|
|
1847
|
+
viewportReservedWidth?: number;
|
|
1848
|
+
onViewportReservedWidthChange?: (viewportReservedWidth: number) => void;
|
|
1849
|
+
pivotColumn?: InfiniteTablePropPivotColumn<T, InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>>;
|
|
1850
|
+
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
1851
|
+
pivotGrandTotalColumnPosition?: InfiniteTablePropPivotGrandTotalColumnPosition;
|
|
1852
|
+
groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
|
|
1853
|
+
groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
|
|
1854
|
+
hideEmptyGroupColumns?: boolean;
|
|
1855
|
+
columnVisibility?: InfiniteTablePropColumnVisibility;
|
|
1856
|
+
defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
|
|
1857
|
+
pinnedStartMaxWidth?: number;
|
|
1858
|
+
pinnedEndMaxWidth?: number;
|
|
1859
|
+
columnPinning?: InfiniteTablePropColumnPinning;
|
|
1860
|
+
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
1861
|
+
columnSizing?: InfiniteTablePropColumnSizing;
|
|
1862
|
+
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
1863
|
+
onColumnSizingChange?: (columnSizing: InfiniteTablePropColumnSizing) => void;
|
|
1864
|
+
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
1865
|
+
columnGroups?: InfiniteTablePropColumnGroups;
|
|
1866
|
+
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
1867
|
+
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
1868
|
+
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
1869
|
+
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
1870
|
+
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
1871
|
+
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
1872
|
+
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
1873
|
+
rowHeight: number | string;
|
|
1874
|
+
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
1875
|
+
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
1876
|
+
columnHeaderHeight: number | string;
|
|
1877
|
+
domProps?: React$1.HTMLProps<HTMLDivElement>;
|
|
1878
|
+
showZebraRows?: boolean;
|
|
1879
|
+
showHoverRows?: boolean;
|
|
1880
|
+
sortable?: boolean;
|
|
1881
|
+
keyboardNavigation?: InfiniteTablePropKeyboardNavigation;
|
|
1882
|
+
keyboardSelection?: InfiniteTablePropKeyboardSelection;
|
|
1883
|
+
defaultActiveRowIndex?: number | null;
|
|
1884
|
+
activeRowIndex?: number | null;
|
|
1885
|
+
onActiveRowIndexChange?: (activeRowIndex: number) => void;
|
|
1886
|
+
onActiveCellIndexChange?: (activeCellIndex: [number, number]) => void;
|
|
1887
|
+
activeCellIndex?: [number, number] | null;
|
|
1888
|
+
defaultActiveCellIndex?: [number, number] | null;
|
|
1889
|
+
draggableColumns?: boolean;
|
|
1890
|
+
header?: boolean;
|
|
1891
|
+
headerOptions?: InfiniteTablePropHeaderOptions;
|
|
1892
|
+
focusedClassName?: string;
|
|
1893
|
+
focusedWithinClassName?: string;
|
|
1894
|
+
focusedStyle?: React$1.CSSProperties;
|
|
1895
|
+
focusedWithinStyle?: React$1.CSSProperties;
|
|
1896
|
+
columnCssEllipsis?: boolean;
|
|
1897
|
+
columnHeaderCssEllipsis?: boolean;
|
|
1898
|
+
columnDefaultWidth?: number;
|
|
1899
|
+
columnMinWidth?: number;
|
|
1900
|
+
columnMaxWidth?: number;
|
|
1901
|
+
resizableColumns?: boolean;
|
|
1902
|
+
virtualizeColumns?: InfiniteTablePropVirtualizeColumns<T>;
|
|
1903
|
+
virtualizeRows?: boolean;
|
|
1904
|
+
onSelfFocus?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
1905
|
+
onSelfBlur?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
1906
|
+
onFocusWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
1907
|
+
onBlurWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
|
|
1908
|
+
onScrollToTop?: () => void;
|
|
1909
|
+
onScrollToBottom?: () => void;
|
|
1910
|
+
scrollStopDelay?: number;
|
|
1911
|
+
onScrollStop?: (param: ScrollStopInfo) => void;
|
|
1912
|
+
scrollToBottomOffset?: number;
|
|
1913
|
+
defaultColumnOrder?: InfiniteTablePropColumnOrder;
|
|
1914
|
+
columnOrder?: InfiniteTablePropColumnOrder;
|
|
1915
|
+
onColumnOrderChange?: (columnOrder: InfiniteTablePropColumnOrderNormalized) => void;
|
|
1916
|
+
onRowHeightChange?: (rowHeight: number) => void;
|
|
1917
|
+
filterEditors?: InfiniteTablePropFilterEditors<T>;
|
|
1918
|
+
onReady?: (api: InfiniteTableApi<T>) => void;
|
|
1919
|
+
rowProps?: React$1.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React$1.HTMLProps<HTMLDivElement>);
|
|
1920
|
+
licenseKey?: string;
|
|
1921
|
+
scrollTopKey?: string | number;
|
|
1922
|
+
autoSizeColumnsKey?: InfiniteTablePropAutoSizeColumnsKey;
|
|
1923
|
+
}
|
|
1924
|
+
declare type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
|
|
1925
|
+
declare type InfiniteTablePropKeyboardSelection = boolean;
|
|
1926
|
+
declare type InfiniteTablePropHeaderOptions = {
|
|
1927
|
+
alwaysReserveSpaceForSortIcon: boolean;
|
|
1586
1928
|
};
|
|
1587
|
-
declare type
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1929
|
+
declare type InfiniteTablePropAutoSizeColumnsKey = string | number | {
|
|
1930
|
+
key: string | number;
|
|
1931
|
+
columnsToSkip?: string[];
|
|
1932
|
+
columnsToResize?: string[];
|
|
1933
|
+
includeHeader?: boolean;
|
|
1591
1934
|
};
|
|
1592
|
-
declare type
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
filterValue: any;
|
|
1596
|
-
emptyValues: Set<any>;
|
|
1597
|
-
} & DataSourceFilterFunctionParam<T>;
|
|
1598
|
-
declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
1599
|
-
declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
1600
|
-
declare type DataSourceLivePaginationCursorParams<T> = {
|
|
1601
|
-
array: T[];
|
|
1602
|
-
lastItem: T | Partial<T> | null;
|
|
1603
|
-
length: number;
|
|
1935
|
+
declare type Scrollbars = {
|
|
1936
|
+
vertical: boolean;
|
|
1937
|
+
horizontal: boolean;
|
|
1604
1938
|
};
|
|
1605
|
-
declare type
|
|
1606
|
-
interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
1607
|
-
}
|
|
1608
|
-
interface DataSourceDerivedState<T> {
|
|
1609
|
-
operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
|
|
1610
|
-
filterMode: NonUndefined<DataSourceProps<T>['filterMode']>;
|
|
1611
|
-
multiSort: boolean;
|
|
1612
|
-
controlledSort: boolean;
|
|
1613
|
-
controlledFilter: boolean;
|
|
1614
|
-
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1615
|
-
lazyLoadBatchSize?: number;
|
|
1616
|
-
}
|
|
1617
|
-
declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
1618
|
-
interface DataSourceContextValue<T> {
|
|
1619
|
-
getState: () => DataSourceState<T>;
|
|
1620
|
-
componentState: DataSourceState<T>;
|
|
1621
|
-
componentActions: DataSourceComponentActions<T>;
|
|
1622
|
-
}
|
|
1623
|
-
declare enum DataSourceActionType {
|
|
1624
|
-
INIT = "INIT"
|
|
1625
|
-
}
|
|
1626
|
-
interface DataSourceAction<T> {
|
|
1627
|
-
type: DataSourceActionType;
|
|
1628
|
-
payload: T;
|
|
1629
|
-
}
|
|
1630
|
-
interface DataSourceReducer<T> {
|
|
1631
|
-
(state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
declare function useInfiniteHeaderCell<T>(): InfiniteTableColumnHeaderParams<T, InfiniteTableComputedColumn<T>>;
|
|
1635
|
-
|
|
1636
|
-
declare function useInfiniteColumnCell<T>(): InfiniteTableColumnCellContextType<T>;
|
|
1637
|
-
|
|
1638
|
-
declare const InfiniteTableClassName: string;
|
|
1639
|
-
declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => JSX.Element)>;
|
|
1640
|
-
declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
|
|
1641
|
-
declare namespace InfiniteTable {
|
|
1642
|
-
var defaultProps: {
|
|
1643
|
-
rowHeight: number;
|
|
1644
|
-
columnHeaderHeight: string;
|
|
1645
|
-
};
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
|
|
1649
|
-
|
|
1650
|
-
declare function useDataSource<T>(): DataSourceState<T>;
|
|
1939
|
+
declare type ScrollAdjustPosition = 'start' | 'end' | 'center';
|
|
1651
1940
|
|
|
1652
|
-
declare function
|
|
1941
|
+
declare function debounce(fn: Function, { wait }: {
|
|
1942
|
+
wait: number;
|
|
1943
|
+
}): (...args: any[]) => void;
|
|
1653
1944
|
|
|
1654
1945
|
declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = {
|
|
1655
1946
|
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
|
|
@@ -1660,6 +1951,7 @@ declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT
|
|
|
1660
1951
|
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
1661
1952
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
1662
1953
|
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
1954
|
+
mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
1663
1955
|
onPropChange?: (params: {
|
|
1664
1956
|
name: keyof T_PROPS;
|
|
1665
1957
|
oldValue: any;
|
|
@@ -1670,6 +1962,7 @@ declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT
|
|
|
1670
1962
|
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
1671
1963
|
oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
|
|
1672
1964
|
parentState: T_PARENT_STATE | null;
|
|
1965
|
+
getState: () => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
1673
1966
|
}) => COMPONENT_DERIVED_STATE;
|
|
1674
1967
|
concludeReducer?: (params: {
|
|
1675
1968
|
previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
|
|
@@ -1707,4 +2000,9 @@ declare const defaultFilterEditors: InfiniteTablePropFilterEditors<unknown>;
|
|
|
1707
2000
|
declare function StringFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
|
|
1708
2001
|
declare function NumberFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
|
|
1709
2002
|
|
|
1710
|
-
|
|
2003
|
+
declare const components: {
|
|
2004
|
+
CheckBox: typeof InfiniteCheckBox;
|
|
2005
|
+
LoadMask: (props: LoadMaskProps) => JSX.Element;
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
export { ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableFilterEditorProps, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropFilterEditors, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, NumberFilterEditor, RowSelectionState, Scrollbars, StringFilterEditor, components, debounce, defaultFilterEditors, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };
|