react-virtuoso 2.5.1 → 2.7.1
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/dist/Grid.d.ts +72 -23
- package/dist/List.d.ts +392 -87
- package/dist/Table.d.ts +338 -68
- package/dist/alignToBottomSystem.d.ts +10 -0
- package/dist/components.d.ts +1144 -53
- package/dist/followOutputSystem.d.ts +8 -0
- package/dist/gridSystem.d.ts +4 -1
- package/dist/groupedListSystem.d.ts +2 -0
- package/dist/hooks/useChangedChildSizes.d.ts +1 -1
- package/dist/hooks/useScrollTop.d.ts +1 -1
- package/dist/hooks/useWindowViewportRect.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.m.js.map +1 -1
- package/dist/initialItemCountSystem.d.ts +12 -0
- package/dist/initialScrollTopSystem.d.ts +10 -0
- package/dist/initialTopMostItemIndexSystem.d.ts +4 -0
- package/dist/interfaces.d.ts +71 -31
- package/dist/listStateSystem.d.ts +10 -0
- package/dist/listSystem.d.ts +113 -1
- package/dist/scrollIntoViewSystem.d.ts +14 -0
- package/dist/scrollToIndexSystem.d.ts +2 -0
- package/dist/sizeSystem.d.ts +1 -0
- package/dist/topItemCountSystem.d.ts +10 -0
- package/dist/totalListHeightSystem.d.ts +10 -0
- package/dist/upwardScrollFixSystem.d.ts +12 -0
- package/dist/windowScrollerSystem.d.ts +1 -0
- package/package.json +1 -1
package/dist/Grid.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import * as u from '@virtuoso.dev/urx';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { GridComponents, GridComputeItemKey, GridItemContent, GridRootProps } from './interfaces';
|
|
5
5
|
declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
6
|
-
itemContent?: GridItemContent | undefined;
|
|
7
|
-
components?: GridComponents | undefined;
|
|
6
|
+
itemContent?: GridItemContent<any> | undefined;
|
|
7
|
+
components?: GridComponents<any> | undefined;
|
|
8
8
|
computeItemKey?: GridComputeItemKey | undefined;
|
|
9
9
|
itemClassName?: string | undefined;
|
|
10
10
|
listClassName?: string | undefined;
|
|
@@ -12,10 +12,11 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
12
12
|
overscan?: import("./sizeRangeSystem").Overscan | undefined;
|
|
13
13
|
scrollSeekConfiguration?: false | import("./interfaces").ScrollSeekConfiguration | undefined;
|
|
14
14
|
useWindowScroll?: boolean | undefined;
|
|
15
|
+
customScrollParent?: HTMLElement | undefined;
|
|
15
16
|
totalCount?: number | undefined;
|
|
16
17
|
initialItemCount?: number | undefined;
|
|
17
18
|
scrollSeek?: any;
|
|
18
|
-
item?: GridItemContent | undefined;
|
|
19
|
+
item?: GridItemContent<any> | undefined;
|
|
19
20
|
ItemContainer?: any;
|
|
20
21
|
ScrollContainer?: any;
|
|
21
22
|
ListContainer?: any;
|
|
@@ -199,10 +200,11 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
199
200
|
scrollingInProgress: u.StatefulStream<boolean>;
|
|
200
201
|
}]) => {
|
|
201
202
|
useWindowScroll: u.StatefulStream<boolean>;
|
|
203
|
+
customScrollParent: u.StatefulStream<HTMLElement | undefined>;
|
|
202
204
|
windowScrollContainerState: u.Stream<[number, number]>;
|
|
203
205
|
windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
|
|
204
206
|
windowScrollTo: u.Stream<ScrollToOptions>;
|
|
205
|
-
}>], ([{ overscan, visibleRange, listBoundary }, { scrollTop, viewportHeight, scrollBy, scrollTo, smoothScrollTargetReached, scrollContainerState }, stateFlags, scrollSeek, { propsReady, didMount }, { windowViewportRect, windowScrollTo, useWindowScroll, windowScrollContainerState },]: [{
|
|
207
|
+
}>], ([{ overscan, visibleRange, listBoundary }, { scrollTop, viewportHeight, scrollBy, scrollTo, smoothScrollTargetReached, scrollContainerState }, stateFlags, scrollSeek, { propsReady, didMount }, { windowViewportRect, windowScrollTo, useWindowScroll, customScrollParent, windowScrollContainerState },]: [{
|
|
206
208
|
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>;
|
|
207
209
|
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>;
|
|
208
210
|
topListHeight: u.StatefulStream<number>;
|
|
@@ -243,6 +245,7 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
243
245
|
didMount: u.Stream<boolean>;
|
|
244
246
|
}, {
|
|
245
247
|
useWindowScroll: u.StatefulStream<boolean>;
|
|
248
|
+
customScrollParent: u.StatefulStream<HTMLElement | undefined>;
|
|
246
249
|
windowScrollContainerState: u.Stream<[number, number]>;
|
|
247
250
|
windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
|
|
248
251
|
windowScrollTo: u.Stream<ScrollToOptions>;
|
|
@@ -279,21 +282,36 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
279
282
|
windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
|
|
280
283
|
windowScrollTo: u.Stream<ScrollToOptions>;
|
|
281
284
|
useWindowScroll: u.StatefulStream<boolean>;
|
|
285
|
+
customScrollParent: u.StatefulStream<HTMLElement | undefined>;
|
|
282
286
|
windowScrollContainerState: u.Stream<[number, number]>;
|
|
283
287
|
deviation: u.StatefulStream<number>;
|
|
284
288
|
scrollContainerState: u.Stream<[number, number]>;
|
|
285
289
|
initialItemCount: u.StatefulStream<number>;
|
|
286
290
|
}>, u.SystemSpec<u.SystemSpecs, () => {
|
|
287
|
-
|
|
288
|
-
|
|
291
|
+
context: u.StatefulStream<unknown>;
|
|
292
|
+
itemContent: u.StatefulStream<GridItemContent<any>>;
|
|
293
|
+
components: u.StatefulStream<GridComponents<any>>;
|
|
289
294
|
computeItemKey: u.StatefulStream<GridComputeItemKey>;
|
|
290
295
|
itemClassName: u.StatefulStream<string>;
|
|
291
296
|
listClassName: u.StatefulStream<string>;
|
|
292
297
|
scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
|
|
293
|
-
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
298
|
+
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps & {
|
|
299
|
+
context?: any;
|
|
300
|
+
}> | null | undefined>;
|
|
301
|
+
ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem & {
|
|
302
|
+
context?: any;
|
|
303
|
+
}> | null | undefined>;
|
|
304
|
+
ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
305
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
306
|
+
}, "ref" | "style" | "tabIndex" | "children"> & {
|
|
307
|
+
'data-test-id'?: string | undefined;
|
|
308
|
+
'data-virtuoso-scroller'?: boolean | undefined;
|
|
309
|
+
} & {
|
|
310
|
+
context?: any;
|
|
311
|
+
}> | null | undefined>;
|
|
312
|
+
ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps & {
|
|
313
|
+
context?: any;
|
|
314
|
+
}> | null | undefined>;
|
|
297
315
|
}>], ([gridSystem, gridComponentPropsSystem]: [{
|
|
298
316
|
startReached: u.Stream<number>;
|
|
299
317
|
endReached: u.Stream<number>;
|
|
@@ -327,38 +345,67 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
327
345
|
windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
|
|
328
346
|
windowScrollTo: u.Stream<ScrollToOptions>;
|
|
329
347
|
useWindowScroll: u.StatefulStream<boolean>;
|
|
348
|
+
customScrollParent: u.StatefulStream<HTMLElement | undefined>;
|
|
330
349
|
windowScrollContainerState: u.Stream<[number, number]>;
|
|
331
350
|
deviation: u.StatefulStream<number>;
|
|
332
351
|
scrollContainerState: u.Stream<[number, number]>;
|
|
333
352
|
initialItemCount: u.StatefulStream<number>;
|
|
334
353
|
}, {
|
|
335
|
-
|
|
336
|
-
|
|
354
|
+
context: u.StatefulStream<unknown>;
|
|
355
|
+
itemContent: u.StatefulStream<GridItemContent<any>>;
|
|
356
|
+
components: u.StatefulStream<GridComponents<any>>;
|
|
337
357
|
computeItemKey: u.StatefulStream<GridComputeItemKey>;
|
|
338
358
|
itemClassName: u.StatefulStream<string>;
|
|
339
359
|
listClassName: u.StatefulStream<string>;
|
|
340
360
|
scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
|
|
341
|
-
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
361
|
+
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps & {
|
|
362
|
+
context?: any;
|
|
363
|
+
}> | null | undefined>;
|
|
364
|
+
ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem & {
|
|
365
|
+
context?: any;
|
|
366
|
+
}> | null | undefined>;
|
|
367
|
+
ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
368
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
369
|
+
}, "ref" | "style" | "tabIndex" | "children"> & {
|
|
370
|
+
'data-test-id'?: string | undefined;
|
|
371
|
+
'data-virtuoso-scroller'?: boolean | undefined;
|
|
372
|
+
} & {
|
|
373
|
+
context?: any;
|
|
374
|
+
}> | null | undefined>;
|
|
375
|
+
ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps & {
|
|
376
|
+
context?: any;
|
|
377
|
+
}> | null | undefined>;
|
|
345
378
|
}]) => {
|
|
346
|
-
item: u.Stream<GridItemContent
|
|
379
|
+
item: u.Stream<GridItemContent<any>>;
|
|
347
380
|
ItemContainer: u.Stream<any>;
|
|
348
381
|
ScrollContainer: u.Stream<any>;
|
|
349
382
|
ListContainer: u.Stream<any>;
|
|
350
383
|
emptyComponent: u.Stream<any>;
|
|
351
384
|
scrollSeek: u.Stream<any>;
|
|
352
|
-
|
|
353
|
-
|
|
385
|
+
context: u.StatefulStream<unknown>;
|
|
386
|
+
itemContent: u.StatefulStream<GridItemContent<any>>;
|
|
387
|
+
components: u.StatefulStream<GridComponents<any>>;
|
|
354
388
|
computeItemKey: u.StatefulStream<GridComputeItemKey>;
|
|
355
389
|
itemClassName: u.StatefulStream<string>;
|
|
356
390
|
listClassName: u.StatefulStream<string>;
|
|
357
391
|
scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
|
|
358
|
-
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
392
|
+
ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps & {
|
|
393
|
+
context?: any;
|
|
394
|
+
}> | null | undefined>;
|
|
395
|
+
ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem & {
|
|
396
|
+
context?: any;
|
|
397
|
+
}> | null | undefined>;
|
|
398
|
+
ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
399
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
400
|
+
}, "ref" | "style" | "tabIndex" | "children"> & {
|
|
401
|
+
'data-test-id'?: string | undefined;
|
|
402
|
+
'data-virtuoso-scroller'?: boolean | undefined;
|
|
403
|
+
} & {
|
|
404
|
+
context?: any;
|
|
405
|
+
}> | null | undefined>;
|
|
406
|
+
ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps & {
|
|
407
|
+
context?: any;
|
|
408
|
+
}> | null | undefined>;
|
|
362
409
|
startReached: u.Stream<number>;
|
|
363
410
|
endReached: u.Stream<number>;
|
|
364
411
|
rangeChanged: u.Stream<import("./interfaces").ListRange>;
|
|
@@ -391,6 +438,7 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
391
438
|
windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
|
|
392
439
|
windowScrollTo: u.Stream<ScrollToOptions>;
|
|
393
440
|
useWindowScroll: u.StatefulStream<boolean>;
|
|
441
|
+
customScrollParent: u.StatefulStream<HTMLElement | undefined>;
|
|
394
442
|
windowScrollContainerState: u.Stream<[number, number]>;
|
|
395
443
|
deviation: u.StatefulStream<number>;
|
|
396
444
|
scrollContainerState: u.Stream<[number, number]>;
|
|
@@ -407,6 +455,7 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
|
|
|
407
455
|
listClassName: "listClassName";
|
|
408
456
|
itemClassName: "itemClassName";
|
|
409
457
|
useWindowScroll: "useWindowScroll";
|
|
458
|
+
customScrollParent: "customScrollParent";
|
|
410
459
|
scrollerRef: "scrollerRef";
|
|
411
460
|
item: "item";
|
|
412
461
|
ItemContainer: "ItemContainer";
|