@infinite-table/infinite-react 0.3.0 → 0.3.3

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.
Files changed (6) hide show
  1. package/index.css +76 -50
  2. package/index.d.ts +543 -410
  3. package/index.esm.css +76 -50
  4. package/index.esm.js +1093 -598
  5. package/index.js +1153 -665
  6. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -46,45 +46,34 @@ declare class DeepMap<KeyType, ValueType> {
46
46
  private sortedIterator;
47
47
  }
48
48
 
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
- };
49
+ declare class GroupRowsState<KeyType extends any = any> {
50
+ private expandedMap?;
51
+ private collapsedMap?;
52
+ private collapsedAll;
53
+ private expandedAll;
54
+ private initialState;
55
+ constructor(state: DataSourcePropGroupRowsStateObject<KeyType> | GroupRowsState<KeyType>);
56
+ getState(): DataSourcePropGroupRowsStateObject<KeyType>;
57
+ destroy(): void;
58
+ private update;
59
+ areAllCollapsed(): boolean;
60
+ areAllExpanded(): boolean;
61
+ collapseAll(): void;
62
+ expandAll(): void;
63
+ isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
64
+ isGroupRowCollapsed(keys: KeyType[]): boolean;
65
+ setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
66
+ collapseGroupRow(keys: KeyType[]): void;
67
+ expandGroupRow(keys: KeyType[]): void;
68
+ toggleGroupRow(keys: KeyType[]): void;
69
+ }
72
70
 
73
- declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
74
- getComponentState: () => T_STATE;
75
- componentState: T_STATE;
76
- componentActions: T_ACTIONS;
77
- };
78
- declare type ComponentStateGeneratedActions<T_STATE> = {
79
- [k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
80
- };
81
- declare type ComponentInterceptedActions<T_STATE> = {
82
- [k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
83
- actions: ComponentStateGeneratedActions<T_STATE>;
84
- state: T_STATE;
85
- }) => void | boolean;
86
- };
87
- declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
71
+ declare type Renderable = React$1.ReactNode | JSX.Element;
72
+
73
+ interface Size {
74
+ width: number;
75
+ height: number;
76
+ }
88
77
 
89
78
  declare enum InfiniteTableActionType {
90
79
  SET_COLUMN_SIZE = 0,
@@ -119,11 +108,6 @@ interface ScrollPosition {
119
108
  }
120
109
  declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
121
110
 
122
- interface Size {
123
- width: number;
124
- height: number;
125
- }
126
-
127
111
  declare type VoidFn = () => void;
128
112
 
129
113
  declare type FixedPosition = false | 'start' | 'end';
@@ -374,7 +358,23 @@ declare class MatrixBrain extends Logger {
374
358
  destroy: () => void;
375
359
  }
376
360
 
377
- declare type Renderable = React$1.ReactNode | JSX.Element;
361
+ declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
362
+ getComponentState: () => T_STATE;
363
+ componentState: T_STATE;
364
+ componentActions: T_ACTIONS;
365
+ };
366
+ declare type ComponentStateGeneratedActions<T_STATE> = {
367
+ [k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
368
+ };
369
+ declare type ComponentInterceptedActions<T_STATE> = {
370
+ [k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
371
+ actions: ComponentStateGeneratedActions<T_STATE>;
372
+ state: T_STATE;
373
+ }) => void | boolean;
374
+ };
375
+ declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
376
+
377
+ declare type NonUndefined<T> = T extends undefined ? never : T;
378
378
 
379
379
  declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
