You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-virtualized-checkbox

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtualized-checkbox - npm Package Compare versions

Comparing version

to
3.0.0

.npmignore

161

package.json
{
"name": "react-virtualized-checkbox",
"version": "2.1.2",
"version": "3.0.0",
"description": "Checkbox group component with virtualization for large number of items",
"main": "dist/commonjs/index.js",
"jsnext:main": "dist/es/index.js",
"scripts": {
"build": "npm run build:commonjs && npm run build:es && npm run build:demo && npm run build:umd",
"build:commonjs": "npm run clean:commonjs && cross-env NODE_ENV=production cross-env BABEL_ENV=commonjs babel source --out-dir dist/commonjs --ignore *.example.js,*.test.js,source/demo/,source/tests.js",
"build:demo": "npm run clean:demo && cross-env NODE_ENV=production webpack --config webpack.config.demo.js -p --bail",
"build:es": "npm run clean:es && cross-env NODE_ENV=production cross-env BABEL_ENV=es babel source --out-dir dist/es --ignore *.example.js,*.test.js,source/demo/,source/tests.js",
"build:umd": "npm run clean:umd && cross-env NODE_ENV=production webpack --config webpack.config.umd.js --bail",
"clean": "npm run clean:commonjs && npm run clean:demo && npm run clean:es && npm run clean:umd",
"clean:commonjs": "rimraf dist/commonjs",
"clean:demo": "rimraf build",
"clean:es": "rimraf dist/es",
"clean:umd": "rimraf dist/umd",
"deploy": "gh-pages -d build",
"lint": "standard",
"prebuild": "npm run lint",
"postpublish": "npm run deploy",
"posttest": "codecov",
"prepublish": "npm run build",
"start": "cross-env NODE_ENV=development webpack-dev-server --hot --inline --config webpack.config.dev.js",
"test": "npm run lint && npm run test:unit",
"test:unit": "cross-env NODE_ENV=test karma start",
"watch": "watch 'clear && npm run test -s' source",
"watch:nolint": "watch 'clear && npm run test:unit' source"
},
"repository": {
"type": "git",
"url": "https://github.com/emilebres/react-virtualized-checkbox"
},
"keywords": [
"react",
"reactjs",
"webpack",
"checkbox"
],
"author": "Emile Bres <emile.bres@gmail.com> (http://github.com/emilebres)",

@@ -46,87 +11,49 @@ "license": "MIT",

"homepage": "https://github.com/emilebres/react-virtualized-checkbox",
"standard": {
"parser": "babel-eslint",
"ignore": [
"dist",
"playground",
"source/vendor"
],
"global": [
"afterAll",
"afterEach",
"beforeAll",
"beforeEach",
"describe",
"expect",
"fdescribe",
"fit",
"it",
"getComputedStyle",
"jasmine"
]
"main": "lib/index,js",
"dependencies": {
"prop-types": "^15.5.10",
"react-virtualized": "^9.9.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"prepare": "rimraf lib && npm run compile",
"compile": "npm run lint && npm run compile:js",
"lint": "eslint src/**/*.js",
"compile:js": "rimraf lib && cross-env NODE_ENV=production babel src/VirtualizedCheckbox -d lib --presets es2015,react-app --ignore test.js"
},
"devDependencies": {
"autoprefixer": "latest",
"babel-cli": "latest",
"babel-core": "latest",
"babel-eslint": "latest",
"babel-loader": "latest",
"babel-plugin-__coverage__": "latest",
"babel-plugin-transform-es2015-destructuring": "latest",
"babel-plugin-transform-object-rest-spread": "latest",
"babel-plugin-transform-react-inline-elements": "latest",
"babel-polyfill": "latest",
"babel-preset-es2015": "latest",
"babel-preset-es2015-rollup": "latest",
"babel-preset-react": "latest",
"babel-preset-stage-0": "latest",
"bluebird": "latest",
"cross-env": "latest",
"css-loader": "latest",
"enzyme": "latest",
"express": "latest",
"file-loader": "latest",
"fs-extra": "latest",
"gh-pages": "latest",
"jasmine": "latest",
"karma": "latest",
"karma-coverage": "latest",
"karma-jasmine": "latest",
"karma-junit-reporter": "latest",
"karma-spec-reporter": "latest",
"postcss": "latest",
"postcss-cli": "latest",
"postcss-loader": "latest",
"react": "latest",
"react-addons-shallow-compare": "latest",
"react-addons-test-utils": "latest",
"react-dom": "latest",
"react-overlays": "latest",
"react-resizable": "latest",
"redbox-react": "latest",
"rimraf": "latest",
"standard": "latest",
"style-loader": "latest",
"watch": "latest",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-typecheck": "^3.6.1",
"codecov": "^1.0.1",
"extract-text-webpack-plugin": "^1.0.1",
"html-webpack-plugin": "^1.7.0",
"immutable": "^3.8.1",
"jasmine-core": "^2.3.4",
"json-loader": "^0.5.4",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.6",
"karma-webpack": "^1.7.0",
"phantomjs-prebuilt": "^2.1.13",
"react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.2",
"webpack": "^1.9.6",
"webpack-dev-server": "^1.14.0"
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react-app": "^3.0.2",
"cross-env": "^5.0.5",
"enzyme": "^2.9.1",
"eslint": "^4.5.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-prettier": "^2.2.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-overlays": "^0.8.0",
"react-resizable": "^1.7.1",
"react-scripts": "1.0.11",
"react-test-renderer": "^15.6.1",
"rimraf": "^2.6.1"
},
"dependencies": {
"react-virtualized": "9.2.1"
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": [
"react-app",
"prettier"
],
"env": {
"browser": true,
"jest": true
}
}
}

