@infinite-table/infinite-react 0.1.1 → 0.2.0
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 +5 -4
- package/index.d.ts +191 -107
- package/index.esm.css +5 -4
- package/index.esm.js +994 -644
- package/index.js +1023 -673
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -49,18 +49,14 @@ declare module "utils/multisort/index" {
|
|
|
49
49
|
const getMultisortFunction: <T>(sortInfo: MultisortInfo<T>[], get?: ((item: any) => T) | undefined) => (first: T, second: T) => number;
|
|
50
50
|
export { getMultisortFunction, getSortFunctions };
|
|
51
51
|
}
|
|
52
|
-
declare module "
|
|
52
|
+
declare module "utils/DeepMap/once" {
|
|
53
53
|
export function once<ReturnType>(fn: () => ReturnType): () => ReturnType;
|
|
54
|
-
export function useOnce<ReturnType>(fn: () => ReturnType): ReturnType;
|
|
55
|
-
}
|
|
56
|
-
declare module "components/types/VoidFn" {
|
|
57
|
-
export type VoidFn = () => void;
|
|
58
54
|
}
|
|
59
|
-
declare module "utils/sortAscending" {
|
|
55
|
+
declare module "utils/DeepMap/sortAscending" {
|
|
60
56
|
export const sortAscending: (a: number, b: number) => number;
|
|
61
57
|
}
|
|
62
|
-
declare module "utils/DeepMap" {
|
|
63
|
-
|
|
58
|
+
declare module "utils/DeepMap/index" {
|
|
59
|
+
type VoidFn = () => void;
|
|
64
60
|
type Pair<KeyType, ValueType> = {
|
|
65
61
|
value?: ValueType;
|
|
66
62
|
map?: Map<KeyType, Pair<KeyType, ValueType>>;
|
|
@@ -149,7 +145,7 @@ declare module "components/hooks/useComponentState" {
|
|
|
149
145
|
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
150
146
|
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
151
147
|
state: T_STATE;
|
|
152
|
-
}) => void;
|
|
148
|
+
}) => void | boolean;
|
|
153
149
|
};
|
|
154
150
|
export type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
155
151
|
export type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = Partial<{
|
|
@@ -158,9 +154,14 @@ declare module "components/hooks/useComponentState" {
|
|
|
158
154
|
type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
|
|
159
155
|
debugName?: string;
|
|
160
156
|
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
161
|
-
forwardProps?: () => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
157
|
+
forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
162
158
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
163
159
|
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
160
|
+
onPropChange?: (params: {
|
|
161
|
+
name: keyof T_PROPS;
|
|
162
|
+
oldValue: any;
|
|
163
|
+
newValue: any;
|
|
164
|
+
}, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
|
|
164
165
|
mapPropsToState?: (params: {
|
|
165
166
|
props: T_PROPS;
|
|
166
167
|
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
@@ -185,6 +186,9 @@ declare module "components/hooks/useComponentState" {
|
|
|
185
186
|
declare module "components/types/NonUndefined" {
|
|
186
187
|
export type NonUndefined<T> = T extends undefined ? never : T;
|
|
187
188
|
}
|
|
189
|
+
declare module "components/types/VoidFn" {
|
|
190
|
+
export type VoidFn = () => void;
|
|
191
|
+
}
|
|
188
192
|
declare module "components/types/SubscriptionCallback" {
|
|
189
193
|
import { VoidFn } from "components/types/VoidFn";
|
|
190
194
|
export type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
@@ -198,7 +202,7 @@ declare module "components/types/SubscriptionCallback" {
|
|
|
198
202
|
declare module "components/DataSource/types" {
|
|
199
203
|
import * as React from 'react';
|
|
200
204
|
import { MultisortInfo } from "utils/multisort/index";
|
|
201
|
-
import { DeepMap } from "utils/DeepMap";
|
|
205
|
+
import { DeepMap } from "utils/DeepMap/index";
|
|
202
206
|
import { DeepMapGroupValueType, GroupBy, GroupKeyType, PivotBy } from "utils/groupAndPivot/index";
|
|
203
207
|
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/index";
|
|
204
208
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
@@ -206,13 +210,21 @@ declare module "components/DataSource/types" {
|
|
|
206
210
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
207
211
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
208
212
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
213
|
+
import { ScrollStopInfo } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
209
214
|
export interface DataSourceDataParams<T> {
|
|
210
215
|
originalDataArray: T[];
|
|
211
216
|
sortInfo?: DataSourceSortInfo<T>;
|
|
212
217
|
groupBy?: DataSourcePropGroupBy<T>;
|
|
213
218
|
pivotBy?: DataSourcePropPivotBy<T>;
|
|
219
|
+
lazyLoadBatchSize?: number;
|
|
220
|
+
lazyLoadStartIndex?: number;
|
|
221
|
+
groupKeys?: any[];
|
|
222
|
+
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
214
223
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
224
|
+
cursorId?: DataSourceSetupState<T>['cursorId'];
|
|
225
|
+
changes?: DataSourceDataParamsChanges<T>;
|
|
215
226
|
}
|
|
227
|
+
export type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
|
|
216
228
|
export type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
217
229
|
field?: keyof T;
|
|
218
230
|
id?: string;
|
|
@@ -222,6 +234,8 @@ declare module "components/DataSource/types" {
|
|
|
222
234
|
export type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
223
235
|
export type DataSourceRemoteData<T> = {
|
|
224
236
|
data: T[];
|
|
237
|
+
mappings?: DataSourceMappings;
|
|
238
|
+
totalCount?: number;
|
|
225
239
|
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
226
240
|
};
|
|
227
241
|
export type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
@@ -235,7 +249,8 @@ declare module "components/DataSource/types" {
|
|
|
235
249
|
export interface DataSourceMappedState<T> {
|
|
236
250
|
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
237
251
|
livePagination: DataSourceProps<T>['livePagination'];
|
|
238
|
-
|
|
252
|
+
fullLazyLoad: DataSourceProps<T>['fullLazyLoad'];
|
|
253
|
+
lazyLoadBatchSize: DataSourceProps<T>['lazyLoadBatchSize'];
|
|
239
254
|
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
240
255
|
data: DataSourceProps<T>['data'];
|
|
241
256
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
@@ -243,26 +258,47 @@ declare module "components/DataSource/types" {
|
|
|
243
258
|
groupRowsState: NonUndefined<DataSourceProps<T>['groupRowsState']>;
|
|
244
259
|
pivotBy: DataSourceProps<T>['pivotBy'];
|
|
245
260
|
loading: NonUndefined<DataSourceProps<T>['loading']>;
|
|
261
|
+
collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
|
|
246
262
|
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
247
263
|
}
|
|
248
264
|
export type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
265
|
+
name?: string;
|
|
249
266
|
field?: keyof T;
|
|
250
|
-
initialValue
|
|
267
|
+
initialValue?: AggregationResultType;
|
|
251
268
|
getter?: (data: T) => any;
|
|
252
|
-
reducer: (accumulator: any, value: any, data: T) => AggregationResultType | any;
|
|
269
|
+
reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
|
|
253
270
|
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
254
271
|
};
|
|
272
|
+
export type DataSourceMappings = Record<'totals' | 'values', string>;
|
|
273
|
+
export type LazyGroupDataItem<DataType> = {
|
|
274
|
+
data: Partial<DataType>;
|
|
275
|
+
keys: any[];
|
|
276
|
+
aggregations?: Record<string, any>;
|
|
277
|
+
pivot?: {
|
|
278
|
+
values: Record<string, any>;
|
|
279
|
+
totals?: Record<string, any>;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
export type LazyGroupRowInfo<DataType> = {
|
|
283
|
+
items: LazyGroupDataItem<DataType>[];
|
|
284
|
+
totalCount: number;
|
|
285
|
+
};
|
|
286
|
+
export type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyGroupRowInfo<DataType>>;
|
|
255
287
|
export interface DataSourceSetupState<T> {
|
|
288
|
+
pivotMappings?: DataSourceMappings;
|
|
289
|
+
propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
|
|
256
290
|
showSeparatePivotColumnForSingleAggregation: boolean;
|
|
257
291
|
dataParams?: DataSourceDataParams<T>;
|
|
292
|
+
originalLazyGroupData: LazyGroupDataDeepMap<T>;
|
|
258
293
|
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
294
|
+
notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
|
|
259
295
|
originalDataArray: T[];
|
|
260
296
|
lastSortDataArray?: T[];
|
|
261
297
|
lastGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
262
298
|
dataArray: InfiniteTableRowInfo<T>[];
|
|
263
299
|
groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
|
|
264
300
|
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
265
|
-
|
|
301
|
+
cursorId: number | Symbol | DataSourceLivePaginationCursorValue;
|
|
266
302
|
updatedAt: number;
|
|
267
303
|
reducedAt: number;
|
|
268
304
|
groupedAt: number;
|
|
@@ -274,11 +310,13 @@ declare module "components/DataSource/types" {
|
|
|
274
310
|
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
275
311
|
}
|
|
276
312
|
export type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
277
|
-
export
|
|
313
|
+
export type DataSourceProps<T> = {
|
|
278
314
|
children: React.ReactNode | ((contextData: DataSourceState<T>) => React.ReactNode);
|
|
279
315
|
primaryKey: keyof T;
|
|
280
316
|
fields?: (keyof T)[];
|
|
281
317
|
data: DataSourceData<T>;
|
|
318
|
+
fullLazyLoad?: boolean;
|
|
319
|
+
lazyLoadBatchSize?: number;
|
|
282
320
|
loading?: boolean;
|
|
283
321
|
defaultLoading?: boolean;
|
|
284
322
|
onLoadingChange?: (loading: boolean) => void;
|
|
@@ -293,19 +331,29 @@ declare module "components/DataSource/types" {
|
|
|
293
331
|
groupRowsState?: GroupRowsState;
|
|
294
332
|
defaultGroupRowsState?: GroupRowsState;
|
|
295
333
|
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
334
|
+
collapseGroupRowsOnDataFunctionChange?: boolean;
|
|
296
335
|
sortInfo?: DataSourceSortInfo<T>;
|
|
297
336
|
defaultSortInfo?: DataSourceSortInfo<T>;
|
|
298
337
|
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
299
338
|
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
300
339
|
livePagination?: boolean;
|
|
301
|
-
livePaginationCursor?:
|
|
302
|
-
|
|
303
|
-
|
|
340
|
+
livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
|
|
341
|
+
onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
|
|
342
|
+
};
|
|
343
|
+
export type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
|
|
344
|
+
export type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
|
|
345
|
+
export type DataSourceLivePaginationCursorParams<T> = {
|
|
346
|
+
array: T[];
|
|
347
|
+
lastItem: T | Partial<T> | null;
|
|
348
|
+
length: number;
|
|
349
|
+
};
|
|
350
|
+
export type DataSourceLivePaginationCursorValue = string | number | null;
|
|
304
351
|
export interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
305
352
|
}
|
|
306
353
|
export interface DataSourceDerivedState<_T> {
|
|
307
354
|
multiSort: boolean;
|
|
308
355
|
controlledSort: boolean;
|
|
356
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
309
357
|
}
|
|
310
358
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
311
359
|
export interface DataSourceContextValue<T> {
|
|
@@ -341,21 +389,22 @@ declare module "components/hooks/useEffectWithChanges" {
|
|
|
341
389
|
export function useEffectWithObject(fn: EffectCallback, deps: Record<string, any>): void;
|
|
342
390
|
}
|
|
343
391
|
declare module "components/DataSource/privateHooks/useLoadData" {
|
|
344
|
-
import {
|
|
345
|
-
|
|
392
|
+
import { ComponentStateGeneratedActions } from "components/hooks/useComponentState";
|
|
393
|
+
import { DataSourceDataParams, DataSourceData, DataSourceState } from "components/DataSource/types";
|
|
394
|
+
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>, overrides?: Partial<DataSourceDataParams<T>>): DataSourceDataParams<T>;
|
|
395
|
+
export function loadData<T>(data: DataSourceData<T>, componentState: DataSourceState<T>, actions: ComponentStateGeneratedActions<DataSourceState<T>>, overrides?: Partial<DataSourceDataParams<T>>): void;
|
|
346
396
|
export function useLoadData<T>(): void;
|
|
347
|
-
export function useLivePagination<T>(): void;
|
|
348
397
|
}
|
|
349
398
|
declare module "components/DataSource/state/normalizeSortInfo" {
|
|
350
399
|
import { DataSourceSingleSortInfo, DataSourceSortInfo } from "components/DataSource/types";
|
|
351
|
-
export const normalizeSortInfo: <T>(
|
|
400
|
+
export const normalizeSortInfo: <T>(initialSortInfo?: DataSourceSortInfo<T> | undefined, weakMap?: WeakMap<any, any> | undefined) => DataSourceSingleSortInfo<T>[];
|
|
352
401
|
}
|
|
353
402
|
declare module "components/utils/buildSubscriptionCallback" {
|
|
354
403
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
355
404
|
export function buildSubscriptionCallback<T>(): SubscriptionCallback<T>;
|
|
356
405
|
}
|
|
357
406
|
declare module "utils/shallowEqualObjects" {
|
|
358
|
-
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T): boolean;
|
|
407
|
+
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T, ignoreKeys?: Set<string>): boolean;
|
|
359
408
|
}
|
|
360
409
|
declare module "components/utils/discardCallsWithEqualArg" {
|
|
361
410
|
export function discardCallsWithEqualArg<T = any>(fn: (arg: T) => void, timeframe?: number, getCompareObject?: (arg: T) => any): (arg: T) => void;
|
|
@@ -364,25 +413,33 @@ declare module "components/DataSource/state/getInitialState" {
|
|
|
364
413
|
import { DataSourceMappedState, DataSourceProps, DataSourceDerivedState, DataSourceSetupState, DataSourceState } from "components/DataSource/types";
|
|
365
414
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
366
415
|
import { ComponentInterceptedActions, ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
367
|
-
import { DataSourceDataParams } from "components/DataSource/index";
|
|
416
|
+
import { DataSourceComponentActions, DataSourceDataParams } from "components/DataSource/index";
|
|
417
|
+
export const defaultCursorId: unique symbol;
|
|
368
418
|
export function initSetupState<T>(): DataSourceSetupState<T>;
|
|
369
|
-
export const forwardProps: <T>() => Partial<{
|
|
419
|
+
export const forwardProps: <T>(setupState: DataSourceSetupState<T>) => Partial<{
|
|
370
420
|
data: 1 | ((value: import("components/DataSource").DataSourceData<T>) => import("components/DataSource").DataSourceData<T>);
|
|
371
421
|
loading: 1 | ((value: boolean | undefined) => boolean);
|
|
422
|
+
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
423
|
+
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
424
|
+
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
425
|
+
lazyLoadBatchSize: 1 | ((value: number | undefined) => number | undefined);
|
|
372
426
|
aggregationReducers: 1 | ((value: import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined) => import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined);
|
|
373
427
|
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
374
|
-
|
|
428
|
+
fullLazyLoad: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
375
429
|
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
376
430
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
377
|
-
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
378
431
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
379
|
-
|
|
380
|
-
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
432
|
+
collapseGroupRowsOnDataFunctionChange: 1 | ((value: boolean | undefined) => boolean);
|
|
381
433
|
}>;
|
|
382
434
|
export function mapPropsToState<T extends any>(params: {
|
|
383
435
|
props: DataSourceProps<T>;
|
|
384
436
|
state: DataSourceState<T>;
|
|
437
|
+
oldState: DataSourceState<T> | null;
|
|
385
438
|
}): DataSourceDerivedState<T>;
|
|
439
|
+
export function onPropChange<T>(params: {
|
|
440
|
+
name: keyof T;
|
|
441
|
+
newValue: any;
|
|
442
|
+
}, props: DataSourceProps<T>, actions: DataSourceComponentActions<T>): void;
|
|
386
443
|
export function getInterceptActions<T>(): ComponentInterceptedActions<DataSourceState<T>>;
|
|
387
444
|
}
|
|
388
445
|
declare module "components/types/Renderable" {
|
|
@@ -414,6 +471,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
414
471
|
import type { InfiniteTableColumnGroup, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
415
472
|
import { CSSProperties } from 'react';
|
|
416
473
|
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal, PivotBy } from "utils/groupAndPivot/index";
|
|
474
|
+
import { InfiniteTableColumnPinnedValues } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
417
475
|
export type { DiscriminatedUnion, RequireAtLeastOne };
|
|
418
476
|
export type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
419
477
|
export type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
@@ -444,7 +502,6 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
444
502
|
column: InfiniteTableComputedColumn<T>;
|
|
445
503
|
columnSortInfo: DataSourceSingleSortInfo<T> | null | undefined;
|
|
446
504
|
}
|
|
447
|
-
export type InfiniteTableColumnPinned = 'start' | 'end' | false;
|
|
448
505
|
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;
|
|
449
506
|
export type InfiniteTableColumnRenderValueFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE>;
|
|
450
507
|
export type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderRenderParams<T>) => Renderable;
|
|
@@ -517,7 +574,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
517
574
|
groupByField: string | string[];
|
|
518
575
|
id?: string;
|
|
519
576
|
};
|
|
520
|
-
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & Partial<
|
|
577
|
+
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & Partial<InfiniteTablePivotFinalColumnVariant<T, any>>;
|
|
521
578
|
export type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
522
579
|
pivotBy: DataSourcePivotBy<DataType>[];
|
|
523
580
|
pivotTotalColumnGroup?: true;
|
|
@@ -533,10 +590,11 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
533
590
|
pivotAggregator: AggregationReducer<DataType, any>;
|
|
534
591
|
pivotAggregatorIndex: number;
|
|
535
592
|
pivotGroupKeys: KeyType[];
|
|
536
|
-
pivotByAtIndex
|
|
593
|
+
pivotByAtIndex?: PivotBy<DataType, KeyType>;
|
|
537
594
|
pivotIndex: number;
|
|
538
595
|
pivotGroupKey: KeyType;
|
|
539
596
|
};
|
|
597
|
+
export type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
540
598
|
type InfiniteTableComputedColumnBase<T> = {
|
|
541
599
|
computedWidth: number;
|
|
542
600
|
computedOffset: number;
|
|
@@ -550,7 +608,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
550
608
|
computedSortIndex: number;
|
|
551
609
|
computedVisibleIndex: number;
|
|
552
610
|
computedMultiSort: boolean;
|
|
553
|
-
computedPinned:
|
|
611
|
+
computedPinned: InfiniteTableColumnPinnedValues;
|
|
554
612
|
computedDraggable: boolean;
|
|
555
613
|
computedFirstInCategory: boolean;
|
|
556
614
|
computedLastInCategory: boolean;
|
|
@@ -564,13 +622,14 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
564
622
|
}
|
|
565
623
|
declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
566
624
|
import type { DataSourceAggregationReducer, DataSourcePivotBy } from "components/DataSource/index";
|
|
567
|
-
import type {
|
|
625
|
+
import type { InfiniteTablePropColumnsMap } from "components/InfiniteTable/index";
|
|
568
626
|
import type { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
627
|
+
import { InfiniteTablePropColumnGroupsMap } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
569
628
|
import type { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
570
|
-
import { DeepMap } from "utils/DeepMap";
|
|
629
|
+
import { DeepMap } from "utils/DeepMap/index";
|
|
571
630
|
export type ComputedColumnsAndGroups<DataType> = {
|
|
572
631
|
columns: InfiniteTablePropColumnsMap<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
573
|
-
columnGroups:
|
|
632
|
+
columnGroups: InfiniteTablePropColumnGroupsMap;
|
|
574
633
|
};
|
|
575
634
|
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>({ deepMap, pivotBy, pivotTotalColumnPosition, reducers, showSeparatePivotColumnForSingleAggregation, }: {
|
|
576
635
|
deepMap: DeepMap<KeyType, boolean>;
|
|
@@ -622,11 +681,12 @@ declare module "components/DataSource/GroupRowsState" {
|
|
|
622
681
|
}
|
|
623
682
|
}
|
|
624
683
|
declare module "utils/groupAndPivot/index" {
|
|
625
|
-
import { DataSourceAggregationReducer } from "@infinite-table/infinite-react";
|
|
684
|
+
import { DataSourceAggregationReducer, DataSourceMappings, LazyGroupDataDeepMap } from "@infinite-table/infinite-react";
|
|
626
685
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
627
|
-
import { InfiniteTableColumn, InfiniteTablePivotColumn,
|
|
686
|
+
import { InfiniteTableColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumnGroup, InfiniteTablePivotFinalColumnVariant } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
628
687
|
import { InfiniteTableColumnGroup, InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
629
|
-
import { DeepMap } from "utils/DeepMap";
|
|
688
|
+
import { DeepMap } from "utils/DeepMap/index";
|
|
689
|
+
export const LAZY_ROOT_KEY_FOR_GROUPS: string;
|
|
630
690
|
export type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
631
691
|
id: string;
|
|
632
692
|
};
|
|
@@ -660,6 +720,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
660
720
|
indexInAll: number;
|
|
661
721
|
groupCount?: number;
|
|
662
722
|
groupBy?: (keyof T)[];
|
|
723
|
+
rootGroupBy?: (keyof T)[];
|
|
663
724
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
664
725
|
reducerResults?: Record<string, AggregationReducerResult>;
|
|
665
726
|
};
|
|
@@ -674,6 +735,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
674
735
|
groupKeys?: any[];
|
|
675
736
|
groupCount: number;
|
|
676
737
|
groupBy: (keyof T)[];
|
|
738
|
+
rootGroupBy: (keyof T)[];
|
|
677
739
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
678
740
|
};
|
|
679
741
|
export type GroupKeyType<T extends any = any> = T;
|
|
@@ -695,7 +757,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
695
757
|
};
|
|
696
758
|
export type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
697
759
|
column?: InfiniteTableColumn<DataType> | (({ column, }: {
|
|
698
|
-
column:
|
|
760
|
+
column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
|
|
699
761
|
}) => Partial<InfiniteTablePivotColumn<DataType>>);
|
|
700
762
|
columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
|
|
701
763
|
columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
|
|
@@ -707,6 +769,9 @@ declare module "utils/groupAndPivot/index" {
|
|
|
707
769
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
708
770
|
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
709
771
|
};
|
|
772
|
+
type LazyGroupParams = {
|
|
773
|
+
mappings?: DataSourceMappings;
|
|
774
|
+
};
|
|
710
775
|
export type DataGroupResult<DataType, KeyType extends any> = {
|
|
711
776
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
712
777
|
groupParams: GroupParams<DataType, KeyType>;
|
|
@@ -715,6 +780,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
715
780
|
topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
|
|
716
781
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
717
782
|
};
|
|
783
|
+
export function lazyGroup<DataType, KeyType extends string = string>(groupParams: GroupParams<DataType, KeyType> & LazyGroupParams, rootData: LazyGroupDataDeepMap<DataType>): DataGroupResult<DataType, KeyType>;
|
|
718
784
|
export function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
|
|
719
785
|
export function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
|
|
720
786
|
export type EnhancedFlattenParam<DataType, KeyType = any> = {
|
|
@@ -913,12 +979,15 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
913
979
|
import { DataSourceGroupBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
914
980
|
import { Renderable } from "components/types/Renderable";
|
|
915
981
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
916
|
-
import type {
|
|
982
|
+
import type { InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
917
983
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
918
984
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
919
985
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
920
|
-
export type InfiniteTablePropColumnVisibility =
|
|
921
|
-
export type
|
|
986
|
+
export type InfiniteTablePropColumnVisibility = Record<string, false>;
|
|
987
|
+
export type InfiniteTablePropColumnPinningMap = Map<string, true | 'start' | 'end'>;
|
|
988
|
+
export type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
|
|
989
|
+
export type InfiniteTablePropColumnPinningRecord = Record<string, true | 'start' | 'end'>;
|
|
990
|
+
export type InfiniteTablePropColumnPinning = InfiniteTablePropColumnPinningRecord | InfiniteTablePropColumnPinningMap;
|
|
922
991
|
export type InfiniteTableRowStyleFnParams<T> = {
|
|
923
992
|
rowIndex: number;
|
|
924
993
|
groupBy?: (keyof T)[];
|
|
@@ -942,6 +1011,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
942
1011
|
maxWidth?: number;
|
|
943
1012
|
defaultWidth?: number;
|
|
944
1013
|
defaultFlex?: number;
|
|
1014
|
+
defaultPinned?: InfiniteTableColumnPinnedValues;
|
|
945
1015
|
header?: InfiniteTableColumn<T>['header'];
|
|
946
1016
|
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
947
1017
|
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
@@ -949,7 +1019,6 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
949
1019
|
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
950
1020
|
align?: InfiniteTableColumn<T>['align'];
|
|
951
1021
|
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
952
|
-
defaultPinned?: InfiniteTableColumnPinned;
|
|
953
1022
|
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
954
1023
|
render?: InfiniteTableColumn<T>['render'];
|
|
955
1024
|
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
@@ -980,11 +1049,14 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
980
1049
|
export type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = InfiniteTablePropColumnsMap<T, ColumnType> | Record<string, ColumnType>;
|
|
981
1050
|
export type InfiniteTableColumns<T> = InfiniteTablePropColumns<T>;
|
|
982
1051
|
export type InfiniteTableColumnsMap<T> = InfiniteTablePropColumnsMap<T>;
|
|
983
|
-
export type
|
|
1052
|
+
export type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
|
|
1053
|
+
export type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
|
|
1054
|
+
export type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
|
|
984
1055
|
/**
|
|
985
1056
|
* 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
|
|
986
1057
|
* the value is the id of the column to leave as visible
|
|
987
1058
|
*/
|
|
1059
|
+
export type InfiniteTablePropCollapsedColumnGroupsMap = Map<string[], string>;
|
|
988
1060
|
export type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
|
|
989
1061
|
export type InfiniteTableColumnGroupHeaderRenderParams = {
|
|
990
1062
|
columnGroup: InfiniteTableComputedColumnGroup;
|
|
@@ -1015,7 +1087,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1015
1087
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
1016
1088
|
};
|
|
1017
1089
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
1018
|
-
export type InfiniteTableGroupColumnBase<T> =
|
|
1090
|
+
export type InfiniteTableGroupColumnBase<T> = InfiniteTableColumn<T> & {
|
|
1019
1091
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
1020
1092
|
id?: string;
|
|
1021
1093
|
};
|
|
@@ -1023,12 +1095,17 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1023
1095
|
renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
|
|
1024
1096
|
};
|
|
1025
1097
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
1026
|
-
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => InfiniteTableGroupColumnBase<T
|
|
1098
|
+
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
1027
1099
|
export type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
1028
1100
|
export type InfiniteTablePropPivotRowLabelsColumn<T> = InfiniteTablePropPivotColumn<T>;
|
|
1029
1101
|
export type InfiniteTablePropComponents = {
|
|
1030
1102
|
LoadMask?: React.FC<LoadMaskProps>;
|
|
1031
1103
|
};
|
|
1104
|
+
export type ScrollStopInfo = {
|
|
1105
|
+
scrollTop: number;
|
|
1106
|
+
firstVisibleRowIndex: number;
|
|
1107
|
+
lastVisibleRowIndex: number;
|
|
1108
|
+
};
|
|
1032
1109
|
export interface InfiniteTableProps<T> {
|
|
1033
1110
|
columns: InfiniteTablePropColumns<T>;
|
|
1034
1111
|
pivotColumns?: InfiniteTablePropColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
@@ -1085,6 +1162,8 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
1085
1162
|
onBlurWithin?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
1086
1163
|
onScrollToTop?: () => void;
|
|
1087
1164
|
onScrollToBottom?: () => void;
|
|
1165
|
+
scrollStopDelay?: number;
|
|
1166
|
+
onScrollStop?: (param: ScrollStopInfo) => void;
|
|
1088
1167
|
scrollToBottomOffset?: number;
|
|
1089
1168
|
defaultColumnOrder?: InfiniteTablePropColumnOrder;
|
|
1090
1169
|
columnOrder?: InfiniteTablePropColumnOrder;
|
|
@@ -1124,7 +1203,7 @@ declare module "components/VirtualBrain/ScrollListener" {
|
|
|
1124
1203
|
}
|
|
1125
1204
|
declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
1126
1205
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
1127
|
-
import type { InfiniteTableColumnGroup,
|
|
1206
|
+
import type { InfiniteTableColumnGroup, InfiniteTablePropColumnGroupsMap, InfiniteTablePropColumnPinningMap, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnsMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1128
1207
|
import { Size } from "components/types/Size";
|
|
1129
1208
|
import { MutableRefObject } from 'react';
|
|
1130
1209
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
@@ -1138,6 +1217,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1138
1217
|
groupIndex: number;
|
|
1139
1218
|
}>;
|
|
1140
1219
|
export interface InfiniteTableSetupState<T> {
|
|
1220
|
+
propsCache: Map<keyof InfiniteTableProps<T>, WeakMap<any, any>>;
|
|
1141
1221
|
columnsWhenInlineGroupRenderStrategy?: Map<string, InfiniteTableColumn<T>>;
|
|
1142
1222
|
domRef: MutableRefObject<HTMLDivElement | null>;
|
|
1143
1223
|
scrollerDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
@@ -1174,8 +1254,10 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1174
1254
|
onSelfBlur: InfiniteTableProps<T>['onSelfBlur'];
|
|
1175
1255
|
onFocusWithin: InfiniteTableProps<T>['onFocusWithin'];
|
|
1176
1256
|
onBlurWithin: InfiniteTableProps<T>['onBlurWithin'];
|
|
1257
|
+
scrollStopDelay: NonUndefined<InfiniteTableProps<T>['scrollStopDelay']>;
|
|
1177
1258
|
onScrollToTop: InfiniteTableProps<T>['onScrollToTop'];
|
|
1178
1259
|
onScrollToBottom: InfiniteTableProps<T>['onScrollToBottom'];
|
|
1260
|
+
onScrollStop: InfiniteTableProps<T>['onScrollStop'];
|
|
1179
1261
|
scrollToBottomOffset: InfiniteTableProps<T>['scrollToBottomOffset'];
|
|
1180
1262
|
focusedClassName: InfiniteTableProps<T>['focusedClassName'];
|
|
1181
1263
|
focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
|
|
@@ -1190,7 +1272,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1190
1272
|
pinnedEndMaxWidth: InfiniteTableProps<T>['pinnedEndMaxWidth'];
|
|
1191
1273
|
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
1192
1274
|
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
1193
|
-
pivotColumnGroups:
|
|
1275
|
+
pivotColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1194
1276
|
activeIndex: NonUndefined<InfiniteTableProps<T>['activeIndex']>;
|
|
1195
1277
|
columnMinWidth: NonUndefined<InfiniteTableProps<T>['columnMinWidth']>;
|
|
1196
1278
|
columnMaxWidth: NonUndefined<InfiniteTableProps<T>['columnMaxWidth']>;
|
|
@@ -1206,11 +1288,11 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1206
1288
|
rowHeight: number;
|
|
1207
1289
|
headerHeight: number;
|
|
1208
1290
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
1209
|
-
columnVisibility:
|
|
1210
|
-
columnPinning:
|
|
1291
|
+
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1292
|
+
columnPinning: InfiniteTablePropColumnPinningMap;
|
|
1211
1293
|
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1212
1294
|
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1213
|
-
columnGroups:
|
|
1295
|
+
columnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1214
1296
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
1215
1297
|
pivotTotalColumnPosition: NonUndefined<InfiniteTableProps<T>['pivotTotalColumnPosition']>;
|
|
1216
1298
|
}
|
|
@@ -1221,7 +1303,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1221
1303
|
groupRenderStrategy: NonUndefined<InfiniteTableProps<T>['groupRenderStrategy']>;
|
|
1222
1304
|
columnGroupsDepthsMap: InfiniteTableColumnGroupsDepthsMap;
|
|
1223
1305
|
columnGroupsMaxDepth: number;
|
|
1224
|
-
computedColumnGroups:
|
|
1306
|
+
computedColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
1225
1307
|
rowHeightCSSVar: string;
|
|
1226
1308
|
headerHeightCSSVar: string;
|
|
1227
1309
|
}
|
|
@@ -1289,24 +1371,24 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1289
1371
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1290
1372
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1291
1373
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1292
|
-
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";
|
|
1374
|
+
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";
|
|
1293
1375
|
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1294
1376
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1295
1377
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1296
1378
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1297
|
-
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, };
|
|
1379
|
+
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, };
|
|
1298
1380
|
}
|
|
1299
1381
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1300
1382
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1301
1383
|
export function getInfiniteTableContext<T>(): React.Context<InfiniteTableContextValue<T>>;
|
|
1302
1384
|
}
|
|
1303
1385
|
declare module "components/InfiniteTable/utils/toMap" {
|
|
1304
|
-
export function toMap<K extends string, V>(mapOrObject?: Map<K, V> | Record<K, V>): Map<K, V>;
|
|
1386
|
+
export function toMap<K extends string, V>(mapOrObject?: Map<K, V> | Record<K, V>, weakMapCache?: WeakMap<any, any>): Map<K, V>;
|
|
1305
1387
|
}
|
|
1306
1388
|
declare module "components/InfiniteTable/state/computeColumnGroupsDepths" {
|
|
1307
|
-
import type {
|
|
1389
|
+
import type { InfiniteTablePropColumnGroupsMap } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1308
1390
|
import type { InfiniteTableColumnGroupsDepthsMap } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1309
|
-
export function computeColumnGroupsDepths(columnGroups:
|
|
1391
|
+
export function computeColumnGroupsDepths(columnGroups: InfiniteTablePropColumnGroupsMap): InfiniteTableColumnGroupsDepthsMap;
|
|
1310
1392
|
}
|
|
1311
1393
|
declare module "components/InfiniteTable/state/getInitialState" {
|
|
1312
1394
|
import { DataSourceState } from "components/DataSource/index";
|
|
@@ -1319,59 +1401,61 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1319
1401
|
* be affected by props
|
|
1320
1402
|
*/
|
|
1321
1403
|
export function initSetupState<T>(): InfiniteTableSetupState<T>;
|
|
1322
|
-
export const forwardProps: <T>() => Partial<{
|
|
1404
|
+
export const forwardProps: <T>(setupState: InfiniteTableSetupState<T>) => Partial<{
|
|
1323
1405
|
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>>);
|
|
1324
1406
|
header: 1 | ((value: boolean | undefined) => boolean);
|
|
1325
1407
|
showSeparatePivotColumnForSingleAggregation: 1 | ((value: boolean | undefined) => boolean);
|
|
1326
1408
|
pivotTotalColumnPosition: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition | undefined) => import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition);
|
|
1327
1409
|
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);
|
|
1328
|
-
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").
|
|
1410
|
+
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropColumnGroupsMap);
|
|
1329
1411
|
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1330
1412
|
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);
|
|
1331
1413
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1332
|
-
|
|
1414
|
+
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1333
1415
|
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1416
|
+
pivotRowLabelsColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined);
|
|
1334
1417
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1418
|
+
hideEmptyGroupColumns: 1 | ((value: boolean | undefined) => boolean);
|
|
1419
|
+
columnVisibility: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility);
|
|
1420
|
+
pinnedStartMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1421
|
+
pinnedEndMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1422
|
+
columnPinning: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnPinning | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropColumnPinningMap);
|
|
1423
|
+
columnSizing: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnSizing | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnSizingMap);
|
|
1424
|
+
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropColumnGroupsMap);
|
|
1425
|
+
collapsedColumnGroups: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups);
|
|
1335
1426
|
onScrollbarsChange: 1 | ((value: ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined) => ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined);
|
|
1336
|
-
|
|
1337
|
-
|
|
1427
|
+
columnTypes: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnTypes<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnTypesMap<T>);
|
|
1428
|
+
rowHeight: 1 | ((value: string | number) => number);
|
|
1429
|
+
rowStyle: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowStyle<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowStyle<T> | undefined);
|
|
1430
|
+
rowClassName: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined);
|
|
1431
|
+
headerHeight: 1 | ((value: string | number) => number);
|
|
1432
|
+
domProps: 1 | ((value: import("react").HTMLProps<HTMLDivElement> | undefined) => import("react").HTMLProps<HTMLDivElement> | undefined);
|
|
1433
|
+
showZebraRows: 1 | ((value: boolean | undefined) => boolean);
|
|
1434
|
+
showHoverRows: 1 | ((value: boolean | undefined) => boolean);
|
|
1435
|
+
draggableColumns: 1 | ((value: boolean | undefined) => boolean);
|
|
1436
|
+
focusedClassName: 1 | ((value: string | undefined) => string | undefined);
|
|
1437
|
+
focusedWithinClassName: 1 | ((value: string | undefined) => string | undefined);
|
|
1438
|
+
focusedStyle: 1 | ((value: import("react").CSSProperties | undefined) => import("react").CSSProperties | undefined);
|
|
1439
|
+
focusedWithinStyle: 1 | ((value: import("react").CSSProperties | undefined) => import("react").CSSProperties | undefined);
|
|
1440
|
+
columnDefaultWidth: 1 | ((value: number | undefined) => number);
|
|
1441
|
+
columnMinWidth: 1 | ((value: number | undefined) => number);
|
|
1442
|
+
columnMaxWidth: 1 | ((value: number | undefined) => number);
|
|
1443
|
+
virtualizeColumns: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropVirtualizeColumns<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropVirtualizeColumns<T>);
|
|
1444
|
+
activeIndex: 1 | ((value: number | undefined) => number);
|
|
1338
1445
|
onSelfFocus: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1339
1446
|
onSelfBlur: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1340
1447
|
onFocusWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1341
1448
|
onBlurWithin: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
1342
1449
|
onScrollToTop: 1 | ((value: (() => void) | undefined) => (() => void) | undefined);
|
|
1343
1450
|
onScrollToBottom: 1 | ((value: (() => void) | undefined) => (() => void) | undefined);
|
|
1451
|
+
scrollStopDelay: 1 | ((value: number | undefined) => number);
|
|
1452
|
+
onScrollStop: 1 | ((value: ((param: import("components/InfiniteTable/types/InfiniteTableProps").ScrollStopInfo) => void) | undefined) => ((param: import("components/InfiniteTable/types/InfiniteTableProps").ScrollStopInfo) => void) | undefined);
|
|
1344
1453
|
scrollToBottomOffset: 1 | ((value: number | undefined) => number | undefined);
|
|
1345
|
-
focusedClassName: 1 | ((value: string | undefined) => string | undefined);
|
|
1346
|
-
focusedWithinClassName: 1 | ((value: string | undefined) => string | undefined);
|
|
1347
|
-
focusedStyle: 1 | ((value: import("react").CSSProperties | undefined) => import("react").CSSProperties | undefined);
|
|
1348
|
-
focusedWithinStyle: 1 | ((value: import("react").CSSProperties | undefined) => import("react").CSSProperties | undefined);
|
|
1349
|
-
domProps: 1 | ((value: import("react").HTMLProps<HTMLDivElement> | undefined) => import("react").HTMLProps<HTMLDivElement> | undefined);
|
|
1350
|
-
rowStyle: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowStyle<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowStyle<T> | undefined);
|
|
1351
|
-
rowProps: 1 | ((value: import("react").HTMLProps<HTMLDivElement> | ((rowArgs: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTableRowStyleFnParams<T>) => import("react").HTMLProps<HTMLDivElement>) | undefined) => import("react").HTMLProps<HTMLDivElement> | ((rowArgs: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTableRowStyleFnParams<T>) => import("react").HTMLProps<HTMLDivElement>) | undefined);
|
|
1352
|
-
rowClassName: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined);
|
|
1353
|
-
pinnedStartMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1354
|
-
pinnedEndMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1355
|
-
pivotRowLabelsColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined);
|
|
1356
|
-
activeIndex: 1 | ((value: number | undefined) => number);
|
|
1357
|
-
columnMinWidth: 1 | ((value: number | undefined) => number);
|
|
1358
|
-
columnMaxWidth: 1 | ((value: number | undefined) => number);
|
|
1359
|
-
columnDefaultWidth: 1 | ((value: number | undefined) => number);
|
|
1360
|
-
draggableColumns: 1 | ((value: boolean | undefined) => boolean);
|
|
1361
|
-
hideEmptyGroupColumns: 1 | ((value: boolean | undefined) => boolean);
|
|
1362
1454
|
columnOrder: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnOrder | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnOrder);
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
virtualizeColumns: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropVirtualizeColumns<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropVirtualizeColumns<T>);
|
|
1455
|
+
onReady: 1 | ((value: ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined) => ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined);
|
|
1456
|
+
rowProps: 1 | ((value: import("react").HTMLProps<HTMLDivElement> | ((rowArgs: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTableRowStyleFnParams<T>) => import("react").HTMLProps<HTMLDivElement>) | undefined) => import("react").HTMLProps<HTMLDivElement> | ((rowArgs: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTableRowStyleFnParams<T>) => import("react").HTMLProps<HTMLDivElement>) | undefined);
|
|
1366
1457
|
licenseKey: 1 | ((value: string | undefined) => string);
|
|
1367
|
-
|
|
1368
|
-
columnPinning: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnPinning | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnPinning);
|
|
1369
|
-
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups);
|
|
1370
|
-
collapsedColumnGroups: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups);
|
|
1371
|
-
columnSizing: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnSizing | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnSizingMap);
|
|
1372
|
-
columnTypes: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnTypes<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnTypesMap<T>);
|
|
1373
|
-
rowHeight: 1 | ((value: string | number) => number);
|
|
1374
|
-
headerHeight: 1 | ((value: string | number) => number);
|
|
1458
|
+
scrollTopId: 1 | ((value: string | number | undefined) => string | number | undefined);
|
|
1375
1459
|
}>;
|
|
1376
1460
|
export const mapPropsToState: <T>(params: {
|
|
1377
1461
|
props: InfiniteTableProps<T>;
|
|
@@ -1448,9 +1532,8 @@ declare module "components/flexbox/index" {
|
|
|
1448
1532
|
export const computeFlex: (params: FlexComputeParams) => FlexComputeResult;
|
|
1449
1533
|
}
|
|
1450
1534
|
declare module "components/InfiniteTable/utils/adjustColumnOrderForPinning" {
|
|
1451
|
-
import {
|
|
1452
|
-
|
|
1453
|
-
export const adjustColumnOrderForPinning: (columnOrder: InfiniteTablePropColumnOrderNormalized, columnPinning: InfiniteTablePropColumnPinning) => InfiniteTablePropColumnOrderNormalized;
|
|
1535
|
+
import { InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinningMap } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1536
|
+
export const adjustColumnOrderForPinning: (columnOrder: InfiniteTablePropColumnOrderNormalized, columnPinning: InfiniteTablePropColumnPinningMap) => InfiniteTablePropColumnOrderNormalized;
|
|
1454
1537
|
}
|
|
1455
1538
|
declare module "utils/getGlobal" {
|
|
1456
1539
|
export function getGlobal<T extends Window>(): T;
|
|
@@ -1467,7 +1550,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1467
1550
|
import type { InfiniteTableColumn, InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1468
1551
|
import type { Size } from "components/types/Size";
|
|
1469
1552
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1470
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized,
|
|
1553
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinningMap, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1471
1554
|
export type SortInfoMap<T> = {
|
|
1472
1555
|
[key: string]: {
|
|
1473
1556
|
sortInfo: DataSourceSingleSortInfo<T>;
|
|
@@ -1509,7 +1592,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1509
1592
|
setSortInfo: (sortInfo: DataSourceSingleSortInfo<T>[]) => void;
|
|
1510
1593
|
draggableColumns?: boolean;
|
|
1511
1594
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1512
|
-
columnPinning:
|
|
1595
|
+
columnPinning: InfiniteTablePropColumnPinningMap;
|
|
1513
1596
|
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1514
1597
|
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1515
1598
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
@@ -1545,7 +1628,7 @@ declare module "components/InfiniteTable/hooks/useRerenderOnKeyChange" {
|
|
|
1545
1628
|
declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
1546
1629
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1547
1630
|
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1548
|
-
import type { InfiniteTablePropColumnOrder,
|
|
1631
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinningMap, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1549
1632
|
import type { Size } from "components/types/Size";
|
|
1550
1633
|
import type { GetComputedVisibleColumnsResult } from "components/InfiniteTable/utils/getComputedVisibleColumns";
|
|
1551
1634
|
type UseComputedVisibleColumnsParam<T> = {
|
|
@@ -1562,7 +1645,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1562
1645
|
multiSort: boolean;
|
|
1563
1646
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
1564
1647
|
setSortInfo: (sortInfo: DataSourceSingleSortInfo<T>[]) => void;
|
|
1565
|
-
columnPinning:
|
|
1648
|
+
columnPinning: InfiniteTablePropColumnPinningMap;
|
|
1566
1649
|
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1567
1650
|
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1568
1651
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
@@ -1674,8 +1757,8 @@ declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
|
1674
1757
|
export function getColumnForGroupBy<T>(options: InfiniteTableGroupColumnGetterOptions<T> & {
|
|
1675
1758
|
groupIndexForColumn: number;
|
|
1676
1759
|
groupByForColumn: DataSourceGroupBy<T>;
|
|
1677
|
-
}, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T
|
|
1678
|
-
export function getSingleGroupColumn<T>(options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T
|
|
1760
|
+
}, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: Partial<InfiniteTablePropGroupColumn<T>>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1761
|
+
export function getSingleGroupColumn<T>(options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: Partial<InfiniteTablePropGroupColumn<T>>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1679
1762
|
}
|
|
1680
1763
|
declare module "components/InfiniteTable/hooks/useToggleGroupRow" {
|
|
1681
1764
|
export type ToggleGrouRowFn = (groupKeys: any[]) => void;
|
|
@@ -1881,9 +1964,7 @@ declare module "components/InfiniteTable/components/cell.css" {
|
|
|
1881
1964
|
unpinned: {};
|
|
1882
1965
|
pinnedStartLastInCategory: {
|
|
1883
1966
|
borderRight: import("@vanilla-extract/private").CSSVarFunction;
|
|
1884
|
-
vars: {
|
|
1885
|
-
[x: string]: import("@vanilla-extract/private").CSSVarFunction;
|
|
1886
|
-
};
|
|
1967
|
+
vars: {};
|
|
1887
1968
|
};
|
|
1888
1969
|
pinnedEndFirstInCategory: {
|
|
1889
1970
|
borderLeft: import("@vanilla-extract/private").CSSVarFunction;
|
|
@@ -2105,15 +2186,14 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
2105
2186
|
import { Renderable } from "components/types/Renderable";
|
|
2106
2187
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2107
2188
|
import { ScrollListener } from "components/VirtualBrain/ScrollListener";
|
|
2108
|
-
import {
|
|
2109
|
-
import { InfiniteTableComputedColumnGroup } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
2189
|
+
import { InfiniteTableColumnPinnedValues, InfiniteTableComputedColumnGroup } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
2110
2190
|
export type InfiniteTableHeaderProps<T> = {
|
|
2111
2191
|
repaintId?: string | number;
|
|
2112
2192
|
brain: VirtualBrain;
|
|
2113
2193
|
columns: InfiniteTableComputedColumn<T>[];
|
|
2114
2194
|
totalWidth: number;
|
|
2115
2195
|
availableWidth: number;
|
|
2116
|
-
pinning:
|
|
2196
|
+
pinning: InfiniteTableColumnPinnedValues;
|
|
2117
2197
|
};
|
|
2118
2198
|
export type InfiniteTableHeaderGroupProps<T> = {
|
|
2119
2199
|
columns: InfiniteTableComputedColumn<T>[];
|
|
@@ -2620,6 +2700,9 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
2620
2700
|
pinnedStartScrollbarPlaceholder: JSX.Element | null;
|
|
2621
2701
|
};
|
|
2622
2702
|
}
|
|
2703
|
+
declare module "components/hooks/useOnce" {
|
|
2704
|
+
export function useOnce<ReturnType>(fn: () => ReturnType): ReturnType;
|
|
2705
|
+
}
|
|
2623
2706
|
declare module "components/InfiniteTable/hooks/useColumnSizeFn" {
|
|
2624
2707
|
import { InfiniteTableComputedColumn } from "components/InfiniteTable/types/index";
|
|
2625
2708
|
/**
|
|
@@ -3118,4 +3201,5 @@ declare module "@infinite-table/infinite-react" {
|
|
|
3118
3201
|
export { group, flatten } from "utils/groupAndPivot/index";
|
|
3119
3202
|
export { useComponentState, getComponentStateRoot, } from "components/hooks/useComponentState";
|
|
3120
3203
|
export { interceptMap } from "components/hooks/useInterceptedMap";
|
|
3204
|
+
export { useEffectWithChanges } from "components/hooks/useEffectWithChanges";
|
|
3121
3205
|
}
|