@infinite-table/infinite-react 0.0.4 → 0.0.8
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/README.md +11 -71
- package/index.css +0 -3
- package/index.d.ts +194 -110
- package/index.esm.js +505 -268
- package/index.js +565 -328
- package/package.json +2 -2
- package/tmp.css.map +0 -1
package/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ declare module "components/types/ScrollPosition" {
|
|
|
8
8
|
export type SetScrollPosition = OnScrollFn;
|
|
9
9
|
}
|
|
10
10
|
declare module "utils/multisort/sortTypes" {
|
|
11
|
+
export const numberComparator: (first: number, second: number) => number;
|
|
12
|
+
export const stringComparator: (first: string, second: string) => number;
|
|
11
13
|
const sortTypes: {
|
|
12
14
|
[key: string]: (first: any, second: any) => number;
|
|
13
15
|
};
|
|
@@ -327,45 +329,6 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
327
329
|
state: DataSourceState<T>;
|
|
328
330
|
}): DataSourceDerivedState<T>;
|
|
329
331
|
}
|
|
330
|
-
declare module "components/DataSource/state/reducer" {
|
|
331
|
-
import type { DataSourceState, DataSourceDerivedState } from "components/DataSource/types";
|
|
332
|
-
export function concludeReducer<T>(params: {
|
|
333
|
-
previousState: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
334
|
-
state: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
335
|
-
}): DataSourceState<T> & DataSourceDerivedState<T>;
|
|
336
|
-
}
|
|
337
|
-
declare module "components/DataSource/index" {
|
|
338
|
-
import { DataSourceProps } from "components/DataSource/types";
|
|
339
|
-
import { useDataSource } from "components/DataSource/publicHooks/useDataSource";
|
|
340
|
-
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
341
|
-
function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
342
|
-
export { useDataSource, DataSource, GroupRowsState };
|
|
343
|
-
export * from "components/DataSource/types";
|
|
344
|
-
}
|
|
345
|
-
declare module "components/DataSource/GroupRowsState" {
|
|
346
|
-
import { DataSourceExpandedAndCollapsedGroupRows } from "components/DataSource/index";
|
|
347
|
-
export class GroupRowsState<KeyType extends any = any> {
|
|
348
|
-
private expandedMap?;
|
|
349
|
-
private collapsedMap?;
|
|
350
|
-
private collapsedAll;
|
|
351
|
-
private expandedAll;
|
|
352
|
-
private initialState;
|
|
353
|
-
constructor(state: DataSourceExpandedAndCollapsedGroupRows<KeyType> | GroupRowsState<KeyType>);
|
|
354
|
-
getState(): DataSourceExpandedAndCollapsedGroupRows<KeyType>;
|
|
355
|
-
destroy(): void;
|
|
356
|
-
private update;
|
|
357
|
-
areAllCollapsed(): boolean;
|
|
358
|
-
areAllExpanded(): boolean;
|
|
359
|
-
collapseAll(): void;
|
|
360
|
-
expandAll(): void;
|
|
361
|
-
isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
|
|
362
|
-
isGroupRowCollapsed(keys: KeyType[]): boolean;
|
|
363
|
-
setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
|
|
364
|
-
collapseGroupRow(keys: KeyType[]): void;
|
|
365
|
-
expandGroupRow(keys: KeyType[]): void;
|
|
366
|
-
toggleGroupRow(keys: KeyType[]): void;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
332
|
declare module "components/types/Renderable" {
|
|
370
333
|
import * as React from 'react';
|
|
371
334
|
export type Renderable = React.ReactNode;
|
|
@@ -393,6 +356,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
393
356
|
import type { DiscriminatedUnion, RequireAtLeastOne } from "components/InfiniteTable/types/Utility";
|
|
394
357
|
import type { InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
395
358
|
import { CSSProperties } from 'react';
|
|
359
|
+
import { PivotBy } from "utils/groupAndPivot/index";
|
|
396
360
|
export type { DiscriminatedUnion, RequireAtLeastOne };
|
|
397
361
|
export type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
398
362
|
export interface InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> {
|
|
@@ -435,16 +399,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
435
399
|
export type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
436
400
|
export type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
437
401
|
export type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
438
|
-
type
|
|
439
|
-
flex?: number;
|
|
440
|
-
defaultFlex?: number;
|
|
441
|
-
};
|
|
442
|
-
type InfiniteTableColumnWithWidth = {
|
|
443
|
-
width?: number;
|
|
444
|
-
defaultWidth?: number;
|
|
445
|
-
};
|
|
446
|
-
export type InfiniteTableColumnWithSize = DiscriminatedUnion<InfiniteTableColumnWithFlex, InfiniteTableColumnWithWidth>;
|
|
447
|
-
export type InfiniteTableColumnTypes = 'string' | 'number' | 'date';
|
|
402
|
+
export type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
448
403
|
export type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
|
|
449
404
|
field?: keyof T;
|
|
450
405
|
render?: InfiniteTableColumnRenderFunction<T>;
|
|
@@ -468,11 +423,12 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
468
423
|
};
|
|
469
424
|
export type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = Renderable> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
470
425
|
export type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanFnParams<T>) => number;
|
|
426
|
+
export type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
471
427
|
export type InfiniteTableBaseColumn<T> = {
|
|
472
|
-
maxWidth?: number;
|
|
473
|
-
minWidth?: number;
|
|
474
428
|
sortable?: boolean;
|
|
475
429
|
draggable?: boolean;
|
|
430
|
+
resizable?: boolean;
|
|
431
|
+
comparer?: InfiniteTableColumnComparer<T>;
|
|
476
432
|
align?: InfiniteTableColumnAlign;
|
|
477
433
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
478
434
|
columnGroup?: string;
|
|
@@ -480,22 +436,32 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
480
436
|
name?: Renderable;
|
|
481
437
|
cssEllipsis?: boolean;
|
|
482
438
|
headerCssEllipsis?: boolean;
|
|
483
|
-
type?:
|
|
439
|
+
type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
|
|
484
440
|
style?: InfiniteTableColumnStyle<T>;
|
|
485
441
|
className?: InfiniteTableColumnClassName<T>;
|
|
486
442
|
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
487
443
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
488
444
|
};
|
|
489
|
-
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T
|
|
445
|
+
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
490
446
|
export type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
491
447
|
groupByField?: string | string[];
|
|
448
|
+
id?: string;
|
|
492
449
|
};
|
|
493
450
|
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & {
|
|
494
451
|
pivotBy?: DataSourcePivotBy<T>[];
|
|
495
452
|
pivotColumn?: true;
|
|
496
453
|
pivotTotalColumn?: true;
|
|
497
454
|
pivotGroupKeys?: any[];
|
|
498
|
-
|
|
455
|
+
pivotByForColumn?: DataSourcePivotBy<T>;
|
|
456
|
+
pivotIndexForColumn?: number;
|
|
457
|
+
pivotGroupKeyForColumn?: any;
|
|
458
|
+
};
|
|
459
|
+
export type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTablePivotColumn<DataType> & {
|
|
460
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
461
|
+
pivotGroupKeys: KeyType[];
|
|
462
|
+
pivotByForColumn: PivotBy<DataType, KeyType>;
|
|
463
|
+
pivotIndexForColumn: number;
|
|
464
|
+
pivotGroupKeyForColumn: KeyType;
|
|
499
465
|
};
|
|
500
466
|
type InfiniteTableComputedColumnBase<T> = {
|
|
501
467
|
computedWidth: number;
|
|
@@ -521,12 +487,61 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
521
487
|
};
|
|
522
488
|
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & InfiniteTablePivotColumn<T> & InfiniteTableGeneratedGroupColumn<T>;
|
|
523
489
|
}
|
|
490
|
+
declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
491
|
+
import type { DataSourcePivotBy } from "components/DataSource/index";
|
|
492
|
+
import type { InfiniteTablePropColumnGroups, InfiniteTablePropColumnsMap } from "components/InfiniteTable/index";
|
|
493
|
+
import type { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
494
|
+
import type { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
495
|
+
import { DeepMap } from "utils/DeepMap";
|
|
496
|
+
export type ComputedColumnsAndGroups<DataType> = {
|
|
497
|
+
columns: InfiniteTablePropColumnsMap<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
498
|
+
columnGroups: InfiniteTablePropColumnGroups;
|
|
499
|
+
};
|
|
500
|
+
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>(deepMap: DeepMap<KeyType, boolean>, pivotBy: DataSourcePivotBy<DataType>[], pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition): ComputedColumnsAndGroups<DataType>;
|
|
501
|
+
}
|
|
502
|
+
declare module "components/DataSource/state/reducer" {
|
|
503
|
+
import type { DataSourceState, DataSourceDerivedState } from "components/DataSource/types";
|
|
504
|
+
export function concludeReducer<T>(params: {
|
|
505
|
+
previousState: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
506
|
+
state: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
507
|
+
}): DataSourceState<T> & DataSourceDerivedState<T>;
|
|
508
|
+
}
|
|
509
|
+
declare module "components/DataSource/index" {
|
|
510
|
+
import { DataSourceProps } from "components/DataSource/types";
|
|
511
|
+
import { useDataSource } from "components/DataSource/publicHooks/useDataSource";
|
|
512
|
+
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
513
|
+
function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
514
|
+
export { useDataSource, DataSource, GroupRowsState };
|
|
515
|
+
export * from "components/DataSource/types";
|
|
516
|
+
}
|
|
517
|
+
declare module "components/DataSource/GroupRowsState" {
|
|
518
|
+
import { DataSourceExpandedAndCollapsedGroupRows } from "components/DataSource/index";
|
|
519
|
+
export class GroupRowsState<KeyType extends any = any> {
|
|
520
|
+
private expandedMap?;
|
|
521
|
+
private collapsedMap?;
|
|
522
|
+
private collapsedAll;
|
|
523
|
+
private expandedAll;
|
|
524
|
+
private initialState;
|
|
525
|
+
constructor(state: DataSourceExpandedAndCollapsedGroupRows<KeyType> | GroupRowsState<KeyType>);
|
|
526
|
+
getState(): DataSourceExpandedAndCollapsedGroupRows<KeyType>;
|
|
527
|
+
destroy(): void;
|
|
528
|
+
private update;
|
|
529
|
+
areAllCollapsed(): boolean;
|
|
530
|
+
areAllExpanded(): boolean;
|
|
531
|
+
collapseAll(): void;
|
|
532
|
+
expandAll(): void;
|
|
533
|
+
isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
|
|
534
|
+
isGroupRowCollapsed(keys: KeyType[]): boolean;
|
|
535
|
+
setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
|
|
536
|
+
collapseGroupRow(keys: KeyType[]): void;
|
|
537
|
+
expandGroupRow(keys: KeyType[]): void;
|
|
538
|
+
toggleGroupRow(keys: KeyType[]): void;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
524
541
|
declare module "utils/groupAndPivot/index" {
|
|
525
|
-
import { DataSourcePivotBy } from "@infinite-table/infinite-react";
|
|
526
542
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
527
|
-
import { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
528
|
-
import { InfiniteTableGroupColumnBase
|
|
529
|
-
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
543
|
+
import { InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
544
|
+
import { InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
530
545
|
import { DeepMap } from "utils/DeepMap";
|
|
531
546
|
export type AggregationReducer<T, AggregationResultType> = {
|
|
532
547
|
initialValue: AggregationResultType;
|
|
@@ -582,9 +597,13 @@ declare module "utils/groupAndPivot/index" {
|
|
|
582
597
|
export type GroupBy<DataType, KeyType> = {
|
|
583
598
|
field: keyof DataType;
|
|
584
599
|
toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
|
|
585
|
-
column?: InfiniteTableGroupColumnBase<DataType
|
|
600
|
+
column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
|
|
601
|
+
};
|
|
602
|
+
export type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
603
|
+
column?: InfiniteTablePivotColumn<DataType> | (({ column, }: {
|
|
604
|
+
column: InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
605
|
+
}) => Partial<InfiniteTablePivotColumn<DataType>>);
|
|
586
606
|
};
|
|
587
|
-
export type PivotBy<DataType, KeyType> = GroupBy<DataType, KeyType>;
|
|
588
607
|
type GroupParams<DataType, KeyType> = {
|
|
589
608
|
groupBy: GroupBy<DataType, KeyType>[];
|
|
590
609
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
@@ -610,11 +629,6 @@ declare module "utils/groupAndPivot/index" {
|
|
|
610
629
|
export function enhancedFlatten<DataType, KeyType = any>(param: EnhancedFlattenParam<DataType, KeyType>): {
|
|
611
630
|
data: InfiniteTableRowInfo<DataType>[];
|
|
612
631
|
};
|
|
613
|
-
export type ComputedColumnsAndGroups<DataType> = {
|
|
614
|
-
columns: InfiniteTablePropColumns<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
615
|
-
columnGroups: InfiniteTablePropColumnGroups;
|
|
616
|
-
};
|
|
617
|
-
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>(deepMap: DeepMap<KeyType, boolean>, pivotBy: DataSourcePivotBy<DataType>[], pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition): ComputedColumnsAndGroups<DataType>;
|
|
618
632
|
}
|
|
619
633
|
declare module "components/InfiniteTable/theme.css" {
|
|
620
634
|
export const ThemeVars: import("@vanilla-extract/private").MapLeafNodes<{
|
|
@@ -801,7 +815,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
801
815
|
import { DataSourceGroupRowsBy, DataSourcePropGroupRowsBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
802
816
|
import { Renderable } from "components/types/Renderable";
|
|
803
817
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
804
|
-
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction,
|
|
818
|
+
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
805
819
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
806
820
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
807
821
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
@@ -821,6 +835,31 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
821
835
|
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
822
836
|
};
|
|
823
837
|
export type InfiniteTablePropColumnAggregations<T> = Map<string, InfiniteTableColumnAggregator<T, any>>;
|
|
838
|
+
export type InfiniteTableColumnType<T> = {
|
|
839
|
+
minWidth?: number;
|
|
840
|
+
maxWidth?: number;
|
|
841
|
+
width?: number;
|
|
842
|
+
flex?: number;
|
|
843
|
+
header?: InfiniteTableColumn<T>['header'];
|
|
844
|
+
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
845
|
+
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
846
|
+
sortable?: InfiniteTableColumn<T>['sortable'];
|
|
847
|
+
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
848
|
+
align?: InfiniteTableColumn<T>['align'];
|
|
849
|
+
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
850
|
+
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
851
|
+
render?: InfiniteTableColumn<T>['render'];
|
|
852
|
+
};
|
|
853
|
+
export type InfiniteTablePropColumnTypesMap<T> = Map<'default' | string, InfiniteTableColumnType<T>>;
|
|
854
|
+
export type InfiniteTablePropColumnTypes<T> = InfiniteTablePropColumnTypesMap<T> | Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
855
|
+
export type InfiniteTableColumnSizingOptions = {
|
|
856
|
+
flex?: number;
|
|
857
|
+
width?: number;
|
|
858
|
+
minWidth?: number;
|
|
859
|
+
maxWidth?: number;
|
|
860
|
+
};
|
|
861
|
+
export type InfiniteTablePropColumnSizingMap = Map<string, InfiniteTableColumnSizingOptions>;
|
|
862
|
+
export type InfiniteTablePropColumnSizing = InfiniteTablePropColumnSizingMap | Record<string, InfiniteTableColumnSizingOptions>;
|
|
824
863
|
export type InfiniteTableImperativeApi<T> = {
|
|
825
864
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
826
865
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
@@ -834,8 +873,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
834
873
|
rowHeight: number;
|
|
835
874
|
___t?: T;
|
|
836
875
|
};
|
|
837
|
-
export type
|
|
876
|
+
export type InfiniteTablePropColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
|
|
877
|
+
export type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = InfiniteTablePropColumnsMap<T, ColumnType> | Record<string, ColumnType>;
|
|
838
878
|
export type InfiniteTableColumns<T> = InfiniteTablePropColumns<T>;
|
|
879
|
+
export type InfiniteTableColumnsMap<T> = InfiniteTablePropColumnsMap<T>;
|
|
839
880
|
export type InfiniteTablePropColumnGroups = Map<string, InfiniteTableColumnGroup>;
|
|
840
881
|
/**
|
|
841
882
|
* the keys is an array of strings: first string in the array is the column group id, next strings are the ids of all columns in the group
|
|
@@ -865,30 +906,33 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
865
906
|
groupCount: number;
|
|
866
907
|
groupRowsBy: DataSourceGroupRowsBy<T>[];
|
|
867
908
|
};
|
|
868
|
-
export type
|
|
909
|
+
export type InfiniteTablePivotColumnGetterOptions<T> = {
|
|
869
910
|
column: InfiniteTablePivotColumn<T>;
|
|
870
911
|
groupRowsBy: DataSourcePropGroupRowsBy<T>;
|
|
871
912
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
872
913
|
};
|
|
873
914
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
874
|
-
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> &
|
|
915
|
+
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> & {
|
|
875
916
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
917
|
+
id?: string;
|
|
876
918
|
};
|
|
877
|
-
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> &
|
|
919
|
+
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
878
920
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
921
|
+
id?: string;
|
|
879
922
|
};
|
|
880
923
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
881
924
|
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => InfiniteTableGroupColumnBase<T>;
|
|
882
|
-
export type InfiniteTablePropPivotColumn<T> = InfiniteTablePivotColumnBase<T> | ((options:
|
|
925
|
+
export type InfiniteTablePropPivotColumn<T> = InfiniteTablePivotColumnBase<T> | ((options: InfiniteTablePivotColumnGetterOptions<T>) => InfiniteTablePivotColumnBase<T>);
|
|
883
926
|
export type InfiniteTablePropPivotRowLabelsColumn<T> = InfiniteTablePropPivotColumn<T>;
|
|
884
927
|
export type InfiniteTablePropComponents = {
|
|
885
928
|
LoadMask?: React.FC<LoadMaskProps>;
|
|
886
929
|
};
|
|
887
930
|
export interface InfiniteTableProps<T> {
|
|
888
931
|
columns: InfiniteTablePropColumns<T>;
|
|
889
|
-
pivotColumns?:
|
|
932
|
+
pivotColumns?: InfiniteTablePropColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
890
933
|
loadingText?: Renderable;
|
|
891
934
|
components?: InfiniteTablePropComponents;
|
|
935
|
+
viewportReservedWidth?: number;
|
|
892
936
|
pivotColumn?: Partial<InfiniteTablePropPivotColumn<T>>;
|
|
893
937
|
pivotRowLabelsColumn?: Partial<InfiniteTablePropPivotRowLabelsColumn<T>>;
|
|
894
938
|
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
@@ -903,12 +947,15 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
903
947
|
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
904
948
|
defaultColumnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
905
949
|
columnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
950
|
+
columnSizing?: InfiniteTablePropColumnSizing;
|
|
951
|
+
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
906
952
|
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
907
953
|
columnGroups?: InfiniteTablePropColumnGroups;
|
|
908
954
|
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
909
955
|
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
910
956
|
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
911
957
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
958
|
+
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
912
959
|
rowHeight: number | string;
|
|
913
960
|
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
914
961
|
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
@@ -980,7 +1027,7 @@ declare module "components/VirtualBrain/ScrollListener" {
|
|
|
980
1027
|
}
|
|
981
1028
|
declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
982
1029
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
983
|
-
import type { InfiniteTableColumnGroup,
|
|
1030
|
+
import type { InfiniteTableColumnGroup, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnsMap, InfiniteTablePropColumnTypesMap, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
984
1031
|
import { Size } from "components/types/Size";
|
|
985
1032
|
import { MutableRefObject } from 'react';
|
|
986
1033
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
@@ -1000,7 +1047,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1000
1047
|
portalDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
1001
1048
|
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1002
1049
|
onHeaderHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1003
|
-
columnsWhenGrouping?:
|
|
1050
|
+
columnsWhenGrouping?: InfiniteTablePropColumnsMap<T>;
|
|
1004
1051
|
bodySize: Size;
|
|
1005
1052
|
focused: boolean;
|
|
1006
1053
|
focusedWithin: boolean;
|
|
@@ -1017,10 +1064,11 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1017
1064
|
export type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1018
1065
|
export type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1019
1066
|
export interface InfiniteTableMappedState<T> {
|
|
1067
|
+
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
1020
1068
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1021
1069
|
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
1022
1070
|
components: InfiniteTableProps<T>['components'];
|
|
1023
|
-
columns:
|
|
1071
|
+
columns: InfiniteTablePropColumnsMap<T>;
|
|
1024
1072
|
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
1025
1073
|
onReady: InfiniteTableProps<T>['onReady'];
|
|
1026
1074
|
onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
|
|
@@ -1060,6 +1108,8 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1060
1108
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
1061
1109
|
columnVisibility: NonUndefined<InfiniteTableProps<T>['columnVisibility']>;
|
|
1062
1110
|
columnPinning: NonUndefined<InfiniteTableProps<T>['columnPinning']>;
|
|
1111
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1112
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1063
1113
|
columnAggregations: NonUndefined<InfiniteTableProps<T>['columnAggregations']>;
|
|
1064
1114
|
columnGroups: NonUndefined<InfiniteTableProps<T>['columnGroups']>;
|
|
1065
1115
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
@@ -1140,12 +1190,12 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1140
1190
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1141
1191
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1142
1192
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1143
|
-
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropRowStyle, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTablePropRowClassName, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1144
|
-
import type { InfiniteTableColumn, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1193
|
+
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropRowStyle, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTablePropRowClassName, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableColumnSizingOptions } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1194
|
+
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1145
1195
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1146
1196
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1147
1197
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1148
|
-
export type { InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1198
|
+
export type { InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizing, InfiniteTablePropColumnSizingMap, InfiniteTableColumnSizingOptions, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1149
1199
|
}
|
|
1150
1200
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1151
1201
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
@@ -1172,21 +1222,22 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1172
1222
|
*/
|
|
1173
1223
|
export function initSetupState<T>(): InfiniteTableSetupState<T>;
|
|
1174
1224
|
export const forwardProps: <T>() => Partial<{
|
|
1175
|
-
columns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumns<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>) => import("components/InfiniteTable/types").
|
|
1225
|
+
columns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumns<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>) => import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>);
|
|
1176
1226
|
header: 1 | ((value: boolean | undefined) => boolean);
|
|
1177
1227
|
pivotTotalColumnPosition: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition | undefined) => import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition);
|
|
1178
|
-
pivotColumns: 1 | ((value: import("components/InfiniteTable/types").
|
|
1228
|
+
pivotColumns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotColumn<T>> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotColumn<T>> | undefined);
|
|
1179
1229
|
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined);
|
|
1180
|
-
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1181
1230
|
pivotColumn: 1 | ((value: Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined) => Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined);
|
|
1231
|
+
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1182
1232
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1233
|
+
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1183
1234
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1184
1235
|
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1185
1236
|
onReady: 1 | ((value: ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined) => ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined);
|
|
1186
|
-
onSelfFocus: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined);
|
|
1187
|
-
onSelfBlur: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined);
|
|
1188
|
-
onFocusWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined);
|
|
1189
|
-
onBlurWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined);
|
|
1237
|
+
onSelfFocus: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1238
|
+
onSelfBlur: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1239
|
+
onFocusWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1240
|
+
onBlurWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1190
1241
|
onScrollToTop: 1 | ((value: (() => void) | undefined) => (() => void) | undefined);
|
|
1191
1242
|
onScrollToBottom: 1 | ((value: (() => void) | undefined) => (() => void) | undefined);
|
|
1192
1243
|
scrollToBottomOffset: 1 | ((value: number | undefined) => number | undefined);
|
|
@@ -1217,6 +1268,8 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1217
1268
|
columnAggregations: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T>);
|
|
1218
1269
|
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups);
|
|
1219
1270
|
collapsedColumnGroups: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups);
|
|
1271
|
+
columnSizing: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnSizing | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnSizingMap);
|
|
1272
|
+
columnTypes: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnTypes<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnTypesMap<T>);
|
|
1220
1273
|
rowHeight: 1 | ((value: string | number) => number);
|
|
1221
1274
|
headerHeight: 1 | ((value: string | number) => number);
|
|
1222
1275
|
}>;
|
|
@@ -1299,11 +1352,22 @@ declare module "components/InfiniteTable/utils/adjustColumnOrderForPinning" {
|
|
|
1299
1352
|
import { InfiniteTablePropColumnOrderNormalized } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1300
1353
|
export const adjustColumnOrderForPinning: (columnOrder: InfiniteTablePropColumnOrderNormalized, columnPinning: InfiniteTablePropColumnPinning) => InfiniteTablePropColumnOrderNormalized;
|
|
1301
1354
|
}
|
|
1355
|
+
declare module "utils/getGlobal" {
|
|
1356
|
+
export function getGlobal<T extends Window>(): T;
|
|
1357
|
+
}
|
|
1358
|
+
declare module "components/utils/getScrollbarWidth" {
|
|
1359
|
+
export function getScrollbarWidth(): number;
|
|
1360
|
+
}
|
|
1361
|
+
declare module "components/InfiniteTable/utils/getColumnComputedType" {
|
|
1362
|
+
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1363
|
+
import type { InfiniteTableColumnType, InfiniteTablePropColumnTypesMap } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1364
|
+
export function getColumnComputedType<T>(column: InfiniteTableColumn<T>, columnTypes: InfiniteTablePropColumnTypesMap<T>): InfiniteTableColumnType<T>;
|
|
1365
|
+
}
|
|
1302
1366
|
declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
1303
1367
|
import type { InfiniteTableColumn, InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1304
1368
|
import type { Size } from "components/types/Size";
|
|
1305
1369
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1306
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1370
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1307
1371
|
export type SortInfoMap<T> = {
|
|
1308
1372
|
[key: string]: {
|
|
1309
1373
|
sortInfo: DataSourceSingleSortInfo<T>;
|
|
@@ -1338,6 +1402,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1338
1402
|
pinnedStartMaxWidth?: number;
|
|
1339
1403
|
pinnedEndMaxWidth?: number;
|
|
1340
1404
|
columnDefaultWidth?: number;
|
|
1405
|
+
viewportReservedWidth?: number;
|
|
1341
1406
|
sortable?: boolean;
|
|
1342
1407
|
multiSort: boolean;
|
|
1343
1408
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
@@ -1345,10 +1410,12 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1345
1410
|
draggableColumns?: boolean;
|
|
1346
1411
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1347
1412
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1413
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1414
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1348
1415
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1349
1416
|
columnVisibilityAssumeVisible: boolean;
|
|
1350
1417
|
};
|
|
1351
|
-
export const getComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, pinnedStartMaxWidth, pinnedEndMaxWidth, sortable, sortInfo, setSortInfo, multiSort, draggableColumns, columnOrder, columnPinning, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
1418
|
+
export const getComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, pinnedStartMaxWidth, pinnedEndMaxWidth, sortable, sortInfo, setSortInfo, multiSort, viewportReservedWidth, draggableColumns, columnOrder, columnPinning, columnSizing, columnTypes, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
1352
1419
|
}
|
|
1353
1420
|
declare module "components/hooks/useRerender" {
|
|
1354
1421
|
export const useRerender: () => [number, () => void];
|
|
@@ -1378,7 +1445,7 @@ declare module "components/InfiniteTable/hooks/useRerenderOnKeyChange" {
|
|
|
1378
1445
|
declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
1379
1446
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1380
1447
|
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1381
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1448
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1382
1449
|
import type { Size } from "components/types/Size";
|
|
1383
1450
|
import type { GetComputedVisibleColumnsResult } from "components/InfiniteTable/utils/getComputedVisibleColumns";
|
|
1384
1451
|
type UseComputedVisibleColumnsParam<T> = {
|
|
@@ -1386,6 +1453,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1386
1453
|
bodySize: Size;
|
|
1387
1454
|
columnMinWidth?: number;
|
|
1388
1455
|
columnMaxWidth?: number;
|
|
1456
|
+
viewportReservedWidth?: number;
|
|
1389
1457
|
pinnedEndMaxWidth?: number;
|
|
1390
1458
|
pinnedStartMaxWidth?: number;
|
|
1391
1459
|
columnDefaultWidth?: number;
|
|
@@ -1395,6 +1463,8 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1395
1463
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
1396
1464
|
setSortInfo: (sortInfo: DataSourceSingleSortInfo<T>[]) => void;
|
|
1397
1465
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1466
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1467
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1398
1468
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1399
1469
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1400
1470
|
columnVisibilityAssumeVisible?: boolean;
|
|
@@ -1416,7 +1486,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1416
1486
|
computedPinnedStartWidth: GetComputedVisibleColumnsResult<T>['computedPinnedStartWidth'];
|
|
1417
1487
|
computedColumnOrder: GetComputedVisibleColumnsResult<T>['computedColumnOrder'];
|
|
1418
1488
|
};
|
|
1419
|
-
export const useComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, draggableColumns, sortInfo, multiSort, setSortInfo, columnOrder, columnPinning, pinnedEndMaxWidth, pinnedStartMaxWidth, columnVisibility, columnVisibilityAssumeVisible, }: UseComputedVisibleColumnsParam<T>) => UseComputedVisibleColumnsResult<T>;
|
|
1489
|
+
export const useComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, draggableColumns, sortInfo, multiSort, setSortInfo, columnOrder, columnPinning, columnTypes, pinnedEndMaxWidth, pinnedStartMaxWidth, viewportReservedWidth, columnVisibility, columnVisibilityAssumeVisible, columnSizing, }: UseComputedVisibleColumnsParam<T>) => UseComputedVisibleColumnsResult<T>;
|
|
1420
1490
|
}
|
|
1421
1491
|
declare module "components/DataSource/publicHooks/useDataSourceActions" {
|
|
1422
1492
|
import { DataSourceComponentActions } from "components/DataSource/types";
|
|
@@ -1510,9 +1580,9 @@ declare module "components/InfiniteTable/hooks/useToggleGroupRow" {
|
|
|
1510
1580
|
export function useToggleGroupRow<T>(): ToggleGrouRowFn;
|
|
1511
1581
|
}
|
|
1512
1582
|
declare module "components/InfiniteTable/hooks/useColumnsWhen" {
|
|
1513
|
-
import { InfiniteTableColumn } from "components/InfiniteTable/index";
|
|
1514
|
-
import { DataSourceGroupRowsBy } from "components/DataSource/index";
|
|
1515
|
-
import { InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1583
|
+
import type { InfiniteTableColumn } from "components/InfiniteTable/index";
|
|
1584
|
+
import type { DataSourceGroupRowsBy } from "components/DataSource/index";
|
|
1585
|
+
import type { InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1516
1586
|
export function useColumnsWhen<T>(): void;
|
|
1517
1587
|
export function getColumnsWhenGrouping<T>(params: {
|
|
1518
1588
|
columns: Map<string, InfiniteTableColumn<T>>;
|
|
@@ -1542,12 +1612,6 @@ declare module "components/InfiniteTable/components/InfiniteTableBody/InfiniteTa
|
|
|
1542
1612
|
declare module "components/InfiniteTable/components/InfiniteTableBody/index" {
|
|
1543
1613
|
export * from "components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody";
|
|
1544
1614
|
}
|
|
1545
|
-
declare module "utils/getGlobal" {
|
|
1546
|
-
export function getGlobal<T extends Window>(): T;
|
|
1547
|
-
}
|
|
1548
|
-
declare module "components/utils/getScrollbarWidth" {
|
|
1549
|
-
export function getScrollbarWidth(): number;
|
|
1550
|
-
}
|
|
1551
1615
|
declare module "components/VirtualBrain/index" {
|
|
1552
1616
|
import { Logger } from "utils/debug";
|
|
1553
1617
|
import { Size } from "components/types/Size";
|
|
@@ -1565,6 +1629,7 @@ declare module "components/VirtualBrain/index" {
|
|
|
1565
1629
|
export type MainAxisSize = number | ((itemIndex: number) => number);
|
|
1566
1630
|
type OnRenderCountChangeFn = (renderCount: number) => void;
|
|
1567
1631
|
type OnSizeChangeFn = (size: number) => void;
|
|
1632
|
+
type OnDestroyFn = () => void;
|
|
1568
1633
|
export type GetItemPositionFn = (itemIndex: number) => number;
|
|
1569
1634
|
export type RenderRange = {
|
|
1570
1635
|
renderStartIndex: number;
|
|
@@ -1579,11 +1644,13 @@ declare module "components/VirtualBrain/index" {
|
|
|
1579
1644
|
private itemSizeCache;
|
|
1580
1645
|
private itemOffsetCache;
|
|
1581
1646
|
private options;
|
|
1647
|
+
private destroyed;
|
|
1582
1648
|
private totalSize;
|
|
1583
1649
|
private onScrollFns;
|
|
1584
1650
|
private onTotalSizeChangeFns;
|
|
1585
1651
|
private onRenderCountChangeFns;
|
|
1586
1652
|
private onRenderRangeChangeFns;
|
|
1653
|
+
private onDestroyFns;
|
|
1587
1654
|
name: string | undefined;
|
|
1588
1655
|
private renderCount;
|
|
1589
1656
|
private renderRange;
|
|
@@ -1599,6 +1666,7 @@ declare module "components/VirtualBrain/index" {
|
|
|
1599
1666
|
getRenderCount: () => number;
|
|
1600
1667
|
setScrollPosition: (scrollPosition: ScrollPosition) => void;
|
|
1601
1668
|
private notifyScrollChange;
|
|
1669
|
+
private notifyDestroy;
|
|
1602
1670
|
private notifyTotalSizeChange;
|
|
1603
1671
|
private notifyRenderCountChange;
|
|
1604
1672
|
private notifyRenderRangeChange;
|
|
@@ -1610,6 +1678,7 @@ declare module "components/VirtualBrain/index" {
|
|
|
1610
1678
|
onTotalSizeChange: (fn: OnSizeChangeFn) => () => void;
|
|
1611
1679
|
onRenderCountChange: (fn: OnRenderCountChangeFn) => () => void;
|
|
1612
1680
|
onRenderRangeChange: (fn: OnRenderRangeChangeFn) => () => void;
|
|
1681
|
+
onDestroy: (fn: OnDestroyFn) => () => void;
|
|
1613
1682
|
update: (newCount: VirtualBrainOptions['count'], newItemSize: VirtualBrainOptions['itemSize'], newItemSpan?: VirtualBrainOptions['itemSpan']) => void;
|
|
1614
1683
|
private reset;
|
|
1615
1684
|
private computeItemSpanUpTo;
|
|
@@ -1957,6 +2026,17 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
1957
2026
|
scrollable?: boolean;
|
|
1958
2027
|
};
|
|
1959
2028
|
}
|
|
2029
|
+
declare module "components/RawList/AvoidReactDiff" {
|
|
2030
|
+
import * as React from 'react';
|
|
2031
|
+
import { Renderable } from "components/types/Renderable";
|
|
2032
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
2033
|
+
export type AvoidReactDiffProps = {
|
|
2034
|
+
name?: string;
|
|
2035
|
+
updater: SubscriptionCallback<Renderable>;
|
|
2036
|
+
};
|
|
2037
|
+
function AvoidReactDiffFn(props: AvoidReactDiffProps): JSX.Element;
|
|
2038
|
+
export const AvoidReactDiff: React.MemoExoticComponent<typeof AvoidReactDiffFn>;
|
|
2039
|
+
}
|
|
1960
2040
|
declare module "components/RawList/types" {
|
|
1961
2041
|
import type { RefCallback } from 'react';
|
|
1962
2042
|
import type { Renderable } from "components/types/Renderable";
|
|
@@ -1991,6 +2071,7 @@ declare module "components/RawList/MappedItems" {
|
|
|
1991
2071
|
private renderedElements;
|
|
1992
2072
|
constructor(axis: string);
|
|
1993
2073
|
init(): void;
|
|
2074
|
+
reset(): void;
|
|
1994
2075
|
destroy(): void;
|
|
1995
2076
|
getUnrenderedItems: (startIndex: number, endIndex: number) => number[];
|
|
1996
2077
|
getElementsOutsideItemRange: (startIndex: number, endIndex: number) => number[];
|
|
@@ -2007,17 +2088,6 @@ declare module "components/RawList/MappedItems" {
|
|
|
2007
2088
|
discardElementsStartingWith: (elementIndex: number, callback?: ((index: number) => void) | undefined) => boolean;
|
|
2008
2089
|
}
|
|
2009
2090
|
}
|
|
2010
|
-
declare module "components/RawList/AvoidReactDiff" {
|
|
2011
|
-
import * as React from 'react';
|
|
2012
|
-
import { Renderable } from "components/types/Renderable";
|
|
2013
|
-
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
2014
|
-
export type AvoidReactDiffProps = {
|
|
2015
|
-
name?: string;
|
|
2016
|
-
updater: SubscriptionCallback<Renderable>;
|
|
2017
|
-
};
|
|
2018
|
-
function AvoidReactDiffFn(props: AvoidReactDiffProps): JSX.Element;
|
|
2019
|
-
export const AvoidReactDiff: React.MemoExoticComponent<typeof AvoidReactDiffFn>;
|
|
2020
|
-
}
|
|
2021
2091
|
declare module "components/RawList/ReactVirtualRenderer" {
|
|
2022
2092
|
import type { Renderable } from "components/types/Renderable";
|
|
2023
2093
|
import type { RenderItem } from "components/RawList/types";
|
|
@@ -2047,8 +2117,22 @@ declare module "components/RawList/ReactVirtualRenderer" {
|
|
|
2047
2117
|
private renderItemAtElement;
|
|
2048
2118
|
private updateElementPosition;
|
|
2049
2119
|
destroy: () => void;
|
|
2120
|
+
reset(): void;
|
|
2050
2121
|
}
|
|
2051
2122
|
}
|
|
2123
|
+
declare module "components/RawList/useVirtualRenderer" {
|
|
2124
|
+
import { Renderable } from "components/types/Renderable";
|
|
2125
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
2126
|
+
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2127
|
+
import { ReactVirtualRenderer } from "components/RawList/ReactVirtualRenderer";
|
|
2128
|
+
export function useVirtualRenderer({ brain, }: {
|
|
2129
|
+
brain: VirtualBrain;
|
|
2130
|
+
debugChannel?: string;
|
|
2131
|
+
}): {
|
|
2132
|
+
onRenderUpdater: SubscriptionCallback<Renderable>;
|
|
2133
|
+
renderer: ReactVirtualRenderer;
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2052
2136
|
declare module "components/RawList/index" {
|
|
2053
2137
|
import * as React from 'react';
|
|
2054
2138
|
import { RawListProps } from "components/RawList/types";
|
|
@@ -2541,7 +2625,7 @@ declare module "components/InfiniteTable/hooks/useLicense/decode" {
|
|
|
2541
2625
|
export const decode: (licenseKey: string) => LicenseDetails;
|
|
2542
2626
|
}
|
|
2543
2627
|
declare module "components/InfiniteTable/hooks/useLicense/useLicense" {
|
|
2544
|
-
export const useLicense: (licenseKey
|
|
2628
|
+
export const useLicense: (licenseKey?: string) => boolean;
|
|
2545
2629
|
}
|
|
2546
2630
|
declare module "components/CSSVariableWatch" {
|
|
2547
2631
|
import * as React from 'react';
|