@infinite-table/infinite-react 1.2.2 → 1.2.4

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