@infinite-table/infinite-react 1.2.3 → 1.2.5

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/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,8 +189,9 @@ 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
+ align?: InfiniteTableColumnAlignValues;
194
195
  rowId?: any;
195
196
  renderChildren: () => Renderable;
196
197
  width: number;
@@ -204,20 +205,46 @@ type InfiniteTableBaseCellProps<T> = {
204
205
  cssPosition?: CSSProperties['position'];
205
206
  domRef?: React.RefCallback<HTMLElement>;
206
207
  };
207
- type InfiniteTableCellProps<T> = ({
208
+ declare type InfiniteTableCellProps<T> = ({
208
209
  cellType: 'header';
209
210
  } & InfiniteTableBaseCellProps<T>) | ({
210
211
  cellType: 'body';
211
212
  } & InfiniteTableBaseCellProps<T>);
212
213
 
213
- type DiscriminatedUnion<A, B> = (A & {
214
+ declare type DiscriminatedUnion<A, B> = (A & {
214
215
  [K in keyof B]?: undefined;
215
216
  }) | (B & {
216
217
  [K in keyof A]?: undefined;
217
218
  });
218
- type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
219
+ declare type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
220
+ /**
221
+ * Restrict using either exclusively the keys of T or exclusively the keys of U.
222
+ *
223
+ * No unique keys of T can be used simultaneously with any unique keys of U.
224
+ *
225
+ * @example
226
+ *```
227
+ * const myVar: XOR<T, U>
228
+ *```
229
+ *
230
+ * @see https://github.com/maninak/ts-xor/tree/master#description
231
+ */
232
+ declare type XOR<T, U> = T | U extends object ? Prettify<Without<T, U> & U> | Prettify<Without<U, T> & T> : T | U;
233
+ /**
234
+ * Get the keys of T without any keys of U.
235
+ */
236
+ declare type Without<T, U> = {
237
+ [P in Exclude<keyof T, keyof U>]?: never;
238
+ };
239
+ /**
240
+ * Resolve mapped types and show the derived keys and their types when hovering in
241
+ * IDEs, instead of just showing the names those mapped types are defined with.
242
+ */
243
+ declare type Prettify<T> = {
244
+ [K in keyof T]: T[K];
245
+ } & {};
219
246
 
220
- type MenuIconProps = {
247
+ declare type MenuIconProps = {
221
248
  lineWidth?: number;
222
249
  lineStyle?: React$1.CSSProperties;
223
250
  style?: React$1.CSSProperties;
@@ -227,11 +254,11 @@ type MenuIconProps = {
227
254
  children?: React$1.ReactNode;
228
255
  };
229
256
 
230
- type NonUndefined<T> = T extends undefined ? never : T;
257
+ declare type NonUndefined<T> = T extends undefined ? never : T;
231
258
 
232
- type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
233
- type InfiniteTableSelectRowFn = (id: any) => void;
234
- type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
259
+ declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
260
+ declare type InfiniteTableSelectRowFn = (id: any) => void;
261
+ declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
235
262
  dragging: boolean;
236
263
  column: COL_TYPE;
237
264
  columnsMap: Map<string, COL_TYPE>;
@@ -257,15 +284,17 @@ type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedC
257
284
  } | {
258
285
  insideColumnMenu: true;
259
286
  });
260
- type InfiniteTableColumnRenderBag = {
287
+ declare type InfiniteTableColumnRenderBag = {
261
288
  value: string | number | Renderable;
262
289
  groupIcon?: Renderable;
263
290
  all?: Renderable;
264
291
  selectionCheckBox?: Renderable;
265
292
  };
266
- type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
293
+ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
267
294
  domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
268
295
  value: string | number | Renderable;
296
+ align: InfiniteTableColumnAlignValues;
297
+ verticalAlign: InfiniteTableColumnVerticalAlignValues;
269
298
  renderBag: InfiniteTableColumnRenderBag;
270
299
  rowIndex: number;
271
300
  rowActive: boolean;
@@ -289,61 +318,71 @@ type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableCompu
289
318
  rootGroupBy: DataSourceState<DATA_TYPE>['groupBy'];
290
319
  pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
291
320
  };
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>> = {
321
+ declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
322
+ declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
323
+ declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
324
+ declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
296
325
  rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
297
326
  data: DATA_TYPE | Partial<DATA_TYPE> | null;
298
327
  dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
299
328
  rowIndex: number;
300
329
  column: COL_TYPE;
301
330
  };
302
- type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
331
+ declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
303
332
  isGroupRow: true;
304
333
  }) => Renderable | null;
305
- type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
334
+ declare type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
306
335
  isGroupRow: false;
307
336
  }) => 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> & {
337
+ declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
338
+ declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
339
+ declare type InfiniteTableColumnContentFocusable<T> = boolean | InfiniteTableColumnContentFocusableFn<T>;
340
+ declare type InfiniteTableColumnEditable<T> = boolean | InfiniteTableColumnEditableFn<T>;
341
+ declare type InfiniteTableColumnContentFocusableFn<T> = (params: InfiniteTableColumnContentFocusableParams<T>) => boolean;
342
+ declare type InfiniteTableColumnEditableFn<T> = (params: InfiniteTableColumnEditableParams<T>) => boolean | Promise<boolean>;
343
+ declare type InfiniteTableColumnContentFocusableParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T>;
344
+ declare type InfiniteTableColumnEditableParams<T> = InfiniteTableColumnContentFocusableParams<T>;
345
+ declare type InfiniteTableColumnGetValueToPersistParams<T> = InfiniteTableColumnEditableParams<T> & {
317
346
  initialValue: any;
318
347
  };
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> = {
348
+ declare type InfiniteTableColumnAlignValues = 'start' | 'center' | 'end';
349
+ declare type InfiniteTableColumnVerticalAlignValues = 'start' | 'center' | 'end';
350
+ declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
351
+ declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
352
+ declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
353
+ declare type InfiniteTableColumnStyleFnParams<T> = {
325
354
  value: Renderable;
326
355
  column: InfiniteTableComputedColumn<T>;
327
356
  inEdit: boolean;
328
357
  editError: InfiniteTableColumnRenderParamBase<T>['editError'];
329
358
  } & 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> = {
359
+ declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React__default.CSSProperties;
360
+ declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
361
+ declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React__default.CSSProperties;
362
+ declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
363
+ declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
364
+ declare type InfiniteTableColumnAlign<T> = InfiniteTableColumnAlignValues | InfiniteTableColumnAlignFn<T>;
365
+ declare type InfiniteTableColumnVerticalAlign<T> = InfiniteTableColumnVerticalAlignValues | InfiniteTableColumnVerticalAlignFn<T>;
366
+ declare type InfiniteTableColumnAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnAlignValues;
367
+ declare type InfiniteTableColumnAlignFnParams<T> = XOR<{
368
+ isHeader: true;
369
+ column: InfiniteTableComputedColumn<T>;
370
+ }, InfiniteTableColumnStyleFnParams<T> & {
371
+ isHeader: false;
372
+ }>;
373
+ declare type InfiniteTableColumnVerticalAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnVerticalAlignValues;
374
+ declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
375
+ declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
376
+ declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
377
+ declare type InfiniteTableColumnValueGetterParams<T> = {
339
378
  data: T;
340
379
  field?: keyof T;
341
380
  };
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;
381
+ declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
382
+ declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
383
+ declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
384
+ declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
385
+ declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
347
386
  /**
348
387
  * Defines a column in the table.
349
388
  *
@@ -351,7 +390,9 @@ type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
351
390
  *
352
391
  * Can be bound to a field which is a `keyof DATA_TYPE`.
353
392
  */
354
- type InfiniteTableColumn<DATA_TYPE> = {
393
+ declare type InfiniteTableColumn<DATA_TYPE> = {
394
+ field?: KeyOfNoSymbol<DATA_TYPE>;
395
+ valueGetter?: InfiniteTableColumnValueGetter<DATA_TYPE>;
355
396
  sortable?: boolean;
356
397
  draggable?: boolean;
357
398
  resizable?: boolean;
@@ -364,9 +405,9 @@ type InfiniteTableColumn<DATA_TYPE> = {
364
405
  defaultHiddenWhenGroupedBy?: '*' | true | keyof DATA_TYPE | {
365
406
  [k in keyof Partial<DATA_TYPE>]: true;
366
407
  };
367
- align?: InfiniteTableColumnAlign;
368
- headerAlign?: InfiniteTableColumnAlign;
369
- verticalAlign?: InfiniteTableColumnVerticalAlign;
408
+ align?: InfiniteTableColumnAlign<DATA_TYPE>;
409
+ headerAlign?: InfiniteTableColumnAlign<DATA_TYPE>;
410
+ verticalAlign?: InfiniteTableColumnVerticalAlign<DATA_TYPE>;
370
411
  columnGroup?: string;
371
412
  header?: InfiniteTableColumnHeader<DATA_TYPE>;
372
413
  renderHeader?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
@@ -382,12 +423,10 @@ type InfiniteTableColumn<DATA_TYPE> = {
382
423
  headerClassName?: InfiniteTableColumnHeaderClassName<DATA_TYPE>;
383
424
  className?: InfiniteTableColumnClassName<DATA_TYPE>;
384
425
  rowspan?: InfiniteTableColumnRowspanFn<DATA_TYPE>;
385
- field?: KeyOfNoSymbol<DATA_TYPE>;
386
426
  render?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
387
427
  renderValue?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
388
428
  renderGroupValue?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
389
429
  renderLeafValue?: InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE>;
390
- valueGetter?: InfiniteTableColumnValueGetter<DATA_TYPE>;
391
430
  valueFormatter?: InfiniteTableColumnValueFormatter<DATA_TYPE, Renderable>;
392
431
  defaultWidth?: number;
393
432
  defaultFlex?: number;
@@ -409,12 +448,12 @@ type InfiniteTableColumn<DATA_TYPE> = {
409
448
  MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
410
449
  };
411
450
  };
412
- type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'sortable'> & {
451
+ declare type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'sortable'> & {
413
452
  groupByField: string | string[];
414
453
  id?: string;
415
454
  };
416
- type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
417
- type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
455
+ declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
456
+ declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
418
457
  pivotBy: DataSourcePivotBy<DataType>[];
419
458
  pivotTotalColumnGroup?: true;
420
459
  pivotGroupKeys: KeyType[];
@@ -422,7 +461,7 @@ type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = I
422
461
  pivotGroupKey: KeyType;
423
462
  pivotIndex: number;
424
463
  };
425
- type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
464
+ declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
426
465
  pivotBy: DataSourcePivotBy<DataType>[];
427
466
  pivotColumn: true;
428
467
  pivotTotalColumn: boolean;
@@ -433,8 +472,8 @@ type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = Infini
433
472
  pivotIndex: number;
434
473
  pivotGroupKey: KeyType;
435
474
  };
436
- type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
437
- type InfiniteTableComputedColumnBase<T> = {
475
+ declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
476
+ declare type InfiniteTableComputedColumnBase<T> = {
438
477
  computedFilterType: string;
439
478
  computedSortType: string;
440
479
  computedDataType: string;
@@ -470,8 +509,8 @@ type InfiniteTableComputedColumnBase<T> = {
470
509
  colType: InfiniteTableColumnType<T>;
471
510
  id: string;
472
511
  };
473
- type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
474
- type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
512
+ declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
513
+ declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
475
514
 
476
515
  interface LogFn {
477
516
  (...args: any[]): LogFn;
@@ -487,21 +526,21 @@ interface ScrollPosition {
487
526
  scrollTop: number;
488
527
  scrollLeft: number;
489
528
  }
490
- type OnScrollFn = (scrollPosition: ScrollPosition) => void;
529
+ declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
491
530
 
492
- type VoidFn = () => void;
531
+ declare type VoidFn = () => void;
493
532
 
494
- type FixedPosition = false | 'start' | 'end';
495
- type SpanFunction = ({ rowIndex, colIndex, }: {
533
+ declare type FixedPosition = false | 'start' | 'end';
534
+ declare type SpanFunction = ({ rowIndex, colIndex, }: {
496
535
  rowIndex: number;
497
536
  colIndex: number;
498
537
  }) => number;
499
- type RenderRangeType = {
538
+ declare type RenderRangeType = {
500
539
  startIndex: number;
501
540
  endIndex: number;
502
541
  };
503
- type ItemSizeFunction = (index: number) => number;
504
- type MatrixBrainOptions = {
542
+ declare type ItemSizeFunction = (index: number) => number;
543
+ declare type MatrixBrainOptions = {
505
544
  width: number;
506
545
  height: number;
507
546
  cols: number;
@@ -511,23 +550,23 @@ type MatrixBrainOptions = {
511
550
  rowspan?: SpanFunction;
512
551
  colspan?: SpanFunction;
513
552
  };
514
- type TableRenderRange = {
553
+ declare type TableRenderRange = {
515
554
  start: [number, number];
516
555
  end: [number, number];
517
556
  rowFixed?: FixedPosition;
518
557
  colFixed?: FixedPosition;
519
558
  };
520
- type WhichDirection = {
559
+ declare type WhichDirection = {
521
560
  horizontal?: boolean;
522
561
  vertical?: boolean;
523
562
  };
524
- type FnOnRenderRangeChange = (range: TableRenderRange) => void;
525
- type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
526
- type FnOnRenderCountChange = ({ horizontal, vertical, }: {
563
+ declare type FnOnRenderRangeChange = (range: TableRenderRange) => void;
564
+ declare type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
565
+ declare type FnOnRenderCountChange = ({ horizontal, vertical, }: {
527
566
  horizontal: number;
528
567
  vertical: number;
529
568
  }) => void;
530
- type OnAvailableSizeChange = (size: Size) => void;
569
+ declare type OnAvailableSizeChange = (size: Size) => void;
531
570
  declare class MatrixBrain extends Logger {
532
571
  private scrolling;
533
572
  private width;
@@ -749,8 +788,8 @@ declare class MatrixBrain extends Logger {
749
788
  destroy: () => void;
750
789
  }
751
790
 
752
- type RowSelectionStateItem = (any | any[])[];
753
- type RowSelectionStateObject = {
791
+ declare type RowSelectionStateItem = (any | any[])[];
792
+ declare type RowSelectionStateObject = {
754
793
  selectedRows: RowSelectionStateItem;
755
794
  deselectedRows: RowSelectionStateItem;
756
795
  defaultSelection: boolean;
@@ -763,7 +802,7 @@ type RowSelectionStateObject = {
763
802
  selectedRows: RowSelectionStateItem;
764
803
  deselectedRows?: RowSelectionStateItem;
765
804
  };
766
- type RowSelectionStateConfig<T> = {
805
+ declare type RowSelectionStateConfig<T> = {
767
806
  groupBy: DataSourceState<T>['groupBy'];
768
807
  groupDeepMap: DataSourceState<T>['groupDeepMap'];
769
808
  toPrimaryKey: DataSourceState<T>['toPrimaryKey'];
@@ -772,8 +811,8 @@ type RowSelectionStateConfig<T> = {
772
811
  lazyLoad: boolean;
773
812
  onlyUsePrimaryKeys: boolean;
774
813
  };
775
- type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
776
- type RowSelectionStateOverride = {
814
+ declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
815
+ declare type RowSelectionStateOverride = {
777
816
  getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
778
817
  getGroupByLength: RowSelectionState<any>['getGroupByLength'];
779
818
  getGroupCount: RowSelectionState<any>['getGroupCount'];
@@ -857,7 +896,7 @@ declare class RowSelectionState<T = any> {
857
896
  };
858
897
  }
859
898
 
860
- type MultiRowSelectorOptions = {
899
+ declare type MultiRowSelectorOptions = {
861
900
  getIdForIndex: (index: number) => string | number;
862
901
  };
863
902
  declare class MultiRowSelector {
@@ -913,12 +952,12 @@ interface InfiniteTableComputedValues<T> {
913
952
  columnSize: (colIndex: number) => number;
914
953
  }
915
954
 
916
- type PointCoords = {
955
+ declare type PointCoords = {
917
956
  top: number;
918
957
  left: number;
919
958
  };
920
959
 
921
- type TableRenderCellFnParam = {
960
+ declare type TableRenderCellFnParam = {
922
961
  domRef: RefCallback<HTMLElement>;
923
962
  rowIndex: number;
924
963
  colIndex: number;
@@ -934,7 +973,7 @@ type TableRenderCellFnParam = {
934
973
  onMouseEnter: VoidFunction;
935
974
  onMouseLeave: VoidFunction;
936
975
  };
937
- type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
976
+ declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
938
977
  declare class ReactHeadlessTableRenderer extends Logger {
939
978
  private brain;
940
979
  private destroyed;
@@ -1010,34 +1049,34 @@ declare class ReactHeadlessTableRenderer extends Logger {
1010
1049
  reset(): void;
1011
1050
  }
1012
1051
 
1013
- type ComponentStateContext<T_STATE, T_ACTIONS> = {
1052
+ declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
1014
1053
  getComponentState: () => T_STATE;
1015
1054
  componentState: T_STATE;
1016
1055
  componentActions: T_ACTIONS;
1017
1056
  };
1018
- type ComponentStateGeneratedActions<T_STATE> = {
1057
+ declare type ComponentStateGeneratedActions<T_STATE> = {
1019
1058
  [k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
1020
1059
  };
1021
- type ComponentInterceptedActions<T_STATE> = {
1060
+ declare type ComponentInterceptedActions<T_STATE> = {
1022
1061
  [k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
1023
1062
  actions: ComponentStateGeneratedActions<T_STATE>;
1024
1063
  state: T_STATE;
1025
1064
  }) => void | boolean;
1026
1065
  };
1027
- type ComponentMappedCallbacks<T_STATE> = {
1066
+ declare type ComponentMappedCallbacks<T_STATE> = {
1028
1067
  [k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
1029
1068
  callbackName: string;
1030
1069
  callbackParams: any[];
1031
1070
  };
1032
1071
  };
1033
- type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
1072
+ declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
1034
1073
 
1035
- type CellPosition = {
1074
+ declare type CellPosition = {
1036
1075
  rowIndex: number;
1037
1076
  colIndex: number;
1038
1077
  };
1039
1078
 
1040
- type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
1079
+ declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
1041
1080
  interface SubscriptionCallback<T> {
1042
1081
  (node: T, callback?: () => void): void;
1043
1082
  get: () => T | null;
@@ -1055,17 +1094,17 @@ declare class ScrollListener {
1055
1094
  destroy: () => void;
1056
1095
  }
1057
1096
 
1058
- type CellContextMenuLocation = {
1097
+ declare type CellContextMenuLocation = {
1059
1098
  rowId: any;
1060
1099
  rowIndex: number;
1061
1100
  columnId: string;
1062
1101
  colIndex: number;
1063
1102
  };
1064
- type CellContextMenuLocationWithEvent = CellContextMenuLocation & {
1103
+ declare type CellContextMenuLocationWithEvent = CellContextMenuLocation & {
1065
1104
  event: React.MouseEvent;
1066
1105
  target: HTMLElement;
1067
1106
  };
1068
- type ContextMenuLocationWithEvent = Partial<CellContextMenuLocation> & {
1107
+ declare type ContextMenuLocationWithEvent = Partial<CellContextMenuLocation> & {
1069
1108
  event: React.MouseEvent;
1070
1109
  target: HTMLElement;
1071
1110
  };
@@ -1140,9 +1179,9 @@ interface InfiniteTableSetupState<T> {
1140
1179
  cancelled?: boolean;
1141
1180
  };
1142
1181
  }
1143
- type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
1144
- type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
1145
- type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
1182
+ declare type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
1183
+ declare type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
1184
+ declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
1146
1185
  interface InfiniteTableMappedState<T> {
1147
1186
  id: InfiniteTableProps<T>['id'];
1148
1187
  scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
@@ -1240,12 +1279,12 @@ interface InfiniteTableDerivedState<T> {
1240
1279
  columnHeaderHeightCSSVar: string;
1241
1280
  controlledColumnVisibility: boolean;
1242
1281
  }
1243
- type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
1282
+ declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
1244
1283
  interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
1245
1284
  }
1246
1285
 
1247
- type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
1248
- type InfiniteTableSelectionApi = {
1286
+ declare type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
1287
+ declare type InfiniteTableSelectionApi = {
1249
1288
  get allRowsSelected(): boolean;
1250
1289
  isRowSelected(pk: any, groupKeys?: any[]): boolean;
1251
1290
  isRowDeselected(pk: any, groupKeys?: any[]): boolean;
@@ -1261,7 +1300,7 @@ type InfiniteTableSelectionApi = {
1261
1300
  deselectAll(): void;
1262
1301
  };
1263
1302
 
1264
- type InfiniteTableEventHandlerContext<T> = {
1303
+ declare type InfiniteTableEventHandlerContext<T> = {
1265
1304
  getComputed: () => InfiniteTableComputedValues<T>;
1266
1305
  getState: () => InfiniteTableState<T>;
1267
1306
  actions: InfiniteTableActions<T>;
@@ -1271,15 +1310,15 @@ type InfiniteTableEventHandlerContext<T> = {
1271
1310
  api: InfiniteTableApi<T>;
1272
1311
  dataSourceApi: DataSourceApi<T>;
1273
1312
  };
1274
- type InfiniteTableKeyboardEventHandlerContext<T> = InfiniteTableEventHandlerContext<T>;
1275
- type InfiniteTableCellClickEventHandlerContext<T> = InfiniteTableEventHandlerContext<T> & {
1313
+ declare type InfiniteTableKeyboardEventHandlerContext<T> = InfiniteTableEventHandlerContext<T>;
1314
+ declare type InfiniteTableCellClickEventHandlerContext<T> = InfiniteTableEventHandlerContext<T> & {
1276
1315
  rowIndex: number;
1277
1316
  colIndex: number;
1278
1317
  column: InfiniteTableComputedColumn<T>;
1279
1318
  columnApi: InfiniteTableColumnApi<T>;
1280
1319
  };
1281
1320
 
1282
- type OnCellClickContext<T> = InfiniteTableCellClickEventHandlerContext<T> & InfiniteTableKeyboardEventHandlerContext<T>;
1321
+ declare type OnCellClickContext<T> = InfiniteTableCellClickEventHandlerContext<T> & InfiniteTableKeyboardEventHandlerContext<T>;
1283
1322
 
1284
1323
  interface InfiniteTableContextValue<T> {
1285
1324
  api: InfiniteTableApi<T>;
@@ -1305,19 +1344,19 @@ interface InfiniteTableCellContext<T> {
1305
1344
  columnApi: InfiniteTableColumnApi<T>;
1306
1345
  }
1307
1346
 
1308
- type GroupKeyType$1<T extends any = any> = T;
1309
- type GroupBy<DataType, KeyType> = {
1347
+ declare type GroupKeyType$1<T extends any = any> = T;
1348
+ declare type GroupBy<DataType, KeyType> = {
1310
1349
  field: KeyOfNoSymbol<DataType>;
1311
1350
  toKey?: (value: any, data: DataType) => GroupKeyType$1<KeyType>;
1312
1351
  column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
1313
1352
  };
1314
1353
 
1315
- type RenderRange = {
1354
+ declare type RenderRange = {
1316
1355
  renderStartIndex: number;
1317
1356
  renderEndIndex: number;
1318
1357
  };
1319
1358
 
1320
- type DataSourceMutation<T> = {
1359
+ declare type DataSourceMutation<T> = {
1321
1360
  type: 'delete';
1322
1361
  primaryKey: any;
1323
1362
  } | {
@@ -1348,8 +1387,8 @@ declare class DataSourceCache<DataType, PrimaryKeyType = string> {
1348
1387
  getMutations: () => Map<string, DataSourceMutation<DataType>[]>;
1349
1388
  }
1350
1389
 
1351
- type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
1352
- type BooleanDeepCollectionStateObject<KeyType> = {
1390
+ declare type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
1391
+ declare type BooleanDeepCollectionStateObject<KeyType> = {
1353
1392
  positiveItems: BooleanDeepCollectionStateKeys<KeyType>;
1354
1393
  negativeItems: BooleanDeepCollectionStateKeys<KeyType>;
1355
1394
  };
@@ -1423,16 +1462,16 @@ interface DataSourceDataParams<T> {
1423
1462
  __cursorId?: DataSourceSetupState<T>['cursorId'];
1424
1463
  changes?: DataSourceDataParamsChanges<T>;
1425
1464
  }
1426
- type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
1427
- type DataSourceSingleSortInfo<T> = Omit<MultisortInfo<T>, 'field'> & {
1465
+ declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
1466
+ declare type DataSourceSingleSortInfo<T> = Omit<MultisortInfo<T>, 'field'> & {
1428
1467
  field?: keyof T | (keyof T)[];
1429
1468
  id?: string;
1430
1469
  };
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> = {
1470
+ declare type DataSourceGroupBy<T> = GroupBy<T, any>;
1471
+ declare type DataSourcePivotBy<T> = PivotBy<T, any>;
1472
+ declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
1473
+ declare type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
1474
+ declare type DataSourceRemoteData<T> = {
1436
1475
  data: T[] | LazyGroupDataItem<T>[];
1437
1476
  mappings?: DataSourceMappings;
1438
1477
  cache?: boolean;
@@ -1441,14 +1480,14 @@ type DataSourceRemoteData<T> = {
1441
1480
  totalCountUnfiltered?: number;
1442
1481
  livePaginationCursor?: DataSourceLivePaginationCursorValue;
1443
1482
  };
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> = {
1483
+ declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
1484
+ declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
1485
+ declare type DataSourcePropGroupRowsStateObject<KeyType> = {
1447
1486
  expandedRows: DataSourceGroupRowsList<KeyType>;
1448
1487
  collapsedRows: DataSourceGroupRowsList<KeyType>;
1449
1488
  };
1450
- type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
1451
- type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
1489
+ declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
1490
+ declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
1452
1491
  interface DataSourceMappedState<T> {
1453
1492
  aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
1454
1493
  livePagination: DataSourceProps<T>['livePagination'];
@@ -1457,6 +1496,7 @@ interface DataSourceMappedState<T> {
1457
1496
  onDataArrayChange: DataSourceProps<T>['onDataArrayChange'];
1458
1497
  onDataMutations: DataSourceProps<T>['onDataMutations'];
1459
1498
  onReady: DataSourceProps<T>['onReady'];
1499
+ rowInfoReducers: DataSourceProps<T>['rowInfoReducers'];
1460
1500
  lazyLoad: DataSourceProps<T>['lazyLoad'];
1461
1501
  useGroupKeysForMultiRowSelection: NonUndefined<DataSourceProps<T>['useGroupKeysForMultiRowSelection']>;
1462
1502
  onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
@@ -1474,7 +1514,12 @@ interface DataSourceMappedState<T> {
1474
1514
  collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
1475
1515
  sortInfo: DataSourceSingleSortInfo<T>[] | null;
1476
1516
  }
1477
- type DataSourceAggregationReducer<T, AggregationResultType> = {
1517
+ declare type DataSourceRawReducer<T, RESULT_TYPE> = {
1518
+ initialValue?: RESULT_TYPE | (() => RESULT_TYPE);
1519
+ reducer: (accumulator: any, value: T) => RESULT_TYPE;
1520
+ done?: (accumulatedValue: RESULT_TYPE, array: T[]) => RESULT_TYPE;
1521
+ };
1522
+ declare type DataSourceAggregationReducer<T, AggregationResultType> = {
1478
1523
  name?: string;
1479
1524
  field?: keyof T;
1480
1525
  initialValue?: AggregationResultType;
@@ -1485,11 +1530,11 @@ type DataSourceAggregationReducer<T, AggregationResultType> = {
1485
1530
  column: InfiniteTablePivotFinalColumnVariant<T>;
1486
1531
  }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
1487
1532
  };
1488
- type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
1533
+ declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
1489
1534
  inheritFromColumn?: string | boolean;
1490
1535
  };
1491
- type DataSourceMappings = Record<'totals' | 'values', string>;
1492
- type LazyGroupDataItem<DataType> = {
1536
+ declare type DataSourceMappings = Record<'totals' | 'values', string>;
1537
+ declare type LazyGroupDataItem<DataType> = {
1493
1538
  data: Partial<DataType>;
1494
1539
  keys: any[];
1495
1540
  aggregations?: Record<string, any>;
@@ -1500,7 +1545,7 @@ type LazyGroupDataItem<DataType> = {
1500
1545
  totals?: Record<string, any>;
1501
1546
  };
1502
1547
  };
1503
- type LazyRowInfoGroup<DataType> = {
1548
+ declare type LazyRowInfoGroup<DataType> = {
1504
1549
  /**
1505
1550
  * Those are direct children of the current lazy group row
1506
1551
  */
@@ -1512,12 +1557,14 @@ type LazyRowInfoGroup<DataType> = {
1512
1557
  totalCountUnfiltered: number;
1513
1558
  error?: string;
1514
1559
  };
1515
- type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
1560
+ declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
1516
1561
  interface DataSourceSetupState<T> {
1517
1562
  indexer: Indexer<T, any>;
1563
+ idToIndexMap: Map<any, number>;
1518
1564
  cache?: DataSourceCache<T>;
1519
1565
  unfilteredCount: number;
1520
1566
  filteredCount: number;
1567
+ rowInfoReducerResults?: Record<string, any>;
1521
1568
  originalDataArrayChanged: boolean;
1522
1569
  originalDataArrayChangedInfo: {
1523
1570
  timestamp: number;
@@ -1559,23 +1606,23 @@ interface DataSourceSetupState<T> {
1559
1606
  pivotColumns?: Map<string, InfiniteTableColumn<T>>;
1560
1607
  pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
1561
1608
  }
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 = {
1609
+ declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
1610
+ declare type DataSourcePropMultiRowSelectionChangeParamType = RowSelectionStateObject;
1611
+ declare type DataSourcePropRowSelection = DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
1612
+ declare type DataSourcePropRowSelection_MultiRow = RowSelectionStateObject;
1613
+ declare type DataSourcePropRowSelection_SingleRow = null | string | number;
1614
+ declare type DataSourcePropCellSelection = any;
1615
+ declare type DataSourcePropSelectionMode = false | 'single-cell' | 'single-row' | 'multi-cell' | 'multi-row';
1616
+ declare type DataSourcePropOnRowSelectionChange_MultiRow = (rowSelection: DataSourcePropRowSelection_MultiRow, selectionMode: 'multi-row') => void;
1617
+ declare type DataSourcePropOnRowSelectionChange_SingleRow = (rowSelection: DataSourcePropRowSelection_SingleRow, selectionMode: 'single-row') => void;
1618
+ declare type DataSourcePropOnRowSelectionChange = DataSourcePropOnRowSelectionChange_SingleRow | DataSourcePropOnRowSelectionChange_MultiRow;
1619
+ declare type DataSourcePropOnCellSelectionChange = (cellSelectionParams: any) => void;
1620
+ declare type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>, rowSelectionState: RowSelectionState, selectionMode: 'multi-row') => boolean | null;
1621
+ declare type DataSourcePropSortFn<T> = (sortInfo: MultisortInfoAllowMultipleFields<T>[], array: T[], get?: (item: any) => T) => T[];
1622
+ declare type DataSourceCRUDParam = {
1576
1623
  flush?: boolean;
1577
1624
  };
1578
- type DataSourceInsertParam = DataSourceCRUDParam & ({
1625
+ declare type DataSourceInsertParam = DataSourceCRUDParam & ({
1579
1626
  position: 'before' | 'after';
1580
1627
  primaryKey: any;
1581
1628
  } | {
@@ -1583,7 +1630,11 @@ type DataSourceInsertParam = DataSourceCRUDParam & ({
1583
1630
  });
1584
1631
  interface DataSourceApi<T> {
1585
1632
  getRowInfoArray: () => InfiniteTableRowInfo<T>[];
1586
- getDataByPrimaryKey(id: any): T | undefined;
1633
+ getDataByPrimaryKey(id: any): T | null;
1634
+ getRowInfoByIndex(index: number): InfiniteTableRowInfo<T> | null;
1635
+ getRowInfoByPrimaryKey(id: any): InfiniteTableRowInfo<T> | null;
1636
+ getIndexByPrimaryKey(id: any): number;
1637
+ getPrimaryKeyByIndex(id: any): any;
1587
1638
  updateData(data: Partial<T>, options?: DataSourceCRUDParam): Promise<any>;
1588
1639
  updateDataArray(data: Partial<T>[], options?: DataSourceCRUDParam): Promise<any>;
1589
1640
  removeDataByPrimaryKey(id: any, options?: DataSourceCRUDParam): Promise<any>;
@@ -1595,11 +1646,14 @@ interface DataSourceApi<T> {
1595
1646
  insertData(data: T, options: DataSourceInsertParam): Promise<any>;
1596
1647
  insertDataArray(data: T[], options: DataSourceInsertParam): Promise<any>;
1597
1648
  }
1598
- type DataSourceProps<T> = {
1649
+ declare type DataSourcePropRowInfoReducers<T> = Record<string, DataSourceRowInfoReducer<T>>;
1650
+ declare type DataSourceRowInfoReducer<T> = DataSourceRawReducer<InfiniteTableRowInfo<T>, any>;
1651
+ declare type DataSourceProps<T> = {
1599
1652
  children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
1600
1653
  primaryKey: keyof T | ((data: T) => string);
1601
1654
  fields?: (keyof T)[];
1602
1655
  refetchKey?: number | string | object;
1656
+ rowInfoReducers?: DataSourcePropRowInfoReducers<T>;
1603
1657
  data: DataSourceData<T>;
1604
1658
  selectionMode?: DataSourcePropSelectionMode;
1605
1659
  useGroupKeysForMultiRowSelection?: boolean;
@@ -1668,17 +1722,17 @@ type DataSourceProps<T> = {
1668
1722
  } | {
1669
1723
  selectionMode?: false;
1670
1724
  });
1671
- type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
1672
- type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
1673
- type DataSourceFilterFunctionParam<T> = {
1725
+ declare type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
1726
+ declare type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
1727
+ declare type DataSourceFilterFunctionParam<T> = {
1674
1728
  data: T;
1675
1729
  index: number;
1676
1730
  dataArray: T[];
1677
1731
  primaryKey: any;
1678
1732
  };
1679
- type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
1680
- type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
1681
- type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
1733
+ declare type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
1734
+ declare type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
1735
+ declare type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
1682
1736
  field: keyof T;
1683
1737
  }, {
1684
1738
  id: string;
@@ -1691,10 +1745,10 @@ type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
1691
1745
  };
1692
1746
  disabled?: boolean;
1693
1747
  };
1694
- type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T> & {
1748
+ declare type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T> & {
1695
1749
  field?: keyof T;
1696
1750
  }) => any;
1697
- type DataSourceFilterType<T> = {
1751
+ declare type DataSourceFilterType<T> = {
1698
1752
  emptyValues: any[];
1699
1753
  label?: string;
1700
1754
  defaultOperator: string;
@@ -1705,7 +1759,7 @@ type DataSourceFilterType<T> = {
1705
1759
  };
1706
1760
  operators: DataSourceFilterOperator<T>[];
1707
1761
  };
1708
- type DataSourceFilterOperator<T> = {
1762
+ declare type DataSourceFilterOperator<T> = {
1709
1763
  name: string;
1710
1764
  label?: string;
1711
1765
  components?: {
@@ -1714,24 +1768,24 @@ type DataSourceFilterOperator<T> = {
1714
1768
  };
1715
1769
  fn: DataSourceFilterOperatorFunction<T>;
1716
1770
  };
1717
- type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
1718
- type DataSourceFilterOperatorFunctionParam<T> = {
1771
+ declare type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
1772
+ declare type DataSourceFilterOperatorFunctionParam<T> = {
1719
1773
  currentValue: any;
1720
1774
  filterValue: any;
1721
1775
  emptyValues: any[];
1722
1776
  field?: keyof T;
1723
1777
  } & DataSourceFilterFunctionParam<T>;
1724
- type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
1725
- type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
1726
- type DataSourceLivePaginationCursorParams<T> = {
1778
+ declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
1779
+ declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
1780
+ declare type DataSourceLivePaginationCursorParams<T> = {
1727
1781
  array: T[];
1728
1782
  lastItem: T | Partial<T> | null;
1729
1783
  length: number;
1730
1784
  };
1731
- type DataSourceLivePaginationCursorValue = string | number | null;
1785
+ declare type DataSourceLivePaginationCursorValue = string | number | null;
1732
1786
  interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
1733
1787
  }
1734
- type DataSourceDerivedState<T> = {
1788
+ declare type DataSourceDerivedState<T> = {
1735
1789
  toPrimaryKey: (data: T) => any;
1736
1790
  operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
1737
1791
  sortMode: NonUndefined<DataSourceProps<T>['sortMode']>;
@@ -1745,7 +1799,7 @@ type DataSourceDerivedState<T> = {
1745
1799
  rowSelection: RowSelectionState | null | number | string;
1746
1800
  selectionMode: NonUndefined<DataSourceProps<T>['selectionMode']>;
1747
1801
  };
1748
- type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
1802
+ declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
1749
1803
  interface DataSourceContextValue<T> {
1750
1804
  api: DataSourceApi<T>;
1751
1805
  getState: () => DataSourceState<T>;
@@ -1759,20 +1813,18 @@ interface DataSourceAction<T> {
1759
1813
  type: DataSourceActionType;
1760
1814
  payload: T;
1761
1815
  }
1762
- interface DataSourceReducer<T> {
1763
- (state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
1764
- }
1765
1816
 
1766
1817
  declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
1767
1818
 
1768
1819
  declare function useDataSource<T>(): DataSourceState<T>;
1769
1820
 
1770
- declare function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
1821
+ declare function DataSource<T>(props: DataSourceProps<T>): React$1.JSX.Element;
1822
+ declare function useRowInfoReducers(): Record<string, any> | undefined;
1771
1823
 
1772
- type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
1824
+ declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
1773
1825
  id: string;
1774
1826
  };
1775
- type AggregationReducerResult<AggregationResultType extends any = any> = AggregationResultType;
1827
+ declare type AggregationReducerResult<AggregationResultType extends any = any> = AggregationResultType;
1776
1828
  /**
1777
1829
  * InfiniteTableRowInfo can have different object shape depending on the presence or absence of grouping.
1778
1830
  *
@@ -1781,8 +1833,8 @@ type AggregationReducerResult<AggregationResultType extends any = any> = Aggrega
1781
1833
  * you can use `isGroupRow: boolean` to discriminate between group rows vs normal rows.
1782
1834
  *
1783
1835
  */
1784
- type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
1785
- type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
1836
+ declare type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
1837
+ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
1786
1838
  data: T;
1787
1839
  isGroupRow: false;
1788
1840
  rowActive: boolean;
@@ -1792,7 +1844,7 @@ type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
1792
1844
  rawValue: any;
1793
1845
  rowSelected: boolean | null;
1794
1846
  };
1795
- type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
1847
+ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
1796
1848
  rowActive: boolean;
1797
1849
  data: Partial<T> | null;
1798
1850
  rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
@@ -1802,24 +1854,24 @@ type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
1802
1854
  rawValue: any;
1803
1855
  rowSelected: boolean | null;
1804
1856
  };
1805
- type InfiniteTableRowInfoDataDiscriminator<T> = InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> | InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T>;
1857
+ declare type InfiniteTableRowInfoDataDiscriminator<T> = InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> | InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T>;
1806
1858
  /**
1807
1859
  * This is the base row info for all scenarios - things every
1808
1860
  * rowInfo is guaranteed to have (be it group or normal row, or dataSource with or without grouping)
1809
1861
  *
1810
1862
  */
1811
- type InfiniteTable_RowInfoBase<_T> = {
1863
+ declare type InfiniteTable_RowInfoBase<_T> = {
1812
1864
  id: any;
1813
1865
  value?: any;
1814
1866
  indexInAll: number;
1815
1867
  rowSelected: boolean | null;
1816
1868
  };
1817
- type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
1869
+ declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
1818
1870
  dataSourceHasGrouping: true;
1819
1871
  data: T;
1820
1872
  isGroupRow: false;
1821
1873
  } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
1822
- type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
1874
+ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
1823
1875
  dataSourceHasGrouping: true;
1824
1876
  data: Partial<T> | null;
1825
1877
  isGroupRow: true;
@@ -1897,13 +1949,13 @@ type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
1897
1949
  */
1898
1950
  childrenLoading: boolean;
1899
1951
  } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
1900
- type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
1952
+ declare type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
1901
1953
  dataSourceHasGrouping: false;
1902
1954
  data: T;
1903
1955
  isGroupRow: false;
1904
1956
  selfLoaded: boolean;
1905
1957
  } & InfiniteTable_RowInfoBase<T>;
1906
- type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1958
+ declare type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1907
1959
  indexInGroup: number;
1908
1960
  /**
1909
1961
  * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
@@ -1991,14 +2043,14 @@ type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1991
2043
  */
1992
2044
  selfLoaded: boolean;
1993
2045
  };
1994
- type GroupKeyType<T extends any = any> = T;
1995
- type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
1996
- type PivotGroupValueType<DataType, KeyType> = {
2046
+ declare type GroupKeyType<T extends any = any> = T;
2047
+ declare type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
2048
+ declare type PivotGroupValueType<DataType, KeyType> = {
1997
2049
  reducerResults: PivotReducerResults<KeyType>;
1998
2050
  items: DataType[];
1999
2051
  };
2000
- type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
2001
- type DeepMapGroupValueType<DataType, KeyType> = {
2052
+ declare type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
2053
+ declare type DeepMapGroupValueType<DataType, KeyType> = {
2002
2054
  /**
2003
2055
  * These are leaf items. This array may be empty when there is batched lazy loading
2004
2056
  */
@@ -2012,7 +2064,7 @@ type DeepMapGroupValueType<DataType, KeyType> = {
2012
2064
  reducerResults: Record<string, AggregationReducerResult>;
2013
2065
  pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
2014
2066
  };
2015
- type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
2067
+ declare type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
2016
2068
  column?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<DataType>>> | (({ column, }: {
2017
2069
  column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
2018
2070
  }) => Partial<InfiniteTablePivotColumn<DataType>>);
@@ -2020,13 +2072,13 @@ type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
2020
2072
  columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
2021
2073
  }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnGroup<DataType>>>);
2022
2074
  };
2023
- type GroupParams<DataType, KeyType> = {
2075
+ declare type GroupParams<DataType, KeyType> = {
2024
2076
  groupBy: GroupBy<DataType, KeyType>[];
2025
2077
  defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
2026
2078
  pivot?: PivotBy<DataType, KeyType>[];
2027
2079
  reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
2028
2080
  };
2029
- type DataGroupResult<DataType, KeyType extends any> = {
2081
+ declare type DataGroupResult<DataType, KeyType extends any> = {
2030
2082
  deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
2031
2083
  groupParams: GroupParams<DataType, KeyType>;
2032
2084
  initialData: DataType[];
@@ -2037,61 +2089,61 @@ type DataGroupResult<DataType, KeyType extends any> = {
2037
2089
  declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
2038
2090
  declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
2039
2091
 
2040
- type InfiniteCheckBoxPropChecked = true | false | null;
2041
- type InfiniteCheckBoxProps = {
2092
+ declare type InfiniteCheckBoxPropChecked = true | false | null;
2093
+ declare type InfiniteCheckBoxProps = {
2042
2094
  disabled?: boolean;
2043
2095
  checked?: InfiniteCheckBoxPropChecked;
2044
2096
  defaultChecked?: InfiniteCheckBoxPropChecked;
2045
2097
  onChange?: (checked: InfiniteCheckBoxPropChecked) => void;
2046
2098
  domProps?: React$1.HTMLProps<HTMLElement>;
2047
2099
  };
2048
- declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): JSX.Element;
2100
+ declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): React$1.JSX.Element;
2049
2101
 
2050
- type CoordsWithSize = {
2102
+ declare type CoordsWithSize = {
2051
2103
  width: number;
2052
2104
  height: number;
2053
2105
  left: number;
2054
2106
  top: number;
2055
2107
  };
2056
- type CoordsNoSize = {
2108
+ declare type CoordsNoSize = {
2057
2109
  right: number;
2058
2110
  bottom: number;
2059
2111
  left: number;
2060
2112
  top: number;
2061
2113
  };
2062
- type RectangleCoords = CoordsWithSize | CoordsNoSize;
2114
+ declare type RectangleCoords = CoordsWithSize | CoordsNoSize;
2063
2115
 
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 = {
2116
+ declare type Alignable = RectangleCoords | HTMLElement | DOMRect;
2117
+ declare type AlignPositionEnum = 'TopLeft' | 'TopCenter' | 'TopRight' | 'CenterRight' | 'BottomRight' | 'BottomCenter' | 'BottomLeft' | 'CenterLeft' | 'Center';
2118
+ declare type AlignPositionItem = [AlignPositionEnum, AlignPositionEnum];
2119
+ declare type AlignPositionOptions = {
2068
2120
  alignPosition: AlignPositionItem[];
2069
2121
  constrainTo?: Alignable;
2070
2122
  alignAnchor: Alignable;
2071
2123
  alignTarget: Alignable;
2072
2124
  };
2073
2125
 
2074
- type OverlayParams = {
2126
+ declare type OverlayParams = {
2075
2127
  portalContainer?: ElementContainerGetter | null | false;
2076
2128
  constrainTo?: OverlayShowParams['constrainTo'];
2077
2129
  };
2078
- type ElementContainerGetter = (() => HTMLElement | string | Promise<HTMLElement | string>) | string | HTMLElement | Promise<HTMLElement | string>;
2079
- type AdvancedAlignable = Alignable | ElementContainerGetter;
2130
+ declare type ElementContainerGetter = (() => HTMLElement | string | Promise<HTMLElement | string>) | string | HTMLElement | Promise<HTMLElement | string>;
2131
+ declare type AdvancedAlignable = Alignable | ElementContainerGetter;
2080
2132
  /**
2081
2133
  * If portal container is given, it will create a React portal from that element
2082
2134
  * otherwise it will simply render another node as portal
2083
2135
  *
2084
2136
  * @param portalContainer
2085
2137
  */
2086
- declare function useOverlayPortal(content: ReactNode, portalContainer?: ElementContainerGetter | null | false): string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
2087
- type OverlayShowParams = {
2138
+ declare function useOverlayPortal(content: ReactNode, portalContainer?: ElementContainerGetter | null | false): string | number | boolean | React$1.JSX.Element | React$1.ReactFragment | null | undefined;
2139
+ declare type OverlayShowParams = {
2088
2140
  id?: string | number;
2089
2141
  constrainTo?: AdvancedAlignable | boolean;
2090
2142
  alignPosition: AlignPositionOptions['alignPosition'];
2091
2143
  alignTo: AdvancedAlignable | PointCoords;
2092
2144
  };
2093
2145
  declare function useOverlay(params: OverlayParams): {
2094
- portal: string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
2146
+ portal: string | number | boolean | React$1.JSX.Element | React$1.ReactFragment | null | undefined;
2095
2147
  hideOverlay: (id: string) => void;
2096
2148
  clearAll: () => void;
2097
2149
  rerenderOverlays: () => void;
@@ -2113,9 +2165,9 @@ we don't want to allow the above `y` as a valid declaration
2113
2165
  it breaks some types in the Menu component as well
2114
2166
 
2115
2167
  */
2116
- type RemoveObject<T> = T extends null | undefined ? T : T extends unknown ? keyof T extends never ? never : T : never;
2168
+ declare type RemoveObject<T> = T extends null | undefined ? T : T extends unknown ? keyof T extends never ? never : T : never;
2117
2169
 
2118
- type MenuSetupState = {
2170
+ declare type MenuSetupState = {
2119
2171
  domRef: MutableRefObject<HTMLDivElement | null>;
2120
2172
  keyboardActiveItemKey: string | null;
2121
2173
  activeItemKey: string | null;
@@ -2123,13 +2175,13 @@ type MenuSetupState = {
2123
2175
  focused: boolean;
2124
2176
  destroyed: boolean;
2125
2177
  };
2126
- type MenuDerivedState = {
2178
+ declare type MenuDerivedState = {
2127
2179
  runtimeItems: MenuRuntimeItem[];
2128
2180
  runtimeSelectableItems: MenuRuntimeItemSelectable[];
2129
2181
  columns: MenuColumn[];
2130
2182
  menuId: string;
2131
2183
  };
2132
- type MenuMappedState = {
2184
+ declare type MenuMappedState = {
2133
2185
  parentMenuId: MenuProps['parentMenuId'];
2134
2186
  parentMenuItemKey: MenuProps['parentMenuItemKey'];
2135
2187
  constrainTo: MenuProps['constrainTo'];
@@ -2142,14 +2194,14 @@ type MenuMappedState = {
2142
2194
  };
2143
2195
  interface MenuState extends MenuMappedState, MenuDerivedState, MenuSetupState {
2144
2196
  }
2145
- type MenuApi = {
2197
+ declare type MenuApi = {
2146
2198
  focus: VoidFunction;
2147
2199
  getMenuId: () => string;
2148
2200
  getParentMenuId: () => string | undefined;
2149
2201
  };
2150
2202
 
2151
- type MenuRenderable = string | number | RemoveObject<Renderable>;
2152
- type MenuRuntimeItemSelectable = {
2203
+ declare type MenuRenderable = string | number | RemoveObject<Renderable>;
2204
+ declare type MenuRuntimeItemSelectable = {
2153
2205
  type: 'item';
2154
2206
  key: string;
2155
2207
  parentMenuId: string;
@@ -2163,18 +2215,18 @@ type MenuRuntimeItemSelectable = {
2163
2215
  menu: MenuProps | (() => MenuProps) | null;
2164
2216
  originalMenuItem: MenuItemObject;
2165
2217
  };
2166
- type MenuRuntimeItem = MenuRuntimeItemSelectable | {
2218
+ declare type MenuRuntimeItem = MenuRuntimeItemSelectable | {
2167
2219
  type: 'decoration';
2168
2220
  value: MenuDecoration;
2169
2221
  style: CSSProperties;
2170
2222
  span: number;
2171
2223
  };
2172
- type MenuChildrenFnParam = {
2224
+ declare type MenuChildrenFnParam = {
2173
2225
  item: MenuRuntimeItem;
2174
2226
  column: MenuColumn;
2175
2227
  columns: MenuColumn[];
2176
2228
  };
2177
- type MenuProps = {
2229
+ declare type MenuProps = {
2178
2230
  id?: string;
2179
2231
  portalContainer?: ElementContainerGetter | false | null;
2180
2232
  items?: MenuItemDefinition[];
@@ -2192,12 +2244,12 @@ type MenuProps = {
2192
2244
  parentMenuItemKey?: string;
2193
2245
  autoFocus?: boolean;
2194
2246
  };
2195
- type MenuSeparator = '-';
2196
- type MenuItemDefinition = MenuItemObject | MenuDecoration | MenuSeparator;
2197
- type MenuItemSubMenu = Omit<MenuProps, 'children' | 'items'> & {
2247
+ declare type MenuSeparator = '-';
2248
+ declare type MenuItemDefinition = MenuItemObject | MenuDecoration | MenuSeparator;
2249
+ declare type MenuItemSubMenu = Omit<MenuProps, 'children' | 'items'> & {
2198
2250
  items: (MenuItemObject | MenuSeparator)[];
2199
2251
  };
2200
- type MenuItemObject = {
2252
+ declare type MenuItemObject = {
2201
2253
  key: string;
2202
2254
  label: NonUndefined<MenuRenderable>;
2203
2255
  span?: number;
@@ -2210,8 +2262,8 @@ type MenuItemObject = {
2210
2262
  onAction?: (key: string, item: MenuItemObject) => void;
2211
2263
  [k: string]: any;
2212
2264
  };
2213
- type MenuDecoration = MenuRenderable;
2214
- type MenuColumn = {
2265
+ declare type MenuDecoration = MenuRenderable;
2266
+ declare type MenuColumn = {
2215
2267
  flex?: number;
2216
2268
  width?: string | number;
2217
2269
  style?: CSSProperties;
@@ -2219,34 +2271,34 @@ type MenuColumn = {
2219
2271
  field?: string;
2220
2272
  render?: (param: MenuColumnRenderParam) => MenuRenderable;
2221
2273
  };
2222
- type MenuColumnRenderParam = {
2274
+ declare type MenuColumnRenderParam = {
2223
2275
  item: MenuItemObject;
2224
2276
  column: MenuColumn;
2225
2277
  value: MenuRenderable;
2226
2278
  domProps: HTMLProps<HTMLDivElement>;
2227
2279
  };
2228
2280
 
2229
- type LoadMaskProps = {
2281
+ declare type LoadMaskProps = {
2230
2282
  visible: boolean;
2231
2283
  children: Renderable;
2232
2284
  };
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> = {
2285
+ declare type InfiniteTablePropColumnOrderNormalized = string[];
2286
+ declare type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
2287
+ declare type InfiniteTablePropColumnVisibility = Record<string, false>;
2288
+ declare type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
2289
+ declare type InfiniteTablePropColumnPinning = Record<string, true | 'start' | 'end'>;
2290
+ declare type InfiniteTableRowStyleFnParams<T> = {
2239
2291
  rowIndex: number;
2240
2292
  } & 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'> & {
2293
+ declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
2294
+ declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
2295
+ declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
2296
+ declare type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
2297
+ declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
2246
2298
  getter?: AggregationReducer<T, AggregationResultType>['getter'];
2247
2299
  field?: keyof T;
2248
2300
  };
2249
- type InfiniteTableColumnType<T> = {
2301
+ declare type InfiniteTableColumnType<T> = {
2250
2302
  minWidth?: number;
2251
2303
  maxWidth?: number;
2252
2304
  filterType?: string;
@@ -2286,15 +2338,20 @@ type InfiniteTableColumnType<T> = {
2286
2338
  headerStyle?: InfiniteTableColumn<T>['headerStyle'];
2287
2339
  headerClassName?: InfiniteTableColumn<T>['headerClassName'];
2288
2340
  };
2289
- type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
2290
- type InfiniteTableColumnSizingOptions = {
2341
+ declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
2342
+ declare type InfiniteTableColumnSizingOptions = {
2291
2343
  flex?: number;
2292
2344
  width?: number;
2293
2345
  minWidth?: number;
2294
2346
  maxWidth?: number;
2295
2347
  };
2296
- type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
2297
- type InfiniteTableColumnApi<_T> = {
2348
+ declare type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
2349
+ declare type ColumnCellValues = {
2350
+ value: any;
2351
+ rawValue: any;
2352
+ formattedValue: any;
2353
+ };
2354
+ declare type InfiniteTableColumnApi<_T> = {
2298
2355
  showContextMenu: (target: EventTarget | HTMLElement) => void;
2299
2356
  toggleContextMenu: (target: EventTarget | HTMLElement) => void;
2300
2357
  hideContextMenu: () => void;
@@ -2306,8 +2363,10 @@ type InfiniteTableColumnApi<_T> = {
2306
2363
  setSort: (sort: SortDir | null) => void;
2307
2364
  setFilter: (value: any) => void;
2308
2365
  clearFilter: (value: any) => void;
2366
+ getCellValuesByPrimaryKey: (id: any) => null | ColumnCellValues;
2367
+ getCellValueByPrimaryKey: (id: any) => any | null;
2309
2368
  };
2310
- type InfiniteTableApiStopEditParams = {
2369
+ declare type InfiniteTableApiStopEditParams = {
2311
2370
  cancel: true;
2312
2371
  reject?: never;
2313
2372
  value?: never;
@@ -2320,11 +2379,15 @@ type InfiniteTableApiStopEditParams = {
2320
2379
  cancel?: never;
2321
2380
  reject?: never;
2322
2381
  };
2323
- type InfiniteTableApiIsCellEditableParams = {
2382
+ declare type InfiniteTableApiIsCellEditableParams = InfiniteTableApiCellLocator;
2383
+ declare type InfiniteTableApiCellLocator = {
2324
2384
  columnId: string;
2385
+ } & XOR<{
2325
2386
  rowIndex: number;
2326
- };
2327
- type InfiniteTableApiStopEditPromiseResolveType = {
2387
+ }, {
2388
+ primaryKey: any;
2389
+ }>;
2390
+ declare type InfiniteTableApiStopEditPromiseResolveType = {
2328
2391
  cancel: true;
2329
2392
  value: null;
2330
2393
  } | {
@@ -2368,6 +2431,7 @@ interface InfiniteTableApi<T> {
2368
2431
  setFilterValueForColumn: (columnId: string, filterValue: DataSourceFilterValueItem<T>) => void;
2369
2432
  setPinningForColumn: (columnId: string, pinning: InfiniteTableColumnPinnedValues) => void;
2370
2433
  setSortingForColumn: (columnId: string, dir: SortDir | null) => void;
2434
+ getColumnApi: (columnId: string) => InfiniteTableColumnApi<T> | null;
2371
2435
  setVisibilityForColumn: (columnId: string, visible: boolean) => void;
2372
2436
  getVisibleColumnsCount: () => number;
2373
2437
  scrollRowIntoView: (rowIndex: number, config?: {
@@ -2382,26 +2446,28 @@ interface InfiniteTableApi<T> {
2382
2446
  scrollAdjustPosition?: ScrollAdjustPosition;
2383
2447
  offset?: number;
2384
2448
  }) => boolean;
2449
+ getCellValues: (cellLocator: InfiniteTableApiCellLocator) => ColumnCellValues | null;
2450
+ getCellValue: (cellLocator: InfiniteTableApiCellLocator) => any | null;
2385
2451
  getState: () => InfiniteTableState<T>;
2386
2452
  getDataSourceState: () => DataSourceState<T>;
2387
2453
  focus: () => void;
2388
2454
  }
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 = {
2455
+ declare type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
2456
+ declare type InfiniteTableColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
2457
+ declare type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = Record<string, ColumnType> | InfiniteTableColumnsMap<T, ColumnType>;
2458
+ declare type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
2459
+ declare type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
2460
+ declare type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
2461
+ declare type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
2462
+ declare type InfiniteTableColumnGroupHeaderRenderParams = {
2397
2463
  columnGroup: InfiniteTableComputedColumnGroup;
2398
2464
  };
2399
- type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
2400
- type InfiniteTableColumnGroup = {
2465
+ declare type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
2466
+ declare type InfiniteTableColumnGroup = {
2401
2467
  columnGroup?: string;
2402
2468
  header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
2403
2469
  };
2404
- type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
2470
+ declare type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
2405
2471
  id: string;
2406
2472
  groupOffset: number;
2407
2473
  computedWidth: number;
@@ -2409,7 +2475,7 @@ type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
2409
2475
  columns: string[];
2410
2476
  depth: number;
2411
2477
  };
2412
- type InfiniteTableGroupColumnGetterOptions<T> = {
2478
+ declare type InfiniteTableGroupColumnGetterOptions<T> = {
2413
2479
  groupIndexForColumn?: number;
2414
2480
  groupByForColumn?: DataSourceGroupBy<T>;
2415
2481
  selectionMode: DataSourcePropSelectionMode;
@@ -2419,23 +2485,23 @@ type InfiniteTableGroupColumnGetterOptions<T> = {
2419
2485
  pivotBy?: DataSourcePivotBy<T>[];
2420
2486
  sortable?: boolean;
2421
2487
  };
2422
- type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
2488
+ declare type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
2423
2489
  column: COL_TYPE;
2424
2490
  groupBy: DataSourcePropGroupBy<T>;
2425
2491
  pivotBy: DataSourcePropPivotBy<T>;
2426
2492
  };
2427
- type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
2428
- type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
2493
+ declare type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
2494
+ declare type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
2429
2495
  renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
2430
2496
  id?: string;
2431
2497
  };
2432
- type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
2498
+ declare type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
2433
2499
  renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
2434
2500
  };
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 = {
2501
+ declare type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
2502
+ declare type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
2503
+ declare type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
2504
+ declare type InfiniteTablePropComponents = {
2439
2505
  LoadMask?: (props: LoadMaskProps & {
2440
2506
  children?: React$1.ReactNode | undefined;
2441
2507
  }) => JSX.Element | null;
@@ -2445,29 +2511,29 @@ type InfiniteTablePropComponents = {
2445
2511
  }) => JSX.Element | null;
2446
2512
  MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
2447
2513
  };
2448
- type ScrollStopInfo = {
2514
+ declare type ScrollStopInfo = {
2449
2515
  scrollTop: number;
2450
2516
  firstVisibleRowIndex: number;
2451
2517
  lastVisibleRowIndex: number;
2452
2518
  };
2453
- type InfiniteTableRowInfoDataDiscriminatorWithColumn<T> = {
2519
+ declare type InfiniteTableRowInfoDataDiscriminatorWithColumn<T> = {
2454
2520
  column: InfiniteTableComputedColumn<T>;
2455
2521
  columnApi: InfiniteTableColumnApi<T>;
2456
2522
  } & InfiniteTableRowInfoDataDiscriminator<T>;
2457
- type InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> = {
2523
+ declare type InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> = {
2458
2524
  api: InfiniteTableApi<T>;
2459
2525
  dataSourceApi: DataSourceApi<T>;
2460
2526
  } & InfiniteTableRowInfoDataDiscriminatorWithColumn<T>;
2461
- type InfiniteTablePropsEditable<T> = InfiniteTableColumnEditableFn<T> | undefined;
2462
- type InfiniteTablePropOnEditAcceptedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
2527
+ declare type InfiniteTablePropsEditable<T> = InfiniteTableColumnEditableFn<T> | undefined;
2528
+ declare type InfiniteTablePropOnEditAcceptedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
2463
2529
  initialValue: any;
2464
2530
  };
2465
- type InfiniteTablePropOnEditCancelledParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
2466
- type InfiniteTablePropOnEditRejectedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
2531
+ declare type InfiniteTablePropOnEditCancelledParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
2532
+ declare type InfiniteTablePropOnEditRejectedParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T> & {
2467
2533
  initialValue: any;
2468
2534
  error: Error;
2469
2535
  };
2470
- type InfiniteTablePropOnEditPersistParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
2536
+ declare type InfiniteTablePropOnEditPersistParams<T> = InfiniteTablePropOnEditAcceptedParams<T>;
2471
2537
  interface InfiniteTableProps<T> {
2472
2538
  columns: InfiniteTablePropColumns<T>;
2473
2539
  pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
@@ -2591,22 +2657,22 @@ interface InfiniteTableProps<T> {
2591
2657
  getColumnMenuItems?: InfiniteTablePropGetColumnMenuItems<T>;
2592
2658
  getFilterOperatorMenuItems?: InfiniteTablePropGetFilterOperatorMenuItems<T>;
2593
2659
  }
2594
- type InfiniteTablePropGetColumnMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
2660
+ declare type InfiniteTablePropGetColumnMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
2595
2661
  column: InfiniteTableComputedColumn<T>;
2596
2662
  columnApi: InfiniteTableColumnApi<T>;
2597
2663
  getComputed: () => InfiniteTableComputedValues<T>;
2598
2664
  } & InfiniteTablePublicContext<T>) => MenuProps['items'];
2599
- type GetContextMenuItemsReturnType = MenuProps['items'] | null | {
2665
+ declare type GetContextMenuItemsReturnType = MenuProps['items'] | null | {
2600
2666
  items: MenuProps['items'];
2601
2667
  columns: MenuColumn[];
2602
2668
  };
2603
- type InfiniteTablePropGetCellContextMenuItems<T> = (info: InfiniteTableRowInfoDataDiscriminatorWithColumn<T> & {
2669
+ declare type InfiniteTablePropGetCellContextMenuItems<T> = (info: InfiniteTableRowInfoDataDiscriminatorWithColumn<T> & {
2604
2670
  event: React$1.MouseEvent;
2605
2671
  }, params: InfiniteTablePublicContext<T>) => GetContextMenuItemsReturnType;
2606
- type InfiniteTablePropGetContextMenuItems<T> = (param: {
2672
+ declare type InfiniteTablePropGetContextMenuItems<T> = (param: {
2607
2673
  event: React$1.MouseEvent;
2608
2674
  } & Partial<InfiniteTableRowInfoDataDiscriminatorWithColumn<T>>, params: InfiniteTablePublicContext<T>) => GetContextMenuItemsReturnType;
2609
- type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
2675
+ declare type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<MenuProps['items'], undefined>, params: {
2610
2676
  column: InfiniteTableComputedColumn<T>;
2611
2677
  filterTypes: DataSourceProps<T>['filterTypes'];
2612
2678
  columnFilterValue: DataSourceFilterValueItem<T> | null;
@@ -2615,45 +2681,45 @@ type InfiniteTablePropGetFilterOperatorMenuItems<T> = (defaultItems: Exclude<Men
2615
2681
  getComputed: () => InfiniteTableComputedValues<T>;
2616
2682
  actions: InfiniteTableActions<T>;
2617
2683
  }) => MenuProps['items'];
2618
- type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
2619
- type InfiniteTablePropKeyboardSelection = boolean;
2620
- type InfiniteTablePropHeaderOptions = {
2684
+ declare type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
2685
+ declare type InfiniteTablePropKeyboardSelection = boolean;
2686
+ declare type InfiniteTablePropHeaderOptions = {
2621
2687
  alwaysReserveSpaceForSortIcon: boolean;
2622
2688
  };
2623
- type InfiniteTablePropAutoSizeColumnsKey = string | number | {
2689
+ declare type InfiniteTablePropAutoSizeColumnsKey = string | number | {
2624
2690
  key: string | number;
2625
2691
  columnsToSkip?: string[];
2626
2692
  columnsToResize?: string[];
2627
2693
  includeHeader?: boolean;
2628
2694
  };
2629
- type Scrollbars = {
2695
+ declare type Scrollbars = {
2630
2696
  vertical: boolean;
2631
2697
  horizontal: boolean;
2632
2698
  };
2633
- type ScrollAdjustPosition = 'start' | 'end' | 'center';
2699
+ declare type ScrollAdjustPosition = 'start' | 'end' | 'center';
2634
2700
 
2635
2701
  declare function debounce(fn: Function, { wait }: {
2636
2702
  wait: number;
2637
2703
  }): (...args: any[]) => void;
2638
2704
 
2639
- declare function Menu(props: MenuProps & HTMLProps<HTMLDivElement>): JSX.Element;
2705
+ declare function Menu(props: MenuProps & HTMLProps<HTMLDivElement>): React$1.JSX.Element;
2640
2706
  declare namespace Menu {
2641
2707
  var defaultProps: MenuProps & {
2642
2708
  __is_infinite_menu_component?: boolean | undefined;
2643
2709
  };
2644
2710
  }
2645
2711
 
2646
- declare function StringFilterEditor<T>(): JSX.Element;
2647
- declare function NumberFilterEditor<T>(): JSX.Element;
2712
+ declare function StringFilterEditor<T>(): React$1.JSX.Element;
2713
+ declare function NumberFilterEditor<T>(): React$1.JSX.Element;
2648
2714
 
2649
- type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = {
2650
- [propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
2715
+ declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
2716
+ [propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
2651
2717
  };
2652
- type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
2718
+ declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
2653
2719
  debugName?: string;
2654
2720
  initSetupState?: () => COMPONENT_SETUP_STATE;
2655
2721
  layoutEffect?: boolean;
2656
- forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
2722
+ forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
2657
2723
  allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
2658
2724
  interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
2659
2725
  mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
@@ -2661,7 +2727,13 @@ type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_S
2661
2727
  name: keyof T_PROPS;
2662
2728
  oldValue: any;
2663
2729
  newValue: any;
2664
- }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
2730
+ }, 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;
2731
+ onPropsChange?: (newPropValues: {
2732
+ [k in keyof T_PROPS]?: {
2733
+ newValue: T_PROPS[k];
2734
+ oldValue: T_PROPS[k];
2735
+ };
2736
+ }, 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
2737
  mapPropsToState?: (params: {
2666
2738
  props: T_PROPS;
2667
2739
  state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
@@ -2684,7 +2756,7 @@ declare function getComponentStateRoot<T_PROPS, COMPONENT_MAPPED_STATE extends o
2684
2756
  }>;
2685
2757
  declare function useComponentState<COMPONENT_STATE>(): ComponentStateContext<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
2686
2758
 
2687
- type InterceptedMapFns<K, V> = {
2759
+ declare type InterceptedMapFns<K, V> = {
2688
2760
  set?: (k: K, v: V) => void;
2689
2761
  beforeClear?: (map: Map<K, V>) => void;
2690
2762
  clear?: () => void;
@@ -2702,9 +2774,9 @@ declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, pre
2702
2774
 
2703
2775
  declare const components: {
2704
2776
  CheckBox: typeof InfiniteCheckBox;
2705
- LoadMask: (props: LoadMaskProps) => JSX.Element;
2777
+ LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
2706
2778
  StringFilterEditor: typeof StringFilterEditor;
2707
2779
  NumberFilterEditor: typeof NumberFilterEditor;
2708
2780
  };
2709
2781
 
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, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, ElementContainerGetter, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, 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 };
2782
+ 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, InfiniteTableColumnValueGetterParams, 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 };