react-virtuoso 2.6.0 → 2.7.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/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;
@@ -16,7 +16,7 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
16
16
  totalCount?: number | undefined;
17
17
  initialItemCount?: number | undefined;
18
18
  scrollSeek?: any;
19
- item?: GridItemContent | undefined;
19
+ item?: GridItemContent<any> | undefined;
20
20
  ItemContainer?: any;
21
21
  ScrollContainer?: any;
22
22
  ListContainer?: any;
@@ -288,16 +288,30 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
288
288
  scrollContainerState: u.Stream<[number, number]>;
289
289
  initialItemCount: u.StatefulStream<number>;
290
290
  }>, u.SystemSpec<u.SystemSpecs, () => {
291
- itemContent: u.StatefulStream<GridItemContent>;
292
- components: u.StatefulStream<GridComponents>;
291
+ context: u.StatefulStream<unknown>;
292
+ itemContent: u.StatefulStream<GridItemContent<any>>;
293
+ components: u.StatefulStream<GridComponents<any>>;
293
294
  computeItemKey: u.StatefulStream<GridComputeItemKey>;
294
295
  itemClassName: u.StatefulStream<string>;
295
296
  listClassName: u.StatefulStream<string>;
296
297
  scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
297
- ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps> | null | undefined>;
298
- ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem> | null | undefined>;
299
- ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").ScrollerProps> | null | undefined>;
300
- ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps> | null | undefined>;
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>;
301
315
  }>], ([gridSystem, gridComponentPropsSystem]: [{
302
316
  startReached: u.Stream<number>;
303
317
  endReached: u.Stream<number>;
@@ -337,33 +351,61 @@ declare const Grid: React.ForwardRefExoticComponent<{} & {
337
351
  scrollContainerState: u.Stream<[number, number]>;
338
352
  initialItemCount: u.StatefulStream<number>;
339
353
  }, {
340
- itemContent: u.StatefulStream<GridItemContent>;
341
- components: u.StatefulStream<GridComponents>;
354
+ context: u.StatefulStream<unknown>;
355
+ itemContent: u.StatefulStream<GridItemContent<any>>;
356
+ components: u.StatefulStream<GridComponents<any>>;
342
357
  computeItemKey: u.StatefulStream<GridComputeItemKey>;
343
358
  itemClassName: u.StatefulStream<string>;
344
359
  listClassName: u.StatefulStream<string>;
345
360
  scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
346
- ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps> | null | undefined>;
347
- ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem> | null | undefined>;
348
- ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").ScrollerProps> | null | undefined>;
349
- ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps> | null | undefined>;
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>;
350
378
  }]) => {
351
- item: u.Stream<GridItemContent>;
379
+ item: u.Stream<GridItemContent<any>>;
352
380
  ItemContainer: u.Stream<any>;
353
381
  ScrollContainer: u.Stream<any>;
354
382
  ListContainer: u.Stream<any>;
355
383
  emptyComponent: u.Stream<any>;
356
384
  scrollSeek: u.Stream<any>;
357
- itemContent: u.StatefulStream<GridItemContent>;
358
- components: u.StatefulStream<GridComponents>;
385
+ context: u.StatefulStream<unknown>;
386
+ itemContent: u.StatefulStream<GridItemContent<any>>;
387
+ components: u.StatefulStream<GridComponents<any>>;
359
388
  computeItemKey: u.StatefulStream<GridComputeItemKey>;
360
389
  itemClassName: u.StatefulStream<string>;
361
390
  listClassName: u.StatefulStream<string>;
362
391
  scrollerRef: u.StatefulStream<(ref: HTMLElement | null) => void>;
363
- ListComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridListProps> | null | undefined>;
364
- ItemComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridItem> | null | undefined>;
365
- ScrollerComponent: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").ScrollerProps> | null | undefined>;
366
- ScrollSeekPlaceholder: u.StatefulStream<"div" | React.ComponentType<import("./interfaces").GridScrollSeekPlaceholderProps> | null | undefined>;
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>;
367
409
  startReached: u.Stream<number>;
368
410
  endReached: u.Stream<number>;
369
411
  rangeChanged: u.Stream<import("./interfaces").ListRange>;