@infinite-table/infinite-react 0.3.0-canary.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -6,32 +6,6 @@ declare function debounce(fn: Function, { wait }: {
6
6
  wait: number;
7
7
  }): (...args: any[]) => void;
8
8
 
9
- declare type Renderable = React$1.ReactNode | JSX.Element;
10
-
11
- declare type SortDir = 1 | -1;
12
- declare type MultisortInfo<T> = {
13
- /**
14
- * The sorting direction
15
- */
16
- dir: SortDir;
17
- /**
18
- * a property whose value to use for sorting on the array items
19
- */
20
- field?: keyof T;
21
- /**
22
- * for now 'string' and 'number' are known types, meaning they have
23
- * sort functions already implemented
24
- */
25
- type?: string;
26
- fn?: (a: any, b: any) => number;
27
- };
28
- declare const multisort: {
29
- <T>(sortInfo: MultisortInfo<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
30
- knownTypes: {
31
- [key: string]: (first: any, second: any) => number;
32
- };
33
- };
34
-
35
9
  declare type VoidFn$1 = () => void;
36
10
  declare type Pair<KeyType, ValueType> = {
37
11
  value?: ValueType;
@@ -47,6 +21,9 @@ declare class DeepMap<KeyType, ValueType> {
47
21
  static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
48
22
  constructor(initial?: [KeyType[], ValueType][]);
49
23
  getValuesStartingWith(keys: KeyType[]): ValueType[];
24
+ getKeysStartingWith(keys: KeyType[]): KeyType[][];
25
+ private getStartingWith;
26
+ getDirectChildrenSizeFor(keys: KeyType[]): number;
50
27
  set(keys: KeyType[] & {
51
28
  length: Omit<number, 0>;
52
29
  }, value: ValueType): this;
@@ -69,60 +46,29 @@ declare class DeepMap<KeyType, ValueType> {
69
46
  private sortedIterator;
70
47
  }
71
48
 
72
- declare class GroupRowsState<KeyType extends any = any> {
73
- private expandedMap?;
74
- private collapsedMap?;
75
- private collapsedAll;
76
- private expandedAll;
77
- private initialState;
78
- constructor(state: DataSourceExpandedAndCollapsedGroupRows<KeyType> | GroupRowsState<KeyType>);
79
- getState(): DataSourceExpandedAndCollapsedGroupRows<KeyType>;
80
- destroy(): void;
81
- private update;
82
- areAllCollapsed(): boolean;
83
- areAllExpanded(): boolean;
84
- collapseAll(): void;
85
- expandAll(): void;
86
- isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
87
- isGroupRowCollapsed(keys: KeyType[]): boolean;
88
- setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
89
- collapseGroupRow(keys: KeyType[]): void;
90
- expandGroupRow(keys: KeyType[]): void;
91
- toggleGroupRow(keys: KeyType[]): void;
92
- }
93
-
94
- interface ScrollPosition {
95
- scrollTop: number;
96
- scrollLeft: number;
97
- }
98
- declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
99
-
100
- interface Size {
101
- width: number;
102
- height: number;
103
- }
104
-
105
- declare type VoidFn = () => void;
106
-
107
- declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
108
- interface SubscriptionCallback<T> {
109
- (node: T): void;
110
- get: () => T | null;
111
- destroy: VoidFn;
112
- onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
113
- }
114
-
115
- declare class ScrollListener {
116
- private scrollPosition;
117
- private onScrollFns;
118
- getScrollPosition: () => ScrollPosition;
119
- onScroll: (fn: OnScrollFn) => () => void;
120
- setScrollPosition: (scrollPosition: ScrollPosition) => void;
121
- private notifyScrollChange;
122
- destroy: () => void;
123
- }
124
-
125
- declare type NonUndefined<T> = T extends undefined ? never : T;
49
+ declare type SortDir = 1 | -1;
50
+ declare type MultisortInfo<T> = {
51
+ /**
52
+ * The sorting direction
53
+ */
54
+ dir: SortDir;
55
+ /**
56
+ * a property whose value to use for sorting on the array items
57
+ */
58
+ field?: keyof T;
59
+ /**
60
+ * for now 'string' and 'number' are known types, meaning they have
61
+ * sort functions already implemented
62
+ */
63
+ type?: string;
64
+ fn?: (a: any, b: any) => number;
65
+ };
66
+ declare const multisort: {
67
+ <T>(sortInfo: MultisortInfo<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
68
+ knownTypes: {
69
+ [key: string]: (first: any, second: any) => number;
70
+ };
71
+ };
126
72
 
127
73
  declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
128
74
  getComponentState: () => T_STATE;
@@ -140,6 +86,23 @@ declare type ComponentInterceptedActions<T_STATE> = {
140
86
  };
141
87
  declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
142
88
 
89
+ declare enum InfiniteTableActionType {
90
+ SET_COLUMN_SIZE = 0,
91
+ SET_SCROLL_POSITION = 1,
92
+ SET_BODY_SIZE = 2,
93
+ SET_COLUMN_ORDER = 3,
94
+ SET_COLUMN_VISIBILITY = 4,
95
+ SET_COLUMN_SHIFTS = 5,
96
+ SET_COLUMN_PINNING = 6,
97
+ SET_COLUMN_AGGREGATIONS = 7,
98
+ SET_DRAGGING_COLUMN_ID = 8
99
+ }
100
+
101
+ declare type InfiniteTableAction = {
102
+ type: InfiniteTableActionType;
103
+ payload?: any;
104
+ };
105
+
143
106
  interface LogFn {
144
107
  (...args: any[]): LogFn;
145
108
  extend: (channelName: string) => LogFn;
@@ -150,6 +113,19 @@ declare class Logger {
150
113
  constructor(channelName: string);
151
114
  }
152
115
 
116
+ interface ScrollPosition {
117
+ scrollTop: number;
118
+ scrollLeft: number;
119
+ }
120
+ declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
121
+
122
+ interface Size {
123
+ width: number;
124
+ height: number;
125
+ }
126
+
127
+ declare type VoidFn = () => void;
128
+
153
129
  declare type FixedPosition = false | 'start' | 'end';
154
130
  declare type SpanFunction = ({ rowIndex, colIndex, }: {
155
131
  rowIndex: number;
@@ -398,6 +374,28 @@ declare class MatrixBrain extends Logger {
398
374
  destroy: () => void;
399
375
  }
400
376
 
377
+ declare type Renderable = React$1.ReactNode | JSX.Element;
378
+
379
+ declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
380
+ interface SubscriptionCallback<T> {
381
+ (node: T, callback?: () => void): void;
382
+ get: () => T | null;
383
+ destroy: VoidFn;
384
+ onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
385
+ }
386
+
387
+ declare class ScrollListener {
388
+ private scrollPosition;
389
+ private onScrollFns;
390
+ getScrollPosition: () => ScrollPosition;
391
+ onScroll: (fn: OnScrollFn) => () => void;
392
+ setScrollPosition: (scrollPosition: ScrollPosition) => void;
393
+ private notifyScrollChange;
394
+ destroy: () => void;
395
+ }
396
+
397
+ declare type NonUndefined<T> = T extends undefined ? never : T;
398
+
401
399
  interface InfiniteTableSetupState<T> {
402
400
  propsCache: Map<keyof InfiniteTableProps<T>, WeakMap<any, any>>;
403
401
  columnsWhenInlineGroupRenderStrategy?: Map<string, InfiniteTableColumn<T>>;
@@ -496,63 +494,10 @@ declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<
496
494
  interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
497
495
  }
498
496
 
499
- declare enum InfiniteTableActionType {
500
- SET_COLUMN_SIZE = 0,
501
- SET_SCROLL_POSITION = 1,
502
- SET_BODY_SIZE = 2,
503
- SET_COLUMN_ORDER = 3,
504
- SET_COLUMN_VISIBILITY = 4,
505
- SET_COLUMN_SHIFTS = 5,
506
- SET_COLUMN_PINNING = 6,
507
- SET_COLUMN_AGGREGATIONS = 7,
508
- SET_DRAGGING_COLUMN_ID = 8
509
- }
510
-
511
- declare type InfiniteTableAction = {
512
- type: InfiniteTableActionType;
513
- payload?: any;
514
- };
515
-
516
- interface InfiniteTableComputedValues<T> {
517
- scrollbars: {
518
- vertical: boolean;
519
- horizontal: boolean;
520
- };
521
- rowspan?: MatrixBrainOptions['rowspan'];
522
- computedPinnedStartOverflow: boolean;
523
- computedPinnedEndOverflow: boolean;
524
- computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
525
- computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
526
- computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
527
- computedVisibleColumns: InfiniteTableComputedColumn<T>[];
528
- computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
529
- computedColumnVisibility: InfiniteTablePropColumnVisibility;
530
- computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
531
- computedPinnedStartColumnsWidth: number;
532
- computedPinnedStartWidth: number;
533
- computedPinnedEndColumnsWidth: number;
534
- computedPinnedEndWidth: number;
535
- computedUnpinnedColumnsWidth: number;
536
- computedUnpinnedOffset: number;
537
- computedPinnedEndOffset: number;
538
- computedRemainingSpace: number;
539
- toggleGroupRow: (groupKeys: any[]) => void;
540
- columnSize: (colIndex: number) => number;
541
- }
542
-
543
- interface InfiniteTableContextValue<T> {
544
- componentState: InfiniteTableState<T>;
545
- componentActions: InfiniteTableActions<T>;
546
- computed: InfiniteTableComputedValues<T>;
547
- getComputed: () => InfiniteTableComputedValues<T>;
548
- getState: () => InfiniteTableState<T>;
549
- }
550
-
551
497
  declare type LoadMaskProps = {
552
498
  visible: boolean;
553
499
  children: Renderable;
554
500
  };
555
-
556
501
  declare type InfiniteTablePropColumnOrderNormalized = string[];
557
502
  declare type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
558
503
  declare type InfiniteTablePropColumnVisibility = Record<string, false>;
@@ -562,14 +507,7 @@ declare type InfiniteTablePropColumnPinningRecord = Record<string, true | 'start
562
507
  declare type InfiniteTablePropColumnPinning = InfiniteTablePropColumnPinningRecord | InfiniteTablePropColumnPinningMap;
563
508
  declare type InfiniteTableRowStyleFnParams<T> = {
564
509
  rowIndex: number;
565
- groupBy?: (keyof T)[];
566
- } & ({
567
- data: T;
568
- rowInfo: InfiniteTableRowInfoNormal<T>;
569
- } | {
570
- data: Partial<T> | null;
571
- rowInfo: InfiniteTableRowInfoGroup<T>;
572
- });
510
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
573
511
  declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
574
512
  declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
575
513
  declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
@@ -755,101 +693,40 @@ declare type Scrollbars = {
755
693
  horizontal: boolean;
756
694
  };
757
695
 
758
- declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
759
- id: string;
760
- };
761
- declare type AggregationReducerResult<AggregationResultType extends any = any> = {
762
- value: AggregationResultType;
763
- id: string;
764
- };
765
- declare type InfiniteTableRowInfoNormalType<DataType> = {
766
- data: DataType;
767
- isGroupRow: false;
768
- };
769
- declare type InfiniteTableRowInfoGroupType<DataType> = {
770
- data: Partial<DataType> | null;
771
- isGroupRow: true;
772
- };
773
- declare type InfiniteTableRowInfoNormal<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoNormalType<T>;
774
- declare type InfiniteTableRowInfoGroup<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoGroupType<T>;
775
- declare type InfiniteTableRowInfo<T> = InfiniteTableRowInfoNormal<T> | InfiniteTableRowInfoGroup<T>;
776
- declare type InfiniteTableRowInfoBase<T> = {
777
- id: any;
778
- value?: any;
779
- groupData?: T[];
780
- collapsed: boolean;
781
- collapsedChildrenCount?: number;
782
- collapsedGroupsCount?: number;
783
- groupNesting?: number;
784
- groupKeys?: any[];
785
- flatRowInfoList?: (InfiniteTableRowInfo<T> | InfiniteTableEnhancedGroupInfo<T>)[];
786
- parents?: InfiniteTableEnhancedGroupInfo<T>[];
787
- indexInParentGroups?: number[];
788
- indexInGroup: number;
789
- indexInAll: number;
790
- groupCount?: number;
791
- groupBy?: (keyof T)[];
792
- rootGroupBy?: (keyof T)[];
793
- pivotValuesMap?: PivotValuesDeepMap<T, any>;
794
- reducerResults?: Record<string, AggregationReducerResult>;
795
- };
796
- declare type InfiniteTableEnhancedGroupInfo<T> = InfiniteTableRowInfo<T> & {
797
- data: Partial<T> | null;
798
- groupData: T[];
799
- flatRowInfoList: (InfiniteTableRowInfo<T> | InfiniteTableEnhancedGroupInfo<T>)[];
800
- value: any;
801
- isGroupRow: true;
802
- collapsedChildrenCount: number;
803
- collapsedGroupsCount: number;
804
- groupNesting: number;
805
- groupKeys?: any[];
806
- groupCount: number;
807
- groupBy: (keyof T)[];
808
- rootGroupBy: (keyof T)[];
809
- pivotValuesMap?: PivotValuesDeepMap<T, any>;
810
- };
811
- declare type GroupKeyType<T extends any = any> = T;
812
- declare type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
813
- declare type PivotGroupValueType<DataType, KeyType> = {
814
- reducerResults: PivotReducerResults<KeyType>;
815
- items: DataType[];
816
- };
817
- declare type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
818
- declare type DeepMapGroupValueType<DataType, KeyType> = {
819
- items: DataType[];
820
- commonData?: Partial<DataType>;
821
- reducerResults: Record<string, AggregationReducerResult>;
822
- pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
823
- };
824
- declare type GroupBy<DataType, KeyType> = {
825
- field: keyof DataType;
826
- toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
827
- column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
828
- };
829
- declare type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
830
- column?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<DataType>>> | (({ column, }: {
831
- column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
832
- }) => Partial<InfiniteTablePivotColumn<DataType>>);
833
- columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
834
- columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
835
- }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnGroup<DataType>>>);
836
- };
837
- declare type GroupParams<DataType, KeyType> = {
838
- groupBy: GroupBy<DataType, KeyType>[];
839
- defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
840
- pivot?: PivotBy<DataType, KeyType>[];
841
- reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
842
- };
843
- declare type DataGroupResult<DataType, KeyType extends any> = {
844
- deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
845
- groupParams: GroupParams<DataType, KeyType>;
846
- initialData: DataType[];
847
- reducerResults?: Record<string, AggregationReducerResult>;
848
- topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
849
- pivot?: PivotBy<DataType, KeyType>[];
850
- };
851
- declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
852
- declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
696
+ interface InfiniteTableComputedValues<T> {
697
+ scrollbars: {
698
+ vertical: boolean;
699
+ horizontal: boolean;
700
+ };
701
+ rowspan?: MatrixBrainOptions['rowspan'];
702
+ computedPinnedStartOverflow: boolean;
703
+ computedPinnedEndOverflow: boolean;
704
+ computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
705
+ computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
706
+ computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
707
+ computedVisibleColumns: InfiniteTableComputedColumn<T>[];
708
+ computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
709
+ computedColumnVisibility: InfiniteTablePropColumnVisibility;
710
+ computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
711
+ computedPinnedStartColumnsWidth: number;
712
+ computedPinnedStartWidth: number;
713
+ computedPinnedEndColumnsWidth: number;
714
+ computedPinnedEndWidth: number;
715
+ computedUnpinnedColumnsWidth: number;
716
+ computedUnpinnedOffset: number;
717
+ computedPinnedEndOffset: number;
718
+ computedRemainingSpace: number;
719
+ toggleGroupRow: (groupKeys: any[]) => void;
720
+ columnSize: (colIndex: number) => number;
721
+ }
722
+
723
+ interface InfiniteTableContextValue<T> {
724
+ componentState: InfiniteTableState<T>;
725
+ componentActions: InfiniteTableActions<T>;
726
+ computed: InfiniteTableComputedValues<T>;
727
+ getComputed: () => InfiniteTableComputedValues<T>;
728
+ getState: () => InfiniteTableState<T>;
729
+ }
853
730
 
854
731
  declare type RenderRange = {
855
732
  renderStartIndex: number;
@@ -861,6 +738,7 @@ interface DataSourceDataParams<T> {
861
738
  sortInfo?: DataSourceSortInfo<T>;
862
739
  groupBy?: DataSourcePropGroupBy<T>;
863
740
  pivotBy?: DataSourcePropPivotBy<T>;
741
+ groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
864
742
  lazyLoadBatchSize?: number;
865
743
  lazyLoadStartIndex?: number;
866
744
  groupKeys?: any[];
@@ -879,15 +757,16 @@ declare type DataSourceGroupBy<T> = GroupBy<T, any>;
879
757
  declare type DataSourcePivotBy<T> = PivotBy<T, any>;
880
758
  declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
881
759
  declare type DataSourceRemoteData<T> = {
882
- data: T[];
760
+ data: T[] | LazyGroupDataItem<T>[];
883
761
  mappings?: DataSourceMappings;
884
762
  cache?: boolean;
763
+ error?: string;
885
764
  totalCount?: number;
886
765
  livePaginationCursor?: DataSourceLivePaginationCursorValue;
887
766
  };
888
767
  declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
889
768
  declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
890
- declare type DataSourceExpandedAndCollapsedGroupRows<KeyType> = {
769
+ declare type DataSourcePropGroupRowsStateObject<KeyType> = {
891
770
  expandedRows: DataSourceGroupRowsList<KeyType>;
892
771
  collapsedRows: DataSourceGroupRowsList<KeyType>;
893
772
  };
@@ -901,7 +780,7 @@ interface DataSourceMappedState<T> {
901
780
  data: DataSourceProps<T>['data'];
902
781
  primaryKey: DataSourceProps<T>['primaryKey'];
903
782
  groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
904
- groupRowsState: NonUndefined<DataSourceProps<T>['groupRowsState']>;
783
+ groupRowsState: GroupRowsState<T>;
905
784
  pivotBy: DataSourceProps<T>['pivotBy'];
906
785
  loading: NonUndefined<DataSourceProps<T>['loading']>;
907
786
  collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
@@ -926,18 +805,26 @@ declare type LazyGroupDataItem<DataType> = {
926
805
  data: Partial<DataType>;
927
806
  keys: any[];
928
807
  aggregations?: Record<string, any>;
808
+ dataset?: DataSourceRemoteData<DataType>;
929
809
  pivot?: {
930
810
  values: Record<string, any>;
931
811
  totals?: Record<string, any>;
932
812
  };
933
813
  };
934
- declare type LazyGroupRowInfo<DataType> = {
935
- items: LazyGroupDataItem<DataType>[];
814
+ declare type LazyRowInfoGroup<DataType> = {
815
+ /**
816
+ * Those are direct children of the current lazy group row
817
+ */
818
+ children: LazyGroupDataItem<DataType>[];
819
+ childrenLoading: boolean;
820
+ childrenAvailable: boolean;
821
+ cache: boolean;
936
822
  totalCount: number;
937
- cache?: boolean;
823
+ error?: string;
938
824
  };
939
- declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyGroupRowInfo<DataType>>;
825
+ declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
940
826
  interface DataSourceSetupState<T> {
827
+ lazyLoadCacheOfLoadedBatches: DeepMap<string, true>;
941
828
  pivotMappings?: DataSourceMappings;
942
829
  propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
943
830
  showSeparatePivotColumnForSingleAggregation: boolean;
@@ -955,7 +842,7 @@ interface DataSourceSetupState<T> {
955
842
  groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
956
843
  pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
957
844
  pivotGrandTotalColumnPosition: InfiniteTablePropPivotGrandTotalColumnPosition;
958
- cursorId: number | Symbol | DataSourceLivePaginationCursorValue;
845
+ cursorId: number | symbol | DataSourceLivePaginationCursorValue;
959
846
  updatedAt: number;
960
847
  reducedAt: number;
961
848
  groupedAt: number;
@@ -986,8 +873,8 @@ declare type DataSourceProps<T> = {
986
873
  groupBy?: DataSourcePropGroupBy<T>;
987
874
  defaultGroupBy?: DataSourcePropGroupBy<T>;
988
875
  onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
989
- groupRowsState?: GroupRowsState;
990
- defaultGroupRowsState?: GroupRowsState;
876
+ groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
877
+ defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
991
878
  onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
992
879
  collapseGroupRowsOnDataFunctionChange?: boolean;
993
880
  sortInfo?: DataSourceSortInfo<T>;
@@ -1031,9 +918,271 @@ interface DataSourceReducer<T> {
1031
918
  (state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
1032
919
  }
1033
920
 
1034
- declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
1035
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
1036
- }[Keys];
921
+ declare class GroupRowsState<KeyType extends any = any> {
922
+ private expandedMap?;
923
+ private collapsedMap?;
924
+ private collapsedAll;
925
+ private expandedAll;
926
+ private initialState;
927
+ constructor(state: DataSourcePropGroupRowsStateObject<KeyType> | GroupRowsState<KeyType>);
928
+ getState(): DataSourcePropGroupRowsStateObject<KeyType>;
929
+ destroy(): void;
930
+ private update;
931
+ areAllCollapsed(): boolean;
932
+ areAllExpanded(): boolean;
933
+ collapseAll(): void;
934
+ expandAll(): void;
935
+ isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
936
+ isGroupRowCollapsed(keys: KeyType[]): boolean;
937
+ setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
938
+ collapseGroupRow(keys: KeyType[]): void;
939
+ expandGroupRow(keys: KeyType[]): void;
940
+ toggleGroupRow(keys: KeyType[]): void;
941
+ }
942
+
943
+ declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
944
+ id: string;
945
+ };
946
+ declare type AggregationReducerResult<AggregationResultType extends any = any> = {
947
+ value: AggregationResultType;
948
+ id: string;
949
+ };
950
+ /**
951
+ * InfiniteTableRowInfo can have different object shape depending on the presence or absence of grouping.
952
+ *
953
+ * You can use `dataSourceHasGrouping: boolean` as a discriminator to determine the shape of the object, to know
954
+ * if the dataSource had grouping or not. Furthermore, for when the dataSource has grouping,
955
+ * you can use `isGroupRow: boolean` to discriminate between group rows vs normal rows.
956
+ *
957
+ */
958
+ declare type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
959
+ declare type InfiniteTableRowInfoDataDiscriminator<T> = {
960
+ data: T;
961
+ isGroupRow: false;
962
+ rowInfo: InfiniteTable_NoGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoNormal<T>;
963
+ } | {
964
+ data: Partial<T> | null;
965
+ rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
966
+ isGroupRow: true;
967
+ };
968
+ /**
969
+ * This is the base row info for all scenarios - things every
970
+ * rowInfo is guaranteed to have (be it group or normal row, or dataSource with or without grouping)
971
+ *
972
+ */
973
+ declare type InfiniteTable_RowInfoBase<_T> = {
974
+ id: any;
975
+ value?: any;
976
+ indexInAll: number;
977
+ };
978
+ declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
979
+ dataSourceHasGrouping: true;
980
+ data: T;
981
+ isGroupRow: false;
982
+ } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
983
+ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
984
+ dataSourceHasGrouping: true;
985
+ data: Partial<T> | null;
986
+ isGroupRow: true;
987
+ /**
988
+ * This array contains all the (uncollapsed, so visible) row infos under this group, at any level of nesting,
989
+ * in the order in which they are visible in the table
990
+ */
991
+ deepRowInfoArray: (InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T>)[];
992
+ error?: string;
993
+ reducerResults?: Record<string, AggregationReducerResult>;
994
+ /**
995
+ * The count of all leaf nodes (normal rows) that are inside this group.
996
+ * This count is the same as the length of the groupData array property.
997
+ */
998
+ groupCount: number;
999
+ /**
1000
+ * The array of all leaf nodes (normal rows) that are inside this group.
1001
+ */
1002
+ groupData: T[];
1003
+ /**
1004
+ * The count of all leaf nodes (normal rows) inside the group that are not being visible
1005
+ * due to collapsing (either the current row is collapsed or any of its children)
1006
+ */
1007
+ collapsedChildrenCount: number;
1008
+ collapsedGroupsCount: number;
1009
+ /**
1010
+ * The count of the direct children of the current group. Direct children can be either normal rows or groups.
1011
+ */
1012
+ directChildrenCount: number;
1013
+ directChildrenLoadedCount: number;
1014
+ /**
1015
+ *
1016
+ * A DeepMap of pivot values.
1017
+ *
1018
+ * For each pivot reducer result, it contains all the items that make up the pivot value.
1019
+ *
1020
+ */
1021
+ pivotValuesMap?: PivotValuesDeepMap<T, any>;
1022
+ /**
1023
+ * For non-lazy grouping, this is always true.
1024
+ * For lazy/batched grouping, this is true if the group has been expanded at least once (and if the remote call has been configured with cache: true),
1025
+ * since if the remote call is not cached, collapsing the row group should lose all the data that was loaded for it, and it's as if it was never loaded, so in that case, childrenAvailable is false.
1026
+ *
1027
+ * NOTE: if this is true, it doesn't mean that all the children have been loaded, it only means that some children have been loaded and are available
1028
+ *
1029
+ * Use directChildrenCount and directChildrenLoadedCount to know if all the children have been loaded or not.
1030
+ */
1031
+ childrenAvailable: boolean;
1032
+ /**
1033
+ * Boolean flag that will be true while lazy loading direct children of the current row group.
1034
+ *
1035
+ * NOTE: with batched loading, if the user is no longer scrolling, after everything
1036
+ * in the viewport has loaded (and thus for example a certain row group had childrenLoading: true)
1037
+ * if no new batches are being loaded, childrenLoading will be false again, even though
1038
+ * the current row group still has children that are not loaded yet.
1039
+ * Use directChildrenLoadedCount and directChildrenCount to know if all the children have been loaded or not.
1040
+ */
1041
+ childrenLoading: boolean;
1042
+ } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
1043
+ declare type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
1044
+ dataSourceHasGrouping: false;
1045
+ data: T;
1046
+ isGroupRow: false;
1047
+ selfLoaded: boolean;
1048
+ } & InfiniteTable_RowInfoBase<T>;
1049
+ declare type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1050
+ indexInGroup: number;
1051
+ /**
1052
+ * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
1053
+ *
1054
+ * For group rows, the group keys will have all the keys starting from the topmost parent
1055
+ * down to the current group row (including the group row).
1056
+ * For normal rows, the group keys will have all the keys starting from the topmost parent
1057
+ * down to the last group row in the hierarchy (the direct parent of the current row).
1058
+ *
1059
+ * Example: People grouped by country and city
1060
+ *
1061
+ * Italy - country - groupKeys: ['Italy']
1062
+ * Rome - city - groupKeys: ['Italy', 'Rome']
1063
+ * Marco - person - groupKeys: ['Italy', 'Rome']
1064
+ * Luca - person - groupKeys: ['Italy', 'Rome']
1065
+ * Giuseppe - person - groupKeys: ['Italy', 'Rome']
1066
+ *
1067
+ */
1068
+ groupKeys: any[];
1069
+ /**
1070
+ * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
1071
+ *
1072
+ * Has the same structure as groupKeys, but it will contain the fields used to group the rows.
1073
+ *
1074
+ * Example: People grouped by country and city
1075
+ *
1076
+ * Italy - country - groupKeys: ['country']
1077
+ * Rome - city - groupKeys: ['country', 'city']
1078
+ * Marco - person - groupKeys: ['country', 'city']
1079
+ * Luca - person - groupKeys: ['country', 'city']
1080
+ * Giuseppe - person - groupKeys: ['country', 'city']
1081
+ */
1082
+ groupBy: (keyof T)[];
1083
+ /**
1084
+ * The groupBy value of the DataSource component, mapped to the groupBy.field
1085
+ */
1086
+ rootGroupBy: (keyof T)[];
1087
+ /**
1088
+ * Available on all rowInfo objects when the datasource is grouped.
1089
+ *
1090
+ * Italy - country - parent mapped to their ids will be: [] // rowInfo.parents.map((p: any) => p.id)
1091
+ * Rome - city - parent mapped to their ids will be: ['Italy']
1092
+ * Marco - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1093
+ * Luca - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1094
+ * Giuseppe - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1095
+ * USA - country - parent mapped to their ids will be: []
1096
+ * LA - city - parent mapped to their ids will be: ['USA']
1097
+ * Bob - person - parent mapped to their ids will be: ['USA','USA,LA']
1098
+ */
1099
+ parents: InfiniteTable_HasGrouping_RowInfoGroup<T>[];
1100
+ /**
1101
+ * Available when the datasource is grouped, this will be set for both group and normal rows.
1102
+ * Italy - country - indexInParentGroups: [0]
1103
+ * Rome - city - indexInParentGroups: [0,0]
1104
+ * Marco - person - indexInParentGroups: [0,0,0]
1105
+ * Luca - person - indexInParentGroups: [0,0,1]
1106
+ * Giuseppe - person - indexInParentGroups: [0,0,2]
1107
+ * USA - country - indexInParentGroups: [1]
1108
+ * LA - city - indexInParentGroups: [1,0]
1109
+ * Bob - person - indexInParentGroups: [1,0,2]
1110
+ */
1111
+ indexInParentGroups: number[];
1112
+ /**
1113
+ * Available on all rowInfo objects when the datasource is grouped.
1114
+ *
1115
+ * For every rowInfo object, it counts the number of leaf/normal rows that the group contains.
1116
+ * For normal rows, the groupCount represents the groupCount of the direct parent.
1117
+ *
1118
+ * Italy - country - groupCount: 3
1119
+ * Rome - city - groupCount: 2
1120
+ * Marco - person - groupCount: 2
1121
+ * Luca - person - groupCount: 2
1122
+ * Napoli - city - groupCount: 1
1123
+ * Giuseppe - person - groupCount: 1
1124
+ * USA - country - groupCount: 1
1125
+ * LA - city - groupCount: 1
1126
+ * Bob - person - groupCount: 1
1127
+ */
1128
+ groupCount: number;
1129
+ groupNesting: number;
1130
+ collapsed: boolean;
1131
+ /**
1132
+ * This is false only when the DataSource is configured with lazy batching and the current
1133
+ * row has not been loaded yet. It has nothing to do with children, only with self.
1134
+ */
1135
+ selfLoaded: boolean;
1136
+ };
1137
+ declare type GroupKeyType<T extends any = any> = T;
1138
+ declare type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
1139
+ declare type PivotGroupValueType<DataType, KeyType> = {
1140
+ reducerResults: PivotReducerResults<KeyType>;
1141
+ items: DataType[];
1142
+ };
1143
+ declare type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
1144
+ declare type DeepMapGroupValueType<DataType, KeyType> = {
1145
+ /**
1146
+ * These are leaf items. This array may be empty when there is batched lazy loading
1147
+ */
1148
+ items: DataType[];
1149
+ commonData?: Partial<DataType>;
1150
+ childrenLoading: boolean;
1151
+ childrenAvailable: boolean;
1152
+ cache: boolean;
1153
+ error?: string;
1154
+ reducerResults: Record<string, AggregationReducerResult>;
1155
+ pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
1156
+ };
1157
+ declare type GroupBy<DataType, KeyType> = {
1158
+ field: keyof DataType;
1159
+ toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
1160
+ column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
1161
+ };
1162
+ declare type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
1163
+ column?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<DataType>>> | (({ column, }: {
1164
+ column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
1165
+ }) => Partial<InfiniteTablePivotColumn<DataType>>);
1166
+ columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
1167
+ columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
1168
+ }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnGroup<DataType>>>);
1169
+ };
1170
+ declare type GroupParams<DataType, KeyType> = {
1171
+ groupBy: GroupBy<DataType, KeyType>[];
1172
+ defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
1173
+ pivot?: PivotBy<DataType, KeyType>[];
1174
+ reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
1175
+ };
1176
+ declare type DataGroupResult<DataType, KeyType extends any> = {
1177
+ deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
1178
+ groupParams: GroupParams<DataType, KeyType>;
1179
+ initialData: DataType[];
1180
+ reducerResults?: Record<string, AggregationReducerResult>;
1181
+ topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
1182
+ pivot?: PivotBy<DataType, KeyType>[];
1183
+ };
1184
+ declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
1185
+ declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
1037
1186
 
1038
1187
  declare type InfiniteTableCellProps<T> = {
1039
1188
  column: InfiniteTableComputedColumn<T>;
@@ -1051,6 +1200,10 @@ declare type InfiniteTableCellProps<T> = {
1051
1200
  cellType: 'body' | 'header';
1052
1201
  };
1053
1202
 
1203
+ declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
1204
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
1205
+ }[Keys];
1206
+
1054
1207
  declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
1055
1208
  declare type InfiniteTableColumnHeaderParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1056
1209
  domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
@@ -1058,7 +1211,7 @@ declare type InfiniteTableColumnHeaderParams<DATA_TYPE, COL_TYPE = InfiniteTable
1058
1211
  column: COL_TYPE;
1059
1212
  columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
1060
1213
  };
1061
- declare type InfiniteTableColumnRenderParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1214
+ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1062
1215
  domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
1063
1216
  value: string | number | Renderable;
1064
1217
  groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
@@ -1068,19 +1221,19 @@ declare type InfiniteTableColumnRenderParams<DATA_TYPE, COL_TYPE = InfiniteTable
1068
1221
  toggleGroupRow: InfiniteTableToggleGroupRowFn;
1069
1222
  groupBy: DataSourceState<DATA_TYPE>['groupBy'];
1070
1223
  pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
1071
- } & ({
1072
- rowInfo: InfiniteTableRowInfoNormal<DATA_TYPE>;
1073
- data: DATA_TYPE;
1074
- } | {
1075
- rowInfo: InfiniteTableRowInfoGroup<DATA_TYPE>;
1224
+ };
1225
+ declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
1226
+ declare type InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & {
1227
+ rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<DATA_TYPE>;
1228
+ isGroupRow: true;
1076
1229
  data: Partial<DATA_TYPE> | null;
1077
- });
1078
- declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParams<DATA_TYPE> & {};
1079
- declare type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParams<DATA_TYPE, COL_TYPE> & {
1230
+ };
1231
+ declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
1232
+ declare type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> & {
1080
1233
  collapsed: boolean;
1081
1234
  groupIcon: Renderable;
1082
1235
  };
1083
- declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParams<DATA_TYPE, COL_TYPE>;
1236
+ declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
1084
1237
  declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1085
1238
  rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
1086
1239
  data: DATA_TYPE | Partial<DATA_TYPE> | null;
@@ -1088,7 +1241,7 @@ declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTable
1088
1241
  rowIndex: number;
1089
1242
  column: COL_TYPE;
1090
1243
  };