@@ -12,7 +12,7 @@ # React Virtualized Checkbox

npm install react-virtualized-checkbox --save
yarn add react-virtualized-checkbox
```
ES6, CommonJS, and UMD builds are available with each distribution.
For example:
And in your code:
```js

@@ -22,8 +22,2 @@ import VirtualizedCheckbox from 'react-virtualized-checkbox'

Alternately you can load a global-friendly UMD build:
```html
<script src="path-to-react-virtualized-checkbox/dist/umd/react-virtualized-checkbox.js"></script>
```
## Simple Example

@@ -46,5 +40,5 @@

const items = [
{ label: "One", value: 1 },
{ label: "Two", value: 2 },
{ label: "Three", value: 3 }
{ label: "One", value: 1, checked: true},
{ label: "Two", value: 2, checked: true},
{ label: "Three", value: 3, checked: true}
// And so on...

@@ -56,3 +50,3 @@ ]

items={items}
onOK={(checkedItems) => this.setState({ checkedItems })}
onOk={(checkedItems) => this.setState({ checkedItems })}
onCancel={ () => this.setState({ checkedItems: [] })}

@@ -70,9 +64,11 @@ />

| items | `PropTypes.array` | Items to choose from; can be an array of strings or an array of objects. |
| onOk | `PropTypes.func` | Callback called when the _Ok_ button is clicked; takes an array of the selected items, a boolean if all items are selected and the text filter as arguments. |
| onCancel | `PropTypes.func` | Callback called when the _Cancel_ button is clicked. |
| onChange | `PropTypes.func` | Callback called when a checkbox is clicked. If a normal checkbox is clicked, will return the item. If the (Select all) checkbox is clicked, will return an array of all filtered items.|
| hasFilterBox | `PropTypes.bool` | If the text filter box is displayed; defaults to true |
| hasOkButton | `PropTypes.bool` | If the _Ok_ button is displayed; defaults to true |
| hasCancelButton | `PropTypes.bool` | If the _Cancel_ button is displayed; defaults to true |
| labelKey | `PropTypes.string` | Label key; defaults to 'label'. |
| valueKey | `PropTypes.string` | Value key; defaults to 'value'. |
| onOk | `PropTypes.func` | Callback called when the _Ok_ button is clicked; takes the selected items as arguments. |
| onCancel | `PropTypes.func` | Callback called when the _Cancel_ button is clicked. |
| onChange | `PropTypes.func` | Callback called when a checkbox is clicked. |
| rowHeight | `PropTypes.number` | Row height; defaults to 30 pixels. |
| hasButtons | `PropTypes.bool` | If the _Ok_ and _Cancel_ buttons are displayed; defaults to true |
| hasFilterBox | `PropTypes.bool` | If the text filter box is displayed; defaults to true |
| height | `PropTypes.number` | Component height; If not set, will get from the parent. |
| width | `PropTypes.number` | Component width; If not set, will get from the parent. |