Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-virtualized

Package Overview
Dependencies
Maintainers
3
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtualized - npm Package Compare versions

Comparing version 9.20.1 to 9.21.0

source/styles.css

17

dist/commonjs/Table/createMultiSort.js

@@ -6,3 +6,11 @@ 'use strict';

});
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
exports.default = createMultiSort;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createMultiSort(sortCallback) {

@@ -46,5 +54,14 @@ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},

} else {
// Clear sortBy array of all non-selected keys
sortBy.length = 0;
sortBy.push(dataKey);
// Clear sortDirection object of all non-selected keys
var sortDirectionKeys = (0, _keys2.default)(sortDirection);
sortDirectionKeys.forEach(function (key) {
if (key !== dataKey) delete sortDirection[key];
});
// If key is already selected, reverse sort direction.
// Else, set sort direction to default direction.
if (sortDirection.hasOwnProperty(dataKey)) {

@@ -51,0 +68,0 @@ sortDirection[dataKey] = sortDirection[dataKey] === 'ASC' ? 'DESC' : 'ASC';

2

dist/commonjs/Table/defaultRowRenderer.js

@@ -43,3 +43,3 @@ 'use strict';

var a11yProps = {};
var a11yProps = { 'aria-rowindex': index + 1 };

@@ -46,0 +46,0 @@ if (onRowClick || onRowDoubleClick || onRowMouseOut || onRowMouseOver || onRowRightClick) {

@@ -261,2 +261,6 @@ 'use strict';

{
'aria-label': this.props['aria-label'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-colcount': React.Children.toArray(children).length,
'aria-rowcount': this.props.rowCount,
className: (0, _classnames2.default)('ReactVirtualized__Table', className),

@@ -269,3 +273,3 @@ id: id,

columns: this._getHeaderColumns(),
style: (0, _extends3.default)({}, rowStyleObject, {
style: (0, _extends3.default)({
height: headerHeight,

@@ -275,3 +279,3 @@ overflow: 'hidden',

width: width
})
}, rowStyleObject)
}),

@@ -308,2 +312,3 @@ React.createElement(_Grid3.default, (0, _extends3.default)({}, this.props, {

rowIndex = _ref4.rowIndex;
var onColumnClick = this.props.onColumnClick;
var _column$props = column.props,

@@ -330,2 +335,6 @@ cellDataGetter = _column$props.cellDataGetter,

var onClick = function onClick(event) {
onColumnClick && onColumnClick({ columnData: columnData, dataKey: dataKey, event: event });
};
var style = this._cachedColumnStyles[columnIndex];

@@ -341,5 +350,7 @@

{
'aria-colindex': columnIndex + 1,
'aria-describedby': id,
className: (0, _classnames2.default)('ReactVirtualized__Table__rowColumn', className),
key: 'Row' + rowIndex + '-' + 'Col' + columnIndex,
onClick: onClick,
role: 'gridcell',

@@ -419,2 +430,3 @@ style: style,

headerAriaLabel = column.props['aria-label'] || label || dataKey;
headerAriaSort = 'none';
headerTabIndex = 0;

@@ -489,7 +501,7 @@ headerOnClick = onClick;

var className = (0, _classnames2.default)('ReactVirtualized__Table__row', rowClass);
var flattenedStyle = (0, _extends3.default)({}, style, rowStyleObject, {
var flattenedStyle = (0, _extends3.default)({}, style, {
height: this._getRowHeight(index),
overflow: 'hidden',
paddingRight: scrollbarWidth
});
}, rowStyleObject);

@@ -636,4 +648,8 @@ return rowRenderer({

Table.propTypes = process.env.NODE_ENV !== "production" ? {
/** This is just set on the grid top element. */
'aria-label': _propTypes2.default.string,
/** This is just set on the grid top element. */
'aria-labelledby': _propTypes2.default.string,
/**

@@ -703,2 +719,8 @@ * Removes fixed height from the scrollingContainer so that the total height

/**
* Optional callback when a column is clicked.
* ({ columnData: any, dataKey: string }): void
*/
onColumnClick: _propTypes2.default.func,
/**
* Optional callback when a column's header is clicked.

@@ -705,0 +727,0 @@ * ({ columnData: any, dataKey: string }): void

@@ -68,3 +68,3 @@ 'use strict';

// Don't measure (which forces) reflow for scrolls that happen inside of children!
if (e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
return;

@@ -71,0 +71,0 @@ }

@@ -0,1 +1,2 @@

import _Object$keys from 'babel-runtime/core-js/object/keys';

@@ -41,5 +42,14 @@

} else {
// Clear sortBy array of all non-selected keys
sortBy.length = 0;
sortBy.push(dataKey);
// Clear sortDirection object of all non-selected keys
var sortDirectionKeys = _Object$keys(sortDirection);
sortDirectionKeys.forEach(function (key) {
if (key !== dataKey) delete sortDirection[key];
});
// If key is already selected, reverse sort direction.
// Else, set sort direction to default direction.
if (sortDirection.hasOwnProperty(dataKey)) {

@@ -46,0 +56,0 @@ sortDirection[dataKey] = sortDirection[dataKey] === 'ASC' ? 'DESC' : 'ASC';

@@ -21,3 +21,3 @@ import _extends from 'babel-runtime/helpers/extends';

var a11yProps = {};
var a11yProps = { 'aria-rowindex': index + 1 };

@@ -24,0 +24,0 @@ if (onRowClick || onRowDoubleClick || onRowMouseOut || onRowMouseOver || onRowRightClick) {

@@ -214,2 +214,6 @@ import _extends from 'babel-runtime/helpers/extends';

{
'aria-label': this.props['aria-label'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-colcount': React.Children.toArray(children).length,
'aria-rowcount': this.props.rowCount,
className: cn('ReactVirtualized__Table', className),

@@ -222,3 +226,3 @@ id: id,

columns: this._getHeaderColumns(),
style: _extends({}, rowStyleObject, {
style: _extends({
height: headerHeight,

@@ -228,3 +232,3 @@ overflow: 'hidden',

width: width
})
}, rowStyleObject)
}),

@@ -261,2 +265,3 @@ React.createElement(Grid, _extends({}, this.props, {

rowIndex = _ref4.rowIndex;
var onColumnClick = this.props.onColumnClick;
var _column$props = column.props,

@@ -283,2 +288,6 @@ cellDataGetter = _column$props.cellDataGetter,

var onClick = function onClick(event) {
onColumnClick && onColumnClick({ columnData: columnData, dataKey: dataKey, event: event });
};
var style = this._cachedColumnStyles[columnIndex];

@@ -294,5 +303,7 @@

{
'aria-colindex': columnIndex + 1,
'aria-describedby': id,
className: cn('ReactVirtualized__Table__rowColumn', className),
key: 'Row' + rowIndex + '-' + 'Col' + columnIndex,
onClick: onClick,
role: 'gridcell',

@@ -372,2 +383,3 @@ style: style,

headerAriaLabel = column.props['aria-label'] || label || dataKey;
headerAriaSort = 'none';
headerTabIndex = 0;

@@ -442,7 +454,7 @@ headerOnClick = onClick;

var className = cn('ReactVirtualized__Table__row', rowClass);
var flattenedStyle = _extends({}, style, rowStyleObject, {
var flattenedStyle = _extends({}, style, {
height: this._getRowHeight(index),
overflow: 'hidden',
paddingRight: scrollbarWidth
});
}, rowStyleObject);

@@ -590,4 +602,8 @@ return rowRenderer({

Table.propTypes = process.env.NODE_ENV !== "production" ? {
/** This is just set on the grid top element. */
'aria-label': PropTypes.string,
/** This is just set on the grid top element. */
'aria-labelledby': PropTypes.string,
/**

@@ -657,2 +673,8 @@ * Removes fixed height from the scrollingContainer so that the total height

/**
* Optional callback when a column is clicked.
* ({ columnData: any, dataKey: string }): void
*/
onColumnClick: PropTypes.func,
/**
* Optional callback when a column's header is clicked.

@@ -659,0 +681,0 @@ * ({ columnData: any, dataKey: string }): void

@@ -62,3 +62,3 @@ /**

// Don't measure (which forces) reflow for scrolls that happen inside of children!
if (e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
return;

@@ -65,0 +65,0 @@ }

@@ -6,3 +6,3 @@ {

"user": "bvaughn",
"version": "9.20.1",
"version": "9.21.0",
"homepage": "https://github.com/bvaughn/react-virtualized",

@@ -9,0 +9,0 @@ "main": "dist/commonjs/index.js",

@@ -7,5 +7,5 @@ [<img src="https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png" alt="React virtualized" data-canonical-src="https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png" width="330" height="100" />](http://bvaughn.github.io/react-virtualized/)

[![NPM monthly downloads](https://img.shields.io/npm/dm/react-virtualized.svg?style=flat)](https://npmcharts.com/compare/react-virtualized?minimal=true)
[![Circle CI badge](https://img.shields.io/circleci/project/bvaughn/react-virtualized/master.svg?style=flat)](https://circleci.com/gh/bvaughn/react-virtualized)
[![CircleCI](https://circleci.com/gh/bvaughn/react-virtualized/tree/master.svg?style=svg)](https://circleci.com/gh/bvaughn/react-virtualized/tree/master)
[![Codecov badge](https://img.shields.io/codecov/c/github/bvaughn/react-virtualized/master.svg)](https://codecov.io/github/bvaughn/react-virtualized)
[![Slack chat](https://slackin-ucxxtydvmw.now.sh/badge.svg)](https://react-virtualized.now.sh)
[![Slack chat](https://react-virtualized.now.sh/badge.svg)](https://react-virtualized.now.sh)
[![OpenCollective](https://opencollective.com/react-virtualized/backers/badge.svg)](#backers)

@@ -244,2 +244,3 @@ [![OpenCollective](https://opencollective.com/react-virtualized/sponsors/badge.svg)](#sponsors)

* [react-virtualized-tree](https://github.com/diogofcunha/react-virtualized-tree/): A reactive tree component that aims to render large sets of tree structured data in an elegant and performant way
* [react-timeline-9000](https://github.com/BHP-DevHub/react-timeline-9000/): A calendar timeline component that is capable of displaying and interacting with a large number of items

@@ -246,0 +247,0 @@ Contributions

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc