@types/react-data-grid
Advanced tools
+122
-131
@@ -13,6 +13,5 @@ // Type definitions for react-data-grid 2.0 | ||
| declare namespace AdazzleReactDataGrid { | ||
| interface SelectionParams { | ||
| rowIdx: number, | ||
| row: any | ||
| rowIdx: number; | ||
| row: any; | ||
| } | ||
@@ -25,11 +24,11 @@ | ||
| */ | ||
| rowGetter: Array<object> | ((rowIdx: number) => object) | ||
| rowGetter: Array<object> | ((rowIdx: number) => object); | ||
| /** | ||
| * The total number of rows to render. Required. | ||
| */ | ||
| rowsCount: number | ||
| rowsCount: number; | ||
| /** | ||
| * The columns to render. | ||
| */ | ||
| columns?: Array<Column> | undefined | ||
| columns?: Array<Column> | undefined; | ||
@@ -41,3 +40,3 @@ /** | ||
| */ | ||
| onRowUpdated?: ((e: RowUpdateEvent) => void) | undefined | ||
| onRowUpdated?: ((e: RowUpdateEvent) => void) | undefined; | ||
| /** | ||
@@ -48,3 +47,3 @@ * Invoked when the user pulls down the drag handle of an editable cell. | ||
| */ | ||
| onCellsDragged?: ((e: CellDragEvent) => void) | undefined | ||
| onCellsDragged?: ((e: CellDragEvent) => void) | undefined; | ||
| /** | ||
@@ -55,3 +54,3 @@ * Invoked when the user double clicks on the drag handle of an editable cell. | ||
| */ | ||
| onDragHandleDoubleClick?: ((e: DragHandleDoubleClickEvent) => void) | undefined | ||
| onDragHandleDoubleClick?: ((e: DragHandleDoubleClickEvent) => void) | undefined; | ||
| /** | ||
@@ -62,3 +61,3 @@ * Invoked when the user copies a value from one cell and pastes it into another (in the same column). | ||
| */ | ||
| onCellCopyPaste?: ((e: CellCopyPasteEvent) => void) | undefined | ||
| onCellCopyPaste?: ((e: CellCopyPasteEvent) => void) | undefined; | ||
| /** | ||
@@ -68,3 +67,3 @@ * Invoked after the user updates the grid rows in any way. | ||
| */ | ||
| onGridRowsUpdated?: ((e: GridRowsUpdatedEvent) => void) | undefined | ||
| onGridRowsUpdated?: ((e: GridRowsUpdatedEvent) => void) | undefined; | ||
@@ -75,3 +74,3 @@ /** | ||
| */ | ||
| toolbar?: React.ReactElement | undefined | ||
| toolbar?: React.ReactElement | undefined; | ||
| /** | ||
@@ -81,3 +80,3 @@ * A context menu to disiplay when the user right-clicks a cell. | ||
| */ | ||
| contextMenu?: React.ReactElement | undefined | ||
| contextMenu?: React.ReactElement | undefined; | ||
| /** | ||
@@ -87,7 +86,7 @@ * A react component to customize how rows are rendered. | ||
| */ | ||
| rowRenderer?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined | ||
| rowRenderer?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined; | ||
| /** | ||
| * A component to display when there are no rows to render. | ||
| */ | ||
| emptyRowsView?: React.ComponentClass<any> | React.FunctionComponent<any> | undefined | ||
| emptyRowsView?: React.ComponentClass<any> | React.FunctionComponent<any> | undefined; | ||
@@ -97,3 +96,3 @@ /** | ||
| */ | ||
| minWidth?: number | undefined | ||
| minWidth?: number | undefined; | ||
| /** | ||
@@ -103,3 +102,3 @@ * The minimum height of the entire grid in pixels. | ||
| */ | ||
| minHeight?: number | undefined | ||
| minHeight?: number | undefined; | ||
| /** | ||
@@ -109,3 +108,3 @@ * The height of each individual row in pixels. | ||
| */ | ||
| rowHeight?: number | undefined | ||
| rowHeight?: number | undefined; | ||
| /** | ||
@@ -115,3 +114,3 @@ * The height of the header row in pixels. | ||
| */ | ||
| headerRowHeight?: number | undefined | ||
| headerRowHeight?: number | undefined; | ||
| /** | ||
@@ -121,3 +120,3 @@ * The height of the header filter row in pixels. | ||
| */ | ||
| headerFiltersHeight?: number | undefined | ||
| headerFiltersHeight?: number | undefined; | ||
| /** | ||
@@ -127,3 +126,3 @@ * The minimum width of each column in pixels. | ||
| */ | ||
| minColumnWidth?: number | undefined | ||
| minColumnWidth?: number | undefined; | ||
| /** | ||
@@ -134,3 +133,3 @@ * Invoked when a column has been resized. | ||
| */ | ||
| onColumnResize?: ((index: number, width: number) => void) | undefined | ||
| onColumnResize?: ((index: number, width: number) => void) | undefined; | ||
@@ -144,3 +143,3 @@ /** | ||
| */ | ||
| cellNavigationMode?: 'none' | 'loopOverRow' | 'changeRow' | undefined | ||
| cellNavigationMode?: "none" | "loopOverRow" | "changeRow" | undefined; | ||
@@ -153,3 +152,3 @@ /** | ||
| */ | ||
| onGridSort?: ((sortColumn: string, sortDirection: 'ASC' | 'DESC' | 'NONE') => void) | undefined | ||
| onGridSort?: ((sortColumn: string, sortDirection: "ASC" | "DESC" | "NONE") => void) | undefined; | ||
@@ -159,3 +158,3 @@ /** | ||
| */ | ||
| sortDirection?: 'ASC' | 'DESC' | 'NONE' | undefined | ||
| sortDirection?: "ASC" | "DESC" | "NONE" | undefined; | ||
@@ -165,3 +164,3 @@ /** | ||
| */ | ||
| sortColumn?: string | undefined | ||
| sortColumn?: string | undefined; | ||
@@ -173,3 +172,3 @@ /** | ||
| */ | ||
| onAddFilter?: ((filter: Filter) => void) | undefined | ||
| onAddFilter?: ((filter: Filter) => void) | undefined; | ||
| /** | ||
@@ -179,3 +178,3 @@ * Called when the user clears all filters. | ||
| */ | ||
| onClearFilters?: (() => void) | undefined | ||
| onClearFilters?: (() => void) | undefined; | ||
@@ -188,3 +187,3 @@ /** | ||
| */ | ||
| enableRowSelect?: boolean | 'single' | 'multi' | undefined | ||
| enableRowSelect?: boolean | "single" | "multi" | undefined; | ||
| /** | ||
@@ -194,3 +193,3 @@ * Called when a row is selected. | ||
| */ | ||
| onRowSelect?: ((rows: Array<object>) => void) | undefined | ||
| onRowSelect?: ((rows: Array<object>) => void) | undefined; | ||
| /** | ||
@@ -201,3 +200,3 @@ * A property that's unique to every row. | ||
| */ | ||
| rowKey?: string | undefined | ||
| rowKey?: string | undefined; | ||
@@ -208,3 +207,3 @@ /** | ||
| */ | ||
| enableCellSelect?: boolean | undefined | ||
| enableCellSelect?: boolean | undefined; | ||
@@ -215,3 +214,3 @@ /** | ||
| */ | ||
| enableDragAndDrop?: boolean | undefined | ||
| enableDragAndDrop?: boolean | undefined; | ||
@@ -222,3 +221,3 @@ /** | ||
| */ | ||
| onCellSelected?: ((coordinates: {rowIdx: number, idx: number}) => void) | undefined | ||
| onCellSelected?: ((coordinates: { rowIdx: number; idx: number }) => void) | undefined; | ||
| /** | ||
@@ -228,3 +227,3 @@ * Called when a cell is deselected. | ||
| */ | ||
| onCellDeSelected?: ((coordinates: {rowIdx: number, idx: number}) => void) | undefined | ||
| onCellDeSelected?: ((coordinates: { rowIdx: number; idx: number }) => void) | undefined; | ||
@@ -235,3 +234,3 @@ /** | ||
| */ | ||
| rowScrollTimeout?: number | undefined | ||
| rowScrollTimeout?: number | undefined; | ||
| /** | ||
@@ -241,12 +240,12 @@ * Options object for selecting rows | ||
| rowSelection?: { | ||
| showCheckbox?: boolean | undefined | ||
| enableShiftSelect?: boolean | undefined | ||
| onRowsSelected?: ((rows: Array<SelectionParams>) => void) | undefined, | ||
| onRowsDeselected?: ((rows: Array<SelectionParams>) => void) | undefined, | ||
| showCheckbox?: boolean | undefined; | ||
| enableShiftSelect?: boolean | undefined; | ||
| onRowsSelected?: ((rows: Array<SelectionParams>) => void) | undefined; | ||
| onRowsDeselected?: ((rows: Array<SelectionParams>) => void) | undefined; | ||
| selectBy?: { | ||
| indexes?: Array<number> | undefined; | ||
| keys?: { rowKey: string, values: Array<any> } | undefined; | ||
| keys?: { rowKey: string; values: Array<any> } | undefined; | ||
| isSelectedKey?: string | undefined; | ||
| } | undefined | ||
| } | undefined | ||
| } | undefined; | ||
| } | undefined; | ||
| /** | ||
@@ -268,3 +267,3 @@ * A custom formatter for the select all checkbox cell | ||
| */ | ||
| onRowClick?: ((rowIdx: number, row: object) => void) | undefined | ||
| onRowClick?: ((rowIdx: number, row: object) => void) | undefined; | ||
@@ -277,3 +276,3 @@ /** | ||
| */ | ||
| onRowDoubleClick?: ((rowIdx : number, row : object) => void) | undefined | ||
| onRowDoubleClick?: ((rowIdx: number, row: object) => void) | undefined; | ||
@@ -284,3 +283,3 @@ /** | ||
| */ | ||
| onRowExpandToggle?: ((props: OnRowExpandToggle ) => void) | undefined | ||
| onRowExpandToggle?: ((props: OnRowExpandToggle) => void) | undefined; | ||
@@ -293,5 +292,5 @@ /** | ||
| */ | ||
| getValidFilterValues?: ((columnKey: string) => Array<any>) | undefined | ||
| getValidFilterValues?: ((columnKey: string) => Array<any>) | undefined; | ||
| getCellActions?: ((column: Column, row: object) => (ActionButton | ActionMenu)[]) | undefined | ||
| getCellActions?: ((column: Column, row: object) => (ActionButton | ActionMenu)[]) | undefined; | ||
| } | ||
@@ -301,4 +300,4 @@ | ||
| icon: string; | ||
| callback: () => void; | ||
| } | ||
| callback: () => void; | ||
| }; | ||
@@ -312,3 +311,3 @@ type ActionMenu = { | ||
| }[]; | ||
| } | ||
| }; | ||
@@ -323,7 +322,7 @@ /** | ||
| */ | ||
| key: string | ||
| key: string; | ||
| /** | ||
| * This column's display name. Required. | ||
| */ | ||
| name: string | ||
| name: string; | ||
| /** | ||
@@ -333,3 +332,3 @@ * A custom width for this specific column. | ||
| */ | ||
| width?: number | undefined | ||
| width?: number | undefined; | ||
| /** | ||
@@ -339,3 +338,3 @@ * Whether this column can be resized by the user. | ||
| */ | ||
| resizable?: boolean | undefined | ||
| resizable?: boolean | undefined; | ||
| /** | ||
@@ -345,3 +344,3 @@ * Whether this column should stay fixed on the left as the user scrolls horizontally. | ||
| */ | ||
| locked?: boolean | undefined | ||
| locked?: boolean | undefined; | ||
| /** | ||
@@ -351,3 +350,3 @@ * Whether this column can be edited. | ||
| */ | ||
| editable?: boolean | undefined | ||
| editable?: boolean | undefined; | ||
| /** | ||
@@ -357,3 +356,3 @@ * Whether the rows in the grid can be sorted by this column. | ||
| */ | ||
| sortable?: boolean | undefined | ||
| sortable?: boolean | undefined; | ||
| /** | ||
@@ -372,11 +371,11 @@ * Whether the rows in the grid can be filtered by this column. | ||
| */ | ||
| editor?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined | ||
| editor?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined; | ||
| /** | ||
| * A custom read-only formatter for this column. An image formatter is available in "react-data-grid/addons". | ||
| */ | ||
| formatter?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined | ||
| formatter?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined; | ||
| /** | ||
| * A custom formatter for this column's header. | ||
| */ | ||
| headerRenderer?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined | ||
| headerRenderer?: React.ReactElement | React.ComponentClass<any> | React.FunctionComponent<any> | undefined; | ||
| /** | ||
@@ -389,4 +388,4 @@ * Events to be bound to the cells in this specific column. | ||
| events?: { | ||
| [name: string]: ColumnEventCallback | ||
| } | undefined | ||
| [name: string]: ColumnEventCallback; | ||
| } | undefined; | ||
| /** | ||
@@ -413,3 +412,3 @@ * Retrieve meta data about the row, optionally provide column as a second argument | ||
| */ | ||
| (ev: React.SyntheticEvent<any>, args: {rowIdx: number, idx: number, name: string}): void | ||
| (ev: React.SyntheticEvent<any>, args: { rowIdx: number; idx: number; name: string }): void; | ||
| } | ||
@@ -424,15 +423,15 @@ | ||
| */ | ||
| rowIdx: number | ||
| rowIdx: number; | ||
| /** | ||
| * The columns that were updated and their values. | ||
| */ | ||
| updated: object | ||
| updated: object; | ||
| /** | ||
| * The name of the column that was updated. | ||
| */ | ||
| cellKey: string | ||
| cellKey: string; | ||
| /** | ||
| * The name of the key pressed to trigger the event ('Tab', 'Enter', etc.). | ||
| */ | ||
| key: string | ||
| key: string; | ||
| } | ||
@@ -447,15 +446,15 @@ | ||
| */ | ||
| cellKey: string | ||
| cellKey: string; | ||
| /** | ||
| * The row where the drag began. | ||
| */ | ||
| fromRow: number | ||
| fromRow: number; | ||
| /** | ||
| * The row where the drag ended. | ||
| */ | ||
| toRow: number | ||
| toRow: number; | ||
| /** | ||
| * The value of the cell that was dragged. | ||
| */ | ||
| value: any | ||
| value: any; | ||
| } | ||
@@ -470,15 +469,15 @@ | ||
| */ | ||
| rowIdx: number | ||
| rowIdx: number; | ||
| /** | ||
| * The column where the double click occurred. | ||
| */ | ||
| idx: number | ||
| idx: number; | ||
| /** | ||
| * The values of the row. | ||
| */ | ||
| rowData: object | ||
| rowData: object; | ||
| /** | ||
| * The double click event. | ||
| */ | ||
| e: React.SyntheticEvent<any> | ||
| e: React.SyntheticEvent<any>; | ||
| } | ||
@@ -493,19 +492,19 @@ | ||
| */ | ||
| rowIdx: number | ||
| rowIdx: number; | ||
| /** | ||
| * The value that was pasted. | ||
| */ | ||
| value: any | ||
| value: any; | ||
| /** | ||
| * The row that was copied from. | ||
| */ | ||
| fromRow: number | ||
| fromRow: number; | ||
| /** | ||
| * The row that was pasted to. | ||
| */ | ||
| toRow: number | ||
| toRow: number; | ||
| /** | ||
| * The key of the column where the copy paste occurred. | ||
| */ | ||
| cellKey: string | ||
| cellKey: string; | ||
| } | ||
@@ -520,15 +519,15 @@ | ||
| */ | ||
| cellKey: string | ||
| cellKey: string; | ||
| /** | ||
| * The top row affected by the event. | ||
| */ | ||
| fromRow: number | ||
| fromRow: number; | ||
| /** | ||
| * The bottom row affected by the event. | ||
| */ | ||
| toRow: number | ||
| toRow: number; | ||
| /** | ||
| * The columns that were updated and their values. | ||
| */ | ||
| updated: object | ||
| updated: object; | ||
| /** | ||
@@ -538,3 +537,3 @@ * The action that occurred to trigger this event. | ||
| */ | ||
| action: 'cellUpdate' | 'cellDrag' | 'columnFill' | 'copyPaste' | ||
| action: "cellUpdate" | "cellDrag" | "columnFill" | "copyPaste"; | ||
| } | ||
@@ -549,11 +548,11 @@ | ||
| */ | ||
| columnGroupName: string | ||
| columnGroupName: string; | ||
| /** | ||
| * The name of the expanded row | ||
| */ | ||
| name: string | ||
| name: string; | ||
| /** | ||
| * If it should expand or not | ||
| */ | ||
| shouldExpand: boolean | ||
| shouldExpand: boolean; | ||
| } | ||
@@ -568,7 +567,7 @@ | ||
| */ | ||
| columnKey: string | ||
| columnKey: string; | ||
| /** | ||
| * The term to filter by. | ||
| */ | ||
| filterTerm: string | ||
| filterTerm: string; | ||
| } | ||
@@ -604,7 +603,7 @@ | ||
| */ | ||
| export class Row extends React.Component<any> { } | ||
| export class Row extends React.Component<any> {} | ||
| /** | ||
| * A react coponent that renders a cell of the grid | ||
| */ | ||
| export class Cell extends React.Component<any> { } | ||
| export class Cell extends React.Component<any> {} | ||
| } | ||
@@ -616,20 +615,20 @@ } | ||
| export namespace Editors { | ||
| export class AutoComplete extends React.Component<any> { } | ||
| export class DropDownEditor extends React.Component<any> { } | ||
| export class SimpleTextEditor extends React.Component<any> { } | ||
| export class CheckboxEditor extends React.Component<any> { } | ||
| export class AutoComplete extends React.Component<any> {} | ||
| export class DropDownEditor extends React.Component<any> {} | ||
| export class SimpleTextEditor extends React.Component<any> {} | ||
| export class CheckboxEditor extends React.Component<any> {} | ||
| } | ||
| export namespace Filters { | ||
| export class NumericFilter extends React.Component<any> { } | ||
| export class AutoCompleteFilter extends React.Component<any> { } | ||
| export class MultiSelectFilter extends React.Component<any> { } | ||
| export class SingleSelectFilter extends React.Component<any> { } | ||
| export class NumericFilter extends React.Component<any> {} | ||
| export class AutoCompleteFilter extends React.Component<any> {} | ||
| export class MultiSelectFilter extends React.Component<any> {} | ||
| export class SingleSelectFilter extends React.Component<any> {} | ||
| } | ||
| export namespace Formatters { | ||
| export class ImageFormatter extends React.Component<any> { } | ||
| export class DropDownFormatter extends React.Component<any> { } | ||
| export class ImageFormatter extends React.Component<any> {} | ||
| export class DropDownFormatter extends React.Component<any> {} | ||
| } | ||
| export class Toolbar extends React.Component<any> {} | ||
| export namespace DraggableHeader { | ||
| export class DraggableContainer extends React.Component<any>{ } | ||
| export class DraggableContainer extends React.Component<any> {} | ||
| } | ||
@@ -640,3 +639,3 @@ export namespace Data { | ||
| getSelectedRowsByKey: (state: object) => object[]; | ||
| } | ||
| }; | ||
| } | ||
@@ -646,10 +645,10 @@ // TODO: re-export the react-contextmenu typings once those exist | ||
| export namespace Menu { | ||
| export class ContextMenu extends React.Component<any> { } | ||
| export class MenuHeader extends React.Component<any> { } | ||
| export class MenuItem extends React.Component<any> { } | ||
| export class SubMenu extends React.Component<any> { } | ||
| export class ContextMenu extends React.Component<any> {} | ||
| export class MenuHeader extends React.Component<any> {} | ||
| export class MenuItem extends React.Component<any> {} | ||
| export class SubMenu extends React.Component<any> {} | ||
| export const monitor: { | ||
| getItem(): any | ||
| getPosition(): any | ||
| hideMenu(): void | ||
| getItem(): any; | ||
| getPosition(): any; | ||
| hideMenu(): void; | ||
| }; | ||
@@ -659,4 +658,4 @@ export function connect(Menu: any): any; | ||
| identifier: any, | ||
| configure?: (props: any) => any | ||
| ): (Component: any) => any | ||
| configure?: (props: any) => any, | ||
| ): (Component: any) => any; | ||
| } | ||
@@ -683,11 +682,3 @@ } | ||
| // ES6 named exports | ||
| export { | ||
| Editors, | ||
| Filters, | ||
| Formatters, | ||
| Toolbar, | ||
| Menu, | ||
| Data, | ||
| DraggableHeader | ||
| } | ||
| export { Data, DraggableHeader, Editors, Filters, Formatters, Menu, Toolbar }; | ||
@@ -698,12 +689,12 @@ // attach to window | ||
| ReactDataGridPlugins: { | ||
| Editors: typeof Editors, | ||
| Filters: typeof Filters, | ||
| Formatters: typeof Formatters, | ||
| Toolbar: typeof Toolbar, | ||
| Menu: typeof Menu, | ||
| Data: typeof Data, | ||
| DraggableHeader: typeof DraggableHeader | ||
| } | ||
| Editors: typeof Editors; | ||
| Filters: typeof Filters; | ||
| Formatters: typeof Formatters; | ||
| Toolbar: typeof Toolbar; | ||
| Menu: typeof Menu; | ||
| Data: typeof Data; | ||
| DraggableHeader: typeof DraggableHeader; | ||
| }; | ||
| } | ||
| } | ||
| } |
| { | ||
| "name": "@types/react-data-grid", | ||
| "version": "2.0.20", | ||
| "version": "2.0.21", | ||
| "description": "TypeScript definitions for react-data-grid", | ||
@@ -41,4 +41,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-data-grid", | ||
| }, | ||
| "typesPublisherContentHash": "8cfeea824cf722d1e5506b48a3c48d4895fe159851a8d2923bc91d1c0e4ebdf2", | ||
| "typeScriptVersion": "3.8" | ||
| "typesPublisherContentHash": "0d2b85950699b120c9b87982210987ba7497610bcbe92738ecda3efa31d67ed6", | ||
| "typeScriptVersion": "4.5" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Tue, 18 Jan 2022 21:31:30 GMT | ||
| * Last updated: Wed, 27 Sep 2023 07:12:04 GMT | ||
| * Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: `AdazzleReactDataGrid`, `AdazzleReactDataGridPlugins` |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
25419
0.09%598
-1.32%