@infinite-table/infinite-react 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +91 -57
- package/index.esm.js +456 -294
- package/index.js +486 -325
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -141,9 +141,15 @@ declare module "components/hooks/useComponentState" {
|
|
|
141
141
|
componentState: T_STATE;
|
|
142
142
|
componentActions: T_ACTIONS;
|
|
143
143
|
};
|
|
144
|
-
type ComponentStateGeneratedActions<T_STATE> = {
|
|
144
|
+
export type ComponentStateGeneratedActions<T_STATE> = {
|
|
145
145
|
[k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
|
|
146
146
|
};
|
|
147
|
+
export type ComponentInterceptedActions<T_STATE> = {
|
|
148
|
+
[k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
|
|
149
|
+
actions: ComponentStateGeneratedActions<T_STATE>;
|
|
150
|
+
state: T_STATE;
|
|
151
|
+
}) => void;
|
|
152
|
+
};
|
|
147
153
|
export type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
|
|
148
154
|
export type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = Partial<{
|
|
149
155
|
[propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
|
|
@@ -153,6 +159,7 @@ declare module "components/hooks/useComponentState" {
|
|
|
153
159
|
initSetupState?: () => COMPONENT_SETUP_STATE;
|
|
154
160
|
forwardProps?: () => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
|
|
155
161
|
allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
|
|
162
|
+
interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
|
|
156
163
|
mapPropsToState?: (params: {
|
|
157
164
|
props: T_PROPS;
|
|
158
165
|
state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
|
|
@@ -177,18 +184,33 @@ declare module "components/hooks/useComponentState" {
|
|
|
177
184
|
declare module "components/types/NonUndefined" {
|
|
178
185
|
export type NonUndefined<T> = T extends undefined ? never : T;
|
|
179
186
|
}
|
|
187
|
+
declare module "components/types/SubscriptionCallback" {
|
|
188
|
+
import { VoidFn } from "components/types/VoidFn";
|
|
189
|
+
export type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
190
|
+
export interface SubscriptionCallback<T> {
|
|
191
|
+
(node: T): void;
|
|
192
|
+
get: () => T | null;
|
|
193
|
+
destroy: VoidFn;
|
|
194
|
+
onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
180
197
|
declare module "components/DataSource/types" {
|
|
181
198
|
import * as React from 'react';
|
|
182
199
|
import { MultisortInfo } from "utils/multisort/index";
|
|
183
200
|
import { DeepMap } from "utils/DeepMap";
|
|
184
201
|
import { AggregationReducer, DeepMapGroupValueType, GroupBy, GroupKeyType, PivotBy } from "utils/groupAndPivot/index";
|
|
185
|
-
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo } from "components/InfiniteTable/index";
|
|
202
|
+
import { InfiniteTableColumn, InfiniteTableColumnGroup, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/index";
|
|
186
203
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
187
204
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
188
205
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
189
206
|
import { NonUndefined } from "components/types/NonUndefined";
|
|
190
|
-
|
|
207
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
208
|
+
export interface DataSourceDataParams<T> {
|
|
191
209
|
originalDataArray: T[];
|
|
210
|
+
sortInfo?: DataSourceSortInfo<T>;
|
|
211
|
+
groupRowsBy?: DataSourcePropGroupRowsBy<T>;
|
|
212
|
+
pivotBy?: DataSourcePropPivotBy<T>;
|
|
213
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
192
214
|
}
|
|
193
215
|
export type DataSourceSingleSortInfo<T> = MultisortInfo<T> & {
|
|
194
216
|
field?: keyof T;
|
|
@@ -197,11 +219,11 @@ declare module "components/DataSource/types" {
|
|
|
197
219
|
export type DataSourceGroupRowsBy<T> = GroupBy<T, any>;
|
|
198
220
|
export type DataSourcePivotBy<T> = PivotBy<T, any>;
|
|
199
221
|
export type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
|
|
200
|
-
export type
|
|
222
|
+
export type DataSourceRemoteData<T> = {
|
|
201
223
|
data: T[];
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
224
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
225
|
+
};
|
|
226
|
+
export type DataSourceData<T> = T[] | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
|
|
205
227
|
export type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
|
|
206
228
|
export type DataSourceExpandedAndCollapsedGroupRows<KeyType> = {
|
|
207
229
|
expandedRows: DataSourceGroupRowsList<KeyType>;
|
|
@@ -210,7 +232,10 @@ declare module "components/DataSource/types" {
|
|
|
210
232
|
export type DataSourcePropGroupRowsBy<T> = DataSourceGroupRowsBy<T>[];
|
|
211
233
|
export type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
|
|
212
234
|
export interface DataSourceMappedState<T> {
|
|
235
|
+
livePagination: DataSourceProps<T>['livePagination'];
|
|
236
|
+
livePaginationCursor: DataSourceProps<T>['livePaginationCursor'];
|
|
213
237
|
remoteCount: DataSourceProps<T>['remoteCount'];
|
|
238
|
+
onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
|
|
214
239
|
data: DataSourceProps<T>['data'];
|
|
215
240
|
primaryKey: DataSourceProps<T>['primaryKey'];
|
|
216
241
|
groupRowsBy: NonUndefined<DataSourceProps<T>['groupRowsBy']>;
|
|
@@ -220,12 +245,15 @@ declare module "components/DataSource/types" {
|
|
|
220
245
|
sortInfo: DataSourceSingleSortInfo<T>[] | null;
|
|
221
246
|
}
|
|
222
247
|
export interface DataSourceSetupState<T> {
|
|
248
|
+
dataParams?: DataSourceDataParams<T>;
|
|
249
|
+
notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
|
|
223
250
|
originalDataArray: T[];
|
|
224
251
|
lastSortDataArray?: T[];
|
|
225
252
|
lastGroupDataArray?: InfiniteTableRowInfo<T>[];
|
|
226
253
|
dataArray: InfiniteTableRowInfo<T>[];
|
|
227
254
|
groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
|
|
228
255
|
pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
|
|
256
|
+
scrollBottomId: number | Symbol | DataSourceLivePaginationCursorValue;
|
|
229
257
|
updatedAt: number;
|
|
230
258
|
reducedAt: number;
|
|
231
259
|
groupedAt: number;
|
|
@@ -257,12 +285,17 @@ declare module "components/DataSource/types" {
|
|
|
257
285
|
onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
|
|
258
286
|
sortInfo?: DataSourceSortInfo<T>;
|
|
259
287
|
defaultSortInfo?: DataSourceSortInfo<T>;
|
|
260
|
-
onSortInfoChange?: (sortInfo:
|
|
288
|
+
onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
|
|
289
|
+
onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
|
|
290
|
+
livePagination?: boolean;
|
|
291
|
+
livePaginationCursor?: DataSourceLivePaginationCursorValue;
|
|
261
292
|
}
|
|
293
|
+
export type DataSourceLivePaginationCursorValue = string | number;
|
|
262
294
|
export interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
|
|
263
295
|
}
|
|
264
296
|
export interface DataSourceDerivedState<_T> {
|
|
265
297
|
multiSort: boolean;
|
|
298
|
+
controlledSort: boolean;
|
|
266
299
|
}
|
|
267
300
|
export type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
|
|
268
301
|
export interface DataSourceContextValue<T> {
|
|
@@ -292,42 +325,55 @@ declare module "components/DataSource/publicHooks/useDataSource" {
|
|
|
292
325
|
export function useDataSource<T>(): DataSourceState<T>;
|
|
293
326
|
export function useDataSourceContextValue<T>(): DataSourceContextValue<T>;
|
|
294
327
|
}
|
|
295
|
-
declare module "components/
|
|
296
|
-
import {
|
|
297
|
-
export function
|
|
298
|
-
|
|
299
|
-
}): DataSourceDataInfo<T>;
|
|
300
|
-
}
|
|
301
|
-
declare module "components/DataSource/privateHooks/loadDataAsync" {
|
|
302
|
-
import { DataSourceData, DataSourceDataInfo } from "components/DataSource/types";
|
|
303
|
-
export function loadDataAsync<T>(data: DataSourceData<T>): Promise<DataSourceDataInfo<T>>;
|
|
328
|
+
declare module "components/hooks/useEffectWithChanges" {
|
|
329
|
+
import { EffectCallback } from 'react';
|
|
330
|
+
export function useEffectWithChanges(fn: (changes: Record<string, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<string, any>): void;
|
|
331
|
+
export function useEffectWithObject(fn: EffectCallback, deps: Record<string, any>): void;
|
|
304
332
|
}
|
|
305
333
|
declare module "components/DataSource/privateHooks/useLoadData" {
|
|
334
|
+
import { DataSourceDataParams, DataSourceState } from "components/DataSource/types";
|
|
335
|
+
export function buildDataSourceDataParams<T>(componentState: DataSourceState<T>): DataSourceDataParams<T>;
|
|
306
336
|
export function useLoadData<T>(): void;
|
|
337
|
+
export function useLivePagination<T>(): void;
|
|
307
338
|
}
|
|
308
339
|
declare module "components/DataSource/state/normalizeSortInfo" {
|
|
309
340
|
import { DataSourceSingleSortInfo, DataSourceSortInfo } from "components/DataSource/types";
|
|
310
341
|
export const normalizeSortInfo: <T>(sortInfo?: DataSourceSortInfo<T> | undefined) => DataSourceSingleSortInfo<T>[];
|
|
311
342
|
}
|
|
343
|
+
declare module "components/utils/buildSubscriptionCallback" {
|
|
344
|
+
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
345
|
+
export function buildSubscriptionCallback<T>(): SubscriptionCallback<T>;
|
|
346
|
+
}
|
|
347
|
+
declare module "utils/shallowEqualObjects" {
|
|
348
|
+
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T): boolean;
|
|
349
|
+
}
|
|
350
|
+
declare module "components/utils/discardCallsWithEqualArg" {
|
|
351
|
+
export function discardCallsWithEqualArg<T = any>(fn: (arg: T) => void, timeframe?: number, getCompareObject?: (arg: T) => any): (arg: T) => void;
|
|
352
|
+
}
|
|
312
353
|
declare module "components/DataSource/state/getInitialState" {
|
|
313
354
|
import { DataSourceMappedState, DataSourceProps, DataSourceDerivedState, DataSourceSetupState, DataSourceState } from "components/DataSource/types";
|
|
314
355
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
315
|
-
import { ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
356
|
+
import { ComponentInterceptedActions, ForwardPropsToStateFnResult } from "components/hooks/useComponentState";
|
|
357
|
+
import { DataSourceDataParams } from "components/DataSource/index";
|
|
316
358
|
export function initSetupState<T>(): DataSourceSetupState<T>;
|
|
317
359
|
export const forwardProps: <T>() => Partial<{
|
|
318
|
-
data: 1 | ((value: import("components/DataSource
|
|
360
|
+
data: 1 | ((value: import("components/DataSource").DataSourceData<T>) => import("components/DataSource").DataSourceData<T>);
|
|
319
361
|
loading: 1 | ((value: boolean | undefined) => boolean);
|
|
362
|
+
livePagination: 1 | ((value: boolean | undefined) => boolean | undefined);
|
|
363
|
+
livePaginationCursor: 1 | ((value: import("components/DataSource").DataSourceLivePaginationCursorValue | undefined) => import("components/DataSource").DataSourceLivePaginationCursorValue | undefined);
|
|
320
364
|
remoteCount: 1 | ((value: number | undefined) => number | undefined);
|
|
365
|
+
onDataParamsChange: 1 | ((value: ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined) => ((dataParamsChange: DataSourceDataParams<T>) => void) | undefined);
|
|
321
366
|
primaryKey: 1 | ((value: keyof T) => keyof T);
|
|
322
|
-
groupRowsBy: 1 | ((value: import("components/DataSource
|
|
367
|
+
groupRowsBy: 1 | ((value: import("components/DataSource").DataSourcePropGroupRowsBy<T> | undefined) => import("components/DataSource").DataSourcePropGroupRowsBy<T>);
|
|
323
368
|
groupRowsState: 1 | ((value: GroupRowsState<any> | undefined) => GroupRowsState<any>);
|
|
324
|
-
pivotBy: 1 | ((value: import("components/DataSource
|
|
325
|
-
sortInfo: 1 | ((value: import("components/DataSource
|
|
369
|
+
pivotBy: 1 | ((value: import("components/DataSource").DataSourcePropPivotBy<T> | undefined) => import("components/DataSource").DataSourcePropPivotBy<T> | undefined);
|
|
370
|
+
sortInfo: 1 | ((value: import("components/DataSource").DataSourceSortInfo<T> | undefined) => import("components/DataSource").DataSourceSingleSortInfo<T>[] | null);
|
|
326
371
|
}>;
|
|
327
372
|
export function mapPropsToState<T extends any>(params: {
|
|
328
373
|
props: DataSourceProps<T>;
|
|
329
374
|
state: DataSourceState<T>;
|
|
330
375
|
}): DataSourceDerivedState<T>;
|
|
376
|
+
export function getInterceptActions<T>(): ComponentInterceptedActions<DataSourceState<T>>;
|
|
331
377
|
}
|
|
332
378
|
declare module "components/types/Renderable" {
|
|
333
379
|
import * as React from 'react';
|
|
@@ -501,17 +547,19 @@ declare module "utils/groupAndPivot/getPivotColumnsAndColumnGroups" {
|
|
|
501
547
|
}
|
|
502
548
|
declare module "components/DataSource/state/reducer" {
|
|
503
549
|
import type { DataSourceState, DataSourceDerivedState } from "components/DataSource/types";
|
|
550
|
+
import { DataSourceSetupState } from "components/DataSource/index";
|
|
504
551
|
export function concludeReducer<T>(params: {
|
|
505
552
|
previousState: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
506
|
-
state: DataSourceState<T> & DataSourceDerivedState<T>;
|
|
507
|
-
}): DataSourceState<T> & DataSourceDerivedState<T>;
|
|
553
|
+
state: DataSourceState<T> & DataSourceDerivedState<T> & DataSourceSetupState<T>;
|
|
554
|
+
}): DataSourceState<T> & DataSourceDerivedState<T> & DataSourceSetupState<T>;
|
|
508
555
|
}
|
|
509
556
|
declare module "components/DataSource/index" {
|
|
557
|
+
import { multisort } from "utils/multisort/index";
|
|
510
558
|
import { DataSourceProps } from "components/DataSource/types";
|
|
511
559
|
import { useDataSource } from "components/DataSource/publicHooks/useDataSource";
|
|
512
560
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
513
561
|
function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
|
|
514
|
-
export { useDataSource, DataSource, GroupRowsState };
|
|
562
|
+
export { useDataSource, DataSource, GroupRowsState, multisort };
|
|
515
563
|
export * from "components/DataSource/types";
|
|
516
564
|
}
|
|
517
565
|
declare module "components/DataSource/GroupRowsState" {
|
|
@@ -954,6 +1002,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
954
1002
|
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
955
1003
|
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
956
1004
|
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
1005
|
+
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
957
1006
|
onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
958
1007
|
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
959
1008
|
rowHeight: number | string;
|
|
@@ -991,7 +1040,12 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
991
1040
|
onReady?: (api: InfiniteTableImperativeApi<T>) => void;
|
|
992
1041
|
rowProps?: React.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React.HTMLProps<HTMLDivElement>);
|
|
993
1042
|
licenseKey?: string;
|
|
1043
|
+
scrollTopId?: string | number;
|
|
994
1044
|
}
|
|
1045
|
+
export type Scrollbars = {
|
|
1046
|
+
vertical: boolean;
|
|
1047
|
+
horizontal: boolean;
|
|
1048
|
+
};
|
|
995
1049
|
}
|
|
996
1050
|
declare module "components/types/Size" {
|
|
997
1051
|
export interface Size {
|
|
@@ -1003,16 +1057,6 @@ declare module "components/types/Size" {
|
|
|
1003
1057
|
height: number;
|
|
1004
1058
|
}) => void;
|
|
1005
1059
|
}
|
|
1006
|
-
declare module "components/types/SubscriptionCallback" {
|
|
1007
|
-
import { VoidFn } from "components/types/VoidFn";
|
|
1008
|
-
export type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
|
|
1009
|
-
export interface SubscriptionCallback<T> {
|
|
1010
|
-
(node: T): void;
|
|
1011
|
-
get: () => T | null;
|
|
1012
|
-
destroy: VoidFn;
|
|
1013
|
-
onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
1060
|
declare module "components/VirtualBrain/ScrollListener" {
|
|
1017
1061
|
import { OnScrollFn, ScrollPosition } from "components/types/ScrollPosition";
|
|
1018
1062
|
export class ScrollListener {
|
|
@@ -1064,8 +1108,10 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
1064
1108
|
export type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
1065
1109
|
export type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
1066
1110
|
export interface InfiniteTableMappedState<T> {
|
|
1111
|
+
scrollTopId: InfiniteTableProps<T>['scrollTopId'];
|
|
1067
1112
|
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
1068
1113
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
1114
|
+
onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
|
|
1069
1115
|
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
1070
1116
|
components: InfiniteTableProps<T>['components'];
|
|
1071
1117
|
columns: InfiniteTablePropColumnsMap<T>;
|
|
@@ -1190,21 +1236,17 @@ declare module "components/InfiniteTable/types/index" {
|
|
|
1190
1236
|
import type { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1191
1237
|
import type { InfiniteTableAction } from "components/InfiniteTable/types/InfiniteTableAction";
|
|
1192
1238
|
import type { InfiniteTableActionType } from "components/InfiniteTable/types/InfiniteTableActionType";
|
|
1193
|
-
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropRowStyle, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTablePropRowClassName, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableColumnSizingOptions } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1239
|
+
import type { InfiniteTableProps, InfiniteTableImperativeApi, InfiniteTablePropColumnOrder, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnAggregator, InfiniteTableColumnGroup, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropRowStyle, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTablePropRowClassName, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTablePropComponents, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePropColumnSizingMap, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableColumnSizingOptions, Scrollbars } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1194
1240
|
import type { InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1195
1241
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/InfiniteTableComputedValues";
|
|
1196
1242
|
import type { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1197
1243
|
import type { InfiniteTableRowInfo } from "utils/groupAndPivot/index";
|
|
1198
|
-
export type { InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizing, InfiniteTablePropColumnSizingMap, InfiniteTableColumnSizingOptions, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1244
|
+
export type { Scrollbars, InfiniteTableColumnAggregator, InfiniteTableComputedValues, InfiniteTablePropColumns, InfiniteTablePropColumnsMap, InfiniteTableRowInfo, InfiniteTableGroupColumnFunction, InfiniteTablePropColumnOrder, InfiniteTablePropComponents, InfiniteTablePropColumnVisibility, InfiniteTablePropColumnPinning, InfiniteTableColumnGroup, InfiniteTableColumn, InfiniteTableColumnComparer, InfiniteTableComputedColumn, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableContextValue, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropColumnSizing, InfiniteTablePropColumnSizingMap, InfiniteTableColumnSizingOptions, InfiniteTableState, InfiniteTableAction, InfiniteTableProps, InfiniteTablePropColumnTypes, InfiniteTablePropColumnTypesMap, InfiniteTableImperativeApi, InfiniteTableActionType, InfiniteTablePropRowStyle, InfiniteTablePropRowClassName, InfiniteTableRowStyleFn, InfiniteTableRowClassNameFn, InfiniteTableGroupColumnGetterOptions, };
|
|
1199
1245
|
}
|
|
1200
1246
|
declare module "components/InfiniteTable/InfiniteTableContext" {
|
|
1201
1247
|
import { InfiniteTableContextValue } from "components/InfiniteTable/types/InfiniteTableContextValue";
|
|
1202
1248
|
export function getInfiniteTableContext<T>(): React.Context<InfiniteTableContextValue<T>>;
|
|
1203
1249
|
}
|
|
1204
|
-
declare module "components/utils/buildSubscriptionCallback" {
|
|
1205
|
-
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
1206
|
-
export function buildSubscriptionCallback<T>(): SubscriptionCallback<T>;
|
|
1207
|
-
}
|
|
1208
1250
|
declare module "components/InfiniteTable/state/computeColumnGroupsDepths" {
|
|
1209
1251
|
import type { InfiniteTablePropColumnGroups } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1210
1252
|
import type { InfiniteTableColumnGroupsDepthsMap } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -1230,8 +1272,10 @@ declare module "components/InfiniteTable/state/getInitialState" {
|
|
|
1230
1272
|
pivotColumn: 1 | ((value: Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined) => Partial<import("components/InfiniteTable/types/InfiniteTableProps").InfiniteTablePropPivotColumn<T>> | undefined);
|
|
1231
1273
|
sortable: 1 | ((value: boolean | undefined) => boolean);
|
|
1232
1274
|
components: 1 | ((value: import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined) => import("components/InfiniteTable/types").InfiniteTablePropComponents | undefined);
|
|
1275
|
+
scrollTopId: 1 | ((value: string | number | undefined) => string | number | undefined);
|
|
1233
1276
|
viewportReservedWidth: 1 | ((value: number | undefined) => number | undefined);
|
|
1234
1277
|
groupColumn: 1 | ((value: Partial<InfiniteTablePropGroupColumn<T>> | undefined) => Partial<InfiniteTablePropGroupColumn<T>> | undefined);
|
|
1278
|
+
onScrollbarsChange: 1 | ((value: ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined) => ((scrollbars: import("components/InfiniteTable/types").Scrollbars) => void) | undefined);
|
|
1235
1279
|
loadingText: 1 | ((value: import("react").ReactNode) => import("react").ReactNode);
|
|
1236
1280
|
onReady: 1 | ((value: ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined) => ((api: import("components/InfiniteTable/types").InfiniteTableImperativeApi<T>) => void) | undefined);
|
|
1237
1281
|
onSelfFocus: 1 | ((value: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined) => ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined);
|
|
@@ -2193,13 +2237,11 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
2193
2237
|
export const InfiniteTableHeaderUnvirtualized: typeof InfiniteTableHeaderUnvirtualizedFn;
|
|
2194
2238
|
}
|
|
2195
2239
|
declare module "components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper" {
|
|
2240
|
+
import type { Scrollbars } from "components/InfiniteTable/index";
|
|
2196
2241
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2197
2242
|
export type TableHeaderWrapperProps = {
|
|
2198
2243
|
brain: VirtualBrain;
|
|
2199
|
-
scrollbars:
|
|
2200
|
-
vertical: boolean;
|
|
2201
|
-
horizontal: boolean;
|
|
2202
|
-
};
|
|
2244
|
+
scrollbars: Scrollbars;
|
|
2203
2245
|
repaintId?: number | string;
|
|
2204
2246
|
};
|
|
2205
2247
|
export function TableHeaderWrapper<T>(props: TableHeaderWrapperProps): JSX.Element;
|
|
@@ -2478,7 +2520,7 @@ declare module "components/VirtualList/RowListWithExternalScrolling" {
|
|
|
2478
2520
|
}
|
|
2479
2521
|
declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
2480
2522
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
2481
|
-
import { InfiniteTableComputedColumn, InfiniteTableRowInfo } from "components/InfiniteTable/types/index";
|
|
2523
|
+
import type { InfiniteTableComputedColumn, InfiniteTableRowInfo, Scrollbars } from "components/InfiniteTable/types/index";
|
|
2482
2524
|
import type { Size } from "components/types/Size";
|
|
2483
2525
|
import type { RenderRow } from "components/VirtualList/types";
|
|
2484
2526
|
import { InfiniteTableState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -2498,10 +2540,7 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
2498
2540
|
computedPinnedEndColumnsWidth: number;
|
|
2499
2541
|
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
2500
2542
|
verticalVirtualBrain: VirtualBrain;
|
|
2501
|
-
scrollbars:
|
|
2502
|
-
vertical: boolean;
|
|
2503
|
-
horizontal: boolean;
|
|
2504
|
-
};
|
|
2543
|
+
scrollbars: Scrollbars;
|
|
2505
2544
|
rowHeight: number;
|
|
2506
2545
|
toggleGroupRow: InfiniteTableToggleGroupRowFn;
|
|
2507
2546
|
computedPinnedStartColumnsWidth: number;
|
|
@@ -2548,13 +2587,11 @@ declare module "components/InfiniteTable/hooks/useYourBrain" {
|
|
|
2548
2587
|
verticalVirtualBrain: VirtualBrain;
|
|
2549
2588
|
};
|
|
2550
2589
|
}
|
|
2551
|
-
declare module "utils/shallowEqualObjects" {
|
|
2552
|
-
export function shallowEqualObjects<T extends object | null>(objA: T, objB: T): boolean;
|
|
2553
|
-
}
|
|
2554
2590
|
declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
2555
2591
|
import type { Ref } from 'react';
|
|
2556
2592
|
import type { InfiniteTableComputedValues } from "components/InfiniteTable/types/index";
|
|
2557
2593
|
import type { Size } from "components/types/Size";
|
|
2594
|
+
import type { Scrollbars } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
2558
2595
|
type ListRenderingParam<T> = {
|
|
2559
2596
|
computed: InfiniteTableComputedValues<T>;
|
|
2560
2597
|
domRef: Ref<HTMLElement>;
|
|
@@ -2564,10 +2601,7 @@ declare module "components/InfiniteTable/hooks/useListRendering" {
|
|
|
2564
2601
|
};
|
|
2565
2602
|
import type { VirtualBrain } from "components/VirtualBrain/index";
|
|
2566
2603
|
type ListRenderingResult = {
|
|
2567
|
-
scrollbars:
|
|
2568
|
-
vertical: boolean;
|
|
2569
|
-
horizontal: boolean;
|
|
2570
|
-
};
|
|
2604
|
+
scrollbars: Scrollbars;
|
|
2571
2605
|
horizontalVirtualBrain: VirtualBrain;
|
|
2572
2606
|
verticalVirtualBrain: VirtualBrain;
|
|
2573
2607
|
applyScrollHorizontal: ({ scrollLeft }: {
|