import { SyntheticEvent } from 'react'; import { TimeoutID } from './common'; type Direction = 'ltr' | 'rtl'; export type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end'; type itemSize = number | ((index: number) => number); type ScrollDirection = 'forward' | 'backward'; type OnItemsRenderedCallback = ({ overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex }: { [key: string]: number; }) => void; type ScrollEvent = SyntheticEvent; export type Props = { children: any; className?: string; columnCount: number; columnWidth: itemSize; direction: Direction; height: number; initialScrollLeft?: number; initialScrollTop?: number; innerRef?: any; innerElementType?: any; innerTagName?: string; itemData: T; itemKey?: (params: { columnIndex: number; data: T; rowIndex: number; }) => any; onItemsRendered?: OnItemsRenderedCallback; onScroll?: (...args: any[]) => void; outerRef?: any; outerElementType?: any; outerTagName?: string; overscanColumnCount?: number; overscanColumnsCount?: number; overscanCount?: number; overscanRowCount?: number; overscanRowsCount?: number; rowCount: number; rowHeight: itemSize; style?: Object; useIsScrolling: boolean; width: number; }; type State = { instance: any; isScrolling: boolean; horizontalScrollDirection: ScrollDirection; sLeft: number; scrollLeft: number; scrollTop: number; scrollUpdateWasRequested: boolean; verticalScrollDirection: ScrollDirection; }; export default function createGridComponent({ getColumnOffset, getColumnStartIndexForOffset, getColumnStopIndexForStartIndex, getColumnWidth, getEstimatedTotalHeight, getEstimatedTotalWidth, getOffsetForColumnAndAlignment, getOffsetForRowAndAlignment, getRowHeight, getRowOffset, getRowStartIndexForOffset, getRowStopIndexForStartIndex, initInstanceProps, shouldResetStyleCacheOnItemSizeChange }: { getColumnOffset: any; getColumnStartIndexForOffset: any; getColumnStopIndexForStartIndex: any; getColumnWidth: any; getEstimatedTotalHeight: any; getEstimatedTotalWidth: any; getOffsetForColumnAndAlignment: any; getOffsetForRowAndAlignment: any; getRowHeight: any; getRowOffset: any; getRowStartIndexForOffset: any; getRowStopIndexForStartIndex: any; initInstanceProps: any; shouldResetStyleCacheOnItemSizeChange: any; }): { new (props: Props): { _instanceProps: any; _resetIsScrollingTimeoutId: TimeoutID | null; _outerRef: any; _isTree: boolean; _shouldResetStyleCacheOnItemSizeChange: boolean; state: State; scrollTo({ scrollLeft, scrollTop }: { scrollLeft: number; scrollTop: number; }): void; scrollLeftAndTop({ left, top }: { left?: number | undefined; top?: number | undefined; }, callback?: any): void; scrollToItem({ align, columnIndex, rowIndex }: { align: ScrollToAlign; columnIndex?: number | undefined; rowIndex?: number | undefined; }): void; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; render(): import("react").CElement<{ className: string | undefined; onScroll: (event: ScrollEvent) => void; ref: (ref: any) => void; style: { constructor?: Function | undefined; toString?: (() => string) | undefined; toLocaleString?: (() => string) | undefined; valueOf?: (() => Object) | undefined; hasOwnProperty?: ((v: PropertyKey) => boolean) | undefined; isPrototypeOf?: ((v: Object) => boolean) | undefined; propertyIsEnumerable?: ((v: PropertyKey) => boolean) | undefined; position: string; height: number; width: number; overflow: string; WebkitOverflowScrolling: string; willChange: string; direction: Direction; }; }, any>; _onScroll: (event: ScrollEvent) => void; _outerRefSetter: (ref: any) => void; _getHorizontalRangeToRender(): any[]; _getVerticalRangeToRender(): [number, number, number, number]; _callOnItemsRendered: (overscanColumnStartIndex: number, overscanColumnStopIndex: number, overscanRowStartIndex: number, overscanRowStopIndex: number, visibleColumnStartIndex: number, visibleColumnStopIndex: number, visibleRowStartIndex: number, visibleRowStopIndex: number) => void | undefined; _callOnScroll: (scrollLeft: number, scrollTop: number, horizontalScrollDirection: ScrollDirection, verticalScrollDirection: ScrollDirection, scrollUpdateWasRequested: boolean) => void | undefined; _callPropsCallbacks(): void; _getItemStyle: (rowIndex: number, columnIndex: number) => Object; _getItemStyleCache: any; _resetIsScrolling: () => void; _resetIsScrollingDebounced: () => void; context: unknown; setState(state: State | ((prevState: Readonly, props: Readonly>) => State | Pick | null) | Pick | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly>; refs: { [key: string]: import("react").ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly, nextContext: any): void; }; defaultProps: { direction: string; itemData: undefined; useIsScrolling: boolean; }; contextType?: import("react").Context | undefined; }; export {};