@infinite-table/infinite-react 0.0.9 → 0.1.2
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.css +3 -5
- package/index.d.ts +196 -127
- package/index.esm.css +3 -5
- package/index.esm.js +469 -364
- package/index.js +724 -617
- package/package.json +3 -4
package/index.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ declare module "utils/DeepMap" {
|
|
|
71
71
|
private map;
|
|
72
72
|
private length;
|
|
73
73
|
private revision;
|
|
74
|
+
static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
|
|
74
75
|
constructor(initial?: [KeyType[], ValueType][]);
|
|
75
76
|
set(keys: KeyType[] & {
|
|
76
77
|
length: Omit<number, 0>;
|
|
@@ -157,7 +158,7 @@ declare module "components/hooks/useComponentState" {
|
|
|
157
158
|
type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
158
159
|
debugName?: string;
|
|
159
160
|
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
160
|
-
forwardProps?: () => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
161
|
+
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
161
162
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
162
163
|
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
163
164
|
mapPropsToState?: (params: {
|
|
@@ -198,7 +199,7 @@ declare module "components/DataSource/types" {
|
|
|
198
199
|
import * as React from 'react';
|
|
199
200
|
import { MultisortInfo } from "utils/multisort/index";
|
|
200
201
|
import { DeepMap } from "utils/DeepMap";
|
|
201
|
-
import {
|
|
202
|
+
import { DeepMapGroupValueType, GroupBy, GroupKeyType, PivotBy } from "utils/groupAndPivot/index";
|
|
202
203
|
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/index";
|
|
203
204
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
204
205
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
@@ -208,43 +209,53 @@ declare module "components/DataSource/types" {
|
|
|
208
209
|
export interface DataSourceDataParams<T> {
|
|
209
210
|
originalDataArray: T[];
|
|
210
211
|
sortInfo?: DataSourceSortInfo<T>;
|
|
211
|
-
|
|
212
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
212
213
|
pivotBy?: DataSourcePropPivotBy<T>;
|
|
213
214
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
215
|
+
changes?: DataSourceDataParamsChanges<T>;
|
|
214
216
|
}
|
|
217
|
+
export type DataSourceDataParamsChanges<T> = Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>;
|
|
215
218
|
export type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
216
219
|
field?: keyof T;
|
|
217
220
|
id?: string;
|
|
218
221
|
};
|
|
219
|
-
export type
|
|
222
|
+
export type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
220
223
|
export type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
221
224
|
export type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
222
225
|
export type DataSourceRemoteData<T> = {
|
|
223
226
|
data: T[];
|
|
224
227
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
225
228
|
};
|
|
226
|
-
export type DataSourceData<T> = T[] | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
229
|
+
export type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
227
230
|
export type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
228
231
|
export type DataSourceExpandedAndCollapsedGroupRows<KeyType> = {
|
|
229
232
|
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
230
233
|
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
231
234
|
};
|
|
232
|
-
export type
|
|
235
|
+
export type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
233
236
|
export type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
234
237
|
export interface DataSourceMappedState<T> {
|
|
238
|
+
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
235
239
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
236
|
-
livePaginationCursor: DataSourceProps<T>['livePaginationCursor'];
|
|
237
|
-
remoteCount: DataSourceProps<T>['remoteCount'];
|
|
238
240
|
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
239
241
|
data: DataSourceProps<T>['data'];
|
|
240
242
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
241
|
-
|
|
243
|
+
groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
|
|
242
244
|
groupRowsState: NonUndefined<DataSourceProps<T>['groupRowsState']>;
|
|
243
245
|
pivotBy: DataSourceProps<T>['pivotBy'];
|
|
244
246
|
loading: NonUndefined<DataSourceProps<T>['loading']>;
|
|
245
247
|
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
246
248
|
}
|
|
249
|
+
export type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
250
|
+
field?: keyof T;
|
|
251
|
+
initialValue: AggregationResultType;
|
|
252
|
+
getter?: (data: T) => any;
|
|
253
|
+
reducer: (accumulator: any, value: any, data: T) => AggregationResultType | any;
|
|
254
|
+
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
255
|
+
};
|
|
247
256
|
export interface DataSourceSetupState<T> {
|
|
257
|
+
propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
|
|
258
|
+
showSeparatePivotColumnForSingleAggregation: boolean;
|
|
248
259
|
dataParams?: DataSourceDataParams<T>;
|
|
249
260
|
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
250
261
|
originalDataArray: T[];
|
|
@@ -259,17 +270,16 @@ declare module "components/DataSource/types" {
|
|
|
259
270
|
groupedAt: number;
|
|
260
271
|
sortedAt: number;
|
|
261
272
|
generateGroupRows: boolean;
|
|
262
|
-
aggregationReducers?: AggregationReducer<T, any>[];
|
|
263
273
|
postSortDataArray?: T[];
|
|
264
274
|
postGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
265
275
|
pivotColumns?: Map<string, InfiniteTableColumn<T>>;
|
|
266
276
|
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
267
277
|
}
|
|
278
|
+
export type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
268
279
|
export interface DataSourceProps<T> {
|
|
269
280
|
children: React.ReactNode | ((contextData: DataSourceState<T>) => React.ReactNode);
|
|
270
281
|
primaryKey: keyof T;
|
|
271
282
|
fields?: (keyof T)[];
|
|
272
|
-
remoteCount?: number;
|
|
273
283
|
data: DataSourceData<T>;
|
|
274
284
|
loading?: boolean;
|
|
275
285
|
defaultLoading?: boolean;
|
|
@@ -277,9 +287,11 @@ declare module "components/DataSource/types" {
|
|
|
277
287
|
pivotBy?: DataSourcePropPivotBy<T>;
|
|
278
288
|
defaultPivotBy?: DataSourcePropPivotBy<T>;
|
|
279
289
|
onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
290
|
+
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
291
|
+
defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
292
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
293
|
+
defaultGroupBy?: DataSourcePropGroupBy<T>;
|
|
294
|
+
onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
|
|
283
295
|
groupRowsState?: GroupRowsState;
|
|
284
296
|
defaultGroupRowsState?: GroupRowsState;
|
|
285
297
|
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
@@ -288,14 +300,23 @@ declare module "components/DataSource/types" {
|
|
|
288
300
|
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
289
301
|
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
290
302
|
livePagination?: boolean;
|
|
291
|
-
livePaginationCursor?:
|
|
303
|
+
livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
|
|
304
|
+
onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
|
|
292
305
|
}
|
|
293
|
-
export type
|
|
306
|
+
export type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
307
|
+
export type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
308
|
+
export type DataSourceLivePaginationCursorParams<T> = {
|
|
309
|
+
array: T[];
|
|
310
|
+
lastItem: T | Partial<T> | null;
|
|
311
|
+
length: number;
|
|
312
|
+
};
|
|
313
|
+
export type DataSourceLivePaginationCursorValue = string | number | null;
|
|
294
314
|
export interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
295
315
|
}
|
|
296
316
|
export interface DataSourceDerivedState<_T> {
|
|
297
317
|
multiSort: boolean;
|
|
298
318
|
controlledSort: boolean;
|
|
319
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
299
320
|
}
|
|
300
321
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
301
322
|
export interface DataSourceContextValue<T> {
|
|
@@ -331,14 +352,14 @@ declare module "components/hooks/useEffectWithChanges" {
|
|
|
331
352
|
export function useEffectWithObject(fn: EffectCallback, deps: Record<string, any>): void;
|
|
332
353
|
}
|
|
333
354
|
declare module "components/DataSource/privateHooks/useLoadData" {
|
|
334
|
-
import { DataSourceDataParams, DataSourceState } from "components/DataSource/types";
|
|
335
|
-
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>): DataSourceDataParams<T>;
|
|
355
|
+
import { DataSourceDataParams, DataSourceState, DataSourceDataParamsChanges } from "components/DataSource/types";
|
|
356
|
+
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>, changes?: DataSourceDataParamsChanges<T>): DataSourceDataParams<T>;
|
|
336
357
|
export function useLoadData<T>(): void;
|
|
337
358
|
export function useLivePagination<T>(): void;
|
|
338
359
|
}
|
|
339
360
|
declare module "components/DataSource/state/normalizeSortInfo" {
|
|
340
361
|
import { DataSourceSingleSortInfo, DataSourceSortInfo } from "components/DataSource/types";
|
|
341
|
-
export const normalizeSortInfo: <T>(
|
|
362
|
+
export const normalizeSortInfo: <T>(initialSortInfo?: DataSourceSortInfo<T> | undefined, weakMap?: WeakMap<any, any> | undefined) => DataSourceSingleSortInfo<T>[];
|
|
342
363
|
}
|
|
343
364
|
declare module "components/utils/buildSubscriptionCallback" {
|
|
344
365
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
@@ -356,18 +377,17 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
356
377
|
import { ComponentInterceptedActions, ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
357
378
|
import { DataSourceDataParams } from "components/DataSource/index";
|
|
358
379
|
export function initSetupState<T>(): DataSourceSetupState<T>;
|
|
359
|
-
export const forwardProps: <T>() => Partial<{
|
|
380
|
+
export const forwardProps: <T>(setupState: DataSourceSetupState<T>) => Partial<{
|
|
360
381
|
data: 1 | ((value: import("components/DataSource").DataSourceData<T>) => import("components/DataSource").DataSourceData<T>);
|
|
361
382
|
loading: 1 | ((value: boolean | undefined) => boolean);
|
|
383
|
+
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
384
|
+
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
385
|
+
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
386
|
+
aggregationReducers: 1 | ((value: import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined) => import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined);
|
|
362
387
|
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
363
|
-
livePaginationCursor: 1 | ((value: import("components/DataSource").DataSourceLivePaginationCursorValue | undefined) => import("components/DataSource").DataSourceLivePaginationCursorValue | undefined);
|
|
364
|
-
remoteCount: 1 | ((value: number | undefined) => number | undefined);
|
|
365
388
|
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
366
389
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
367
|
-
groupRowsBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupRowsBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupRowsBy<T>);
|
|
368
390
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
369
|
-
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
370
|
-
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
371
391
|
}>;
|
|
372
392
|
export function mapPropsToState<T extends any>(params: {
|
|
373
393
|
props: DataSourceProps<T>;
|
|
@@ -381,6 +401,7 @@ declare module "components/types/Renderable" {
|
|
|
381
401
|
}
|
|
382
402
|
declare module "components/InfiniteTable/types/Utility" {
|
|
383
403
|
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
404
|
+
export type MapOrRecord<K extends string, V> = Map<K, V> | Record<K, V>;
|
|
384
405
|
export type RequireOnlyOneProperty<T, Keys extends keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
385
406
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
386
407
|
}[Keys];
|
|
@@ -400,26 +421,30 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
400
421
|
import type { Renderable } from "components/types/Renderable";
|
|
401
422
|
import type { DataSourcePivotBy, DataSourceSingleSortInfo, DataSourceState } from "components/DataSource/types";
|
|
402
423
|
import type { DiscriminatedUnion, RequireAtLeastOne } from "components/InfiniteTable/types/Utility";
|
|
403
|
-
import type { InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
424
|
+
import type { InfiniteTableColumnGroup, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
404
425
|
import { CSSProperties } from 'react';
|
|
405
|
-
import { PivotBy } from "utils/groupAndPivot/index";
|
|
426
|
+
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal, PivotBy } from "utils/groupAndPivot/index";
|
|
406
427
|
export type { DiscriminatedUnion, RequireAtLeastOne };
|
|
407
428
|
export type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
408
|
-
export
|
|
429
|
+
export type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
409
430
|
value: string | number | Renderable;
|
|
410
|
-
data: DATA_TYPE | null;
|
|
411
|
-
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
412
431
|
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
413
432
|
rowIndex: number;
|
|
414
433
|
column: COL_TYPE;
|
|
415
434
|
toggleCurrentGroupRow: () => void;
|
|
416
435
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
417
|
-
|
|
418
|
-
}
|
|
436
|
+
groupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
437
|
+
} & ({
|
|
438
|
+
rowInfo: InfiniteTableRowInfoNormal<DATA_TYPE>;
|
|
439
|
+
data: DATA_TYPE;
|
|
440
|
+
} | {
|
|
441
|
+
rowInfo: InfiniteTableRowInfoGroup<DATA_TYPE>;
|
|
442
|
+
data: Partial<DATA_TYPE> | null;
|
|
443
|
+
});
|
|
419
444
|
export type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
420
445
|
export type InfiniteTableColumnRowspanFnParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
421
|
-
data: DATA_TYPE | null;
|
|
422
446
|
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
447
|
+
data: DATA_TYPE | Partial<DATA_TYPE> | null;
|
|
423
448
|
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
424
449
|
dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
|
|
425
450
|
rowIndex: number;
|
|
@@ -430,7 +455,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
430
455
|
columnSortInfo: DataSourceSingleSortInfo<T> | null | undefined;
|
|
431
456
|
}
|
|
432
457
|
export type InfiniteTableColumnPinned = 'start' | 'end' | false;
|
|
433
|
-
export type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = ({ value, rowIndex, column, data, toggleGroupRow, toggleCurrentGroupRow, rowInfo,
|
|
458
|
+
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;
|
|
434
459
|
export type InfiniteTableColumnRenderValueFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE>;
|
|
435
460
|
export type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderRenderParams<T>) => Renderable;
|
|
436
461
|
export type InfiniteTableColumnWithField<T> = {
|
|
@@ -453,19 +478,25 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
453
478
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
454
479
|
}, 'render' | 'renderValue' | 'field' | 'valueGetter'>;
|
|
455
480
|
export type InfiniteTableColumnStyleFnParams<T> = {
|
|
456
|
-
data: T | null;
|
|
457
481
|
value: Renderable;
|
|
458
|
-
rowInfo: InfiniteTableRowInfo<T>;
|
|
459
482
|
column: InfiniteTableColumn<T>;
|
|
460
|
-
}
|
|
483
|
+
} & ({
|
|
484
|
+
data: T;
|
|
485
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
486
|
+
} | {
|
|
487
|
+
data: Partial<T> | null;
|
|
488
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
489
|
+
});
|
|
461
490
|
export type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
462
491
|
export type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
463
492
|
export type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
464
493
|
export type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
465
494
|
export type InfiniteTableColumnValueGetterParams<T> = {
|
|
466
|
-
data: T
|
|
467
|
-
rowInfo:
|
|
468
|
-
|
|
495
|
+
data: T;
|
|
496
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
497
|
+
} | {
|
|
498
|
+
data: Partial<T> | null;
|
|
499
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
469
500
|
};
|
|
470
501
|
export type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = Renderable> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
471
502
|
export type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanFnParams<T>) => number;
|
|
@@ -475,6 +506,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
475
506
|
draggable?: boolean;
|
|
476
507
|
resizable?: boolean;
|
|
477
508
|
comparer?: InfiniteTableColumnComparer<T>;
|
|
509
|
+
hiddenWhenGrouped?: boolean;
|
|
478
510
|
align?: InfiniteTableColumnAlign;
|
|
479
511
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
480
512
|
columnGroup?: string;
|
|
@@ -487,27 +519,33 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
487
519
|
className?: InfiniteTableColumnClassName<T>;
|
|
488
520
|
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
489
521
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
522
|
+
defaultWidth?: number;
|
|
523
|
+
defaultFlex?: number;
|
|
490
524
|
};
|
|
491
525
|
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
492
526
|
export type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
493
|
-
groupByField
|
|
527
|
+
groupByField: string | string[];
|
|
494
528
|
id?: string;
|
|
495
529
|
};
|
|
496
|
-
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> &
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
pivotGroupKeys
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
530
|
+
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & Partial<InfiniteTablePivotFinalColumn<T, any>>;
|
|
531
|
+
export type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
532
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
533
|
+
pivotTotalColumnGroup?: true;
|
|
534
|
+
pivotGroupKeys: KeyType[];
|
|
535
|
+
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
536
|
+
pivotGroupKey: KeyType;
|
|
537
|
+
pivotIndex: number;
|
|
504
538
|
};
|
|
505
|
-
export type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> =
|
|
539
|
+
export type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
|
|
506
540
|
pivotBy: DataSourcePivotBy<DataType>[];
|
|
541
|
+
pivotColumn: true;
|
|
542
|
+
pivotTotalColumn: boolean;
|
|
543
|
+
pivotAggregator: AggregationReducer<DataType, any>;
|
|
544
|
+
pivotAggregatorIndex: number;
|
|
507
545
|
pivotGroupKeys: KeyType[];
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
546
|
+
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
547
|
+
pivotIndex: number;
|
|
548
|
+
pivotGroupKey: KeyType;
|
|
511
549
|
};
|
|
512
550
|
type InfiniteTableComputedColumnBase<T> = {
|
|
513
551
|
computedWidth: number;
|
|
@@ -531,10 +569,11 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
531
569
|
toggleSort: () => void;
|
|
532
570
|
id: string;
|
|
533
571
|
};
|
|
534
|
-
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> &
|
|
572
|
+
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
|
|
573
|
+
export type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
|
|
535
574
|
}
|
|
536
575
|
declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
537
|
-
import type { DataSourcePivotBy } from "components/DataSource/index";
|
|
576
|
+
import type { DataSourceAggregationReducer, DataSourcePivotBy } from "components/DataSource/index";
|
|
538
577
|
import type { InfiniteTablePropColumnGroups, InfiniteTablePropColumnsMap } from "components/InfiniteTable/index";
|
|
539
578
|
import type { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
540
579
|
import type { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -543,7 +582,13 @@ declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
|
543
582
|
columns: InfiniteTablePropColumnsMap<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
544
583
|
columnGroups: InfiniteTablePropColumnGroups;
|
|
545
584
|
};
|
|
546
|
-
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>(deepMap
|
|
585
|
+
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>({ deepMap, pivotBy, pivotTotalColumnPosition, reducers, showSeparatePivotColumnForSingleAggregation, }: {
|
|
586
|
+
deepMap: DeepMap<KeyType, boolean>;
|
|
587
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
588
|
+
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
589
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
590
|
+
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
591
|
+
}): ComputedColumnsAndGroups<DataType>;
|
|
547
592
|
}
|
|
548
593
|
declare module "components/DataSource/state/reducer" {
|
|
549
594
|
import type { DataSourceState, DataSourceDerivedState } from "components/DataSource/types";
|
|
@@ -587,22 +632,33 @@ declare module "components/DataSource/GroupRowsState" {
|
|
|
587
632
|
}
|
|
588
633
|
}
|
|
589
634
|
declare module "utils/groupAndPivot/index" {
|
|
635
|
+
import { DataSourceAggregationReducer } from "@infinite-table/infinite-react";
|
|
590
636
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
591
|
-
import { InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
592
|
-
import { InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
637
|
+
import { InfiniteTableColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn, InfiniteTablePivotFinalColumnGroup } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
638
|
+
import { InfiniteTableColumnGroup, InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
593
639
|
import { DeepMap } from "utils/DeepMap";
|
|
594
|
-
export type AggregationReducer<T, AggregationResultType> = {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
640
|
+
export type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
641
|
+
id: string;
|
|
642
|
+
};
|
|
643
|
+
export type AggregationReducerResult<AggregationResultType extends any = any> = {
|
|
644
|
+
value: AggregationResultType;
|
|
645
|
+
id: string;
|
|
599
646
|
};
|
|
600
|
-
export
|
|
647
|
+
export type InfiniteTableRowInfoNormalType<DataType> = {
|
|
648
|
+
data: DataType;
|
|
649
|
+
isGroupRow: false;
|
|
650
|
+
};
|
|
651
|
+
export type InfiniteTableRowInfoGroupType<DataType> = {
|
|
652
|
+
data: Partial<DataType> | null;
|
|
653
|
+
isGroupRow: true;
|
|
654
|
+
};
|
|
655
|
+
export type InfiniteTableRowInfoNormal<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoNormalType<T>;
|
|
656
|
+
export type InfiniteTableRowInfoGroup<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoGroupType<T>;
|
|
657
|
+
export type InfiniteTableRowInfo<T> = InfiniteTableRowInfoNormal<T> | InfiniteTableRowInfoGroup<T>;
|
|
658
|
+
export type InfiniteTableRowInfoBase<T> = {
|
|
601
659
|
id: any;
|
|
602
|
-
data: T | null;
|
|
603
|
-
groupData?: T[];
|
|
604
660
|
value?: any;
|
|
605
|
-
|
|
661
|
+
groupData?: T[];
|
|
606
662
|
collapsed: boolean;
|
|
607
663
|
collapsedChildrenCount?: number;
|
|
608
664
|
collapsedGroupsCount?: number;
|
|
@@ -615,10 +671,10 @@ declare module "utils/groupAndPivot/index" {
|
|
|
615
671
|
groupCount?: number;
|
|
616
672
|
groupBy?: (keyof T)[];
|
|
617
673
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
618
|
-
reducerResults?:
|
|
619
|
-
}
|
|
620
|
-
export
|
|
621
|
-
data: null;
|
|
674
|
+
reducerResults?: Record<string, AggregationReducerResult>;
|
|
675
|
+
};
|
|
676
|
+
export type InfiniteTableEnhancedGroupInfo<T> = InfiniteTableRowInfo<T> & {
|
|
677
|
+
data: Partial<T> | null;
|
|
622
678
|
groupData: T[];
|
|
623
679
|
value: any;
|
|
624
680
|
isGroupRow: true;
|
|
@@ -629,9 +685,9 @@ declare module "utils/groupAndPivot/index" {
|
|
|
629
685
|
groupCount: number;
|
|
630
686
|
groupBy: (keyof T)[];
|
|
631
687
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
632
|
-
}
|
|
688
|
+
};
|
|
633
689
|
export type GroupKeyType<T extends any = any> = T;
|
|
634
|
-
type PivotReducerResults<T = any> = T
|
|
690
|
+
type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
|
|
635
691
|
type PivotGroupValueType<DataType, KeyType> = {
|
|
636
692
|
reducerResults: PivotReducerResults<KeyType>;
|
|
637
693
|
items: DataType[];
|
|
@@ -639,7 +695,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
639
695
|
export type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
640
696
|
export type DeepMapGroupValueType<DataType, KeyType> = {
|
|
641
697
|
items: DataType[];
|
|
642
|
-
reducerResults:
|
|
698
|
+
reducerResults: Record<string, AggregationReducerResult>;
|
|
643
699
|
pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
644
700
|
};
|
|
645
701
|
export type GroupBy<DataType, KeyType> = {
|
|
@@ -648,21 +704,24 @@ declare module "utils/groupAndPivot/index" {
|
|
|
648
704
|
column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
|
|
649
705
|
};
|
|
650
706
|
export type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
651
|
-
column?:
|
|
707
|
+
column?: InfiniteTableColumn<DataType> | (({ column, }: {
|
|
652
708
|
column: InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
653
709
|
}) => Partial<InfiniteTablePivotColumn<DataType>>);
|
|
710
|
+
columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
|
|
711
|
+
columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
|
|
712
|
+
}) => Partial<InfiniteTablePivotFinalColumnGroup<DataType>>);
|
|
654
713
|
};
|
|
655
714
|
type GroupParams<DataType, KeyType> = {
|
|
656
715
|
groupBy: GroupBy<DataType, KeyType>[];
|
|
657
716
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
658
717
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
659
|
-
reducers?:
|
|
718
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
660
719
|
};
|
|
661
720
|
export type DataGroupResult<DataType, KeyType extends any> = {
|
|
662
721
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
663
722
|
groupParams: GroupParams<DataType, KeyType>;
|
|
664
723
|
initialData: DataType[];
|
|
665
|
-
reducerResults?:
|
|
724
|
+
reducerResults?: Record<string, AggregationReducerResult>;
|
|
666
725
|
topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
|
|
667
726
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
668
727
|
};
|
|
@@ -672,6 +731,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
672
731
|
groupResult: DataGroupResult<DataType, KeyType>;
|
|
673
732
|
toPrimaryKey: (data: DataType) => any;
|
|
674
733
|
groupRowsState?: GroupRowsState;
|
|
734
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
675
735
|
generateGroupRows: boolean;
|
|
676
736
|
};
|
|
677
737
|
export function enhancedFlatten<DataType, KeyType = any>(param: EnhancedFlattenParam<DataType, KeyType>): {
|
|
@@ -859,35 +919,39 @@ declare module "components/InfiniteTable/components/LoadMask" {
|
|
|
859
919
|
declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
860
920
|
import * as React from 'react';
|
|
861
921
|
import { InfiniteTableState } from "components/InfiniteTable/types/index";
|
|
862
|
-
import { AggregationReducer,
|
|
863
|
-
import {
|
|
922
|
+
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal } from "utils/groupAndPivot/index";
|
|
923
|
+
import { DataSourceGroupBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
864
924
|
import { Renderable } from "components/types/Renderable";
|
|
865
925
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
866
|
-
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
926
|
+
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnPinned, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
867
927
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
868
928
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
869
929
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
870
930
|
export type InfiniteTablePropColumnVisibility = Map<string, false>;
|
|
871
931
|
export type InfiniteTablePropColumnPinning = Map<string, true | 'start' | 'end'>;
|
|
872
932
|
export type InfiniteTableRowStyleFnParams<T> = {
|
|
873
|
-
data: T | null;
|
|
874
|
-
rowInfo: InfiniteTableRowInfo<T>;
|
|
875
933
|
rowIndex: number;
|
|
876
|
-
|
|
877
|
-
}
|
|
934
|
+
groupBy?: (keyof T)[];
|
|
935
|
+
} & ({
|
|
936
|
+
data: T;
|
|
937
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
938
|
+
} | {
|
|
939
|
+
data: Partial<T> | null;
|
|
940
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
941
|
+
});
|
|
878
942
|
export type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
879
943
|
export type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
880
944
|
export type InfiniteTablePropRowStyle<T> = React.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
881
945
|
export type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
882
|
-
export type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter'> & {
|
|
946
|
+
export type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
883
947
|
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
948
|
+
field?: keyof T;
|
|
884
949
|
};
|
|
885
|
-
export type InfiniteTablePropColumnAggregations<T> = Map<string, InfiniteTableColumnAggregator<T, any>>;
|
|
886
950
|
export type InfiniteTableColumnType<T> = {
|
|
887
951
|
minWidth?: number;
|
|
888
952
|
maxWidth?: number;
|
|
889
|
-
|
|
890
|
-
|
|
953
|
+
defaultWidth?: number;
|
|
954
|
+
defaultFlex?: number;
|
|
891
955
|
header?: InfiniteTableColumn<T>['header'];
|
|
892
956
|
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
893
957
|
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
@@ -895,8 +959,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
895
959
|
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
896
960
|
align?: InfiniteTableColumn<T>['align'];
|
|
897
961
|
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
962
|
+
defaultPinned?: InfiniteTableColumnPinned;
|
|
898
963
|
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
899
964
|
render?: InfiniteTableColumn<T>['render'];
|
|
965
|
+
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
900
966
|
};
|
|
901
967
|
export type InfiniteTablePropColumnTypesMap<T> = Map<'default' | string, InfiniteTableColumnType<T>>;
|
|
902
968
|
export type InfiniteTablePropColumnTypes<T> = InfiniteTablePropColumnTypesMap<T> | Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
@@ -911,7 +977,6 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
911
977
|
export type InfiniteTableImperativeApi<T> = {
|
|
912
978
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
913
979
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
914
|
-
setColumnAggregations: (columnAggregations: InfiniteTablePropColumnAggregations<T>) => void;
|
|
915
980
|
x?: T;
|
|
916
981
|
getState: () => InfiniteTableState<T>;
|
|
917
982
|
getDataSourceState: () => DataSourceState<T>;
|
|
@@ -949,14 +1014,14 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
949
1014
|
};
|
|
950
1015
|
export type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
951
1016
|
groupIndexForColumn?: number;
|
|
952
|
-
groupByForColumn?:
|
|
1017
|
+
groupByForColumn?: DataSourceGroupBy<T>;
|
|
953
1018
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
954
1019
|
groupCount: number;
|
|
955
|
-
|
|
1020
|
+
groupBy: DataSourceGroupBy<T>[];
|
|
956
1021
|
};
|
|
957
|
-
export type InfiniteTablePivotColumnGetterOptions<T
|
|
958
|
-
column:
|
|
959
|
-
|
|
1022
|
+
export type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
1023
|
+
column: COL_TYPE;
|
|
1024
|
+
groupBy: DataSourcePropGroupBy<T>;
|
|
960
1025
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
961
1026
|
};
|
|
962
1027
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
@@ -965,12 +1030,11 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
965
1030
|
id?: string;
|
|
966
1031
|
};
|
|
967
1032
|
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
968
|
-
renderValue?: InfiniteTableColumnRenderFunction<T
|
|
969
|
-
id?: string;
|
|
1033
|
+
renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
|
|
970
1034
|
};
|
|
971
1035
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
972
1036
|
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => InfiniteTableGroupColumnBase<T>;
|
|
973
|
-
export type InfiniteTablePropPivotColumn<T
|
|
1037
|
+
export type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
974
1038
|
export type InfiniteTablePropPivotRowLabelsColumn<T> = InfiniteTablePropPivotColumn<T>;
|
|
975
1039
|
export type InfiniteTablePropComponents = {
|
|
976
1040
|
LoadMask?: React.FC<LoadMaskProps>;
|
|
@@ -981,20 +1045,18 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
981
1045
|
loadingText?: Renderable;
|
|
982
1046
|
components?: InfiniteTablePropComponents;
|
|
983
1047
|
viewportReservedWidth?: number;
|
|
984
|
-
pivotColumn?:
|
|
985
|
-
pivotRowLabelsColumn?:
|
|
1048
|
+
pivotColumn?: InfiniteTablePropPivotColumn<T, InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>>;
|
|
1049
|
+
pivotRowLabelsColumn?: InfiniteTablePropPivotRowLabelsColumn<T>;
|
|
986
1050
|
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
987
1051
|
groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
|
|
988
1052
|
groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
|
|
989
1053
|
hideEmptyGroupColumns?: boolean;
|
|
990
1054
|
columnVisibility?: InfiniteTablePropColumnVisibility;
|
|
991
1055
|
defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
|
|
992
|
-
columnPinning?: InfiniteTablePropColumnPinning;
|
|
993
1056
|
pinnedStartMaxWidth?: number;
|
|
994
1057
|
pinnedEndMaxWidth?: number;
|
|
1058
|
+
columnPinning?: InfiniteTablePropColumnPinning;
|
|
995
1059
|
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
996
|
-
defaultColumnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
997
|
-
columnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
998
1060
|
columnSizing?: InfiniteTablePropColumnSizing;
|
|
999
1061
|
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
1000
1062
|
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
@@ -1005,6 +1067,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1005
1067
|
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
1006
1068
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
1007
1069
|
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
1070
|
+
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
1008
1071
|
rowHeight: number | string;
|
|
1009
1072
|
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
1010
1073
|
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
@@ -1079,9 +1142,9 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1079
1142
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
1080
1143
|
import { InfiniteTableColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1081
1144
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
1082
|
-
import {
|
|
1083
|
-
export type
|
|
1084
|
-
groupBy:
|
|
1145
|
+
import { DataSourceGroupBy, DataSourceProps } from "components/DataSource/types";
|
|
1146
|
+
export type GroupByMap<T> = Map<keyof T, {
|
|
1147
|
+
groupBy: DataSourceGroupBy<T>;
|
|
1085
1148
|
groupIndex: number;
|
|
1086
1149
|
}>;
|
|
1087
1150
|
export interface InfiniteTableSetupState<T> {
|
|
@@ -1128,6 +1191,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1128
1191
|
focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
|
|
1129
1192
|
focusedStyle: InfiniteTableProps<T>['focusedStyle'];
|
|
1130
1193
|
focusedWithinStyle: InfiniteTableProps<T>['focusedWithinStyle'];
|
|
1194
|
+
showSeparatePivotColumnForSingleAggregation: NonUndefined<InfiniteTableProps<T>['showSeparatePivotColumnForSingleAggregation']>;
|
|
1131
1195
|
domProps: InfiniteTableProps<T>['domProps'];
|
|
1132
1196
|
rowStyle: InfiniteTableProps<T>['rowStyle'];
|
|
1133
1197
|
rowProps: InfiniteTableProps<T>['rowProps'];
|
|
@@ -1156,13 +1220,12 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1156
1220
|
columnPinning: NonUndefined<InfiniteTableProps<T>['columnPinning']>;
|
|
1157
1221
|
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1158
1222
|
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1159
|
-
columnAggregations: NonUndefined<InfiniteTableProps<T>['columnAggregations']>;
|
|
1160
1223
|
columnGroups: NonUndefined<InfiniteTableProps<T>['columnGroups']>;
|
|
1161
1224
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
1162
1225
|
pivotTotalColumnPosition: NonUndefined<InfiniteTableProps<T>['pivotTotalColumnPosition']>;
|
|
1163
1226
|
}
|
|
1164
1227
|
export interface InfiniteTableDerivedState<T> {
|
|
1165
|
-
|
|
1228
|
+
groupBy: DataSourceProps<T>['groupBy'];
|
|
1166
1229
|
computedColumns: Map<string, InfiniteTableColumn<T>>;
|
|
1167
1230
|
virtualizeHeader: boolean;
|
|
1168
1231
|
groupRenderStrategy: NonUndefined<InfiniteTableProps<T>['groupRenderStrategy']>;
|
|
@@ -1236,17 +1299,20 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1236
1299
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1237
1300
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1238
1301
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1239
|
-
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy,
|
|
1302
|
+
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 } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1240
1303
|
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1241
1304
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1242
1305
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1243
1306
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1244
|
-
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy,
|
|
1307
|
+
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, 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, };
|
|
1245
1308
|
}
|
|
1246
1309
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1247
1310
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1248
1311
|
export function getInfiniteTableContext<T>(): React.Context<InfiniteTableContextValue<T>>;
|
|
1249
1312
|
}
|
|
1313
|
+
declare module "components/InfiniteTable/utils/toMap" {
|
|
1314
|
+
export function toMap<K extends string, V>(mapOrObject?: Map<K, V> | Record<K, V>): Map<K, V>;
|
|
1315
|
+
}
|
|
1250
1316
|
declare module "components/InfiniteTable/state/computeColumnGroupsDepths" {
|
|
1251
1317
|
import type { InfiniteTablePropColumnGroups } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1252
1318
|
import type { InfiniteTableColumnGroupsDepthsMap } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -1266,11 +1332,12 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1266
1332
|
export const forwardProps: <T>() => Partial<{
|
|
1267
1333
|
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>>);
|
|
1268
1334
|
header: 1 | ((value: boolean | undefined) => boolean);
|
|
1335
|
+
showSeparatePivotColumnForSingleAggregation: 1 | ((value: boolean | undefined) => boolean);
|
|
1269
1336
|
pivotTotalColumnPosition: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition | undefined) => import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition);
|
|
1270
1337
|
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);
|
|
1271
1338
|
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined);
|
|
1272
|
-
pivotColumn: 1 | ((value: Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined) => Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined);
|
|
1273
1339
|
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1340
|
+
pivotColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T, import("components/InfiniteTable/types").InfiniteTableColumn<T> & import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotFinalColumn<T, any>> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T, import("components/InfiniteTable/types").InfiniteTableColumn<T> & import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotFinalColumn<T, any>> | undefined);
|
|
1274
1341
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1275
1342
|
scrollTopId: 1 | ((value: string | number | undefined) => string | number | undefined);
|
|
1276
1343
|
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
@@ -1295,7 +1362,7 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1295
1362
|
rowClassName: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined);
|
|
1296
1363
|
pinnedStartMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1297
1364
|
pinnedEndMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1298
|
-
pivotRowLabelsColumn: 1 | ((value:
|
|
1365
|
+
pivotRowLabelsColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined);
|
|
1299
1366
|
activeIndex: 1 | ((value: number | undefined) => number);
|
|
1300
1367
|
columnMinWidth: 1 | ((value: number | undefined) => number);
|
|
1301
1368
|
columnMaxWidth: 1 | ((value: number | undefined) => number);
|
|
@@ -1309,7 +1376,6 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1309
1376
|
licenseKey: 1 | ((value: string | undefined) => string);
|
|
1310
1377
|
columnVisibility: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility);
|
|
1311
1378
|
columnPinning: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnPinning | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnPinning);
|
|
1312
|
-
columnAggregations: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T>);
|
|
1313
1379
|
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups);
|
|
1314
1380
|
collapsedColumnGroups: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups);
|
|
1315
1381
|
columnSizing: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnSizing | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnSizingMap);
|
|
@@ -1532,13 +1598,6 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1532
1598
|
};
|
|
1533
1599
|
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>;
|
|
1534
1600
|
}
|
|
1535
|
-
declare module "components/DataSource/publicHooks/useDataSourceActions" {
|
|
1536
|
-
import { DataSourceComponentActions } from "components/DataSource/types";
|
|
1537
|
-
export default function useDataSourceActions<T>(): DataSourceComponentActions<T>;
|
|
1538
|
-
}
|
|
1539
|
-
declare module "components/InfiniteTable/hooks/useColumnAggregations" {
|
|
1540
|
-
export function useColumnAggregations<T>(): void;
|
|
1541
|
-
}
|
|
1542
1601
|
declare module "components/InfiniteTable/hooks/useColumnGroups" {
|
|
1543
1602
|
export function useColumnGroups<T>(): void;
|
|
1544
1603
|
}
|
|
@@ -1546,6 +1605,15 @@ declare module "utils/join" {
|
|
|
1546
1605
|
const join: (...args: (string | number | void | null)[]) => string;
|
|
1547
1606
|
export { join };
|
|
1548
1607
|
}
|
|
1608
|
+
declare module "components/InfiniteTable/components/icons/ExpanderIcon.css" {
|
|
1609
|
+
export const ExpanderIconCls: string;
|
|
1610
|
+
export const ExpanderIconClsVariants: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
1611
|
+
expanded: {
|
|
1612
|
+
true: string;
|
|
1613
|
+
false: {};
|
|
1614
|
+
};
|
|
1615
|
+
}>;
|
|
1616
|
+
}
|
|
1549
1617
|
declare module "components/InfiniteTable/components/icons/ExpanderIcon" {
|
|
1550
1618
|
import * as React from 'react';
|
|
1551
1619
|
type ExpanderIconProps = {
|
|
@@ -1590,7 +1658,7 @@ declare module "components/InfiniteTable/components/InfiniteTableRow/row.css" {
|
|
|
1590
1658
|
export const GroupRowExpanderCls: string;
|
|
1591
1659
|
}
|
|
1592
1660
|
declare module "components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns" {
|
|
1593
|
-
import {
|
|
1661
|
+
import { DataSourcePropGroupBy, DataSourcePropPivotBy } from "components/DataSource/index";
|
|
1594
1662
|
import { InfiniteTableProps } from "components/InfiniteTable/types/index";
|
|
1595
1663
|
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1596
1664
|
export function getComputedPivotColumnsFromDataSourcePivotColumns<T>(pivotColumns: InfiniteTableProps<T>['pivotColumns'], params: {
|
|
@@ -1599,13 +1667,13 @@ declare module "components/InfiniteTable/state/getComputedPivotColumnsFromDataSo
|
|
|
1599
1667
|
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
1600
1668
|
pivotTotalColumnPosition: InfiniteTableState<T>['pivotTotalColumnPosition'];
|
|
1601
1669
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
1602
|
-
|
|
1670
|
+
groupBy: DataSourcePropGroupBy<T>;
|
|
1603
1671
|
}): InfiniteTableProps<T>['pivotColumns'];
|
|
1604
1672
|
}
|
|
1605
1673
|
declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
1606
1674
|
import * as React from 'react';
|
|
1607
1675
|
import { InfiniteTableColumnRenderParam } from "components/InfiniteTable/index";
|
|
1608
|
-
import {
|
|
1676
|
+
import { DataSourceGroupBy } from "components/DataSource/index";
|
|
1609
1677
|
import { InfiniteTableGeneratedGroupColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1610
1678
|
import { InfiniteTableGroupColumnGetterOptions, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1611
1679
|
export function getGroupColumnRender<T>({ groupIndexForColumn, groupRenderStrategy, toggleGroupRow, }: {
|
|
@@ -1615,7 +1683,7 @@ declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
|
1615
1683
|
}): (renderOptions: InfiniteTableColumnRenderParam<T>) => React.ReactNode;
|
|
1616
1684
|
export function getColumnForGroupBy<T>(options: InfiniteTableGroupColumnGetterOptions<T> & {
|
|
1617
1685
|
groupIndexForColumn: number;
|
|
1618
|
-
groupByForColumn:
|
|
1686
|
+
groupByForColumn: DataSourceGroupBy<T>;
|
|
1619
1687
|
}, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1620
1688
|
export function getSingleGroupColumn<T>(options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1621
1689
|
}
|
|
@@ -1625,12 +1693,12 @@ declare module "components/InfiniteTable/hooks/useToggleGroupRow" {
|
|
|
1625
1693
|
}
|
|
1626
1694
|
declare module "components/InfiniteTable/hooks/useColumnsWhen" {
|
|
1627
1695
|
import type { InfiniteTableColumn } from "components/InfiniteTable/index";
|
|
1628
|
-
import type {
|
|
1696
|
+
import type { DataSourceGroupBy } from "components/DataSource/index";
|
|
1629
1697
|
import type { InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1630
1698
|
export function useColumnsWhen<T>(): void;
|
|
1631
1699
|
export function getColumnsWhenGrouping<T>(params: {
|
|
1632
1700
|
columns: Map<string, InfiniteTableColumn<T>>;
|
|
1633
|
-
|
|
1701
|
+
groupBy: DataSourceGroupBy<T>[];
|
|
1634
1702
|
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1635
1703
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1636
1704
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
@@ -2621,9 +2689,9 @@ declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
|
2621
2689
|
export function useListRendering<T>(param: ListRenderingParam<T>): ListRenderingResult;
|
|
2622
2690
|
}
|
|
2623
2691
|
declare module "components/utils/decamelize" {
|
|
2624
|
-
export
|
|
2692
|
+
export function decamelize(str: string, options?: {
|
|
2625
2693
|
separator: string;
|
|
2626
|
-
}
|
|
2694
|
+
}): string;
|
|
2627
2695
|
}
|
|
2628
2696
|
declare module "components/InfiniteTable/components/InfiniteTableLicenseFooter/index" {
|
|
2629
2697
|
import * as React from 'react';
|
|
@@ -3060,4 +3128,5 @@ declare module "@infinite-table/infinite-react" {
|
|
|
3060
3128
|
export { group, flatten } from "utils/groupAndPivot/index";
|
|
3061
3129
|
export { useComponentState, getComponentStateRoot, } from "components/hooks/useComponentState";
|
|
3062
3130
|
export { interceptMap } from "components/hooks/useInterceptedMap";
|
|
3131
|
+
export { useEffectWithChanges } from "components/hooks/useEffectWithChanges";
|
|
3063
3132
|
}
|