@infinite-table/infinite-react 0.0.7 → 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.d.ts +85 -40
- package/index.esm.js +164 -76
- package/index.js +164 -76
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
- [Installation](#installation)
|
|
20
20
|
- [Documentation](#documentation)
|
|
21
|
-
- [
|
|
22
|
-
|
|
21
|
+
- [❤️ TypeScript](#-typescript)
|
|
22
|
+
- [🎨 Themable](#-themable)
|
|
23
23
|
- [Testing](#testing)
|
|
24
|
-
- [Testing in development](#testing-in-development)
|
|
25
24
|
- [License](#license)
|
|
26
25
|
|
|
27
26
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
@@ -38,85 +37,26 @@ Our approach with the `InfiniteTable` is to go documentation first. From our dev
|
|
|
38
37
|
|
|
39
38
|
**[Visit API docs](https://infinite-table.com/docs)**
|
|
40
39
|
|
|
41
|
-
##
|
|
40
|
+
## ❤️ TypeScript
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
It's fully typed and offers you great developer experience to help you get up and running quickly
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
npm run dev
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Running the docs
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm run docs
|
|
53
|
-
```
|
|
54
|
-
<!--
|
|
55
|
-
### HTML Element classNames
|
|
56
|
-
|
|
57
|
-
- The table has the `ITable` className, and all HTML elements are prefixed with that.
|
|
58
|
-
|
|
59
|
-
- All meaningful table parts (table row, header, cell) keep capitalized names, for example:
|
|
60
|
-
|
|
61
|
-
- `ITableRow`
|
|
62
|
-
- `ITableHeader`
|
|
63
|
-
- `ITableCell` - all cells, both in body and in header
|
|
64
|
-
- `ITableHeaderCell` - cells in header
|
|
65
|
-
- `ITableColumnCell` - cells in body rows
|
|
66
|
-
|
|
67
|
-
- Other HTML elements, which are nested inside those table parts, will be prefixed with the table part where they are nested, followed by `_`. Example:
|
|
68
|
-
|
|
69
|
-
- `ITableCell_content`
|
|
70
|
-
|
|
71
|
-
### CSS variables
|
|
72
|
-
|
|
73
|
-
There are 2 kinds of variables:
|
|
74
|
-
|
|
75
|
-
- top-level
|
|
76
|
-
- component specific
|
|
44
|
+
> The TypeScript typings file is included in the npm package - you don't have to download an additional **@types** package.
|
|
77
45
|
|
|
78
|
-
|
|
46
|
+
## 🎨 Themable
|
|
79
47
|
|
|
80
|
-
-
|
|
48
|
+
`Infinite Table` is fully customizable, via CSS variables. It ships with both a **light** and a **dark** theme - you have to import the CSS file from the package.
|
|
81
49
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- `--it-font-size-0`
|
|
87
|
-
- `--it-space-0`
|
|
88
|
-
- `--it-space-1`
|
|
89
|
-
- `--it-color-....`
|
|
90
|
-
|
|
91
|
-
The ones meant primarily for a CSS property name will end with `__<property-name>`, like this:
|
|
92
|
-
|
|
93
|
-
- `--it__border-radius` -->
|
|
50
|
+
```js
|
|
51
|
+
import "@infinite-table/infinite-react/index.css"
|
|
52
|
+
```
|
|
94
53
|
|
|
54
|
+
This file includes both the light and the dark themes.
|
|
95
55
|
|
|
96
56
|
|
|
97
57
|
## Testing
|
|
98
58
|
|
|
99
59
|
Infinite Table is built with extensive end-to-end testing via headless chrome (more exactly, puppeteer).
|
|
100
|
-
To execute the tests you have to run:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
$ npm run test
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Test pages are found in [tests folder](./source/examples/src/pages/tests) - which is part of a nextjs app where every file ending with `.page.tsx` is a page/route, while it's sibling file with the same name, but ending in `.test.tsx` is the actual test code. The test code is visiting the sibling page/route, to load the page and executes assertions against the test page.
|
|
107
|
-
|
|
108
|
-
The test command command above does 3 things:
|
|
109
|
-
|
|
110
|
-
* compiles the nextjs app found in the [examples folder](./source/examples) - runs `next build && next export`, which creates an `out` folder with the resulting examples/tests app
|
|
111
|
-
* starts a webserver that serves the generated `out` folder on [localhost:3000](http://localhost:3000)
|
|
112
|
-
* runs jest+puppeteer against the app served at [localhost:3000](http://localhost:3000)
|
|
113
|
-
|
|
114
|
-
### Testing in development
|
|
115
|
-
|
|
116
|
-
If you want to run the tests in dev mode, to get feedback sooner, you need to run the following (in the [source/examples folder](./source/examples)):
|
|
117
|
-
|
|
118
|
-
* `npm run dev` - to run the nextjs app in development, on port `3000`
|
|
119
|
-
* `npm run test:watch` to run jest on changed files - optionally add a test path pattern like `npm run test:watch -- --testPathPattern=x/y/z`
|
|
120
60
|
|
|
121
61
|
## License
|
|
122
62
|
|
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
|
};
|
|
@@ -397,16 +399,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
397
399
|
export type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
398
400
|
export type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
399
401
|
export type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
400
|
-
type
|
|
401
|
-
flex?: number;
|
|
402
|
-
defaultFlex?: number;
|
|
403
|
-
};
|
|
404
|
-
type InfiniteTableColumnWithWidth = {
|
|
405
|
-
width?: number;
|
|
406
|
-
defaultWidth?: number;
|
|
407
|
-
};
|
|
408
|
-
export type InfiniteTableColumnWithSize = DiscriminatedUnion<InfiniteTableColumnWithFlex, InfiniteTableColumnWithWidth>;
|
|
409
|
-
export type InfiniteTableColumnTypes = 'string' | 'number' | 'date';
|
|
402
|
+
export type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
410
403
|
export type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
|
|
411
404
|
field?: keyof T;
|
|
412
405
|
render?: InfiniteTableColumnRenderFunction<T>;
|
|
@@ -430,11 +423,12 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
430
423
|
};
|
|
431
424
|
export type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = Renderable> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
432
425
|
export type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanFnParams<T>) => number;
|
|
426
|
+
export type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
433
427
|
export type InfiniteTableBaseColumn<T> = {
|
|
434
|
-
maxWidth?: number;
|
|
435
|
-
minWidth?: number;
|
|
436
428
|
sortable?: boolean;
|
|
437
429
|
draggable?: boolean;
|
|
430
|
+
resizable?: boolean;
|
|
431
|
+
comparer?: InfiniteTableColumnComparer<T>;
|
|
438
432
|
align?: InfiniteTableColumnAlign;
|
|
439
433
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
440
434
|
columnGroup?: string;
|
|
@@ -442,15 +436,16 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
442
436
|
name?: Renderable;
|
|
443
437
|
cssEllipsis?: boolean;
|
|
444
438
|
headerCssEllipsis?: boolean;
|
|
445
|
-
type?:
|
|
439
|
+
type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
|
|
446
440
|
style?: InfiniteTableColumnStyle<T>;
|
|
447
441
|
className?: InfiniteTableColumnClassName<T>;
|
|
448
442
|
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
449
443
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
450
444
|
};
|
|
451
|
-
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T
|
|
445
|
+
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
452
446
|
export type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
453
447
|
groupByField?: string | string[];
|
|
448
|
+
id?: string;
|
|
454
449
|
};
|
|
455
450
|
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & {
|
|
456
451
|
pivotBy?: DataSourcePivotBy<T>[];
|
|
@@ -494,12 +489,12 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
494
489
|
}
|
|
495
490
|
declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
496
491
|
import type { DataSourcePivotBy } from "components/DataSource/index";
|
|
497
|
-
import type { InfiniteTablePropColumnGroups,
|
|
492
|
+
import type { InfiniteTablePropColumnGroups, InfiniteTablePropColumnsMap } from "components/InfiniteTable/index";
|
|
498
493
|
import type { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
499
494
|
import type { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
500
495
|
import { DeepMap } from "utils/DeepMap";
|
|
501
496
|
export type ComputedColumnsAndGroups<DataType> = {
|
|
502
|
-
columns:
|
|
497
|
+
columns: InfiniteTablePropColumnsMap<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
503
498
|
columnGroups: InfiniteTablePropColumnGroups;
|
|
504
499
|
};
|
|
505
500
|
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>(deepMap: DeepMap<KeyType, boolean>, pivotBy: DataSourcePivotBy<DataType>[], pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition): ComputedColumnsAndGroups<DataType>;
|
|
@@ -820,7 +815,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
820
815
|
import { DataSourceGroupRowsBy, DataSourcePropGroupRowsBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
821
816
|
import { Renderable } from "components/types/Renderable";
|
|
822
817
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
823
|
-
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction,
|
|
818
|
+
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
824
819
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
825
820
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
826
821
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
@@ -840,6 +835,31 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
840
835
|
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
841
836
|
};
|
|
842
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>;
|
|
843
863
|
export type InfiniteTableImperativeApi<T> = {
|
|
844
864
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
845
865
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
@@ -853,8 +873,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
853
873
|
rowHeight: number;
|
|
854
874
|
___t?: T;
|
|
855
875
|
};
|
|
856
|
-
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>;
|
|
857
878
|
export type InfiniteTableColumns<T> = InfiniteTablePropColumns<T>;
|
|
879
|
+
export type InfiniteTableColumnsMap<T> = InfiniteTablePropColumnsMap<T>;
|
|
858
880
|
export type InfiniteTablePropColumnGroups = Map<string, InfiniteTableColumnGroup>;
|
|
859
881
|
/**
|
|
860
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
|
|
@@ -890,11 +912,13 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
890
912
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
891
913
|
};
|
|
892
914
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
893
|
-
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> &
|
|
915
|
+
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> & {
|
|
894
916
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
917
|
+
id?: string;
|
|
895
918
|
};
|
|
896
|
-
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> &
|
|
919
|
+
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
897
920
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
921
|
+
id?: string;
|
|
898
922
|
};
|
|
899
923
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
900
924
|
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => InfiniteTableGroupColumnBase<T>;
|
|
@@ -905,9 +929,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
905
929
|
};
|
|
906
930
|
export interface InfiniteTableProps<T> {
|
|
907
931
|
columns: InfiniteTablePropColumns<T>;
|
|
908
|
-
pivotColumns?:
|
|
932
|
+
pivotColumns?: InfiniteTablePropColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
909
933
|
loadingText?: Renderable;
|
|
910
934
|
components?: InfiniteTablePropComponents;
|
|
935
|
+
viewportReservedWidth?: number;
|
|
911
936
|
pivotColumn?: Partial<InfiniteTablePropPivotColumn<T>>;
|
|
912
937
|
pivotRowLabelsColumn?: Partial<InfiniteTablePropPivotRowLabelsColumn<T>>;
|
|
913
938
|
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
@@ -922,12 +947,15 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
922
947
|
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
923
948
|
defaultColumnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
924
949
|
columnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
950
|
+
columnSizing?: InfiniteTablePropColumnSizing;
|
|
951
|
+
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
925
952
|
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
926
953
|
columnGroups?: InfiniteTablePropColumnGroups;
|
|
927
954
|
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
928
955
|
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
929
956
|
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
930
957
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
958
|
+
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
931
959
|
rowHeight: number | string;
|
|
932
960
|
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
933
961
|
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
@@ -999,7 +1027,7 @@ declare module "components/VirtualBrain/ScrollListener" {
|
|
|
999
1027
|
}
|
|
1000
1028
|
declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
1001
1029
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
1002
|
-
import type { InfiniteTableColumnGroup,
|
|
1030
|
+
import type { InfiniteTableColumnGroup, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnsMap, InfiniteTablePropColumnTypesMap, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1003
1031
|
import { Size } from "components/types/Size";
|
|
1004
1032
|
import { MutableRefObject } from 'react';
|
|
1005
1033
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
@@ -1019,7 +1047,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1019
1047
|
portalDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
1020
1048
|
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1021
1049
|
onHeaderHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1022
|
-
columnsWhenGrouping?:
|
|
1050
|
+
columnsWhenGrouping?: InfiniteTablePropColumnsMap<T>;
|
|
1023
1051
|
bodySize: Size;
|
|
1024
1052
|
focused: boolean;
|
|
1025
1053
|
focusedWithin: boolean;
|
|
@@ -1036,10 +1064,11 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1036
1064
|
export type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1037
1065
|
export type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1038
1066
|
export interface InfiniteTableMappedState<T> {
|
|
1067
|
+
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
1039
1068
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1040
1069
|
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
1041
1070
|
components: InfiniteTableProps<T>['components'];
|
|
1042
|
-
columns:
|
|
1071
|
+
columns: InfiniteTablePropColumnsMap<T>;
|
|
1043
1072
|
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
1044
1073
|
onReady: InfiniteTableProps<T>['onReady'];
|
|
1045
1074
|
onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
|
|
@@ -1079,6 +1108,8 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1079
1108
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
1080
1109
|
columnVisibility: NonUndefined<InfiniteTableProps<T>['columnVisibility']>;
|
|
1081
1110
|
columnPinning: NonUndefined<InfiniteTableProps<T>['columnPinning']>;
|
|
1111
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1112
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1082
1113
|
columnAggregations: NonUndefined<InfiniteTableProps<T>['columnAggregations']>;
|
|
1083
1114
|
columnGroups: NonUndefined<InfiniteTableProps<T>['columnGroups']>;
|
|
1084
1115
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
@@ -1159,12 +1190,12 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1159
1190
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1160
1191
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1161
1192
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1162
|
-
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";
|
|
1163
|
-
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";
|
|
1164
1195
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1165
1196
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1166
1197
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1167
|
-
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, };
|
|
1168
1199
|
}
|
|
1169
1200
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1170
1201
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
@@ -1191,14 +1222,15 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1191
1222
|
*/
|
|
1192
1223
|
export function initSetupState<T>(): InfiniteTableSetupState<T>;
|
|
1193
1224
|
export const forwardProps: <T>() => Partial<{
|
|
1194
|
-
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>>);
|
|
1195
1226
|
header: 1 | ((value: boolean | undefined) => boolean);
|
|
1196
1227
|
pivotTotalColumnPosition: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition | undefined) => import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition);
|
|
1197
|
-
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);
|
|
1198
1229
|
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined);
|
|
1199
1230
|
pivotColumn: 1 | ((value: Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined) => Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined);
|
|
1200
1231
|
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1201
1232
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1233
|
+
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1202
1234
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1203
1235
|
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1204
1236
|
onReady: 1 | ((value: ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined) => ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined);
|
|
@@ -1236,6 +1268,8 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1236
1268
|
columnAggregations: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T>);
|
|
1237
1269
|
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups);
|
|
1238
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>);
|
|
1239
1273
|
rowHeight: 1 | ((value: string | number) => number);
|
|
1240
1274
|
headerHeight: 1 | ((value: string | number) => number);
|
|
1241
1275
|
}>;
|
|
@@ -1318,11 +1352,22 @@ declare module "components/InfiniteTable/utils/adjustColumnOrderForPinning" {
|
|
|
1318
1352
|
import { InfiniteTablePropColumnOrderNormalized } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1319
1353
|
export const adjustColumnOrderForPinning: (columnOrder: InfiniteTablePropColumnOrderNormalized, columnPinning: InfiniteTablePropColumnPinning) => InfiniteTablePropColumnOrderNormalized;
|
|
1320
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
|
+
}
|
|
1321
1366
|
declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
1322
1367
|
import type { InfiniteTableColumn, InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1323
1368
|
import type { Size } from "components/types/Size";
|
|
1324
1369
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1325
|
-
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";
|
|
1326
1371
|
export type SortInfoMap<T> = {
|
|
1327
1372
|
[key: string]: {
|
|
1328
1373
|
sortInfo: DataSourceSingleSortInfo<T>;
|
|
@@ -1357,6 +1402,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1357
1402
|
pinnedStartMaxWidth?: number;
|
|
1358
1403
|
pinnedEndMaxWidth?: number;
|
|
1359
1404
|
columnDefaultWidth?: number;
|
|
1405
|
+
viewportReservedWidth?: number;
|
|
1360
1406
|
sortable?: boolean;
|
|
1361
1407
|
multiSort: boolean;
|
|
1362
1408
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
@@ -1364,10 +1410,12 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1364
1410
|
draggableColumns?: boolean;
|
|
1365
1411
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1366
1412
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1413
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1414
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1367
1415
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1368
1416
|
columnVisibilityAssumeVisible: boolean;
|
|
1369
1417
|
};
|
|
1370
|
-
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>;
|
|
1371
1419
|
}
|
|
1372
1420
|
declare module "components/hooks/useRerender" {
|
|
1373
1421
|
export const useRerender: () => [number, () => void];
|
|
@@ -1397,7 +1445,7 @@ declare module "components/InfiniteTable/hooks/useRerenderOnKeyChange" {
|
|
|
1397
1445
|
declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
1398
1446
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1399
1447
|
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1400
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1448
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1401
1449
|
import type { Size } from "components/types/Size";
|
|
1402
1450
|
import type { GetComputedVisibleColumnsResult } from "components/InfiniteTable/utils/getComputedVisibleColumns";
|
|
1403
1451
|
type UseComputedVisibleColumnsParam<T> = {
|
|
@@ -1405,6 +1453,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1405
1453
|
bodySize: Size;
|
|
1406
1454
|
columnMinWidth?: number;
|
|
1407
1455
|
columnMaxWidth?: number;
|
|
1456
|
+
viewportReservedWidth?: number;
|
|
1408
1457
|
pinnedEndMaxWidth?: number;
|
|
1409
1458
|
pinnedStartMaxWidth?: number;
|
|
1410
1459
|
columnDefaultWidth?: number;
|
|
@@ -1414,6 +1463,8 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1414
1463
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
1415
1464
|
setSortInfo: (sortInfo: DataSourceSingleSortInfo<T>[]) => void;
|
|
1416
1465
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1466
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1467
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1417
1468
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1418
1469
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1419
1470
|
columnVisibilityAssumeVisible?: boolean;
|
|
@@ -1435,7 +1486,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1435
1486
|
computedPinnedStartWidth: GetComputedVisibleColumnsResult<T>['computedPinnedStartWidth'];
|
|
1436
1487
|
computedColumnOrder: GetComputedVisibleColumnsResult<T>['computedColumnOrder'];
|
|
1437
1488
|
};
|
|
1438
|
-
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>;
|
|
1439
1490
|
}
|
|
1440
1491
|
declare module "components/DataSource/publicHooks/useDataSourceActions" {
|
|
1441
1492
|
import { DataSourceComponentActions } from "components/DataSource/types";
|
|
@@ -1561,12 +1612,6 @@ declare module "components/InfiniteTable/components/InfiniteTableBody/InfiniteTa
|
|
|
1561
1612
|
declare module "components/InfiniteTable/components/InfiniteTableBody/index" {
|
|
1562
1613
|
export * from "components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody";
|
|
1563
1614
|
}
|
|
1564
|
-
declare module "utils/getGlobal" {
|
|
1565
|
-
export function getGlobal<T extends Window>(): T;
|
|
1566
|
-
}
|
|
1567
|
-
declare module "components/utils/getScrollbarWidth" {
|
|
1568
|
-
export function getScrollbarWidth(): number;
|
|
1569
|
-
}
|
|
1570
1615
|
declare module "components/VirtualBrain/index" {
|
|
1571
1616
|
import { Logger } from "utils/debug";
|
|
1572
1617
|
import { Size } from "components/types/Size";
|
|
@@ -2580,7 +2625,7 @@ declare module "components/InfiniteTable/hooks/useLicense/decode" {
|
|
|
2580
2625
|
export const decode: (licenseKey: string) => LicenseDetails;
|
|
2581
2626
|
}
|
|
2582
2627
|
declare module "components/InfiniteTable/hooks/useLicense/useLicense" {
|
|
2583
|
-
export const useLicense: (licenseKey
|
|
2628
|
+
export const useLicense: (licenseKey?: string) => boolean;
|
|
2584
2629
|
}
|
|
2585
2630
|
declare module "components/CSSVariableWatch" {
|
|
2586
2631
|
import * as React from 'react';
|