380
380
  interface SubscriptionCallback<T> {
@@ -394,8 +394,6 @@ declare class ScrollListener {
394
394
  destroy: () => void;
395
395
  }
396
396
 
397
- declare type NonUndefined<T> = T extends undefined ? never : T;
398
-
399
397
  interface InfiniteTableSetupState<T> {
400
398
  propsCache: Map<keyof InfiniteTableProps<T>, WeakMap<any, any>>;
401
399
  columnsWhenInlineGroupRenderStrategy?: Map<string, InfiniteTableColumn<T>>;
@@ -403,7 +401,7 @@ interface InfiniteTableSetupState<T> {
403
401
  scrollerDOMRef: MutableRefObject<HTMLDivElement | null>;
404
402
  portalDOMRef: MutableRefObject<HTMLDivElement | null>;
405
403
  onRowHeightCSSVarChange: SubscriptionCallback<number>;
406
- onHeaderHeightCSSVarChange: SubscriptionCallback<number>;
404
+ onColumnHeaderHeightCSSVarChange: SubscriptionCallback<number>;
407
405
  columnsWhenGrouping?: InfiniteTablePropColumnsMap<T>;
408
406
  bodySize: Size;
409
407
  brain: MatrixBrain;
@@ -424,6 +422,7 @@ interface InfiniteTableMappedState<T> {
424
422
  scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
425
423
  viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
426
424
  groupColumn: InfiniteTableProps<T>['groupColumn'];
425
+ headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
427
426
  onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
428
427
  loadingText: InfiniteTableProps<T>['loadingText'];
429
428
  components: InfiniteTableProps<T>['components'];
@@ -440,6 +439,7 @@ interface InfiniteTableMappedState<T> {
440
439
  onScrollToBottom: InfiniteTableProps<T>['onScrollToBottom'];
441
440
  onScrollStop: InfiniteTableProps<T>['onScrollStop'];
442
441
  scrollToBottomOffset: InfiniteTableProps<T>['scrollToBottomOffset'];
442
+ filterEditors: NonUndefined<InfiniteTableProps<T>['filterEditors']>;
443
443
  focusedClassName: InfiniteTableProps<T>['focusedClassName'];
444
444
  focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
445
445
  focusedStyle: InfiniteTableProps<T>['focusedStyle'];
@@ -467,7 +467,7 @@ interface InfiniteTableMappedState<T> {
467
467
  header: NonUndefined<InfiniteTableProps<T>['header']>;
468
468
  virtualizeColumns: NonUndefined<InfiniteTableProps<T>['virtualizeColumns']>;
469
469
  rowHeight: number;
470
- headerHeight: number;
470
+ columnHeaderHeight: number;
471
471
  licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
472
472
  columnVisibility: InfiniteTablePropColumnVisibility;
473
473
  columnPinning: InfiniteTablePropColumnPinningMap;
@@ -487,7 +487,7 @@ interface InfiniteTableDerivedState<T> {
487
487
  columnGroupsMaxDepth: number;
488
488
  computedColumnGroups: InfiniteTablePropColumnGroupsMap;
489
489
  rowHeightCSSVar: string;
490
- headerHeightCSSVar: string;
490
+ columnHeaderHeightCSSVar: string;
491
491
  controlledColumnVisibility: boolean;
492
492
  }
493
493
  declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
@@ -507,7 +507,6 @@ declare type InfiniteTablePropColumnPinningRecord = Record<string, true | 'start
507
507
  declare type InfiniteTablePropColumnPinning = InfiniteTablePropColumnPinningRecord | InfiniteTablePropColumnPinningMap;
508
508
  declare type InfiniteTableRowStyleFnParams<T> = {
509
509
  rowIndex: number;
510
- groupBy?: (keyof T)[];
511
510
  } & InfiniteTableRowInfoDataDiscriminator<T>;
512
511
  declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
513
512
  declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
@@ -520,9 +519,13 @@ declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<Aggr
520
519
  declare type InfiniteTableColumnType<T> = {
521
520
  minWidth?: number;
522
521
  maxWidth?: number;
522
+ filterType?: string;
523
+ sortType?: string;
524
+ dataType?: InfiniteTableDataTypeNames;
523
525
  defaultWidth?: number;
524
526
  defaultFlex?: number;
525
527
  defaultPinned?: InfiniteTableColumnPinnedValues;
528
+ defaultFilterable?: boolean;
526
529
  defaultHiddenWhenGroupedBy?: InfiniteTableColumn<T>['defaultHiddenWhenGroupedBy'];
527
530
  header?: InfiniteTableColumn<T>['header'];
528
531
  comparer?: InfiniteTableColumn<T>['comparer'];
@@ -537,6 +540,7 @@ declare type InfiniteTableColumnType<T> = {
537
540
  renderValue?: InfiniteTableColumn<T>['renderValue'];
538
541
  render?: InfiniteTableColumn<T>['render'];
539
542
  valueGetter?: InfiniteTableColumn<T>['valueGetter'];
543
+ valueFormatter?: InfiniteTableColumn<T>['valueFormatter'];
540
544
  style?: InfiniteTableColumn<T>['style'];
541
545
  };
542
546
  declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
@@ -610,6 +614,15 @@ declare type ScrollStopInfo = {
610
614
  firstVisibleRowIndex: number;
611
615
  lastVisibleRowIndex: number;
612
616
  };
617
+ declare type InfiniteTablePropFilterEditors<T> = Record<string, React$1.FC<InfiniteTableFilterEditorProps<T>>>;
618
+ declare type InfiniteTableFilterEditorProps<T extends any> = {
619
+ filterType: string;
620
+ operator: string;
621
+ ariaLabel: string;
622
+ filterValue: T;
623
+ className: string;
624
+ onChange: (value: T | undefined) => void;
625
+ };
613
626
  interface InfiniteTableProps<T> {
614
627
  columns: InfiniteTablePropColumns<T>;
615
628
  pivotColumns?: InfiniteTablePropColumnsMap<T, InfiniteTablePivotColumn<T>>;
@@ -643,13 +656,14 @@ interface InfiniteTableProps<T> {
643
656
  rowHeight: number | string;
644
657
  rowStyle?: InfiniteTablePropRowStyle<T>;
645
658
  rowClassName?: InfiniteTablePropRowClassName<T>;
646
- headerHeight: number | string;
659
+ columnHeaderHeight: number | string;
647
660
  domProps?: React$1.HTMLProps<HTMLDivElement>;
648
661
  showZebraRows?: boolean;
649
662
  showHoverRows?: boolean;
650
663
  sortable?: boolean;
651
664
  draggableColumns?: boolean;
652
665
  header?: boolean;
666
+ headerOptions?: InfiniteTablePropHeaderOptions;
653
667
  focusedClassName?: string;
654
668
  focusedWithinClassName?: string;
655
669
  focusedStyle?: React$1.CSSProperties;
@@ -677,12 +691,16 @@ interface InfiniteTableProps<T> {
677
691
  columnOrder?: InfiniteTablePropColumnOrder;
678
692
  onColumnOrderChange?: (columnOrder: InfiniteTablePropColumnOrder) => void;
679
693
  onRowHeightChange?: (rowHeight: number) => void;
694
+ filterEditors?: InfiniteTablePropFilterEditors<T>;
680
695
  onReady?: (api: InfiniteTableImperativeApi<T>) => void;
681
696
  rowProps?: React$1.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React$1.HTMLProps<HTMLDivElement>);
682
697
  licenseKey?: string;
683
698
  scrollTopKey?: string | number;
684
699
  autoSizeColumnsKey?: InfiniteTablePropAutoSizeColumnsKey;
685
700
  }
701
+ declare type InfiniteTablePropHeaderOptions = {
702
+ alwaysReserveSpaceForSortIcon: boolean;
703
+ };
686
704
  declare type InfiniteTablePropAutoSizeColumnsKey = string | number | {
687
705
  key: string | number;
688
706
  columnsToSkip?: string[];
@@ -699,6 +717,7 @@ interface InfiniteTableComputedValues<T> {
699
717
  vertical: boolean;
700
718
  horizontal: boolean;
701
719
  };
720
+ showColumnFilters: boolean;
702
721
  rowspan?: MatrixBrainOptions['rowspan'];
703
722
  computedPinnedStartOverflow: boolean;
704
723
  computedPinnedEndOverflow: boolean;
@@ -729,216 +748,207 @@ interface InfiniteTableContextValue<T> {
729
748
  getState: () => InfiniteTableState<T>;
730
749
  }
731
750
 
732
- declare type RenderRange = {
733
- renderStartIndex: number;
734
- renderEndIndex: number;
751
+ declare type InfiniteTableBaseCellProps<T> = {
752
+ column: InfiniteTableComputedColumn<T>;
753
+ renderChildren: () => Renderable;
754
+ width: number;
755
+ cssEllipsis?: boolean;
756
+ contentStyle?: CSSProperties;
757
+ contentClassName?: string;
758
+ virtualized?: boolean;
759
+ skipColumnShifting?: boolean;
760
+ beforeChildren?: Renderable;
761
+ afterChildren?: Renderable;
762
+ offset?: number;
763
+ offsetProperty?: 'left' | 'right';
764
+ cssPosition?: CSSProperties['position'];
765
+ domRef?: React.RefCallback<HTMLElement>;
735
766
  };
767
+ declare type InfiniteTableCellProps<T> = ({
768
+ cellType: 'header';
769
+ } & InfiniteTableBaseCellProps<T>) | ({
770
+ cellType: 'body';
771
+ } & InfiniteTableBaseCellProps<T>);
736
772
 
737
- interface DataSourceDataParams<T> {
738
- originalDataArray: T[];
739
- sortInfo?: DataSourceSortInfo<T>;
740
- groupBy?: DataSourcePropGroupBy<T>;
741
- pivotBy?: DataSourcePropPivotBy<T>;
742
- groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
743
- lazyLoadBatchSize?: number;
744
- lazyLoadStartIndex?: number;
745
- groupKeys?: any[];
746
- append?: boolean;
747
- aggregationReducers?: DataSourcePropAggregationReducers<T>;
748
- livePaginationCursor?: DataSourceLivePaginationCursorValue;
749
- __cursorId?: DataSourceSetupState<T>['cursorId'];
750
- changes?: DataSourceDataParamsChanges<T>;
751
- }
752
- declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
753
- declare type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
754
- field?: keyof T;
755
- id?: string;
756
- };
757
- declare type DataSourceGroupBy<T> = GroupBy<T, any>;
758
- declare type DataSourcePivotBy<T> = PivotBy<T, any>;
759
- declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
760
- declare type DataSourceRemoteData<T> = {
761
- data: T[] | LazyGroupDataItem<T>[];
762
- mappings?: DataSourceMappings;
763
- cache?: boolean;
764
- totalCount?: number;
765
- livePaginationCursor?: DataSourceLivePaginationCursorValue;
773
+ declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
774
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
775
+ }[Keys];
776
+ declare type DiscriminatedUnion<A, B> = (A & {
777
+ [K in keyof B]?: undefined;
778
+ }) | (B & {
779
+ [K in keyof A]?: undefined;
780
+ });
781
+
782
+ declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
783
+ declare type InfiniteTableColumnHeaderParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
784
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
785
+ sortTool: JSX.Element | null;
786
+ column: COL_TYPE;
787
+ columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
788
+ columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
766
789
  };
767
- declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
768
- declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
769
- declare type DataSourcePropGroupRowsStateObject<KeyType> = {
770
- expandedRows: DataSourceGroupRowsList<KeyType>;
771
- collapsedRows: DataSourceGroupRowsList<KeyType>;
790
+ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
791
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
792
+ value: string | number | Renderable;
793
+ groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
794
+ rowIndex: number;
795
+ column: COL_TYPE;
796
+ toggleCurrentGroupRow: () => void;
797
+ toggleGroupRow: InfiniteTableToggleGroupRowFn;
798
+ groupBy: DataSourceState<DATA_TYPE>['groupBy'];
799
+ pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
772
800
  };
773
- declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
774
- declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
775
- interface DataSourceMappedState<T> {
776
- aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
777
- livePagination: DataSourceProps<T>['livePagination'];
778
- lazyLoad: DataSourceProps<T>['lazyLoad'];
779
- onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
780
- data: DataSourceProps<T>['data'];
781
- primaryKey: DataSourceProps<T>['primaryKey'];
782
- groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
783
- groupRowsState: GroupRowsState<T>;
784
- pivotBy: DataSourceProps<T>['pivotBy'];
785
- loading: NonUndefined<DataSourceProps<T>['loading']>;
786
- collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
787
- sortInfo: DataSourceSingleSortInfo<T>[] | null;
788
- }
789
- declare type DataSourceAggregationReducer<T, AggregationResultType> = {
790
- name?: string;
791
- field?: keyof T;
792
- initialValue?: AggregationResultType;
793
- getter?: (data: T) => any;
794
- reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
795
- done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
796
- pivotColumn?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<T>>> | (({ column, }: {
797
- column: InfiniteTablePivotFinalColumnVariant<T>;
798
- }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
801
+ declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
802
+ declare type InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & {
803
+ rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<DATA_TYPE>;
804
+ isGroupRow: true;
805
+ data: Partial<DATA_TYPE> | null;
799
806
  };
800
- declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
801
- inheritFromColumn?: string | boolean;
807
+ declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
808
+ declare type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> & {
809
+ collapsed: boolean;
810
+ groupIcon: Renderable;
802
811
  };
803
- declare type DataSourceMappings = Record<'totals' | 'values', string>;
804
- declare type LazyGroupDataItem<DataType> = {
805
- data: Partial<DataType>;
806
- keys: any[];
807
- aggregations?: Record<string, any>;
808
- dataset?: DataSourceRemoteData<DataType>;
809
- pivot?: {
810
- values: Record<string, any>;
811
- totals?: Record<string, any>;
812
- };
812
+ declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
813
+ declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
814
+ rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
815
+ data: DATA_TYPE | Partial<DATA_TYPE> | null;
816
+ dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
817
+ rowIndex: number;
818
+ column: COL_TYPE;
813
819
  };
814
- declare type LazyRowInfoGroup<DataType> = {
820
+ declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
821
+ declare type InfiniteTableGroupColumnRenderIconFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (param: InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
822
+ declare type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderParams<T>) => Renderable;
823
+ declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
824
+ declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
825
+ declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
826
+ declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
827
+ declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
828
+ declare type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
815
829
  /**
816
- * Those are direct children of the current lazy group row
830
+ * Determines the field property of the column.
817
831
  */
818
- children: LazyGroupDataItem<DataType>[];
819
- childrenLoading: boolean;
820
- childrenAvailable: boolean;
821
- cache: boolean;
822
- totalCount: number;
823
- error?: string;
832
+ field?: keyof T;
833
+ render?: InfiniteTableColumnRenderFunction<T>;
834
+ renderValue?: InfiniteTableColumnRenderFunction<T>;
835
+ valueGetter?: InfiniteTableColumnValueGetter<T>;
836
+ valueFormatter?: InfiniteTableColumnValueFormatter<T>;
837
+ }, 'render' | 'renderValue' | 'field' | 'valueGetter' | 'valueFormatter'>;
838
+ declare type InfiniteTableColumnStyleFnParams<T> = {
839
+ value: Renderable;
840
+ column: InfiniteTableColumn<T>;
841
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
842
+ declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
843
+ declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
844
+ declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
845
+ declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
846
+ declare type InfiniteTableColumnValueGetterParams<T> = {
847
+ data: T;
848
+ field?: keyof T;
824
849
  };
825
- declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
826
- interface DataSourceSetupState<T> {
827
- lazyLoadCacheOfLoadedBatches: DeepMap<string, true>;
828
- pivotMappings?: DataSourceMappings;
829
- propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
830
- showSeparatePivotColumnForSingleAggregation: boolean;
831
- dataParams?: DataSourceDataParams<T>;
832
- originalLazyGroupData: LazyGroupDataDeepMap<T>;
833
- originalLazyGroupDataChangeDetect: number | string;
834
- scrollStopDelayUpdatedByTable: number;
835
- notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
836
- notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
837
- notifyRenderRangeChange: SubscriptionCallback<RenderRange>;
838
- originalDataArray: T[];
839
- lastSortDataArray?: T[];
840
- lastGroupDataArray?: InfiniteTableRowInfo<T>[];
841
- dataArray: InfiniteTableRowInfo<T>[];
842
- groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
843
- pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
844
- pivotGrandTotalColumnPosition: InfiniteTablePropPivotGrandTotalColumnPosition;
845
- cursorId: number | symbol | DataSourceLivePaginationCursorValue;
846
- updatedAt: number;
847
- reducedAt: number;
848
- groupedAt: number;
849
- sortedAt: number;
850
- generateGroupRows: boolean;
851
- postSortDataArray?: T[];
852
- postGroupDataArray?: InfiniteTableRowInfo<T>[];
853
- pivotColumns?: Map<string, InfiniteTableColumn<T>>;
854
- pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
855
- }
856
- declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
857
- declare type DataSourceProps<T> = {
858
- children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
859
- primaryKey: keyof T;
860
- fields?: (keyof T)[];
861
- data: DataSourceData<T>;
862
- lazyLoad?: boolean | {
863
- batchSize?: number;
850
+ declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
851
+ declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
852
+ declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
853
+ declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
854
+ declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
855
+ declare type InfiniteTableBaseColumn<T> = {
856
+ sortable?: boolean;
857
+ draggable?: boolean;
858
+ resizable?: boolean;
859
+ comparer?: InfiniteTableColumnComparer<T>;
860
+ defaultHiddenWhenGroupedBy?: '*' | keyof T | {
861
+ [k in keyof Partial<T>]: true;
862
+ };
863
+ align?: InfiniteTableColumnAlign;
864
+ verticalAlign?: InfiniteTableColumnVerticalAlign;
865
+ columnGroup?: string;
866
+ header?: InfiniteTableColumnHeader<T>;
867
+ name?: Renderable;
868
+ cssEllipsis?: boolean;
869
+ headerCssEllipsis?: boolean;
870
+ type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
871
+ dataType?: InfiniteTableDataTypeNames;
872
+ sortType?: string;
873
+ filterType?: string;
874
+ style?: InfiniteTableColumnStyle<T>;
875
+ className?: InfiniteTableColumnClassName<T>;
876
+ rowspan?: InfiniteTableColumnRowspanFn<T>;
877
+ valueGetter?: InfiniteTableColumnValueGetter<T>;
878
+ valueFormatter?: InfiniteTableColumnValueFormatter<T>;
879
+ defaultWidth?: number;
880
+ defaultFlex?: number;
881
+ defaultFilterable?: boolean;
882
+ minWidth?: number;
883
+ maxWidth?: number;
884
+ components?: {
885
+ ColumnCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
886
+ HeaderCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
864
887
  };
865
- loading?: boolean;
866
- defaultLoading?: boolean;
867
- onLoadingChange?: (loading: boolean) => void;
868
- pivotBy?: DataSourcePropPivotBy<T>;
869
- defaultPivotBy?: DataSourcePropPivotBy<T>;
870
- onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
871
- aggregationReducers?: DataSourcePropAggregationReducers<T>;
872
- defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
873
- groupBy?: DataSourcePropGroupBy<T>;
874
- defaultGroupBy?: DataSourcePropGroupBy<T>;
875
- onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
876
- groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
877
- defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
878
- onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
879
- collapseGroupRowsOnDataFunctionChange?: boolean;
880
- sortInfo?: DataSourceSortInfo<T>;
881
- defaultSortInfo?: DataSourceSortInfo<T>;
882
- onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
883
- onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
884
- livePagination?: boolean;
885
- livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
886
- onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
887
888
  };
888
- declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
889
- declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
890
- declare type DataSourceLivePaginationCursorParams<T> = {
891
- array: T[];
892
- lastItem: T | Partial<T> | null;
893
- length: number;
889
+ /**
890
+ * Defines a column in the table.
891
+ *
892
+ * @typeParam DATA_TYPE The type of the data in the table.
893
+ *
894
+ * Can be bound to a field which is a `keyof DATA_TYPE`.
895
+ */
896
+ declare type InfiniteTableColumn<DATA_TYPE> = {} & InfiniteTableBaseColumn<DATA_TYPE> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<DATA_TYPE>;
897
+ declare type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
898
+ groupByField: string | string[];
899
+ id?: string;
894
900
  };
895
- declare type DataSourceLivePaginationCursorValue = string | number | null;
896
- interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
897
- }
898
- interface DataSourceDerivedState<_T> {
899
- multiSort: boolean;
900
- controlledSort: boolean;
901
- livePaginationCursor?: DataSourceLivePaginationCursorValue;
902
- lazyLoadBatchSize?: number;
903
- }
904
- declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
905
- interface DataSourceContextValue<T> {
906
- getState: () => DataSourceState<T>;
907
- componentState: DataSourceState<T>;
908
- componentActions: DataSourceComponentActions<T>;
909
- }
910
- declare enum DataSourceActionType {
911
- INIT = "INIT"
912
- }
913
- interface DataSourceAction<T> {
914
- type: DataSourceActionType;
915
- payload: T;
916
- }
917
- interface DataSourceReducer<T> {
918
- (state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
919
- }
920
-
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
- }
901
+ declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
902
+ declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
903
+ pivotBy: DataSourcePivotBy<DataType>[];
904
+ pivotTotalColumnGroup?: true;
905
+ pivotGroupKeys: KeyType[];
906
+ pivotByAtIndex: PivotBy<DataType, KeyType>;
907
+ pivotGroupKey: KeyType;
908
+ pivotIndex: number;
909
+ };
910
+ declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
911
+ pivotBy: DataSourcePivotBy<DataType>[];
912
+ pivotColumn: true;
913
+ pivotTotalColumn: boolean;
914
+ pivotAggregator: AggregationReducer<DataType, any>;
915
+ pivotAggregatorIndex: number;
916
+ pivotGroupKeys: KeyType[];
917
+ pivotByAtIndex?: PivotBy<DataType, KeyType>;
918
+ pivotIndex: number;
919
+ pivotGroupKey: KeyType;
920
+ };
921
+ declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
922
+ declare type InfiniteTableComputedColumnBase<T> = {
923
+ computedFilterType: string;
924
+ computedSortType: string;
925
+ computedDataType: string;
926
+ computedWidth: number;
927
+ computedOffset: number;
928
+ computedPinningOffset: number;
929
+ computedAbsoluteOffset: number;
930
+ computedSortable: boolean;
931
+ computedSortInfo: DataSourceSingleSortInfo<T> | null;
932
+ computedSorted: boolean;
933
+ computedSortedAsc: boolean;
934
+ computedSortedDesc: boolean;
935
+ computedSortIndex: number;
936
+ computedVisibleIndex: number;
937
+ computedMultiSort: boolean;
938
+ computedFiltered: boolean;
939
+ computedFilterable: boolean;
940
+ computedFilterValue: DataSourceFilterValueItem<T> | null;
941
+ computedPinned: InfiniteTableColumnPinnedValues;
942
+ computedDraggable: boolean;
943
+ computedFirstInCategory: boolean;
944
+ computedLastInCategory: boolean;
945
+ computedFirst: boolean;
946
+ computedLast: boolean;
947
+ toggleSort: () => void;
948
+ id: string;
949
+ };
950
+ declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
951
+ declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
942
952
 
943
953
  declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
944
954
  id: string;
@@ -960,10 +970,14 @@ declare type InfiniteTableRowInfoDataDiscriminator<T> = {
960
970
  data: T;
961
971
  isGroupRow: false;
962
972
  rowInfo: InfiniteTable_NoGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoNormal<T>;
973
+ field?: keyof T;
974
+ value: any;
963
975
  } | {
964
976
  data: Partial<T> | null;
965
977
  rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
966
978
  isGroupRow: true;
979
+ field?: keyof T;
980
+ value: any;
967
981
  };
968
982
  /**
969
983
  * This is the base row info for all scenarios - things every
@@ -974,7 +988,6 @@ declare type InfiniteTable_RowInfoBase<_T> = {
974
988
  id: any;
975
989
  value?: any;
976
990
  indexInAll: number;
977
- indexInGroup: number;
978
991
  };
979
992
  declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
980
993
  dataSourceHasGrouping: true;
@@ -990,6 +1003,7 @@ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
990
1003
  * in the order in which they are visible in the table
991
1004
  */
992
1005
  deepRowInfoArray: (InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T>)[];
1006
+ error?: string;
993
1007
  reducerResults?: Record<string, AggregationReducerResult>;
994
1008
  /**
995
1009
  * The count of all leaf nodes (normal rows) that are inside this group.
@@ -1024,7 +1038,7 @@ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
1024
1038
  * 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
1039
  * 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
1040
  *
1027
- * NOTE: if this is true, it doesn't mean that (all or some of) the children have been loaded, it only means that at least some children have been requested.
1041
+ * 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
1042
  *
1029
1043
  * Use directChildrenCount and directChildrenLoadedCount to know if all the children have been loaded or not.
1030
1044
  */
@@ -1047,6 +1061,7 @@ declare type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
1047
1061
  selfLoaded: boolean;
1048
1062
  } & InfiniteTable_RowInfoBase<T>;
1049
1063
  declare type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1064
+ indexInGroup: number;
1050
1065
  /**
1051
1066
  * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
1052
1067
  *
@@ -1183,177 +1198,289 @@ declare type DataGroupResult<DataType, KeyType extends any> = {
1183
1198
  declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
1184
1199
  declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
1185
1200
 
1186
- declare type InfiniteTableCellProps<T> = {
1187
- column: InfiniteTableComputedColumn<T>;
1188
- renderChildren: () => Renderable;
1189
- width: number;
1190
- cssEllipsis?: boolean;
1191
- virtualized?: boolean;
1192
- skipColumnShifting?: boolean;
1193
- beforeChildren?: Renderable;
1194
- afterChildren?: Renderable;
1195
- offset?: number;
1196
- offsetProperty?: 'left' | 'right';
1197
- cssPosition?: CSSProperties['position'];
1198
- domRef?: React.RefCallback<HTMLElement>;
1199
- cellType: 'body' | 'header';
1200
- };
1201
-
1202
- declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
1203
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
1204
- }[Keys];
1205
-
1206
- declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
1207
- declare type InfiniteTableColumnHeaderParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1208
- domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
1209
- sortTool: JSX.Element;
1210
- column: COL_TYPE;
1211
- columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
1201
+ declare type SortDir = 1 | -1;
1202
+ declare type MultisortInfo<T> = {
1203
+ /**
1204
+ * The sorting direction
1205
+ */
1206
+ dir: SortDir;
1207
+ /**
1208
+ * for now 'string' and 'number' are known types, meaning they have
1209
+ * sort functions already implemented
1210
+ */
1211
+ type?: string;
1212
+ fn?: (a: any, b: any) => number;
1213
+ /**
1214
+ * a property whose value to use for sorting on the array items
1215
+ */
1216
+ field?: keyof T;
1217
+ /**
1218
+ * or a function to retrieve the item value to use for sorting
1219
+ */
1220
+ valueGetter?: (item: T) => any;
1212
1221
  };
1213
- declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1214
- domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
1215
- value: string | number | Renderable;
1216
- groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
1217
- rowIndex: number;
1218
- column: COL_TYPE;
1219
- toggleCurrentGroupRow: () => void;
1220
- toggleGroupRow: InfiniteTableToggleGroupRowFn;
1221
- groupBy: DataSourceState<DATA_TYPE>['groupBy'];
1222
- pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
1222
+ declare const multisort: {
1223
+ <T>(sortInfo: MultisortInfo<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
1224
+ knownTypes: {
1225
+ [key: string]: (first: any, second: any) => number;
1226
+ };
1223
1227
  };
1224
- declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
1225
- declare type InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & {
1226
- rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<DATA_TYPE>;
1227
- isGroupRow: true;
1228
- data: Partial<DATA_TYPE> | null;
1228
+
1229
+ declare type RenderRange = {
1230
+ renderStartIndex: number;
1231
+ renderEndIndex: number;
1229
1232
  };
1230
- declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
1231
- declare type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableGroupColumnRenderParams<DATA_TYPE, COL_TYPE> & {
1232
- collapsed: boolean;
1233
- groupIcon: Renderable;
1233
+
1234
+ interface DataSourceDataParams<T> {
1235
+ originalDataArray: T[];
1236
+ sortInfo?: DataSourceSortInfo<T>;
1237
+ groupBy?: DataSourcePropGroupBy<T>;
1238
+ pivotBy?: DataSourcePropPivotBy<T>;
1239
+ filterValue?: DataSourcePropFilterValue<T>;
1240
+ groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
1241
+ lazyLoadBatchSize?: number;
1242
+ lazyLoadStartIndex?: number;
1243
+ groupKeys?: any[];
1244
+ append?: boolean;
1245
+ aggregationReducers?: DataSourcePropAggregationReducers<T>;
1246
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1247
+ __cursorId?: DataSourceSetupState<T>['cursorId'];
1248
+ changes?: DataSourceDataParamsChanges<T>;
1249
+ }
1250
+ declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
1251
+ declare type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
1252
+ field?: keyof T;
1253
+ id?: string;
1234
1254
  };
1235
- declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
1236
- declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1237
- rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
1238
- data: DATA_TYPE | Partial<DATA_TYPE> | null;
1239
- dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
1240
- rowIndex: number;
1241
- column: COL_TYPE;
1255
+ declare type DataSourceGroupBy<T> = GroupBy<T, any>;
1256
+ declare type DataSourcePivotBy<T> = PivotBy<T, any>;
1257
+ declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
1258
+ declare type DataSourceRemoteData<T> = {
1259
+ data: T[] | LazyGroupDataItem<T>[];
1260
+ mappings?: DataSourceMappings;
1261
+ cache?: boolean;
1262
+ error?: string;
1263
+ totalCount?: number;
1264
+ totalCountUnfiltered?: number;
1265
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1242
1266
  };
1243
- declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
1244
- declare type InfiniteTableGroupColumnRenderIconFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (param: InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
1245
- declare type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderParams<T>) => Renderable;
1246
- declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
1247
- declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
1248
- declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
1249
- declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
1250
- declare type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
1251
- /**
1252
- * Determines the field property of the column.
1253
- */
1267
+ declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
1268
+ declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
1269
+ declare type DataSourcePropGroupRowsStateObject<KeyType> = {
1270
+ expandedRows: DataSourceGroupRowsList<KeyType>;
1271
+ collapsedRows: DataSourceGroupRowsList<KeyType>;
1272
+ };
1273
+ declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
1274
+ declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
1275
+ interface DataSourceMappedState<T> {
1276
+ aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
1277
+ livePagination: DataSourceProps<T>['livePagination'];
1278
+ lazyLoad: DataSourceProps<T>['lazyLoad'];
1279
+ onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
1280
+ data: DataSourceProps<T>['data'];
1281
+ filterFunction: DataSourceProps<T>['filterFunction'];
1282
+ filterValue: DataSourceProps<T>['filterValue'];
1283
+ filterTypes: NonUndefined<DataSourceProps<T>['filterTypes']>;
1284
+ primaryKey: DataSourceProps<T>['primaryKey'];
1285
+ filterDelay: NonUndefined<DataSourceProps<T>['filterDelay']>;
1286
+ groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
1287
+ groupRowsState: GroupRowsState<T>;
1288
+ pivotBy: DataSourceProps<T>['pivotBy'];
1289
+ loading: NonUndefined<DataSourceProps<T>['loading']>;
1290
+ sortTypes: NonUndefined<DataSourceProps<T>['sortTypes']>;
1291
+ collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
1292
+ sortInfo: DataSourceSingleSortInfo<T>[] | null;
1293
+ }
1294
+ declare type DataSourceAggregationReducer<T, AggregationResultType> = {
1295
+ name?: string;
1254
1296
  field?: keyof T;
1255
- render?: InfiniteTableColumnRenderFunction<T>;
1256
- renderValue?: InfiniteTableColumnRenderFunction<T>;
1257
- valueGetter?: InfiniteTableColumnValueGetter<T>;
1258
- }, 'render' | 'renderValue' | 'field' | 'valueGetter'>;
1259
- declare type InfiniteTableColumnStyleFnParams<T> = {
1260
- value: Renderable;
1261
- column: InfiniteTableColumn<T>;
1262
- } & InfiniteTableRowInfoDataDiscriminator<T>;
1263
- declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
1264
- declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
1265
- declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
1266
- declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
1267
- declare type InfiniteTableColumnValueGetterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
1268
- declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
1269
- declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
1270
- declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
1271
- declare type InfiniteTableBaseColumn<T> = {
1272
- sortable?: boolean;
1273
- draggable?: boolean;
1274
- resizable?: boolean;
1275
- comparer?: InfiniteTableColumnComparer<T>;
1276
- defaultHiddenWhenGroupedBy?: '*' | keyof T | {
1277
- [k in keyof Partial<T>]: true;
1278
- };
1279
- align?: InfiniteTableColumnAlign;
1280
- verticalAlign?: InfiniteTableColumnVerticalAlign;
1281
- columnGroup?: string;
1282
- header?: InfiniteTableColumnHeader<T>;
1283
- name?: Renderable;
1284
- cssEllipsis?: boolean;
1285
- headerCssEllipsis?: boolean;
1286
- type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
1287
- style?: InfiniteTableColumnStyle<T>;
1288
- className?: InfiniteTableColumnClassName<T>;
1289
- rowspan?: InfiniteTableColumnRowspanFn<T>;
1290
- valueGetter?: InfiniteTableColumnValueGetter<T>;
1291
- defaultWidth?: number;
1292
- defaultFlex?: number;
1293
- minWidth?: number;
1294
- maxWidth?: number;
1295
- components?: {
1296
- ColumnCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
1297
- HeaderCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
1297
+ initialValue?: AggregationResultType;
1298
+ getter?: (data: T) => any;
1299
+ reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
1300
+ done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
1301
+ pivotColumn?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<T>>> | (({ column, }: {
1302
+ column: InfiniteTablePivotFinalColumnVariant<T>;
1303
+ }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
1304
+ };
1305
+ declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
1306
+ inheritFromColumn?: string | boolean;
1307
+ };
1308
+ declare type DataSourceMappings = Record<'totals' | 'values', string>;
1309
+ declare type LazyGroupDataItem<DataType> = {
1310
+ data: Partial<DataType>;
1311
+ keys: any[];
1312
+ aggregations?: Record<string, any>;
1313
+ dataset?: DataSourceRemoteData<DataType>;
1314
+ pivot?: {
1315
+ values: Record<string, any>;
1316
+ totals?: Record<string, any>;
1298
1317
  };
1299
1318
  };
1300
- /**
1301
- * Defines a column in the table.
1302
- *
1303
- * @typeParam DATA_TYPE The type of the data in the table.
1304
- *
1305
- * Can be bound to a field which is a `keyof DATA_TYPE`.
1306
- */
1307
- declare type InfiniteTableColumn<DATA_TYPE> = {} & InfiniteTableBaseColumn<DATA_TYPE> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<DATA_TYPE>;
1308
- declare type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
1309
- groupByField: string | string[];
1310
- id?: string;
1319
+ declare type LazyRowInfoGroup<DataType> = {
1320
+ /**
1321
+ * Those are direct children of the current lazy group row
1322
+ */
1323
+ children: LazyGroupDataItem<DataType>[];
1324
+ childrenLoading: boolean;
1325
+ childrenAvailable: boolean;
1326
+ cache: boolean;
1327
+ totalCount: number;
1328
+ totalCountUnfiltered: number;
1329
+ error?: string;
1311
1330
  };
1312
- declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
1313
- declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
1314
- pivotBy: DataSourcePivotBy<DataType>[];
1315
- pivotTotalColumnGroup?: true;
1316
- pivotGroupKeys: KeyType[];
1317
- pivotByAtIndex: PivotBy<DataType, KeyType>;
1318
- pivotGroupKey: KeyType;
1319
- pivotIndex: number;
1331
+ declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
1332
+ interface DataSourceSetupState<T> {
1333
+ unfilteredCount: number;
1334
+ filteredCount: number;
1335
+ lazyLoadCacheOfLoadedBatches: DeepMap<string, true>;
1336
+ pivotMappings?: DataSourceMappings;
1337
+ propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
1338
+ showSeparatePivotColumnForSingleAggregation: boolean;
1339
+ dataParams?: DataSourceDataParams<T>;
1340
+ originalLazyGroupData: LazyGroupDataDeepMap<T>;
1341
+ originalLazyGroupDataChangeDetect: number | string;
1342
+ scrollStopDelayUpdatedByTable: number;
1343
+ notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
1344
+ notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
1345
+ notifyRenderRangeChange: SubscriptionCallback<RenderRange>;
1346
+ originalDataArray: T[];
1347
+ lastFilterDataArray?: T[];
1348
+ lastSortDataArray?: T[];
1349
+ lastGroupDataArray?: InfiniteTableRowInfo<T>[];
1350
+ dataArray: InfiniteTableRowInfo<T>[];
1351
+ groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
1352
+ pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
1353
+ pivotGrandTotalColumnPosition: InfiniteTablePropPivotGrandTotalColumnPosition;
1354
+ cursorId: number | symbol | DataSourceLivePaginationCursorValue;
1355
+ updatedAt: number;
1356
+ reducedAt: number;
1357
+ groupedAt: number;
1358
+ sortedAt: number;
1359
+ filteredAt: number;
1360
+ generateGroupRows: boolean;
1361
+ postFilterDataArray?: T[];
1362
+ postSortDataArray?: T[];
1363
+ postGroupDataArray?: InfiniteTableRowInfo<T>[];
1364
+ pivotColumns?: Map<string, InfiniteTableColumn<T>>;
1365
+ pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
1366
+ }
1367
+ declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
1368
+ declare type DataSourceProps<T> = {
1369
+ children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
1370
+ primaryKey: keyof T | (({ data, index }: {
1371
+ data: T;
1372
+ index: number;
1373
+ }) => string);
1374
+ fields?: (keyof T)[];
1375
+ data: DataSourceData<T>;
1376
+ lazyLoad?: boolean | {
1377
+ batchSize?: number;
1378
+ };
1379
+ loading?: boolean;
1380
+ defaultLoading?: boolean;
1381
+ onLoadingChange?: (loading: boolean) => void;
1382
+ pivotBy?: DataSourcePropPivotBy<T>;
1383
+ defaultPivotBy?: DataSourcePropPivotBy<T>;
1384
+ onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
1385
+ aggregationReducers?: DataSourcePropAggregationReducers<T>;
1386
+ defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
1387
+ groupBy?: DataSourcePropGroupBy<T>;
1388
+ defaultGroupBy?: DataSourcePropGroupBy<T>;
1389
+ onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
1390
+ groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
1391
+ defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
1392
+ onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
1393
+ collapseGroupRowsOnDataFunctionChange?: boolean;
1394
+ sortInfo?: DataSourceSortInfo<T>;
1395
+ defaultSortInfo?: DataSourceSortInfo<T>;
1396
+ onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
1397
+ onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
1398
+ livePagination?: boolean;
1399
+ livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
1400
+ onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
1401
+ filterFunction?: DataSourcePropFilterFunction<T>;
1402
+ filterMode?: 'client' | 'server';
1403
+ filterValue?: DataSourcePropFilterValue<T>;
1404
+ defaultFilterValue?: DataSourcePropFilterValue<T>;
1405
+ onFilterValueChange?: (filterValue: DataSourcePropFilterValue<T>) => void;
1406
+ filterDelay?: number;
1407
+ filterTypes?: DataSourcePropFilterTypes<T>;
1408
+ sortTypes?: DataSourcePropSortTypes;
1320
1409
  };
1321
- declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
1322
- pivotBy: DataSourcePivotBy<DataType>[];
1323
- pivotColumn: true;
1324
- pivotTotalColumn: boolean;
1325
- pivotAggregator: AggregationReducer<DataType, any>;
1326
- pivotAggregatorIndex: number;
1327
- pivotGroupKeys: KeyType[];
1328
- pivotByAtIndex?: PivotBy<DataType, KeyType>;
1329
- pivotIndex: number;
1330
- pivotGroupKey: KeyType;
1410
+ declare type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
1411
+ declare type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
1412
+ declare type DataSourceFilterFunctionParam<T> = {
1413
+ data: T;
1414
+ index: number;
1415
+ dataArray: T[];
1416
+ primaryKey: any;
1331
1417
  };
1332
- declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
1333
- declare type InfiniteTableComputedColumnBase<T> = {
1334
- computedWidth: number;
1335
- computedOffset: number;
1336
- computedPinningOffset: number;
1337
- computedAbsoluteOffset: number;
1338
- computedSortable: boolean;
1339
- computedSortInfo: DataSourceSingleSortInfo<T> | null;
1340
- computedSorted: boolean;
1341
- computedSortedAsc: boolean;
1342
- computedSortedDesc: boolean;
1343
- computedSortIndex: number;
1344
- computedVisibleIndex: number;
1345
- computedMultiSort: boolean;
1346
- computedPinned: InfiniteTableColumnPinnedValues;
1347
- computedDraggable: boolean;
1348
- computedFirstInCategory: boolean;
1349
- computedLastInCategory: boolean;
1350
- computedFirst: boolean;
1351
- computedLast: boolean;
1352
- toggleSort: () => void;
1418
+ declare type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
1419
+ declare type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
1420
+ declare type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
1421
+ field: keyof T;
1422
+ }, {
1353
1423
  id: string;
1424
+ }> & {
1425
+ valueGetter?: DataSourceFilterValueItemValueGetter<T>;
1426
+ filterValue: any;
1427
+ disabled?: boolean;
1428
+ filterType: string;
1429
+ operator: string;
1354
1430
  };
1355
- declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
1356
- declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
1431
+ declare type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T>) => any;
1432
+ declare type DataSourceFilterType<T> = {
1433
+ emptyValues: Set<any>;
1434
+ label?: string;
1435
+ defaultOperator: string;
1436
+ operators: DataSourceFilterOperator<T>[];
1437
+ };
1438
+ declare type DataSourceFilterOperator<T> = {
1439
+ name: string;
1440
+ label?: string;
1441
+ fn: DataSourceFilterOperatorFunction<T>;
1442
+ };
1443
+ declare type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
1444
+ declare type DataSourceFilterOperatorFunctionParam<T> = {
1445
+ currentValue: any;
1446
+ filterValue: any;
1447
+ emptyValues: Set<any>;
1448
+ } & DataSourceFilterFunctionParam<T>;
1449
+ declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
1450
+ declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
1451
+ declare type DataSourceLivePaginationCursorParams<T> = {
1452
+ array: T[];
1453
+ lastItem: T | Partial<T> | null;
1454
+ length: number;
1455
+ };
1456
+ declare type DataSourceLivePaginationCursorValue = string | number | null;
1457
+ interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
1458
+ }
1459
+ interface DataSourceDerivedState<T> {
1460
+ operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
1461
+ filterMode: NonUndefined<DataSourceProps<T>['filterMode']>;
1462
+ multiSort: boolean;
1463
+ controlledSort: boolean;
1464
+ controlledFilter: boolean;
1465
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1466
+ lazyLoadBatchSize?: number;
1467
+ }
1468
+ declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
1469
+ interface DataSourceContextValue<T> {
1470
+ getState: () => DataSourceState<T>;
1471
+ componentState: DataSourceState<T>;
1472
+ componentActions: DataSourceComponentActions<T>;
1473
+ }
1474
+ declare enum DataSourceActionType {
1475
+ INIT = "INIT"
1476
+ }
1477
+ interface DataSourceAction<T> {
1478
+ type: DataSourceActionType;
1479
+ payload: T;
1480
+ }
1481
+ interface DataSourceReducer<T> {
1482
+ (state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
1483
+ }
1357
1484
 
1358
1485
  declare function useInfiniteHeaderCell<T>(): InfiniteTableColumnHeaderParams<T, InfiniteTableComputedColumn<T>>;
1359
1486
 
@@ -1365,10 +1492,12 @@ declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
1365
1492
  declare namespace InfiniteTable {
1366
1493
  var defaultProps: {
1367
1494
  rowHeight: number;
1368
- headerHeight: _vanilla_extract_private.CSSVarFunction;
1495
+ columnHeaderHeight: _vanilla_extract_private.CSSVarFunction;
1369
1496
  };
1370
1497
  }
1371
1498
 
1499
+ declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
1500
+
1372
1501
  declare function useDataSource<T>(): DataSourceState<T>;
1373
1502
 
1374
1503
  declare function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
@@ -1424,4 +1553,8 @@ declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>
1424
1553
 
1425
1554
  declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
1426
1555
 
1427
- 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 };
1556
+ declare const defaultFilterEditors: InfiniteTablePropFilterEditors<unknown>;
1557
+ declare function StringFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
1558
+ declare function NumberFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
1559
+
1560
+ export { ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropLivePaginationCursor, DataSourcePropPivotBy, DataSourcePropSortTypes, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableFilterEditorProps, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableGroupColumnRenderIconFunction, InfiniteTableImperativeApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTablePropFilterEditors, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, NumberFilterEditor, Scrollbars, StringFilterEditor, debounce, defaultFilterEditors, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell };