@infinite-table/infinite-react 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +355 -69
- package/README.md +12 -12
- package/index.css +1 -1
- package/index.d.ts +352 -293
- package/index.js +5 -5
- package/index.mjs +5 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
type SortDir = 1 | -1;
|
|
5
|
-
type MultisortInfo<T> = {
|
|
4
|
+
declare type SortDir = 1 | -1;
|
|
5
|
+
declare type MultisortInfo<T> = {
|
|
6
6
|
/**
|
|
7
7
|
* The sorting direction
|
|
8
8
|
*/
|
|
@@ -22,7 +22,7 @@ type MultisortInfo<T> = {
|
|
|
22
22
|
*/
|
|
23
23
|
valueGetter?: (item: T) => any;
|
|
24
24
|
};
|
|
25
|
-
type MultisortInfoAllowMultipleFields<T> = Omit<MultisortInfo<T>, 'field'> & {
|
|
25
|
+
declare type MultisortInfoAllowMultipleFields<T> = Omit<MultisortInfo<T>, 'field'> & {
|
|
26
26
|
field?: keyof T | (keyof T)[];
|
|
27
27
|
};
|
|
28
28
|
declare const multisort: {
|
|
@@ -32,14 +32,14 @@ declare const multisort: {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
type VoidFn$1 = () => void;
|
|
36
|
-
type Pair<KeyType, ValueType> = {
|
|
35
|
+
declare type VoidFn$1 = () => void;
|
|
36
|
+
declare type Pair<KeyType, ValueType> = {
|
|
37
37
|
value?: ValueType;
|
|
38
38
|
map?: Map<KeyType, Pair<KeyType, ValueType>>;
|
|
39
39
|
length: number;
|
|
40
40
|
revision?: number;
|
|
41
41
|
};
|
|
42
|
-
type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn$1) => void;
|
|
42
|
+
declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn$1) => void;
|
|
43
43
|
declare class DeepMap<KeyType, ValueType> {
|
|
44
44
|
private map;
|
|
45
45
|
private length;
|
|
@@ -64,7 +64,7 @@ declare class DeepMap<KeyType, ValueType> {
|
|
|
64
64
|
has(keys: KeyType[]): boolean;
|
|
65
65
|
private visitKey;
|
|
66
66
|
visit: (fn: DeepMapVisitFn<KeyType, ValueType>) => void;
|
|
67
|
-
visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn$1) => void) => void;
|
|
67
|
+
visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn$1 | undefined) => void) => void;
|
|
68
68
|
private visitWithNext;
|
|
69
69
|
private getArray;
|
|
70
70
|
valuesAt(keys: KeyType[]): ValueType[];
|
|
@@ -89,12 +89,12 @@ declare enum InfiniteTableActionType {
|
|
|
89
89
|
SET_DRAGGING_COLUMN_ID = 8
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
type InfiniteTableAction = {
|
|
92
|
+
declare type InfiniteTableAction = {
|
|
93
93
|
type: InfiniteTableActionType;
|
|
94
94
|
payload?: any;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
type Renderable = React$1.ReactNode | JSX.Element;
|
|
97
|
+
declare type Renderable = React$1.ReactNode | JSX.Element;
|
|
98
98
|
|
|
99
99
|
declare function useInfiniteHeaderCell<T>(): {
|
|
100
100
|
dragging: boolean;
|
|
@@ -175,8 +175,8 @@ declare function useInfiniteColumnFilterEditor<T>(): {
|
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
declare const InfiniteTableClassName: string;
|
|
178
|
-
declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => JSX.Element)>;
|
|
179
|
-
declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
|
|
178
|
+
declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => React$1.JSX.Element)>;
|
|
179
|
+
declare function InfiniteTable<T>(props: InfiniteTableProps<T>): React$1.JSX.Element;
|
|
180
180
|
declare namespace InfiniteTable {
|
|
181
181
|
var defaultProps: {
|
|
182
182
|
rowHeight: number;
|
|
@@ -189,7 +189,7 @@ interface Size {
|
|
|
189
189
|
height: number;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
type InfiniteTableBaseCellProps<T> = {
|
|
192
|
+
declare type InfiniteTableBaseCellProps<T> = {
|
|
193
193
|
column: InfiniteTableComputedColumn<T>;
|
|
194
194
|
rowId?: any;
|
|
195
195
|
renderChildren: () => Renderable;
|
|
@@ -204,20 +204,46 @@ type InfiniteTableBaseCellProps<T> = {
|
|
|
204
204
|
cssPosition?: CSSProperties['position'];
|
|
205
205
|
domRef?: React.RefCallback<HTMLElement>;
|
|
206
206
|
};
|
|
207
|
-
type InfiniteTableCellProps<T> = ({
|
|
207
|
+
declare type InfiniteTableCellProps<T> = ({
|
|
208
208
|
cellType: 'header';
|
|
209
209
|
} & InfiniteTableBaseCellProps<T>) | ({
|
|
210
210
|
cellType: 'body';
|
|
211
211
|
} & InfiniteTableBaseCellProps<T>);
|
|
212
212
|
|
|
213
|
-
type DiscriminatedUnion<A, B> = (A & {
|
|
213
|
+
declare type DiscriminatedUnion<A, B> = (A & {
|
|
214
214
|
[K in keyof B]?: undefined;
|
|
215
215
|
}) | (B & {
|
|
216
216
|
[K in keyof A]?: undefined;
|
|
217
217
|
});
|
|
218
|
-
type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
|
|
218
|
+
declare type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
|
|
219
|
+
/**
|
|
220
|
+
* Restrict using either exclusively the keys of T or exclusively the keys of U.
|
|
221
|
+
*
|
|
222
|
+
* No unique keys of T can be used simultaneously with any unique keys of U.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
*```
|
|
226
|
+
* const myVar: XOR<T, U>
|
|
227
|
+
*```
|
|
228
|
+
*
|
|
229
|
+
* @see https://github.com/maninak/ts-xor/tree/master#description
|
|
230
|
+
*/
|
|
231
|
+
declare type XOR<T, U> = T | U extends object ? Prettify<Without<T, U> & U> | Prettify<Without<U, T> & T> : T | U;
|
|
232
|
+
/**
|
|
233
|
+
* Get the keys of T without any keys of U.
|
|
234
|
+
*/
|
|
235
|
+
declare type Without<T, U> = {
|
|
236
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Resolve mapped types and show the derived keys and their types when hovering in
|
|
240
|
+
* IDEs, instead of just showing the names those mapped types are defined with.
|
|
241
|
+
*/
|
|
242
|
+
declare type Prettify<T> = {
|
|
243
|
+
[K in keyof T]: T[K];
|
|
244
|
+
} & {};
|
|
219
245
|
|
|
220
|
-
type MenuIconProps = {
|
|
246
|
+
declare type MenuIconProps = {
|
|
221
247
|
lineWidth?: number;
|
|
222
248
|
lineStyle?: React$1.CSSProperties;
|
|
223
249
|
style?: React$1.CSSProperties;
|
|
@@ -227,11 +253,11 @@ type MenuIconProps = {
|
|
|
227
253
|
children?: React$1.ReactNode;
|
|
228
254
|
};
|
|
229
255
|
|
|
230
|
-
type NonUndefined<T> = T extends undefined ? never : T;
|
|
256
|
+
declare type NonUndefined<T> = T extends undefined ? never : T;
|
|
231
257
|
|
|
232
|
-
type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
233
|
-
type InfiniteTableSelectRowFn = (id: any) => void;
|
|
234
|
-
type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
258
|
+
declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
259
|
+
declare type InfiniteTableSelectRowFn = (id: any) => void;
|
|
260
|
+
declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
235
261
|
dragging: boolean;
|
|
236
262
|
column: COL_TYPE;
|
|
237
263
|
columnsMap: Map<string, COL_TYPE>;
|
|
@@ -257,13 +283,13 @@ type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedC
|
|
|
257
283
|
} | {
|
|
258
284
|
insideColumnMenu: true;
|
|
259
285
|
});
|
|
260
|
-
type InfiniteTableColumnRenderBag = {
|
|
286
|
+
declare type InfiniteTableColumnRenderBag = {
|
|
261
287
|
value: string | number | Renderable;
|
|
262
288
|
groupIcon?: Renderable;
|
|
263
289
|
all?: Renderable;
|
|
264
290
|
selectionCheckBox?: Renderable;
|
|
265
291
|
};
|
|
266
|
-
type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
292
|
+
declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
267
293
|
domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
|
|
268
294
|
value: string | number | Renderable;
|
|
269
295
|
renderBag: InfiniteTableColumnRenderBag;
|
|
@@ -289,61 +315,61 @@ type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableCompu
|
|
|
289
315
|
rootGroupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
290
316
|
pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
|
|
291
317
|
};
|
|
292
|
-
type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
|
|
293
|
-
type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
|
|
294
|
-
type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
295
|
-
type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
318
|
+
declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
|
|
319
|
+
declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
|
|
320
|
+
declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
321
|
+
declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
296
322
|
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
297
323
|
data: DATA_TYPE | Partial<DATA_TYPE> | null;
|
|
298
324
|
dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
|
|
299
325
|
rowIndex: number;
|
|
300
326
|
column: COL_TYPE;
|
|
301
327
|
};
|
|
302
|
-
type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
328
|
+
declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
303
329
|
isGroupRow: true;
|
|
304
330
|
}) => Renderable | null;
|
|
305
|
-
type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
331
|
+
declare type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
306
332
|
isGroupRow: false;
|
|
307
333
|
}) => Renderable | null;
|
|
308
|
-
type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
309
|
-
type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
|
|
310
|
-
type InfiniteTableColumnContentFocusable<T> = boolean | InfiniteTableColumnContentFocusableFn<T>;
|
|
311
|
-
type InfiniteTableColumnEditable<T> = boolean | InfiniteTableColumnEditableFn<T>;
|
|
312
|
-
type InfiniteTableColumnContentFocusableFn<T> = (params: InfiniteTableColumnContentFocusableParams<T>) => boolean;
|
|
313
|
-
type InfiniteTableColumnEditableFn<T> = (params: InfiniteTableColumnEditableParams<T>) => boolean | Promise<boolean>;
|
|
314
|
-
type InfiniteTableColumnContentFocusableParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T>;
|
|
315
|
-
type InfiniteTableColumnEditableParams<T> = InfiniteTableColumnContentFocusableParams<T>;
|
|
316
|
-
type InfiniteTableColumnGetValueToPersistParams<T> = InfiniteTableColumnEditableParams<T> & {
|
|
334
|
+
declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
335
|
+
declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
|
|
336
|
+
declare type InfiniteTableColumnContentFocusable<T> = boolean | InfiniteTableColumnContentFocusableFn<T>;
|
|
337
|
+
declare type InfiniteTableColumnEditable<T> = boolean | InfiniteTableColumnEditableFn<T>;
|
|
338
|
+
declare type InfiniteTableColumnContentFocusableFn<T> = (params: InfiniteTableColumnContentFocusableParams<T>) => boolean;
|
|
339
|
+
declare type InfiniteTableColumnEditableFn<T> = (params: InfiniteTableColumnEditableParams<T>) => boolean | Promise<boolean>;
|
|
340
|
+
declare type InfiniteTableColumnContentFocusableParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T>;
|
|
341
|
+
declare type InfiniteTableColumnEditableParams<T> = InfiniteTableColumnContentFocusableParams<T>;
|
|
342
|
+
declare type InfiniteTableColumnGetValueToPersistParams<T> = InfiniteTableColumnEditableParams<T> & {
|
|
317
343
|
initialValue: any;
|
|
318
344
|
};
|
|
319
|
-
type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
320
|
-
type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
321
|
-
type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
322
|
-
type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
|
|
323
|
-
type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
324
|
-
type InfiniteTableColumnStyleFnParams<T> = {
|
|
345
|
+
declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
346
|
+
declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
347
|
+
declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
348
|
+
declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
|
|
349
|
+
declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
350
|
+
declare type InfiniteTableColumnStyleFnParams<T> = {
|
|
325
351
|
value: Renderable;
|
|
326
352
|
column: InfiniteTableComputedColumn<T>;
|
|
327
353
|
inEdit: boolean;
|
|
328
354
|
editError: InfiniteTableColumnRenderParamBase<T>['editError'];
|
|
329
355
|
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
330
|
-
type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React__default.CSSProperties;
|
|
331
|
-
type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
|
|
332
|
-
type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React__default.CSSProperties;
|
|
333
|
-
type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
334
|
-
type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
335
|
-
type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
|
|
336
|
-
type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
337
|
-
type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
|
|
338
|
-
type InfiniteTableColumnValueGetterParams<T> = {
|
|
356
|
+
declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React__default.CSSProperties;
|
|
357
|
+
declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
|
|
358
|
+
declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React__default.CSSProperties;
|
|
359
|
+
declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
360
|
+
declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
361
|
+
declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
|
|
362
|
+
declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
363
|
+
declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
|
|
364
|
+
declare type InfiniteTableColumnValueGetterParams<T> = {
|
|
339
365
|
data: T;
|
|
340
366
|
field?: keyof T;
|
|
341
367
|
};
|
|
342
|
-
type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
|
|
343
|
-
type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
344
|
-
type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
|
|
345
|
-
type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
|
|
346
|
-
type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
368
|
+
declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
|
|
369
|
+
declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
370
|
+
declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
|
|
371
|
+
declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
|
|
372
|
+
declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
347
373
|
/**
|
|
348
374
|
* Defines a column in the table.
|
|
349
375
|
*
|
|
@@ -351,7 +377,7 @@ type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
|
351
377
|
*
|
|
352
378
|
* Can be bound to a field which is a `keyof DATA_TYPE`.
|
|
353
379
|
*/
|
|
354
|
-
type InfiniteTableColumn<DATA_TYPE> = {
|
|
380
|
+
declare type InfiniteTableColumn<DATA_TYPE> = {
|
|
355
381
|
sortable?: boolean;
|
|
356
382
|
draggable?: boolean;
|
|
357
383
|
resizable?: boolean;
|
|
@@ -409,12 +435,12 @@ type InfiniteTableColumn<DATA_TYPE> = {
|
|
|
409
435
|
MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
|
|
410
436
|
};
|
|
411
437
|
};
|
|
412
|
-
type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'sortable'> & {
|
|
438
|
+
declare type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'sortable'> & {
|
|
413
439
|
groupByField: string | string[];
|
|
414
440
|
id?: string;
|
|
415
441
|
};
|
|
416
|
-
type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
|
|
417
|
-
type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
442
|
+
declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
|
|
443
|
+
declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
418
444
|
pivotBy: DataSourcePivotBy<DataType>[];
|
|
419
445
|
pivotTotalColumnGroup?: true;
|
|
420
446
|
pivotGroupKeys: KeyType[];
|
|
@@ -422,7 +448,7 @@ type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = I
|
|
|
422
448
|
pivotGroupKey: KeyType;
|
|
423
449
|
pivotIndex: number;
|
|
424
450
|
};
|
|
425
|
-
type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
|
|
451
|
+
declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
|
|
426
452
|
pivotBy: DataSourcePivotBy<DataType>[];
|
|
427
453
|
pivotColumn: true;
|
|
428
454
|
pivotTotalColumn: boolean;
|
|
@@ -433,8 +459,8 @@ type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = Infini
|
|
|
433
459
|
pivotIndex: number;
|
|
434
460
|
pivotGroupKey: KeyType;
|
|
435
461
|
};
|
|
436
|
-
type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
437
|
-
type InfiniteTableComputedColumnBase<T> = {
|
|
462
|
+
declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
463
|
+
declare type InfiniteTableComputedColumnBase<T> = {
|
|
438
464
|
computedFilterType: string;
|
|
439
465
|
computedSortType: string;
|
|
440
466
|
computedDataType: string;
|
|
@@ -470,8 +496,8 @@ type InfiniteTableComputedColumnBase<T> = {
|
|
|
470
496
|
colType: InfiniteTableColumnType<T>;
|
|
471
497
|
id: string;
|
|
472
498
|
};
|
|
473
|
-
type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
|
|
474
|
-
type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
|
|
499
|
+
declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
|
|
500
|
+
declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
|
|
475
501
|
|
|
476
502
|
interface LogFn {
|
|
477
503
|
(...args: any[]): LogFn;
|
|
@@ -487,21 +513,21 @@ interface ScrollPosition {
|
|
|
487
513
|
scrollTop: number;
|
|
488
514
|
scrollLeft: number;
|
|
489
515
|
}
|
|
490
|
-
type OnScrollFn = (scrollPosition: ScrollPosition) => void;
|
|
516
|
+
declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
|
|
491
517
|
|
|
492
|
-
type VoidFn = () => void;
|
|
518
|
+
declare type VoidFn = () => void;
|
|
493
519
|
|
|
494
|
-
type FixedPosition = false | 'start' | 'end';
|
|
495
|
-
type SpanFunction = ({ rowIndex, colIndex, }: {
|
|
520
|
+
declare type FixedPosition = false | 'start' | 'end';
|
|
521
|
+
declare type SpanFunction = ({ rowIndex, colIndex, }: {
|
|
496
522
|
rowIndex: number;
|
|
497
523
|
colIndex: number;
|
|
498
524
|
}) => number;
|
|
499
|
-
type RenderRangeType = {
|
|
525
|
+
declare type RenderRangeType = {
|
|
500
526
|
startIndex: number;
|
|
501
527
|
endIndex: number;
|
|
502
528
|
};
|
|
503
|
-
type ItemSizeFunction = (index: number) => number;
|
|
504
|
-
type MatrixBrainOptions = {
|
|
529
|
+
declare type ItemSizeFunction = (index: number) => number;
|
|
530
|
+
declare type MatrixBrainOptions = {
|
|
505
531
|
width: number;
|
|
506
532
|
height: number;
|
|
507
533
|
cols: number;
|
|
@@ -511,23 +537,23 @@ type MatrixBrainOptions = {
|
|
|
511
537
|
rowspan?: SpanFunction;
|
|
512
538
|
colspan?: SpanFunction;
|
|
513
539
|
};
|
|
514
|
-
type TableRenderRange = {
|
|
540
|
+
declare type TableRenderRange = {
|
|
515
541
|
start: [number, number];
|
|
516
542
|
end: [number, number];
|
|
517
543
|
rowFixed?: FixedPosition;
|
|
518
544
|
colFixed?: FixedPosition;
|
|
519
545
|
};
|
|
520
|
-
type WhichDirection = {
|
|
546
|
+
declare type WhichDirection = {
|
|
521
547
|
horizontal?: boolean;
|
|
522
548
|
vertical?: boolean;
|
|
523
549
|
};
|
|
524
|
-
type FnOnRenderRangeChange = (range: TableRenderRange) => void;
|
|
525
|
-
type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
|
|
526
|
-
type FnOnRenderCountChange = ({ horizontal, vertical, }: {
|
|
550
|
+
declare type FnOnRenderRangeChange = (range: TableRenderRange) => void;
|
|
551
|
+
declare type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
|
|
552
|
+
declare type FnOnRenderCountChange = ({ horizontal, vertical, }: {
|
|
527
553
|
horizontal: number;
|
|
528
554
|
vertical: number;
|
|
529
555
|
}) => void;
|
|
530
|
-
type OnAvailableSizeChange = (size: Size) => void;
|
|
556
|
+
declare type OnAvailableSizeChange = (size: Size) => void;
|
|
531
557
|
declare class MatrixBrain extends Logger {
|
|
532
558
|
private scrolling;
|
|
533
559
|
private width;
|
|
@@ -749,8 +775,8 @@ declare class MatrixBrain extends Logger {
|
|
|
749
775
|
destroy: () => void;
|
|
750
776
|
}
|
|
751
777
|
|
|
752
|
-
type RowSelectionStateItem = (any | any[])[];
|
|
753
|
-
type RowSelectionStateObject = {
|
|
778
|
+
declare type RowSelectionStateItem = (any | any[])[];
|
|
779
|
+
declare type RowSelectionStateObject = {
|
|
754
780
|
selectedRows: RowSelectionStateItem;
|
|
755
781
|
deselectedRows: RowSelectionStateItem;
|
|
756
782
|
defaultSelection: boolean;
|
|
@@ -763,7 +789,7 @@ type RowSelectionStateObject = {
|
|
|
763
789
|
selectedRows: RowSelectionStateItem;
|
|
764
790
|
deselectedRows?: RowSelectionStateItem;
|
|
765
791
|
};
|
|
766
|
-
type RowSelectionStateConfig<T> = {
|
|
792
|
+
declare type RowSelectionStateConfig<T> = {
|
|
767
793
|
groupBy: DataSourceState<T>['groupBy'];
|
|
768
794
|
groupDeepMap: DataSourceState<T>['groupDeepMap'];
|
|
769
795
|
toPrimaryKey: DataSourceState<T>['toPrimaryKey'];
|
|
@@ -772,8 +798,8 @@ type RowSelectionStateConfig<T> = {
|
|
|
772
798
|
lazyLoad: boolean;
|
|
773
799
|
onlyUsePrimaryKeys: boolean;
|
|
774
800
|
};
|
|
775
|
-
type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
|
|
776
|
-
type RowSelectionStateOverride = {
|
|
801
|
+
declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
|
|
802
|
+
declare type RowSelectionStateOverride = {
|
|
777
803
|
getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
|
|
778
804
|
getGroupByLength: RowSelectionState<any>['getGroupByLength'];
|
|
779
805
|
getGroupCount: RowSelectionState<any>['getGroupCount'];
|
|
@@ -857,7 +883,7 @@ declare class RowSelectionState<T = any> {
|
|
|
857
883
|
};
|
|
858
884
|
}
|
|
859
885
|
|
|
860
|
-
type MultiRowSelectorOptions = {
|
|
886
|
+
declare type MultiRowSelectorOptions = {
|
|
861
887
|
getIdForIndex: (index: number) => string | number;
|
|
862
888
|
};
|
|
863
889
|
declare class MultiRowSelector {
|
|
@@ -913,12 +939,12 @@ interface InfiniteTableComputedValues<T> {
|
|
|
913
939
|
columnSize: (colIndex: number) => number;
|
|
914
940
|
}
|
|
915
941
|
|
|
916
|
-
type PointCoords = {
|
|
942
|
+
declare type PointCoords = {
|
|
917
943
|
top: number;
|
|
918
944
|
left: number;
|
|
919
945
|
};
|
|
920
946
|
|
|
921
|
-
type TableRenderCellFnParam = {
|
|
947
|
+
declare type TableRenderCellFnParam = {
|
|
922
948
|
domRef: RefCallback<HTMLElement>;
|
|
923
949
|
rowIndex: number;
|
|
924
950
|
colIndex: number;
|
|
@@ -934,7 +960,7 @@ type TableRenderCellFnParam = {
|
|
|
934
960
|
onMouseEnter: VoidFunction;
|
|
935
961
|
onMouseLeave: VoidFunction;
|
|
936
962
|
};
|
|
937
|
-
type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
|
|
963
|
+
declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
|
|
938
964
|
declare class ReactHeadlessTableRenderer extends Logger {
|
|
939
965
|
private brain;
|
|
940
966
|
private destroyed;
|
|
@@ -1010,34 +1036,34 @@ declare class ReactHeadlessTableRenderer extends Logger {
|
|
|
1010
1036
|
reset(): void;
|
|
1011
1037
|
}
|
|
1012
1038
|
|
|
1013
|
-
type ComponentStateContext<T_STATE, T_ACTIONS> = {
|
|
1039
|
+
declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
|
|
1014
1040
|
getComponentState: () => T_STATE;
|
|
1015
1041
|
componentState: T_STATE;
|
|
1016
1042
|
componentActions: T_ACTIONS;
|
|
1017
1043
|
};
|
|
1018
|
-
type ComponentStateGeneratedActions<T_STATE> = {
|
|
1044
|
+
declare type ComponentStateGeneratedActions<T_STATE> = {
|
|
1019
1045
|
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
1020
1046
|
};
|
|
1021
|
-
type ComponentInterceptedActions<T_STATE> = {
|
|
1047
|
+
declare type ComponentInterceptedActions<T_STATE> = {
|
|
1022
1048
|
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
1023
1049
|
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
1024
1050
|
state: T_STATE;
|
|
1025
1051
|
}) => void | boolean;
|
|
1026
1052
|
};
|
|
1027
|
-
type ComponentMappedCallbacks<T_STATE> = {
|
|
1053
|
+
declare type ComponentMappedCallbacks<T_STATE> = {
|
|
1028
1054
|
[k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
|
|
1029
1055
|
callbackName: string;
|
|
1030
1056
|
callbackParams: any[];
|
|
1031
1057
|
};
|
|
1032
1058
|
};
|
|
1033
|
-
type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
1059
|
+
declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
1034
1060
|
|
|
1035
|
-
type CellPosition = {
|
|
1061
|
+
declare type CellPosition = {
|
|
1036
1062
|
rowIndex: number;
|
|
1037
1063
|
colIndex: number;
|
|
1038
1064
|
};
|
|
1039
1065
|
|
|
1040
|
-
type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
1066
|
+
declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
1041
1067
|
interface SubscriptionCallback<T> {
|
|
1042
1068
|
(node: T, callback?: () => void): void;
|
|
1043
1069
|
get: () => T | null;
|
|
@@ -1055,17 +1081,17 @@ declare class ScrollListener {
|
|
|
1055
1081
|
destroy: () => void;
|
|
1056
1082
|
}
|
|
1057
1083
|
|
|
1058
|
-
type CellContextMenuLocation = {
|
|
1084
|
+
declare type CellContextMenuLocation = {
|
|
1059
1085
|
rowId: any;
|
|
1060
1086
|
rowIndex: number;
|
|
1061
1087
|
columnId: string;
|
|
1062
1088
|
colIndex: number;
|
|
1063
1089
|
};
|
|
1064
|
-
type CellContextMenuLocationWithEvent = CellContextMenuLocation & {
|
|
1090
|
+
declare type CellContextMenuLocationWithEvent = CellContextMenuLocation & {
|
|
1065
1091
|
event: React.MouseEvent;
|
|
1066
1092
|
target: HTMLElement;
|
|
1067
1093
|
};
|
|
1068
|
-
type ContextMenuLocationWithEvent = Partial<CellContextMenuLocation> & {
|
|
1094
|
+
declare type ContextMenuLocationWithEvent = Partial<CellContextMenuLocation> & {
|
|
1069
1095
|
event: React.MouseEvent;
|
|
1070
1096
|
target: HTMLElement;
|
|
1071
1097
|
};
|
|
@@ -1140,9 +1166,9 @@ interface InfiniteTableSetupState<T> {
|
|
|
1140
1166
|
cancelled?: boolean;
|
|
1141
1167
|
};
|
|
1142
1168
|
}
|
|
1143
|
-
type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1144
|
-
type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1145
|
-
type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
|
|
1169
|
+
declare type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1170
|
+
declare type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1171
|
+
declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
|
|
1146
1172
|
interface InfiniteTableMappedState<T> {
|
|
1147
1173
|
id: InfiniteTableProps<T>['id'];
|
|
1148
1174
|
scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
|
|
@@ -1240,12 +1266,12 @@ interface InfiniteTableDerivedState<T> {
|
|
|
1240
1266
|
columnHeaderHeightCSSVar: string;
|
|
1241
1267
|
controlledColumnVisibility: boolean;
|
|
1242
1268
|
}
|
|
1243
|
-
type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
|
|
1269
|
+
declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
|
|
1244
1270
|
interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
|
|
1245
1271
|
}
|
|
1246
1272
|
|
|
1247
|
-
type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
|
|
1248
|
-
type InfiniteTableSelectionApi = {
|
|
1273
|
+
declare type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
|
|
1274
|
+
declare type InfiniteTableSelectionApi = {
|
|
1249
1275
|
get allRowsSelected(): boolean;
|
|
1250
1276
|
isRowSelected(pk: any, groupKeys?: any[]): boolean;
|
|
1251
1277
|
isRowDeselected(pk: any, groupKeys?: any[]): boolean;
|
|
@@ -1261,7 +1287,7 @@ type InfiniteTableSelectionApi = {
|
|
|
1261
1287
|
deselectAll(): void;
|
|
1262
1288
|
};
|
|
1263
1289
|
|
|
1264
|
-
type InfiniteTableEventHandlerContext<T> = {
|
|
1290
|
+
declare type InfiniteTableEventHandlerContext<T> = {
|
|
1265
1291
|
getComputed: () => InfiniteTableComputedValues<T>;
|
|
1266
1292
|
getState: () => InfiniteTableState<T>;
|
|
1267
1293
|
actions: InfiniteTableActions<T>;
|
|
@@ -1271,15 +1297,15 @@ type InfiniteTableEventHandlerContext<T> = {
|
|
|
1271
1297
|
api: InfiniteTableApi<T>;
|
|
1272
1298
|
dataSourceApi: DataSourceApi<T>;
|
|
1273
1299
|
};
|
|
1274
|
-
type InfiniteTableKeyboardEventHandlerContext<T> = InfiniteTableEventHandlerContext<T>;
|
|
1275
|
-
type InfiniteTableCellClickEventHandlerContext<T> = InfiniteTableEventHandlerContext<T> & {
|
|
1300
|
+
declare type InfiniteTableKeyboardEventHandlerContext<T> = InfiniteTableEventHandlerContext<T>;
|
|
1301
|
+
declare type InfiniteTableCellClickEventHandlerContext<T> = InfiniteTableEventHandlerContext<T> & {
|
|
1276
1302
|
rowIndex: number;
|
|
1277
1303
|
colIndex: number;
|
|
1278
1304
|
column: InfiniteTableComputedColumn<T>;
|
|
1279
1305
|
columnApi: InfiniteTableColumnApi<T>;
|
|
1280
1306
|
};
|
|
1281
1307
|
|
|
1282
|
-
type OnCellClickContext<T> = InfiniteTableCellClickEventHandlerContext<T> & InfiniteTableKeyboardEventHandlerContext<T>;
|
|
1308
|
+
declare type OnCellClickContext<T> = InfiniteTableCellClickEventHandlerContext<T> & InfiniteTableKeyboardEventHandlerContext<T>;
|
|
1283
1309
|
|
|
1284
1310
|
interface InfiniteTableContextValue<T> {
|
|
1285
1311
|
api: InfiniteTableApi<T>;
|
|
@@ -1305,19 +1331,19 @@ interface InfiniteTableCellContext<T> {
|
|
|
1305
1331
|
columnApi: InfiniteTableColumnApi<T>;
|
|
1306
1332
|
}
|
|
1307
1333
|
|
|
1308
|
-
type GroupKeyType$1<T extends any = any> = T;
|
|
1309
|
-
type GroupBy<DataType, KeyType> = {
|
|
1334
|
+
declare type GroupKeyType$1<T extends any = any> = T;
|
|
1335
|
+
declare type GroupBy<DataType, KeyType> = {
|
|
1310
1336
|
field: KeyOfNoSymbol<DataType>;
|
|
1311
1337
|
toKey?: (value: any, data: DataType) => GroupKeyType$1<KeyType>;
|
|
1312
1338
|
column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
|
|
1313
1339
|
};
|
|
1314
1340
|
|
|
1315
|
-
type RenderRange = {
|
|
1341
|
+
declare type RenderRange = {
|
|
1316
1342
|
renderStartIndex: number;
|
|
1317
1343
|
renderEndIndex: number;
|
|
1318
1344
|
};
|
|
1319
1345
|
|
|
1320
|
-
type DataSourceMutation<T> = {
|
|
1346
|
+
declare type DataSourceMutation<T> = {
|
|
1321
1347
|
type: 'delete';
|
|
1322
1348
|
primaryKey: any;
|
|
1323
1349
|
} | {
|
|
@@ -1348,8 +1374,8 @@ declare class DataSourceCache<DataType, PrimaryKeyType = string> {
|
|
|
1348
1374
|
getMutations: () => Map<string, DataSourceMutation<DataType>[]>;
|
|
1349
1375
|
}
|
|
1350
1376
|
|
|
1351
|
-
type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
|
|
1352
|
-
type BooleanDeepCollectionStateObject<KeyType> = {
|
|
1377
|
+
declare type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
|
|
1378
|
+
declare type BooleanDeepCollectionStateObject<KeyType> = {
|
|
1353
1379
|
positiveItems: BooleanDeepCollectionStateKeys<KeyType>;
|
|
1354
1380
|
negativeItems: BooleanDeepCollectionStateKeys<KeyType>;
|
|
1355
1381
|
};
|
|
@@ -1423,16 +1449,16 @@ interface DataSourceDataParams<T> {
|
|
|
1423
1449
|
__cursorId?: DataSourceSetupState<T>['cursorId'];
|
|
1424
1450
|
changes?: DataSourceDataParamsChanges<T>;
|
|
1425
1451
|
}
|
|
1426
|
-
type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
|
|
1427
|
-
type DataSourceSingleSortInfo<T> = Omit<MultisortInfo<T>, 'field'> & {
|
|
1452
|
+
declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
|
|
1453
|
+
declare type DataSourceSingleSortInfo<T> = Omit<MultisortInfo<T>, 'field'> & {
|
|
1428
1454
|
field?: keyof T | (keyof T)[];
|
|
1429
1455
|
id?: string;
|
|
1430
1456
|
};
|
|
1431
|
-
type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
1432
|
-
type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
1433
|
-
type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
1434
|
-
type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
|
|
1435
|
-
type DataSourceRemoteData<T> = {
|
|
1457
|
+
declare type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
1458
|
+
declare type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
1459
|
+
declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
1460
|
+
declare type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
|
|
1461
|
+
declare type DataSourceRemoteData<T> = {
|
|
1436
1462
|
data: T[] | LazyGroupDataItem<T>[];
|
|
1437
1463
|
mappings?: DataSourceMappings;
|
|
1438
1464
|
cache?: boolean;
|
|
@@ -1441,14 +1467,14 @@ type DataSourceRemoteData<T> = {
|
|
|
1441
1467
|
totalCountUnfiltered?: number;
|
|
1442
1468
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
1443
1469
|
};
|
|
1444
|
-
type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
1445
|
-
type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
1446
|
-
type DataSourcePropGroupRowsStateObject<KeyType> = {
|
|
1470
|
+
declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
1471
|
+
declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
1472
|
+
declare type DataSourcePropGroupRowsStateObject<KeyType> = {
|
|
1447
1473
|
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
1448
1474
|
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
1449
1475
|
};
|
|
1450
|
-
type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
1451
|
-
type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
1476
|
+
declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
1477
|
+
declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
1452
1478
|
interface DataSourceMappedState<T> {
|
|
1453
1479
|
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
1454
1480
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
@@ -1457,6 +1483,7 @@ interface DataSourceMappedState<T> {
|
|
|
1457
1483
|
onDataArrayChange: DataSourceProps<T>['onDataArrayChange'];
|
|
1458
1484
|
onDataMutations: DataSourceProps<T>['onDataMutations'];
|
|
1459
1485
|
onReady: DataSourceProps<T>['onReady'];
|
|
1486
|
+
rowInfoReducers: DataSourceProps<T>['rowInfoReducers'];
|
|
1460
1487
|
lazyLoad: DataSourceProps<T>['lazyLoad'];
|
|
1461
1488
|
useGroupKeysForMultiRowSelection: NonUndefined<DataSourceProps<T>['useGroupKeysForMultiRowSelection']>;
|
|
1462
1489
|
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
@@ -1474,7 +1501,12 @@ interface DataSourceMappedState<T> {
|
|
|
1474
1501
|
collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
|
|
1475
1502
|
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
1476
1503
|
}
|
|
1477
|
-
type
|
|
1504
|
+
declare type DataSourceRawReducer<T, RESULT_TYPE> = {
|
|
1505
|
+
initialValue?: RESULT_TYPE | (() => RESULT_TYPE);
|
|
1506
|
+
reducer: (accumulator: any, value: T) => RESULT_TYPE;
|
|
1507
|
+
done?: (accumulatedValue: RESULT_TYPE, array: T[]) => RESULT_TYPE;
|
|
1508
|
+
};
|
|
1509
|
+
declare type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
1478
1510
|
name?: string;
|
|
1479
1511
|
field?: keyof T;
|
|
1480
1512
|
initialValue?: AggregationResultType;
|
|
@@ -1485,11 +1517,11 @@ type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
|
1485
1517
|
column: InfiniteTablePivotFinalColumnVariant<T>;
|
|
1486
1518
|
}) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
|
|
1487
1519
|
};
|
|
1488
|
-
type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
|
|
1520
|
+
declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
|
|
1489
1521
|
inheritFromColumn?: string | boolean;
|
|
1490
1522
|
};
|
|
1491
|
-
type DataSourceMappings = Record<'totals' | 'values', string>;
|
|
1492
|
-
type LazyGroupDataItem<DataType> = {
|
|
1523
|
+
declare type DataSourceMappings = Record<'totals' | 'values', string>;
|
|
1524
|
+
declare type LazyGroupDataItem<DataType> = {
|
|
1493
1525
|
data: Partial<DataType>;
|
|
1494
1526
|
keys: any[];
|
|
1495
1527
|
aggregations?: Record<string, any>;
|
|
@@ -1500,7 +1532,7 @@ type LazyGroupDataItem<DataType> = {
|
|
|
1500
1532
|
totals?: Record<string, any>;
|
|
1501
1533
|
};
|
|
1502
1534
|
};
|
|
1503
|
-
type LazyRowInfoGroup<DataType> = {
|
|
1535
|
+
declare type LazyRowInfoGroup<DataType> = {
|
|
1504
1536
|
/**
|
|
1505
1537
|
* Those are direct children of the current lazy group row
|
|
1506
1538
|
*/
|
|
@@ -1512,12 +1544,14 @@ type LazyRowInfoGroup<DataType> = {
|
|
|
1512
1544
|
totalCountUnfiltered: number;
|
|
1513
1545
|
error?: string;
|
|
1514
1546
|
};
|
|
1515
|
-
type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
|
|
1547
|
+
declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
|
|
1516
1548
|
interface DataSourceSetupState<T> {
|
|
1517
1549
|
indexer: Indexer<T, any>;
|
|
1550
|
+
idToIndexMap: Map<any, number>;
|
|
1518
1551
|
cache?: DataSourceCache<T>;
|
|
1519
1552
|
unfilteredCount: number;
|
|
1520
1553
|
filteredCount: number;
|
|
1554
|
+
rowInfoReducerResults?: Record<string, any>;
|
|
1521
1555
|
originalDataArrayChanged: boolean;
|
|
1522
1556
|
originalDataArrayChangedInfo: {
|
|
1523
1557
|
timestamp: number;
|
|
@@ -1559,23 +1593,23 @@ interface DataSourceSetupState<T> {
|
|
|
1559
1593
|
pivotColumns?: Map<string, InfiniteTableColumn<T>>;
|
|
1560
1594
|
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
1561
1595
|
}
|
|
1562
|
-
type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
1563
|
-
type DataSourcePropMultiRowSelectionChangeParamType = RowSelectionStateObject;
|
|
1564
|
-
type DataSourcePropRowSelection = DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
|
|
1565
|
-
type DataSourcePropRowSelection_MultiRow = RowSelectionStateObject;
|
|
1566
|
-
type DataSourcePropRowSelection_SingleRow = null | string | number;
|
|
1567
|
-
type DataSourcePropCellSelection = any;
|
|
1568
|
-
type DataSourcePropSelectionMode = false | 'single-cell' | 'single-row' | 'multi-cell' | 'multi-row';
|
|
1569
|
-
type DataSourcePropOnRowSelectionChange_MultiRow = (rowSelection: DataSourcePropRowSelection_MultiRow, selectionMode: 'multi-row') => void;
|
|
1570
|
-
type DataSourcePropOnRowSelectionChange_SingleRow = (rowSelection: DataSourcePropRowSelection_SingleRow, selectionMode: 'single-row') => void;
|
|
1571
|
-
type DataSourcePropOnRowSelectionChange = DataSourcePropOnRowSelectionChange_SingleRow | DataSourcePropOnRowSelectionChange_MultiRow;
|
|
1572
|
-
type DataSourcePropOnCellSelectionChange = (cellSelectionParams: any) => void;
|
|
1573
|
-
type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>, rowSelectionState: RowSelectionState, selectionMode: 'multi-row') => boolean | null;
|
|
1574
|
-
type DataSourcePropSortFn<T> = (sortInfo: MultisortInfoAllowMultipleFields<T>[], array: T[], get?: (item: any) => T) => T[];
|
|
1575
|
-
type DataSourceCRUDParam = {
|
|
1596
|
+
declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
1597
|
+
declare type DataSourcePropMultiRowSelectionChangeParamType = RowSelectionStateObject;
|
|
1598
|
+
declare type DataSourcePropRowSelection = DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
|
|
1599
|
+
declare type DataSourcePropRowSelection_MultiRow = RowSelectionStateObject;
|
|
1600
|
+
declare type DataSourcePropRowSelection_SingleRow = null | string | number;
|
|
1601
|
+
declare type DataSourcePropCellSelection = any;
|
|
1602
|
+
declare type DataSourcePropSelectionMode = false | 'single-cell' | 'single-row' | 'multi-cell' | 'multi-row';
|
|
1603
|
+
declare type DataSourcePropOnRowSelectionChange_MultiRow = (rowSelection: DataSourcePropRowSelection_MultiRow, selectionMode: 'multi-row') => void;
|
|
1604
|
+
declare type DataSourcePropOnRowSelectionChange_SingleRow = (rowSelection: DataSourcePropRowSelection_SingleRow, selectionMode: 'single-row') => void;
|
|
1605
|
+
declare type DataSourcePropOnRowSelectionChange = DataSourcePropOnRowSelectionChange_SingleRow | DataSourcePropOnRowSelectionChange_MultiRow;
|
|
1606
|
+
declare type DataSourcePropOnCellSelectionChange = (cellSelectionParams: any) => void;
|
|
1607
|
+
declare type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>, rowSelectionState: RowSelectionState, selectionMode: 'multi-row') => boolean | null;
|
|
1608
|
+
declare type DataSourcePropSortFn<T> = (sortInfo: MultisortInfoAllowMultipleFields<T>[], array: T[], get?: (item: any) => T) => T[];
|
|
1609
|
+
declare type DataSourceCRUDParam = {
|
|
1576
1610
|
flush?: boolean;
|
|
1577
1611
|
};
|
|
1578
|
-
type DataSourceInsertParam = DataSourceCRUDParam & ({
|
|
1612
|
+
declare type DataSourceInsertParam = DataSourceCRUDParam & ({
|
|
1579
1613
|
position: 'before' | 'after';
|
|
1580
1614
|
primaryKey: any;
|
|
1581
1615
|
} | {
|
|
@@ -1583,7 +1617,11 @@ type DataSourceInsertParam = DataSourceCRUDParam & ({
|
|
|
1583
1617
|
});
|
|
1584
1618
|
interface DataSourceApi<T> {
|
|
1585
1619
|
getRowInfoArray: () => InfiniteTableRowInfo<T>[];
|
|
1586
|
-
getDataByPrimaryKey(id: any): T |
|
|
1620
|
+
getDataByPrimaryKey(id: any): T | null;
|
|
1621
|
+
getRowInfoByIndex(index: number): InfiniteTableRowInfo<T> | null;
|
|
1622
|
+
getRowInfoByPrimaryKey(id: any): InfiniteTableRowInfo<T> | null;
|
|
1623
|
+
getIndexByPrimaryKey(id: any): number;
|
|
1624
|
+
getPrimaryKeyByIndex(id: any): any;
|
|
1587
1625
|
updateData(data: Partial<T>, options?: DataSourceCRUDParam): Promise<any>;
|
|
1588
1626
|
updateDataArray(data: Partial<T>[], options?: DataSourceCRUDParam): Promise<any>;
|
|
1589
1627
|
removeDataByPrimaryKey(id: any, options?: DataSourceCRUDParam): Promise<any>;
|
|
@@ -1595,11 +1633,14 @@ interface DataSourceApi<T> {
|
|
|
1595
1633
|
insertData(data: T, options: DataSourceInsertParam): Promise<any>;
|
|
1596
1634
|
insertDataArray(data: T[], options: DataSourceInsertParam): Promise<any>;
|
|
1597
1635
|
}
|
|
1598
|
-
type
|
|
1636
|
+
declare type DataSourcePropRowInfoReducers<T> = Record<string, DataSourceRowInfoReducer<T>>;
|
|
1637
|
+
declare type DataSourceRowInfoReducer<T> = DataSourceRawReducer<InfiniteTableRowInfo<T>, any>;
|
|
1638
|
+
declare type DataSourceProps<T> = {
|
|
1599
1639
|
children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
|
|
1600
1640
|
primaryKey: keyof T | ((data: T) => string);
|
|
1601
1641
|
fields?: (keyof T)[];
|
|
1602
1642
|
refetchKey?: number | string | object;
|
|
1643
|
+
rowInfoReducers?: DataSourcePropRowInfoReducers<T>;
|
|
1603
1644
|
data: DataSourceData<T>;
|
|
1604
1645
|
selectionMode?: DataSourcePropSelectionMode;
|
|
1605
1646
|
useGroupKeysForMultiRowSelection?: boolean;
|
|
@@ -1668,17 +1709,17 @@ type DataSourceProps<T> = {
|
|
|
1668
1709
|
} | {
|
|
1669
1710
|
selectionMode?: false;
|
|
1670
1711
|
});
|
|
1671
|
-
type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
|
|
1672
|
-
type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
|
|
1673
|
-
type DataSourceFilterFunctionParam<T> = {
|
|
1712
|
+
declare type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
|
|
1713
|
+
declare type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
|
|
1714
|
+
declare type DataSourceFilterFunctionParam<T> = {
|
|
1674
1715
|
data: T;
|
|
1675
1716
|
index: number;
|
|
1676
1717
|
dataArray: T[];
|
|
1677
1718
|
primaryKey: any;
|
|
1678
1719
|
};
|
|
1679
|
-
type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
|
|
1680
|
-
type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
|
|
1681
|
-
type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
|
|
1720
|
+
declare type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
|
|
1721
|
+
declare type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
|
|
1722
|
+
declare type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
|
|
1682
1723
|
field: keyof T;
|
|
1683
1724
|
}, {
|
|
1684
1725
|
id: string;
|
|
@@ -1691,10 +1732,10 @@ type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
|
|
|
1691
1732
|
};
|
|
1692
1733
|
disabled?: boolean;
|
|
1693
1734
|
};
|
|
1694
|
-
type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T> & {
|
|
1735
|
+
declare type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T> & {
|
|
1695
1736
|
field?: keyof T;
|
|
1696
1737
|
}) => any;
|
|
1697
|
-
type DataSourceFilterType<T> = {
|
|
1738
|
+
declare type DataSourceFilterType<T> = {
|
|
1698
1739
|
emptyValues: any[];
|
|
1699
1740
|
label?: string;
|
|
1700
1741
|
defaultOperator: string;
|
|
@@ -1705,7 +1746,7 @@ type DataSourceFilterType<T> = {
|
|
|
1705
1746
|
};
|
|
1706
1747
|
operators: DataSourceFilterOperator<T>[];
|
|
1707
1748
|
};
|
|
1708
|
-
type DataSourceFilterOperator<T> = {
|
|
1749
|
+
declare type DataSourceFilterOperator<T> = {
|
|
1709
1750
|
name: string;
|
|
1710
1751
|
label?: string;
|
|
1711
1752
|
components?: {
|
|
@@ -1714,24 +1755,24 @@ type DataSourceFilterOperator<T> = {
|
|
|
1714
1755
|
};
|
|
1715
1756
|
fn: DataSourceFilterOperatorFunction<T>;
|
|
1716
1757
|
};
|
|
1717
|
-
type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
|
|
1718
|
-
type DataSourceFilterOperatorFunctionParam<T> = {
|
|
1758
|
+
declare type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
|
|
1759
|
+
declare type DataSourceFilterOperatorFunctionParam<T> = {
|
|
1719
1760
|
currentValue: any;
|
|
1720
1761
|
filterValue: any;
|
|
1721
1762
|
emptyValues: any[];
|
|
1722
1763
|
field?: keyof T;
|
|
1723
1764
|
} & DataSourceFilterFunctionParam<T>;
|
|
1724
|
-
type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
1725
|
-
type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
1726
|
-
type DataSourceLivePaginationCursorParams<T> = {
|
|
1765
|
+
declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
1766
|
+
declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
1767
|
+
declare type DataSourceLivePaginationCursorParams<T> = {
|
|
1727
1768
|
array: T[];
|
|
1728
1769
|
lastItem: T | Partial<T> | null;
|
|
1729
1770
|
length: number;
|
|
1730
1771
|
};
|
|
1731
|
-
type DataSourceLivePaginationCursorValue = string | number | null;
|
|
1772
|
+
declare type DataSourceLivePaginationCursorValue = string | number | null;
|
|
1732
1773
|
interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
1733
1774
|
}
|
|
1734
|
-
type DataSourceDerivedState<T> = {
|
|
1775
|
+
declare type DataSourceDerivedState<T> = {
|
|
1735
1776
|
toPrimaryKey: (data: T) => any;
|
|
1736
1777
|
operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
|
|
1737
1778
|
sortMode: NonUndefined<DataSourceProps<T>['sortMode']>;
|
|
@@ -1745,7 +1786,7 @@ type DataSourceDerivedState<T> = {
|
|
|
1745
1786
|
rowSelection: RowSelectionState | null | number | string;
|
|
1746
1787
|
selectionMode: NonUndefined<DataSourceProps<T>['selectionMode']>;
|
|
1747
1788
|
};
|
|
1748
|
-
type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
1789
|
+
declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
1749
1790
|
interface DataSourceContextValue<T> {
|
|
1750
1791
|
api: DataSourceApi<T>;
|
|
1751
1792
|
getState: () => DataSourceState<T>;
|
|
@@ -1759,20 +1800,18 @@ interface DataSourceAction<T> {
|
|
|
1759
1800
|
type: DataSourceActionType;
|
|
1760
1801
|
payload: T;
|
|
1761
1802
|
}
|
|
1762
|
-
interface DataSourceReducer<T> {
|
|
1763
|
-
(state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
|
|
1764
|
-
}
|
|
1765
1803
|
|
|
1766
1804
|
declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
|
|
1767
1805
|
|
|
1768
1806
|
declare function useDataSource<T>(): DataSourceState<T>;
|
|
1769
1807
|
|
|
1770
|
-
declare function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
1808
|
+
declare function DataSource<T>(props: DataSourceProps<T>): React$1.JSX.Element;
|
|
1809
|
+
declare function useRowInfoReducers(): Record<string, any> | undefined;
|
|
1771
1810
|
|
|
1772
|
-
type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
1811
|
+
declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
1773
1812
|
id: string;
|
|
1774
1813
|
};
|
|
1775
|
-
type AggregationReducerResult<AggregationResultType extends any = any> = AggregationResultType;
|
|
1814
|
+
declare type AggregationReducerResult<AggregationResultType extends any = any> = AggregationResultType;
|
|
1776
1815
|
/**
|
|
1777
1816
|
* InfiniteTableRowInfo can have different object shape depending on the presence or absence of grouping.
|
|
1778
1817
|
*
|
|
@@ -1781,8 +1820,8 @@ type AggregationReducerResult<AggregationResultType extends any = any> = Aggrega
|
|
|
1781
1820
|
* you can use `isGroupRow: boolean` to discriminate between group rows vs normal rows.
|
|
1782
1821
|
*
|
|
1783
1822
|
*/
|
|
1784
|
-
type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
|
|
1785
|
-
type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
|
|
1823
|
+
declare type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
|
|
1824
|
+
declare type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
|
|
1786
1825
|
data: T;
|
|
1787
1826
|
isGroupRow: false;
|
|
1788
1827
|
rowActive: boolean;
|
|
@@ -1792,7 +1831,7 @@ type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
|
|
|
1792
1831
|
rawValue: any;
|
|
1793
1832
|
rowSelected: boolean | null;
|
|
1794
1833
|
};
|
|
1795
|
-
type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
|
|
1834
|
+
declare type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
|
|
1796
1835
|
rowActive: boolean;
|
|
1797
1836
|
data: Partial<T> | null;
|
|
1798
1837
|
rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
|
|
@@ -1802,24 +1841,24 @@ type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
|
|
|
1802
1841
|
rawValue: any;
|
|
1803
1842
|
rowSelected: boolean | null;
|
|
1804
1843
|
};
|
|
1805
|
-
type InfiniteTableRowInfoDataDiscriminator<T> = InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> | InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T>;
|
|
1844
|
+
declare type InfiniteTableRowInfoDataDiscriminator<T> = InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> | InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T>;
|
|
1806
1845
|
/**
|
|
1807
1846
|
* This is the base row info for all scenarios - things every
|
|
1808
1847
|
* rowInfo is guaranteed to have (be it group or normal row, or dataSource with or without grouping)
|
|
1809
1848
|
*
|
|
1810
1849
|
*/
|
|
1811
|
-
type InfiniteTable_RowInfoBase<_T> = {
|
|
1850
|
+
declare type InfiniteTable_RowInfoBase<_T> = {
|
|
1812
1851
|
id: any;
|
|
1813
1852
|
value?: any;
|
|
1814
1853
|
indexInAll: number;
|
|
1815
1854
|
rowSelected: boolean | null;
|
|
1816
1855
|
};
|
|
1817
|
-
type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
|
|
1856
|
+
declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
|
|
1818
1857
|
dataSourceHasGrouping: true;
|
|
1819
1858
|
data: T;
|
|
1820
1859
|
isGroupRow: false;
|
|
1821
1860
|
} & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
|
|
1822
|
-
type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
|
|
1861
|
+
declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
|
|
1823
1862
|
dataSourceHasGrouping: true;
|
|
1824
1863
|
data: Partial<T> | null;
|
|
1825
1864
|
isGroupRow: true;
|
|
@@ -1897,13 +1936,13 @@ type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
|
|
|
1897
1936
|
*/
|
|
1898
1937
|
childrenLoading: boolean;
|
|
1899
1938
|
} & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
|
|
1900
|
-
type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
|
|
1939
|
+
declare type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
|
|
1901
1940
|
dataSourceHasGrouping: false;
|
|
1902
1941
|
data: T;
|
|
1903
1942
|
isGroupRow: false;
|
|
1904
1943
|
selfLoaded: boolean;
|
|
1905
1944
|
} & InfiniteTable_RowInfoBase<T>;
|
|
1906
|
-
type InfiniteTable_HasGrouping_RowInfoBase<T> = {
|
|
1945
|
+
declare type InfiniteTable_HasGrouping_RowInfoBase<T> = {
|
|
1907
1946
|
indexInGroup: number;
|
|
1908
1947
|
/**
|
|
1909
1948
|
* Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
|
|
@@ -1991,14 +2030,14 @@ type InfiniteTable_HasGrouping_RowInfoBase<T> = {
|
|
|
1991
2030
|
*/
|
|
1992
2031
|
selfLoaded: boolean;
|
|
1993
2032
|
};
|
|
1994
|
-
type GroupKeyType<T extends any = any> = T;
|
|
1995
|
-
type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
|
|
1996
|
-
type PivotGroupValueType<DataType, KeyType> = {
|
|
2033
|
+
declare type GroupKeyType<T extends any = any> = T;
|
|
2034
|
+
declare type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
|
|
2035
|
+
declare type PivotGroupValueType<DataType, KeyType> = {
|
|
1997
2036
|
reducerResults: PivotReducerResults<KeyType>;
|
|
1998
2037
|
items: DataType[];
|
|
1999
2038
|
};
|
|
2000
|
-
type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
2001
|
-
type DeepMapGroupValueType<DataType, KeyType> = {
|
|
2039
|
+
declare type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
2040
|
+
declare type DeepMapGroupValueType<DataType, KeyType> = {
|
|
2002
2041
|
/**
|
|
2003
2042
|
* These are leaf items. This array may be empty when there is batched lazy loading
|
|
2004
2043
|
*/
|
|
@@ -2012,7 +2051,7 @@ type DeepMapGroupValueType<DataType, KeyType> = {
|
|
|
2012
2051
|
reducerResults: Record<string, AggregationReducerResult>;
|
|
2013
2052
|
pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
2014
2053
|
};
|
|
2015
|
-
type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
2054
|
+
declare type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
2016
2055
|
column?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<DataType>>> | (({ column, }: {
|
|
2017
2056
|
column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
|
|
2018
2057
|
}) => Partial<InfiniteTablePivotColumn<DataType>>);
|
|
@@ -2020,13 +2059,13 @@ type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
|
2020
2059
|
columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
|
|
2021
2060
|
}) => ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnGroup<DataType>>>);
|
|
2022
2061
|
};
|
|
2023
|
-
type GroupParams<DataType, KeyType> = {
|
|
2062
|
+
declare type GroupParams<DataType, KeyType> = {
|
|
2024
2063
|
groupBy: GroupBy<DataType, KeyType>[];
|
|
2025
2064
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
2026
2065
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
2027
2066
|
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
2028
2067
|
};
|
|
2029
|
-
type DataGroupResult<DataType, KeyType extends any> = {
|
|
2068
|
+
declare type DataGroupResult<DataType, KeyType extends any> = {
|
|
2030
2069
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
2031
2070
|
groupParams: GroupParams<DataType, KeyType>;
|
|
2032
2071
|
initialData: DataType[];
|
|
@@ -2037,61 +2076,61 @@ type DataGroupResult<DataType, KeyType extends any> = {
|
|
|
2037
2076
|
declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
|
|
2038
2077
|
declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
|
|
2039
2078
|
|
|
2040
|
-
type InfiniteCheckBoxPropChecked = true | false | null;
|
|
2041
|
-
type InfiniteCheckBoxProps = {
|
|
2079
|
+
declare type InfiniteCheckBoxPropChecked = true | false | null;
|
|
2080
|
+
declare type InfiniteCheckBoxProps = {
|
|
2042
2081
|
disabled?: boolean;
|
|
2043
2082
|
checked?: InfiniteCheckBoxPropChecked;
|
|
2044
2083
|
defaultChecked?: InfiniteCheckBoxPropChecked;
|
|
2045
2084
|
onChange?: (checked: InfiniteCheckBoxPropChecked) => void;
|
|
2046
2085
|
domProps?: React$1.HTMLProps<HTMLElement>;
|
|
2047
2086
|
};
|
|
2048
|
-
declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): JSX.Element;
|
|
2087
|
+
declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): React$1.JSX.Element;
|
|
2049
2088
|
|
|
2050
|
-
type CoordsWithSize = {
|
|
2089
|
+
declare type CoordsWithSize = {
|
|
2051
2090
|
width: number;
|
|
2052
2091
|
height: number;
|
|
2053
2092
|
left: number;
|
|
2054
2093
|
top: number;
|
|
2055
2094
|
};
|
|
2056
|
-
type CoordsNoSize = {
|
|
2095
|
+
declare type CoordsNoSize = {
|
|
2057
2096
|
right: number;
|
|
2058
2097
|
bottom: number;
|
|
2059
2098
|
left: number;
|
|
2060
2099
|
top: number;
|
|
2061
2100
|
};
|
|
2062
|
-
type RectangleCoords = CoordsWithSize | CoordsNoSize;
|
|
2101
|
+
declare type RectangleCoords = CoordsWithSize | CoordsNoSize;
|
|
2063
2102
|
|
|
2064
|
-
type Alignable = RectangleCoords | HTMLElement | DOMRect;
|
|
2065
|
-
type AlignPositionEnum = 'TopLeft' | 'TopCenter' | 'TopRight' | 'CenterRight' | 'BottomRight' | 'BottomCenter' | 'BottomLeft' | 'CenterLeft' | 'Center';
|
|
2066
|
-
type AlignPositionItem = [AlignPositionEnum, AlignPositionEnum];
|
|
2067
|
-
type AlignPositionOptions = {
|
|
2103
|
+
declare type Alignable = RectangleCoords | HTMLElement | DOMRect;
|
|
2104
|
+
declare type AlignPositionEnum = 'TopLeft' | 'TopCenter' | 'TopRight' | 'CenterRight' | 'BottomRight' | 'BottomCenter' | 'BottomLeft' | 'CenterLeft' | 'Center';
|
|
2105
|
+
declare type AlignPositionItem = [AlignPositionEnum, AlignPositionEnum];
|
|
2106
|
+
declare type AlignPositionOptions = {
|
|
2068
2107
|
alignPosition: AlignPositionItem[];
|
|
2069
2108
|
constrainTo?: Alignable;
|
|
2070
2109
|
alignAnchor: Alignable;
|
|
2071
2110
|
alignTarget: Alignable;
|
|
2072
2111
|
};
|
|
2073
2112
|
|
|
2074
|
-
type OverlayParams = {
|
|
2113
|
+
declare type OverlayParams = {
|
|
2075
2114
|
portalContainer?: ElementContainerGetter | null | false;
|
|
2076
2115
|
constrainTo?: OverlayShowParams['constrainTo'];
|
|
2077
2116
|
};
|
|
2078
|
-
type ElementContainerGetter = (() => HTMLElement | string | Promise<HTMLElement | string>) | string | HTMLElement | Promise<HTMLElement | string>;
|
|
2079
|
-
type AdvancedAlignable = Alignable | ElementContainerGetter;
|
|
2117
|
+
declare type ElementContainerGetter = (() => HTMLElement | string | Promise<HTMLElement | string>) | string | HTMLElement | Promise<HTMLElement | string>;
|
|
2118
|
+
declare type AdvancedAlignable = Alignable | ElementContainerGetter;
|
|
2080
2119
|
/**
|
|
2081
2120
|
* If portal container is given, it will create a React portal from that element
|
|
2082
2121
|
* otherwise it will simply render another node as portal
|
|
2083
2122
|
*
|
|
2084
2123
|
* @param portalContainer
|
|
2085
2124
|
*/
|
|
2086
|
-
declare function useOverlayPortal(content: ReactNode, portalContainer?: ElementContainerGetter | null | false): string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
|
|
2087
|
-
type OverlayShowParams = {
|
|
2125
|
+
declare function useOverlayPortal(content: ReactNode, portalContainer?: ElementContainerGetter | null | false): string | number | boolean | React$1.JSX.Element | React$1.ReactFragment | null | undefined;
|
|
2126
|
+
declare type OverlayShowParams = {
|
|
2088
2127
|
id?: string | number;
|
|
2089
2128
|
constrainTo?: AdvancedAlignable | boolean;
|
|
2090
2129
|
alignPosition: AlignPositionOptions['alignPosition'];
|
|
2091
2130
|
alignTo: AdvancedAlignable | PointCoords;
|
|
2092
2131
|
};
|
|
2093
2132
|
declare function useOverlay(params: OverlayParams): {
|
|
2094
|
-
portal: string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
|
|
2133
|
+
portal: string | number | boolean | React$1.JSX.Element | React$1.ReactFragment | null | undefined;
|
|
2095
2134
|
hideOverlay: (id: string) => void;
|
|
2096
2135
|
clearAll: () => void;
|
|
2097
2136
|
rerenderOverlays: () => void;
|
|
@@ -2113,9 +2152,9 @@ we don't want to allow the above `y` as a valid declaration
|
|
|
2113
2152
|
it breaks some types in the Menu component as well
|
|
2114
2153
|
|
|
2115
2154
|
*/
|
|
2116
|
-
type RemoveObject<T> = T extends null | undefined ? T : T extends unknown ? keyof T extends never ? never : T : never;
|
|
2155
|
+
declare type RemoveObject<T> = T extends null | undefined ? T : T extends unknown ? keyof T extends never ? never : T : never;
|
|
2117
2156
|
|
|
2118
|
-
type MenuSetupState = {
|
|
2157
|
+
declare type MenuSetupState = {
|
|
2119
2158
|
domRef: MutableRefObject<HTMLDivElement | null>;
|
|
2120
2159
|
keyboardActiveItemKey: string | null;
|
|
2121
2160
|
activeItemKey: string | null;
|
|
@@ -2123,13 +2162,13 @@ type MenuSetupState = {
|
|
|
2123
2162
|
focused: boolean;
|
|
2124
2163
|
destroyed: boolean;
|
|
2125
2164
|
};
|
|
2126
|
-
type MenuDerivedState = {
|
|
2165
|
+
declare type MenuDerivedState = {
|
|
2127
2166
|
runtimeItems: MenuRuntimeItem[];
|
|
2128
2167
|
runtimeSelectableItems: MenuRuntimeItemSelectable[];
|
|
2129
2168
|
columns: MenuColumn[];
|
|
2130
2169
|
menuId: string;
|
|
2131
2170
|
};
|
|
2132
|
-
type MenuMappedState = {
|
|
2171
|
+
declare type MenuMappedState = {
|
|
2133
2172
|
parentMenuId: MenuProps['parentMenuId'];
|
|
2134
2173
|
parentMenuItemKey: MenuProps['parentMenuItemKey'];
|
|
2135
2174
|
constrainTo: MenuProps['constrainTo'];
|
|
@@ -2142,14 +2181,14 @@ type MenuMappedState = {
|
|
|
2142
2181
|
};
|
|
2143
2182
|
interface MenuState extends MenuMappedState, MenuDerivedState, MenuSetupState {
|
|
2144
2183
|
}
|
|
2145
|
-
type MenuApi = {
|
|
2184
|
+
declare type MenuApi = {
|
|
2146
2185
|
focus: VoidFunction;
|
|
2147
2186
|
getMenuId: () => string;
|
|
2148
2187
|
getParentMenuId: () => string | undefined;
|
|
2149
2188
|
};
|
|
2150
2189
|
|
|
2151
|
-
type MenuRenderable = string | number | RemoveObject<Renderable>;
|
|
2152
|
-
type MenuRuntimeItemSelectable = {
|
|
2190
|
+
declare type MenuRenderable = string | number | RemoveObject<Renderable>;
|
|
2191
|
+
declare type MenuRuntimeItemSelectable = {
|
|
2153
2192
|
type: 'item';
|
|
2154
2193
|
key: string;
|
|
2155
2194
|
parentMenuId: string;
|
|
@@ -2163,18 +2202,18 @@ type MenuRuntimeItemSelectable = {
|
|
|
2163
2202
|
menu: MenuProps | (() => MenuProps) | null;
|
|
2164
2203
|
originalMenuItem: MenuItemObject;
|
|
2165
2204
|
};
|
|
2166
|
-
type MenuRuntimeItem = MenuRuntimeItemSelectable | {
|
|
2205
|
+
declare type MenuRuntimeItem = MenuRuntimeItemSelectable | {
|
|
2167
2206
|
type: 'decoration';
|
|
2168
2207
|
value: MenuDecoration;
|
|
2169
2208
|
style: CSSProperties;
|
|
2170
2209
|
span: number;
|
|
2171
2210
|
};
|
|
2172
|
-
type MenuChildrenFnParam = {
|
|
2211
|
+
declare type MenuChildrenFnParam = {
|
|
2173
2212
|
item: MenuRuntimeItem;
|
|
2174
2213
|
column: MenuColumn;
|
|
2175
2214
|
columns: MenuColumn[];
|
|
2176
2215
|
};
|
|
2177
|
-
type MenuProps = {
|
|
2216
|
+
declare type MenuProps = {
|
|
2178
2217
|
id?: string;
|
|
2179
2218
|
portalContainer?: ElementContainerGetter | false | null;
|
|
2180
2219
|
items?: MenuItemDefinition[];
|
|
@@ -2192,12 +2231,12 @@ type MenuProps = {
|
|
|
2192
2231
|
parentMenuItemKey?: string;
|
|
2193
2232
|
autoFocus?: boolean;
|
|
2194
2233
|
};
|
|
2195
|
-
type MenuSeparator = '-';
|
|
2196
|
-
type MenuItemDefinition = MenuItemObject | MenuDecoration | MenuSeparator;
|
|
2197
|
-
type MenuItemSubMenu = Omit<MenuProps, 'children' | 'items'> & {
|
|
2234
|
+
declare type MenuSeparator = '-';
|
|
2235
|
+
declare type MenuItemDefinition = MenuItemObject | MenuDecoration | MenuSeparator;
|
|
2236
|
+
declare type MenuItemSubMenu = Omit<MenuProps, 'children' | 'items'> & {
|
|
2198
2237
|
items: (MenuItemObject | MenuSeparator)[];
|
|
2199
2238
|
};
|
|
2200
|
-
type MenuItemObject = {
|
|
2239
|
+
declare type MenuItemObject = {
|
|
2201
2240
|
key: string;
|
|
2202
2241
|
label: NonUndefined<MenuRenderable>;
|
|
2203
2242
|
span?: number;
|
|
@@ -2210,8 +2249,8 @@ type MenuItemObject = {
|
|
|
2210
2249
|
onAction?: (key: string, item: MenuItemObject) => void;
|
|
2211
2250
|
[k: string]: any;
|
|
2212
2251
|
};
|
|
2213
|
-
type MenuDecoration = MenuRenderable;
|
|
2214
|
-
type MenuColumn = {
|
|
2252
|
+
declare type MenuDecoration = MenuRenderable;
|
|
2253
|
+
declare type MenuColumn = {
|
|
2215
2254
|
flex?: number;
|
|
2216
2255
|
width?: string | number;
|
|
2217
2256
|
style?: CSSProperties;
|
|
@@ -2219,34 +2258,34 @@ type MenuColumn = {
|
|
|
2219
2258
|
field?: string;
|
|
2220
2259
|
render?: (param: MenuColumnRenderParam) => MenuRenderable;
|
|
2221
2260
|
};
|
|
2222
|
-
type MenuColumnRenderParam = {
|
|
2261
|
+
declare type MenuColumnRenderParam = {
|
|
2223
2262
|
item: MenuItemObject;
|
|
2224
2263
|
column: MenuColumn;
|
|
2225
2264
|
value: MenuRenderable;
|
|
2226
2265
|
domProps: HTMLProps<HTMLDivElement>;
|
|
2227
2266
|
};
|
|
2228
2267
|
|
|
2229
|
-
type LoadMaskProps = {
|
|
2268
|
+
declare type LoadMaskProps = {
|
|
2230
2269
|
visible: boolean;
|
|
2231
2270
|
children: Renderable;
|
|
2232
2271
|
};
|
|
2233
|
-
type InfiniteTablePropColumnOrderNormalized = string[];
|
|
2234
|
-
type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
2235
|
-
type InfiniteTablePropColumnVisibility = Record<string, false>;
|
|
2236
|
-
type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
|
|
2237
|
-
type InfiniteTablePropColumnPinning = Record<string, true | 'start' | 'end'>;
|
|
2238
|
-
type InfiniteTableRowStyleFnParams<T> = {
|
|
2272
|
+
declare type InfiniteTablePropColumnOrderNormalized = string[];
|
|
2273
|
+
declare type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
2274
|
+
declare type InfiniteTablePropColumnVisibility = Record<string, false>;
|
|
2275
|
+
declare type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
|
|
2276
|
+
declare type InfiniteTablePropColumnPinning = Record<string, true | 'start' | 'end'>;
|
|
2277
|
+
declare type InfiniteTableRowStyleFnParams<T> = {
|
|
2239
2278
|
rowIndex: number;
|
|
2240
2279
|
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
2241
|
-
type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
|
|
2242
|
-
type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
2243
|
-
type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
2244
|
-
type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
2245
|
-
type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
2280
|
+
declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
|
|
2281
|
+
declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
2282
|
+
declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
2283
|
+
declare type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
2284
|
+
declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
2246
2285
|
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
2247
2286
|
field?: keyof T;
|
|
2248
2287
|
};
|
|
2249
|
-
type InfiniteTableColumnType<T> = {
|
|
2288
|
+
declare type InfiniteTableColumnType<T> = {
|
|
2250
2289
|
minWidth?: number;
|
|
2251
2290
|
maxWidth?: number;
|
|
2252
2291
|
filterType?: string;
|
|
@@ -2286,15 +2325,20 @@ type InfiniteTableColumnType<T> = {
|
|
|
2286
2325
|
headerStyle?: InfiniteTableColumn<T>['headerStyle'];
|
|
2287
2326
|
headerClassName?: InfiniteTableColumn<T>['headerClassName'];
|
|
2288
2327
|
};
|
|
2289
|
-
type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
2290
|
-
type InfiniteTableColumnSizingOptions = {
|
|
2328
|
+
declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
2329
|
+
declare type InfiniteTableColumnSizingOptions = {
|
|
2291
2330
|
flex?: number;
|
|
2292
2331
|
width?: number;
|
|
2293
2332
|
minWidth?: number;
|
|
2294
2333
|
maxWidth?: number;
|
|
2295
2334
|
};
|
|
2296
|
-
type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
|
|
2297
|
-
type
|
|
2335
|
+
declare type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
|
|
2336
|
+
declare type ColumnCellValues = {
|
|
2337
|
+
value: any;
|
|
2338
|
+
rawValue: any;
|
|
2339
|
+
formattedValue: any;
|
|
2340
|
+
};
|
|
2341
|
+
declare type InfiniteTableColumnApi<_T> = {
|
|
2298
2342
|
showContextMenu: (target: EventTarget | HTMLElement) => void;
|
|
2299
2343
|
toggleContextMenu: (target: EventTarget | HTMLElement) => void;
|
|
2300
2344
|
hideContextMenu: () => void;
|
|
@@ -2306,8 +2350,10 @@ type InfiniteTableColumnApi<_T> = {
|
|
|
2306
2350
|
setSort: (sort: SortDir | null) => void;
|
|
2307
2351
|
setFilter: (value: any) => void;
|
|
2308
2352
|
clearFilter: (value: any) => void;
|
|
2353
|
+
getCellValuesByPrimaryKey: (id: any) => null | ColumnCellValues;
|
|
2354
|
+
getCellValueByPrimaryKey: (id: any) => any | null;
|
|
2309
2355
|
};
|
|
2310
|
-
type InfiniteTableApiStopEditParams = {
|
|
2356
|
+
declare type InfiniteTableApiStopEditParams = {
|
|
2311
2357
|
cancel: true;
|
|
2312
2358
|
reject?: never;
|
|
2313
2359
|
value?: never;
|
|
@@ -2320,11 +2366,15 @@ type InfiniteTableApiStopEditParams = {
|
|
|
2320
2366
|
cancel?: never;
|
|
2321
2367
|
reject?: never;
|
|
2322
2368
|
};
|
|
2323
|
-
type InfiniteTableApiIsCellEditableParams =
|
|
2369
|
+
declare type InfiniteTableApiIsCellEditableParams = InfiniteTableApiCellLocator;
|
|
2370
|
+
declare type InfiniteTableApiCellLocator = {
|
|
2324
2371
|
columnId: string;
|
|
2372
|
+
} & XOR<{
|
|
2325
2373
|
rowIndex: number;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2374
|
+
}, {
|
|
2375
|
+
primaryKey: any;
|
|
2376
|
+
}>;
|
|
2377
|
+
declare type InfiniteTableApiStopEditPromiseResolveType = {
|
|
2328
2378
|
cancel: true;
|
|
2329
2379
|
value: null;
|
|
2330
2380
|
} | {
|
|
@@ -2368,6 +2418,7 @@ interface InfiniteTableApi<T> {
|
|
|
2368
2418
|
setFilterValueForColumn: (columnId: string, filterValue: DataSourceFilterValueItem<T>) => void;
|
|
2369
2419
|
setPinningForColumn: (columnId: string, pinning: InfiniteTableColumnPinnedValues) => void;
|
|
2370
2420
|
setSortingForColumn: (columnId: string, dir: SortDir | null) => void;
|
|
2421
|
+
getColumnApi: (columnId: string) => InfiniteTableColumnApi<T> | null;
|
|
2371
2422
|
setVisibilityForColumn: (columnId: string, visible: boolean) => void;
|
|
2372
2423
|
getVisibleColumnsCount: () => number;
|
|
2373
2424
|
scrollRowIntoView: (rowIndex: number, config?: {
|
|
@@ -2382,26 +2433,28 @@ interface InfiniteTableApi<T> {
|
|
|
2382
2433
|
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
2383
2434
|
offset?: number;
|
|
2384
2435
|
}) => boolean;
|
|
2436
|
+
getCellValues: (cellLocator: InfiniteTableApiCellLocator) => ColumnCellValues | null;
|
|
2437
|
+
getCellValue: (cellLocator: InfiniteTableApiCellLocator) => any | null;
|
|
2385
2438
|
getState: () => InfiniteTableState<T>;
|
|
2386
2439
|
getDataSourceState: () => DataSourceState<T>;
|
|
2387
2440
|
focus: () => void;
|
|
2388
2441
|
}
|
|
2389
|
-
type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
|
|
2390
|
-
type InfiniteTableColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
|
|
2391
|
-
type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = Record<string, ColumnType> | InfiniteTableColumnsMap<T, ColumnType>;
|
|
2392
|
-
type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
|
|
2393
|
-
type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
|
|
2394
|
-
type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
|
|
2395
|
-
type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
|
|
2396
|
-
type InfiniteTableColumnGroupHeaderRenderParams = {
|
|
2442
|
+
declare type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
|
|
2443
|
+
declare type InfiniteTableColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
|
|
2444
|
+
declare type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = Record<string, ColumnType> | InfiniteTableColumnsMap<T, ColumnType>;
|
|
2445
|
+
declare type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
|
|
2446
|
+
declare type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
|
|
2447
|
+
declare type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
|
|
2448
|
+
declare type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
|
|
2449
|
+
declare type InfiniteTableColumnGroupHeaderRenderParams = {
|
|
2397
2450
|
columnGroup: InfiniteTableComputedColumnGroup;
|
|
2398
2451
|
};
|
|
2399
|
-
type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
|
|
2400
|
-
type InfiniteTableColumnGroup = {
|
|
2452
|
+
declare type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
|
|
2453
|
+
declare type InfiniteTableColumnGroup = {
|
|
2401
2454
|
columnGroup?: string;
|
|
2402
2455
|
header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
|
|
2403
2456
|
};
|
|
2404
|
-
type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
2457
|
+
declare type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
2405
2458
|
id: string;
|
|
2406
2459
|
groupOffset: number;
|
|
2407
2460
|
computedWidth: number;
|
|
@@ -2409,7 +2462,7 @@ type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
|
2409
2462
|
columns: string[];
|
|
2410
2463
|
depth: number;
|
|
2411
2464
|
};
|
|
2412
|
-
type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
2465
|
+
declare type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
2413
2466
|
groupIndexForColumn?: number;
|
|
2414
2467
|
groupByForColumn?: DataSourceGroupBy<T>;
|
|
2415
2468
|
selectionMode: DataSourcePropSelectionMode;
|
|
@@ -2419,23 +2472,23 @@ type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
|
2419
2472
|
pivotBy?: DataSourcePivotBy<T>[];
|
|
2420
2473
|
sortable?: boolean;
|
|
2421
2474
|
};
|
|
2422
|
-
type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
2475
|
+
declare type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
2423
2476
|
column: COL_TYPE;
|
|
2424
2477
|
groupBy: DataSourcePropGroupBy<T>;
|
|
2425
2478
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
2426
2479
|
};
|
|
2427
|
-
type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
2428
|
-
type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
|
|
2480
|
+
declare type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
2481
|
+
declare type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
|
|
2429
2482
|
renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
|
|
2430
2483
|
id?: string;
|
|
2431
2484
|
};
|
|
2432
|
-
type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
2485
|
+
declare type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
2433
2486
|
renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
|
|
2434
2487
|
};
|
|
2435
|
-
type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
2436
|
-
type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
2437
|
-
type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
2438
|
-
type InfiniteTablePropComponents = {
|
|
2488
|
+
declare type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
2489
|
+
declare type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
2490
|
+
declare type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
2491
|
+
declare type InfiniteTablePropComponents = {
|
|
2439
2492
|
LoadMask?: (props: LoadMaskProps & {
|
|
2440
2493
|
children?: React$1.ReactNode | undefined;
|
|
2441
2494
|
}) => JSX.Element | null;
|
|
@@ -2445,29 +2498,29 @@ type InfiniteTablePropComponents = {
|
|
|
2445
2498
|
}) => JSX.Element | null;
|
|
2446
2499
|
MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
|
|
2447
2500
|
};
|
|
2448
|
-
type ScrollStopInfo = {
|
|
2501
|
+
declare type ScrollStopInfo = {
|
|
2449
2502
|
scrollTop: number;
|
|
2450
2503
|
firstVisibleRowIndex: number;
|
|
2451
2504
|
lastVisibleRowIndex: number;
|
|
2452
2505
|
};
|
|
2453
|
-
type InfiniteTableRowInfoDataDiscriminatorWithColumn<T> = {
|
|
2506
|
+
declare type InfiniteTableRowInfoDataDiscriminatorWithColumn<T> = {
|
|
2454
2507
|
column: InfiniteTableComputedColumn<T>;
|
|
2455
2508
|
columnApi: InfiniteTableColumnApi<T>;
|
|
2456
2509
|
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
2457
|
-
type InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> = {
|
|
2510
|
+
declare type InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> = {
|
|
2458
2511
|
api: InfiniteTableApi<T>;
|
|
2459
2512
|
dataSourceApi: DataSourceApi<T>;
|
|
2460
2513
|
} & InfiniteTableRowInfoDataDiscriminatorWithColumn<T>;
|
|
2461
|
-
type InfiniteTablePropsEditable<T> = InfiniteTableColumnEditableFn<T> | undefined;
|
|
2462
|
-
type InfiniteTablePropOnEditAcceptedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
|
|
2514
|
+
declare type InfiniteTablePropsEditable<T> = InfiniteTableColumnEditableFn<T> | undefined;
|
|
2515
|
+
declare type InfiniteTablePropOnEditAcceptedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
|
|
2463
2516
|
initialValue: any;
|
|
2464
2517
|
};
|
|
2465
|
-
type InfiniteTablePropOnEditCancelledParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
|
|
2466
|
-
type InfiniteTablePropOnEditRejectedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
|
|
2518
|
+
declare type InfiniteTablePropOnEditCancelledParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
|
|
2519
|
+
declare type InfiniteTablePropOnEditRejectedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
|
|
2467
2520
|
initialValue: any;
|
|
2468
2521
|
error: Error;
|
|
2469
2522
|
};
|
|
2470
|
-
type InfiniteTablePropOnEditPersistParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
|
|
2523
|
+
declare type InfiniteTablePropOnEditPersistParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
|
|
2471
2524
|
interface InfiniteTableProps<T> {
|
|
2472
2525
|
columns: InfiniteTablePropColumns<T>;
|
|
2473
2526
|
pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
@@ -2591,22 +2644,22 @@ interface InfiniteTableProps<T> {
|
|
|
2591
2644
|
getColumnMenuItems?: InfiniteTablePropGetColumnMenuItems<T>;
|
|
2592
2645
|
getFilterOperatorMenuItems?: InfiniteTablePropGetFilterOperatorMenuItems<T>;
|
|
2593
2646
|
}
|
|
2594
|
-
type InfiniteTablePropGetColumnMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
|
|
2647
|
+
declare type InfiniteTablePropGetColumnMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
|
|
2595
2648
|
column: InfiniteTableComputedColumn<T>;
|
|
2596
2649
|
columnApi: InfiniteTableColumnApi<T>;
|
|
2597
2650
|
getComputed: () => InfiniteTableComputedValues<T>;
|
|
2598
2651
|
} & InfiniteTablePublicContext<T>) => MenuProps['items'];
|
|
2599
|
-
type GetContextMenuItemsReturnType = MenuProps['items'] | null | {
|
|
2652
|
+
declare type GetContextMenuItemsReturnType = MenuProps['items'] | null | {
|
|
2600
2653
|
items: MenuProps['items'];
|
|
2601
2654
|
columns: MenuColumn[];
|
|
2602
2655
|
};
|
|
2603
|
-
type InfiniteTablePropGetCellContextMenuItems<T> = (info: InfiniteTableRowInfoDataDiscriminatorWithColumn<T> & {
|
|
2656
|
+
declare type InfiniteTablePropGetCellContextMenuItems<T> = (info: InfiniteTableRowInfoDataDiscriminatorWithColumn<T> & {
|
|
2604
2657
|
event: React$1.MouseEvent;
|
|
2605
2658
|
}, params: InfiniteTablePublicContext<T>) => GetContextMenuItemsReturnType;
|
|
2606
|
-
type InfiniteTablePropGetContextMenuItems<T> = (param: {
|
|
2659
|
+
declare type InfiniteTablePropGetContextMenuItems<T> = (param: {
|
|
2607
2660
|
event: React$1.MouseEvent;
|
|
2608
2661
|
} & Partial<InfiniteTableRowInfoDataDiscriminatorWithColumn<T>>, params: InfiniteTablePublicContext<T>) => GetContextMenuItemsReturnType;
|
|
2609
|
-
type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
|
|
2662
|
+
declare type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
|
|
2610
2663
|
column: InfiniteTableComputedColumn<T>;
|
|
2611
2664
|
filterTypes: DataSourceProps<T>['filterTypes'];
|
|
2612
2665
|
columnFilterValue: DataSourceFilterValueItem<T> | null;
|
|
@@ -2615,45 +2668,45 @@ type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<Men
|
|
|
2615
2668
|
getComputed: () => InfiniteTableComputedValues<T>;
|
|
2616
2669
|
actions: InfiniteTableActions<T>;
|
|
2617
2670
|
}) => MenuProps['items'];
|
|
2618
|
-
type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
|
|
2619
|
-
type InfiniteTablePropKeyboardSelection = boolean;
|
|
2620
|
-
type InfiniteTablePropHeaderOptions = {
|
|
2671
|
+
declare type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
|
|
2672
|
+
declare type InfiniteTablePropKeyboardSelection = boolean;
|
|
2673
|
+
declare type InfiniteTablePropHeaderOptions = {
|
|
2621
2674
|
alwaysReserveSpaceForSortIcon: boolean;
|
|
2622
2675
|
};
|
|
2623
|
-
type InfiniteTablePropAutoSizeColumnsKey = string | number | {
|
|
2676
|
+
declare type InfiniteTablePropAutoSizeColumnsKey = string | number | {
|
|
2624
2677
|
key: string | number;
|
|
2625
2678
|
columnsToSkip?: string[];
|
|
2626
2679
|
columnsToResize?: string[];
|
|
2627
2680
|
includeHeader?: boolean;
|
|
2628
2681
|
};
|
|
2629
|
-
type Scrollbars = {
|
|
2682
|
+
declare type Scrollbars = {
|
|
2630
2683
|
vertical: boolean;
|
|
2631
2684
|
horizontal: boolean;
|
|
2632
2685
|
};
|
|
2633
|
-
type ScrollAdjustPosition = 'start' | 'end' | 'center';
|
|
2686
|
+
declare type ScrollAdjustPosition = 'start' | 'end' | 'center';
|
|
2634
2687
|
|
|
2635
2688
|
declare function debounce(fn: Function, { wait }: {
|
|
2636
2689
|
wait: number;
|
|
2637
2690
|
}): (...args: any[]) => void;
|
|
2638
2691
|
|
|
2639
|
-
declare function Menu(props: MenuProps & HTMLProps<HTMLDivElement>): JSX.Element;
|
|
2692
|
+
declare function Menu(props: MenuProps & HTMLProps<HTMLDivElement>): React$1.JSX.Element;
|
|
2640
2693
|
declare namespace Menu {
|
|
2641
2694
|
var defaultProps: MenuProps & {
|
|
2642
2695
|
__is_infinite_menu_component?: boolean | undefined;
|
|
2643
2696
|
};
|
|
2644
2697
|
}
|
|
2645
2698
|
|
|
2646
|
-
declare function StringFilterEditor<T>(): JSX.Element;
|
|
2647
|
-
declare function NumberFilterEditor<T>(): JSX.Element;
|
|
2699
|
+
declare function StringFilterEditor<T>(): React$1.JSX.Element;
|
|
2700
|
+
declare function NumberFilterEditor<T>(): React$1.JSX.Element;
|
|
2648
2701
|
|
|
2649
|
-
type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = {
|
|
2650
|
-
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
|
|
2702
|
+
declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
|
|
2703
|
+
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
|
|
2651
2704
|
};
|
|
2652
|
-
type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
2705
|
+
declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
2653
2706
|
debugName?: string;
|
|
2654
2707
|
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
2655
2708
|
layoutEffect?: boolean;
|
|
2656
|
-
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
2709
|
+
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
|
|
2657
2710
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
2658
2711
|
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
2659
2712
|
mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
@@ -2661,7 +2714,13 @@ type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_S
|
|
|
2661
2714
|
name: keyof T_PROPS;
|
|
2662
2715
|
oldValue: any;
|
|
2663
2716
|
newValue: any;
|
|
2664
|
-
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
|
|
2717
|
+
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
2718
|
+
onPropsChange?: (newPropValues: {
|
|
2719
|
+
[k in keyof T_PROPS]?: {
|
|
2720
|
+
newValue: T_PROPS[k];
|
|
2721
|
+
oldValue: T_PROPS[k];
|
|
2722
|
+
};
|
|
2723
|
+
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
|
|
2665
2724
|
mapPropsToState?: (params: {
|
|
2666
2725
|
props: T_PROPS;
|
|
2667
2726
|
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
@@ -2684,7 +2743,7 @@ declare function getComponentStateRoot<T_PROPS, COMPONENT_MAPPED_STATE extends o
|
|
|
2684
2743
|
}>;
|
|
2685
2744
|
declare function useComponentState<COMPONENT_STATE>(): ComponentStateContext<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
|
|
2686
2745
|
|
|
2687
|
-
type InterceptedMapFns<K, V> = {
|
|
2746
|
+
declare type InterceptedMapFns<K, V> = {
|
|
2688
2747
|
set?: (k: K, v: V) => void;
|
|
2689
2748
|
beforeClear?: (map: Map<K, V>) => void;
|
|
2690
2749
|
clear?: () => void;
|
|
@@ -2702,9 +2761,9 @@ declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, pre
|
|
|
2702
2761
|
|
|
2703
2762
|
declare const components: {
|
|
2704
2763
|
CheckBox: typeof InfiniteCheckBox;
|
|
2705
|
-
LoadMask: (props: LoadMaskProps) => JSX.Element;
|
|
2764
|
+
LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
|
|
2706
2765
|
StringFilterEditor: typeof StringFilterEditor;
|
|
2707
2766
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
2708
2767
|
};
|
|
2709
2768
|
|
|
2710
|
-
export { AdvancedAlignable, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, 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, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps,
|
|
2769
|
+
export { AdvancedAlignable, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, ElementContainerGetter, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowSelectionState, Scrollbars, components, debounce, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useOverlay, useOverlayPortal, useRowInfoReducers };
|