reformat codes via new prettier rules (#37046)

This commit is contained in:
Steve Zhang 2019-07-23 03:40:12 +08:00 committed by Wesley Wigham
parent f8020db2d9
commit 48f4013540
14 changed files with 302 additions and 633 deletions

View File

@ -1,6 +1,6 @@
import { PureComponent, Validator, Requireable } from "react";
import * as PropTypes from "prop-types";
import { RenderedSection } from "./Grid";
import { PureComponent, Validator, Requireable } from 'react';
import * as PropTypes from 'prop-types';
import { RenderedSection } from './Grid';
export type OnSectionRenderedParams = RenderedSection;
@ -17,7 +17,7 @@ export type ArrowKeyStepperProps = {
className?: string;
columnCount: number;
rowCount: number;
mode?: "edges" | "cells";
mode?: 'edges' | 'cells';
disabled?: boolean;
isControlled?: boolean;
onScrollToChange?: (params: ScrollIndices) => void;
@ -39,14 +39,11 @@ export type ScrollIndices = {
export type ScrollIndexes = ScrollIndices;
export class ArrowKeyStepper extends PureComponent<
ArrowKeyStepperProps,
ScrollIndices
> {
export class ArrowKeyStepper extends PureComponent<ArrowKeyStepperProps, ScrollIndices> {
static defaultProps: {
disabled: false;
isControlled: false;
mode: "edges";
mode: 'edges';
scrollToColumn: 0;
scrollToRow: 0;
};

View File

@ -1,5 +1,5 @@
import { PureComponent, Validator, Requireable } from "react";
import * as PropTypes from "prop-types";
import { PureComponent, Validator, Requireable } from 'react';
import * as PropTypes from 'prop-types';
export type Size = {
height: number;

View File

@ -1,15 +1,10 @@
import { PureComponent } from "react";
import { PureComponent } from 'react';
export type CellMeasurerCacheInterface = {
hasFixedWidth(): boolean;
hasFixedHeight(): boolean;
has(rowIndex: number, columnIndex: number): boolean;
set(
rowIndex: number,
columnIndex: number,
width: number,
height: number
): void;
set(rowIndex: number, columnIndex: number, width: number, height: number): void;
getHeight(rowIndex: number, columnIndex?: number): number;
getWidth(rowIndex: number, columnIndex?: number): number;
};
@ -38,12 +33,7 @@ export class CellMeasurerCache implements CellMeasurerCacheInterface {
getWidth(rowIndex: number, columnIndex: number): number;
has(rowIndex: number, columnIndex: number): boolean;
rowHeight: (params: { index: number }) => number;
set(
rowIndex: number,
columnIndex: number,
width: number,
height: number
): void;
set(rowIndex: number, columnIndex: number, width: number, height: number): void;
}
export type CellPosition = {
@ -58,9 +48,7 @@ export type MeasuredCellParent = {
export type CellMeasurerProps = {
cache: CellMeasurerCacheInterface;
children:
| ((props: { measure: () => void }) => React.ReactNode)
| React.ReactNode;
children: ((props: { measure: () => void }) => React.ReactNode) | React.ReactNode;
columnIndex?: number;
index?: number;
parent: MeasuredCellParent;

View File

@ -1,4 +1,4 @@
import { PureComponent, Validator, Requireable } from "react";
import { PureComponent, Validator, Requireable } from 'react';
import {
Alignment,
Index,
@ -6,8 +6,8 @@ import {
ScrollPosition,
SectionRenderedParams,
SizeInfo,
SizeAndPositionInfo
} from "../../index";
SizeAndPositionInfo,
} from '../../index';
export type CollectionCellSizeAndPosition = {
height: number;
@ -15,29 +15,23 @@ export type CollectionCellSizeAndPosition = {
x: number;
y: number;
};
export type CollectionCellSizeAndPositionGetter = (
params: Index
) => CollectionCellSizeAndPosition;
export type CollectionCellSizeAndPositionGetter = (params: Index) => CollectionCellSizeAndPosition;
export type CollectionCellGroupRendererParams = {
cellSizeAndPositionGetter: CollectionCellSizeAndPositionGetter;
indices: number[];
cellRenderer: CollectionCellRenderer;
};
export type CollectionCellGroupRenderer = (
params: CollectionCellGroupRendererParams
) => React.ReactNode[];
export type CollectionCellGroupRenderer = (params: CollectionCellGroupRendererParams) => React.ReactNode[];
export type CollectionCellRendererParams = {
index: number;
isScrolling: boolean;
key: number;
style: React.CSSProperties;
};
export type CollectionCellRenderer = (
params: CollectionCellRendererParams
) => React.ReactNode;
export type CollectionCellRenderer = (params: CollectionCellRendererParams) => React.ReactNode;
export type CollectionProps = {
"aria-label"?: string;
'aria-label'?: string;
/**
* Outer height of Collection is set to "auto". This property should only be
* used in conjunction with the WindowScroller HOC.
@ -134,18 +128,16 @@ export type CollectionProps = {
*/
export class Collection extends PureComponent<CollectionProps> {
static propTypes: {
"aria-label": Requireable<string>;
'aria-label': Requireable<string>;
cellCount: Validator<number>;
cellGroupRenderer: Validator<CollectionCellGroupRenderer>;
cellRenderer: Validator<CollectionCellRenderer>;
cellSizeAndPositionGetter: Validator<
CollectionCellSizeAndPositionGetter
>;
cellSizeAndPositionGetter: Validator<CollectionCellSizeAndPositionGetter>;
sectionSize: Requireable<number>;
};
static defaultProps: {
"aria-label": "grid";
'aria-label': 'grid';
cellGroupRenderer: CollectionCellGroupRenderer;
};
@ -167,7 +159,7 @@ export class Collection extends PureComponent<CollectionProps> {
* Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible.
*/
getScrollPositionForCell(params: {
align: "auto" | "start" | "end" | "center";
align: 'auto' | 'start' | 'end' | 'center';
cellIndex: number;
height: number;
scrollLeft: number;

View File

@ -1,4 +1,4 @@
import { PureComponent, Validator, Requireable } from "react";
import { PureComponent, Validator, Requireable } from 'react';
export type SizedColumnProps = {
adjustedWidth: number;

View File

@ -1,8 +1,8 @@
import { Validator, Requireable, PureComponent } from "react";
import { List } from "./List";
import { Table } from "./Table";
import { CellMeasurerCache, MeasuredCellParent } from "./CellMeasurer";
import { Index, Map, Alignment } from "../../index";
import { Validator, Requireable, PureComponent } from 'react';
import { List } from './List';
import { Table } from './Table';
import { CellMeasurerCache, MeasuredCellParent } from './CellMeasurer';
import { Index, Map, Alignment } from '../../index';
export type RenderedSection = {
columnOverscanStartIndex: number;
@ -60,8 +60,8 @@ export type ScrollbarPresenceParams = {
vertical: boolean;
};
export type SectionRenderedParams = RenderedSection;
export type SCROLL_DIRECTION_HORIZONTAL = "horizontal";
export type SCROLL_DIRECTION_VERTICAL = "vertical";
export type SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
export type SCROLL_DIRECTION_VERTICAL = 'vertical';
export type OverscanIndicesGetterParams = {
direction?: SCROLL_DIRECTION_HORIZONTAL | SCROLL_DIRECTION_VERTICAL;
cellCount: number;
@ -74,9 +74,7 @@ export type OverscanIndices = {
overscanStartIndex: number;
overscanStopIndex: number;
};
export type OverscanIndicesGetter = (
params: OverscanIndicesGetterParams
) => OverscanIndices;
export type OverscanIndicesGetter = (params: OverscanIndicesGetterParams) => OverscanIndices;
export type ScrollOffset = {
scrollLeft: number;
@ -89,10 +87,7 @@ export type CellSizeAndPositionManager = {
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getOffsetAdjustment({
containerSize,
offset /*safe*/
}: ContainerSizeAndOffset): number;
getOffsetAdjustment({ containerSize, offset /*safe*/ }: ContainerSizeAndOffset): number;
/**
* This method returns the size and position for the cell at the specified index.
* It just-in-time calculates (or used cached values) for cells leading up to the index.
@ -151,13 +146,11 @@ export type GridCellRangeProps = {
visibleColumnIndices: VisibleCellRange;
visibleRowIndices: VisibleCellRange;
};
export type GridCellRangeRenderer = (
params: GridCellRangeProps
) => React.ReactNode[];
export type GridCellRangeRenderer = (params: GridCellRangeProps) => React.ReactNode[];
export type GridCoreProps = {
"aria-label"?: string;
"aria-readonly"?: boolean;
'aria-label'?: string;
'aria-readonly'?: boolean;
/**
* Set the width of the inner scrollable container to 'auto'.
* This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar.
@ -342,7 +335,7 @@ export type GridProps = GridCoreProps & {
columnWidth: number | ((params: Index) => number);
};
export type ScrollDirection = "horizontal" | "vertical";
export type ScrollDirection = 'horizontal' | 'vertical';
export type GridState = {
isScrolling: boolean;
@ -364,13 +357,13 @@ export const DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
*/
export class Grid extends PureComponent<GridProps, GridState> {
static defaultProps: {
"aria-label": "grid";
"aria-readonly": true;
'aria-label': 'grid';
'aria-readonly': true;
autoContainerWidth: false;
autoHeight: false;
autoWidth: false;
cellRangeRenderer: GridCellRangeRenderer;
containerRole: "rowgroup";
containerRole: 'rowgroup';
containerStyle: {};
estimatedColumnSize: 100;
estimatedRowSize: 30;
@ -382,9 +375,9 @@ export class Grid extends PureComponent<GridProps, GridState> {
overscanColumnCount: 0;
overscanIndicesGetter: OverscanIndicesGetter;
overscanRowCount: 10;
role: "grid";
role: 'grid';
scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL;
scrollToAlignment: "auto";
scrollToAlignment: 'auto';
scrollToColumn: -1;
scrollToRow: -1;
style: {};
@ -394,11 +387,7 @@ export class Grid extends PureComponent<GridProps, GridState> {
/**
* Gets offsets for a given cell and alignment.
*/
getOffsetForCell(params?: {
alignment?: Alignment;
columnIndex?: number;
rowIndex?: number;
}): ScrollOffset;
getOffsetForCell(params?: { alignment?: Alignment; columnIndex?: number; rowIndex?: number }): ScrollOffset;
/**
* This method handles a scroll event originating from an external scroll control.
@ -413,10 +402,7 @@ export class Grid extends PureComponent<GridProps, GridState> {
* This method is intended for advanced use-cases like CellMeasurer.
*/
// @TODO (bvaughn) Add automated test coverage for this.
invalidateCellSizeAfterRender(params: {
columnIndex: number;
rowIndex: number;
}): void;
invalidateCellSizeAfterRender(params: { columnIndex: number; rowIndex: number }): void;
/**
* Pre-measure all columns and rows in a Grid.
@ -430,10 +416,7 @@ export class Grid extends PureComponent<GridProps, GridState> {
* This function should be called if dynamic column or row sizes have changed but nothing else has.
* Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.
*/
recomputeGridSize(params?: {
columnIndex?: number;
rowIndex?: number;
}): void;
recomputeGridSize(params?: { columnIndex?: number; rowIndex?: number }): void;
/**
* Ensure column and row are visible.

View File

@ -1,5 +1,5 @@
import { PureComponent, Validator, Requireable } from "react";
import { Index, IndexRange } from "../../index";
import { PureComponent, Validator, Requireable } from 'react';
import { Index, IndexRange } from '../../index';
export type InfiniteLoaderChildProps = {
onRowsRendered: (params: { startIndex: number; stopIndex: number }) => void;
@ -61,9 +61,7 @@ export type InfiniteLoaderProps = {
*/
export class InfiniteLoader extends PureComponent<InfiniteLoaderProps> {
static propTypes: {
children: Validator<
(props: InfiniteLoaderChildProps) => React.ReactNode
>;
children: Validator<(props: InfiniteLoaderChildProps) => React.ReactNode>;
isRowLoaded: Validator<(params: Index) => boolean>;
loadMoreRows: Validator<(params: IndexRange) => Promise<any>>;
minimumBatchSize: Validator<number>;

View File

@ -1,12 +1,7 @@
import { PureComponent, Validator, Requireable } from "react";
import {
Grid,
GridCoreProps,
GridCellProps,
OverscanIndicesGetter
} from "./Grid";
import { Index, IndexRange, Alignment } from "../../index";
import { CellMeasurerCache, CellPosition } from "./CellMeasurer";
import { PureComponent, Validator, Requireable } from 'react';
import { Grid, GridCoreProps, GridCellProps, OverscanIndicesGetter } from './Grid';
import { Index, IndexRange, Alignment } from '../../index';
import { CellMeasurerCache, CellPosition } from './CellMeasurer';
import { OnScrollParams } from './ScrollSync';
export type ListRowProps = Pick<GridCellProps, Exclude<keyof GridCellProps, 'rowIndex'>> & {
@ -36,14 +31,12 @@ export type ListProps = GridCoreProps & {
* Callback invoked with information about the slice of rows that were just rendered.
* ({ startIndex, stopIndex }): void
*/
onRowsRendered?: (
info: {
overscanStartIndex: number;
overscanStopIndex: number;
startIndex: number;
stopIndex: number;
}
) => void;
onRowsRendered?: (info: {
overscanStartIndex: number;
overscanStopIndex: number;
startIndex: number;
stopIndex: number;
}) => void;
/**
* Number of rows to render above/below the visible bounds of the list.
* These rows can help for smoother scrolling on touch devices.
@ -96,7 +89,7 @@ export class List extends PureComponent<ListProps> {
onRowsRendered: () => void;
overscanIndicesGetter: OverscanIndicesGetter;
overscanRowCount: 10;
scrollToAlignment: "auto";
scrollToAlignment: 'auto';
scrollToIndex: -1;
style: {};
};
@ -109,10 +102,7 @@ export class List extends PureComponent<ListProps> {
getOffsetForRow(params: { alignment?: Alignment; index?: number }): number;
/** CellMeasurer compatibility */
invalidateCellSizeAfterRender({
columnIndex,
rowIndex
}: CellPosition): void;
invalidateCellSizeAfterRender({ columnIndex, rowIndex }: CellPosition): void;
/** See Grid#measureAllCells */
measureAllRows(): void;

View File

@ -1,30 +1,15 @@
import { PureComponent, Validator, Requireable } from "react";
import {
CellMeasurerCacheInterface,
KeyMapper,
MeasuredCellParent
} from "./CellMeasurer";
import { GridCellRenderer } from "./Grid";
import { PureComponent, Validator, Requireable } from 'react';
import { CellMeasurerCacheInterface, KeyMapper, MeasuredCellParent } from './CellMeasurer';
import { GridCellRenderer } from './Grid';
/**
* Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.
* This improves performance and makes scrolling smoother.
*/
export const DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
export type OnCellsRenderedCallback = (
params: {
startIndex: number;
stopIndex: number;
}
) => void;
export type OnCellsRenderedCallback = (params: { startIndex: number; stopIndex: number }) => void;
export type OnScrollCallback = (
params: {
clientHeight: number;
scrollHeight: number;
scrollTop: number;
}
) => void;
export type OnScrollCallback = (params: { clientHeight: number; scrollHeight: number; scrollTop: number }) => void;
export type MasonryCellProps = {
index: number;
@ -104,7 +89,7 @@ export class Masonry extends PureComponent<MasonryProps, MasonryState> {
onCellsRendered: noop;
onScroll: noop;
overscanByPixels: 20;
role: "grid";
role: 'grid';
scrollingResetTimeInterval: typeof DEFAULT_SCROLLING_RESET_TIME_INTERVAL;
style: emptyObject;
tabIndex: 0;
@ -117,10 +102,7 @@ export class Masonry extends PureComponent<MasonryProps, MasonryState> {
recomputeCellPositions(): void;
static getDerivedStateFromProps(
nextProps: MasonryProps,
prevState: MasonryState
): MasonryState | null;
static getDerivedStateFromProps(nextProps: MasonryProps, prevState: MasonryState): MasonryState | null;
}
export type emptyObject = {};
@ -151,6 +133,4 @@ export type Positioner = ((index: number) => Position) & {
reset: (params: resetParams) => void;
};
export const createCellPositioner: (
params: createCellPositionerParams
) => Positioner;
export const createCellPositioner: (params: createCellPositionerParams) => Positioner;

View File

@ -1,6 +1,6 @@
import { PureComponent, Validator, Requireable } from "react";
import { GridProps } from "./Grid";
import { CellPosition } from "./CellMeasurer";
import { PureComponent, Validator, Requireable } from 'react';
import { GridProps } from './Grid';
import { CellPosition } from './CellMeasurer';
export type MultiGridProps = {
classNameBottomLeftGrid?: string;
@ -48,10 +48,10 @@ export class MultiGrid extends PureComponent<MultiGridProps, MultiGridState> {
};
static defaultProps: {
classNameBottomLeftGrid: "";
classNameBottomRightGrid: "";
classNameTopLeftGrid: "";
classNameTopRightGrid: "";
classNameBottomLeftGrid: '';
classNameBottomRightGrid: '';
classNameTopLeftGrid: '';
classNameTopRightGrid: '';
enableFixedColumnScroll: false;
enableFixedRowScroll: false;
fixedColumnCount: 0;
@ -74,12 +74,6 @@ export class MultiGrid extends PureComponent<MultiGridProps, MultiGridState> {
measureAllCells(): void;
/** See Grid#recomputeGridSize */
recomputeGridSize(params?: {
columnIndex?: number;
rowIndex?: number;
}): void;
static getDerivedStateFromProps(
nextProps: MultiGridProps,
prevState: MultiGridState
): MultiGridState | null;
recomputeGridSize(params?: { columnIndex?: number; rowIndex?: number }): void;
static getDerivedStateFromProps(nextProps: MultiGridProps, prevState: MultiGridState): MultiGridState | null;
}

View File

@ -1,4 +1,4 @@
import { PureComponent, Validator, Requireable } from "react";
import { PureComponent, Validator, Requireable } from 'react';
export type OnScrollParams = {
clientHeight: number;
@ -48,10 +48,7 @@ export type ScrollSyncState = {
/**
* HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.
*/
export class ScrollSync extends PureComponent<
ScrollSyncProps,
ScrollSyncState
> {
export class ScrollSync extends PureComponent<ScrollSyncProps, ScrollSyncState> {
static propTypes: {
children: Validator<(props: ScrollSyncChildProps) => React.ReactNode>;
};

View File

@ -1,13 +1,7 @@
import { Validator, ReactNode, Requireable, PureComponent, Component } from "react";
import { CellMeasurerCache } from "./CellMeasurer";
import {
Index,
Alignment,
ScrollEventData,
IndexRange,
OverscanIndexRange
} from "../../index";
import { Grid, GridCoreProps } from "./Grid";
import { Validator, ReactNode, Requireable, PureComponent, Component } from 'react';
import { CellMeasurerCache } from './CellMeasurer';
import { Index, Alignment, ScrollEventData, IndexRange, OverscanIndexRange } from '../../index';
import { Grid, GridCoreProps } from './Grid';
export type SortParams = {
defaultSortDirection: SortDirectionType;
@ -42,9 +36,7 @@ export type MultiSortReturn = {
};
export function createMultiSort(
sortCallback: (
params: { sortBy: string; sortDirection: SortDirectionType }
) => void,
sortCallback: (params: { sortBy: string; sortDirection: SortDirectionType }) => void,
options?: MultiSortOptions
): MultiSortReturn;
@ -97,15 +89,13 @@ export type TableRowProps = {
export type TableCellDataGetter = (params: TableCellDataGetterParams) => any;
export type TableCellRenderer = (props: TableCellProps) => React.ReactNode;
export type TableHeaderRenderer = (props: TableHeaderProps) => React.ReactNode;
export type TableHeaderRowRenderer = (
props: TableHeaderRowProps
) => React.ReactNode;
export type TableHeaderRowRenderer = (props: TableHeaderRowProps) => React.ReactNode;
export type TableRowRenderer = (props: TableRowProps) => React.ReactNode;
// https://github.com/bvaughn/react-virtualized/blob/master/docs/Column.md
export type ColumnProps = {
/** Optional aria-label value to set on the column header */
"aria-label"?: string;
'aria-label'?: string;
/**
* Callback responsible for returning a cell's data, given its :dataKey
* ({ columnData: any, dataKey: string, rowData: any }): any
@ -154,7 +144,7 @@ export type ColumnProps = {
};
export class Column extends Component<ColumnProps> {
static propTypes: {
"aria-label": Requireable<string>;
'aria-label': Requireable<string>;
cellDataGetter: Requireable<TableCellDataGetter>;
cellRenderer: Requireable<TableCellRenderer>;
className: Requireable<string>;
@ -184,7 +174,7 @@ export class Column extends Component<ColumnProps> {
}
export type RowMouseEventHandlerParams = {
rowData: any
rowData: any;
index: number;
event: React.MouseEvent<any>;
};
@ -197,7 +187,7 @@ export type HeaderMouseEventHandlerParams = {
// ref: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md
export type TableProps = GridCoreProps & {
"aria-label"?: string;
'aria-label'?: string;
deferredMeasurementCache?: CellMeasurerCache;
/**
* Removes fixed height from the scrollingContainer so that the total height
@ -342,9 +332,7 @@ export type TableProps = GridCoreProps & {
export const defaultCellDataGetter: TableCellDataGetter;
export const defaultCellRenderer: TableCellRenderer;
export const defaultHeaderRenderer: () => React.ReactElement<
TableHeaderProps
>[];
export const defaultHeaderRenderer: () => React.ReactElement<TableHeaderProps>[];
export const defaultHeaderRowRenderer: TableHeaderRowRenderer;
export const defaultRowRenderer: TableRowRenderer;
@ -353,18 +341,18 @@ export type SortDirectionStatic = {
* Sort items in ascending order.
* This means arranging from the lowest value to the highest (e.g. a-z, 0-9).
*/
ASC: "ASC";
ASC: 'ASC';
/**
* Sort items in descending order.
* This means arranging from the highest value to the lowest (e.g. z-a, 9-0).
*/
DESC: "DESC";
DESC: 'DESC';
};
export const SortDirection: SortDirectionStatic;
export type SortDirectionType = "ASC" | "DESC";
export type SortDirectionType = 'ASC' | 'DESC';
export const SortIndicator: React.StatelessComponent<{
sortDirection?: SortDirectionType;
@ -376,7 +364,7 @@ export const SortIndicator: React.StatelessComponent<{
*/
export class Table extends PureComponent<TableProps> {
static propTypes: {
"aria-label": Requireable<string>;
'aria-label': Requireable<string>;
autoHeight: Requireable<boolean>;
children: Validator<Column>;
className: Requireable<string>;
@ -391,22 +379,12 @@ export class Table extends PureComponent<TableProps> {
height: Validator<number>;
id: Requireable<string>;
noRowsRenderer: Requireable<() => JSX.Element>;
onHeaderClick: Requireable<
(params: HeaderMouseEventHandlerParams) => void
>;
onHeaderClick: Requireable<(params: HeaderMouseEventHandlerParams) => void>;
onRowClick: Requireable<(params: RowMouseEventHandlerParams) => void>;
onRowDoubleClick: Requireable<
(params: RowMouseEventHandlerParams) => void
>;
onRowMouseOut: Requireable<
(params: RowMouseEventHandlerParams) => void
>;
onRowMouseOver: Requireable<
(params: RowMouseEventHandlerParams) => void
>;
onRowsRendered: Requireable<
(params: IndexRange & OverscanIndexRange) => void
>;
onRowDoubleClick: Requireable<(params: RowMouseEventHandlerParams) => void>;
onRowMouseOut: Requireable<(params: RowMouseEventHandlerParams) => void>;
onRowMouseOver: Requireable<(params: RowMouseEventHandlerParams) => void>;
onRowsRendered: Requireable<(params: IndexRange & OverscanIndexRange) => void>;
onScroll: Requireable<(params: ScrollEventData) => void>;
overscanRowCount: Validator<number>;
rowClassName: Requireable<string | ((params: Index) => string)>;
@ -414,17 +392,11 @@ export class Table extends PureComponent<TableProps> {
rowHeight: Validator<number | ((params: Index) => number)>;
rowCount: Validator<number>;
rowRenderer: Requireable<(props: TableRowProps) => React.ReactNode>;
rowStyle: Validator<
React.CSSProperties | ((params: Index) => React.CSSProperties)
>;
rowStyle: Validator<React.CSSProperties | ((params: Index) => React.CSSProperties)>;
scrollToAlignment: Validator<Alignment>;
scrollToIndex: Validator<number>;
scrollTop: Requireable<number>;
sort: Requireable<
(
params: { sortBy: string; sortDirection: SortDirectionType }
) => void
>;
sort: Requireable<(params: { sortBy: string; sortDirection: SortDirectionType }) => void>;
sortBy: Requireable<string>;
sortDirection: Validator<SortDirectionType>;
style: Requireable<React.CSSProperties>;
@ -444,7 +416,7 @@ export class Table extends PureComponent<TableProps> {
rowRenderer: TableRowRenderer;
headerRowRenderer: TableHeaderRowRenderer;
rowStyle: {};
scrollToAlignment: "auto";
scrollToAlignment: 'auto';
scrollToIndex: -1;
style: {};
};

View File

@ -15,21 +15,16 @@ export {
ArrowKeyStepper,
ArrowKeyStepperProps,
ChildProps as ArrowKeyStepperChildProps,
ScrollIndices
} from "./dist/es/ArrowKeyStepper";
export {
AutoSizer,
AutoSizerProps,
Dimensions,
Size
} from "./dist/es/AutoSizer";
ScrollIndices,
} from './dist/es/ArrowKeyStepper';
export { AutoSizer, AutoSizerProps, Dimensions, Size } from './dist/es/AutoSizer';
export {
CellMeasurer,
CellMeasurerCache,
CellMeasurerCacheParams,
CellMeasurerProps,
KeyMapper
} from "./dist/es/CellMeasurer";
KeyMapper,
} from './dist/es/CellMeasurer';
export {
Collection,
CollectionCellGroupRenderer,
@ -38,13 +33,9 @@ export {
CollectionCellRendererParams,
CollectionCellSizeAndPosition,
CollectionCellSizeAndPositionGetter,
CollectionProps
} from "./dist/es/Collection";
export {
ColumnSizer,
ColumnSizerProps,
SizedColumnProps
} from "./dist/es/ColumnSizer";
CollectionProps,
} from './dist/es/Collection';
export { ColumnSizer, ColumnSizerProps, SizedColumnProps } from './dist/es/ColumnSizer';
export {
accessibilityOverscanIndicesGetter,
defaultOverscanIndicesGetter,
@ -67,14 +58,10 @@ export {
SectionRenderedParams,
SizeAndPositionData,
VisibleCellRange,
ScrollbarPresenceParams
} from "./dist/es/Grid";
export {
InfiniteLoader,
InfiniteLoaderChildProps,
InfiniteLoaderProps
} from "./dist/es/InfiniteLoader";
export { List, ListProps, ListRowProps, ListRowRenderer } from "./dist/es/List";
ScrollbarPresenceParams,
} from './dist/es/Grid';
export { InfiniteLoader, InfiniteLoaderChildProps, InfiniteLoaderProps } from './dist/es/InfiniteLoader';
export { List, ListProps, ListRowProps, ListRowRenderer } from './dist/es/List';
export {
createCellPositioner as createMasonryCellPositioner,
Masonry,
@ -85,16 +72,16 @@ export {
OnCellsRenderedCallback,
OnScrollCallback,
Position,
Positioner
} from "./dist/es/Masonry";
export { MultiGrid, MultiGridProps, MultiGridState } from "./dist/es/MultiGrid";
Positioner,
} from './dist/es/Masonry';
export { MultiGrid, MultiGridProps, MultiGridState } from './dist/es/MultiGrid';
export {
ScrollSync,
OnScrollParams,
ScrollSyncChildProps,
ScrollSyncProps,
ScrollSyncState
} from "./dist/es/ScrollSync";
ScrollSyncState,
} from './dist/es/ScrollSync';
export {
createMultiSort as createTableMultiSort,
defaultCellDataGetter as defaultTableCellDataGetter,
@ -121,15 +108,15 @@ export {
TableProps,
TableRowProps,
TableRowRenderer,
SortParams
} from "./dist/es/Table";
SortParams,
} from './dist/es/Table';
export {
WindowScroller,
WindowScrollerChildProps,
WindowScrollerProps,
WindowScrollerState,
IS_SCROLLING_TIMEOUT
} from "./dist/es/WindowScroller";
IS_SCROLLING_TIMEOUT,
} from './dist/es/WindowScroller';
export type Index = {
index: number;
@ -154,7 +141,7 @@ export type SizeAndPositionInfo = SizeInfo & PositionInfo;
export type Map<T> = { [key: string]: T };
export type Alignment = "auto" | "end" | "start" | "center";
export type Alignment = 'auto' | 'end' | 'start' | 'center';
export type IndexRange = {
startIndex: number;

File diff suppressed because it is too large Load Diff