diff --git a/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts b/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts index fd16c58feb..6cd9604575 100644 --- a/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts +++ b/types/react-virtualized/dist/commonjs/ArrowKeyStepper.d.ts @@ -1 +1 @@ -export * from '../es/ArrowKeyStepper'; \ No newline at end of file +export * from '../es/ArrowKeyStepper'; diff --git a/types/react-virtualized/dist/commonjs/AutoSizer.d.ts b/types/react-virtualized/dist/commonjs/AutoSizer.d.ts index c0551a98a4..6d16fa0c45 100644 --- a/types/react-virtualized/dist/commonjs/AutoSizer.d.ts +++ b/types/react-virtualized/dist/commonjs/AutoSizer.d.ts @@ -1 +1 @@ -export * from '../es/AutoSizer'; \ No newline at end of file +export * from '../es/AutoSizer'; diff --git a/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts b/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts index 907eafee51..77f4abea84 100644 --- a/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts +++ b/types/react-virtualized/dist/commonjs/CellMeasurer.d.ts @@ -1 +1 @@ -export * from '../es/CellMeasurer'; \ No newline at end of file +export * from '../es/CellMeasurer'; diff --git a/types/react-virtualized/dist/commonjs/Collection.d.ts b/types/react-virtualized/dist/commonjs/Collection.d.ts index 2764686c76..e4905c3eee 100644 --- a/types/react-virtualized/dist/commonjs/Collection.d.ts +++ b/types/react-virtualized/dist/commonjs/Collection.d.ts @@ -1 +1 @@ -export * from '../es/Collection'; \ No newline at end of file +export * from '../es/Collection'; diff --git a/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts b/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts index 80c9cf5d2e..1c42d3b94b 100644 --- a/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts +++ b/types/react-virtualized/dist/commonjs/ColumnSizer.d.ts @@ -1 +1 @@ -export * from '../es/ColumnSizer'; \ No newline at end of file +export * from '../es/ColumnSizer'; diff --git a/types/react-virtualized/dist/commonjs/Grid.d.ts b/types/react-virtualized/dist/commonjs/Grid.d.ts index 168a11ac52..6834f9b47d 100644 --- a/types/react-virtualized/dist/commonjs/Grid.d.ts +++ b/types/react-virtualized/dist/commonjs/Grid.d.ts @@ -1 +1 @@ -export * from '../es/Grid'; \ No newline at end of file +export * from '../es/Grid'; diff --git a/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts b/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts index 29449c85ff..d4614b32d7 100644 --- a/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts +++ b/types/react-virtualized/dist/commonjs/InfiniteLoader.d.ts @@ -1 +1 @@ -export * from '../es/InfiniteLoader'; \ No newline at end of file +export * from '../es/InfiniteLoader'; diff --git a/types/react-virtualized/dist/commonjs/List.d.ts b/types/react-virtualized/dist/commonjs/List.d.ts index 6fdfde2dc0..8a174d91e2 100644 --- a/types/react-virtualized/dist/commonjs/List.d.ts +++ b/types/react-virtualized/dist/commonjs/List.d.ts @@ -1 +1 @@ -export * from '../es/List'; \ No newline at end of file +export * from '../es/List'; diff --git a/types/react-virtualized/dist/commonjs/Masonry.d.ts b/types/react-virtualized/dist/commonjs/Masonry.d.ts index e5189fb5f9..fc2768d7b7 100644 --- a/types/react-virtualized/dist/commonjs/Masonry.d.ts +++ b/types/react-virtualized/dist/commonjs/Masonry.d.ts @@ -1 +1 @@ -export * from '../es/Masonry'; \ No newline at end of file +export * from '../es/Masonry'; diff --git a/types/react-virtualized/dist/commonjs/MultiGrid.d.ts b/types/react-virtualized/dist/commonjs/MultiGrid.d.ts index 09f385eca4..7504908682 100644 --- a/types/react-virtualized/dist/commonjs/MultiGrid.d.ts +++ b/types/react-virtualized/dist/commonjs/MultiGrid.d.ts @@ -1 +1 @@ -export * from '../es/MultiGrid'; \ No newline at end of file +export * from '../es/MultiGrid'; diff --git a/types/react-virtualized/dist/commonjs/ScrollSync.d.ts b/types/react-virtualized/dist/commonjs/ScrollSync.d.ts index ffb4423c0a..2e9ec08a4d 100644 --- a/types/react-virtualized/dist/commonjs/ScrollSync.d.ts +++ b/types/react-virtualized/dist/commonjs/ScrollSync.d.ts @@ -1 +1 @@ -export * from '../es/ScrollSync'; \ No newline at end of file +export * from '../es/ScrollSync'; diff --git a/types/react-virtualized/dist/commonjs/Table.d.ts b/types/react-virtualized/dist/commonjs/Table.d.ts index db2670ceda..c710f4050c 100644 --- a/types/react-virtualized/dist/commonjs/Table.d.ts +++ b/types/react-virtualized/dist/commonjs/Table.d.ts @@ -1 +1 @@ -export * from '../es/Table'; \ No newline at end of file +export * from '../es/Table'; diff --git a/types/react-virtualized/dist/commonjs/WindowScroller.d.ts b/types/react-virtualized/dist/commonjs/WindowScroller.d.ts index 0380f0a4fb..51cd1f6ac0 100644 --- a/types/react-virtualized/dist/commonjs/WindowScroller.d.ts +++ b/types/react-virtualized/dist/commonjs/WindowScroller.d.ts @@ -1 +1 @@ -export * from '../es/WindowScroller'; \ No newline at end of file +export * from '../es/WindowScroller'; diff --git a/types/react-virtualized/dist/es/AutoSizer.d.ts b/types/react-virtualized/dist/es/AutoSizer.d.ts index 6d82a44482..ea72c43c1e 100644 --- a/types/react-virtualized/dist/es/AutoSizer.d.ts +++ b/types/react-virtualized/dist/es/AutoSizer.d.ts @@ -19,10 +19,10 @@ export type AutoSizerProps = { export class AutoSizer extends PureComponent { static propTypes: { /** - * Function responsible for rendering children. - * This function should implement the following signature: - * ({ height, width }) => PropTypes.element - */ + * Function responsible for rendering children. + * This function should implement the following signature: + * ({ height, width }) => PropTypes.element + */ children: Validator<(props: Dimensions) => React.ReactNode>, /** Disable dynamic :height property */ @@ -36,7 +36,7 @@ export class AutoSizer extends PureComponent { }; static defaultProps: { - onResize: () => { } + onResize: () => {} }; constructor(props: AutoSizerProps); diff --git a/types/react-virtualized/dist/es/Grid.d.ts b/types/react-virtualized/dist/es/Grid.d.ts index b68cf45956..7fcd0d1314 100644 --- a/types/react-virtualized/dist/es/Grid.d.ts +++ b/types/react-virtualized/dist/es/Grid.d.ts @@ -75,16 +75,16 @@ export type CellSizeAndPositionManager = { 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. - */ + * 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. + */ getSizeAndPositionOfCell(index: number): SizeAndPositionData; getSizeAndPositionOfLastMeasuredCell(): SizeAndPositionData; /** - * Total size of all cells being measured. - * This value will be completedly estimated initially. - * As cells as measured the estimate will be updated. - */ + * Total size of all cells being measured. + * This value will be completedly estimated initially. + * As cells as measured the estimate will be updated. + */ getTotalSize(): number; /** * Determines a new offset that ensures a certain cell is visible, given the current offset. @@ -202,7 +202,7 @@ export class Grid extends PureComponent { * Responsible for rendering a cell given an row and column index. * Should implement the following interface: ({ columnIndex: number, rowIndex: number }): PropTypes.node */ - cellRenderer: Validator< (props: GridCellProps) => React.ReactNode>, + cellRenderer: Validator<(props: GridCellProps) => React.ReactNode>, /** * Responsible for rendering a group of cells given their index ranges. @@ -458,4 +458,4 @@ export class Grid extends PureComponent { render(): JSX.Element; } -export const defaultCellRangeRenderer: GridCellRangeRenderer; \ No newline at end of file +export const defaultCellRangeRenderer: GridCellRangeRenderer; diff --git a/types/react-virtualized/dist/es/Masonry.d.ts b/types/react-virtualized/dist/es/Masonry.d.ts index 51c59a90fc..eb44635978 100644 --- a/types/react-virtualized/dist/es/Masonry.d.ts +++ b/types/react-virtualized/dist/es/Masonry.d.ts @@ -83,7 +83,6 @@ export type MasonryState = { * (Items may not span multiple columns.) */ export class Masonry extends PureComponent { - static defaultProps: { autoHeight: false, keyMapper: identity, @@ -140,6 +139,6 @@ export type resetParams = { spacer?: number }; -export type Positioner = ((index: number) => Position) & {reset: (params: resetParams) => void}; +export type Positioner = ((index: number) => Position) & { reset: (params: resetParams) => void }; -export const createCellPositioner: (params: createCellPositionerParams) => Positioner; \ No newline at end of file +export const createCellPositioner: (params: createCellPositionerParams) => Positioner; diff --git a/types/react-virtualized/dist/es/ScrollSync.d.ts b/types/react-virtualized/dist/es/ScrollSync.d.ts index 4f1e924a69..d244262d25 100644 --- a/types/react-virtualized/dist/es/ScrollSync.d.ts +++ b/types/react-virtualized/dist/es/ScrollSync.d.ts @@ -48,4 +48,4 @@ export class ScrollSync extends PureComponent constructor(props: ScrollSyncProps, context: any); render(): JSX.Element; -} \ No newline at end of file +} diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts index 6607211dcf..118215f4fa 100644 --- a/types/react-virtualized/dist/es/Table.d.ts +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -33,7 +33,7 @@ export type TableHeaderRowProps = { }; export type TableRowProps = { className: string, - columns: Array, + columns: any[], index: number, isScrolling: boolean, onRowClick?: (params: RowMouseEventHandlerParams) => void, @@ -198,7 +198,7 @@ export type TableProps = { export const defaultTableCellDataGetter: TableCellDataGetter; export const defaultTableCellRenderer: TableCellRenderer; -export const defaultTableHeaderRenderer: () => React.ReactElement[]; +export const defaultTableHeaderRenderer: () => Array>; export const defaultTableHeaderRowRenderer: TableHeaderRowRenderer; export const defaultTableRowRenderer: TableRowRenderer; @@ -286,9 +286,9 @@ export class Table extends PureComponent { noRowsRenderer: Requireable<() => JSX.Element>, /** - * Optional callback when a column's header is clicked. - * ({ columnData: any, dataKey: string }): void - */ + * Optional callback when a column's header is clicked. + * ({ columnData: any, dataKey: string }): void + */ onHeaderClick: Requireable<(params: HeaderMouseEventHandlerParams) => void>, /** diff --git a/types/react-virtualized/index.d.ts b/types/react-virtualized/index.d.ts index d6860176ed..2440e1dcf3 100644 --- a/types/react-virtualized/index.d.ts +++ b/types/react-virtualized/index.d.ts @@ -164,4 +164,4 @@ export type ScrollEventData = { clientHeight: number, scrollHeight: number, scrollTop: number -} \ No newline at end of file +} diff --git a/types/react-virtualized/react-virtualized-tests.tsx b/types/react-virtualized/react-virtualized-tests.tsx index 71386b2780..18de45e25a 100644 --- a/types/react-virtualized/react-virtualized-tests.tsx +++ b/types/react-virtualized/react-virtualized-tests.tsx @@ -113,7 +113,7 @@ export class AutoSizerExample extends PureComponent { ) } } -import { } from 'react' +import { } from 'react' import { CellMeasurer, CellMeasurerCache } from 'react-virtualized' export class DynamicHeightList extends PureComponent { @@ -194,7 +194,6 @@ const GUTTER_SIZE = 3 const CELL_WIDTH = 75 export class CollectionExample extends PureComponent { - _columnYMap: any; constructor(props, context) { @@ -457,8 +456,6 @@ export class ColumnSizerExample extends PureComponent { } export class GridExample extends PureComponent { - - constructor(props, context) { super(props, context) @@ -731,7 +728,7 @@ export class InfiniteLoaderExample extends PureComponent { const { loadedRowsMap, loadingRowCount } = this.state const increment = stopIndex - startIndex + 1 - for (var i = startIndex; i <= stopIndex; i++) { + for (let i = startIndex; i <= stopIndex; i++) { loadedRowsMap[i] = STATUS_LOADING } @@ -744,7 +741,7 @@ export class InfiniteLoaderExample extends PureComponent { delete this._timeoutIdMap[timeoutId] - for (var i = startIndex; i <= stopIndex; i++) { + for (let i = startIndex; i <= stopIndex; i++) { loadedRowsMap[i] = STATUS_LOADED } @@ -1251,7 +1248,7 @@ export class MultiGridExample extends PureComponent { } } -import {ScrollSync } from 'react-virtualized' +import { ScrollSync } from 'react-virtualized' const LEFT_COLOR_FROM = hexToRgb('#471061') const LEFT_COLOR_TO = hexToRgb('#BC3959') @@ -1532,59 +1529,59 @@ export class TableExample extends PureComponent { const rowGetter = ({ index }) => this._getDatum(sortedList, index) return ( -
- - {({ width }) => ( - - {!hideIndexRow && - rowData.index - } - dataKey='index' - disableSort={!this._isSortEnabled()} - width={60} - /> - } +
+ + {({ width }) => ( +
+ {!hideIndexRow && - cellData + label='Index' + cellDataGetter={ + ({ columnData, dataKey, rowData }) => rowData.index } - flexGrow={1} + dataKey='index' + disableSort={!this._isSortEnabled()} + width={60} /> -
- )} -
-
+ } + + cellData + } + flexGrow={1} + /> + + )} + + ) } diff --git a/types/react-virtualized/tslint.json b/types/react-virtualized/tslint.json index 2221e40e4a..65f4cad455 100644 --- a/types/react-virtualized/tslint.json +++ b/types/react-virtualized/tslint.json @@ -1 +1,12 @@ -{ "extends": "../tslint.json" } \ No newline at end of file +{ + "extends": "../tslint.json", + "rules": { + "interface-over-type-literal": false, + "semicolon": [ + false + ], + "prefer-method-signature": false, + "prefer-declare-function": false, + "no-padding": false + } +} \ No newline at end of file