@infinite-table/infinite-react 6.1.0 → 6.1.1

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 (7) hide show
  1. package/index.css +59 -42
  2. package/index.d.ts +1285 -1254
  3. package/index.dev.js +863 -595
  4. package/index.dev.mjs +902 -634
  5. package/index.js +863 -595
  6. package/index.mjs +902 -634
  7. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent, HTMLAttributes, ReactNode, EffectCallback, DependencyList } from 'react';
2
+ import React__default, { RefCallback, CSSProperties, HTMLProps, MutableRefObject, MouseEvent, KeyboardEvent, HTMLAttributes, ReactNode, EffectCallback, DependencyList } from 'react';
3
3
 
4
4
  declare type ManagedComponentStateContextValue<T_STATE, T_ACTIONS> = {
5
5
  getComponentState: () => T_STATE;
@@ -272,6 +272,8 @@ declare class MatrixBrain extends Logger implements IBrain {
272
272
  private horizontalTotalSize;
273
273
  private horizontalRenderCount?;
274
274
  private verticalRenderCount?;
275
+ protected maxHorizontalRenderCount: number;
276
+ protected maxVerticalRenderCount: number;
275
277
  private horizontalExtendRangeBy;
276
278
  private verticalExtendRangeBy;
277
279
  protected horizontalRenderRange: RenderRangeType;
@@ -459,6 +461,7 @@ declare class MatrixBrain extends Logger implements IBrain {
459
461
  extraCells?: [number, number][] | undefined;
460
462
  }) => void;
461
463
  getRenderRangeCellCount: (range: TableRenderRange) => number;
464
+ getMaxCellCount: () => number;
462
465
  getExtraCells: () => [
463
466
  number,
464
467
  number
@@ -486,1317 +489,1103 @@ declare class MatrixBrain extends Logger implements IBrain {
486
489
  destroy(): void;
487
490
  }
488
491
 
489
- declare enum InfiniteTableActionType {
490
- SET_COLUMN_SIZE = 0,
491
- SET_SCROLL_POSITION = 1,
492
- SET_BODY_SIZE = 2,
493
- SET_COLUMN_ORDER = 3,
494
- SET_COLUMN_VISIBILITY = 4,
495
- SET_COLUMN_SHIFTS = 5,
496
- SET_COLUMN_PINNING = 6,
497
- SET_COLUMN_AGGREGATIONS = 7,
498
- SET_DRAGGING_COLUMN_ID = 8
492
+ declare type CellSelectionPosition<ROW_PRIMARY_KEY_TYPE = any, COL_ID = string> = [ROW_PRIMARY_KEY_TYPE, COL_ID];
493
+ declare type CellSelectionStateObject = {
494
+ selectedCells: CellSelectionPosition[];
495
+ deselectedCells: CellSelectionPosition[];
496
+ defaultSelection: boolean;
497
+ } | {
498
+ defaultSelection: true;
499
+ deselectedCells: CellSelectionPosition[];
500
+ selectedCells?: CellSelectionPosition[];
501
+ } | {
502
+ defaultSelection: false;
503
+ selectedCells: CellSelectionPosition[];
504
+ deselectedCells?: CellSelectionPosition[];
505
+ };
506
+ declare class CellSelectionState {
507
+ wildcard: string;
508
+ cache: DeepMap<any, boolean>;
509
+ selectedRowsToColumns: Map<any, Set<string>>;
510
+ selectedColumnsToRows: Map<string, Set<any>>;
511
+ deselectedRowsToColumns: Map<any, Set<string>>;
512
+ deselectedColumnsToRows: Map<string, Set<any>>;
513
+ defaultSelection: boolean;
514
+ constructor(clone?: CellSelectionStateObject | CellSelectionState);
515
+ deselectAll: () => void;
516
+ selectAll: () => void;
517
+ selectCell(rowId: any, colId: string): void;
518
+ deselectCell(rowId: any, colId: string): void;
519
+ selectColumn(colId: string): void;
520
+ deselectColumn(colId: string): void;
521
+ setCellSelected(rowId: any, colId: string, selected: boolean): void;
522
+ private setCellInDeselection;
523
+ private setCellInSelection;
524
+ update(stateObject: CellSelectionStateObject): void;
525
+ /**
526
+ * Returns whether there is at least one selected cell in the row
527
+ *
528
+ * @param rowId the row id
529
+ * @param columnIds the columns currently available in the grid
530
+ * @returns boolean
531
+ */
532
+ isCellSelectionInRow(rowId: any, columnIds: string[]): boolean;
533
+ isCellSelected(rowId: any, colId: string): boolean;
534
+ private isCellSelected_Internal;
535
+ getState(): CellSelectionStateObject;
499
536
  }
500
537
 
501
- declare type InfiniteTableAction = {
502
- type: InfiniteTableActionType;
503
- payload?: any;
538
+ declare type PointCoords = {
539
+ top: number;
540
+ left: number;
504
541
  };
505
542
 
506
- declare type InfiniteTableBaseCellProps<T> = {
507
- column: InfiniteTableComputedColumn<T>;
508
- align?: InfiniteTableColumnAlignValues;
509
- horizontalLayoutPageIndex: number | null;
510
- rowId?: any;
511
- renderChildren: () => Renderable;
512
- width: number;
513
- cssEllipsis?: boolean;
514
- contentStyle?: CSSProperties;
515
- contentClassName?: string;
516
- virtualized?: boolean;
517
- skipColumnShifting?: boolean;
518
- beforeChildren?: Renderable;
519
- afterChildren?: Renderable;
520
- cssPosition?: CSSProperties['position'];
521
- domRef?: React.RefCallback<HTMLElement>;
543
+ declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
544
+ [propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
522
545
  };
523
- declare type InfiniteTableCellProps<T> = ({
524
- cellType: 'header';
525
- } & InfiniteTableBaseCellProps<T>) | ({
526
- cellType: 'body';
527
- } & InfiniteTableBaseCellProps<T>);
528
-
529
- declare type DiscriminatedUnion<A, B> = (A & {
530
- [K in keyof B]?: undefined;
531
- }) | (B & {
532
- [K in keyof A]?: undefined;
533
- });
534
- declare type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
535
- /**
536
- * Restrict using either exclusively the keys of T or exclusively the keys of U.
537
- *
538
- * No unique keys of T can be used simultaneously with any unique keys of U.
539
- *
540
- * @example
541
- *```
542
- * const myVar: XOR<T, U>
543
- *```
544
- *
545
- * @see https://github.com/maninak/ts-xor/tree/master#description
546
- */
547
- declare type XOR<T, U> = T | U extends object ? Prettify<Without<T, U> & U> | Prettify<Without<U, T> & T> : T | U;
548
- /**
549
- * Useful if applying XOR on more than 2 types.
550
- * It comes with the penalty of having the types wrapped in an array
551
- *
552
- * @example
553
- * ```
554
- * AllXOR<[
555
- * { a: AModule },
556
- * { b: BModule },
557
- * { c: CModule },
558
- * { d: DModule }
559
- * ]>
560
- * ```
561
- * @see https://github.com/Microsoft/TypeScript/issues/14094#issuecomment-723571692
562
- */
563
- declare type AllXOR<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? AllXOR<[XOR<A, B>, ...Rest]> : never;
564
- /**
565
- * Get the keys of T without any keys of U.
566
- */
567
- declare type Without<T, U> = {
568
- [P in Exclude<keyof T, keyof U>]?: never;
546
+ declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
547
+ debugName?: string;
548
+ initSetupState?: (props: T_PROPS) => COMPONENT_SETUP_STATE;
549
+ layoutEffect?: boolean;
550
+ forwardProps?: (setupState: COMPONENT_SETUP_STATE, props: T_PROPS) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
551
+ allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
552
+ interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
553
+ mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
554
+ onPropChange?: (params: {
555
+ name: keyof T_PROPS;
556
+ oldValue: any;
557
+ newValue: any;
558
+ }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
559
+ onPropsChange?: (newPropValues: {
560
+ [k in keyof T_PROPS]?: {
561
+ newValue: T_PROPS[k];
562
+ oldValue: T_PROPS[k];
563
+ };
564
+ }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
565
+ mapPropsToState?: (params: {
566
+ props: T_PROPS;
567
+ state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
568
+ oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
569
+ parentState: T_PARENT_STATE | null;
570
+ }) => COMPONENT_DERIVED_STATE;
571
+ concludeReducer?: (params: {
572
+ previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
573
+ state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
574
+ updatedProps: Partial<T_PROPS> | null;
575
+ parentState: T_PARENT_STATE | null;
576
+ }) => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
577
+ getReducerActions?: (dispatch: React$1.Dispatch<any>) => T_ACTIONS;
578
+ getParentState?: () => T_PARENT_STATE;
579
+ cleanup?: (state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE) => void;
580
+ onControlledPropertyChange?: (name: string, newValue: any, oldValue: any) => void | ((value: any, oldValue: any) => any);
569
581
  };
570
- /**
571
- * Resolve mapped types and show the derived keys and their types when hovering in
572
- * IDEs, instead of just showing the names those mapped types are defined with.
573
- */
574
- declare type Prettify<T> = {
575
- [K in keyof T]: T[K];
576
- } & {};
582
+ declare function buildManagedComponent<T_PROPS, COMPONENT_MAPPED_STATE extends object, COMPONENT_SETUP_STATE extends object = {}, COMPONENT_DERIVED_STATE extends object = {}, T_ACTIONS = {}, T_PARENT_STATE = {}>(config: ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE, COMPONENT_DERIVED_STATE, T_ACTIONS, T_PARENT_STATE>): {
583
+ ManagedComponentContextProvider: React$1.NamedExoticComponent<T_PROPS & {
584
+ children: React$1.ReactNode;
585
+ }>;
586
+ useManagedComponent: (props: T_PROPS) => {
587
+ contextValue: {
588
+ componentState: COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE;
589
+ componentActions: ComponentStateGeneratedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
590
+ getComponentState: () => COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE;
591
+ replaceState: (newState: COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE) => void;
592
+ assignState: (newState: Partial<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
593
+ };
594
+ ContextComponent: React$1.Context<ManagedComponentStateContextValue<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE, ComponentStateGeneratedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>>>;
595
+ };
596
+ };
597
+ declare function useManagedComponentState<COMPONENT_STATE>(): ManagedComponentStateContextValue<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
577
598
 
578
- declare type MenuIconProps = {
579
- lineWidth?: number;
580
- lineStyle?: React$1.CSSProperties;
581
- style?: React$1.CSSProperties;
582
- className?: string;
583
- domProps?: React$1.HTMLAttributes<HTMLDivElement>;
584
- reserveSpaceWhenHidden?: boolean;
585
- menuVisible?: boolean;
586
- children?: React$1.ReactNode;
599
+ declare type NodePath$1<PRIMARY_KEY_TYPE = any> = PRIMARY_KEY_TYPE[];
600
+ declare type TreeExpandStateObject_ByPath<PRIMARY_KEY_TYPE = any> = {
601
+ expandedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
602
+ collapsedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
603
+ defaultExpanded: boolean;
604
+ collapsedIds?: never;
605
+ expandedIds?: never;
606
+ } | {
607
+ defaultExpanded: true;
608
+ collapsedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
609
+ expandedPaths?: NodePath$1<PRIMARY_KEY_TYPE>[];
610
+ collapsedIds?: never;
611
+ expandedIds?: never;
612
+ } | {
613
+ defaultExpanded: false;
614
+ collapsedPaths?: NodePath$1<PRIMARY_KEY_TYPE>[];
615
+ expandedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
616
+ collapsedIds?: never;
617
+ expandedIds?: never;
587
618
  };
588
- declare function MenuIcon(props: MenuIconProps): React$1.JSX.Element;
619
+ declare type TreeExpandStateObject_ById<PRIMARY_KEY_TYPE = any> = {
620
+ defaultExpanded: boolean;
621
+ expandedIds: PRIMARY_KEY_TYPE[];
622
+ collapsedIds: PRIMARY_KEY_TYPE[];
623
+ expandedPaths?: never;
624
+ collapsedPaths?: never;
625
+ } | {
626
+ defaultExpanded: true;
627
+ collapsedIds: PRIMARY_KEY_TYPE[];
628
+ expandedIds?: PRIMARY_KEY_TYPE[];
629
+ expandedPaths?: never;
630
+ collapsedPaths?: never;
631
+ } | {
632
+ defaultExpanded: false;
633
+ collapsedIds?: PRIMARY_KEY_TYPE[];
634
+ expandedIds: PRIMARY_KEY_TYPE[];
635
+ expandedPaths?: never;
636
+ collapsedPaths?: never;
637
+ };
638
+ declare type TreeExpandStateObject<PRIMARY_KEY_TYPE = any> = TreeExpandStateObject_ByPath<PRIMARY_KEY_TYPE> | TreeExpandStateObject_ById<PRIMARY_KEY_TYPE>;
639
+ declare type TreeExpandStateMode = 'id' | 'path';
640
+ declare class TreeExpandState<PRIMARY_KEY_TYPE = any> {
641
+ collapsedPathsMap: DeepMap<PRIMARY_KEY_TYPE, true>;
642
+ expandedPathsMap: DeepMap<PRIMARY_KEY_TYPE, true>;
643
+ collapsedIdsMap: Map<PRIMARY_KEY_TYPE, true>;
644
+ expandedIdsMap: Map<PRIMARY_KEY_TYPE, true>;
645
+ private _mode;
646
+ get mode(): TreeExpandStateMode;
647
+ defaultExpanded: boolean;
648
+ constructor(clone?: TreeExpandStateObject | TreeExpandState);
649
+ reset(): void;
650
+ destroy(): void;
651
+ expandAll: () => void;
652
+ collapseAll: () => void;
653
+ expandNode(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): void;
654
+ collapseNode(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): void;
655
+ setNodeExpanded(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>, expanded: boolean): void;
656
+ isNodeExpandedByPath(nodePath: NodePath$1<PRIMARY_KEY_TYPE>): boolean;
657
+ isNodeExpandedById(id: PRIMARY_KEY_TYPE): boolean;
658
+ isNodeExpanded(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): boolean;
659
+ update(stateObject: TreeExpandStateObject): void;
660
+ getState(): TreeExpandStateObject;
661
+ }
589
662
 
590
663
  declare type NonUndefined<T> = T extends undefined ? never : T;
591
664
 
592
- declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
593
- declare type InfiniteTableToggleTreeNodeFn = (nodePath: any[]) => void;
594
- declare type InfiniteTableToggleRowDetailsFn = (id: any) => void;
595
- declare type InfiniteTableSelectRowFn = (id: any) => void;
596
- declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
597
- dragging: boolean;
598
- column: COL_TYPE;
599
- columnsMap: Map<string, COL_TYPE>;
600
- columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
601
- columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
602
- selectionMode: DataSourcePropSelectionMode;
603
- horizontalLayoutPageIndex: null | number;
604
- allRowsSelected: boolean;
605
- someRowsSelected: boolean;
606
- filtered: boolean;
607
- api: InfiniteTableApi<DATA_TYPE>;
608
- dataSourceApi: DataSourceApi<DATA_TYPE>;
609
- columnApi: InfiniteTableColumnApi<DATA_TYPE>;
610
- renderBag: {
611
- all?: Renderable;
612
- header: string | number | Renderable;
613
- sortIcon?: Renderable;
614
- menuIcon?: Renderable;
615
- menuIconProps?: MenuIconProps;
616
- filterIcon?: Renderable;
617
- filterEditor?: Renderable;
618
- selectionCheckBox?: Renderable;
619
- };
665
+ declare type OnNodeStateChangeParam = DataSourceCallback_BaseParam<any> & {};
666
+ declare type TreeDataSourceOnlyProps<T> = {
667
+ nodesKey?: string;
668
+ treeSelection?: DataSourcePropTreeSelection;
669
+ treeFilterFunction?: DataSourcePropTreeFilterFunction<T>;
670
+ defaultTreeSelection?: DataSourcePropTreeSelection;
671
+ treeExpandState?: TreeExpandStateValue;
672
+ defaultTreeExpandState?: TreeExpandStateValue;
673
+ onTreeExpandStateChange?: (treeExpandState: TreeExpandStateObject<any>, params: {
674
+ dataSourceApi: DataSourceApi<T>;
675
+ nodePath: NodePath$1 | null;
676
+ nodeState: 'collapsed' | 'expanded';
677
+ }) => void;
678
+ onTreeDataMutations?: ({ dataArray, timestamp, treeMutations, nodesKey, }: {
679
+ nodesKey: keyof T | any;
680
+ dataArray: DataSourceState<T>['originalDataArray'];
681
+ timestamp: number;
682
+ treeMutations: NonUndefined<DataSourceState<T>['originalDataArrayChangedInfo']['treeMutations']>;
683
+ }) => void;
684
+ isNodeSelected?: DataSourcePropIsNodeSelected<T>;
685
+ isNodeSelectable?: DataSourcePropIsNodeSelectable<T>;
686
+ isNodeReadOnly?: DataSourcePropIsNodeReadOnly<T>;
687
+ /**
688
+ * Called when a node is expanded. Not called when treeApi.expandAll is called.
689
+ */
690
+ onNodeExpand?: (node: NodePath$1, param: OnNodeStateChangeParam) => void;
691
+ /**
692
+ * Called when a node is collapsed. Not called when treeApi.collapseAll is called.
693
+ */
694
+ onNodeCollapse?: (node: NodePath$1, param: OnNodeStateChangeParam) => void;
620
695
  } & ({
621
- domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
622
- htmlElementRef: React__default.MutableRefObject<HTMLElement | null>;
623
- insideColumnMenu: false;
696
+ selectionMode?: 'multi-row';
697
+ treeSelection?: DataSourcePropTreeSelection_MultiNode;
698
+ defaultTreeSelection?: DataSourcePropTreeSelection_MultiNode;
699
+ onTreeSelectionChange?: DataSourcePropOnTreeSelectionChange_MultiNode;
624
700
  } | {
625
- insideColumnMenu: true;
701
+ selectionMode?: 'single-row';
702
+ treeSelection?: DataSourcePropTreeSelection_SingleNode;
703
+ defaultTreeSelection?: DataSourcePropTreeSelection_SingleNode;
704
+ onTreeSelectionChange?: DataSourcePropOnTreeSelectionChange_SingleNode;
705
+ } | {
706
+ selectionMode?: 'single-cell';
707
+ cellSelection?: DataSourcePropCellSelection_SingleCell;
708
+ defaultCellSelection?: DataSourcePropCellSelection_SingleCell;
709
+ onCellSelectionChange?: DataSourcePropOnCellSelectionChange_SingleCell;
710
+ } | {
711
+ selectionMode?: 'multi-cell';
712
+ cellSelection?: DataSourcePropCellSelection_MultiCell;
713
+ defaultCellSelection?: DataSourcePropCellSelection_MultiCell;
714
+ onCellSelectionChange?: DataSourcePropOnCellSelectionChange_MultiCell;
715
+ } | {
716
+ selectionMode?: false;
717
+ }) & ({
718
+ isNodeCollapsed?: DataSourcePropIsNodeExpanded<T>;
719
+ isNodeExpanded?: never;
720
+ } | {
721
+ isNodeExpanded?: DataSourcePropIsNodeExpanded<T>;
722
+ isNodeCollapsed?: never;
626
723
  });
627
- declare type InfiniteTableColumnRenderBag = {
628
- value: string | number | Renderable;
629
- groupIcon?: Renderable;
630
- treeIcon?: Renderable;
631
- rowDetailsIcon?: Renderable;
632
- all?: Renderable;
633
- selectionCheckBox?: Renderable;
724
+ declare type DataSourcePropsNotAvailableInTreeDataSource = keyof Pick<DataSourceProps<any>, 'groupBy' | 'defaultGroupBy' | 'nodesKey' | 'defaultGroupRowsState' | 'groupRowsState' | 'onGroupRowsStateChange' | 'onGroupByChange' | 'collapseGroupRowsOnDataFunctionChange' | 'livePagination' | 'onLivePaginationCursorChange' | 'groupMode' | 'filterFunction' | 'onPivotByChange' | 'pivotBy' | 'defaultPivotBy' | 'selectionMode' | 'rowSelection' | 'defaultRowSelection'>;
725
+ declare type TreeDataSourceProps<T> = Omit<DataSourceProps<T>, DataSourcePropsNotAvailableInTreeDataSource> & TreeDataSourceOnlyProps<T>;
726
+
727
+ declare type NodePath = any[];
728
+ declare type TreeSelectionStateObject = {
729
+ selectedPaths: NodePath;
730
+ deselectedPaths: NodePath;
731
+ defaultSelection: boolean;
732
+ } | {
733
+ defaultSelection: true;
734
+ deselectedPaths: NodePath;
735
+ selectedPaths?: NodePath;
736
+ } | {
737
+ defaultSelection: false;
738
+ selectedPaths: NodePath;
739
+ deselectedPaths?: NodePath;
634
740
  };
635
- declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
636
- domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
637
- htmlElementRef: React__default.MutableRefObject<HTMLElement | null>;
638
- rowIndexInHorizontalLayoutPage: null | number;
639
- horizontalLayoutPageIndex: null | number;
640
- value: string | number | Renderable;
641
- align: InfiniteTableColumnAlignValues;
642
- verticalAlign: InfiniteTableColumnVerticalAlignValues;
643
- renderBag: InfiniteTableColumnRenderBag;
644
- rowIndex: number;
645
- rowActive: boolean;
646
- api: InfiniteTableApi<DATA_TYPE>;
647
- dataSourceApi: DataSourceApi<DATA_TYPE>;
648
- editError?: Error;
649
- column: COL_TYPE;
650
- columnsMap: Map<string, COL_TYPE>;
651
- fieldsToColumn: Map<keyof DATA_TYPE, COL_TYPE>;
652
- groupByColumn?: InfiniteTableComputedColumn<DATA_TYPE>;
653
- toggleCurrentGroupRow: () => void;
654
- toggleCurrentTreeNode: () => void;
655
- expandTreeNode: InfiniteTableToggleTreeNodeFn;
656
- collapseTreeNode: InfiniteTableToggleTreeNodeFn;
657
- toggleGroupRow: InfiniteTableToggleGroupRowFn;
658
- toggleTreeNode: InfiniteTableToggleTreeNodeFn;
659
- toggleCurrentTreeNodeSelection: () => void;
660
- toggleCurrentGroupRowSelection: () => void;
661
- toggleCurrentRowSelection: () => void;
662
- toggleCurrentRowDetails: () => void;
663
- toggleRowDetails: InfiniteTableToggleRowDetailsFn;
664
- expandRowDetails: InfiniteTableToggleRowDetailsFn;
665
- collapseRowDetails: InfiniteTableToggleRowDetailsFn;
666
- rowHasSelectedCells: boolean;
667
- cellSelected: boolean;
668
- selectCurrentRow: () => void;
669
- selectRow: InfiniteTableSelectRowFn;
670
- deselectRow: InfiniteTableSelectRowFn;
671
- deselectCurrentRow: () => void;
672
- selectCell: () => void;
673
- deselectCell: () => void;
674
- toggleRowSelection: InfiniteTableSelectRowFn;
675
- toggleGroupRowSelection: InfiniteTableToggleGroupRowFn;
676
- toggleTreeNodeSelection: InfiniteTableToggleTreeNodeFn;
677
- selectTreeNode: InfiniteTableToggleTreeNodeFn;
678
- deselectTreeNode: InfiniteTableToggleTreeNodeFn;
679
- selectionMode: DataSourcePropSelectionMode | undefined;
680
- rootGroupBy: DataSourceState<DATA_TYPE>['groupBy'];
681
- pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
741
+ declare type TreeSelectionStateConfig<_T = any> = {
742
+ treeDeepMap: DeepMap<any, DeepMapTreeValueType<any, any>>;
682
743
  };
683
- declare type InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
684
- declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE>;
685
- declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
686
- rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
687
- data: DATA_TYPE | Partial<DATA_TYPE> | null;
688
- dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
689
- rowIndex: number;
690
- column: COL_TYPE;
744
+ declare type GetTreeSelectionStateConfig<T> = () => TreeSelectionStateConfig<T>;
745
+ declare type NodeSelectionState = {
746
+ selected: boolean | null;
747
+ selectedCount: number;
748
+ deselectedCount: number;
749
+ leafCount: number;
691
750
  };
692
- declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
693
- isGroupRow: true;
694
- }) => Renderable | null;
695
- declare type InfiniteTableColumnRenderFunctionForParentNode<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
696
- isTreeNode: true;
697
- isParentNode: true;
698
- }) => Renderable | null;
699
- declare type InfiniteTableColumnRenderFunctionForLeafNode<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
700
- isTreeNode: true;
701
- isParentNode: false;
702
- }) => Renderable | null;
703
- declare type InfiniteTableColumnRenderFunctionForNode<DATA_TYPE, EXTRA_NODE_PARAMS = Partial<InfiniteTableRowInfoDataDiscriminator_ParentNode<DATA_TYPE> | InfiniteTableRowInfoDataDiscriminator_LeafNode<DATA_TYPE>>, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & EXTRA_NODE_PARAMS) => Renderable | null;
704
- declare type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
705
- isGroupRow: false;
706
- }) => Renderable | null;
707
- declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE>) => Renderable | null;
708
- declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
709
- declare type InfiniteTableColumnOrHeaderRenderFunction<T> = (params: (InfiniteTableColumnCellContextType<T> & {
710
- rowInfo: InfiniteTableRowInfo<T>;
711
- }) | (InfiniteTableColumnHeaderParam<T> & {
712
- rowInfo: null;
713
- })) => ReturnType<InfiniteTableColumnRenderFunction<T>>;
714
- declare type InfiniteTableColumnContentFocusable<T> = boolean | InfiniteTableColumnContentFocusableFn<T>;
715
- declare type InfiniteTableColumnEditable<T> = boolean | InfiniteTableColumnEditableFn<T>;
716
- declare type InfiniteTableColumnContentFocusableFn<T> = (params: InfiniteTableColumnContentFocusableParams<T>) => boolean;
717
- declare type InfiniteTableColumnEditableFn<T> = (params: InfiniteTableColumnEditableParams<T>) => boolean | Promise<boolean>;
718
- declare type InfiniteTableColumnContentFocusableParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T>;
719
- declare type InfiniteTableColumnEditableParams<T> = InfiniteTableColumnContentFocusableParams<T>;
720
- declare type InfiniteTableColumnGetValueToPersistParams<T> = InfiniteTableColumnEditableParams<T> & {
721
- initialValue: any;
751
+ declare class TreeSelectionState<T = any> {
752
+ selectedPaths: NodePath[] | null;
753
+ deselectedPaths: NodePath[] | null;
754
+ defaultSelection: boolean;
755
+ selectionMap: DeepMap<NodePath, boolean>;
756
+ cache: DeepMap<NodePath, NodeSelectionState>;
757
+ getConfig: GetTreeSelectionStateConfig<T>;
758
+ getTreeDeepMap(): DeepMap<any, DeepMapTreeValueType<any, any>>;
759
+ isLeafNode(nodePath: NodePath): boolean;
760
+ getLeafNodesCount(nodePath: NodePath): number;
761
+ static from<T>(treeSelectionState: TreeSelectionStateObject, getConfig: GetTreeSelectionStateConfig<T>): TreeSelectionState<T>;
762
+ constructor(state: TreeSelectionStateObject | TreeSelectionState, getConfig: GetTreeSelectionStateConfig<T>);
763
+ setConfigFn(getConfig: GetTreeSelectionStateConfig<T>): void;
764
+ xcache(): void;
765
+ update(stateObject: TreeSelectionStateObject): void;
766
+ setSelectionForPath(nodePath: NodePath, selected: boolean): void;
767
+ getState(): TreeSelectionStateObject;
768
+ deselectAll(): void;
769
+ selectAll(): void;
770
+ isNodeSelected(nodePath: NodePath): boolean | null;
771
+ private isSelfSelected;
772
+ private cacheIt;
773
+ private getSelectionStateForNode;
774
+ private isPathSelected;
775
+ private getNodeBooleanSelectionStateFromParent;
776
+ setNodeSelection(nodePath: NodePath, selected: boolean): void;
777
+ selectNode(nodePath: NodePath): void;
778
+ deselectNode(nodePath: any[]): void;
779
+ toggleNodeSelection(nodePath: NodePath): void;
780
+ getSelectedCount(): number;
781
+ getDeselectedCount(): number;
782
+ getSelectionCountFor(nodePath?: NodePath): {
783
+ selectedCount: number;
784
+ deselectedCount: number;
785
+ };
786
+ destroy(): void;
787
+ }
788
+
789
+ declare type DataSourceStateRestoreForDetail<T> = {
790
+ originalDataArray: DataSourceState<T>['originalDataArray'] | undefined;
791
+ groupBy: DataSourceState<T>['groupBy'] | undefined;
792
+ groupRowsState: DataSourceState<T>['groupRowsState'] | undefined;
793
+ pivotBy: DataSourceState<T>['pivotBy'] | undefined;
794
+ sortInfo: DataSourceState<T>['sortInfo'] | undefined;
795
+ filterValue: DataSourceState<T>['filterValue'] | undefined;
796
+ livePaginationCursor: DataSourceState<T>['livePaginationCursor'] | undefined;
722
797
  };
723
- declare type InfiniteTableColumnAlignValues = 'start' | 'center' | 'end';
724
- declare type InfiniteTableColumnVerticalAlignValues = 'start' | 'center' | 'end';
725
- declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
726
- declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
727
- declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
728
- declare type InfiniteTableColumnStylingFnParams<T> = {
729
- value: Renderable;
730
- column: InfiniteTableComputedColumn<T>;
731
- rowIndexInHorizontalLayoutPage: null | number;
732
- horizontalLayoutPageIndex: null | number;
733
- inEdit: boolean;
734
- rowHasSelectedCells: boolean;
735
- editError: InfiniteTableColumnRenderParamBase<T>['editError'];
736
- } & InfiniteTableRowInfoDataDiscriminator<T>;
737
- declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStylingFnParams<T>) => undefined | React__default.CSSProperties;
738
- declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
739
- declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React__default.CSSProperties;
740
- declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStylingFnParams<T>) => undefined | string;
741
- declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
742
- declare type InfiniteTableColumnAlign<T> = InfiniteTableColumnAlignValues | InfiniteTableColumnAlignFn<T>;
743
- declare type InfiniteTableColumnVerticalAlign<T> = InfiniteTableColumnVerticalAlignValues | InfiniteTableColumnVerticalAlignFn<T>;
744
- declare type InfiniteTableColumnAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnAlignValues;
745
- declare type InfiniteTableColumnAlignFnParams<T> = XOR<{
746
- isHeader: true;
747
- column: InfiniteTableComputedColumn<T>;
748
- }, InfiniteTableColumnStylingFnParams<T> & {
749
- isHeader: false;
750
- }>;
751
- declare type InfiniteTableColumnVerticalAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnVerticalAlignValues;
752
- declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
753
- declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
754
- declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
755
- declare type InfiniteTableColumnValueGetterParams<T> = ValueGetterParams<T>;
756
- declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
757
- declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
758
- declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
759
- declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
760
- declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
761
- declare type InfiniteTableColumnSortableFn<T> = (context: {
762
- api: InfiniteTableApi<T>;
763
- columnApi: InfiniteTableColumnApi<T>;
764
- column: InfiniteTableComputedColumn<T>;
765
- columns: Map<string, InfiniteTableComputedColumn<T>>;
766
- }) => boolean;
767
- declare type InfiniteTableColumnSortable<T> = boolean | InfiniteTableColumnSortableFn<T>;
768
- /**
769
- * Defines a column in the table.
770
- *
771
- * @typeParam DATA_TYPE The type of the data in the table.
772
- *
773
- * Can be bound to a field which is a `keyof DATA_TYPE`.
774
- */
775
- declare type InfiniteTableColumn<DATA_TYPE> = {
776
- field?: KeyOfNoSymbol<DATA_TYPE>;
777
- valueGetter?: InfiniteTableColumnValueGetter<DATA_TYPE>;
778
- defaultSortable?: InfiniteTableColumnSortable<DATA_TYPE>;
779
- /**
780
- * Whether the column is draggable by default.
781
- *
782
- * This prop overrides the top-level columnDefaultDraggable prop, but is
783
- * overridden by the top-level draggableColumns prop.
784
- */
785
- defaultDraggable?: boolean;
786
- resizable?: boolean;
787
- shouldAcceptEdit?: (params: InfiniteTablePropOnEditAcceptedParams<DATA_TYPE>) => boolean | Error | Promise<boolean | Error>;
788
- contentFocusable?: InfiniteTableColumnContentFocusable<DATA_TYPE>;
789
- defaultEditable?: InfiniteTableColumnEditable<DATA_TYPE>;
790
- getValueToEdit?: (params: InfiniteTableColumnEditableParams<DATA_TYPE>) => any | Promise<any>;
791
- getValueToPersist?: (params: InfiniteTableColumnGetValueToPersistParams<DATA_TYPE>) => any | Promise<any>;
792
- comparer?: InfiniteTableColumnComparer<DATA_TYPE>;
793
- defaultHiddenWhenGroupedBy?: '*' | true | keyof DATA_TYPE | {
794
- [k in keyof Partial<DATA_TYPE>]: true;
795
- };
796
- align?: InfiniteTableColumnAlign<DATA_TYPE>;
797
- headerAlign?: InfiniteTableColumnAlign<DATA_TYPE>;
798
- verticalAlign?: InfiniteTableColumnVerticalAlign<DATA_TYPE>;
799
- columnGroup?: string;
800
- header?: InfiniteTableColumnHeader<DATA_TYPE>;
801
- renderHeader?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
802
- name?: Renderable;
803
- cssEllipsis?: boolean;
804
- headerCssEllipsis?: boolean;
805
- type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
806
- dataType?: InfiniteTableDataTypeNames;
807
- sortType?: string | string[];
808
- filterType?: string;
809
- style?: InfiniteTableColumnStyle<DATA_TYPE>;
810
- headerStyle?: InfiniteTableColumnHeaderStyle<DATA_TYPE>;
811
- headerClassName?: InfiniteTableColumnHeaderClassName<DATA_TYPE>;
812
- className?: InfiniteTableColumnClassName<DATA_TYPE>;
813
- rowspan?: InfiniteTableColumnRowspanFn<DATA_TYPE>;
814
- render?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
815
- renderValue?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
816
- renderGroupValue?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
817
- renderLeafValue?: InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE>;
818
- valueFormatter?: InfiniteTableColumnValueFormatter<DATA_TYPE, Renderable>;
819
- defaultWidth?: number;
820
- defaultFlex?: number;
821
- defaultFilterable?: boolean;
822
- minWidth?: number;
823
- maxWidth?: number;
824
- renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
825
- renderRowDetailIcon?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
826
- renderTreeIcon?: boolean | InfiniteTableColumnRenderFunctionForNode<DATA_TYPE, {
827
- isTreeNode: true;
828
- isParentNode: boolean;
829
- isGroupRow: false;
830
- nodeExpanded: boolean;
831
- }>;
832
- renderTreeIconForParentNode?: InfiniteTableColumnRenderFunctionForParentNode<DATA_TYPE, {
833
- isTreeNode: true;
834
- isGroupRow: true;
835
- isParentNode: true;
836
- }>;
837
- renderTreeIconForLeafNode?: InfiniteTableColumnRenderFunctionForLeafNode<DATA_TYPE, {
838
- isTreeNode: true;
839
- isGroupRow: false;
840
- isLeafNode: true;
841
- }>;
842
- renderSortIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
843
- renderFilterIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
844
- renderSelectionCheckBox?: boolean | InfiniteTableColumnOrHeaderRenderFunction<DATA_TYPE>;
845
- renderMenuIcon?: boolean | InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
846
- renderHeaderSelectionCheckBox?: boolean | InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
847
- components?: {
848
- ColumnCell?: (props: HTMLProps<HTMLDivElement>) => JSX.Element | null;
849
- HeaderCell?: (props: HTMLProps<HTMLDivElement>) => JSX.Element | null;
850
- Editor?: () => JSX.Element | null;
851
- FilterEditor?: () => JSX.Element | null;
852
- FilterOperatorSwitch?: () => JSX.Element | null;
853
- MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
854
- };
855
- };
856
- declare type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'defaultSortable'> & {
857
- groupByForColumn: GroupBy<T> | GroupBy<T>[];
858
- id?: string;
859
- };
860
- declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
861
- declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
862
- pivotBy: DataSourcePivotBy<DataType>[];
863
- pivotTotalColumnGroup?: true;
864
- pivotGroupKeys: KeyType[];
865
- pivotByAtIndex: PivotBy<DataType, KeyType>;
866
- pivotGroupKey: KeyType;
867
- pivotIndex: number;
868
- };
869
- declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
870
- pivotBy: DataSourcePivotBy<DataType>[];
871
- pivotColumn: true;
872
- pivotTotalColumn: boolean;
873
- pivotAggregator: AggregationReducer<DataType, any>;
874
- pivotAggregatorIndex: number;
875
- pivotGroupKeys: KeyType[];
876
- pivotByAtIndex?: PivotBy<DataType, KeyType>;
877
- pivotIndex: number;
878
- pivotGroupKey: KeyType;
879
- };
880
- declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
881
- declare type InfiniteTableComputedColumnBase<T> = {
882
- computedFilterType: string;
883
- computedSortType: string | string[];
884
- computedDataType: string;
885
- computedWidth: number;
886
- computedFlex: number | null;
887
- computedMinWidth: number;
888
- computedMaxWidth: number;
889
- computedOffset: number;
890
- computedPinningOffset: number;
891
- computedAbsoluteOffset: number;
892
- computedSortInfo: DataSourceSingleSortInfo<T> | null;
893
- computedSorted: boolean;
894
- computedSortedAsc: boolean;
895
- computedSortedDesc: boolean;
896
- computedSortIndex: number;
897
- computedVisible: boolean;
898
- computedVisibleIndex: number;
899
- computedVisibleIndexInCategory: number;
900
- computedMultiSort: boolean;
901
- computedFiltered: boolean;
902
- computedFilterable: boolean;
903
- computedFilterValue: DataSourceFilterValueItem<T> | null;
904
- computedPinned: InfiniteTableColumnPinnedValues;
905
- computedDraggable: boolean;
906
- computedResizable: boolean;
907
- computedFirstInCategory: boolean;
908
- computedLastInCategory: boolean;
909
- computedFirst: boolean;
910
- computedLast: boolean;
911
- computedEditable: NonUndefined<InfiniteTableColumn<T>['defaultEditable']>;
912
- computedSortable: NonUndefined<InfiniteTableColumn<T>['defaultSortable']>;
913
- colType: InfiniteTableColumnType<T>;
914
- id: string;
798
+ declare type RowDetailCacheKey = string | number;
799
+ declare type RowDetailCacheEntry = {
800
+ all?: boolean;
801
+ groupBy?: boolean;
802
+ sortInfo?: boolean;
803
+ filterValue?: boolean;
804
+ data?: boolean;
805
+ livePaginationCursor?: boolean;
806
+ columnOrder?: boolean;
915
807
  };
916
- declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
917
- declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
918
808
 
919
- declare class RowSizeCache {
920
- rowHeight: Map<number, number>;
921
- rowDetailHeight: Map<number, number>;
922
- getTotalRowHeight(index: number): number;
923
- getRowHeight: (index: number) => number;
924
- getRowDetailHeight: (index: number) => number;
925
- getSize(index: number): {
926
- rowHeight: number;
927
- rowDetailHeight: number;
928
- totalRowHeight: number;
929
- };
809
+ interface RowDetailCacheStorage<_K, T> {
810
+ add(key: any, value: T): void;
811
+ get(key: any): T | undefined;
812
+ delete(key: any): void;
813
+ has(key: any): boolean;
814
+ }
815
+ interface RowDetailCacheStorageForCurrentRow<T = RowDetailCacheEntry> {
816
+ add(value: T): void;
817
+ get(): T | undefined;
818
+ delete(): void;
819
+ has(): boolean;
820
+ }
821
+ declare class RowDetailCache<K = RowDetailCacheKey, T = RowDetailCacheEntry> implements RowDetailCacheStorage<K, T> {
822
+ private cacheStorage;
823
+ constructor(cache?: boolean | number);
824
+ add(key: K, value: T): void;
825
+ get(key: K): T | undefined;
826
+ delete(key: K): void;
827
+ has(key: K): boolean;
930
828
  }
931
829
 
932
- declare type CellSelectionPosition<ROW_PRIMARY_KEY_TYPE = any, COL_ID = string> = [ROW_PRIMARY_KEY_TYPE, COL_ID];
933
- declare type CellSelectionStateObject = {
934
- selectedCells: CellSelectionPosition[];
935
- deselectedCells: CellSelectionPosition[];
936
- defaultSelection: boolean;
937
- } | {
938
- defaultSelection: true;
939
- deselectedCells: CellSelectionPosition[];
940
- selectedCells?: CellSelectionPosition[];
941
- } | {
942
- defaultSelection: false;
943
- selectedCells: CellSelectionPosition[];
944
- deselectedCells?: CellSelectionPosition[];
830
+ declare type BooleanCollectionStateKeys<KeyType> = true | KeyType[];
831
+ declare type BooleanCollectionStateObject<KeyType> = {
832
+ positiveItems: BooleanCollectionStateKeys<KeyType>;
833
+ negativeItems: BooleanCollectionStateKeys<KeyType>;
945
834
  };
946
- declare class CellSelectionState {
947
- wildcard: string;
948
- cache: DeepMap<any, boolean>;
949
- selectedRowsToColumns: Map<any, Set<string>>;
950
- selectedColumnsToRows: Map<string, Set<any>>;
951
- deselectedRowsToColumns: Map<any, Set<string>>;
952
- deselectedColumnsToRows: Map<string, Set<any>>;
953
- defaultSelection: boolean;
954
- constructor(clone?: CellSelectionStateObject | CellSelectionState);
955
- deselectAll: () => void;
956
- selectAll: () => void;
957
- selectCell(rowId: any, colId: string): void;
958
- deselectCell(rowId: any, colId: string): void;
959
- selectColumn(colId: string): void;
960
- deselectColumn(colId: string): void;
961
- setCellSelected(rowId: any, colId: string, selected: boolean): void;
962
- private setCellInDeselection;
963
- private setCellInSelection;
964
- update(stateObject: CellSelectionStateObject): void;
965
- /**
966
- * Returns whether there is at least one selected cell in the row
967
- *
968
- * @param rowId the row id
969
- * @param columnIds the columns currently available in the grid
970
- * @returns boolean
971
- */
972
- isCellSelectionInRow(rowId: any, columnIds: string[]): boolean;
973
- isCellSelected(rowId: any, colId: string): boolean;
974
- private isCellSelected_Internal;
975
- getState(): CellSelectionStateObject;
835
+ declare abstract class BooleanCollectionState<StateObject, KeyType> {
836
+ protected positiveMap?: Map<KeyType, true>;
837
+ protected negativeMap?: Map<KeyType, true>;
838
+ protected allNegative: boolean;
839
+ protected allPositive: boolean;
840
+ private initialState;
841
+ constructor(state: BooleanCollectionStateObject<KeyType> | BooleanCollectionState<StateObject, KeyType>);
842
+ abstract getPositiveFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
843
+ abstract getNegativeFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
844
+ abstract getState(): StateObject;
845
+ protected getInitialState(): BooleanCollectionStateObject<KeyType>;
846
+ destroy(): void;
847
+ private update;
848
+ protected isDefaultNegativeSelection(): boolean;
849
+ protected isDefaultPositiveSelection(): boolean;
850
+ protected areAllNegative(): boolean;
851
+ protected areAllPositive(): boolean;
852
+ protected makeAllNegative(): void;
853
+ protected makeAllPositive(): void;
854
+ protected isItemPositive(key: KeyType): boolean;
855
+ protected isItemNegative(key: KeyType): boolean;
856
+ protected setItemValue(key: KeyType, shouldMakePositive: boolean): void;
857
+ protected makeItemNegative(key: KeyType): void;
858
+ protected makeItemPositive(key: KeyType): void;
859
+ protected toggleItem(key: KeyType): void;
976
860
  }
977
861
 
978
- declare type CellPositionByIndex = {
862
+ declare class RowDetailState<KeyType = any> extends BooleanCollectionState<RowDetailStateObject<KeyType>, KeyType> {
863
+ constructor(state: RowDetailStateObject<KeyType> | RowDetailState<KeyType>);
864
+ getState(): RowDetailStateObject<KeyType>;
865
+ getPositiveFromState(state: RowDetailStateObject<KeyType>): true | KeyType[];
866
+ getNegativeFromState(state: RowDetailStateObject<KeyType>): true | KeyType[];
867
+ areAllCollapsed(): boolean;
868
+ areAllExpanded(): boolean;
869
+ collapseAll(): void;
870
+ expandAll(): void;
871
+ isRowDetailsExpanded: (key: KeyType) => boolean;
872
+ isRowDetailsCollapsed(key: KeyType): boolean;
873
+ setRowDetailsExpanded(key: KeyType, shouldExpand: boolean): void;
874
+ collapseRowDetails(key: KeyType): void;
875
+ expandRowDetails(key: KeyType): void;
876
+ toggleRowDetails(key: KeyType): void;
877
+ }
878
+
879
+ declare type TableRenderCellFnParam = {
880
+ domRef: RefCallback<HTMLElement>;
979
881
  rowIndex: number;
980
882
  colIndex: number;
883
+ rowspan: number;
884
+ colspan: number;
885
+ hidden: boolean;
886
+ width: number;
887
+ height: number;
888
+ widthWithColspan: number;
889
+ heightWithRowspan: number;
890
+ rowFixed: FixedPosition;
891
+ colFixed: FixedPosition;
892
+ onMouseEnter: VoidFunction;
893
+ onMouseLeave: VoidFunction;
981
894
  };
982
- declare type MultiSelectRangeOptions = {
983
- horizontalLayout: false;
984
- } | {
985
- horizontalLayout: true;
986
- rowsPerPage: number;
987
- columnsPerSet: number;
895
+ declare type TableRenderDetailRowFnParam = {
896
+ domRef: RefCallback<HTMLElement>;
897
+ rowIndex: number;
898
+ hidden: boolean;
899
+ height: number;
900
+ rowFixed: FixedPosition;
901
+ onMouseEnter: VoidFunction;
902
+ onMouseLeave: VoidFunction;
988
903
  };
989
-
990
- declare type MultiCellSelectorOptions = {
991
- getPrimaryKeyByIndex: (rowIndex: number) => string | number;
992
- getColumnIdByIndex: (colIndex: number) => string;
904
+ declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
905
+ declare type TableRenderDetailRowFn = (param: TableRenderDetailRowFnParam) => Renderable;
906
+ declare type RenderRangeOptions = {
907
+ force?: boolean;
908
+ renderCell: TableRenderCellFn;
909
+ renderDetailRow?: TableRenderDetailRowFn;
910
+ onRender: (items: Renderable[]) => void;
993
911
  };
994
- declare class MultiCellSelector {
995
- multiSelectStartPosition: CellPositionByIndex;
996
- multiSelectEndPosition?: CellPositionByIndex;
997
- getPrimaryKeyByIndex: MultiCellSelectorOptions['getPrimaryKeyByIndex'];
998
- getColumnIdByIndex: MultiCellSelectorOptions['getColumnIdByIndex'];
999
- _cellSelectionState: CellSelectionState;
1000
- constructor(options: MultiCellSelectorOptions);
1001
- private getCellSelectionPosition;
1002
- set cellSelectionState(cellSelectionState: CellSelectionState);
1003
- get cellSelectionState(): CellSelectionState;
1004
- /**
1005
- * This is the single click, without any modifier
1006
- */
1007
- resetClick(position: CellPositionByIndex): void;
1008
- /**
1009
- * This is the click with ctrl/cmd key pressed
1010
- * @param position CellPosition
1011
- */
1012
- singleAddClick(position: CellPositionByIndex): void;
1013
- multiSelectClick(position: CellPositionByIndex, options: MultiSelectRangeOptions): void;
1014
- setRangeSelected(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, selected: boolean, options: MultiSelectRangeOptions): void;
1015
- deselectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
1016
- selectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
912
+ declare type HorizontalLayoutColVisibilityOptions = {
913
+ horizontalLayoutPageIndex?: number;
914
+ };
915
+
916
+ interface GridCellInterface<T_ADDITIONAL_CELL_INFO = any> {
917
+ debugId: string;
918
+ update(content: Renderable, additionalInfo?: T_ADDITIONAL_CELL_INFO): void;
919
+ getElement(): HTMLElement | null;
920
+ getNode(): Renderable;
921
+ destroy(): void;
922
+ onMount(callback: (cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>) => void): void;
923
+ getAdditionalInfo(): T_ADDITIONAL_CELL_INFO | undefined;
924
+ isMounted(): boolean;
925
+ ref: (htmlElement: HTMLElement) => void;
1017
926
  }
1018
927
 
1019
- declare type RowSelectionStateItem = (any | any[])[];
1020
- declare type RowSelectionStateObject = {
1021
- selectedRows: RowSelectionStateItem;
1022
- deselectedRows: RowSelectionStateItem;
1023
- defaultSelection: boolean;
1024
- } | {
1025
- defaultSelection: true;
1026
- deselectedRows: RowSelectionStateItem;
1027
- selectedRows?: RowSelectionStateItem;
1028
- } | {
1029
- defaultSelection: false;
1030
- selectedRows: RowSelectionStateItem;
1031
- deselectedRows?: RowSelectionStateItem;
1032
- };
1033
- declare type RowSelectionStateConfig<T> = {
1034
- groupBy: DataSourceState<T>['groupBy'];
1035
- groupDeepMap: DataSourceState<T>['groupDeepMap'];
1036
- toPrimaryKey: DataSourceState<T>['toPrimaryKey'];
1037
- totalCount: number;
1038
- indexer: DataSourceState<T>['indexer'];
1039
- lazyLoad: boolean;
1040
- onlyUsePrimaryKeys: boolean;
1041
- };
1042
- declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
1043
- declare type RowSelectionStateOverride = {
1044
- getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
1045
- getGroupByLength: RowSelectionState<any>['getGroupByLength'];
1046
- getGroupCount: RowSelectionState<any>['getGroupCount'];
1047
- getGroupKeysDirectlyInsideGroup: RowSelectionState<any>['getGroupKeysDirectlyInsideGroup'];
1048
- getAllPrimaryKeysInsideGroup: RowSelectionState<any>['getAllPrimaryKeysInsideGroup'];
1049
- };
1050
- declare class RowSelectionState<T = any> {
1051
- selectedRows: RowSelectionStateItem | null;
1052
- deselectedRows: RowSelectionStateItem | null;
1053
- defaultSelection: boolean;
1054
- selectedMap: DeepMap<any, true>;
1055
- deselectedMap: DeepMap<any, true>;
1056
- onlyUsePrimaryKeys: boolean;
1057
- selectionCache: DeepMap<any, boolean | null>;
1058
- selectionCountCache: DeepMap<any, {
1059
- selectedCount: number;
1060
- deselectedCount: number;
1061
- }>;
1062
- getConfig: GetRowSelectionStateConfig<T>;
1063
- getGroupKeysForPrimaryKey(pk: any): any[];
1064
- getGroupDeepMap(): DeepMap<any, DeepMapGroupValueType<T, any>> | undefined;
1065
- getGroupCount(groupKeys: any[]): number;
1066
- getGroupKeysDirectlyInsideGroup(groupKeys: any[]): any[][];
1067
- getAllPrimaryKeysInsideGroup(groupKeys: any[]): any[];
1068
- getGroupByLength(): number;
1069
- static from<T>(rowSeleStateObject: RowSelectionStateObject, getConfig: GetRowSelectionStateConfig<T>, overrides?: RowSelectionStateOverride): RowSelectionState<T>;
1070
- constructor(state: RowSelectionStateObject | RowSelectionState, getConfig: GetRowSelectionStateConfig<T>, _forTestingOnly?: RowSelectionStateOverride);
1071
- mapSet: (name: 'selected' | 'deselected', key: any | any[]) => void;
1072
- _selectedMapSet: (key: any | any[]) => void;
1073
- _deselectedMapSet: (key: any | any[]) => void;
1074
- update(stateObject: RowSelectionStateObject): void;
1075
- private xcache;
1076
- getState(): RowSelectionStateObject;
1077
- deselectAll(): void;
1078
- selectAll(): void;
1079
- isRowDefaultSelected(): boolean;
1080
- isRowDefaultDeselected(): boolean;
1081
- /**
1082
- *
1083
- * @param key the id of the row - if a row in a grouped datasource, this is the final row id, without the group keys
1084
- * @param groupKeys the keys of row parents, in order
1085
- * @returns Whether the row is selected or not.
1086
- */
1087
- isRowSelected(key: any, groupKeys?: any[]): boolean;
1088
- isRowDeselected(key: any, groupKeys?: any[]): boolean;
1089
- setRowSelected(key: string | number, selected: boolean, groupKeys?: any[]): void;
928
+ declare type CellPos = [number, number];
929
+
930
+ declare class GridCellManager<T_ADDITIONAL_CELL_INFO> extends Logger {
931
+ private matrix;
932
+ private rowsWithCellsHistory;
933
+ private columnsWithCellsHistory;
934
+ private cellToMatrixPosition;
935
+ private pool;
936
+ debugId: string;
937
+ private offRemoveCell;
938
+ constructor(debugId: string);
939
+ private onRemoveCell;
940
+ set poolSize(cellCount: number);
941
+ get poolSize(): number;
942
+ getDetachedCell(): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
943
+ private clearCellFromMatrix;
944
+ private addCellToMatrix;
945
+ private setCellPositionInMatrix;
946
+ renderNodeAtCell(node: Renderable, cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>, cellPos: CellPos, additionalInfo?: T_ADDITIONAL_CELL_INFO): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
947
+ getCellPosition(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): CellPos | null;
948
+ getCellAt(cellPos: CellPos): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
1090
949
  /**
1091
- * Returns if the selection state ('full','partial','none') for the current group
1092
- *
1093
- * The selection state will be full (true) if either of those are true:
1094
- * * the group keys are specified as selected
1095
- * * all the children are specified as selected
950
+ * This gets a cell for a given position.
951
+ * If there's already a cell currently attached at that position, it will be returned.
1096
952
  *
1097
- * The selection state will be partial (null) if either of those are true:
1098
- * * the group keys are partially selected
1099
- * * some of the children are specified as selected
953
+ * Otherwise, we try to return the most optimal cell to use for that position.
954
+ * If the optimise parameter is set to 'row', we will try to return a detached cell
955
+ * that was last rendered in that row.
1100
956
  *
957
+ * If the optimise parameter is set to 'column', we will try to return a detached cell
958
+ * that was last rendered in that column.
1101
959
  *
1102
- * @param groupKeys the keys of the group row
1103
- * @param children leaf children that belong to the group
1104
- * @returns boolean
960
+ * @param cellPos [rowIndex, colIndex]
961
+ * @param optimise 'row' | 'column'
1105
962
  */
1106
- getGroupRowSelectionState(initialGroupKeys: any[]): boolean | null;
1107
- private getGroupRowBooleanSelectionStateFromParent;
1108
- isGroupRowPartlySelected(groupKeys: any[]): boolean;
1109
- isGroupRowSelected(groupKeys: any[]): boolean;
1110
- isGroupRowDeselected(groupKeys: any[]): boolean;
1111
- selectGroupRow(groupKeys: any[]): void;
1112
- deselectGroupRow(groupKeys: any[]): void;
1113
- setRowAsSelected(key: string | number, groupKeys?: any[]): void;
1114
- setRowAsDeselected(key: string | number, groupKeys?: any[]): void;
1115
- deselectRow(key: any, groupKeys?: any[]): void;
1116
- selectRow(key: any, groupKeys?: any[]): void;
1117
- toggleGroupRowSelection(groupKeys: any[]): void;
1118
- toggleRowSelection(key: string | number, groupKeys?: any[] | undefined): void;
1119
- getSelectedCount(): number;
1120
- getDeselectedCount(): number;
1121
- getSelectionCountFor(groupKeys?: any[], parentSelected?: boolean): {
1122
- selectedCount: number;
1123
- deselectedCount: number;
1124
- };
963
+ getCellFor(cellPos: CellPos, optimise: 'row' | 'column'): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
964
+ isCellAttached(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): boolean;
965
+ isCellAttachedAt(cellPos: CellPos): boolean;
966
+ getMatrix(): Renderable[][];
967
+ getAllCells(): GridCellInterface<T_ADDITIONAL_CELL_INFO>[];
968
+ getCellsForRow(rowIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO>[];
969
+ getOneAttachedCell(): any;
970
+ getRowsWithCells(): number[];
971
+ getColumnsWithCells(): number[];
972
+ isRowAttached(rowIndex: number): boolean;
973
+ isColumnAttached(colIndex: number): boolean;
974
+ detachRow(rowIndex: number): void;
975
+ detachCol(colIndex: number): void;
976
+ detachCell(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): boolean;
977
+ detachCells(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>): void;
978
+ detachRowsStartingWith(rowIndex: number): void;
979
+ detachColsStartingWith(colIndex: number): void;
980
+ detachCellsStartingAt(cellPos: CellPos): void;
981
+ detachCellAt(cellPos: CellPos): boolean;
982
+ onCellAttachmentChange(callback: (cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>, attached: boolean) => void): VoidFn;
983
+ getCellsOutsideRenderRange: (range: TableRenderRange) => Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>;
984
+ getCellFromListForRow(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>, rowIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
985
+ getCellFromListForColumn(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>, colIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
986
+ getCellCountInMatrix(): number;
987
+ destroy(): void;
988
+ reset(): void;
989
+ makeDetachedCellsEmpty(): void;
990
+ withDetachedCells(fn: (cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>) => void): void;
1125
991
  }
1126
992
 
1127
- declare type MultiRowSelectorOptions = {
1128
- getIdForIndex: (index: number) => string | number;
1129
- isRowDisabledAt: (index: number) => boolean;
1130
- };
1131
- declare class MultiRowSelector {
1132
- getIdForIndex: MultiRowSelectorOptions['getIdForIndex'];
1133
- isRowDisabledAt: MultiRowSelectorOptions['isRowDisabledAt'];
1134
- multiSelectStartIndex: number;
1135
- multiSelectEndIndex?: number;
1136
- _rowSelectionState: RowSelectionState;
1137
- constructor(options: MultiRowSelectorOptions);
1138
- set rowSelectionState(rowSelectionState: RowSelectionState);
1139
- get rowSelectionState(): RowSelectionState;
1140
- private selectRange;
1141
- private deselectRange;
1142
- /**
1143
- * This is the single click, without any modifier
1144
- */
1145
- resetClick(index: number): void;
993
+ /**
994
+ * This is only used for rendering Detail rows in a master-detail DataGrid
995
+ */
996
+ interface ListRowInterface {
997
+ debugId: string;
998
+ update(content: Renderable): void;
999
+ getElement(): HTMLElement | null;
1000
+ getNode(): Renderable;
1001
+ destroy(): void;
1002
+ onMount(callback: (row: ListRowInterface) => void): void;
1003
+ isMounted(): boolean;
1004
+ ref: (htmlElement: HTMLElement) => void;
1005
+ }
1006
+
1007
+ declare class ListRowManager extends Logger {
1008
+ private pool;
1009
+ private indexToRow;
1010
+ private rowToIndex;
1011
+ debugId: string;
1012
+ private offRemoveRow;
1013
+ constructor(debugId: string);
1014
+ private onRemoveRow;
1015
+ set poolSize(rowCount: number);
1016
+ get poolSize(): number;
1017
+ getDetachedRow(): ListRowInterface;
1146
1018
  /**
1147
- * This is the click with ctrl/cmd key pressed
1148
- * @param index
1019
+ * This gets a row for a given position.
1020
+ * If there's already a row currently attached at that position, it will be returned.
1021
+ *
1022
+ * Otherwise, we return another row.
1023
+ * @param rowIndex
1149
1024
  */
1150
- singleAddClick(index: number): void;
1151
- multiSelectClick(index: number): void;
1025
+ getRowFor(rowIndex: number): ListRowInterface;
1026
+ private setRowIndexInList;
1027
+ detachStartingWith(rowIndex: number): void;
1028
+ getRowAt(rowPos: number): ListRowInterface | undefined;
1029
+ getRowIndex(row: ListRowInterface): number | undefined;
1030
+ isRowAttached(row: ListRowInterface): boolean;
1031
+ isRowAttachedAt(rowIndex: number): boolean;
1032
+ getList(): Renderable[];
1033
+ getAttachedCount(): number;
1034
+ forEachAttachedRow(fn: (row: ListRowInterface) => void): void;
1035
+ getAttachedIndexes(): number[];
1036
+ getAllRows(): ListRowInterface[];
1037
+ detachRowAt(rowIndex: number): void;
1038
+ detachRow(row: ListRowInterface): void;
1039
+ renderNodeAtRow(node: Renderable, row: ListRowInterface, rowIndex: number): ListRowInterface;
1040
+ makeDetachedRowsEmpty(): void;
1041
+ onRowAttachmentChange(callback: (row: ListRowInterface, attached: boolean) => void): VoidFn;
1042
+ withDetachedRows(fn: (row: ListRowInterface) => void): void;
1043
+ destroy(): void;
1044
+ reset(): void;
1152
1045
  }
1153
1046
 
1154
- interface InfiniteTableComputedValues<T> {
1155
- scrollbars: {
1156
- vertical: boolean;
1157
- horizontal: boolean;
1047
+ declare class GridRenderer extends Logger {
1048
+ protected brain: MatrixBrain;
1049
+ debugId: string;
1050
+ protected destroyed: boolean;
1051
+ private scrolling;
1052
+ cellHoverClassNames: string[];
1053
+ cellDetachedClassNames: string[];
1054
+ protected cellManager: GridCellManager<{
1055
+ renderRowIndex: number;
1056
+ renderColIndex: number;
1057
+ }>;
1058
+ protected rowManager: ListRowManager;
1059
+ private lastEnteredRow;
1060
+ private lastExitedRow;
1061
+ private onDestroy;
1062
+ private hoverRowUpdatesInProgress;
1063
+ private infiniteNode;
1064
+ private getInfiniteNode;
1065
+ setDetailTransform: (element: HTMLElement, _rowIndex: number, { y, scrollTop, scrollLeft, }: {
1066
+ y: number;
1067
+ scrollTop?: boolean | undefined;
1068
+ scrollLeft?: number | undefined;
1069
+ }) => void;
1070
+ setTransform: (element: HTMLElement, _rowIndex: number, colIndex: number, { x, y, scrollLeft, scrollTop, }: {
1071
+ x: number;
1072
+ y: number;
1073
+ scrollLeft?: boolean | undefined;
1074
+ scrollTop?: boolean | undefined;
1075
+ }, zIndex: number | 'auto' | undefined | null) => void;
1076
+ constructor(brain: MatrixBrain, debugId?: string);
1077
+ private onCellAttached;
1078
+ private onCellDetached;
1079
+ private onRowAttached;
1080
+ private onRowDetached;
1081
+ getFullyVisibleRowsRange: () => {
1082
+ start: number;
1083
+ end: number;
1084
+ } | null;
1085
+ getScrollPositionForScrollRowIntoView: (rowIndex: number, config?: {
1086
+ scrollAdjustPosition?: ScrollAdjustPosition;
1087
+ offset?: number;
1088
+ colIndex?: number;
1089
+ }) => ScrollPosition | null;
1090
+ getScrollPositionForScrollColumnIntoView: (colIndex: number, config?: {
1091
+ scrollAdjustPosition?: ScrollAdjustPosition;
1092
+ offset?: number;
1093
+ } & HorizontalLayoutColVisibilityOptions) => ScrollPosition | null;
1094
+ getScrollPositionForScrollCellIntoView: (rowIndex: number, colIndex: number, config?: {
1095
+ rowScrollAdjustPosition?: ScrollAdjustPosition;
1096
+ colScrollAdjustPosition?: ScrollAdjustPosition;
1097
+ scrollAdjustPosition?: ScrollAdjustPosition;
1098
+ offsetTop: number;
1099
+ offsetLeft: number;
1100
+ }) => ScrollPosition | null;
1101
+ isRowFullyVisible: (rowIndex: number, offsetMargin?: number) => boolean;
1102
+ isRowVisible: (rowIndex: number, offsetMargin?: number) => boolean;
1103
+ isRowRendered: (rowIndex: number) => boolean;
1104
+ isCellVisible: (rowIndex: number, colIndex: number) => boolean;
1105
+ isCellFullyVisible: (rowIndex: number, colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1106
+ isColumnFullyVisible: (colIndex: number, offsetMargin?: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1107
+ isColumnVisible: (colIndex: number, offsetMargin?: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1108
+ isCellRendered: (rowIndex: number, colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1109
+ isColumnRendered: (colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1110
+ getExtraSpanCellsForRange: (range: TableRenderRange) => [number, number][];
1111
+ isCellRenderedAndMappedCorrectly(row: number, col: number): {
1112
+ rendered: boolean;
1113
+ mapped: boolean;
1158
1114
  };
1159
- multiRowSelector: MultiRowSelector;
1160
- multiCellSelector: MultiCellSelector;
1161
- computedRowHeight: number | ((index: number) => number);
1162
- computedRowSizeCacheForDetails: RowSizeCache | undefined;
1163
- renderSelectionCheckBox: boolean;
1164
- rowspan?: MatrixBrainOptions['rowspan'];
1165
- computedPinnedStartOverflow: boolean;
1166
- computedPinnedEndOverflow: boolean;
1167
- computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
1168
- computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
1169
- computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
1170
- computedVisibleColumns: InfiniteTableComputedColumn<T>[];
1171
- computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
1172
- computedColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
1173
- computedColumnsMapInInitialOrder: Map<string, InfiniteTableComputedColumn<T>>;
1174
- computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
1175
- computedPinnedStartColumnsWidth: number;
1176
- computedPinnedStartWidth: number;
1177
- computedPinnedEndColumnsWidth: number;
1178
- computedPinnedEndWidth: number;
1179
- computedUnpinnedColumnsWidth: number;
1180
- computedUnpinnedOffset: number;
1181
- computedPinnedEndOffset: number;
1182
- computedRemainingSpace: number;
1183
- fieldsToColumn: Map<keyof T, InfiniteTableComputedColumn<T>>;
1184
- toggleGroupRow: (groupKeys: any[]) => void;
1185
- columnSize: (colIndex: number) => number;
1115
+ renderRange(range: TableRenderRange, { renderCell, renderDetailRow, force, onRender }: RenderRangeOptions): Renderable[];
1116
+ getFixedRanges: (currentRenderRange: TableRenderRange) => TableRenderRange[];
1117
+ protected isCellFixed: (rowIndex: number, colIndex: number) => {
1118
+ row: FixedPosition;
1119
+ col: FixedPosition;
1120
+ };
1121
+ protected isCellCovered: (rowIndex: number, colIndex: number) => false | number[];
1122
+ private renderDetailRowAtElement;
1123
+ protected getCellRealCoordinates(rowIndex: number, colIndex: number): {
1124
+ rowIndex: number;
1125
+ colIndex: number;
1126
+ };
1127
+ protected renderCellAt(rowIndex: number, colIndex: number, cell: GridCellInterface, renderCell: TableRenderCellFn): void;
1128
+ protected onMouseEnter: (rowIndex: number) => void;
1129
+ private addHoverClass;
1130
+ protected onMouseLeave: (rowIndex: number) => void;
1131
+ private removeHoverClass;
1132
+ protected updateHoverClassNamesForRow: (rowIndex: number) => void;
1133
+ protected updateElementPosition: (cell: GridCellInterface<{
1134
+ renderRowIndex: number;
1135
+ renderColIndex: number;
1136
+ }>, options?: {
1137
+ hidden: boolean;
1138
+ rowspan: number;
1139
+ colspan: number;
1140
+ } | undefined) => void;
1141
+ private updateDetailElementPosition;
1142
+ private onScrollStart;
1143
+ private onScrollStop;
1144
+ adjustFixedElementsOnScroll: (scrollPosition?: ScrollPosition) => void;
1145
+ destroy: () => void;
1146
+ reset(): void;
1186
1147
  }
1187
1148
 
1188
- declare type PointCoords = {
1189
- top: number;
1190
- left: number;
1149
+ declare type CellPositionByIndex = {
1150
+ rowIndex: number;
1151
+ colIndex: number;
1191
1152
  };
1192
-
1193
- declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT, COMPONENT_SETUP_STATE> = {
1194
- [propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName], setupState: COMPONENT_SETUP_STATE) => TYPE_RESULT[propName]);
1153
+ declare type MultiSelectRangeOptions = {
1154
+ horizontalLayout: false;
1155
+ } | {
1156
+ horizontalLayout: true;
1157
+ rowsPerPage: number;
1158
+ columnsPerSet: number;
1195
1159
  };
1196
- declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
1197
- debugName?: string;
1198
- initSetupState?: (props: T_PROPS) => COMPONENT_SETUP_STATE;
1199
- layoutEffect?: boolean;
1200
- forwardProps?: (setupState: COMPONENT_SETUP_STATE, props: T_PROPS) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE>;
1201
- allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
1202
- interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
1203
- mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
1204
- onPropChange?: (params: {
1205
- name: keyof T_PROPS;
1206
- oldValue: any;
1207
- newValue: any;
1208
- }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
1209
- onPropsChange?: (newPropValues: {
1210
- [k in keyof T_PROPS]?: {
1211
- newValue: T_PROPS[k];
1212
- oldValue: T_PROPS[k];
1213
- };
1214
- }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>, state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>) => void;
1215
- mapPropsToState?: (params: {
1216
- props: T_PROPS;
1217
- state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
1218
- oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
1219
- parentState: T_PARENT_STATE | null;
1220
- }) => COMPONENT_DERIVED_STATE;
1221
- concludeReducer?: (params: {
1222
- previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
1223
- state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
1224
- updatedProps: Partial<T_PROPS> | null;
1225
- parentState: T_PARENT_STATE | null;
1226
- }) => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
1227
- getReducerActions?: (dispatch: React$1.Dispatch<any>) => T_ACTIONS;
1228
- getParentState?: () => T_PARENT_STATE;
1229
- cleanup?: (state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE) => void;
1230
- onControlledPropertyChange?: (name: string, newValue: any, oldValue: any) => void | ((value: any, oldValue: any) => any);
1231
- };
1232
- declare function buildManagedComponent<T_PROPS, COMPONENT_MAPPED_STATE extends object, COMPONENT_SETUP_STATE extends object = {}, COMPONENT_DERIVED_STATE extends object = {}, T_ACTIONS = {}, T_PARENT_STATE = {}>(config: ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE, COMPONENT_DERIVED_STATE, T_ACTIONS, T_PARENT_STATE>): {
1233
- ManagedComponentContextProvider: React$1.NamedExoticComponent<T_PROPS & {
1234
- children: React$1.ReactNode;
1235
- }>;
1236
- useManagedComponent: (props: T_PROPS) => {
1237
- contextValue: {
1238
- componentState: COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE;
1239
- componentActions: ComponentStateGeneratedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
1240
- getComponentState: () => COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE;
1241
- replaceState: (newState: COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE) => void;
1242
- assignState: (newState: Partial<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
1243
- };
1244
- ContextComponent: React$1.Context<ManagedComponentStateContextValue<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE, ComponentStateGeneratedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>>>;
1245
- };
1246
- };
1247
- declare function useManagedComponentState<COMPONENT_STATE>(): ManagedComponentStateContextValue<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
1248
1160
 
1249
- declare type NodePath$1<PRIMARY_KEY_TYPE = any> = PRIMARY_KEY_TYPE[];
1250
- declare type TreeExpandStateObject_ByPath<PRIMARY_KEY_TYPE = any> = {
1251
- expandedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
1252
- collapsedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
1253
- defaultExpanded: boolean;
1254
- collapsedIds?: never;
1255
- expandedIds?: never;
1256
- } | {
1257
- defaultExpanded: true;
1258
- collapsedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
1259
- expandedPaths?: NodePath$1<PRIMARY_KEY_TYPE>[];
1260
- collapsedIds?: never;
1261
- expandedIds?: never;
1262
- } | {
1263
- defaultExpanded: false;
1264
- collapsedPaths?: NodePath$1<PRIMARY_KEY_TYPE>[];
1265
- expandedPaths: NodePath$1<PRIMARY_KEY_TYPE>[];
1266
- collapsedIds?: never;
1267
- expandedIds?: never;
1268
- };
1269
- declare type TreeExpandStateObject_ById<PRIMARY_KEY_TYPE = any> = {
1270
- defaultExpanded: boolean;
1271
- expandedIds: PRIMARY_KEY_TYPE[];
1272
- collapsedIds: PRIMARY_KEY_TYPE[];
1273
- expandedPaths?: never;
1274
- collapsedPaths?: never;
1275
- } | {
1276
- defaultExpanded: true;
1277
- collapsedIds: PRIMARY_KEY_TYPE[];
1278
- expandedIds?: PRIMARY_KEY_TYPE[];
1279
- expandedPaths?: never;
1280
- collapsedPaths?: never;
1281
- } | {
1282
- defaultExpanded: false;
1283
- collapsedIds?: PRIMARY_KEY_TYPE[];
1284
- expandedIds: PRIMARY_KEY_TYPE[];
1285
- expandedPaths?: never;
1286
- collapsedPaths?: never;
1287
- };
1288
- declare type TreeExpandStateObject<PRIMARY_KEY_TYPE = any> = TreeExpandStateObject_ByPath<PRIMARY_KEY_TYPE> | TreeExpandStateObject_ById<PRIMARY_KEY_TYPE>;
1289
- declare type TreeExpandStateMode = 'id' | 'path';
1290
- declare class TreeExpandState<PRIMARY_KEY_TYPE = any> {
1291
- collapsedPathsMap: DeepMap<PRIMARY_KEY_TYPE, true>;
1292
- expandedPathsMap: DeepMap<PRIMARY_KEY_TYPE, true>;
1293
- collapsedIdsMap: Map<PRIMARY_KEY_TYPE, true>;
1294
- expandedIdsMap: Map<PRIMARY_KEY_TYPE, true>;
1295
- private _mode;
1296
- get mode(): TreeExpandStateMode;
1297
- defaultExpanded: boolean;
1298
- constructor(clone?: TreeExpandStateObject | TreeExpandState);
1299
- reset(): void;
1300
- destroy(): void;
1301
- expandAll: () => void;
1302
- collapseAll: () => void;
1303
- expandNode(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): void;
1304
- collapseNode(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): void;
1305
- setNodeExpanded(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>, expanded: boolean): void;
1306
- isNodeExpandedByPath(nodePath: NodePath$1<PRIMARY_KEY_TYPE>): boolean;
1307
- isNodeExpandedById(id: PRIMARY_KEY_TYPE): boolean;
1308
- isNodeExpanded(nodePathOrId: PRIMARY_KEY_TYPE | NodePath$1<PRIMARY_KEY_TYPE>): boolean;
1309
- update(stateObject: TreeExpandStateObject): void;
1310
- getState(): TreeExpandStateObject;
1161
+ declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
1162
+ interface SubscriptionCallback<T> {
1163
+ (node: T, callback?: () => void): void;
1164
+ get: () => T | null;
1165
+ destroy: VoidFn;
1166
+ onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
1311
1167
  }
1312
1168
 
1313
- declare type OnNodeStateChangeParam = DataSourceCallback_BaseParam<any> & {};
1314
- declare type TreeDataSourceOnlyProps<T> = {
1315
- nodesKey?: string;
1316
- treeSelection?: DataSourcePropTreeSelection;
1317
- treeFilterFunction?: DataSourcePropTreeFilterFunction<T>;
1318
- defaultTreeSelection?: DataSourcePropTreeSelection;
1319
- treeExpandState?: TreeExpandStateValue;
1320
- defaultTreeExpandState?: TreeExpandStateValue;
1321
- onTreeExpandStateChange?: (treeExpandState: TreeExpandStateObject<any>, params: {
1322
- dataSourceApi: DataSourceApi<T>;
1323
- nodePath: NodePath$1 | null;
1324
- nodeState: 'collapsed' | 'expanded';
1325
- }) => void;
1326
- onTreeDataMutations?: ({ dataArray, timestamp, treeMutations, nodesKey, }: {
1327
- nodesKey: keyof T | any;
1328
- dataArray: DataSourceState<T>['originalDataArray'];
1329
- timestamp: number;
1330
- treeMutations: NonUndefined<DataSourceState<T>['originalDataArrayChangedInfo']['treeMutations']>;
1331
- }) => void;
1332
- isNodeSelected?: DataSourcePropIsNodeSelected<T>;
1333
- isNodeSelectable?: DataSourcePropIsNodeSelectable<T>;
1334
- isNodeReadOnly?: DataSourcePropIsNodeReadOnly<T>;
1335
- /**
1336
- * Called when a node is expanded. Not called when treeApi.expandAll is called.
1337
- */
1338
- onNodeExpand?: (node: NodePath$1, param: OnNodeStateChangeParam) => void;
1339
- /**
1340
- * Called when a node is collapsed. Not called when treeApi.collapseAll is called.
1341
- */
1342
- onNodeCollapse?: (node: NodePath$1, param: OnNodeStateChangeParam) => void;
1343
- } & ({
1344
- selectionMode?: 'multi-row';
1345
- treeSelection?: DataSourcePropTreeSelection_MultiNode;
1346
- defaultTreeSelection?: DataSourcePropTreeSelection_MultiNode;
1347
- onTreeSelectionChange?: DataSourcePropOnTreeSelectionChange_MultiNode;
1348
- } | {
1349
- selectionMode?: 'single-row';
1350
- treeSelection?: DataSourcePropTreeSelection_SingleNode;
1351
- defaultTreeSelection?: DataSourcePropTreeSelection_SingleNode;
1352
- onTreeSelectionChange?: DataSourcePropOnTreeSelectionChange_SingleNode;
1353
- } | {
1354
- selectionMode?: 'single-cell';
1355
- cellSelection?: DataSourcePropCellSelection_SingleCell;
1356
- defaultCellSelection?: DataSourcePropCellSelection_SingleCell;
1357
- onCellSelectionChange?: DataSourcePropOnCellSelectionChange_SingleCell;
1358
- } | {
1359
- selectionMode?: 'multi-cell';
1360
- cellSelection?: DataSourcePropCellSelection_MultiCell;
1361
- defaultCellSelection?: DataSourcePropCellSelection_MultiCell;
1362
- onCellSelectionChange?: DataSourcePropOnCellSelectionChange_MultiCell;
1363
- } | {
1364
- selectionMode?: false;
1365
- }) & ({
1366
- isNodeCollapsed?: DataSourcePropIsNodeExpanded<T>;
1367
- isNodeExpanded?: never;
1368
- } | {
1369
- isNodeExpanded?: DataSourcePropIsNodeExpanded<T>;
1370
- isNodeCollapsed?: never;
1371
- });
1372
- declare type DataSourcePropsNotAvailableInTreeDataSource = keyof Pick<DataSourceProps<any>, 'groupBy' | 'defaultGroupBy' | 'nodesKey' | 'defaultGroupRowsState' | 'groupRowsState' | 'onGroupRowsStateChange' | 'onGroupByChange' | 'collapseGroupRowsOnDataFunctionChange' | 'livePagination' | 'onLivePaginationCursorChange' | 'groupMode' | 'filterFunction' | 'onPivotByChange' | 'pivotBy' | 'defaultPivotBy' | 'selectionMode' | 'rowSelection' | 'defaultRowSelection'>;
1373
- declare type TreeDataSourceProps<T> = Omit<DataSourceProps<T>, DataSourcePropsNotAvailableInTreeDataSource> & TreeDataSourceOnlyProps<T>;
1374
-
1375
- declare type NodePath = any[];
1376
- declare type TreeSelectionStateObject = {
1377
- selectedPaths: NodePath;
1378
- deselectedPaths: NodePath;
1379
- defaultSelection: boolean;
1380
- } | {
1381
- defaultSelection: true;
1382
- deselectedPaths: NodePath;
1383
- selectedPaths?: NodePath;
1384
- } | {
1385
- defaultSelection: false;
1386
- selectedPaths: NodePath;
1387
- deselectedPaths?: NodePath;
1388
- };
1389
- declare type TreeSelectionStateConfig<_T = any> = {
1390
- treeDeepMap: DeepMap<any, DeepMapTreeValueType<any, any>>;
1391
- };
1392
- declare type GetTreeSelectionStateConfig<T> = () => TreeSelectionStateConfig<T>;
1393
- declare type NodeSelectionState = {
1394
- selected: boolean | null;
1395
- selectedCount: number;
1396
- deselectedCount: number;
1397
- leafCount: number;
1398
- };
1399
- declare class TreeSelectionState<T = any> {
1400
- selectedPaths: NodePath[] | null;
1401
- deselectedPaths: NodePath[] | null;
1402
- defaultSelection: boolean;
1403
- selectionMap: DeepMap<NodePath, boolean>;
1404
- cache: DeepMap<NodePath, NodeSelectionState>;
1405
- getConfig: GetTreeSelectionStateConfig<T>;
1406
- getTreeDeepMap(): DeepMap<any, DeepMapTreeValueType<any, any>>;
1407
- isLeafNode(nodePath: NodePath): boolean;
1408
- getLeafNodesCount(nodePath: NodePath): number;
1409
- static from<T>(treeSelectionState: TreeSelectionStateObject, getConfig: GetTreeSelectionStateConfig<T>): TreeSelectionState<T>;
1410
- constructor(state: TreeSelectionStateObject | TreeSelectionState, getConfig: GetTreeSelectionStateConfig<T>);
1411
- setConfigFn(getConfig: GetTreeSelectionStateConfig<T>): void;
1412
- xcache(): void;
1413
- update(stateObject: TreeSelectionStateObject): void;
1414
- setSelectionForPath(nodePath: NodePath, selected: boolean): void;
1415
- getState(): TreeSelectionStateObject;
1416
- deselectAll(): void;
1417
- selectAll(): void;
1418
- isNodeSelected(nodePath: NodePath): boolean | null;
1419
- private isSelfSelected;
1420
- private cacheIt;
1421
- private getSelectionStateForNode;
1422
- private isPathSelected;
1423
- private getNodeBooleanSelectionStateFromParent;
1424
- setNodeSelection(nodePath: NodePath, selected: boolean): void;
1425
- selectNode(nodePath: NodePath): void;
1426
- deselectNode(nodePath: any[]): void;
1427
- toggleNodeSelection(nodePath: NodePath): void;
1428
- getSelectedCount(): number;
1429
- getDeselectedCount(): number;
1430
- getSelectionCountFor(nodePath?: NodePath): {
1431
- selectedCount: number;
1432
- deselectedCount: number;
1433
- };
1434
- destroy(): void;
1169
+ declare class ScrollListener {
1170
+ private scrollPosition;
1171
+ private onScrollFns;
1172
+ getScrollPosition: () => ScrollPosition;
1173
+ onScroll: (fn: OnScrollFn) => () => void;
1174
+ setScrollPosition: (scrollPosition: ScrollPosition) => void;
1175
+ private notifyScrollChange;
1176
+ destroy: () => void;
1435
1177
  }
1436
1178
 
1437
- declare type DataSourceStateRestoreForDetail<T> = {
1438
- originalDataArray: DataSourceState<T>['originalDataArray'] | undefined;
1439
- groupBy: DataSourceState<T>['groupBy'] | undefined;
1440
- groupRowsState: DataSourceState<T>['groupRowsState'] | undefined;
1441
- pivotBy: DataSourceState<T>['pivotBy'] | undefined;
1442
- sortInfo: DataSourceState<T>['sortInfo'] | undefined;
1443
- filterValue: DataSourceState<T>['filterValue'] | undefined;
1444
- livePaginationCursor: DataSourceState<T>['livePaginationCursor'] | undefined;
1179
+ declare type InfiniteTableBaseCellProps<T> = {
1180
+ column: InfiniteTableComputedColumn<T>;
1181
+ align?: InfiniteTableColumnAlignValues;
1182
+ horizontalLayoutPageIndex: number | null;
1183
+ rowId?: any;
1184
+ renderChildren: () => Renderable;
1185
+ width: number;
1186
+ cssEllipsis?: boolean;
1187
+ contentStyle?: CSSProperties;
1188
+ contentClassName?: string;
1189
+ virtualized?: boolean;
1190
+ skipColumnShifting?: boolean;
1191
+ beforeChildren?: Renderable;
1192
+ afterChildren?: Renderable;
1193
+ cssPosition?: CSSProperties['position'];
1194
+ domRef?: React.RefCallback<HTMLElement>;
1445
1195
  };
1446
- declare type RowDetailCacheKey = string | number;
1447
- declare type RowDetailCacheEntry = {
1448
- all?: boolean;
1449
- groupBy?: boolean;
1450
- sortInfo?: boolean;
1451
- filterValue?: boolean;
1452
- data?: boolean;
1453
- livePaginationCursor?: boolean;
1454
- columnOrder?: boolean;
1455
- };
1456
-
1457
- interface RowDetailCacheStorage<_K, T> {
1458
- add(key: any, value: T): void;
1459
- get(key: any): T | undefined;
1460
- delete(key: any): void;
1461
- has(key: any): boolean;
1462
- }
1463
- interface RowDetailCacheStorageForCurrentRow<T = RowDetailCacheEntry> {
1464
- add(value: T): void;
1465
- get(): T | undefined;
1466
- delete(): void;
1467
- has(): boolean;
1468
- }
1469
- declare class RowDetailCache<K = RowDetailCacheKey, T = RowDetailCacheEntry> implements RowDetailCacheStorage<K, T> {
1470
- private cacheStorage;
1471
- constructor(cache?: boolean | number);
1472
- add(key: K, value: T): void;
1473
- get(key: K): T | undefined;
1474
- delete(key: K): void;
1475
- has(key: K): boolean;
1476
- }
1196
+ declare type InfiniteTableCellProps<T> = ({
1197
+ cellType: 'header';
1198
+ } & InfiniteTableBaseCellProps<T>) | ({
1199
+ cellType: 'body';
1200
+ } & InfiniteTableBaseCellProps<T>);
1477
1201
 
1478
- declare type BooleanCollectionStateKeys<KeyType> = true | KeyType[];
1479
- declare type BooleanCollectionStateObject<KeyType> = {
1480
- positiveItems: BooleanCollectionStateKeys<KeyType>;
1481
- negativeItems: BooleanCollectionStateKeys<KeyType>;
1202
+ declare type DiscriminatedUnion<A, B> = (A & {
1203
+ [K in keyof B]?: undefined;
1204
+ }) | (B & {
1205
+ [K in keyof A]?: undefined;
1206
+ });
1207
+ declare type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
1208
+ /**
1209
+ * Restrict using either exclusively the keys of T or exclusively the keys of U.
1210
+ *
1211
+ * No unique keys of T can be used simultaneously with any unique keys of U.
1212
+ *
1213
+ * @example
1214
+ *```
1215
+ * const myVar: XOR<T, U>
1216
+ *```
1217
+ *
1218
+ * @see https://github.com/maninak/ts-xor/tree/master#description
1219
+ */
1220
+ declare type XOR<T, U> = T | U extends object ? Prettify<Without<T, U> & U> | Prettify<Without<U, T> & T> : T | U;
1221
+ /**
1222
+ * Useful if applying XOR on more than 2 types.
1223
+ * It comes with the penalty of having the types wrapped in an array
1224
+ *
1225
+ * @example
1226
+ * ```
1227
+ * AllXOR<[
1228
+ * { a: AModule },
1229
+ * { b: BModule },
1230
+ * { c: CModule },
1231
+ * { d: DModule }
1232
+ * ]>
1233
+ * ```
1234
+ * @see https://github.com/Microsoft/TypeScript/issues/14094#issuecomment-723571692
1235
+ */
1236
+ declare type AllXOR<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? AllXOR<[XOR<A, B>, ...Rest]> : never;
1237
+ /**
1238
+ * Get the keys of T without any keys of U.
1239
+ */
1240
+ declare type Without<T, U> = {
1241
+ [P in Exclude<keyof T, keyof U>]?: never;
1482
1242
  };
1483
- declare abstract class BooleanCollectionState<StateObject, KeyType> {
1484
- protected positiveMap?: Map<KeyType, true>;
1485
- protected negativeMap?: Map<KeyType, true>;
1486
- protected allNegative: boolean;
1487
- protected allPositive: boolean;
1488
- private initialState;
1489
- constructor(state: BooleanCollectionStateObject<KeyType> | BooleanCollectionState<StateObject, KeyType>);
1490
- abstract getPositiveFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
1491
- abstract getNegativeFromState(state: StateObject): BooleanCollectionStateKeys<KeyType>;
1492
- abstract getState(): StateObject;
1493
- protected getInitialState(): BooleanCollectionStateObject<KeyType>;
1494
- destroy(): void;
1495
- private update;
1496
- protected isDefaultNegativeSelection(): boolean;
1497
- protected isDefaultPositiveSelection(): boolean;
1498
- protected areAllNegative(): boolean;
1499
- protected areAllPositive(): boolean;
1500
- protected makeAllNegative(): void;
1501
- protected makeAllPositive(): void;
1502
- protected isItemPositive(key: KeyType): boolean;
1503
- protected isItemNegative(key: KeyType): boolean;
1504
- protected setItemValue(key: KeyType, shouldMakePositive: boolean): void;
1505
- protected makeItemNegative(key: KeyType): void;
1506
- protected makeItemPositive(key: KeyType): void;
1507
- protected toggleItem(key: KeyType): void;
1508
- }
1243
+ /**
1244
+ * Resolve mapped types and show the derived keys and their types when hovering in
1245
+ * IDEs, instead of just showing the names those mapped types are defined with.
1246
+ */
1247
+ declare type Prettify<T> = {
1248
+ [K in keyof T]: T[K];
1249
+ } & {};
1509
1250
 
1510
- declare class RowDetailState<KeyType = any> extends BooleanCollectionState<RowDetailStateObject<KeyType>, KeyType> {
1511
- constructor(state: RowDetailStateObject<KeyType> | RowDetailState<KeyType>);
1512
- getState(): RowDetailStateObject<KeyType>;
1513
- getPositiveFromState(state: RowDetailStateObject<KeyType>): true | KeyType[];
1514
- getNegativeFromState(state: RowDetailStateObject<KeyType>): true | KeyType[];
1515
- areAllCollapsed(): boolean;
1516
- areAllExpanded(): boolean;
1517
- collapseAll(): void;
1518
- expandAll(): void;
1519
- isRowDetailsExpanded: (key: KeyType) => boolean;
1520
- isRowDetailsCollapsed(key: KeyType): boolean;
1521
- setRowDetailsExpanded(key: KeyType, shouldExpand: boolean): void;
1522
- collapseRowDetails(key: KeyType): void;
1523
- expandRowDetails(key: KeyType): void;
1524
- toggleRowDetails(key: KeyType): void;
1525
- }
1251
+ declare type MenuIconProps = {
1252
+ lineWidth?: number;
1253
+ lineStyle?: React$1.CSSProperties;
1254
+ style?: React$1.CSSProperties;
1255
+ className?: string;
1256
+ domProps?: React$1.HTMLAttributes<HTMLDivElement>;
1257
+ reserveSpaceWhenHidden?: boolean;
1258
+ menuVisible?: boolean;
1259
+ children?: React$1.ReactNode;
1260
+ };
1261
+ declare function MenuIcon(props: MenuIconProps): React$1.JSX.Element;
1526
1262
 
1527
- declare type TableRenderCellFnParam = {
1528
- domRef: RefCallback<HTMLElement>;
1529
- rowIndex: number;
1530
- colIndex: number;
1531
- rowspan: number;
1532
- colspan: number;
1533
- hidden: boolean;
1534
- width: number;
1535
- height: number;
1536
- widthWithColspan: number;
1537
- heightWithRowspan: number;
1538
- rowFixed: FixedPosition;
1539
- colFixed: FixedPosition;
1540
- onMouseEnter: VoidFunction;
1541
- onMouseLeave: VoidFunction;
1263
+ declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
1264
+ declare type InfiniteTableToggleTreeNodeFn = (nodePath: any[]) => void;
1265
+ declare type InfiniteTableToggleRowDetailsFn = (id: any) => void;
1266
+ declare type InfiniteTableSelectRowFn = (id: any) => void;
1267
+ declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1268
+ dragging: boolean;
1269
+ column: COL_TYPE;
1270
+ columnsMap: Map<string, COL_TYPE>;
1271
+ columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
1272
+ columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
1273
+ selectionMode: DataSourcePropSelectionMode;
1274
+ horizontalLayoutPageIndex: null | number;
1275
+ allRowsSelected: boolean;
1276
+ someRowsSelected: boolean;
1277
+ filtered: boolean;
1278
+ api: InfiniteTableApi<DATA_TYPE>;
1279
+ dataSourceApi: DataSourceApi<DATA_TYPE>;
1280
+ columnApi: InfiniteTableColumnApi<DATA_TYPE>;
1281
+ renderBag: {
1282
+ all?: Renderable;
1283
+ header: string | number | Renderable;
1284
+ sortIcon?: Renderable;
1285
+ menuIcon?: Renderable;
1286
+ menuIconProps?: MenuIconProps;
1287
+ filterIcon?: Renderable;
1288
+ filterEditor?: Renderable;
1289
+ selectionCheckBox?: Renderable;
1290
+ };
1291
+ } & ({
1292
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
1293
+ htmlElementRef: React__default.MutableRefObject<HTMLElement | null>;
1294
+ insideColumnMenu: false;
1295
+ } | {
1296
+ insideColumnMenu: true;
1297
+ });
1298
+ declare type InfiniteTableColumnRenderBag = {
1299
+ value: string | number | Renderable;
1300
+ groupIcon?: Renderable;
1301
+ treeIcon?: Renderable;
1302
+ rowDetailsIcon?: Renderable;
1303
+ all?: Renderable;
1304
+ selectionCheckBox?: Renderable;
1542
1305
  };
1543
- declare type TableRenderDetailRowFnParam = {
1544
- domRef: RefCallback<HTMLElement>;
1306
+ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1307
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
1308
+ htmlElementRef: React__default.MutableRefObject<HTMLElement | null>;
1309
+ rowIndexInHorizontalLayoutPage: null | number;
1310
+ horizontalLayoutPageIndex: null | number;
1311
+ value: string | number | Renderable;
1312
+ align: InfiniteTableColumnAlignValues;
1313
+ verticalAlign: InfiniteTableColumnVerticalAlignValues;
1314
+ renderBag: InfiniteTableColumnRenderBag;
1545
1315
  rowIndex: number;
1546
- hidden: boolean;
1547
- height: number;
1548
- rowFixed: FixedPosition;
1549
- onMouseEnter: VoidFunction;
1550
- onMouseLeave: VoidFunction;
1316
+ rowActive: boolean;
1317
+ api: InfiniteTableApi<DATA_TYPE>;
1318
+ dataSourceApi: DataSourceApi<DATA_TYPE>;
1319
+ editError?: Error;
1320
+ column: COL_TYPE;
1321
+ columnsMap: Map<string, COL_TYPE>;
1322
+ fieldsToColumn: Map<keyof DATA_TYPE, COL_TYPE>;
1323
+ groupByColumn?: InfiniteTableComputedColumn<DATA_TYPE>;
1324
+ toggleCurrentGroupRow: () => void;
1325
+ toggleCurrentTreeNode: () => void;
1326
+ expandTreeNode: InfiniteTableToggleTreeNodeFn;
1327
+ collapseTreeNode: InfiniteTableToggleTreeNodeFn;
1328
+ toggleGroupRow: InfiniteTableToggleGroupRowFn;
1329
+ toggleTreeNode: InfiniteTableToggleTreeNodeFn;
1330
+ toggleCurrentTreeNodeSelection: () => void;
1331
+ toggleCurrentGroupRowSelection: () => void;
1332
+ toggleCurrentRowSelection: () => void;
1333
+ toggleCurrentRowDetails: () => void;
1334
+ toggleRowDetails: InfiniteTableToggleRowDetailsFn;
1335
+ expandRowDetails: InfiniteTableToggleRowDetailsFn;
1336
+ collapseRowDetails: InfiniteTableToggleRowDetailsFn;
1337
+ rowHasSelectedCells: boolean;
1338
+ cellSelected: boolean;
1339
+ selectCurrentRow: () => void;
1340
+ selectRow: InfiniteTableSelectRowFn;
1341
+ deselectRow: InfiniteTableSelectRowFn;
1342
+ deselectCurrentRow: () => void;
1343
+ selectCell: () => void;
1344
+ deselectCell: () => void;
1345
+ toggleRowSelection: InfiniteTableSelectRowFn;
1346
+ toggleGroupRowSelection: InfiniteTableToggleGroupRowFn;
1347
+ toggleTreeNodeSelection: InfiniteTableToggleTreeNodeFn;
1348
+ selectTreeNode: InfiniteTableToggleTreeNodeFn;
1349
+ deselectTreeNode: InfiniteTableToggleTreeNodeFn;
1350
+ selectionMode: DataSourcePropSelectionMode | undefined;
1351
+ rootGroupBy: DataSourceState<DATA_TYPE>['groupBy'];
1352
+ pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
1551
1353
  };
1552
- declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
1553
- declare type TableRenderDetailRowFn = (param: TableRenderDetailRowFnParam) => Renderable;
1554
- declare type RenderRangeOptions = {
1555
- force?: boolean;
1556
- renderCell: TableRenderCellFn;
1557
- renderDetailRow?: TableRenderDetailRowFn;
1558
- onRender: (items: Renderable[]) => void;
1354
+ declare type InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
1355
+ declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE>;
1356
+ declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
1357
+ rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
1358
+ data: DATA_TYPE | Partial<DATA_TYPE> | null;
1359
+ dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
1360
+ rowIndex: number;
1361
+ column: COL_TYPE;
1559
1362
  };
1560
- declare type HorizontalLayoutColVisibilityOptions = {
1561
- horizontalLayoutPageIndex?: number;
1363
+ declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
1364
+ isGroupRow: true;
1365
+ }) => Renderable | null;
1366
+ declare type InfiniteTableColumnRenderFunctionForParentNode<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
1367
+ isTreeNode: true;
1368
+ isParentNode: true;
1369
+ }) => Renderable | null;
1370
+ declare type InfiniteTableColumnRenderFunctionForLeafNode<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
1371
+ isTreeNode: true;
1372
+ isParentNode: false;
1373
+ }) => Renderable | null;
1374
+ declare type InfiniteTableColumnRenderFunctionForNode<DATA_TYPE, EXTRA_NODE_PARAMS = Partial<InfiniteTableRowInfoDataDiscriminator_ParentNode<DATA_TYPE> | InfiniteTableRowInfoDataDiscriminator_LeafNode<DATA_TYPE>>, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & EXTRA_NODE_PARAMS) => Renderable | null;
1375
+ declare type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE> & {
1376
+ isGroupRow: false;
1377
+ }) => Renderable | null;
1378
+ declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnCellContextType<DATA_TYPE, COL_TYPE>) => Renderable | null;
1379
+ declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
1380
+ declare type InfiniteTableColumnOrHeaderRenderFunction<T> = (params: (InfiniteTableColumnCellContextType<T> & {
1381
+ rowInfo: InfiniteTableRowInfo<T>;
1382
+ }) | (InfiniteTableColumnHeaderParam<T> & {
1383
+ rowInfo: null;
1384
+ })) => ReturnType<InfiniteTableColumnRenderFunction<T>>;
1385
+ declare type InfiniteTableColumnContentFocusable<T> = boolean | InfiniteTableColumnContentFocusableFn<T>;
1386
+ declare type InfiniteTableColumnEditable<T> = boolean | InfiniteTableColumnEditableFn<T>;
1387
+ declare type InfiniteTableColumnContentFocusableFn<T> = (params: InfiniteTableColumnContentFocusableParams<T>) => boolean;
1388
+ declare type InfiniteTableColumnEditableFn<T> = (params: InfiniteTableColumnEditableParams<T>) => boolean | Promise<boolean>;
1389
+ declare type InfiniteTableColumnContentFocusableParams<T> = InfiniteTableRowInfoDataDiscriminatorWithColumnAndApis<T>;
1390
+ declare type InfiniteTableColumnEditableParams<T> = InfiniteTableColumnContentFocusableParams<T>;
1391
+ declare type InfiniteTableColumnGetValueToPersistParams<T> = InfiniteTableColumnEditableParams<T> & {
1392
+ initialValue: any;
1562
1393
  };
1563
-
1564
- interface GridCellInterface<T_ADDITIONAL_CELL_INFO = any> {
1565
- debugId: string;
1566
- update(content: Renderable, additionalInfo?: T_ADDITIONAL_CELL_INFO): void;
1567
- getElement(): HTMLElement | null;
1568
- getNode(): Renderable;
1569
- destroy(): void;
1570
- onMount(callback: (cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>) => void): void;
1571
- getAdditionalInfo(): T_ADDITIONAL_CELL_INFO | undefined;
1572
- ref: (htmlElement: HTMLElement) => void;
1573
- }
1574
-
1575
- declare type CellPos = [number, number];
1576
-
1577
- declare class GridCellManager<T_ADDITIONAL_CELL_INFO> extends Logger {
1578
- private matrix;
1579
- private matrixWithHistory;
1580
- private cellToMatrixPosition;
1581
- private pool;
1582
- debugId: string;
1583
- private offRemoveCell;
1584
- constructor(debugId: string);
1585
- private onRemoveCell;
1586
- set poolSize(cellCount: number);
1587
- get poolSize(): number;
1588
- getDetachedCell(): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
1589
- private setCellPositionInMatrix;
1590
- renderNodeAtCell(node: Renderable, cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>, cellPos: CellPos, additionalInfo?: T_ADDITIONAL_CELL_INFO): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
1591
- getCellPosition(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): CellPos | null;
1592
- getCellAt(cellPos: CellPos): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
1593
- /**
1594
- * This gets a cell for a given position.
1595
- * If there's already a cell currently attached at that position, it will be returned.
1596
- *
1597
- * Otherwise, we try to return the most optimal cell to use for that position.
1598
- * If the optimise parameter is set to 'row', we will try to return a detached cell
1599
- * that was last rendered in that row.
1600
- *
1601
- * If the optimise parameter is set to 'column', we will try to return a detached cell
1602
- * that was last rendered in that column.
1603
- *
1604
- * @param cellPos [rowIndex, colIndex]
1605
- * @param optimise 'row' | 'column'
1606
- */
1607
- getCellFor(cellPos: CellPos, optimise: 'row' | 'column'): GridCellInterface<T_ADDITIONAL_CELL_INFO>;
1608
- isCellAttached(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): boolean;
1609
- isCellAttachedAt(cellPos: CellPos): boolean;
1610
- getMatrix(): Renderable[][];
1611
- getAllCells(): GridCellInterface<T_ADDITIONAL_CELL_INFO>[];
1612
- getCellsForRow(rowIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO>[];
1613
- getOneAttachedCell(): any;
1614
- getRowsWithCells(): number[];
1615
- getColumnsWithCells(): number[];
1616
- isRowAttached(rowIndex: number): boolean;
1617
- isColumnAttached(colIndex: number): boolean;
1618
- detachRow(rowIndex: number): void;
1619
- detachCol(colIndex: number): void;
1620
- detachCell(cell: GridCellInterface<T_ADDITIONAL_CELL_INFO>): void;
1621
- detachCells(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>): void;
1622
- detachRowsStartingWith(rowIndex: number): void;
1623
- detachColsStartingWith(colIndex: number): void;
1624
- detachCellsStartingAt(cellPos: CellPos): void;
1625
- detachCellAt(cellPos: CellPos): void;
1626
- getCellsOutsideRenderRange: (range: TableRenderRange) => Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>;
1627
- getCellFromListForRow(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>, rowIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
1628
- getCellFromListForColumn(cells: Set<GridCellInterface<T_ADDITIONAL_CELL_INFO>>, colIndex: number): GridCellInterface<T_ADDITIONAL_CELL_INFO> | undefined;
1629
- getCellCountInMatrix(): number;
1630
- destroy(): void;
1631
- reset(): void;
1632
- makeDetachedCellsEmpty(): void;
1633
- }
1634
-
1394
+ declare type InfiniteTableColumnAlignValues = 'start' | 'center' | 'end';
1395
+ declare type InfiniteTableColumnVerticalAlignValues = 'start' | 'center' | 'end';
1396
+ declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
1397
+ declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
1398
+ declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
1399
+ declare type InfiniteTableColumnStylingFnParams<T> = {
1400
+ value: Renderable;
1401
+ column: InfiniteTableComputedColumn<T>;
1402
+ rowIndexInHorizontalLayoutPage: null | number;
1403
+ horizontalLayoutPageIndex: null | number;
1404
+ inEdit: boolean;
1405
+ rowHasSelectedCells: boolean;
1406
+ editError: InfiniteTableColumnRenderParamBase<T>['editError'];
1407
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
1408
+ declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStylingFnParams<T>) => undefined | React__default.CSSProperties;
1409
+ declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
1410
+ declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React__default.CSSProperties;
1411
+ declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStylingFnParams<T>) => undefined | string;
1412
+ declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
1413
+ declare type InfiniteTableColumnAlign<T> = InfiniteTableColumnAlignValues | InfiniteTableColumnAlignFn<T>;
1414
+ declare type InfiniteTableColumnVerticalAlign<T> = InfiniteTableColumnVerticalAlignValues | InfiniteTableColumnVerticalAlignFn<T>;
1415
+ declare type InfiniteTableColumnAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnAlignValues;
1416
+ declare type InfiniteTableColumnAlignFnParams<T> = XOR<{
1417
+ isHeader: true;
1418
+ column: InfiniteTableComputedColumn<T>;
1419
+ }, InfiniteTableColumnStylingFnParams<T> & {
1420
+ isHeader: false;
1421
+ }>;
1422
+ declare type InfiniteTableColumnVerticalAlignFn<T> = (params: InfiniteTableColumnAlignFnParams<T>) => InfiniteTableColumnVerticalAlignValues;
1423
+ declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
1424
+ declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
1425
+ declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
1426
+ declare type InfiniteTableColumnValueGetterParams<T> = ValueGetterParams<T>;
1427
+ declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
1428
+ declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
1429
+ declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
1430
+ declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
1431
+ declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
1432
+ declare type InfiniteTableColumnSortableFn<T> = (context: {
1433
+ api: InfiniteTableApi<T>;
1434
+ columnApi: InfiniteTableColumnApi<T>;
1435
+ column: InfiniteTableComputedColumn<T>;
1436
+ columns: Map<string, InfiniteTableComputedColumn<T>>;
1437
+ }) => boolean;
1438
+ declare type InfiniteTableColumnSortable<T> = boolean | InfiniteTableColumnSortableFn<T>;
1635
1439
  /**
1636
- * This is only used for rendering Detail rows in a master-detail DataGrid
1440
+ * Defines a column in the table.
1441
+ *
1442
+ * @typeParam DATA_TYPE The type of the data in the table.
1443
+ *
1444
+ * Can be bound to a field which is a `keyof DATA_TYPE`.
1637
1445
  */
1638
- interface ListRowInterface {
1639
- debugId: string;
1640
- update(content: Renderable): void;
1641
- getElement(): HTMLElement | null;
1642
- getNode(): Renderable;
1643
- destroy(): void;
1644
- onMount(callback: (row: ListRowInterface) => void): void;
1645
- ref: (htmlElement: HTMLElement) => void;
1646
- }
1647
-
1648
- declare class ListRowManager extends Logger {
1649
- private pool;
1650
- private indexToRow;
1651
- private rowToIndex;
1652
- debugId: string;
1653
- private offRemoveRow;
1654
- constructor(debugId: string);
1655
- private onRemoveRow;
1656
- set poolSize(rowCount: number);
1657
- get poolSize(): number;
1658
- getDetachedRow(): ListRowInterface;
1446
+ declare type InfiniteTableColumn<DATA_TYPE> = {
1447
+ field?: KeyOfNoSymbol<DATA_TYPE>;
1448
+ valueGetter?: InfiniteTableColumnValueGetter<DATA_TYPE>;
1449
+ defaultSortable?: InfiniteTableColumnSortable<DATA_TYPE>;
1659
1450
  /**
1660
- * This gets a row for a given position.
1661
- * If there's already a row currently attached at that position, it will be returned.
1451
+ * Whether the column is draggable by default.
1662
1452
  *
1663
- * Otherwise, we return another row.
1664
- * @param rowIndex
1453
+ * This prop overrides the top-level columnDefaultDraggable prop, but is
1454
+ * overridden by the top-level draggableColumns prop.
1665
1455
  */
1666
- getRowFor(rowIndex: number): ListRowInterface;
1667
- private setRowIndexInList;
1668
- detachStartingWith(rowIndex: number): void;
1669
- getRowAt(rowPos: number): ListRowInterface | undefined;
1670
- getRowIndex(row: ListRowInterface): number | undefined;
1671
- isRowAttached(row: ListRowInterface): boolean;
1672
- isRowAttachedAt(rowIndex: number): boolean;
1673
- getList(): Renderable[];
1674
- getAttachedCount(): number;
1675
- forEachAttachedRow(fn: (row: ListRowInterface) => void): void;
1676
- getAttachedIndexes(): number[];
1677
- getAllRows(): ListRowInterface[];
1678
- detachRowAt(rowIndex: number): void;
1679
- detachRow(row: ListRowInterface): void;
1680
- renderNodeAtRow(node: Renderable, row: ListRowInterface, rowIndex: number): ListRowInterface;
1681
- makeDetachedRowsEmpty(): void;
1682
- destroy(): void;
1683
- reset(): void;
1684
- }
1685
-
1686
- declare class GridRenderer extends Logger {
1687
- protected brain: MatrixBrain;
1688
- debugId: string;
1689
- protected destroyed: boolean;
1690
- private scrolling;
1691
- cellHoverClassNames: string[];
1692
- protected cellManager: GridCellManager<{
1693
- renderRowIndex: number;
1694
- renderColIndex: number;
1695
- }>;
1696
- protected rowManager: ListRowManager;
1697
- private lastEnteredRow;
1698
- private lastExitedRow;
1699
- private onDestroy;
1700
- private hoverRowUpdatesInProgress;
1701
- private infiniteNode;
1702
- private getInfiniteNode;
1703
- setDetailTransform: (element: HTMLElement, _rowIndex: number, { y, scrollTop, scrollLeft, }: {
1704
- y: number;
1705
- scrollTop?: boolean | undefined;
1706
- scrollLeft?: number | undefined;
1707
- }) => void;
1708
- setTransform: (element: HTMLElement, _rowIndex: number, colIndex: number, { x, y, scrollLeft, scrollTop, }: {
1709
- x: number;
1710
- y: number;
1711
- scrollLeft?: boolean | undefined;
1712
- scrollTop?: boolean | undefined;
1713
- }, zIndex: number | 'auto' | undefined | null) => void;
1714
- constructor(brain: MatrixBrain, debugId?: string);
1715
- getFullyVisibleRowsRange: () => {
1716
- start: number;
1717
- end: number;
1718
- } | null;
1719
- getScrollPositionForScrollRowIntoView: (rowIndex: number, config?: {
1720
- scrollAdjustPosition?: ScrollAdjustPosition;
1721
- offset?: number;
1722
- colIndex?: number;
1723
- }) => ScrollPosition | null;
1724
- getScrollPositionForScrollColumnIntoView: (colIndex: number, config?: {
1725
- scrollAdjustPosition?: ScrollAdjustPosition;
1726
- offset?: number;
1727
- } & HorizontalLayoutColVisibilityOptions) => ScrollPosition | null;
1728
- getScrollPositionForScrollCellIntoView: (rowIndex: number, colIndex: number, config?: {
1729
- rowScrollAdjustPosition?: ScrollAdjustPosition;
1730
- colScrollAdjustPosition?: ScrollAdjustPosition;
1731
- scrollAdjustPosition?: ScrollAdjustPosition;
1732
- offsetTop: number;
1733
- offsetLeft: number;
1734
- }) => ScrollPosition | null;
1735
- isRowFullyVisible: (rowIndex: number, offsetMargin?: number) => boolean;
1736
- isRowVisible: (rowIndex: number, offsetMargin?: number) => boolean;
1737
- isRowRendered: (rowIndex: number) => boolean;
1738
- isCellVisible: (rowIndex: number, colIndex: number) => boolean;
1739
- isCellFullyVisible: (rowIndex: number, colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1740
- isColumnFullyVisible: (colIndex: number, offsetMargin?: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1741
- isColumnVisible: (colIndex: number, offsetMargin?: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1742
- isCellRendered: (rowIndex: number, colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1743
- isColumnRendered: (colIndex: number, opts?: HorizontalLayoutColVisibilityOptions | undefined) => boolean;
1744
- getExtraSpanCellsForRange: (range: TableRenderRange) => [number, number][];
1745
- isCellRenderedAndMappedCorrectly(row: number, col: number): {
1746
- rendered: boolean;
1747
- mapped: boolean;
1748
- };
1749
- renderRange(range: TableRenderRange, { renderCell, renderDetailRow, force, onRender }: RenderRangeOptions): Renderable[];
1750
- getFixedRanges: (currentRenderRange: TableRenderRange) => TableRenderRange[];
1751
- protected isCellFixed: (rowIndex: number, colIndex: number) => {
1752
- row: FixedPosition;
1753
- col: FixedPosition;
1456
+ defaultDraggable?: boolean;
1457
+ resizable?: boolean;
1458
+ shouldAcceptEdit?: (params: InfiniteTablePropOnEditAcceptedParams<DATA_TYPE>) => boolean | Error | Promise<boolean | Error>;
1459
+ contentFocusable?: InfiniteTableColumnContentFocusable<DATA_TYPE>;
1460
+ defaultEditable?: InfiniteTableColumnEditable<DATA_TYPE>;
1461
+ getValueToEdit?: (params: InfiniteTableColumnEditableParams<DATA_TYPE>) => any | Promise<any>;
1462
+ getValueToPersist?: (params: InfiniteTableColumnGetValueToPersistParams<DATA_TYPE>) => any | Promise<any>;
1463
+ comparer?: InfiniteTableColumnComparer<DATA_TYPE>;
1464
+ defaultHiddenWhenGroupedBy?: '*' | true | keyof DATA_TYPE | {
1465
+ [k in keyof Partial<DATA_TYPE>]: true;
1754
1466
  };
1755
- protected isCellCovered: (rowIndex: number, colIndex: number) => false | number[];
1756
- private renderDetailRowAtElement;
1757
- protected getCellRealCoordinates(rowIndex: number, colIndex: number): {
1758
- rowIndex: number;
1759
- colIndex: number;
1467
+ align?: InfiniteTableColumnAlign<DATA_TYPE>;
1468
+ headerAlign?: InfiniteTableColumnAlign<DATA_TYPE>;
1469
+ verticalAlign?: InfiniteTableColumnVerticalAlign<DATA_TYPE>;
1470
+ columnGroup?: string;
1471
+ header?: InfiniteTableColumnHeader<DATA_TYPE>;
1472
+ renderHeader?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
1473
+ name?: Renderable;
1474
+ cssEllipsis?: boolean;
1475
+ headerCssEllipsis?: boolean;
1476
+ type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
1477
+ dataType?: InfiniteTableDataTypeNames;
1478
+ sortType?: string | string[];
1479
+ filterType?: string;
1480
+ style?: InfiniteTableColumnStyle<DATA_TYPE>;
1481
+ headerStyle?: InfiniteTableColumnHeaderStyle<DATA_TYPE>;
1482
+ headerClassName?: InfiniteTableColumnHeaderClassName<DATA_TYPE>;
1483
+ className?: InfiniteTableColumnClassName<DATA_TYPE>;
1484
+ rowspan?: InfiniteTableColumnRowspanFn<DATA_TYPE>;
1485
+ render?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
1486
+ renderValue?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
1487
+ renderGroupValue?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
1488
+ renderLeafValue?: InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE>;
1489
+ valueFormatter?: InfiniteTableColumnValueFormatter<DATA_TYPE, Renderable>;
1490
+ defaultWidth?: number;
1491
+ defaultFlex?: number;
1492
+ defaultFilterable?: boolean;
1493
+ minWidth?: number;
1494
+ maxWidth?: number;
1495
+ renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
1496
+ renderRowDetailIcon?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
1497
+ renderTreeIcon?: boolean | InfiniteTableColumnRenderFunctionForNode<DATA_TYPE, {
1498
+ isTreeNode: true;
1499
+ isParentNode: boolean;
1500
+ isGroupRow: false;
1501
+ nodeExpanded: boolean;
1502
+ }>;
1503
+ renderTreeIconForParentNode?: InfiniteTableColumnRenderFunctionForParentNode<DATA_TYPE, {
1504
+ isTreeNode: true;
1505
+ isGroupRow: true;
1506
+ isParentNode: true;
1507
+ }>;
1508
+ renderTreeIconForLeafNode?: InfiniteTableColumnRenderFunctionForLeafNode<DATA_TYPE, {
1509
+ isTreeNode: true;
1510
+ isGroupRow: false;
1511
+ isLeafNode: true;
1512
+ }>;
1513
+ renderSortIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
1514
+ renderFilterIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
1515
+ renderSelectionCheckBox?: boolean | InfiniteTableColumnOrHeaderRenderFunction<DATA_TYPE>;
1516
+ renderMenuIcon?: boolean | InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
1517
+ renderHeaderSelectionCheckBox?: boolean | InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
1518
+ components?: {
1519
+ ColumnCell?: (props: HTMLProps<HTMLDivElement>) => JSX.Element | null;
1520
+ HeaderCell?: (props: HTMLProps<HTMLDivElement>) => JSX.Element | null;
1521
+ Editor?: () => JSX.Element | null;
1522
+ FilterEditor?: () => JSX.Element | null;
1523
+ FilterOperatorSwitch?: () => JSX.Element | null;
1524
+ MenuIcon?: (props: MenuIconProps) => JSX.Element | null;
1760
1525
  };
1761
- protected renderCellAt(rowIndex: number, colIndex: number, cell: GridCellInterface, renderCell: TableRenderCellFn): void;
1762
- protected onMouseEnter: (rowIndex: number) => void;
1763
- private addHoverClass;
1764
- protected onMouseLeave: (rowIndex: number) => void;
1765
- private removeHoverClass;
1766
- protected updateHoverClassNamesForRow: (rowIndex: number) => void;
1767
- protected updateElementPosition: (cell: GridCellInterface<{
1768
- renderRowIndex: number;
1769
- renderColIndex: number;
1770
- }>, options?: {
1771
- hidden: boolean;
1772
- rowspan: number;
1773
- colspan: number;
1774
- } | undefined) => void;
1775
- private updateDetailElementPosition;
1776
- private onScrollStart;
1777
- private onScrollStop;
1778
- adjustFixedElementsOnScroll: (scrollPosition?: ScrollPosition) => void;
1779
- destroy: () => void;
1780
- reset(): void;
1781
- }
1782
-
1783
- declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
1784
- interface SubscriptionCallback<T> {
1785
- (node: T, callback?: () => void): void;
1786
- get: () => T | null;
1787
- destroy: VoidFn;
1788
- onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
1789
- }
1790
-
1791
- declare class ScrollListener {
1792
- private scrollPosition;
1793
- private onScrollFns;
1794
- getScrollPosition: () => ScrollPosition;
1795
- onScroll: (fn: OnScrollFn) => () => void;
1796
- setScrollPosition: (scrollPosition: ScrollPosition) => void;
1797
- private notifyScrollChange;
1798
- destroy: () => void;
1799
- }
1526
+ };
1527
+ declare type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'defaultSortable'> & {
1528
+ groupByForColumn: GroupBy<T> | GroupBy<T>[];
1529
+ id?: string;
1530
+ };
1531
+ declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
1532
+ declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
1533
+ pivotBy: DataSourcePivotBy<DataType>[];
1534
+ pivotTotalColumnGroup?: true;
1535
+ pivotGroupKeys: KeyType[];
1536
+ pivotByAtIndex: PivotBy<DataType, KeyType>;
1537
+ pivotGroupKey: KeyType;
1538
+ pivotIndex: number;
1539
+ };
1540
+ declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
1541
+ pivotBy: DataSourcePivotBy<DataType>[];
1542
+ pivotColumn: true;
1543
+ pivotTotalColumn: boolean;
1544
+ pivotAggregator: AggregationReducer<DataType, any>;
1545
+ pivotAggregatorIndex: number;
1546
+ pivotGroupKeys: KeyType[];
1547
+ pivotByAtIndex?: PivotBy<DataType, KeyType>;
1548
+ pivotIndex: number;
1549
+ pivotGroupKey: KeyType;
1550
+ };
1551
+ declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
1552
+ declare type InfiniteTableComputedColumnBase<T> = {
1553
+ computedFilterType: string;
1554
+ computedSortType: string | string[];
1555
+ computedDataType: string;
1556
+ computedWidth: number;
1557
+ computedFlex: number | null;
1558
+ computedMinWidth: number;
1559
+ computedMaxWidth: number;
1560
+ computedOffset: number;
1561
+ computedPinningOffset: number;
1562
+ computedAbsoluteOffset: number;
1563
+ computedSortInfo: DataSourceSingleSortInfo<T> | null;
1564
+ computedSorted: boolean;
1565
+ computedSortedAsc: boolean;
1566
+ computedSortedDesc: boolean;
1567
+ computedSortIndex: number;
1568
+ computedVisible: boolean;
1569
+ computedVisibleIndex: number;
1570
+ computedVisibleIndexInCategory: number;
1571
+ computedMultiSort: boolean;
1572
+ computedFiltered: boolean;
1573
+ computedFilterable: boolean;
1574
+ computedFilterValue: DataSourceFilterValueItem<T> | null;
1575
+ computedPinned: InfiniteTableColumnPinnedValues;
1576
+ computedDraggable: boolean;
1577
+ computedResizable: boolean;
1578
+ computedFirstInCategory: boolean;
1579
+ computedLastInCategory: boolean;
1580
+ computedFirst: boolean;
1581
+ computedLast: boolean;
1582
+ computedEditable: NonUndefined<InfiniteTableColumn<T>['defaultEditable']>;
1583
+ computedSortable: NonUndefined<InfiniteTableColumn<T>['defaultSortable']>;
1584
+ colType: InfiniteTableColumnType<T>;
1585
+ id: string;
1586
+ };
1587
+ declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
1588
+ declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
1800
1589
 
1801
1590
  declare type CellContextMenuLocation = {
1802
1591
  rowId: any;
@@ -2067,6 +1856,138 @@ declare type InfiniteTableCellSelectionApi<T> = {
2067
1856
  };
2068
1857
  };
2069
1858
 
1859
+ declare type CellNavigationConfig = {
1860
+ direction: 'top' | 'bottom' | 'left' | 'right';
1861
+ };
1862
+ interface InfiniteTableKeyboardNavigationApi<T> {
1863
+ setKeyboardNavigation: (keyboardNavigation: NonUndefined<InfiniteTableProps<T>['keyboardNavigation']>) => void;
1864
+ setActiveCellIndex: (activeCellIndex: NonUndefined<InfiniteTableProps<T>['activeCellIndex']>) => void;
1865
+ setActiveRowIndex: (activeRowIndex: NonUndefined<InfiniteTableProps<T>['activeRowIndex']>) => void;
1866
+ gotoNextRow: () => number | false;
1867
+ gotoPreviousRow: () => number | false;
1868
+ gotoRow: (direction: 1 | -1) => number | false;
1869
+ gotoCell: (config: CellNavigationConfig) => false | [number, number];
1870
+ }
1871
+
1872
+ declare type InfiniteTableRowDetailApi = {
1873
+ isRowDetailExpanded(pk: any): boolean;
1874
+ isRowDetailCollapsed(pk: any): boolean;
1875
+ expandRowDetail(pk: any): void;
1876
+ collapseRowDetail(pk: any): void;
1877
+ toggleRowDetail(pk: any): void;
1878
+ collapseAllDetails(): void;
1879
+ expandAllDetails(): void;
1880
+ isRowDetailEnabledForRow(pk: any): boolean;
1881
+ };
1882
+
1883
+ declare type RowSelectionStateItem = (any | any[])[];
1884
+ declare type RowSelectionStateObject = {
1885
+ selectedRows: RowSelectionStateItem;
1886
+ deselectedRows: RowSelectionStateItem;
1887
+ defaultSelection: boolean;
1888
+ } | {
1889
+ defaultSelection: true;
1890
+ deselectedRows: RowSelectionStateItem;
1891
+ selectedRows?: RowSelectionStateItem;
1892
+ } | {
1893
+ defaultSelection: false;
1894
+ selectedRows: RowSelectionStateItem;
1895
+ deselectedRows?: RowSelectionStateItem;
1896
+ };
1897
+ declare type RowSelectionStateConfig<T> = {
1898
+ groupBy: DataSourceState<T>['groupBy'];
1899
+ groupDeepMap: DataSourceState<T>['groupDeepMap'];
1900
+ toPrimaryKey: DataSourceState<T>['toPrimaryKey'];
1901
+ totalCount: number;
1902
+ indexer: DataSourceState<T>['indexer'];
1903
+ lazyLoad: boolean;
1904
+ onlyUsePrimaryKeys: boolean;
1905
+ };
1906
+ declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
1907
+ declare type RowSelectionStateOverride = {
1908
+ getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
1909
+ getGroupByLength: RowSelectionState<any>['getGroupByLength'];
1910
+ getGroupCount: RowSelectionState<any>['getGroupCount'];
1911
+ getGroupKeysDirectlyInsideGroup: RowSelectionState<any>['getGroupKeysDirectlyInsideGroup'];
1912
+ getAllPrimaryKeysInsideGroup: RowSelectionState<any>['getAllPrimaryKeysInsideGroup'];
1913
+ };
1914
+ declare class RowSelectionState<T = any> {
1915
+ selectedRows: RowSelectionStateItem | null;
1916
+ deselectedRows: RowSelectionStateItem | null;
1917
+ defaultSelection: boolean;
1918
+ selectedMap: DeepMap<any, true>;
1919
+ deselectedMap: DeepMap<any, true>;
1920
+ onlyUsePrimaryKeys: boolean;
1921
+ selectionCache: DeepMap<any, boolean | null>;
1922
+ selectionCountCache: DeepMap<any, {
1923
+ selectedCount: number;
1924
+ deselectedCount: number;
1925
+ }>;
1926
+ getConfig: GetRowSelectionStateConfig<T>;
1927
+ getGroupKeysForPrimaryKey(pk: any): any[];
1928
+ getGroupDeepMap(): DeepMap<any, DeepMapGroupValueType<T, any>> | undefined;
1929
+ getGroupCount(groupKeys: any[]): number;
1930
+ getGroupKeysDirectlyInsideGroup(groupKeys: any[]): any[][];
1931
+ getAllPrimaryKeysInsideGroup(groupKeys: any[]): any[];
1932
+ getGroupByLength(): number;
1933
+ static from<T>(rowSeleStateObject: RowSelectionStateObject, getConfig: GetRowSelectionStateConfig<T>, overrides?: RowSelectionStateOverride): RowSelectionState<T>;
1934
+ constructor(state: RowSelectionStateObject | RowSelectionState, getConfig: GetRowSelectionStateConfig<T>, _forTestingOnly?: RowSelectionStateOverride);
1935
+ mapSet: (name: 'selected' | 'deselected', key: any | any[]) => void;
1936
+ _selectedMapSet: (key: any | any[]) => void;
1937
+ _deselectedMapSet: (key: any | any[]) => void;
1938
+ update(stateObject: RowSelectionStateObject): void;
1939
+ private xcache;
1940
+ getState(): RowSelectionStateObject;
1941
+ deselectAll(): void;
1942
+ selectAll(): void;
1943
+ isRowDefaultSelected(): boolean;
1944
+ isRowDefaultDeselected(): boolean;
1945
+ /**
1946
+ *
1947
+ * @param key the id of the row - if a row in a grouped datasource, this is the final row id, without the group keys
1948
+ * @param groupKeys the keys of row parents, in order
1949
+ * @returns Whether the row is selected or not.
1950
+ */
1951
+ isRowSelected(key: any, groupKeys?: any[]): boolean;
1952
+ isRowDeselected(key: any, groupKeys?: any[]): boolean;
1953
+ setRowSelected(key: string | number, selected: boolean, groupKeys?: any[]): void;
1954
+ /**
1955
+ * Returns if the selection state ('full','partial','none') for the current group
1956
+ *
1957
+ * The selection state will be full (true) if either of those are true:
1958
+ * * the group keys are specified as selected
1959
+ * * all the children are specified as selected
1960
+ *
1961
+ * The selection state will be partial (null) if either of those are true:
1962
+ * * the group keys are partially selected
1963
+ * * some of the children are specified as selected
1964
+ *
1965
+ *
1966
+ * @param groupKeys the keys of the group row
1967
+ * @param children leaf children that belong to the group
1968
+ * @returns boolean
1969
+ */
1970
+ getGroupRowSelectionState(initialGroupKeys: any[]): boolean | null;
1971
+ private getGroupRowBooleanSelectionStateFromParent;
1972
+ isGroupRowPartlySelected(groupKeys: any[]): boolean;
1973
+ isGroupRowSelected(groupKeys: any[]): boolean;
1974
+ isGroupRowDeselected(groupKeys: any[]): boolean;
1975
+ selectGroupRow(groupKeys: any[]): void;
1976
+ deselectGroupRow(groupKeys: any[]): void;
1977
+ setRowAsSelected(key: string | number, groupKeys?: any[]): void;
1978
+ setRowAsDeselected(key: string | number, groupKeys?: any[]): void;
1979
+ deselectRow(key: any, groupKeys?: any[]): void;
1980
+ selectRow(key: any, groupKeys?: any[]): void;
1981
+ toggleGroupRowSelection(groupKeys: any[]): void;
1982
+ toggleRowSelection(key: string | number, groupKeys?: any[] | undefined): void;
1983
+ getSelectedCount(): number;
1984
+ getDeselectedCount(): number;
1985
+ getSelectionCountFor(groupKeys?: any[], parentSelected?: boolean): {
1986
+ selectedCount: number;
1987
+ deselectedCount: number;
1988
+ };
1989
+ }
1990
+
2070
1991
  declare type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
2071
1992
  declare type InfiniteTableRowSelectionApi = {
2072
1993
  get allRowsSelected(): boolean;
@@ -2084,6 +2005,126 @@ declare type InfiniteTableRowSelectionApi = {
2084
2005
  deselectAll(): void;
2085
2006
  };
2086
2007
 
2008
+ declare enum InfiniteTableActionType {
2009
+ SET_COLUMN_SIZE = 0,
2010
+ SET_SCROLL_POSITION = 1,
2011
+ SET_BODY_SIZE = 2,
2012
+ SET_COLUMN_ORDER = 3,
2013
+ SET_COLUMN_VISIBILITY = 4,
2014
+ SET_COLUMN_SHIFTS = 5,
2015
+ SET_COLUMN_PINNING = 6,
2016
+ SET_COLUMN_AGGREGATIONS = 7,
2017
+ SET_DRAGGING_COLUMN_ID = 8
2018
+ }
2019
+
2020
+ declare type InfiniteTableAction = {
2021
+ type: InfiniteTableActionType;
2022
+ payload?: any;
2023
+ };
2024
+
2025
+ declare class RowSizeCache {
2026
+ rowHeight: Map<number, number>;
2027
+ rowDetailHeight: Map<number, number>;
2028
+ getTotalRowHeight(index: number): number;
2029
+ getRowHeight: (index: number) => number;
2030
+ getRowDetailHeight: (index: number) => number;
2031
+ getSize(index: number): {
2032
+ rowHeight: number;
2033
+ rowDetailHeight: number;
2034
+ totalRowHeight: number;
2035
+ };
2036
+ }
2037
+
2038
+ declare type MultiCellSelectorOptions = {
2039
+ getPrimaryKeyByIndex: (rowIndex: number) => string | number;
2040
+ getColumnIdByIndex: (colIndex: number) => string;
2041
+ };
2042
+ declare class MultiCellSelector {
2043
+ multiSelectStartPosition: CellPositionByIndex;
2044
+ multiSelectEndPosition?: CellPositionByIndex;
2045
+ getPrimaryKeyByIndex: MultiCellSelectorOptions['getPrimaryKeyByIndex'];
2046
+ getColumnIdByIndex: MultiCellSelectorOptions['getColumnIdByIndex'];
2047
+ _cellSelectionState: CellSelectionState;
2048
+ constructor(options: MultiCellSelectorOptions);
2049
+ private getCellSelectionPosition;
2050
+ set cellSelectionState(cellSelectionState: CellSelectionState);
2051
+ get cellSelectionState(): CellSelectionState;
2052
+ /**
2053
+ * This is the single click, without any modifier
2054
+ */
2055
+ resetClick(position: CellPositionByIndex): void;
2056
+ /**
2057
+ * This is the click with ctrl/cmd key pressed
2058
+ * @param position CellPosition
2059
+ */
2060
+ singleAddClick(position: CellPositionByIndex): void;
2061
+ multiSelectClick(position: CellPositionByIndex, options: MultiSelectRangeOptions): void;
2062
+ setRangeSelected(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, selected: boolean, options: MultiSelectRangeOptions): void;
2063
+ deselectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
2064
+ selectRange(startPosition: CellPositionByIndex, endPosition: CellPositionByIndex, options: MultiSelectRangeOptions): void;
2065
+ }
2066
+
2067
+ declare type MultiRowSelectorOptions = {
2068
+ getIdForIndex: (index: number) => string | number;
2069
+ isRowDisabledAt: (index: number) => boolean;
2070
+ };
2071
+ declare class MultiRowSelector {
2072
+ getIdForIndex: MultiRowSelectorOptions['getIdForIndex'];
2073
+ isRowDisabledAt: MultiRowSelectorOptions['isRowDisabledAt'];
2074
+ multiSelectStartIndex: number;
2075
+ multiSelectEndIndex?: number;
2076
+ _rowSelectionState: RowSelectionState;
2077
+ constructor(options: MultiRowSelectorOptions);
2078
+ set rowSelectionState(rowSelectionState: RowSelectionState);
2079
+ get rowSelectionState(): RowSelectionState;
2080
+ private selectRange;
2081
+ private deselectRange;
2082
+ /**
2083
+ * This is the single click, without any modifier
2084
+ */
2085
+ resetClick(index: number): void;
2086
+ /**
2087
+ * This is the click with ctrl/cmd key pressed
2088
+ * @param index
2089
+ */
2090
+ singleAddClick(index: number): void;
2091
+ multiSelectClick(index: number): void;
2092
+ }
2093
+
2094
+ interface InfiniteTableComputedValues<T> {
2095
+ scrollbars: {
2096
+ vertical: boolean;
2097
+ horizontal: boolean;
2098
+ };
2099
+ multiRowSelector: MultiRowSelector;
2100
+ multiCellSelector: MultiCellSelector;
2101
+ computedRowHeight: number | ((index: number) => number);
2102
+ computedRowSizeCacheForDetails: RowSizeCache | undefined;
2103
+ renderSelectionCheckBox: boolean;
2104
+ rowspan?: MatrixBrainOptions['rowspan'];
2105
+ computedPinnedStartOverflow: boolean;
2106
+ computedPinnedEndOverflow: boolean;
2107
+ computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
2108
+ computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
2109
+ computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
2110
+ computedVisibleColumns: InfiniteTableComputedColumn<T>[];
2111
+ computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
2112
+ computedColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
2113
+ computedColumnsMapInInitialOrder: Map<string, InfiniteTableComputedColumn<T>>;
2114
+ computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
2115
+ computedPinnedStartColumnsWidth: number;
2116
+ computedPinnedStartWidth: number;
2117
+ computedPinnedEndColumnsWidth: number;
2118
+ computedPinnedEndWidth: number;
2119
+ computedUnpinnedColumnsWidth: number;
2120
+ computedUnpinnedOffset: number;
2121
+ computedPinnedEndOffset: number;
2122
+ computedRemainingSpace: number;
2123
+ fieldsToColumn: Map<keyof T, InfiniteTableComputedColumn<T>>;
2124
+ toggleGroupRow: (groupKeys: any[]) => void;
2125
+ columnSize: (colIndex: number) => number;
2126
+ }
2127
+
2087
2128
  declare type InfiniteTableEventHandlerContext<T> = {
2088
2129
  getComputed: () => InfiniteTableComputedValues<T>;
2089
2130
  getState: () => InfiniteTableState<T>;
@@ -6467,17 +6508,6 @@ declare type MenuColumnRenderParam = {
6467
6508
  domProps: HTMLProps<HTMLDivElement>;
6468
6509
  };
6469
6510
 
6470
- declare type InfiniteTableRowDetailApi = {
6471
- isRowDetailExpanded(pk: any): boolean;
6472
- isRowDetailCollapsed(pk: any): boolean;
6473
- expandRowDetail(pk: any): void;
6474
- collapseRowDetail(pk: any): void;
6475
- toggleRowDetail(pk: any): void;
6476
- collapseAllDetails(): void;
6477
- expandAllDetails(): void;
6478
- isRowDetailEnabledForRow(pk: any): boolean;
6479
- };
6480
-
6481
6511
  declare type LoadMaskProps = {
6482
6512
  visible: boolean;
6483
6513
  children: Renderable;
@@ -6617,6 +6647,7 @@ interface InfiniteTableApi<T> {
6617
6647
  get rowDetailApi(): InfiniteTableRowDetailApi;
6618
6648
  get rowSelectionApi(): InfiniteTableRowSelectionApi;
6619
6649
  get cellSelectionApi(): InfiniteTableCellSelectionApi<T>;
6650
+ get keyboardNavigationApi(): InfiniteTableKeyboardNavigationApi<T>;
6620
6651
  get scrollContainer(): HTMLElement;
6621
6652
  setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
6622
6653
  setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
@@ -7214,4 +7245,4 @@ declare const components: {
7214
7245
  NumberFilterEditor: typeof NumberFilterEditor;
7215
7246
  };
7216
7247
 
7217
- export { AdvancedAlignable, CellSelectionState, CellSelectionStateObject, ColumnTypeWithInherit, DataClient, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceCallback_BaseParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourceMasterDetailContextValue, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsNodeExpanded, DataSourcePropIsNodeReadOnly, DataSourcePropIsNodeSelectable, DataSourcePropIsNodeSelected, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropOnTreeSelectionChange, DataSourcePropOnTreeSelectionChange_MultiNode, DataSourcePropOnTreeSelectionChange_SingleNode, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropShouldReloadData, DataSourcePropShouldReloadDataObject, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourcePropTreeFilterFunction, DataSourcePropTreeSelection, DataSourcePropTreeSelection_MultiNode, DataSourcePropTreeSelection_SingleNode, DataSourceProps, DataSourcePropsNotAvailableInTreeDataSource, DataSourcePropsWithChildren, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DataSourceUpdateParam, DebugLogger, DeepMap, ElementContainerGetter, FixedSizeSet, FlashingColumnCell, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroupVisibility, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGetContextMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropKeyboardShorcut, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTablePropsNotAvailableInTreeGrid, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, InfiniteTable_HasGrouping_RowInfoGroup, InfiniteTable_HasGrouping_RowInfoNormal, InfiniteTable_Tree_RowInfoLeafNode, InfiniteTable_Tree_RowInfoNode, InfiniteTable_Tree_RowInfoParentNode, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowDetailCache, RowDetailState, RowDetailStateObject, RowDisabledState, RowDisabledStateObject, RowSelectionState, ScrollStopInfo, Scrollbars, ShowOverlayFn, TableRenderRange, TreeDataSource, TreeDataSourceProps, TreeExpandState, TreeExpandStateValue, TreeGrid, TreeGridOnlyProps, TreeGridProps, TreeSelectionState, TreeSelectionValue, UpdateChildrenFn, UpdateOverlayContentFn, WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
7248
+ export { AdvancedAlignable, CellSelectionState, CellSelectionStateObject, ColumnTypeWithInherit, DataClient, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceCallback_BaseParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourceMasterDetailContextValue, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsNodeExpanded, DataSourcePropIsNodeReadOnly, DataSourcePropIsNodeSelectable, DataSourcePropIsNodeSelected, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropOnTreeSelectionChange, DataSourcePropOnTreeSelectionChange_MultiNode, DataSourcePropOnTreeSelectionChange_SingleNode, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropShouldReloadData, DataSourcePropShouldReloadDataObject, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourcePropTreeFilterFunction, DataSourcePropTreeSelection, DataSourcePropTreeSelection_MultiNode, DataSourcePropTreeSelection_SingleNode, DataSourceProps, DataSourcePropsNotAvailableInTreeDataSource, DataSourcePropsWithChildren, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DataSourceUpdateParam, DebugLogger, DeepMap, ElementContainerGetter, FixedSizeSet, FlashingColumnCell, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableCellSelectionApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTableKeyboardNavigationApi, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroupVisibility, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGetContextMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropKeyboardShorcut, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTablePropsNotAvailableInTreeGrid, InfiniteTableRowClassNameFn, InfiniteTableRowDetailApi, InfiniteTableRowInfo, InfiniteTableRowSelectionApi, InfiniteTableRowStyleFn, InfiniteTableState, InfiniteTable_HasGrouping_RowInfoGroup, InfiniteTable_HasGrouping_RowInfoNormal, InfiniteTable_Tree_RowInfoLeafNode, InfiniteTable_Tree_RowInfoNode, InfiniteTable_Tree_RowInfoParentNode, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemActionContext, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowDetailCache, RowDetailState, RowDetailStateObject, RowDisabledState, RowDisabledStateObject, RowSelectionState, ScrollStopInfo, Scrollbars, ShowOverlayFn, TableRenderRange, TreeDataSource, TreeDataSourceProps, TreeExpandState, TreeExpandStateValue, TreeGrid, TreeGridOnlyProps, TreeGridProps, TreeSelectionState, TreeSelectionValue, UpdateChildrenFn, UpdateOverlayContentFn, WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };