@infinite-table/infinite-react 0.2.3 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +28 -13
- package/index.esm.js +189 -90
- package/index.js +173 -74
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -348,8 +348,7 @@ declare module "components/DataSource/types" {
|
|
|
348
348
|
export interface DataSourceMappedState<T> {
|
|
349
349
|
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
350
350
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
351
|
-
|
|
352
|
-
lazyLoadBatchSize: DataSourceProps<T>['lazyLoadBatchSize'];
|
|
351
|
+
lazyLoad: DataSourceProps<T>['lazyLoad'];
|
|
353
352
|
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
354
353
|
data: DataSourceProps<T>['data'];
|
|
355
354
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
@@ -418,8 +417,9 @@ declare module "components/DataSource/types" {
|
|
|
418
417
|
primaryKey: keyof T;
|
|
419
418
|
fields?: (keyof T)[];
|
|
420
419
|
data: DataSourceData<T>;
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
lazyLoad?: boolean | {
|
|
421
|
+
batchSize?: number;
|
|
422
|
+
};
|
|
423
423
|
loading?: boolean;
|
|
424
424
|
defaultLoading?: boolean;
|
|
425
425
|
onLoadingChange?: (loading: boolean) => void;
|
|
@@ -457,6 +457,7 @@ declare module "components/DataSource/types" {
|
|
|
457
457
|
multiSort: boolean;
|
|
458
458
|
controlledSort: boolean;
|
|
459
459
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
460
|
+
lazyLoadBatchSize?: number;
|
|
460
461
|
}
|
|
461
462
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
462
463
|
export interface DataSourceContextValue<T> {
|
|
@@ -533,10 +534,13 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
533
534
|
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
534
535
|
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
535
536
|
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
536
|
-
lazyLoadBatchSize: 1 | ((value: number | undefined) => number | undefined);
|
|
537
537
|
aggregationReducers: 1 | ((value: import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined) => import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined);
|
|
538
538
|
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
539
|
-
|
|
539
|
+
lazyLoad: 1 | ((value: boolean | {
|
|
540
|
+
batchSize?: number | undefined;
|
|
541
|
+
} | undefined) => boolean | {
|
|
542
|
+
batchSize?: number | undefined;
|
|
543
|
+
} | undefined);
|
|
540
544
|
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
541
545
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
542
546
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
@@ -550,6 +554,7 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
550
554
|
export function onPropChange<T>(params: {
|
|
551
555
|
name: keyof T;
|
|
552
556
|
newValue: any;
|
|
557
|
+
oldValue: any;
|
|
553
558
|
}, props: DataSourceProps<T>, actions: DataSourceComponentActions<T>): void;
|
|
554
559
|
export function getInterceptActions<T>(): ComponentInterceptedActions<DataSourceState<T>>;
|
|
555
560
|
}
|
|
@@ -670,7 +675,9 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
670
675
|
draggable?: boolean;
|
|
671
676
|
resizable?: boolean;
|
|
672
677
|
comparer?: InfiniteTableColumnComparer<T>;
|
|
673
|
-
|
|
678
|
+
defaultHiddenWhenGroupedBy?: '*' | keyof T | {
|
|
679
|
+
[k in keyof Partial<T>]: true;
|
|
680
|
+
};
|
|
674
681
|
align?: InfiniteTableColumnAlign;
|
|
675
682
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
676
683
|
columnGroup?: string;
|
|
@@ -832,6 +839,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
832
839
|
collapsedGroupsCount?: number;
|
|
833
840
|
groupNesting?: number;
|
|
834
841
|
groupKeys?: any[];
|
|
842
|
+
flatRowInfoList?: (InfiniteTableRowInfo<T> | InfiniteTableEnhancedGroupInfo<T>)[];
|
|
835
843
|
parents?: InfiniteTableEnhancedGroupInfo<T>[];
|
|
836
844
|
indexInParentGroups?: number[];
|
|
837
845
|
indexInGroup: number;
|
|
@@ -845,6 +853,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
845
853
|
export type InfiniteTableEnhancedGroupInfo<T> = InfiniteTableRowInfo<T> & {
|
|
846
854
|
data: Partial<T> | null;
|
|
847
855
|
groupData: T[];
|
|
856
|
+
flatRowInfoList: (InfiniteTableRowInfo<T> | InfiniteTableEnhancedGroupInfo<T>)[];
|
|
848
857
|
value: any;
|
|
849
858
|
isGroupRow: true;
|
|
850
859
|
collapsedChildrenCount: number;
|
|
@@ -1131,6 +1140,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1131
1140
|
defaultWidth?: number;
|
|
1132
1141
|
defaultFlex?: number;
|
|
1133
1142
|
defaultPinned?: InfiniteTableColumnPinnedValues;
|
|
1143
|
+
defaultHiddenWhenGroupedBy?: InfiniteTableColumn<T>['defaultHiddenWhenGroupedBy'];
|
|
1134
1144
|
header?: InfiniteTableColumn<T>['header'];
|
|
1135
1145
|
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
1136
1146
|
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
@@ -1413,6 +1423,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1413
1423
|
computedColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1414
1424
|
rowHeightCSSVar: string;
|
|
1415
1425
|
headerHeightCSSVar: string;
|
|
1426
|
+
controlledColumnVisibility: boolean;
|
|
1416
1427
|
}
|
|
1417
1428
|
export type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
|
|
1418
1429
|
export interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
|
|
@@ -1439,9 +1450,11 @@ declare module "components/InfiniteTable/types/InfiniteTableAction" {
|
|
|
1439
1450
|
};
|
|
1440
1451
|
}
|
|
1441
1452
|
declare module "components/InfiniteTable/types/InfiniteTableComputedValues" {
|
|
1453
|
+
import type { VirtualBrainOptions } from "components/VirtualBrain/index";
|
|
1442
1454
|
import type { InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1443
1455
|
import type { InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1444
1456
|
export interface InfiniteTableComputedValues<T> {
|
|
1457
|
+
rowSpan?: VirtualBrainOptions['itemSpan'];
|
|
1445
1458
|
computedPinnedStartOverflow: boolean;
|
|
1446
1459
|
computedPinnedEndOverflow: boolean;
|
|
1447
1460
|
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
@@ -1480,11 +1493,11 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1480
1493
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1481
1494
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1482
1495
|
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnGroups, InfiniteTablePropRowStyle, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTablePropRowClassName, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableColumnSizingOptions, Scrollbars, InfiniteTableGroupColumnBase, InfiniteTablePropGroupColumn } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1483
|
-
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1496
|
+
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanFnParams } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1484
1497
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1485
1498
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1486
1499
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1487
|
-
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropGroupColumn, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnBase, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility as InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizing, InfiniteTablePropColumnSizingMap, InfiniteTableColumnSizingOptions, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1500
|
+
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTableColumnRowspanFnParams, InfiniteTablePropColumns, InfiniteTablePropGroupColumn, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnBase, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility as InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizing, InfiniteTablePropColumnSizingMap, InfiniteTableColumnSizingOptions, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1488
1501
|
}
|
|
1489
1502
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1490
1503
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
@@ -1661,7 +1674,6 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1661
1674
|
index: number;
|
|
1662
1675
|
};
|
|
1663
1676
|
};
|
|
1664
|
-
export const IS_GROUP_COLUMN_ID: (columnId: string) => boolean;
|
|
1665
1677
|
export type GetComputedVisibleColumnsResult<T> = {
|
|
1666
1678
|
computedRemainingSpace: number;
|
|
1667
1679
|
computedPinnedStartColumnsWidth: number;
|
|
@@ -2524,7 +2536,7 @@ declare module "components/VirtualList/VirtualRowList" {
|
|
|
2524
2536
|
export const VirtualRowList: (props: VirtualRowListProps & HTMLProps<HTMLDivElement>) => JSX.Element;
|
|
2525
2537
|
}
|
|
2526
2538
|
declare module "components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowTypes" {
|
|
2527
|
-
import type { VirtualBrain } from "components/VirtualBrain/index";
|
|
2539
|
+
import type { VirtualBrain, VirtualBrainOptions } from "components/VirtualBrain/index";
|
|
2528
2540
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
2529
2541
|
import type { InfiniteTableComputedColumn, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
2530
2542
|
import { InfiniteTableToggleGroupRowFn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
@@ -2539,6 +2551,7 @@ declare module "components/InfiniteTable/components/InfiniteTableRow/InfiniteTab
|
|
|
2539
2551
|
getData: () => InfiniteTableRowInfo<T>[];
|
|
2540
2552
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
2541
2553
|
repaintId?: number | string;
|
|
2554
|
+
rowSpan?: VirtualBrainOptions['itemSpan'];
|
|
2542
2555
|
virtualizeColumns: boolean;
|
|
2543
2556
|
showZebraRows?: boolean;
|
|
2544
2557
|
showHoverRows?: boolean;
|
|
@@ -2598,7 +2611,7 @@ declare module "components/InfiniteTable/components/InfiniteTableRow/InfiniteTab
|
|
|
2598
2611
|
export const TableRowUnvirtualized: typeof TableRowUnvirtualizedFn;
|
|
2599
2612
|
}
|
|
2600
2613
|
declare module "components/InfiniteTable/hooks/useUnpinnedRendering" {
|
|
2601
|
-
import type { VirtualBrain } from "components/VirtualBrain/index";
|
|
2614
|
+
import type { VirtualBrain, VirtualBrainOptions } from "components/VirtualBrain/index";
|
|
2602
2615
|
import type { Size } from "components/types/Size";
|
|
2603
2616
|
import type { InfiniteTableComputedColumn, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
2604
2617
|
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -2620,6 +2633,7 @@ declare module "components/InfiniteTable/hooks/useUnpinnedRendering" {
|
|
|
2620
2633
|
computedUnpinnedColumnsWidth: number;
|
|
2621
2634
|
computedPinnedStartWidth: number;
|
|
2622
2635
|
computedPinnedEndWidth: number;
|
|
2636
|
+
rowSpan?: VirtualBrainOptions['itemSpan'];
|
|
2623
2637
|
getState: () => InfiniteTableState<T>;
|
|
2624
2638
|
};
|
|
2625
2639
|
export function useUnpinnedRendering<T>(params: UnpinnedRenderingParams<T>): JSX.Element | null;
|
|
@@ -2667,7 +2681,7 @@ declare module "components/VirtualList/RowListWithExternalScrolling" {
|
|
|
2667
2681
|
export const RowListWithExternalScrolling: (props: RowListWithExternalScrollingListProps) => JSX.Element;
|
|
2668
2682
|
}
|
|
2669
2683
|
declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
2670
|
-
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2684
|
+
import { VirtualBrain, VirtualBrainOptions } from "components/VirtualBrain/index";
|
|
2671
2685
|
import type { InfiniteTableComputedColumn, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/types/index";
|
|
2672
2686
|
import type { Size } from "components/types/Size";
|
|
2673
2687
|
import type { RenderRow } from "components/VirtualList/types";
|
|
@@ -2693,6 +2707,7 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
2693
2707
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
2694
2708
|
computedPinnedStartColumnsWidth: number;
|
|
2695
2709
|
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
2710
|
+
rowSpan?: VirtualBrainOptions['itemSpan'];
|
|
2696
2711
|
};
|
|
2697
2712
|
export function usePinnedRenderingForSide<T>(side: 'start' | 'end', params: UsePinnedParams<T>): {
|
|
2698
2713
|
renderRowPinned: RenderRow;
|