1091
- declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = ({ value, rowIndex, column, data, toggleGroupRow, toggleCurrentGroupRow, rowInfo, groupBy, pivotBy, }: InfiniteTableColumnRenderParams<DATA_TYPE, COL_TYPE>) => Renderable | null;
1244
+ declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
1092
1245
  declare type InfiniteTableGroupColumnRenderIconFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (param: InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
1093
1246
  declare type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderParams<T>) => Renderable;
1094
1247
  declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
@@ -1107,24 +1260,12 @@ declare type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> =
1107
1260
  declare type InfiniteTableColumnStyleFnParams<T> = {
1108
1261
  value: Renderable;
1109
1262
  column: InfiniteTableColumn<T>;
1110
- } & ({
1111
- data: T;
1112
- rowInfo: InfiniteTableRowInfoNormal<T>;
1113
- } | {
1114
- data: Partial<T> | null;
1115
- rowInfo: InfiniteTableRowInfoGroup<T>;
1116
- });
1263
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
1117
1264
  declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
1118
1265
  declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
1119
1266
  declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
1120
1267
  declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
1121
- declare type InfiniteTableColumnValueGetterParams<T> = {
1122
- data: T;
1123
- rowInfo: InfiniteTableRowInfoNormal<T>;
1124
- } | {
1125
- data: Partial<T> | null;
1126
- rowInfo: InfiniteTableRowInfoGroup<T>;
1127
- };
1268
+ declare type InfiniteTableColumnValueGetterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
1128
1269
  declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
1129
1270
  declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
1130
1271
  declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
@@ -1284,4 +1425,4 @@ declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>
1284
1425
 
1285
1426
  declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
1286
1427
 
1287
- export { ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceExpandedAndCollapsedGroupRows, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropGroupBy, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParams as InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableGroupColumnRenderIconFunction, InfiniteTableImperativeApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyGroupRowInfo, Scrollbars, debounce, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };
1428
+ export { ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableGroupColumnRenderIconFunction, InfiniteTableImperativeApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Scrollbars, debounce, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };