@infinite-table/infinite-react 0.2.1 → 0.2.5
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 +44 -37
- package/index.esm.js +360 -326
- package/index.js +385 -349
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -333,6 +333,7 @@ declare module "components/DataSource/types" {
|
|
|
333
333
|
export type DataSourceRemoteData<T> = {
|
|
334
334
|
data: T[];
|
|
335
335
|
mappings?: DataSourceMappings;
|
|
336
|
+
cache?: boolean;
|
|
336
337
|
totalCount?: number;
|
|
337
338
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
338
339
|
};
|
|
@@ -347,8 +348,7 @@ declare module "components/DataSource/types" {
|
|
|
347
348
|
export interface DataSourceMappedState<T> {
|
|
348
349
|
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
349
350
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
350
|
-
|
|
351
|
-
lazyLoadBatchSize: DataSourceProps<T>['lazyLoadBatchSize'];
|
|
351
|
+
lazyLoad: DataSourceProps<T>['lazyLoad'];
|
|
352
352
|
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
353
353
|
data: DataSourceProps<T>['data'];
|
|
354
354
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
@@ -380,6 +380,7 @@ declare module "components/DataSource/types" {
|
|
|
380
380
|
export type LazyGroupRowInfo<DataType> = {
|
|
381
381
|
items: LazyGroupDataItem<DataType>[];
|
|
382
382
|
totalCount: number;
|
|
383
|
+
cache?: boolean;
|
|
383
384
|
};
|
|
384
385
|
export type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyGroupRowInfo<DataType>>;
|
|
385
386
|
export interface DataSourceSetupState<T> {
|
|
@@ -416,8 +417,9 @@ declare module "components/DataSource/types" {
|
|
|
416
417
|
primaryKey: keyof T;
|
|
417
418
|
fields?: (keyof T)[];
|
|
418
419
|
data: DataSourceData<T>;
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
lazyLoad?: boolean | {
|
|
421
|
+
batchSize?: number;
|
|
422
|
+
};
|
|
421
423
|
loading?: boolean;
|
|
422
424
|
defaultLoading?: boolean;
|
|
423
425
|
onLoadingChange?: (loading: boolean) => void;
|
|
@@ -455,6 +457,7 @@ declare module "components/DataSource/types" {
|
|
|
455
457
|
multiSort: boolean;
|
|
456
458
|
controlledSort: boolean;
|
|
457
459
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
460
|
+
lazyLoadBatchSize?: number;
|
|
458
461
|
}
|
|
459
462
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
460
463
|
export interface DataSourceContextValue<T> {
|
|
@@ -501,7 +504,7 @@ declare module "components/DataSource/privateHooks/useLoadData" {
|
|
|
501
504
|
import { ComponentStateGeneratedActions } from "components/hooks/useComponentState";
|
|
502
505
|
import { DataSourceDataParams, DataSourceData, DataSourceState } from "components/DataSource/types";
|
|
503
506
|
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>, overrides?: Partial<DataSourceDataParams<T>>): DataSourceDataParams<T>;
|
|
504
|
-
export function loadData<T>(data: DataSourceData<T>, componentState: DataSourceState<T>, actions: ComponentStateGeneratedActions<DataSourceState<T>>, overrides?: Partial<DataSourceDataParams<T>>): Promise<
|
|
507
|
+
export function loadData<T>(data: DataSourceData<T>, componentState: DataSourceState<T>, actions: ComponentStateGeneratedActions<DataSourceState<T>>, overrides?: Partial<DataSourceDataParams<T>>): Promise<any>;
|
|
505
508
|
export function useLoadData<T>(): void;
|
|
506
509
|
}
|
|
507
510
|
declare module "components/DataSource/state/normalizeSortInfo" {
|
|
@@ -531,10 +534,13 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
531
534
|
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
532
535
|
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
533
536
|
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
534
|
-
lazyLoadBatchSize: 1 | ((value: number | undefined) => number | undefined);
|
|
535
537
|
aggregationReducers: 1 | ((value: import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined) => import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined);
|
|
536
538
|
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
537
|
-
|
|
539
|
+
lazyLoad: 1 | ((value: boolean | {
|
|
540
|
+
batchSize?: number | undefined;
|
|
541
|
+
} | undefined) => boolean | {
|
|
542
|
+
batchSize?: number | undefined;
|
|
543
|
+
} | undefined);
|
|
538
544
|
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
539
545
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
540
546
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
@@ -548,6 +554,7 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
548
554
|
export function onPropChange<T>(params: {
|
|
549
555
|
name: keyof T;
|
|
550
556
|
newValue: any;
|
|
557
|
+
oldValue: any;
|
|
551
558
|
}, props: DataSourceProps<T>, actions: DataSourceComponentActions<T>): void;
|
|
552
559
|
export function getInterceptActions<T>(): ComponentInterceptedActions<DataSourceState<T>>;
|
|
553
560
|
}
|
|
@@ -591,6 +598,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
591
598
|
toggleCurrentGroupRow: () => void;
|
|
592
599
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
593
600
|
groupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
601
|
+
pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
|
|
594
602
|
} & ({
|
|
595
603
|
rowInfo: InfiniteTableRowInfoNormal<DATA_TYPE>;
|
|
596
604
|
data: DATA_TYPE;
|
|
@@ -598,6 +606,10 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
598
606
|
rowInfo: InfiniteTableRowInfoGroup<DATA_TYPE>;
|
|
599
607
|
data: Partial<DATA_TYPE> | null;
|
|
600
608
|
});
|
|
609
|
+
export type InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
|
|
610
|
+
collapsed: boolean;
|
|
611
|
+
groupIcon: Renderable;
|
|
612
|
+
};
|
|
601
613
|
export type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
602
614
|
export type InfiniteTableColumnRowspanFnParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
603
615
|
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
@@ -611,7 +623,8 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
611
623
|
column: InfiniteTableComputedColumn<T>;
|
|
612
624
|
columnSortInfo: DataSourceSingleSortInfo<T> | null | undefined;
|
|
613
625
|
}
|
|
614
|
-
export type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = ({ value, rowIndex, column, data, toggleGroupRow, toggleCurrentGroupRow, rowInfo, groupBy, }: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
626
|
+
export type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = ({ value, rowIndex, column, data, toggleGroupRow, toggleCurrentGroupRow, rowInfo, groupBy, pivotBy, }: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
627
|
+
export type InfiniteTableGroupColumnRenderIconFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (param: InfiniteTableGroupColumnRenderIconParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
|
|
615
628
|
export type InfiniteTableColumnRenderValueFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE>;
|
|
616
629
|
export type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderRenderParams<T>) => Renderable;
|
|
617
630
|
export type InfiniteTableColumnWithField<T> = {
|
|
@@ -662,7 +675,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
662
675
|
draggable?: boolean;
|
|
663
676
|
resizable?: boolean;
|
|
664
677
|
comparer?: InfiniteTableColumnComparer<T>;
|
|
665
|
-
|
|
678
|
+
defaultHiddenWhenGrouped?: boolean;
|
|
666
679
|
align?: InfiniteTableColumnAlign;
|
|
667
680
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
668
681
|
columnGroup?: string;
|
|
@@ -796,6 +809,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
796
809
|
import { InfiniteTableColumnGroup, InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
797
810
|
import { DeepMap } from "utils/DeepMap/index";
|
|
798
811
|
export const LAZY_ROOT_KEY_FOR_GROUPS: string;
|
|
812
|
+
export const NOT_LOADED_YET_KEY_PREFIX = "____not_loaded_yet____";
|
|
799
813
|
export type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
800
814
|
id: string;
|
|
801
815
|
};
|
|
@@ -856,6 +870,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
856
870
|
export type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
857
871
|
export type DeepMapGroupValueType<DataType, KeyType> = {
|
|
858
872
|
items: DataType[];
|
|
873
|
+
commonData?: Partial<DataType>;
|
|
859
874
|
reducerResults: Record<string, AggregationReducerResult>;
|
|
860
875
|
pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
861
876
|
};
|
|
@@ -1085,10 +1100,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1085
1100
|
import * as React from 'react';
|
|
1086
1101
|
import { InfiniteTableState } from "components/InfiniteTable/types/index";
|
|
1087
1102
|
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal } from "utils/groupAndPivot/index";
|
|
1088
|
-
import { DataSourceGroupBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
1103
|
+
import { DataSourceGroupBy, DataSourcePivotBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
1089
1104
|
import { Renderable } from "components/types/Renderable";
|
|
1090
1105
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
1091
|
-
import type { InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1106
|
+
import type { InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTableGroupColumnRenderIconFunction, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1092
1107
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1093
1108
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
1094
1109
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
@@ -1121,6 +1136,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1121
1136
|
defaultWidth?: number;
|
|
1122
1137
|
defaultFlex?: number;
|
|
1123
1138
|
defaultPinned?: InfiniteTableColumnPinnedValues;
|
|
1139
|
+
defaultHiddenWhenGrouped?: boolean;
|
|
1124
1140
|
header?: InfiniteTableColumn<T>['header'];
|
|
1125
1141
|
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
1126
1142
|
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
@@ -1189,6 +1205,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1189
1205
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
1190
1206
|
groupCount: number;
|
|
1191
1207
|
groupBy: DataSourceGroupBy<T>[];
|
|
1208
|
+
pivotBy?: DataSourcePivotBy<T>[];
|
|
1192
1209
|
};
|
|
1193
1210
|
export type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
1194
1211
|
column: COL_TYPE;
|
|
@@ -1196,8 +1213,9 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1196
1213
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
1197
1214
|
};
|
|
1198
1215
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
1199
|
-
export type InfiniteTableGroupColumnBase<T> = InfiniteTableColumn<T
|
|
1216
|
+
export type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
|
|
1200
1217
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
1218
|
+
renderGroupIcon?: InfiniteTableGroupColumnRenderIconFunction<T>;
|
|
1201
1219
|
id?: string;
|
|
1202
1220
|
};
|
|
1203
1221
|
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
@@ -1206,7 +1224,6 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1206
1224
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
1207
1225
|
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
1208
1226
|
export type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
1209
|
-
export type InfiniteTablePropPivotRowLabelsColumn<T> = InfiniteTablePropPivotColumn<T>;
|
|
1210
1227
|
export type InfiniteTablePropComponents = {
|
|
1211
1228
|
LoadMask?: React.FC<LoadMaskProps>;
|
|
1212
1229
|
};
|
|
@@ -1222,7 +1239,6 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1222
1239
|
components?: InfiniteTablePropComponents;
|
|
1223
1240
|
viewportReservedWidth?: number;
|
|
1224
1241
|
pivotColumn?: InfiniteTablePropPivotColumn<T, InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>>;
|
|
1225
|
-
pivotRowLabelsColumn?: InfiniteTablePropPivotRowLabelsColumn<T>;
|
|
1226
1242
|
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
1227
1243
|
groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
|
|
1228
1244
|
groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
|
|
@@ -1308,7 +1324,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1308
1324
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
1309
1325
|
import { ScrollListener } from "components/VirtualBrain/ScrollListener";
|
|
1310
1326
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
1311
|
-
import { InfiniteTableColumn
|
|
1327
|
+
import { InfiniteTableColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1312
1328
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
1313
1329
|
import { DataSourceGroupBy, DataSourceProps } from "components/DataSource/types";
|
|
1314
1330
|
export type GroupByMap<T> = Map<keyof T, {
|
|
@@ -1331,7 +1347,6 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1331
1347
|
draggingColumnId: null | string;
|
|
1332
1348
|
pinnedStartScrollListener: ScrollListener;
|
|
1333
1349
|
pinnedEndScrollListener: ScrollListener;
|
|
1334
|
-
computedPivotColumns?: Map<string, InfiniteTablePivotColumn<T>>;
|
|
1335
1350
|
columnShifts: number[] | null;
|
|
1336
1351
|
}
|
|
1337
1352
|
export type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
@@ -1370,7 +1385,6 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1370
1385
|
pinnedStartMaxWidth: InfiniteTableProps<T>['pinnedStartMaxWidth'];
|
|
1371
1386
|
pinnedEndMaxWidth: InfiniteTableProps<T>['pinnedEndMaxWidth'];
|
|
1372
1387
|
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
1373
|
-
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
1374
1388
|
pivotColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1375
1389
|
activeIndex: NonUndefined<InfiniteTableProps<T>['activeIndex']>;
|
|
1376
1390
|
columnMinWidth: NonUndefined<InfiniteTableProps<T>['columnMinWidth']>;
|
|
@@ -1405,6 +1419,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1405
1419
|
computedColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1406
1420
|
rowHeightCSSVar: string;
|
|
1407
1421
|
headerHeightCSSVar: string;
|
|
1422
|
+
controlledColumnVisibility: boolean;
|
|
1408
1423
|
}
|
|
1409
1424
|
export type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
|
|
1410
1425
|
export interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
|
|
@@ -1453,6 +1468,7 @@ declare module "components/InfiniteTable/types/InfiniteTableComputedValues" {
|
|
|
1453
1468
|
computedRemainingSpace: number;
|
|
1454
1469
|
unpinnedColumnRenderCount: number;
|
|
1455
1470
|
columnRenderStartIndex: number;
|
|
1471
|
+
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1456
1472
|
}
|
|
1457
1473
|
}
|
|
1458
1474
|
declare module "components/InfiniteTable/types/InfiniteTableContextValue" {
|
|
@@ -1470,12 +1486,12 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1470
1486
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1471
1487
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1472
1488
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1473
|
-
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 } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1489
|
+
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";
|
|
1474
1490
|
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1475
1491
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1476
1492
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1477
1493
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1478
|
-
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, 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, };
|
|
1494
|
+
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, };
|
|
1479
1495
|
}
|
|
1480
1496
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1481
1497
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
@@ -1512,7 +1528,6 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1512
1528
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1513
1529
|
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1514
1530
|
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1515
|
-
pivotRowLabelsColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined);
|
|
1516
1531
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1517
1532
|
hideEmptyGroupColumns: 1 | ((value: boolean | undefined) => boolean);
|
|
1518
1533
|
columnVisibility: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility);
|
|
@@ -1653,7 +1668,6 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1653
1668
|
index: number;
|
|
1654
1669
|
};
|
|
1655
1670
|
};
|
|
1656
|
-
export const IS_GROUP_COLUMN_ID: (columnId: string) => boolean;
|
|
1657
1671
|
export type GetComputedVisibleColumnsResult<T> = {
|
|
1658
1672
|
computedRemainingSpace: number;
|
|
1659
1673
|
computedPinnedStartColumnsWidth: number;
|
|
@@ -1826,19 +1840,6 @@ declare module "components/InfiniteTable/components/InfiniteTableRow/row.css" {
|
|
|
1826
1840
|
}>;
|
|
1827
1841
|
export const GroupRowExpanderCls: string;
|
|
1828
1842
|
}
|
|
1829
|
-
declare module "components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns" {
|
|
1830
|
-
import { DataSourcePropGroupBy, DataSourcePropPivotBy } from "components/DataSource/index";
|
|
1831
|
-
import { InfiniteTableProps } from "components/InfiniteTable/types/index";
|
|
1832
|
-
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1833
|
-
export function getComputedPivotColumnsFromDataSourcePivotColumns<T>(pivotColumns: InfiniteTableProps<T>['pivotColumns'], params: {
|
|
1834
|
-
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1835
|
-
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
1836
|
-
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
1837
|
-
pivotTotalColumnPosition: InfiniteTableState<T>['pivotTotalColumnPosition'];
|
|
1838
|
-
pivotBy: DataSourcePropPivotBy<T>;
|
|
1839
|
-
groupBy: DataSourcePropGroupBy<T>;
|
|
1840
|
-
}): InfiniteTableProps<T>['pivotColumns'];
|
|
1841
|
-
}
|
|
1842
1843
|
declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
1843
1844
|
import * as React from 'react';
|
|
1844
1845
|
import { InfiniteTableColumnRenderParam } from "components/InfiniteTable/index";
|
|
@@ -1861,17 +1862,23 @@ declare module "components/InfiniteTable/hooks/useToggleGroupRow" {
|
|
|
1861
1862
|
export function useToggleGroupRow<T>(): ToggleGrouRowFn;
|
|
1862
1863
|
}
|
|
1863
1864
|
declare module "components/InfiniteTable/hooks/useColumnsWhen" {
|
|
1864
|
-
import type { InfiniteTableColumn } from "components/InfiniteTable/index";
|
|
1865
|
-
import type { DataSourceGroupBy } from "components/DataSource/index";
|
|
1865
|
+
import type { InfiniteTableColumn, InfiniteTableState } from "components/InfiniteTable/index";
|
|
1866
|
+
import type { DataSourceGroupBy, DataSourcePivotBy } from "components/DataSource/index";
|
|
1866
1867
|
import type { InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1867
|
-
|
|
1868
|
+
import { ToggleGrouRowFn } from "components/InfiniteTable/hooks/useToggleGroupRow";
|
|
1869
|
+
export function useColumnsWhen<T>(): {
|
|
1870
|
+
toggleGroupRow: ToggleGrouRowFn;
|
|
1871
|
+
};
|
|
1868
1872
|
export function getColumnsWhenGrouping<T>(params: {
|
|
1869
1873
|
columns: Map<string, InfiniteTableColumn<T>>;
|
|
1870
1874
|
groupBy: DataSourceGroupBy<T>[];
|
|
1875
|
+
pivotBy?: DataSourcePivotBy<T>[];
|
|
1871
1876
|
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1877
|
+
pivotTotalColumnPosition: InfiniteTableState<T>['pivotTotalColumnPosition'];
|
|
1872
1878
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1873
1879
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
1874
1880
|
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
1881
|
+
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
1875
1882
|
}): Map<string, InfiniteTableColumn<T>> | undefined;
|
|
1876
1883
|
}
|
|
1877
1884
|
declare module "components/InfiniteTable/hooks/useComputed" {
|