@infinite-table/infinite-react 0.0.7 → 0.1.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/README.md +11 -71
- package/index.css +3 -5
- package/index.d.ts +336 -203
- package/index.esm.css +3 -5
- package/index.esm.js +998 -686
- package/index.js +1057 -744
- package/package.json +3 -4
package/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ declare module "components/types/ScrollPosition" {
|
|
|
8
8
|
export type SetScrollPosition = OnScrollFn;
|
|
9
9
|
}
|
|
10
10
|
declare module "utils/multisort/sortTypes" {
|
|
11
|
+
export const numberComparator: (first: number, second: number) => number;
|
|
12
|
+
export const stringComparator: (first: string, second: string) => number;
|
|
11
13
|
const sortTypes: {
|
|
12
14
|
[key: string]: (first: any, second: any) => number;
|
|
13
15
|
};
|
|
@@ -69,6 +71,7 @@ declare module "utils/DeepMap" {
|
|
|
69
71
|
private map;
|
|
70
72
|
private length;
|
|
71
73
|
private revision;
|
|
74
|
+
static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
|
|
72
75
|
constructor(initial?: [KeyType[], ValueType][]);
|
|
73
76
|
set(keys: KeyType[] & {
|
|
74
77
|
length: Omit<number, 0>;
|
|
@@ -139,9 +142,15 @@ declare module "components/hooks/useComponentState" {
|
|
|
139
142
|
componentState: T_STATE;
|
|
140
143
|
componentActions: T_ACTIONS;
|
|
141
144
|
};
|
|
142
|
-
type ComponentStateGeneratedActions<T_STATE> = {
|
|
145
|
+
export type ComponentStateGeneratedActions<T_STATE> = {
|
|
143
146
|
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
144
147
|
};
|
|
148
|
+
export type ComponentInterceptedActions<T_STATE> = {
|
|
149
|
+
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
150
|
+
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
151
|
+
state: T_STATE;
|
|
152
|
+
}) => void;
|
|
153
|
+
};
|
|
145
154
|
export type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
146
155
|
export type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = Partial<{
|
|
147
156
|
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
|
|
@@ -151,6 +160,7 @@ declare module "components/hooks/useComponentState" {
|
|
|
151
160
|
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
152
161
|
forwardProps?: () => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
153
162
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
163
|
+
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
154
164
|
mapPropsToState?: (params: {
|
|
155
165
|
props: T_PROPS;
|
|
156
166
|
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
@@ -175,71 +185,99 @@ declare module "components/hooks/useComponentState" {
|
|
|
175
185
|
declare module "components/types/NonUndefined" {
|
|
176
186
|
export type NonUndefined<T> = T extends undefined ? never : T;
|
|
177
187
|
}
|
|
188
|
+
declare module "components/types/SubscriptionCallback" {
|
|
189
|
+
import { VoidFn } from "components/types/VoidFn";
|
|
190
|
+
export type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
191
|
+
export interface SubscriptionCallback<T> {
|
|
192
|
+
(node: T): void;
|
|
193
|
+
get: () => T | null;
|
|
194
|
+
destroy: VoidFn;
|
|
195
|
+
onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
178
198
|
declare module "components/DataSource/types" {
|
|
179
199
|
import * as React from 'react';
|
|
180
200
|
import { MultisortInfo } from "utils/multisort/index";
|
|
181
201
|
import { DeepMap } from "utils/DeepMap";
|
|
182
|
-
import {
|
|
183
|
-
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo } from "components/InfiniteTable/index";
|
|
202
|
+
import { DeepMapGroupValueType, GroupBy, GroupKeyType, PivotBy } from "utils/groupAndPivot/index";
|
|
203
|
+
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/index";
|
|
184
204
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
185
205
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
186
206
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
187
207
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
188
|
-
|
|
208
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
209
|
+
export interface DataSourceDataParams<T> {
|
|
189
210
|
originalDataArray: T[];
|
|
211
|
+
sortInfo?: DataSourceSortInfo<T>;
|
|
212
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
213
|
+
pivotBy?: DataSourcePropPivotBy<T>;
|
|
214
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
190
215
|
}
|
|
191
216
|
export type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
192
217
|
field?: keyof T;
|
|
193
218
|
id?: string;
|
|
194
219
|
};
|
|
195
|
-
export type
|
|
220
|
+
export type DataSourceGroupBy<T> = GroupBy<T, any>;
|
|
196
221
|
export type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
197
222
|
export type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
198
|
-
export type
|
|
199
|
-
data: T[];
|
|
200
|
-
}> | (() => T[] | Promise<T[] | {
|
|
223
|
+
export type DataSourceRemoteData<T> = {
|
|
201
224
|
data: T[];
|
|
202
|
-
|
|
225
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
226
|
+
};
|
|
227
|
+
export type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
203
228
|
export type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
204
229
|
export type DataSourceExpandedAndCollapsedGroupRows<KeyType> = {
|
|
205
230
|
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
206
231
|
collapsedRows: DataSourceGroupRowsList<KeyType>;
|
|
207
232
|
};
|
|
208
|
-
export type
|
|
233
|
+
export type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
|
|
209
234
|
export type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
210
235
|
export interface DataSourceMappedState<T> {
|
|
211
|
-
|
|
236
|
+
aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
|
|
237
|
+
livePagination: DataSourceProps<T>['livePagination'];
|
|
238
|
+
livePaginationCursor: DataSourceProps<T>['livePaginationCursor'];
|
|
239
|
+
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
212
240
|
data: DataSourceProps<T>['data'];
|
|
213
241
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
214
|
-
|
|
242
|
+
groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
|
|
215
243
|
groupRowsState: NonUndefined<DataSourceProps<T>['groupRowsState']>;
|
|
216
244
|
pivotBy: DataSourceProps<T>['pivotBy'];
|
|
217
245
|
loading: NonUndefined<DataSourceProps<T>['loading']>;
|
|
218
246
|
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
219
247
|
}
|
|
248
|
+
export type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
249
|
+
field?: keyof T;
|
|
250
|
+
initialValue: AggregationResultType;
|
|
251
|
+
getter?: (data: T) => any;
|
|
252
|
+
reducer: (accumulator: any, value: any, data: T) => AggregationResultType | any;
|
|
253
|
+
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
254
|
+
};
|
|
220
255
|
export interface DataSourceSetupState<T> {
|
|
256
|
+
showSeparatePivotColumnForSingleAggregation: boolean;
|
|
257
|
+
dataParams?: DataSourceDataParams<T>;
|
|
258
|
+
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
221
259
|
originalDataArray: T[];
|
|
222
260
|
lastSortDataArray?: T[];
|
|
223
261
|
lastGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
224
262
|
dataArray: InfiniteTableRowInfo<T>[];
|
|
225
263
|
groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
|
|
226
264
|
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
265
|
+
scrollBottomId: number | Symbol | DataSourceLivePaginationCursorValue;
|
|
227
266
|
updatedAt: number;
|
|
228
267
|
reducedAt: number;
|
|
229
268
|
groupedAt: number;
|
|
230
269
|
sortedAt: number;
|
|
231
270
|
generateGroupRows: boolean;
|
|
232
|
-
aggregationReducers?: AggregationReducer<T, any>[];
|
|
233
271
|
postSortDataArray?: T[];
|
|
234
272
|
postGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
235
273
|
pivotColumns?: Map<string, InfiniteTableColumn<T>>;
|
|
236
274
|
pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
|
|
237
275
|
}
|
|
276
|
+
export type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
|
|
238
277
|
export interface DataSourceProps<T> {
|
|
239
278
|
children: React.ReactNode | ((contextData: DataSourceState<T>) => React.ReactNode);
|
|
240
279
|
primaryKey: keyof T;
|
|
241
280
|
fields?: (keyof T)[];
|
|
242
|
-
remoteCount?: number;
|
|
243
281
|
data: DataSourceData<T>;
|
|
244
282
|
loading?: boolean;
|
|
245
283
|
defaultLoading?: boolean;
|
|
@@ -247,20 +285,27 @@ declare module "components/DataSource/types" {
|
|
|
247
285
|
pivotBy?: DataSourcePropPivotBy<T>;
|
|
248
286
|
defaultPivotBy?: DataSourcePropPivotBy<T>;
|
|
249
287
|
onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
288
|
+
aggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
289
|
+
defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
|
|
290
|
+
groupBy?: DataSourcePropGroupBy<T>;
|
|
291
|
+
defaultGroupBy?: DataSourcePropGroupBy<T>;
|
|
292
|
+
onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
|
|
253
293
|
groupRowsState?: GroupRowsState;
|
|
254
294
|
defaultGroupRowsState?: GroupRowsState;
|
|
255
295
|
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
256
296
|
sortInfo?: DataSourceSortInfo<T>;
|
|
257
297
|
defaultSortInfo?: DataSourceSortInfo<T>;
|
|
258
|
-
onSortInfoChange?: (sortInfo:
|
|
298
|
+
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
299
|
+
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
300
|
+
livePagination?: boolean;
|
|
301
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
259
302
|
}
|
|
303
|
+
export type DataSourceLivePaginationCursorValue = string | number;
|
|
260
304
|
export interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
261
305
|
}
|
|
262
306
|
export interface DataSourceDerivedState<_T> {
|
|
263
307
|
multiSort: boolean;
|
|
308
|
+
controlledSort: boolean;
|
|
264
309
|
}
|
|
265
310
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
266
311
|
export interface DataSourceContextValue<T> {
|
|
@@ -290,42 +335,55 @@ declare module "components/DataSource/publicHooks/useDataSource" {
|
|
|
290
335
|
export function useDataSource<T>(): DataSourceState<T>;
|
|
291
336
|
export function useDataSourceContextValue<T>(): DataSourceContextValue<T>;
|
|
292
337
|
}
|
|
293
|
-
declare module "components/
|
|
294
|
-
import {
|
|
295
|
-
export function
|
|
296
|
-
|
|
297
|
-
}): DataSourceDataInfo<T>;
|
|
298
|
-
}
|
|
299
|
-
declare module "components/DataSource/privateHooks/loadDataAsync" {
|
|
300
|
-
import { DataSourceData, DataSourceDataInfo } from "components/DataSource/types";
|
|
301
|
-
export function loadDataAsync<T>(data: DataSourceData<T>): Promise<DataSourceDataInfo<T>>;
|
|
338
|
+
declare module "components/hooks/useEffectWithChanges" {
|
|
339
|
+
import { EffectCallback } from 'react';
|
|
340
|
+
export function useEffectWithChanges(fn: (changes: Record<string, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<string, any>): void;
|
|
341
|
+
export function useEffectWithObject(fn: EffectCallback, deps: Record<string, any>): void;
|
|
302
342
|
}
|
|
303
343
|
declare module "components/DataSource/privateHooks/useLoadData" {
|
|
344
|
+
import { DataSourceDataParams, DataSourceState } from "components/DataSource/types";
|
|
345
|
+
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>): DataSourceDataParams<T>;
|
|
304
346
|
export function useLoadData<T>(): void;
|
|
347
|
+
export function useLivePagination<T>(): void;
|
|
305
348
|
}
|
|
306
349
|
declare module "components/DataSource/state/normalizeSortInfo" {
|
|
307
350
|
import { DataSourceSingleSortInfo, DataSourceSortInfo } from "components/DataSource/types";
|
|
308
351
|
export const normalizeSortInfo: <T>(sortInfo?: DataSourceSortInfo<T> | undefined) => DataSourceSingleSortInfo<T>[];
|
|
309
352
|
}
|
|
353
|
+
declare module "components/utils/buildSubscriptionCallback" {
|
|
354
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
355
|
+
export function buildSubscriptionCallback<T>(): SubscriptionCallback<T>;
|
|
356
|
+
}
|
|
357
|
+
declare module "utils/shallowEqualObjects" {
|
|
358
|
+
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T): boolean;
|
|
359
|
+
}
|
|
360
|
+
declare module "components/utils/discardCallsWithEqualArg" {
|
|
361
|
+
export function discardCallsWithEqualArg<T = any>(fn: (arg: T) => void, timeframe?: number, getCompareObject?: (arg: T) => any): (arg: T) => void;
|
|
362
|
+
}
|
|
310
363
|
declare module "components/DataSource/state/getInitialState" {
|
|
311
364
|
import { DataSourceMappedState, DataSourceProps, DataSourceDerivedState, DataSourceSetupState, DataSourceState } from "components/DataSource/types";
|
|
312
365
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
313
|
-
import { ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
366
|
+
import { ComponentInterceptedActions, ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
367
|
+
import { DataSourceDataParams } from "components/DataSource/index";
|
|
314
368
|
export function initSetupState<T>(): DataSourceSetupState<T>;
|
|
315
369
|
export const forwardProps: <T>() => Partial<{
|
|
316
|
-
data: 1 | ((value: import("components/DataSource
|
|
370
|
+
data: 1 | ((value: import("components/DataSource").DataSourceData<T>) => import("components/DataSource").DataSourceData<T>);
|
|
317
371
|
loading: 1 | ((value: boolean | undefined) => boolean);
|
|
318
|
-
|
|
372
|
+
aggregationReducers: 1 | ((value: import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined) => import("components/DataSource").DataSourcePropAggregationReducers<T> | undefined);
|
|
373
|
+
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
374
|
+
livePaginationCursor: 1 | ((value: import("components/DataSource").DataSourceLivePaginationCursorValue | undefined) => import("components/DataSource").DataSourceLivePaginationCursorValue | undefined);
|
|
375
|
+
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
319
376
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
320
|
-
|
|
377
|
+
groupBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupBy<T>);
|
|
321
378
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
322
|
-
pivotBy: 1 | ((value: import("components/DataSource
|
|
323
|
-
sortInfo: 1 | ((value: import("components/DataSource
|
|
379
|
+
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
380
|
+
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
324
381
|
}>;
|
|
325
382
|
export function mapPropsToState<T extends any>(params: {
|
|
326
383
|
props: DataSourceProps<T>;
|
|
327
384
|
state: DataSourceState<T>;
|
|
328
385
|
}): DataSourceDerivedState<T>;
|
|
386
|
+
export function getInterceptActions<T>(): ComponentInterceptedActions<DataSourceState<T>>;
|
|
329
387
|
}
|
|
330
388
|
declare module "components/types/Renderable" {
|
|
331
389
|
import * as React from 'react';
|
|
@@ -333,6 +391,7 @@ declare module "components/types/Renderable" {
|
|
|
333
391
|
}
|
|
334
392
|
declare module "components/InfiniteTable/types/Utility" {
|
|
335
393
|
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
394
|
+
export type MapOrRecord<K extends string, V> = Map<K, V> | Record<K, V>;
|
|
336
395
|
export type RequireOnlyOneProperty<T, Keys extends keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
337
396
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
338
397
|
}[Keys];
|
|
@@ -352,26 +411,30 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
352
411
|
import type { Renderable } from "components/types/Renderable";
|
|
353
412
|
import type { DataSourcePivotBy, DataSourceSingleSortInfo, DataSourceState } from "components/DataSource/types";
|
|
354
413
|
import type { DiscriminatedUnion, RequireAtLeastOne } from "components/InfiniteTable/types/Utility";
|
|
355
|
-
import type { InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
414
|
+
import type { InfiniteTableColumnGroup, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
356
415
|
import { CSSProperties } from 'react';
|
|
357
|
-
import { PivotBy } from "utils/groupAndPivot/index";
|
|
416
|
+
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal, PivotBy } from "utils/groupAndPivot/index";
|
|
358
417
|
export type { DiscriminatedUnion, RequireAtLeastOne };
|
|
359
418
|
export type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
|
|
360
|
-
export
|
|
419
|
+
export type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
361
420
|
value: string | number | Renderable;
|
|
362
|
-
data: DATA_TYPE | null;
|
|
363
|
-
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
364
421
|
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
365
422
|
rowIndex: number;
|
|
366
423
|
column: COL_TYPE;
|
|
367
424
|
toggleCurrentGroupRow: () => void;
|
|
368
425
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
369
|
-
|
|
370
|
-
}
|
|
426
|
+
groupBy: DataSourceState<DATA_TYPE>['groupBy'];
|
|
427
|
+
} & ({
|
|
428
|
+
rowInfo: InfiniteTableRowInfoNormal<DATA_TYPE>;
|
|
429
|
+
data: DATA_TYPE;
|
|
430
|
+
} | {
|
|
431
|
+
rowInfo: InfiniteTableRowInfoGroup<DATA_TYPE>;
|
|
432
|
+
data: Partial<DATA_TYPE> | null;
|
|
433
|
+
});
|
|
371
434
|
export type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
|
|
372
435
|
export type InfiniteTableColumnRowspanFnParams<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
|
|
373
|
-
data: DATA_TYPE | null;
|
|
374
436
|
rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
|
|
437
|
+
data: DATA_TYPE | Partial<DATA_TYPE> | null;
|
|
375
438
|
groupRowInfo: InfiniteTableRowInfo<DATA_TYPE> | null;
|
|
376
439
|
dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
|
|
377
440
|
rowIndex: number;
|
|
@@ -382,7 +445,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
382
445
|
columnSortInfo: DataSourceSingleSortInfo<T> | null | undefined;
|
|
383
446
|
}
|
|
384
447
|
export type InfiniteTableColumnPinned = 'start' | 'end' | false;
|
|
385
|
-
export type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = ({ value, rowIndex, column, data, toggleGroupRow, toggleCurrentGroupRow, rowInfo,
|
|
448
|
+
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;
|
|
386
449
|
export type InfiniteTableColumnRenderValueFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE>;
|
|
387
450
|
export type InfiniteTableColumnHeaderRenderFunction<T> = ({ columnSortInfo, column, }: InfiniteTableColumnHeaderRenderParams<T>) => Renderable;
|
|
388
451
|
export type InfiniteTableColumnWithField<T> = {
|
|
@@ -397,16 +460,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
397
460
|
export type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
|
|
398
461
|
export type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
|
|
399
462
|
export type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
|
|
400
|
-
type
|
|
401
|
-
flex?: number;
|
|
402
|
-
defaultFlex?: number;
|
|
403
|
-
};
|
|
404
|
-
type InfiniteTableColumnWithWidth = {
|
|
405
|
-
width?: number;
|
|
406
|
-
defaultWidth?: number;
|
|
407
|
-
};
|
|
408
|
-
export type InfiniteTableColumnWithSize = DiscriminatedUnion<InfiniteTableColumnWithFlex, InfiniteTableColumnWithWidth>;
|
|
409
|
-
export type InfiniteTableColumnTypes = 'string' | 'number' | 'date';
|
|
463
|
+
export type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
|
|
410
464
|
export type InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T> = RequireAtLeastOne<{
|
|
411
465
|
field?: keyof T;
|
|
412
466
|
render?: InfiniteTableColumnRenderFunction<T>;
|
|
@@ -414,27 +468,35 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
414
468
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
415
469
|
}, 'render' | 'renderValue' | 'field' | 'valueGetter'>;
|
|
416
470
|
export type InfiniteTableColumnStyleFnParams<T> = {
|
|
417
|
-
data: T | null;
|
|
418
471
|
value: Renderable;
|
|
419
|
-
rowInfo: InfiniteTableRowInfo<T>;
|
|
420
472
|
column: InfiniteTableColumn<T>;
|
|
421
|
-
}
|
|
473
|
+
} & ({
|
|
474
|
+
data: T;
|
|
475
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
476
|
+
} | {
|
|
477
|
+
data: Partial<T> | null;
|
|
478
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
479
|
+
});
|
|
422
480
|
export type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
423
481
|
export type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
|
|
424
482
|
export type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
|
|
425
483
|
export type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
|
|
426
484
|
export type InfiniteTableColumnValueGetterParams<T> = {
|
|
427
|
-
data: T
|
|
428
|
-
rowInfo:
|
|
429
|
-
|
|
485
|
+
data: T;
|
|
486
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
487
|
+
} | {
|
|
488
|
+
data: Partial<T> | null;
|
|
489
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
430
490
|
};
|
|
431
491
|
export type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = Renderable> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
|
|
432
492
|
export type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanFnParams<T>) => number;
|
|
493
|
+
export type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
|
|
433
494
|
export type InfiniteTableBaseColumn<T> = {
|
|
434
|
-
maxWidth?: number;
|
|
435
|
-
minWidth?: number;
|
|
436
495
|
sortable?: boolean;
|
|
437
496
|
draggable?: boolean;
|
|
497
|
+
resizable?: boolean;
|
|
498
|
+
comparer?: InfiniteTableColumnComparer<T>;
|
|
499
|
+
hiddenWhenGrouped?: boolean;
|
|
438
500
|
align?: InfiniteTableColumnAlign;
|
|
439
501
|
verticalAlign?: InfiniteTableColumnVerticalAlign;
|
|
440
502
|
columnGroup?: string;
|
|
@@ -442,31 +504,36 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
442
504
|
name?: Renderable;
|
|
443
505
|
cssEllipsis?: boolean;
|
|
444
506
|
headerCssEllipsis?: boolean;
|
|
445
|
-
type?:
|
|
507
|
+
type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
|
|
446
508
|
style?: InfiniteTableColumnStyle<T>;
|
|
447
509
|
className?: InfiniteTableColumnClassName<T>;
|
|
448
510
|
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
449
511
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
450
512
|
};
|
|
451
|
-
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T
|
|
513
|
+
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
452
514
|
export type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
453
|
-
groupByField
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
pivotTotalColumn?: true;
|
|
459
|
-
pivotGroupKeys?: any[];
|
|
460
|
-
pivotByForColumn?: DataSourcePivotBy<T>;
|
|
461
|
-
pivotIndexForColumn?: number;
|
|
462
|
-
pivotGroupKeyForColumn?: any;
|
|
463
|
-
};
|
|
464
|
-
export type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTablePivotColumn<DataType> & {
|
|
515
|
+
groupByField: string | string[];
|
|
516
|
+
id?: string;
|
|
517
|
+
};
|
|
518
|
+
export type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & Partial<InfiniteTablePivotFinalColumn<T, any>>;
|
|
519
|
+
export type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
|
|
465
520
|
pivotBy: DataSourcePivotBy<DataType>[];
|
|
521
|
+
pivotTotalColumnGroup?: true;
|
|
466
522
|
pivotGroupKeys: KeyType[];
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
523
|
+
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
524
|
+
pivotGroupKey: KeyType;
|
|
525
|
+
pivotIndex: number;
|
|
526
|
+
};
|
|
527
|
+
export type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
|
|
528
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
529
|
+
pivotColumn: true;
|
|
530
|
+
pivotTotalColumn: boolean;
|
|
531
|
+
pivotAggregator: AggregationReducer<DataType, any>;
|
|
532
|
+
pivotAggregatorIndex: number;
|
|
533
|
+
pivotGroupKeys: KeyType[];
|
|
534
|
+
pivotByAtIndex: PivotBy<DataType, KeyType>;
|
|
535
|
+
pivotIndex: number;
|
|
536
|
+
pivotGroupKey: KeyType;
|
|
470
537
|
};
|
|
471
538
|
type InfiniteTableComputedColumnBase<T> = {
|
|
472
539
|
computedWidth: number;
|
|
@@ -490,33 +557,42 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
490
557
|
toggleSort: () => void;
|
|
491
558
|
id: string;
|
|
492
559
|
};
|
|
493
|
-
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> &
|
|
560
|
+
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
|
|
561
|
+
export type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
|
|
494
562
|
}
|
|
495
563
|
declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
496
|
-
import type { DataSourcePivotBy } from "components/DataSource/index";
|
|
497
|
-
import type { InfiniteTablePropColumnGroups,
|
|
564
|
+
import type { DataSourceAggregationReducer, DataSourcePivotBy } from "components/DataSource/index";
|
|
565
|
+
import type { InfiniteTablePropColumnGroups, InfiniteTablePropColumnsMap } from "components/InfiniteTable/index";
|
|
498
566
|
import type { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
499
567
|
import type { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
500
568
|
import { DeepMap } from "utils/DeepMap";
|
|
501
569
|
export type ComputedColumnsAndGroups<DataType> = {
|
|
502
|
-
columns:
|
|
570
|
+
columns: InfiniteTablePropColumnsMap<DataType, InfiniteTablePivotColumn<DataType>>;
|
|
503
571
|
columnGroups: InfiniteTablePropColumnGroups;
|
|
504
572
|
};
|
|
505
|
-
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>(deepMap
|
|
573
|
+
export function getPivotColumnsAndColumnGroups<DataType, KeyType = any>({ deepMap, pivotBy, pivotTotalColumnPosition, reducers, showSeparatePivotColumnForSingleAggregation, }: {
|
|
574
|
+
deepMap: DeepMap<KeyType, boolean>;
|
|
575
|
+
pivotBy: DataSourcePivotBy<DataType>[];
|
|
576
|
+
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
577
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
578
|
+
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
579
|
+
}): ComputedColumnsAndGroups<DataType>;
|
|
506
580
|
}
|
|
507
581
|
declare module "components/DataSource/state/reducer" {
|
|
508
582
|
import type { DataSourceState, DataSourceDerivedState } from "components/DataSource/types";
|
|
583
|
+
import { DataSourceSetupState } from "components/DataSource/index";
|
|
509
584
|
export function concludeReducer<T>(params: {
|
|
510
585
|
previousState: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
511
|
-
state: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
512
|
-
}): DataSourceState<T> & DataSourceDerivedState<T>;
|
|
586
|
+
state: DataSourceState<T> & DataSourceDerivedState<T> & DataSourceSetupState<T>;
|
|
587
|
+
}): DataSourceState<T> & DataSourceDerivedState<T> & DataSourceSetupState<T>;
|
|
513
588
|
}
|
|
514
589
|
declare module "components/DataSource/index" {
|
|
590
|
+
import { multisort } from "utils/multisort/index";
|
|
515
591
|
import { DataSourceProps } from "components/DataSource/types";
|
|
516
592
|
import { useDataSource } from "components/DataSource/publicHooks/useDataSource";
|
|
517
593
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
518
594
|
function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
519
|
-
export { useDataSource, DataSource, GroupRowsState };
|
|
595
|
+
export { useDataSource, DataSource, GroupRowsState, multisort };
|
|
520
596
|
export * from "components/DataSource/types";
|
|
521
597
|
}
|
|
522
598
|
declare module "components/DataSource/GroupRowsState" {
|
|
@@ -544,22 +620,33 @@ declare module "components/DataSource/GroupRowsState" {
|
|
|
544
620
|
}
|
|
545
621
|
}
|
|
546
622
|
declare module "utils/groupAndPivot/index" {
|
|
623
|
+
import { DataSourceAggregationReducer } from "@infinite-table/infinite-react";
|
|
547
624
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
548
|
-
import { InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
549
|
-
import { InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
625
|
+
import { InfiniteTableColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn, InfiniteTablePivotFinalColumnGroup } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
626
|
+
import { InfiniteTableColumnGroup, InfiniteTableGroupColumnBase } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
550
627
|
import { DeepMap } from "utils/DeepMap";
|
|
551
|
-
export type AggregationReducer<T, AggregationResultType> = {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
628
|
+
export type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
|
|
629
|
+
id: string;
|
|
630
|
+
};
|
|
631
|
+
export type AggregationReducerResult<AggregationResultType extends any = any> = {
|
|
632
|
+
value: AggregationResultType;
|
|
633
|
+
id: string;
|
|
634
|
+
};
|
|
635
|
+
export type InfiniteTableRowInfoNormalType<DataType> = {
|
|
636
|
+
data: DataType;
|
|
637
|
+
isGroupRow: false;
|
|
556
638
|
};
|
|
557
|
-
export
|
|
639
|
+
export type InfiniteTableRowInfoGroupType<DataType> = {
|
|
640
|
+
data: Partial<DataType> | null;
|
|
641
|
+
isGroupRow: true;
|
|
642
|
+
};
|
|
643
|
+
export type InfiniteTableRowInfoNormal<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoNormalType<T>;
|
|
644
|
+
export type InfiniteTableRowInfoGroup<T> = InfiniteTableRowInfoBase<T> & InfiniteTableRowInfoGroupType<T>;
|
|
645
|
+
export type InfiniteTableRowInfo<T> = InfiniteTableRowInfoNormal<T> | InfiniteTableRowInfoGroup<T>;
|
|
646
|
+
export type InfiniteTableRowInfoBase<T> = {
|
|
558
647
|
id: any;
|
|
559
|
-
data: T | null;
|
|
560
|
-
groupData?: T[];
|
|
561
648
|
value?: any;
|
|
562
|
-
|
|
649
|
+
groupData?: T[];
|
|
563
650
|
collapsed: boolean;
|
|
564
651
|
collapsedChildrenCount?: number;
|
|
565
652
|
collapsedGroupsCount?: number;
|
|
@@ -572,10 +659,10 @@ declare module "utils/groupAndPivot/index" {
|
|
|
572
659
|
groupCount?: number;
|
|
573
660
|
groupBy?: (keyof T)[];
|
|
574
661
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
575
|
-
reducerResults?:
|
|
576
|
-
}
|
|
577
|
-
export
|
|
578
|
-
data: null;
|
|
662
|
+
reducerResults?: Record<string, AggregationReducerResult>;
|
|
663
|
+
};
|
|
664
|
+
export type InfiniteTableEnhancedGroupInfo<T> = InfiniteTableRowInfo<T> & {
|
|
665
|
+
data: Partial<T> | null;
|
|
579
666
|
groupData: T[];
|
|
580
667
|
value: any;
|
|
581
668
|
isGroupRow: true;
|
|
@@ -586,9 +673,9 @@ declare module "utils/groupAndPivot/index" {
|
|
|
586
673
|
groupCount: number;
|
|
587
674
|
groupBy: (keyof T)[];
|
|
588
675
|
pivotValuesMap?: PivotValuesDeepMap<T, any>;
|
|
589
|
-
}
|
|
676
|
+
};
|
|
590
677
|
export type GroupKeyType<T extends any = any> = T;
|
|
591
|
-
type PivotReducerResults<T = any> = T
|
|
678
|
+
type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
|
|
592
679
|
type PivotGroupValueType<DataType, KeyType> = {
|
|
593
680
|
reducerResults: PivotReducerResults<KeyType>;
|
|
594
681
|
items: DataType[];
|
|
@@ -596,7 +683,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
596
683
|
export type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
597
684
|
export type DeepMapGroupValueType<DataType, KeyType> = {
|
|
598
685
|
items: DataType[];
|
|
599
|
-
reducerResults:
|
|
686
|
+
reducerResults: Record<string, AggregationReducerResult>;
|
|
600
687
|
pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
|
|
601
688
|
};
|
|
602
689
|
export type GroupBy<DataType, KeyType> = {
|
|
@@ -605,21 +692,24 @@ declare module "utils/groupAndPivot/index" {
|
|
|
605
692
|
column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
|
|
606
693
|
};
|
|
607
694
|
export type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
|
|
608
|
-
column?:
|
|
695
|
+
column?: InfiniteTableColumn<DataType> | (({ column, }: {
|
|
609
696
|
column: InfiniteTablePivotFinalColumn<DataType, KeyType>;
|
|
610
697
|
}) => Partial<InfiniteTablePivotColumn<DataType>>);
|
|
698
|
+
columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
|
|
699
|
+
columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
|
|
700
|
+
}) => Partial<InfiniteTablePivotFinalColumnGroup<DataType>>);
|
|
611
701
|
};
|
|
612
702
|
type GroupParams<DataType, KeyType> = {
|
|
613
703
|
groupBy: GroupBy<DataType, KeyType>[];
|
|
614
704
|
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
615
705
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
616
|
-
reducers?:
|
|
706
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
617
707
|
};
|
|
618
708
|
export type DataGroupResult<DataType, KeyType extends any> = {
|
|
619
709
|
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
620
710
|
groupParams: GroupParams<DataType, KeyType>;
|
|
621
711
|
initialData: DataType[];
|
|
622
|
-
reducerResults?:
|
|
712
|
+
reducerResults?: Record<string, AggregationReducerResult>;
|
|
623
713
|
topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
|
|
624
714
|
pivot?: PivotBy<DataType, KeyType>[];
|
|
625
715
|
};
|
|
@@ -629,6 +719,7 @@ declare module "utils/groupAndPivot/index" {
|
|
|
629
719
|
groupResult: DataGroupResult<DataType, KeyType>;
|
|
630
720
|
toPrimaryKey: (data: DataType) => any;
|
|
631
721
|
groupRowsState?: GroupRowsState;
|
|
722
|
+
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
632
723
|
generateGroupRows: boolean;
|
|
633
724
|
};
|
|
634
725
|
export function enhancedFlatten<DataType, KeyType = any>(param: EnhancedFlattenParam<DataType, KeyType>): {
|
|
@@ -816,34 +907,62 @@ declare module "components/InfiniteTable/components/LoadMask" {
|
|
|
816
907
|
declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
817
908
|
import * as React from 'react';
|
|
818
909
|
import { InfiniteTableState } from "components/InfiniteTable/types/index";
|
|
819
|
-
import { AggregationReducer,
|
|
820
|
-
import {
|
|
910
|
+
import { AggregationReducer, InfiniteTableRowInfoGroup, InfiniteTableRowInfoNormal } from "utils/groupAndPivot/index";
|
|
911
|
+
import { DataSourceGroupBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
821
912
|
import { Renderable } from "components/types/Renderable";
|
|
822
913
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
823
|
-
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction,
|
|
914
|
+
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
824
915
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
825
916
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
826
917
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
827
918
|
export type InfiniteTablePropColumnVisibility = Map<string, false>;
|
|
828
919
|
export type InfiniteTablePropColumnPinning = Map<string, true | 'start' | 'end'>;
|
|
829
920
|
export type InfiniteTableRowStyleFnParams<T> = {
|
|
830
|
-
data: T | null;
|
|
831
|
-
rowInfo: InfiniteTableRowInfo<T>;
|
|
832
921
|
rowIndex: number;
|
|
833
|
-
|
|
834
|
-
}
|
|
922
|
+
groupBy?: (keyof T)[];
|
|
923
|
+
} & ({
|
|
924
|
+
data: T;
|
|
925
|
+
rowInfo: InfiniteTableRowInfoNormal<T>;
|
|
926
|
+
} | {
|
|
927
|
+
data: Partial<T> | null;
|
|
928
|
+
rowInfo: InfiniteTableRowInfoGroup<T>;
|
|
929
|
+
});
|
|
835
930
|
export type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React.CSSProperties;
|
|
836
931
|
export type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
|
|
837
932
|
export type InfiniteTablePropRowStyle<T> = React.CSSProperties | InfiniteTableRowStyleFn<T>;
|
|
838
933
|
export type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
|
|
839
|
-
export type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter'> & {
|
|
934
|
+
export type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
|
|
840
935
|
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
936
|
+
field?: keyof T;
|
|
937
|
+
};
|
|
938
|
+
export type InfiniteTableColumnType<T> = {
|
|
939
|
+
minWidth?: number;
|
|
940
|
+
maxWidth?: number;
|
|
941
|
+
width?: number;
|
|
942
|
+
flex?: number;
|
|
943
|
+
header?: InfiniteTableColumn<T>['header'];
|
|
944
|
+
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
945
|
+
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
946
|
+
sortable?: InfiniteTableColumn<T>['sortable'];
|
|
947
|
+
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
948
|
+
align?: InfiniteTableColumn<T>['align'];
|
|
949
|
+
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
950
|
+
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
951
|
+
render?: InfiniteTableColumn<T>['render'];
|
|
952
|
+
};
|
|
953
|
+
export type InfiniteTablePropColumnTypesMap<T> = Map<'default' | string, InfiniteTableColumnType<T>>;
|
|
954
|
+
export type InfiniteTablePropColumnTypes<T> = InfiniteTablePropColumnTypesMap<T> | Record<'default' | string, InfiniteTableColumnType<T>>;
|
|
955
|
+
export type InfiniteTableColumnSizingOptions = {
|
|
956
|
+
flex?: number;
|
|
957
|
+
width?: number;
|
|
958
|
+
minWidth?: number;
|
|
959
|
+
maxWidth?: number;
|
|
841
960
|
};
|
|
842
|
-
export type
|
|
961
|
+
export type InfiniteTablePropColumnSizingMap = Map<string, InfiniteTableColumnSizingOptions>;
|
|
962
|
+
export type InfiniteTablePropColumnSizing = InfiniteTablePropColumnSizingMap | Record<string, InfiniteTableColumnSizingOptions>;
|
|
843
963
|
export type InfiniteTableImperativeApi<T> = {
|
|
844
964
|
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
845
965
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
846
|
-
setColumnAggregations: (columnAggregations: InfiniteTablePropColumnAggregations<T>) => void;
|
|
847
966
|
x?: T;
|
|
848
967
|
getState: () => InfiniteTableState<T>;
|
|
849
968
|
getDataSourceState: () => DataSourceState<T>;
|
|
@@ -853,8 +972,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
853
972
|
rowHeight: number;
|
|
854
973
|
___t?: T;
|
|
855
974
|
};
|
|
856
|
-
export type
|
|
975
|
+
export type InfiniteTablePropColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
|
|
976
|
+
export type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = InfiniteTablePropColumnsMap<T, ColumnType> | Record<string, ColumnType>;
|
|
857
977
|
export type InfiniteTableColumns<T> = InfiniteTablePropColumns<T>;
|
|
978
|
+
export type InfiniteTableColumnsMap<T> = InfiniteTablePropColumnsMap<T>;
|
|
858
979
|
export type InfiniteTablePropColumnGroups = Map<string, InfiniteTableColumnGroup>;
|
|
859
980
|
/**
|
|
860
981
|
* 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
|
|
@@ -879,55 +1000,60 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
879
1000
|
};
|
|
880
1001
|
export type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
881
1002
|
groupIndexForColumn?: number;
|
|
882
|
-
groupByForColumn?:
|
|
1003
|
+
groupByForColumn?: DataSourceGroupBy<T>;
|
|
883
1004
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
884
1005
|
groupCount: number;
|
|
885
|
-
|
|
1006
|
+
groupBy: DataSourceGroupBy<T>[];
|
|
886
1007
|
};
|
|
887
|
-
export type InfiniteTablePivotColumnGetterOptions<T
|
|
888
|
-
column:
|
|
889
|
-
|
|
1008
|
+
export type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
|
|
1009
|
+
column: COL_TYPE;
|
|
1010
|
+
groupBy: DataSourcePropGroupBy<T>;
|
|
890
1011
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
891
1012
|
};
|
|
892
1013
|
export type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
|
|
893
|
-
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> &
|
|
1014
|
+
export type InfiniteTableGroupColumnBase<T> = InfiniteTableBaseColumn<T> & {
|
|
894
1015
|
renderValue?: InfiniteTableColumnRenderFunction<T>;
|
|
1016
|
+
id?: string;
|
|
895
1017
|
};
|
|
896
|
-
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> &
|
|
897
|
-
renderValue?: InfiniteTableColumnRenderFunction<T
|
|
1018
|
+
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
1019
|
+
renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
|
|
898
1020
|
};
|
|
899
1021
|
export type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
|
|
900
1022
|
export type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => InfiniteTableGroupColumnBase<T>;
|
|
901
|
-
export type InfiniteTablePropPivotColumn<T
|
|
1023
|
+
export type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
|
|
902
1024
|
export type InfiniteTablePropPivotRowLabelsColumn<T> = InfiniteTablePropPivotColumn<T>;
|
|
903
1025
|
export type InfiniteTablePropComponents = {
|
|
904
1026
|
LoadMask?: React.FC<LoadMaskProps>;
|
|
905
1027
|
};
|
|
906
1028
|
export interface InfiniteTableProps<T> {
|
|
907
1029
|
columns: InfiniteTablePropColumns<T>;
|
|
908
|
-
pivotColumns?:
|
|
1030
|
+
pivotColumns?: InfiniteTablePropColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
909
1031
|
loadingText?: Renderable;
|
|
910
1032
|
components?: InfiniteTablePropComponents;
|
|
911
|
-
|
|
912
|
-
|
|
1033
|
+
viewportReservedWidth?: number;
|
|
1034
|
+
pivotColumn?: InfiniteTablePropPivotColumn<T, InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>>;
|
|
1035
|
+
pivotRowLabelsColumn?: InfiniteTablePropPivotRowLabelsColumn<T>;
|
|
913
1036
|
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
914
1037
|
groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
|
|
915
1038
|
groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
|
|
916
1039
|
hideEmptyGroupColumns?: boolean;
|
|
917
1040
|
columnVisibility?: InfiniteTablePropColumnVisibility;
|
|
918
1041
|
defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
|
|
919
|
-
columnPinning?: InfiniteTablePropColumnPinning;
|
|
920
1042
|
pinnedStartMaxWidth?: number;
|
|
921
1043
|
pinnedEndMaxWidth?: number;
|
|
1044
|
+
columnPinning?: InfiniteTablePropColumnPinning;
|
|
922
1045
|
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
923
|
-
|
|
924
|
-
|
|
1046
|
+
columnSizing?: InfiniteTablePropColumnSizing;
|
|
1047
|
+
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
925
1048
|
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
926
1049
|
columnGroups?: InfiniteTablePropColumnGroups;
|
|
927
1050
|
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
928
1051
|
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
929
1052
|
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
1053
|
+
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
930
1054
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
1055
|
+
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
1056
|
+
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
931
1057
|
rowHeight: number | string;
|
|
932
1058
|
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
933
1059
|
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
@@ -963,7 +1089,12 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
963
1089
|
onReady?: (api: InfiniteTableImperativeApi<T>) => void;
|
|
964
1090
|
rowProps?: React.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React.HTMLProps<HTMLDivElement>);
|
|
965
1091
|
licenseKey?: string;
|
|
1092
|
+
scrollTopId?: string | number;
|
|
966
1093
|
}
|
|
1094
|
+
export type Scrollbars = {
|
|
1095
|
+
vertical: boolean;
|
|
1096
|
+
horizontal: boolean;
|
|
1097
|
+
};
|
|
967
1098
|
}
|
|
968
1099
|
declare module "components/types/Size" {
|
|
969
1100
|
export interface Size {
|
|
@@ -975,16 +1106,6 @@ declare module "components/types/Size" {
|
|
|
975
1106
|
height: number;
|
|
976
1107
|
}) => void;
|
|
977
1108
|
}
|
|
978
|
-
declare module "components/types/SubscriptionCallback" {
|
|
979
|
-
import { VoidFn } from "components/types/VoidFn";
|
|
980
|
-
export type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
981
|
-
export interface SubscriptionCallback<T> {
|
|
982
|
-
(node: T): void;
|
|
983
|
-
get: () => T | null;
|
|
984
|
-
destroy: VoidFn;
|
|
985
|
-
onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
1109
|
declare module "components/VirtualBrain/ScrollListener" {
|
|
989
1110
|
import { OnScrollFn, ScrollPosition } from "components/types/ScrollPosition";
|
|
990
1111
|
export class ScrollListener {
|
|
@@ -999,7 +1120,7 @@ declare module "components/VirtualBrain/ScrollListener" {
|
|
|
999
1120
|
}
|
|
1000
1121
|
declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
1001
1122
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
1002
|
-
import type { InfiniteTableColumnGroup,
|
|
1123
|
+
import type { InfiniteTableColumnGroup, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnsMap, InfiniteTablePropColumnTypesMap, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1003
1124
|
import { Size } from "components/types/Size";
|
|
1004
1125
|
import { MutableRefObject } from 'react';
|
|
1005
1126
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
@@ -1007,9 +1128,9 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1007
1128
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
1008
1129
|
import { InfiniteTableColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1009
1130
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
1010
|
-
import {
|
|
1011
|
-
export type
|
|
1012
|
-
groupBy:
|
|
1131
|
+
import { DataSourceGroupBy, DataSourceProps } from "components/DataSource/types";
|
|
1132
|
+
export type GroupByMap<T> = Map<keyof T, {
|
|
1133
|
+
groupBy: DataSourceGroupBy<T>;
|
|
1013
1134
|
groupIndex: number;
|
|
1014
1135
|
}>;
|
|
1015
1136
|
export interface InfiniteTableSetupState<T> {
|
|
@@ -1019,7 +1140,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1019
1140
|
portalDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
1020
1141
|
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1021
1142
|
onHeaderHeightCSSVarChange: SubscriptionCallback<number>;
|
|
1022
|
-
columnsWhenGrouping?:
|
|
1143
|
+
columnsWhenGrouping?: InfiniteTablePropColumnsMap<T>;
|
|
1023
1144
|
bodySize: Size;
|
|
1024
1145
|
focused: boolean;
|
|
1025
1146
|
focusedWithin: boolean;
|
|
@@ -1036,10 +1157,13 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1036
1157
|
export type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1037
1158
|
export type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1038
1159
|
export interface InfiniteTableMappedState<T> {
|
|
1160
|
+
scrollTopId: InfiniteTableProps<T>['scrollTopId'];
|
|
1161
|
+
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
1039
1162
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1163
|
+
onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
|
|
1040
1164
|
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
1041
1165
|
components: InfiniteTableProps<T>['components'];
|
|
1042
|
-
columns:
|
|
1166
|
+
columns: InfiniteTablePropColumnsMap<T>;
|
|
1043
1167
|
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
1044
1168
|
onReady: InfiniteTableProps<T>['onReady'];
|
|
1045
1169
|
onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
|
|
@@ -1053,6 +1177,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1053
1177
|
focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
|
|
1054
1178
|
focusedStyle: InfiniteTableProps<T>['focusedStyle'];
|
|
1055
1179
|
focusedWithinStyle: InfiniteTableProps<T>['focusedWithinStyle'];
|
|
1180
|
+
showSeparatePivotColumnForSingleAggregation: NonUndefined<InfiniteTableProps<T>['showSeparatePivotColumnForSingleAggregation']>;
|
|
1056
1181
|
domProps: InfiniteTableProps<T>['domProps'];
|
|
1057
1182
|
rowStyle: InfiniteTableProps<T>['rowStyle'];
|
|
1058
1183
|
rowProps: InfiniteTableProps<T>['rowProps'];
|
|
@@ -1079,13 +1204,14 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1079
1204
|
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
1080
1205
|
columnVisibility: NonUndefined<InfiniteTableProps<T>['columnVisibility']>;
|
|
1081
1206
|
columnPinning: NonUndefined<InfiniteTableProps<T>['columnPinning']>;
|
|
1082
|
-
|
|
1207
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1208
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1083
1209
|
columnGroups: NonUndefined<InfiniteTableProps<T>['columnGroups']>;
|
|
1084
1210
|
collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
|
|
1085
1211
|
pivotTotalColumnPosition: NonUndefined<InfiniteTableProps<T>['pivotTotalColumnPosition']>;
|
|
1086
1212
|
}
|
|
1087
1213
|
export interface InfiniteTableDerivedState<T> {
|
|
1088
|
-
|
|
1214
|
+
groupBy: DataSourceProps<T>['groupBy'];
|
|
1089
1215
|
computedColumns: Map<string, InfiniteTableColumn<T>>;
|
|
1090
1216
|
virtualizeHeader: boolean;
|
|
1091
1217
|
groupRenderStrategy: NonUndefined<InfiniteTableProps<T>['groupRenderStrategy']>;
|
|
@@ -1159,20 +1285,19 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1159
1285
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1160
1286
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1161
1287
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1162
|
-
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy,
|
|
1163
|
-
import type { InfiniteTableColumn, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1288
|
+
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";
|
|
1289
|
+
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1164
1290
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1165
1291
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1166
1292
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1167
|
-
export type { InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy,
|
|
1293
|
+
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, };
|
|
1168
1294
|
}
|
|
1169
1295
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1170
1296
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1171
1297
|
export function getInfiniteTableContext<T>(): React.Context<InfiniteTableContextValue<T>>;
|
|
1172
1298
|
}
|
|
1173
|
-
declare module "components/utils/
|
|
1174
|
-
|
|
1175
|
-
export function buildSubscriptionCallback<T>(): SubscriptionCallback<T>;
|
|
1299
|
+
declare module "components/InfiniteTable/utils/toMap" {
|
|
1300
|
+
export function toMap<K extends string, V>(mapOrObject?: Map<K, V> | Record<K, V>): Map<K, V>;
|
|
1176
1301
|
}
|
|
1177
1302
|
declare module "components/InfiniteTable/state/computeColumnGroupsDepths" {
|
|
1178
1303
|
import type { InfiniteTablePropColumnGroups } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
@@ -1191,15 +1316,19 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1191
1316
|
*/
|
|
1192
1317
|
export function initSetupState<T>(): InfiniteTableSetupState<T>;
|
|
1193
1318
|
export const forwardProps: <T>() => Partial<{
|
|
1194
|
-
columns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumns<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>) => import("components/InfiniteTable/types").
|
|
1319
|
+
columns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumns<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>) => import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types").InfiniteTableColumn<T>>);
|
|
1195
1320
|
header: 1 | ((value: boolean | undefined) => boolean);
|
|
1321
|
+
showSeparatePivotColumnForSingleAggregation: 1 | ((value: boolean | undefined) => boolean);
|
|
1196
1322
|
pivotTotalColumnPosition: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition | undefined) => import("components/InfiniteTable/types/InfiniteTableState").InfiniteTablePropPivotTotalColumnPosition);
|
|
1197
|
-
pivotColumns: 1 | ((value: import("components/InfiniteTable/types").
|
|
1323
|
+
pivotColumns: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotColumn<T>> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnsMap<T, import("components/InfiniteTable/types/InfiniteTableColumn").InfiniteTablePivotColumn<T>> | undefined);
|
|
1198
1324
|
pivotColumnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined);
|
|
1199
|
-
pivotColumn: 1 | ((value: Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined) => Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined);
|
|
1200
1325
|
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1326
|
+
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);
|
|
1201
1327
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1328
|
+
scrollTopId: 1 | ((value: string | number | undefined) => string | number | undefined);
|
|
1329
|
+
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1202
1330
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1331
|
+
onScrollbarsChange: 1 | ((value: ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined) => ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined);
|
|
1203
1332
|
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1204
1333
|
onReady: 1 | ((value: ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined) => ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined);
|
|
1205
1334
|
onSelfFocus: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
@@ -1219,7 +1348,7 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1219
1348
|
rowClassName: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropRowClassName<T> | undefined);
|
|
1220
1349
|
pinnedStartMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1221
1350
|
pinnedEndMaxWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1222
|
-
pivotRowLabelsColumn: 1 | ((value:
|
|
1351
|
+
pivotRowLabelsColumn: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotRowLabelsColumn<T> | undefined);
|
|
1223
1352
|
activeIndex: 1 | ((value: number | undefined) => number);
|
|
1224
1353
|
columnMinWidth: 1 | ((value: number | undefined) => number);
|
|
1225
1354
|
columnMaxWidth: 1 | ((value: number | undefined) => number);
|
|
@@ -1233,9 +1362,10 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1233
1362
|
licenseKey: 1 | ((value: string | undefined) => string);
|
|
1234
1363
|
columnVisibility: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnVisibility);
|
|
1235
1364
|
columnPinning: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnPinning | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnPinning);
|
|
1236
|
-
columnAggregations: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnAggregations<T>);
|
|
1237
1365
|
columnGroups: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnGroups | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnGroups);
|
|
1238
1366
|
collapsedColumnGroups: 1 | ((value: import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups | undefined) => import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropCollapsedColumnGroups);
|
|
1367
|
+
columnSizing: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnSizing | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnSizingMap);
|
|
1368
|
+
columnTypes: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropColumnTypes<T> | undefined) => import("components/InfiniteTable/types").InfiniteTablePropColumnTypesMap<T>);
|
|
1239
1369
|
rowHeight: 1 | ((value: string | number) => number);
|
|
1240
1370
|
headerHeight: 1 | ((value: string | number) => number);
|
|
1241
1371
|
}>;
|
|
@@ -1318,11 +1448,22 @@ declare module "components/InfiniteTable/utils/adjustColumnOrderForPinning" {
|
|
|
1318
1448
|
import { InfiniteTablePropColumnOrderNormalized } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1319
1449
|
export const adjustColumnOrderForPinning: (columnOrder: InfiniteTablePropColumnOrderNormalized, columnPinning: InfiniteTablePropColumnPinning) => InfiniteTablePropColumnOrderNormalized;
|
|
1320
1450
|
}
|
|
1451
|
+
declare module "utils/getGlobal" {
|
|
1452
|
+
export function getGlobal<T extends Window>(): T;
|
|
1453
|
+
}
|
|
1454
|
+
declare module "components/utils/getScrollbarWidth" {
|
|
1455
|
+
export function getScrollbarWidth(): number;
|
|
1456
|
+
}
|
|
1457
|
+
declare module "components/InfiniteTable/utils/getColumnComputedType" {
|
|
1458
|
+
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1459
|
+
import type { InfiniteTableColumnType, InfiniteTablePropColumnTypesMap } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1460
|
+
export function getColumnComputedType<T>(column: InfiniteTableColumn<T>, columnTypes: InfiniteTablePropColumnTypesMap<T>): InfiniteTableColumnType<T>;
|
|
1461
|
+
}
|
|
1321
1462
|
declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
1322
1463
|
import type { InfiniteTableColumn, InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1323
1464
|
import type { Size } from "components/types/Size";
|
|
1324
1465
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1325
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1466
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1326
1467
|
export type SortInfoMap<T> = {
|
|
1327
1468
|
[key: string]: {
|
|
1328
1469
|
sortInfo: DataSourceSingleSortInfo<T>;
|
|
@@ -1357,6 +1498,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1357
1498
|
pinnedStartMaxWidth?: number;
|
|
1358
1499
|
pinnedEndMaxWidth?: number;
|
|
1359
1500
|
columnDefaultWidth?: number;
|
|
1501
|
+
viewportReservedWidth?: number;
|
|
1360
1502
|
sortable?: boolean;
|
|
1361
1503
|
multiSort: boolean;
|
|
1362
1504
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
@@ -1364,10 +1506,12 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
1364
1506
|
draggableColumns?: boolean;
|
|
1365
1507
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1366
1508
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1509
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1510
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1367
1511
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1368
1512
|
columnVisibilityAssumeVisible: boolean;
|
|
1369
1513
|
};
|
|
1370
|
-
export const getComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, pinnedStartMaxWidth, pinnedEndMaxWidth, sortable, sortInfo, setSortInfo, multiSort, draggableColumns, columnOrder, columnPinning, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
1514
|
+
export const getComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, pinnedStartMaxWidth, pinnedEndMaxWidth, sortable, sortInfo, setSortInfo, multiSort, viewportReservedWidth, draggableColumns, columnOrder, columnPinning, columnSizing, columnTypes, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
1371
1515
|
}
|
|
1372
1516
|
declare module "components/hooks/useRerender" {
|
|
1373
1517
|
export const useRerender: () => [number, () => void];
|
|
@@ -1397,7 +1541,7 @@ declare module "components/InfiniteTable/hooks/useRerenderOnKeyChange" {
|
|
|
1397
1541
|
declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
1398
1542
|
import type { DataSourceSingleSortInfo } from "components/DataSource/types";
|
|
1399
1543
|
import type { InfiniteTableColumn } from "components/InfiniteTable/types/index";
|
|
1400
|
-
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1544
|
+
import type { InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnTypesMap, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1401
1545
|
import type { Size } from "components/types/Size";
|
|
1402
1546
|
import type { GetComputedVisibleColumnsResult } from "components/InfiniteTable/utils/getComputedVisibleColumns";
|
|
1403
1547
|
type UseComputedVisibleColumnsParam<T> = {
|
|
@@ -1405,6 +1549,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1405
1549
|
bodySize: Size;
|
|
1406
1550
|
columnMinWidth?: number;
|
|
1407
1551
|
columnMaxWidth?: number;
|
|
1552
|
+
viewportReservedWidth?: number;
|
|
1408
1553
|
pinnedEndMaxWidth?: number;
|
|
1409
1554
|
pinnedStartMaxWidth?: number;
|
|
1410
1555
|
columnDefaultWidth?: number;
|
|
@@ -1414,6 +1559,8 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1414
1559
|
sortInfo?: DataSourceSingleSortInfo<T>[];
|
|
1415
1560
|
setSortInfo: (sortInfo: DataSourceSingleSortInfo<T>[]) => void;
|
|
1416
1561
|
columnPinning: InfiniteTablePropColumnPinning;
|
|
1562
|
+
columnSizing: InfiniteTablePropColumnSizingMap;
|
|
1563
|
+
columnTypes: InfiniteTablePropColumnTypesMap<T>;
|
|
1417
1564
|
columnOrder: InfiniteTablePropColumnOrder;
|
|
1418
1565
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
1419
1566
|
columnVisibilityAssumeVisible?: boolean;
|
|
@@ -1435,14 +1582,7 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1435
1582
|
computedPinnedStartWidth: GetComputedVisibleColumnsResult<T>['computedPinnedStartWidth'];
|
|
1436
1583
|
computedColumnOrder: GetComputedVisibleColumnsResult<T>['computedColumnOrder'];
|
|
1437
1584
|
};
|
|
1438
|
-
export const useComputedVisibleColumns: <T extends unknown>({ columns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, draggableColumns, sortInfo, multiSort, setSortInfo, columnOrder, columnPinning, pinnedEndMaxWidth, pinnedStartMaxWidth, columnVisibility, columnVisibilityAssumeVisible, }: UseComputedVisibleColumnsParam<T>) => UseComputedVisibleColumnsResult<T>;
|
|
1439
|
-
}
|
|
1440
|
-
declare module "components/DataSource/publicHooks/useDataSourceActions" {
|
|
1441
|
-
import { DataSourceComponentActions } from "components/DataSource/types";
|
|
1442
|
-
export default function useDataSourceActions<T>(): DataSourceComponentActions<T>;
|
|
1443
|
-
}
|
|
1444
|
-
declare module "components/InfiniteTable/hooks/useColumnAggregations" {
|
|
1445
|
-
export function useColumnAggregations<T>(): void;
|
|
1585
|
+
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>;
|
|
1446
1586
|
}
|
|
1447
1587
|
declare module "components/InfiniteTable/hooks/useColumnGroups" {
|
|
1448
1588
|
export function useColumnGroups<T>(): void;
|
|
@@ -1451,6 +1591,15 @@ declare module "utils/join" {
|
|
|
1451
1591
|
const join: (...args: (string | number | void | null)[]) => string;
|
|
1452
1592
|
export { join };
|
|
1453
1593
|
}
|
|
1594
|
+
declare module "components/InfiniteTable/components/icons/ExpanderIcon.css" {
|
|
1595
|
+
export const ExpanderIconCls: string;
|
|
1596
|
+
export const ExpanderIconClsVariants: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
1597
|
+
expanded: {
|
|
1598
|
+
true: string;
|
|
1599
|
+
false: {};
|
|
1600
|
+
};
|
|
1601
|
+
}>;
|
|
1602
|
+
}
|
|
1454
1603
|
declare module "components/InfiniteTable/components/icons/ExpanderIcon" {
|
|
1455
1604
|
import * as React from 'react';
|
|
1456
1605
|
type ExpanderIconProps = {
|
|
@@ -1495,7 +1644,7 @@ declare module "components/InfiniteTable/components/InfiniteTableRow/row.css" {
|
|
|
1495
1644
|
export const GroupRowExpanderCls: string;
|
|
1496
1645
|
}
|
|
1497
1646
|
declare module "components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns" {
|
|
1498
|
-
import {
|
|
1647
|
+
import { DataSourcePropGroupBy, DataSourcePropPivotBy } from "components/DataSource/index";
|
|
1499
1648
|
import { InfiniteTableProps } from "components/InfiniteTable/types/index";
|
|
1500
1649
|
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1501
1650
|
export function getComputedPivotColumnsFromDataSourcePivotColumns<T>(pivotColumns: InfiniteTableProps<T>['pivotColumns'], params: {
|
|
@@ -1504,13 +1653,13 @@ declare module "components/InfiniteTable/state/getComputedPivotColumnsFromDataSo
|
|
|
1504
1653
|
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
1505
1654
|
pivotTotalColumnPosition: InfiniteTableState<T>['pivotTotalColumnPosition'];
|
|
1506
1655
|
pivotBy: DataSourcePropPivotBy<T>;
|
|
1507
|
-
|
|
1656
|
+
groupBy: DataSourcePropGroupBy<T>;
|
|
1508
1657
|
}): InfiniteTableProps<T>['pivotColumns'];
|
|
1509
1658
|
}
|
|
1510
1659
|
declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
1511
1660
|
import * as React from 'react';
|
|
1512
1661
|
import { InfiniteTableColumnRenderParam } from "components/InfiniteTable/index";
|
|
1513
|
-
import {
|
|
1662
|
+
import { DataSourceGroupBy } from "components/DataSource/index";
|
|
1514
1663
|
import { InfiniteTableGeneratedGroupColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1515
1664
|
import { InfiniteTableGroupColumnGetterOptions, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1516
1665
|
export function getGroupColumnRender<T>({ groupIndexForColumn, groupRenderStrategy, toggleGroupRow, }: {
|
|
@@ -1520,7 +1669,7 @@ declare module "components/InfiniteTable/utils/getColumnForGroupBy" {
|
|
|
1520
1669
|
}): (renderOptions: InfiniteTableColumnRenderParam<T>) => React.ReactNode;
|
|
1521
1670
|
export function getColumnForGroupBy<T>(options: InfiniteTableGroupColumnGetterOptions<T> & {
|
|
1522
1671
|
groupIndexForColumn: number;
|
|
1523
|
-
groupByForColumn:
|
|
1672
|
+
groupByForColumn: DataSourceGroupBy<T>;
|
|
1524
1673
|
}, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1525
1674
|
export function getSingleGroupColumn<T>(options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupRowKeys: any[]) => void, groupColumnFromProps?: InfiniteTablePropGroupColumn<T>): InfiniteTableGeneratedGroupColumn<T>;
|
|
1526
1675
|
}
|
|
@@ -1530,12 +1679,12 @@ declare module "components/InfiniteTable/hooks/useToggleGroupRow" {
|
|
|
1530
1679
|
}
|
|
1531
1680
|
declare module "components/InfiniteTable/hooks/useColumnsWhen" {
|
|
1532
1681
|
import type { InfiniteTableColumn } from "components/InfiniteTable/index";
|
|
1533
|
-
import type {
|
|
1682
|
+
import type { DataSourceGroupBy } from "components/DataSource/index";
|
|
1534
1683
|
import type { InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1535
1684
|
export function useColumnsWhen<T>(): void;
|
|
1536
1685
|
export function getColumnsWhenGrouping<T>(params: {
|
|
1537
1686
|
columns: Map<string, InfiniteTableColumn<T>>;
|
|
1538
|
-
|
|
1687
|
+
groupBy: DataSourceGroupBy<T>[];
|
|
1539
1688
|
toggleGroupRow: (groupKeys: any[]) => void;
|
|
1540
1689
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1541
1690
|
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
@@ -1561,12 +1710,6 @@ declare module "components/InfiniteTable/components/InfiniteTableBody/InfiniteTa
|
|
|
1561
1710
|
declare module "components/InfiniteTable/components/InfiniteTableBody/index" {
|
|
1562
1711
|
export * from "components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody";
|
|
1563
1712
|
}
|
|
1564
|
-
declare module "utils/getGlobal" {
|
|
1565
|
-
export function getGlobal<T extends Window>(): T;
|
|
1566
|
-
}
|
|
1567
|
-
declare module "components/utils/getScrollbarWidth" {
|
|
1568
|
-
export function getScrollbarWidth(): number;
|
|
1569
|
-
}
|
|
1570
1713
|
declare module "components/VirtualBrain/index" {
|
|
1571
1714
|
import { Logger } from "utils/debug";
|
|
1572
1715
|
import { Size } from "components/types/Size";
|
|
@@ -2148,13 +2291,11 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
2148
2291
|
export const InfiniteTableHeaderUnvirtualized: typeof InfiniteTableHeaderUnvirtualizedFn;
|
|
2149
2292
|
}
|
|
2150
2293
|
declare module "components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper" {
|
|
2294
|
+
import type { Scrollbars } from "components/InfiniteTable/index";
|
|
2151
2295
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2152
2296
|
export type TableHeaderWrapperProps = {
|
|
2153
2297
|
brain: VirtualBrain;
|
|
2154
|
-
scrollbars:
|
|
2155
|
-
vertical: boolean;
|
|
2156
|
-
horizontal: boolean;
|
|
2157
|
-
};
|
|
2298
|
+
scrollbars: Scrollbars;
|
|
2158
2299
|
repaintId?: number | string;
|
|
2159
2300
|
};
|
|
2160
2301
|
export function TableHeaderWrapper<T>(props: TableHeaderWrapperProps): JSX.Element;
|
|
@@ -2433,7 +2574,7 @@ declare module "components/VirtualList/RowListWithExternalScrolling" {
|
|
|
2433
2574
|
}
|
|
2434
2575
|
declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
2435
2576
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2436
|
-
import { InfiniteTableComputedColumn, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
2577
|
+
import type { InfiniteTableComputedColumn, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/types/index";
|
|
2437
2578
|
import type { Size } from "components/types/Size";
|
|
2438
2579
|
import type { RenderRow } from "components/VirtualList/types";
|
|
2439
2580
|
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -2453,10 +2594,7 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
2453
2594
|
computedPinnedEndColumnsWidth: number;
|
|
2454
2595
|
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
2455
2596
|
verticalVirtualBrain: VirtualBrain;
|
|
2456
|
-
scrollbars:
|
|
2457
|
-
vertical: boolean;
|
|
2458
|
-
horizontal: boolean;
|
|
2459
|
-
};
|
|
2597
|
+
scrollbars: Scrollbars;
|
|
2460
2598
|
rowHeight: number;
|
|
2461
2599
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
2462
2600
|
computedPinnedStartColumnsWidth: number;
|
|
@@ -2503,13 +2641,11 @@ declare module "components/InfiniteTable/hooks/useYourBrain" {
|
|
|
2503
2641
|
verticalVirtualBrain: VirtualBrain;
|
|
2504
2642
|
};
|
|
2505
2643
|
}
|
|
2506
|
-
declare module "utils/shallowEqualObjects" {
|
|
2507
|
-
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T): boolean;
|
|
2508
|
-
}
|
|
2509
2644
|
declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
2510
2645
|
import type { Ref } from 'react';
|
|
2511
2646
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/index";
|
|
2512
2647
|
import type { Size } from "components/types/Size";
|
|
2648
|
+
import type { Scrollbars } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
2513
2649
|
type ListRenderingParam<T> = {
|
|
2514
2650
|
computed: InfiniteTableComputedValues<T>;
|
|
2515
2651
|
domRef: Ref<HTMLElement>;
|
|
@@ -2519,10 +2655,7 @@ declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
|
2519
2655
|
};
|
|
2520
2656
|
import type { VirtualBrain } from "components/VirtualBrain/index";
|
|
2521
2657
|
type ListRenderingResult = {
|
|
2522
|
-
scrollbars:
|
|
2523
|
-
vertical: boolean;
|
|
2524
|
-
horizontal: boolean;
|
|
2525
|
-
};
|
|
2658
|
+
scrollbars: Scrollbars;
|
|
2526
2659
|
horizontalVirtualBrain: VirtualBrain;
|
|
2527
2660
|
verticalVirtualBrain: VirtualBrain;
|
|
2528
2661
|
applyScrollHorizontal: ({ scrollLeft }: {
|
|
@@ -2542,9 +2675,9 @@ declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
|
2542
2675
|
export function useListRendering<T>(param: ListRenderingParam<T>): ListRenderingResult;
|
|
2543
2676
|
}
|
|
2544
2677
|
declare module "components/utils/decamelize" {
|
|
2545
|
-
export
|
|
2678
|
+
export function decamelize(str: string, options?: {
|
|
2546
2679
|
separator: string;
|
|
2547
|
-
}
|
|
2680
|
+
}): string;
|
|
2548
2681
|
}
|
|
2549
2682
|
declare module "components/InfiniteTable/components/InfiniteTableLicenseFooter/index" {
|
|
2550
2683
|
import * as React from 'react';
|
|
@@ -2580,7 +2713,7 @@ declare module "components/InfiniteTable/hooks/useLicense/decode" {
|
|
|
2580
2713
|
export const decode: (licenseKey: string) => LicenseDetails;
|
|
2581
2714
|
}
|
|
2582
2715
|
declare module "components/InfiniteTable/hooks/useLicense/useLicense" {
|
|
2583
|
-
export const useLicense: (licenseKey
|
|
2716
|
+
export const useLicense: (licenseKey?: string) => boolean;
|
|
2584
2717
|
}
|
|
2585
2718
|
declare module "components/CSSVariableWatch" {
|
|
2586
2719
|
import * as React from 'react';
|