From 4d6ad8d7e8408b4d1e9e3c249b736c97befba596 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 19 Aug 2017 14:55:04 +0800 Subject: [PATCH 001/136] init for starting develop --- .babelrc | 3 ++ .eslintrc | 23 +++++++++ lerna.json | 7 +++ package.json | 32 ++++++++++++- .../package.json | 14 ++++++ .../src/index.html | 18 +++++++ .../src/index.js | 10 ++++ packages/react-bootstrap-table2/package.json | 11 +++++ .../src/bootstrap-table.js | 26 ++++++++++ packages/react-bootstrap-table2/src/index.js | 5 ++ .../react-bootstrap-table2/src/store/base.js | 8 ++++ webpack.config.babel.js | 48 +++++++++++++++++++ 12 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 .babelrc create mode 100644 .eslintrc create mode 100644 lerna.json create mode 100644 packages/react-bootstrap-table2-example/package.json create mode 100644 packages/react-bootstrap-table2-example/src/index.html create mode 100644 packages/react-bootstrap-table2-example/src/index.js create mode 100644 packages/react-bootstrap-table2/package.json create mode 100644 packages/react-bootstrap-table2/src/bootstrap-table.js create mode 100644 packages/react-bootstrap-table2/src/index.js create mode 100644 packages/react-bootstrap-table2/src/store/base.js create mode 100644 webpack.config.babel.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..83c6c8a --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["react", "es2015", "stage-0"] +} \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..0f7c889 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,23 @@ +{ + "extends": "airbnb", + "parser": "babel-eslint", + "env": { + "browser": true, + "jasmine": true, + "node": true + }, + "plugins": [ + "react" + ], + "rules": { + "comma-dangle": ["error", "never"], + "react/jsx-curly-spacing": 0, + "react/forbid-prop-types": 0, + "react/jsx-filename-extension": 0, + "import/prefer-default-export": 0, + "import/no-extraneous-dependencies": 0 + }, + "globals": { + "jest": false + } +} \ No newline at end of file diff --git a/lerna.json b/lerna.json new file mode 100644 index 0000000..b34dd47 --- /dev/null +++ b/lerna.json @@ -0,0 +1,7 @@ +{ + "lerna": "2.0.0", + "packages": [ + "packages/*" + ], + "version": "0.0.0" +} diff --git a/package.json b/package.json index 3234f45..d09c6a3 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Rebuilt for react-bootstrap-table", "main": "index.js", "scripts": { + "start": "node -r babel-register ./node_modules/.bin/webpack-dev-server --config webpack.config.babel.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -15,5 +16,34 @@ "bugs": { "url": "https://github.com/react-bootstrap-table/react-bootstrap-table2/issues" }, - "homepage": "https://github.com/react-bootstrap-table/react-bootstrap-table2#readme" + "homepage": "https://github.com/react-bootstrap-table/react-bootstrap-table2#readme", + "devDependencies": { + "babel-core": "^6.25.0", + "babel-eslint": "^7.2.3", + "babel-loader": "^7.1.1", + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", + "babel-preset-stage-0": "^6.24.1", + "babel-register": "^6.24.1", + "eslint": "^4.5.0", + "eslint-config-airbnb": "^14.1.0", + "eslint-loader": "^1.9.0", + "eslint-plugin-import": "^2.7.0", + "eslint-plugin-jsx-a11y": "^4.0.0", + "eslint-plugin-react": "^7.2.1", + "html-webpack-plugin": "^2.30.1", + "lerna": "^2.0.0", + "webpack": "^3.5.4", + "webpack-dev-server": "^2.7.1" + }, + "dependencies": { + "prop-types": "^15.5.10", + "react": "^15.6.1", + "react-dom": "^15.6.1" + }, + "peerDependencies": { + "react": "^15.0.0", + "react-dom": "^15.0.0", + "prop-types": "^15.0.0" + } } diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json new file mode 100644 index 0000000..c1c7a06 --- /dev/null +++ b/packages/react-bootstrap-table2-example/package.json @@ -0,0 +1,14 @@ +{ + "name": "react-bootstrap-table2-example", + "version": "0.0.1", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "react-bootstrap-table2": "0.0.1" + } +} diff --git a/packages/react-bootstrap-table2-example/src/index.html b/packages/react-bootstrap-table2-example/src/index.html new file mode 100644 index 0000000..810cd7c --- /dev/null +++ b/packages/react-bootstrap-table2-example/src/index.html @@ -0,0 +1,18 @@ + + + + + react-bootstrap-table demo + + + + + + +
+ + diff --git a/packages/react-bootstrap-table2-example/src/index.js b/packages/react-bootstrap-table2-example/src/index.js new file mode 100644 index 0000000..642fdb1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/src/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import ReactDom from 'react-dom'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const data = [1, 2, 3, 4]; + +ReactDom.render( + , + document.getElementById('example')); diff --git a/packages/react-bootstrap-table2/package.json b/packages/react-bootstrap-table2/package.json new file mode 100644 index 0000000..f3e6f06 --- /dev/null +++ b/packages/react-bootstrap-table2/package.json @@ -0,0 +1,11 @@ +{ + "name": "react-bootstrap-table2", + "version": "0.0.1", + "description": "Rebuilt for react-bootstrap-table", + "main": "src/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js new file mode 100644 index 0000000..2bbdb08 --- /dev/null +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -0,0 +1,26 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +import storeBase from './store/base'; + +class BootstrapTable extends storeBase(Component) { + render() { + return ( + + ); + } +} + +BootstrapTable.propTypes = { + data: PropTypes.array +}; + +BootstrapTable.defaultProps = { + data: [] +}; + +export default BootstrapTable; diff --git a/packages/react-bootstrap-table2/src/index.js b/packages/react-bootstrap-table2/src/index.js new file mode 100644 index 0000000..a1dfa2d --- /dev/null +++ b/packages/react-bootstrap-table2/src/index.js @@ -0,0 +1,5 @@ +import BootstrapTable from './bootstrap-table'; + +export { + BootstrapTable +}; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js new file mode 100644 index 0000000..98842c5 --- /dev/null +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -0,0 +1,8 @@ +export default ExtendBase => + class Store extends ExtendBase { + constructor(props) { + super(props); + const { data } = this.props; + this.data = data ? data.slice() : []; + } + }; diff --git a/webpack.config.babel.js b/webpack.config.babel.js new file mode 100644 index 0000000..b8888b9 --- /dev/null +++ b/webpack.config.babel.js @@ -0,0 +1,48 @@ +import * as path from 'path'; +import webpack from 'webpack'; + +import HtmlWebpackPlugin from 'html-webpack-plugin'; + +const sourcePath = path.join(__dirname, 'packages/react-bootstrap-table2/src'); +const examplePath = path.join(__dirname, 'packages/react-bootstrap-table2-example/src'); +const exampleHTMLPath = path.join(__dirname, 'packages/react-bootstrap-table2-example/src/index.html'); + +module.exports = { + entry: examplePath, + devtool: '#eval-source-map', + devServer: { + historyApiFallback: true, + hot: true, + inline: true, + // progress: true, + noInfo: true, + stats: 'errors-only' + }, + output: { + path: path.join(__dirname, 'examples'), + filename: '[name].bundle.js' + }, + module: { + rules: [ { + enforce: 'pre', + test: /\.js?$/, + exclude: /node_modules/, + include: [ sourcePath, examplePath ], + loader: 'eslint-loader' + }, { + test: /\.js?$/, + use: [ 'babel-loader' ], + exclude: /node_modules/, + include: [ sourcePath, examplePath ], + }, { + test: /\.css$/, + use: 'style-loader!css-loader' + } ] + }, + plugins: [ + new HtmlWebpackPlugin({ + template: exampleHTMLPath + }), + new webpack.HotModuleReplacementPlugin() + ] +}; \ No newline at end of file From 23cb0fd160723f8e03f9d7362377c4a9059eef3a Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sat, 19 Aug 2017 19:01:17 +0800 Subject: [PATCH 002/136] [develop] environment setup for testing (#4) * add yarn.lock * test environment setup with jest * allow eslint to suit for jest * run lint before starting testing * disable deprecated rule of 'react/jsx-space-before-closing' * add CONTRIBUTING document * specify how to start testing * add Enzyme for React testing * add testing template for bootstrap-table --- .eslintrc | 6 +- .gitignore | 16 +- CONTRIBUTING.md | 17 + package.json | 26 +- .../test/bootstrap-table.test.js | 15 + yarn.lock | 5954 +++++++++++++++++ 6 files changed, 6029 insertions(+), 5 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 packages/react-bootstrap-table2/test/bootstrap-table.test.js create mode 100644 yarn.lock diff --git a/.eslintrc b/.eslintrc index 0f7c889..9fb0e2b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,7 +3,7 @@ "parser": "babel-eslint", "env": { "browser": true, - "jasmine": true, + "jest": true, "node": true }, "plugins": [ @@ -14,6 +14,10 @@ "react/jsx-curly-spacing": 0, "react/forbid-prop-types": 0, "react/jsx-filename-extension": 0, + "react/jsx-space-before-closing": 0, + "react/jsx-tag-spacing": ["error", { "beforeSelfClosing": "always" }], + "import/extensions": 0, // skip import extensions + "import/no-unresolved": [1, { "ignore": ["^react-bootstrap-table"] }], // monorepo setup "import/prefer-default-export": 0, "import/no-extraneous-dependencies": 0 }, diff --git a/.gitignore b/.gitignore index b512c09..1d80883 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,15 @@ -node_modules \ No newline at end of file +# dependencies +node_modules + +# testing +/coverage +.eslintcache + +# misc +.DS_Store +.vscode + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..59a3a96 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to react-bootstrap-table2 + + +## Commands + +### Testing +In order to run the tests + +`yarn test` + +testing with `watch mode` + +`yarn test:watch` + +see the coverage report + +`yarn test:coverage` diff --git a/package.json b/package.json index d09c6a3..e1b9516 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "main": "index.js", "scripts": { "start": "node -r babel-register ./node_modules/.bin/webpack-dev-server --config webpack.config.babel.js", - "test": "echo \"Error: no test specified\" && exit 1" + "lint": "eslint ./packages --ext .js --ext .jsx --ignore-path .gitignore", + "pretest": "yarn lint --cache", + "test": "jest", + "test:coverage": "jest --coverage", + "test:watch": "jest --watch" }, "repository": { "type": "git", @@ -25,6 +29,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "babel-register": "^6.24.1", + "enzyme": "^2.9.1", "eslint": "^4.5.0", "eslint-config-airbnb": "^14.1.0", "eslint-loader": "^1.9.0", @@ -32,7 +37,10 @@ "eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-react": "^7.2.1", "html-webpack-plugin": "^2.30.1", + "jest": "^20.0.4", + "jest-babel": "^1.0.1", "lerna": "^2.0.0", + "react-test-renderer": "^15.6.1", "webpack": "^3.5.4", "webpack-dev-server": "^2.7.1" }, @@ -42,8 +50,20 @@ "react-dom": "^15.6.1" }, "peerDependencies": { + "prop-types": "^15.0.0", "react": "^15.0.0", - "react-dom": "^15.0.0", - "prop-types": "^15.0.0" + "react-dom": "^15.0.0" + }, + "jest": { + "collectCoverageFrom": [ + "packages/**/*.js" + ], + "roots": [ + "/packages" + ], + "testEnvironment": "node", + "testMatch": [ + "**/test/*.js" + ] } } diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js new file mode 100644 index 0000000..b51fc29 --- /dev/null +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -0,0 +1,15 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import BootstrapTable from '../src/bootstrap-table'; + +describe('BootstrapTable', () => { + describe('render', () => { + test('it should render DOM correctly', () => { + const wrapper = shallow(); + + expect(wrapper.length).toBe(1); + expect(wrapper.find('ul').length).toBe(1); + }); + }); +}); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..96d5926 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,5954 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +accepts@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.3, acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0, acorn@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" + +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv-keywords@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" + +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.1.5, ajv@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + json-schema-traverse "^0.3.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0, ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0, ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +aria-query@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.3.0.tgz#cb8a9984e2862711c83c80ade5b8f5ca0de2b467" + dependencies: + ast-types-flow "0.0.7" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0, assert-plus@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +ast-types-flow@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^1.4.0, async@^1.5.0, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.2, async@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.25.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-eslint@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" + dependencies: + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.17.0" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helper-bindify-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-explode-class@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" + dependencies: + babel-helper-bindify-decorators "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" + +babel-loader@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" + dependencies: + find-cache-dir "^1.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-constructor-call@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-do-expressions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-function-bind@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" + +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-constructor-call@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" + dependencies: + babel-plugin-syntax-class-constructor-call "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" + dependencies: + babel-helper-explode-class "^6.24.1" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-do-expressions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" + dependencies: + babel-plugin-syntax-do-expressions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-function-bind@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" + dependencies: + babel-plugin-syntax-function-bind "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-react-display-name@^6.23.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-es2015@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" + dependencies: + babel-plugin-jest-hoist "^20.0.3" + +babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + +babel-preset-stage-0@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" + dependencies: + babel-plugin-transform-do-expressions "^6.22.0" + babel-plugin-transform-function-bind "^6.22.0" + babel-preset-stage-1 "^6.24.1" + +babel-preset-stage-1@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" + dependencies: + babel-plugin-transform-class-constructor-call "^6.24.1" + babel-plugin-transform-export-extensions "^6.22.0" + babel-preset-stage-2 "^6.24.1" + +babel-preset-stage-2@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators "^6.24.1" + babel-preset-stage-3 "^6.24.1" + +babel-preset-stage-3@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.24.1" + babel-plugin-transform-async-to-generator "^6.24.1" + babel-plugin-transform-exponentiation-operator "^6.24.1" + babel-plugin-transform-object-rest-spread "^6.22.0" + +babel-register@^6.24.1, babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.0, babylon@^6.17.4, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-js@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bluebird@^3.4.7: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + dependencies: + buffer-xor "^1.0.2" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + inherits "^2.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +buffer-indexof@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.0.tgz#f54f647c4f4e25228baa656a2e57e43d5f270982" + +buffer-xor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + +bytes@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +cheerio@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + +chokidar@^1.6.0, chokidar@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + +clean-css@4.1.x: + version "4.1.7" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.7.tgz#b9aea4f85679889cf3eae8b40349ec4ebdfdd032" + dependencies: + source-map "0.5.x" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cmd-shim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + dependencies: + graceful-fs "^4.1.2" + mkdirp "~0.5.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +columnify@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + dependencies: + strip-ansi "^3.0.0" + wcwidth "^1.0.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +command-join@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" + +commander@~2.11.0, commander@2.11.x: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +compare-func@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + dependencies: + array-ify "^1.0.0" + dot-prop "^3.0.0" + +compressible@~2.0.10: + version "2.0.11" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.11.tgz#16718a75de283ed8e604041625a2064586797d8a" + dependencies: + mime-db ">= 1.29.0 < 2" + +compression@^1.5.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.0.tgz#030c9f198f1643a057d776a738e922da4373012d" + dependencies: + accepts "~1.3.3" + bytes "2.5.0" + compressible "~2.0.10" + debug "2.6.8" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.10, concat-stream@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-history-api-fallback@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +conventional-changelog-angular@^1.3.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.4.0.tgz#118b9f7d41a3d99500bfb6bea1f3525e055e8b9b" + dependencies: + compare-func "^1.3.1" + github-url-from-git "^1.4.0" + q "^1.4.1" + read-pkg-up "^2.0.0" + +conventional-changelog-atom@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" + dependencies: + q "^1.4.1" + +conventional-changelog-cli@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.2.tgz#33abf2b5720a9b094df38e81741ccb502e1a4125" + dependencies: + add-stream "^1.0.0" + conventional-changelog "^1.1.4" + lodash "^4.1.0" + meow "^3.7.0" + tempfile "^1.1.1" + +conventional-changelog-codemirror@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334" + dependencies: + q "^1.4.1" + +conventional-changelog-core@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" + dependencies: + conventional-changelog-writer "^1.1.0" + conventional-commits-parser "^1.0.0" + dateformat "^1.0.12" + get-pkg-repo "^1.0.0" + git-raw-commits "^1.2.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^1.2.0" + lodash "^4.0.0" + normalize-package-data "^2.3.5" + q "^1.4.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" + +conventional-changelog-ember@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" + dependencies: + q "^1.4.1" + +conventional-changelog-eslint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2" + dependencies: + q "^1.4.1" + +conventional-changelog-express@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce" + dependencies: + q "^1.4.1" + +conventional-changelog-jquery@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" + dependencies: + q "^1.4.1" + +conventional-changelog-jscs@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" + dependencies: + q "^1.4.1" + +conventional-changelog-jshint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-writer@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^1.0.0" + dateformat "^1.0.11" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.0.0" + meow "^3.3.0" + semver "^5.0.1" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" + dependencies: + conventional-changelog-angular "^1.3.4" + conventional-changelog-atom "^0.1.0" + conventional-changelog-codemirror "^0.1.0" + conventional-changelog-core "^1.9.0" + conventional-changelog-ember "^0.2.6" + conventional-changelog-eslint "^0.1.0" + conventional-changelog-express "^0.1.0" + conventional-changelog-jquery "^0.1.0" + conventional-changelog-jscs "^0.1.0" + conventional-changelog-jshint "^0.1.0" + +conventional-commits-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + +conventional-commits-parser@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" + dependencies: + is-text-path "^1.0.0" + JSONStream "^1.0.4" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-commits-parser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" + dependencies: + is-text-path "^1.0.0" + JSONStream "^1.0.4" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-recommended-bump@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c" + dependencies: + concat-stream "^1.4.10" + conventional-commits-filter "^1.0.0" + conventional-commits-parser "^2.0.0" + git-raw-commits "^1.2.0" + git-semver-tags "^1.2.1" + meow "^3.3.0" + object-assign "^4.0.1" + +convert-source-map@^1.4.0, convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + +core-util-is@~1.0.0, core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-react-class@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.1.tgz#948945efc6757a400d6e5e5af47194d10064279f" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + +css-select@^1.1.0, css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +"cssom@>= 0.3.2 < 0.4.0", cssom@0.3.x: + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +damerau-levenshtein@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" + +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + dependencies: + number-is-nan "^1.0.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dateformat@^1.0.11, dateformat@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + dependencies: + globby "^6.1.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + p-map "^1.1.1" + pify "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@~1.1.1, depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + +detect-node@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" + +diff@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + +dns-packet@^1.0.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.2.2.tgz#a8a26bec7646438963fc86e06f8f8b16d6c8bf7a" + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + dependencies: + buffer-indexof "^1.0.0" + +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-converter@~0.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" + dependencies: + utila "~0.3" + +dom-serializer@~0.1.0, dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +domelementtype@^1.3.0, domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + dependencies: + domelementtype "1" + +domhandler@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" + dependencies: + domelementtype "1" + +domutils@^1.5.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.6.2.tgz#1958cc0b4c9426e9ed367fb1c8e854891b0fa3ff" + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@1.1: + version "1.1.6" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + dependencies: + is-obj "^1.0.0" + +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^6.1.0: + version "6.5.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +enzyme@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.9.1.tgz#07d5ce691241240fb817bf2c4b18d6e530240df6" + dependencies: + cheerio "^0.22.0" + function.prototype.name "^1.0.0" + is-subset "^0.1.1" + lodash "^4.17.4" + object-is "^1.0.1" + object.assign "^4.0.4" + object.entries "^1.0.4" + object.values "^1.0.4" + prop-types "^15.5.10" + uuid "^3.0.1" + +errno@^0.1.3, errno@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.6.1, es-abstract@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.29" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.29.tgz#768eb2dfc4957bcf35fa0568f193ab71ede53fd8" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@2: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1, es6-symbol@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-airbnb-base@^11.1.0: + version "11.3.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.1.tgz#c0ab108c9beed503cb999e4c60f4ef98eda0ed30" + dependencies: + eslint-restricted-globals "^0.1.1" + +eslint-config-airbnb@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.1.0.tgz#355d290040bbf8e00bf8b4b19f4b70cbe7c2317f" + dependencies: + eslint-config-airbnb-base "^11.1.0" + +eslint-import-resolver-node@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" + dependencies: + debug "^2.6.8" + resolve "^1.2.0" + +eslint-loader@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.9.0.tgz#7e1be9feddca328d3dcfaef1ad49d5beffe83a13" + dependencies: + loader-fs-cache "^1.0.0" + loader-utils "^1.0.2" + object-assign "^4.0.1" + object-hash "^1.1.4" + rimraf "^2.6.1" + +eslint-module-utils@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" + dependencies: + debug "^2.6.8" + pkg-dir "^1.0.0" + +eslint-plugin-import@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.1.1" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + +eslint-plugin-jsx-a11y@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz#779bb0fe7b08da564a422624911de10061e048ee" + dependencies: + aria-query "^0.3.0" + ast-types-flow "0.0.7" + damerau-levenshtein "^1.0.0" + emoji-regex "^6.1.0" + jsx-ast-utils "^1.0.0" + object-assign "^4.0.1" + +eslint-plugin-react@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.2.1.tgz#c2673526ed6571b08c69c5f453d03f5f13e8ddbe" + dependencies: + doctrine "^2.0.0" + has "^1.0.1" + jsx-ast-utils "^2.0.0" + +eslint-restricted-globals@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" + +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.5.0.tgz#bb75d3b8bde97fb5e13efcd539744677feb019c3" + dependencies: + ajv "^5.2.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^2.6.8" + doctrine "^2.0.0" + eslint-scope "^3.7.1" + espree "^3.5.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^4.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "^4.0.1" + text-table "~0.2.0" + +espree@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.0.tgz#98358625bdd055861ea27e2867ea729faf463d8d" + dependencies: + acorn "^5.1.1" + acorn-jsx "^3.0.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" + dependencies: + estraverse "^4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +eventsource@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" + dependencies: + original ">=0.0.5" + +evp_bytestokey@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" + dependencies: + create-hash "^1.1.1" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +execa@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +express@^4.13.3: + version "4.15.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.15.4.tgz#032e2253489cf8fce02666beca3d11ed7a2daed1" + dependencies: + accepts "~1.3.3" + array-flatten "1.1.1" + content-disposition "0.5.2" + content-type "~1.0.2" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.8" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + finalhandler "~1.0.4" + fresh "0.5.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.1" + path-to-regexp "0.1.7" + proxy-addr "~1.1.5" + qs "6.5.0" + range-parser "~1.2.0" + send "0.15.4" + serve-static "1.12.4" + setprototypeof "1.0.3" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.0" + vary "~1.1.1" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@^1.2.0, extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" + dependencies: + websocket-driver ">=0.5.1" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +fbjs@^0.8.9: + version "0.8.14" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.4.tgz#18574f2e7c4b98b8ae3b230c21f201f31bdb3fb7" + dependencies: + debug "2.6.8" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +forwarded@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" + +fresh@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" + +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.36" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +function.prototype.name@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.3.tgz#0099ae5572e9dd6f03c97d023fd92bcc5e639eac" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + is-callable "^1.1.3" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-port@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.1.0.tgz#ef01b18a84ca6486970ff99e54446141a73ffd3e" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +git-raw-commits@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^1.2.0, git-semver-tags@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" + dependencies: + meow "^3.3.0" + semver "^5.0.1" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + dependencies: + ini "^1.3.2" + +github-url-from-git@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.17.0, globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handle-thing@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" + +handlebars@^4.0.2, handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +he@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-minifier@^3.2.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.3.tgz#4a275e3b1a16639abb79b4c11191ff0d0fcf1ab9" + dependencies: + camel-case "3.0.x" + clean-css "4.1.x" + commander "2.11.x" + he "1.1.x" + ncname "1.0.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.0.x" + +html-webpack-plugin@^2.30.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" + dependencies: + bluebird "^3.4.7" + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + toposort "^1.0.0" + +htmlparser2@^3.9.1: + version "3.9.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^2.0.2" + +htmlparser2@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" + dependencies: + domelementtype "1" + domhandler "2.1" + domutils "1.1" + readable-stream "1.0" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + +http-errors@~1.6.1, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-proxy-middleware@~0.17.4: + version "0.17.4" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" + dependencies: + http-proxy "^1.16.2" + is-glob "^3.1.0" + lodash "^4.17.2" + micromatch "^2.3.11" + +http-proxy@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" + dependencies: + eventemitter3 "1.x.x" + requires-port "1.x.x" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +iconv-lite@^0.4.17, iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +ignore@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@2, inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.2, ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^3.0.6: + version "3.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.2.tgz#c2aaede1507cc54d826818737742d621bef2e823" + dependencies: + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +internal-ip@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" + dependencies: + meow "^3.3.0" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + +ipaddr.js@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-ci@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-text-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + dependencies: + text-extensions "^1.0.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.1: + version "1.1.11" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.4" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" + semver "^5.3.0" + +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" + dependencies: + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" + dependencies: + handlebars "^4.0.3" + +jest: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" + dependencies: + jest-cli "^20.0.4" + +jest-babel: + version "1.0.1" + resolved "https://registry.yarnpkg.com/jest-babel/-/jest-babel-1.0.1.tgz#ef659df0e9397b083c0f6aebd4cb8cfaa77df8bf" + +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" + +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.4" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.4" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^7.0.2" + +jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" + dependencies: + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.4" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + dependencies: + chalk "^1.1.3" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" + +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" + +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + +jest-haste-map@^20.0.4: + version "20.0.5" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.5.tgz#abad74efb1a005974a7b6517e11010709cab9112" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" + micromatch "^2.3.11" + sane "~1.6.0" + worker-farm "^1.3.1" + +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" + +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" + dependencies: + chalk "^1.1.3" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" + dependencies: + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" + +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" + dependencies: + jest-regex-util "^20.0.3" + +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" + dependencies: + browser-resolve "^1.11.2" + is-builtin-module "^1.0.0" + resolve "^1.3.2" + +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" + dependencies: + babel-core "^6.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^7.0.2" + +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" + dependencies: + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" + natural-compare "^1.4.0" + pretty-format "^20.0.3" + +jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" + mkdirp "^0.5.1" + +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.7.0, js-yaml@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jschardet@^1.4.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" + +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json3@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +JSONStream@^1.0.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jsx-ast-utils@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +jsx-ast-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.0.tgz#ec06a3d60cf307e5e119dac7bad81e89f096f0f8" + dependencies: + array-includes "^3.0.3" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lerna@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea" + dependencies: + async "^1.5.0" + chalk "^1.1.1" + cmd-shim "^2.0.2" + columnify "^1.5.4" + command-join "^2.0.0" + conventional-changelog-cli "^1.3.1" + conventional-recommended-bump "^1.0.0" + dedent "^0.7.0" + execa "^0.6.3" + find-up "^2.1.0" + fs-extra "^3.0.1" + get-port "^3.1.0" + glob "^7.1.2" + globby "^6.1.0" + graceful-fs "^4.1.11" + inquirer "^3.0.6" + is-ci "^1.0.10" + load-json-file "^2.0.0" + lodash "^4.17.4" + minimatch "^3.0.4" + npmlog "^4.1.0" + p-finally "^1.0.0" + path-exists "^3.0.0" + read-cmd-shim "^1.0.1" + read-pkg "^2.0.0" + rimraf "^2.6.1" + safe-buffer "^5.0.1" + semver "^5.1.0" + signal-exit "^3.0.2" + strong-log-transformer "^1.0.6" + temp-write "^3.3.0" + write-file-atomic "^2.1.0" + write-json-file "^2.1.0" + write-pkg "^3.0.1" + yargs "^8.0.1" + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-fs-cache@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc" + dependencies: + find-cache-dir "^0.1.1" + mkdirp "0.5.1" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + +lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + +lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + +lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + +lodash.merge@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + +lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + +lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +loglevel@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.4.1.tgz#95b383f91a3c2756fd4ab093667e4309161f2bcd" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" + dependencies: + pify "^2.3.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +miller-rabin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +"mime-db@>= 1.29.0 < 2", mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + +mime@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" + +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@0.5.1, mkdirp@0.5.x: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +modify-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" + +moment@^2.6.0: + version "2.18.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + +multicast-dns@^6.0.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.1.1.tgz#6e7de86a570872ab17058adea7160bbeca814dde" + dependencies: + dns-packet "^1.0.1" + thunky "^0.1.0" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +ncname@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" + dependencies: + xml-char-classes "^1.0.0" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +no-case@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.1.tgz#7aeba1c73a52184265554b7dc03baf720df80081" + dependencies: + lower-case "^1.1.1" + +node-fetch@^1.0.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.2.tgz#c54e9aac57e432875233525f3c891c4159ffefd7" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-forge@0.6.33: + version "0.6.33" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.6.33.tgz#463811879f573d45155ad6a9f43dc296e8e85ebc" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-libs-browser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +node-pre-gyp@^0.6.36: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2, npmlog@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-hash@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.1.8.tgz#28a659cf987d96a4dabe7860289f3b5326c4a03c" + +object-is@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + +object-keys@^1.0.10, object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.assign@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + object-keys "^1.0.10" + +object.entries@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.values@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +obuf@^1.0.0, obuf@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.1.tgz#104124b6c602c6796881a042541d36db43a5264e" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +opn@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +original@>=0.0.5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" + dependencies: + url-parse "1.0.x" + +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-github-repo-url@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.13" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.13.tgz#c37d295531e786b1da3e3eadc840426accb0ae25" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +pluralize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" + +portfinder@^1.0.9: + version "1.0.13" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" + dependencies: + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" + +private@^0.1.6, private@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@^0.11.0: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types@^15.5.10: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + +proxy-addr@~1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918" + dependencies: + forwarded "~0.1.0" + ipaddr.js "1.4.0" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +q@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +qs@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" + +querystringify@0.0.x: + version "0.0.4" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dom@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +react-test-renderer@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.1.tgz#026f4a5bb5552661fd2cc4bbcd0d4bc8a35ebf7e" + dependencies: + fbjs "^0.8.9" + object-assign "^4.1.0" + +react@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df" + dependencies: + create-react-class "^15.6.0" + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +read-cmd-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" + dependencies: + graceful-fs "^4.1.2" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0, read-pkg@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readable-stream@1.0: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + dependencies: + css-select "^1.1.0" + dom-converter "~0.1" + htmlparser2 "~3.3.0" + strip-ansi "^3.0.0" + utila "~0.3" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0, request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +requires-port@1.0.x, requires-port@1.x.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@^1.2.0, resolve@^1.3.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1, rimraf@2: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + +selfsigned@^1.9.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.1.tgz#bf8cb7b83256c4551e31347c6311778db99eec52" + dependencies: + node-forge "0.6.33" + +semver@^5.0.1, semver@^5.1.0, semver@^5.3.0, "semver@2 || 3 || 4 || 5": + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +send@0.15.4: + version "0.15.4" + resolved "https://registry.yarnpkg.com/send/-/send-0.15.4.tgz#985faa3e284b0273c793364a35c6737bd93905b9" + dependencies: + debug "2.6.8" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + fresh "0.5.0" + http-errors "~1.6.2" + mime "1.3.4" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-index@^1.7.2: + version "1.9.0" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.0.tgz#d2b280fc560d616ee81b48bf0fa82abed2485ce7" + dependencies: + accepts "~1.3.3" + batch "0.6.1" + debug "2.6.8" + escape-html "~1.0.3" + http-errors "~1.6.1" + mime-types "~2.1.15" + parseurl "~1.3.1" + +serve-static@1.12.4: + version "1.12.4" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.4.tgz#9b6aa98eeb7253c4eedc4c1f6fdbca609901a961" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.1" + send "0.15.4" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.8" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" + dependencies: + inherits "^2.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shellwords@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sockjs-client@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" + dependencies: + debug "^2.6.6" + eventsource "0.1.6" + faye-websocket "~0.11.0" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.1.8" + +sockjs@0.3.18: + version "0.3.18" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.18.tgz#d9b289316ca7df77595ef299e075f0f937eb4207" + dependencies: + faye-websocket "^0.10.0" + uuid "^2.0.2" + +sort-keys@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-map-support@^0.4.15: + version "0.4.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@0.5.x: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +spdy-transport@^2.0.18: + version "2.0.20" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.0.20.tgz#735e72054c486b2354fe89e702256004a39ace4d" + dependencies: + debug "^2.6.8" + detect-node "^2.0.3" + hpack.js "^2.1.6" + obuf "^1.1.1" + readable-stream "^2.2.9" + safe-buffer "^5.0.1" + wbuf "^1.7.2" + +spdy@^3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" + dependencies: + debug "^2.6.8" + handle-thing "^1.2.5" + http-deceiver "^1.2.7" + safe-buffer "^5.0.1" + select-hose "^2.0.0" + spdy-transport "^2.0.18" + +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + dependencies: + through "2" + +split2@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" + dependencies: + through2 "^2.0.2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.3.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.2.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0, string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0, strip-bom@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +strong-log-transformer@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3" + dependencies: + byline "^5.0.0" + duplexer "^0.1.1" + minimist "^0.1.0" + moment "^2.6.0" + through "^2.3.4" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.1, supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0, supports-color@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" + dependencies: + has-flag "^2.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +table@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + +temp-write@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.3.0.tgz#c1a96de2b36061342eae81f44ff001aec8f615a9" + dependencies: + graceful-fs "^4.1.2" + is-stream "^1.1.0" + make-dir "^1.0.0" + pify "^2.2.0" + temp-dir "^1.0.0" + uuid "^3.0.1" + +tempfile@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-extensions@^1.0.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +through@^2.3.4, through@^2.3.6, "through@>=2.2.7 <3", through@2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +through2@^2.0.0, through2@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +thunky@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-0.1.0.tgz#bf30146824e2b6e67b0f2d7a4ac8beb26908684e" + +time-stamp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" + +timers-browserify@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" + dependencies: + setimmediate "^1.0.4" + +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +toposort@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.3.tgz#f02cd8a74bd8be2fc0e98611c3bacb95a171869c" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +ua-parser-js@^0.7.9: + version "0.7.14" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" + +uglify-js@^2.6, uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-js@3.0.x: + version "3.0.27" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.27.tgz#a97db8c8ba6b9dba4e2f88d86aa9548fa6320034" + dependencies: + commander "~2.11.0" + source-map "~0.5.1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +universalify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +url-parse@^1.1.8: + version "1.1.9" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.9.tgz#c67f1d775d51f0a18911dd7b3ffad27bb9e5bd19" + dependencies: + querystringify "~1.0.0" + requires-port "1.0.x" + +url-parse@1.0.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" + dependencies: + querystringify "0.0.x" + requires-port "1.0.x" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@^0.10.3, util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utila@~0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^2.0.1, uuid@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0, uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vary@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +watchpack@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" + dependencies: + async "^2.1.2" + chokidar "^1.7.0" + graceful-fs "^4.1.2" + +wbuf@^1.1.0, wbuf@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.2.tgz#d697b99f1f59512df2751be42769c1580b5801fe" + dependencies: + minimalistic-assert "^1.0.0" + +wcwidth@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + +webpack-dev-middleware@^1.11.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz#d34efefb2edda7e1d3b5dbe07289513219651709" + dependencies: + memory-fs "~0.4.1" + mime "^1.3.4" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + time-stamp "^2.0.0" + +webpack-dev-server@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.7.1.tgz#21580f5a08cd065c71144cf6f61c345bca59a8b8" + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^1.6.0" + compression "^1.5.2" + connect-history-api-fallback "^1.3.0" + del "^3.0.0" + express "^4.13.3" + html-entities "^1.2.0" + http-proxy-middleware "~0.17.4" + internal-ip "^1.2.0" + ip "^1.1.5" + loglevel "^1.4.1" + opn "4.0.2" + portfinder "^1.0.9" + selfsigned "^1.9.1" + serve-index "^1.7.2" + sockjs "0.3.18" + sockjs-client "1.1.4" + spdy "^3.4.1" + strip-ansi "^3.0.0" + supports-color "^3.1.1" + webpack-dev-middleware "^1.11.0" + yargs "^6.0.0" + +webpack-sources@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" + dependencies: + source-list-map "^2.0.0" + source-map "~0.5.3" + +webpack@^3.5.4: + version "3.5.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.5.tgz#3226f09fc8b3e435ff781e7af34f82b68b26996c" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +websocket-driver@>=0.5.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + dependencies: + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.12, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +worker-farm@^1.3.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-json-file@^2.1.0, write-json-file@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876" + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^2.0.0" + sort-keys "^1.1.1" + write-file-atomic "^2.0.0" + +write-pkg@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" + dependencies: + sort-keys "^2.0.0" + write-json-file "^2.2.0" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xml-char-classes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^6.0.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@^8.0.1, yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + From 5b7a891b252baa188279917981060900c9239e33 Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 20 Aug 2017 01:00:25 -0500 Subject: [PATCH 003/136] Bootstrap table base (#8) Fix #6 --- .gitignore | 2 +- packages/react-bootstrap-table2/src/body.js | 22 ++++++++++++ .../src/bootstrap-table.js | 31 ++++++++++------ packages/react-bootstrap-table2/src/cell.js | 13 +++++++ .../react-bootstrap-table2/src/header-cell.js | 18 ++++++++++ packages/react-bootstrap-table2/src/header.js | 19 ++++++++++ .../src/props-resolver/column-resolver.js | 3 ++ .../src/props-resolver/index.js | 14 ++++++++ packages/react-bootstrap-table2/src/row.js | 21 +++++++++++ .../react-bootstrap-table2/src/store/base.js | 4 ++- .../react-bootstrap-table2/test/body.test.js | 36 +++++++++++++++++++ .../test/bootstrap-table.test.js | 32 ++++++++++++++--- .../react-bootstrap-table2/test/cell.test.js | 20 +++++++++++ .../test/header-cell.test.js | 24 +++++++++++++ .../test/header.test.js | 28 +++++++++++++++ .../react-bootstrap-table2/test/row.test.js | 33 +++++++++++++++++ 16 files changed, 304 insertions(+), 16 deletions(-) create mode 100644 packages/react-bootstrap-table2/src/body.js create mode 100644 packages/react-bootstrap-table2/src/cell.js create mode 100644 packages/react-bootstrap-table2/src/header-cell.js create mode 100644 packages/react-bootstrap-table2/src/header.js create mode 100644 packages/react-bootstrap-table2/src/props-resolver/column-resolver.js create mode 100644 packages/react-bootstrap-table2/src/props-resolver/index.js create mode 100644 packages/react-bootstrap-table2/src/row.js create mode 100644 packages/react-bootstrap-table2/test/body.test.js create mode 100644 packages/react-bootstrap-table2/test/cell.test.js create mode 100644 packages/react-bootstrap-table2/test/header-cell.test.js create mode 100644 packages/react-bootstrap-table2/test/header.test.js create mode 100644 packages/react-bootstrap-table2/test/row.test.js diff --git a/.gitignore b/.gitignore index 1d80883..7627a42 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ node_modules # testing -/coverage +coverage .eslintcache # misc diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js new file mode 100644 index 0000000..e9e968e --- /dev/null +++ b/packages/react-bootstrap-table2/src/body.js @@ -0,0 +1,22 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import Row from './row'; + +const Body = ({ columns, data, keyField }) => ( + + { + data.map(row => ( + + )) + } + +); + +Body.propTypes = { + keyField: PropTypes.string.isRequired, + data: PropTypes.array.isRequired, + columns: PropTypes.array.isRequired +}; + +export default Body; diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 2bbdb08..0b09cc5 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -1,26 +1,37 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import Header from './header'; +import Body from './body'; import storeBase from './store/base'; class BootstrapTable extends storeBase(Component) { + constructor(props) { + super(props); + this.validateProps(); + } + render() { + const { columns, keyField } = this.props; return ( -
    - { - this.props.data.map(d =>
  • { d }
  • ) - } -
+
+ +
+ +
+
); } } BootstrapTable.propTypes = { - data: PropTypes.array -}; - -BootstrapTable.defaultProps = { - data: [] + keyField: PropTypes.string.isRequired, + data: PropTypes.array.isRequired, + columns: PropTypes.array.isRequired }; export default BootstrapTable; diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js new file mode 100644 index 0000000..7a1c4f7 --- /dev/null +++ b/packages/react-bootstrap-table2/src/cell.js @@ -0,0 +1,13 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + + +const Cell = ({ value }) => ( + { value } +); + +Cell.propTypes = { + value: PropTypes.any.isRequired +}; + +export default Cell; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js new file mode 100644 index 0000000..e43713b --- /dev/null +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -0,0 +1,18 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + + +const HeaderCell = ({ column }) => ( + + { column.text } + +); + +HeaderCell.propTypes = { + column: PropTypes.shape({ + dataField: PropTypes.string.isRequired, + text: PropTypes.string.isRequired + }).isRequired +}; + +export default HeaderCell; diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js new file mode 100644 index 0000000..692e920 --- /dev/null +++ b/packages/react-bootstrap-table2/src/header.js @@ -0,0 +1,19 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import HeaderCell from './header-cell'; + + +const Header = ({ columns }) => ( + + + { columns.map(column => ) } + + +); + +Header.propTypes = { + columns: PropTypes.array.isRequired +}; + +export default Header; diff --git a/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js new file mode 100644 index 0000000..0feef53 --- /dev/null +++ b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js @@ -0,0 +1,3 @@ +export function columnSize(columns) { + return columns.length; +} diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js new file mode 100644 index 0000000..2cb8de1 --- /dev/null +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -0,0 +1,14 @@ +import { columnSize } from './column-resolver'; + +export default ExtendBase => + class TableResolver extends ExtendBase { + validateProps() { + const { columns, keyField } = this.props; + if (!keyField) { + throw new Error('Please specify a field as key via keyField'); + } + if (columnSize(columns) <= 0) { + throw new Error('No any visible columns detect'); + } + } + }; diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js new file mode 100644 index 0000000..3feffd6 --- /dev/null +++ b/packages/react-bootstrap-table2/src/row.js @@ -0,0 +1,21 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import Cell from './cell'; + +const Row = ({ row, columns }) => ( + + { + columns.map(column => + + ) + } + +); + +Row.propTypes = { + row: PropTypes.object.isRequired, + columns: PropTypes.array.isRequired +}; + +export default Row; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 98842c5..d58c626 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -1,5 +1,7 @@ +import TableResolver from '../props-resolver'; + export default ExtendBase => - class Store extends ExtendBase { + class Store extends TableResolver(ExtendBase) { constructor(props) { super(props); const { data } = this.props; diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js new file mode 100644 index 0000000..7528bed --- /dev/null +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -0,0 +1,36 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import Row from '../src/row'; +import Body from '../src/body'; + +describe('Body', () => { + let wrapper; + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + describe('simplest body', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tbody').length).toBe(1); + expect(wrapper.find(Row).length).toBe(data.length); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index b51fc29..82b6ae5 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -1,15 +1,39 @@ import React from 'react'; import { shallow } from 'enzyme'; +import Header from '../src/header'; +import Body from '../src/body'; import BootstrapTable from '../src/bootstrap-table'; describe('BootstrapTable', () => { - describe('render', () => { - test('it should render DOM correctly', () => { - const wrapper = shallow(); + let wrapper; + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + describe('simplest table', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.find('ul').length).toBe(1); + expect(wrapper.find('table').length).toBe(1); + expect(wrapper.find(Header).length).toBe(1); + expect(wrapper.find(Body).length).toBe(1); + expect(wrapper.find('.react-bootstrap-table-container').length).toBe(1); }); }); }); diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js new file mode 100644 index 0000000..078e5d8 --- /dev/null +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import Cell from '../src/cell'; + +describe('Cell', () => { + let wrapper; + const value = 'test'; + + describe('simplest cell', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.contains({ value })).toBe(true); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js new file mode 100644 index 0000000..e0cc3f7 --- /dev/null +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import HeaderCell from '../src/header-cell'; + +describe('HeaderCell', () => { + let wrapper; + const column = { + dataField: 'id', + text: 'ID' + }; + + describe('simplest header cell', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').length).toBe(1); + expect(wrapper.contains({ column.text })).toBe(true); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js new file mode 100644 index 0000000..80abaa1 --- /dev/null +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -0,0 +1,28 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import HeaderCell from '../src/header-cell'; +import Header from '../src/header'; + +describe('Header', () => { + let wrapper; + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + describe('simplest header', () => { + beforeEach(() => { + wrapper = shallow(
); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tr').length).toBe(1); + expect(wrapper.find(HeaderCell).length).toBe(columns.length); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js new file mode 100644 index 0000000..dfe3f4b --- /dev/null +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -0,0 +1,33 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import Cell from '../src/cell'; +import Row from '../src/row'; + +describe('Row', () => { + let wrapper; + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + const row = { + id: 1, + name: 'A' + }; + + describe('simplest row', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tr').length).toBe(1); + expect(wrapper.find(Cell).length).toBe(Object.keys(row).length); + }); + }); +}); From 6b7d1f9aa244ed58eab695e05c0769e2b3e2082f Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 20 Aug 2017 01:43:24 -0500 Subject: [PATCH 004/136] Allen/feature 9 (#10) Fix #9 --- package.json | 1 + .../src/bootstrap-table.js | 30 ++++++++++-- .../test/bootstrap-table.test.js | 46 ++++++++++++++++++- 3 files changed, 73 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e1b9516..795679c 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "webpack-dev-server": "^2.7.1" }, "dependencies": { + "classnames": "^2.2.5", "prop-types": "^15.5.10", "react": "^15.6.1", "react-dom": "^15.6.1" diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 0b09cc5..36c8f00 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import cs from 'classnames'; import Header from './header'; import Body from './body'; @@ -12,10 +13,25 @@ class BootstrapTable extends storeBase(Component) { } render() { - const { columns, keyField } = this.props; + const { + columns, + keyField, + striped, + hover, + bordered, + condensed + } = this.props; + + const tableClass = cs('table', { + 'table-striped': striped, + 'table-hover': hover, + 'table-bordered': bordered, + 'table-condensed': condensed + }); + return (
- +
{ it('should render successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.find('table').length).toBe(1); + expect(wrapper.find('table.table').length).toBe(1); expect(wrapper.find(Header).length).toBe(1); expect(wrapper.find(Body).length).toBe(1); expect(wrapper.find('.react-bootstrap-table-container').length).toBe(1); }); + + it('should have table-bordered class as default', () => { + expect(wrapper.find('table.table-bordered').length).toBe(1); + }); + }); + + describe('when hover is true', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should have table-hover class on table', () => { + expect(wrapper.find('table.table-hover').length).toBe(1); + }); + }); + + describe('when striped is true', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should have table-striped class on table', () => { + expect(wrapper.find('table.table-striped').length).toBe(1); + }); + }); + + describe('when condensed is true', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should have table-condensed class on table', () => { + expect(wrapper.find('table.table-condensed').length).toBe(1); + }); + }); + + describe('when bordered is false', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should not have table-condensed class on table', () => { + expect(wrapper.find('table.table-condensed').length).toBe(0); + }); }); }); From 7c424a237341e98e3220786a6bdbe4d74999acec Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 20 Aug 2017 04:04:45 -0500 Subject: [PATCH 005/136] Implement column formatter (#13) fix #12 --- package.json | 1 + packages/react-bootstrap-table2/src/body.js | 9 +++- packages/react-bootstrap-table2/src/cell.js | 16 +++++-- packages/react-bootstrap-table2/src/row.js | 13 ++++-- .../test/bootstrap-table.test.js | 8 ++-- .../react-bootstrap-table2/test/cell.test.js | 46 +++++++++++++++++-- .../react-bootstrap-table2/test/row.test.js | 2 +- 7 files changed, 78 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 795679c..da919a0 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "jest-babel": "^1.0.1", "lerna": "^2.0.0", "react-test-renderer": "^15.6.1", + "sinon": "^3.2.1", "webpack": "^3.5.4", "webpack-dev-server": "^2.7.1" }, diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index e9e968e..9b69cb9 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -6,8 +6,13 @@ import Row from './row'; const Body = ({ columns, data, keyField }) => (
{ - data.map(row => ( - + data.map((row, index) => ( + )) } diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 7a1c4f7..e5cf90e 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -2,12 +2,20 @@ import React from 'react'; import PropTypes from 'prop-types'; -const Cell = ({ value }) => ( - -); +const Cell = ({ row, rowIndex, column }) => { + let content = row[column.dataField]; + if (column.formatter) { + content = column.formatter(content, row, rowIndex, column.formatExtraData); + } + return ( + + ); +}; Cell.propTypes = { - value: PropTypes.any.isRequired + row: PropTypes.object.isRequired, + rowIndex: PropTypes.number.isRequired, + column: PropTypes.object.isRequired }; export default Cell; diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 3feffd6..94a0aba 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -3,18 +3,25 @@ import PropTypes from 'prop-types'; import Cell from './cell'; -const Row = ({ row, columns }) => ( +const Row = ({ row, rowIndex, columns }) => ( { columns.map(column => - - ) + ( + + )) } ); Row.propTypes = { row: PropTypes.object.isRequired, + rowIndex: PropTypes.number.isRequired, columns: PropTypes.array.isRequired }; diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index 417074d..c712b72 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -41,7 +41,7 @@ describe('BootstrapTable', () => { }); }); - describe('when hover is true', () => { + describe('when hover props is true', () => { beforeEach(() => { wrapper = shallow(); }); @@ -51,7 +51,7 @@ describe('BootstrapTable', () => { }); }); - describe('when striped is true', () => { + describe('when striped props is true', () => { beforeEach(() => { wrapper = shallow(); }); @@ -61,7 +61,7 @@ describe('BootstrapTable', () => { }); }); - describe('when condensed is true', () => { + describe('when condensed props is true', () => { beforeEach(() => { wrapper = shallow(); }); @@ -71,7 +71,7 @@ describe('BootstrapTable', () => { }); }); - describe('when bordered is false', () => { + describe('when bordered props is false', () => { beforeEach(() => { wrapper = shallow(); }); diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 078e5d8..0649ca5 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -1,20 +1,60 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; import Cell from '../src/cell'; describe('Cell', () => { let wrapper; - const value = 'test'; + const row = { + id: 1, + name: 'A' + }; describe('simplest cell', () => { + const column = { + dataField: 'id', + text: 'ID' + }; + beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.contains()).toBe(true); + expect(wrapper.contains()).toBe(true); + }); + }); + + describe('when formatter prop is defined', () => { + const rowIndex = 1; + const column = { + dataField: 'id', + text: 'ID', + formatExtraData: [] + }; + const formatterResult = (

{ row[column.dataField] }

); + const formatter = sinon.stub() + .withArgs(row[column.dataField], row, rowIndex, column.formatExtraData) + .returns(formatterResult); + column.formatter = formatter; // defined column formatter + + beforeEach(() => { + wrapper = shallow(); + }); + + afterEach(() => { formatter.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.contains()).toBe(true); + }); + + it('should call custom formatter correctly', () => { + expect(formatter.callCount).toBe(1); + expect(formatter.calledWith(row[column.dataField], + row, rowIndex, column.formatExtraData)).toBe(true); }); }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index dfe3f4b..0b111cc 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -21,7 +21,7 @@ describe('Row', () => { describe('simplest row', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { From 1e32ea245f3be3f7c88291ad2f5bcb283fe79e36 Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 20 Aug 2017 07:02:14 -0500 Subject: [PATCH 006/136] Support nested data (#15) fix #14 --- packages/react-bootstrap-table2/src/body.js | 3 ++- packages/react-bootstrap-table2/src/cell.js | 3 ++- packages/react-bootstrap-table2/src/row.js | 3 ++- packages/react-bootstrap-table2/src/utils.js | 18 ++++++++++++++ .../react-bootstrap-table2/test/utils.test.js | 24 +++++++++++++++++++ 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 packages/react-bootstrap-table2/src/utils.js create mode 100644 packages/react-bootstrap-table2/test/utils.test.js diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 9b69cb9..33a8c18 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +import _ from './utils'; import Row from './row'; const Body = ({ columns, data, keyField }) => ( @@ -8,7 +9,7 @@ const Body = ({ columns, data, keyField }) => ( { data.map((row, index) => ( { - let content = row[column.dataField]; + let content = _.get(row, column.dataField); if (column.formatter) { content = column.formatter(content, row, rowIndex, column.formatExtraData); } diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 94a0aba..fdaad04 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +import _ from './utils'; import Cell from './cell'; const Row = ({ row, rowIndex, columns }) => ( @@ -9,7 +10,7 @@ const Row = ({ row, rowIndex, columns }) => ( columns.map(column => ( curr[path], target); + } catch (e) {} + return result; +} + +export default { + get +}; diff --git a/packages/react-bootstrap-table2/test/utils.test.js b/packages/react-bootstrap-table2/test/utils.test.js new file mode 100644 index 0000000..feb33e9 --- /dev/null +++ b/packages/react-bootstrap-table2/test/utils.test.js @@ -0,0 +1,24 @@ +import _ from '../src/utils'; + +describe('Utils', () => { + describe('get', () => { + const data = { + name: 'A', + address: { + road: 'BCD', + postal: '1234-12345', + city: { + name: 'B' + } + } + }; + + it('should return correct data', () => { + expect(_.get(data, 'name')).toEqual(data.name); + expect(_.get(data, 'address.road')).toEqual(data.address.road); + expect(_.get(data, 'address.city.name')).toEqual(data.address.city.name); + expect(_.get(data, 'address.notExist')).toEqual(undefined); + expect(_.get(data, 'address.not.exist')).toEqual(undefined); + }); + }); +}); From f62d4b11309f77c5ee0dd1678c5535edf1c42084 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sun, 20 Aug 2017 20:36:23 +0800 Subject: [PATCH 007/136] CI environment setup (#16) fix #7 --- .travis.yml | 20 +++ package.json | 6 +- yarn.lock | 397 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 257 insertions(+), 166 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bfcdb77 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: node_js + +node_js: + - "7" + - "6" + +cache: + yarn: true + +branches: + only: + # skip master branch when it's under development phase + # - master + - develop + +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash -s + - export PATH="$HOME/.yarn/bin:$PATH" + +install: yarn --frozen-lockfile diff --git a/package.json b/package.json index da919a0..d486622 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "devDependencies": { "babel-core": "^6.25.0", "babel-eslint": "^7.2.3", + "babel-jest": "^20.0.3", "babel-loader": "^7.1.1", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", @@ -31,14 +32,13 @@ "babel-register": "^6.24.1", "enzyme": "^2.9.1", "eslint": "^4.5.0", - "eslint-config-airbnb": "^14.1.0", + "eslint-config-airbnb": "15.1.0", "eslint-loader": "^1.9.0", "eslint-plugin-import": "^2.7.0", - "eslint-plugin-jsx-a11y": "^4.0.0", + "eslint-plugin-jsx-a11y": "5.1.1", "eslint-plugin-react": "^7.2.1", "html-webpack-plugin": "^2.30.1", "jest": "^20.0.4", - "jest-babel": "^1.0.1", "lerna": "^2.0.0", "react-test-renderer": "^15.6.1", "sinon": "^3.2.1", diff --git a/yarn.lock b/yarn.lock index 96d5926..3060476 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,5 +1,14 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + +JSONStream@^1.0.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abab@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" @@ -145,9 +154,9 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -aria-query@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.3.0.tgz#cb8a9984e2862711c83c80ade5b8f5ca0de2b467" +aria-query@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" dependencies: ast-types-flow "0.0.7" @@ -169,14 +178,14 @@ array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" -array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -222,14 +231,14 @@ asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -assert-plus@^1.0.0, assert-plus@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - assert@^1.1.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" @@ -266,6 +275,12 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +axobject-query@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" + dependencies: + ast-types-flow "0.0.7" + babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -1117,18 +1132,18 @@ browserify-zlib@^0.1.4: dependencies: pako "~0.2.0" -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - dependencies: - node-int64 "^0.4.0" - bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" dependencies: node-int64 "^0.4.0" +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + buffer-indexof@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.0.tgz#f54f647c4f4e25228baa656a2e57e43d5f270982" @@ -1285,6 +1300,10 @@ circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" +classnames@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" + clean-css@4.1.x: version "4.1.7" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.7.tgz#b9aea4f85679889cf3eae8b40349ec4ebdfdd032" @@ -1363,7 +1382,7 @@ command-join@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" -commander@~2.11.0, commander@2.11.x: +commander@2.11.x, commander@~2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" @@ -1569,8 +1588,8 @@ conventional-commits-parser@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" dependencies: - is-text-path "^1.0.0" JSONStream "^1.0.4" + is-text-path "^1.0.0" lodash "^4.2.1" meow "^3.3.0" split2 "^2.0.0" @@ -1581,8 +1600,8 @@ conventional-commits-parser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" dependencies: - is-text-path "^1.0.0" JSONStream "^1.0.4" + is-text-path "^1.0.0" lodash "^4.2.1" meow "^3.3.0" split2 "^2.0.0" @@ -1621,7 +1640,7 @@ core-js@^2.4.0, core-js@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" -core-util-is@~1.0.0, core-util-is@1.0.2: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1702,7 +1721,7 @@ css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" -"cssom@>= 0.3.2 < 0.4.0", cssom@0.3.x: +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" @@ -1751,7 +1770,7 @@ dateformat@^1.0.11, dateformat@^1.0.12: get-stdin "^4.0.1" meow "^3.3.0" -debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@2.6.8: +debug@2.6.8, debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -1827,7 +1846,7 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@~1.1.1, depd@1.1.1: +depd@1.1.1, depd@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" @@ -1856,7 +1875,7 @@ detect-node@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" -diff@^3.2.0: +diff@^3.1.0, diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" @@ -1885,16 +1904,16 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" -doctrine@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" dependencies: esutils "^2.0.2" isarray "^1.0.0" @@ -1905,7 +1924,7 @@ dom-converter@~0.1: dependencies: utila "~0.3" -dom-serializer@~0.1.0, dom-serializer@0: +dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" dependencies: @@ -1916,7 +1935,7 @@ domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" -domelementtype@^1.3.0, domelementtype@1: +domelementtype@1, domelementtype@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" @@ -1924,23 +1943,16 @@ domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" -domhandler@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" - dependencies: - domelementtype "1" - domhandler@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" dependencies: domelementtype "1" -domutils@^1.5.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.6.2.tgz#1958cc0b4c9426e9ed367fb1c8e854891b0fa3ff" +domhandler@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" dependencies: - dom-serializer "0" domelementtype "1" domutils@1.1: @@ -1956,6 +1968,13 @@ domutils@1.5.1: dom-serializer "0" domelementtype "1" +domutils@^1.5.1: + version "1.6.2" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.6.2.tgz#1958cc0b4c9426e9ed367fb1c8e854891b0fa3ff" + dependencies: + dom-serializer "0" + domelementtype "1" + dot-prop@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" @@ -2071,7 +2090,7 @@ es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@2: +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: @@ -2100,7 +2119,7 @@ es6-set@~0.1.5: es6-symbol "3.1.1" event-emitter "~0.3.5" -es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1, es6-symbol@3.1.1: +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: @@ -2144,17 +2163,17 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-airbnb-base@^11.1.0: +eslint-config-airbnb-base@^11.3.0: version "11.3.1" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.1.tgz#c0ab108c9beed503cb999e4c60f4ef98eda0ed30" dependencies: eslint-restricted-globals "^0.1.1" -eslint-config-airbnb@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.1.0.tgz#355d290040bbf8e00bf8b4b19f4b70cbe7c2317f" +eslint-config-airbnb@15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e" dependencies: - eslint-config-airbnb-base "^11.1.0" + eslint-config-airbnb-base "^11.3.0" eslint-import-resolver-node@^0.3.1: version "0.3.1" @@ -2195,16 +2214,17 @@ eslint-plugin-import@^2.7.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-jsx-a11y@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz#779bb0fe7b08da564a422624911de10061e048ee" +eslint-plugin-jsx-a11y@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1" dependencies: - aria-query "^0.3.0" + aria-query "^0.7.0" + array-includes "^3.0.3" ast-types-flow "0.0.7" + axobject-query "^0.1.0" damerau-levenshtein "^1.0.0" emoji-regex "^6.1.0" - jsx-ast-utils "^1.0.0" - object-assign "^4.0.1" + jsx-ast-utils "^1.4.0" eslint-plugin-react@^7.2.1: version "7.2.1" @@ -2431,7 +2451,7 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extsprintf@^1.2.0, extsprintf@1.3.0: +extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -2589,6 +2609,12 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +formatio@1.2.0, formatio@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb" + dependencies: + samsam "1.x" + forwarded@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" @@ -2987,14 +3013,14 @@ https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" -iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@^0.4.17, iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" @@ -3024,7 +3050,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@2, inherits@2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -3253,14 +3279,14 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -3351,10 +3377,6 @@ jest: dependencies: jest-cli "^20.0.4" -jest-babel: - version "1.0.1" - resolved "https://registry.yarnpkg.com/jest-babel/-/jest-babel-1.0.1.tgz#ef659df0e9397b083c0f6aebd4cb8cfaa77df8bf" - jest-changed-files@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" @@ -3655,13 +3677,6 @@ jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" -JSONStream@^1.0.4: - version "1.3.1" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3671,7 +3686,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsx-ast-utils@^1.0.0: +jsx-ast-utils@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" @@ -3681,6 +3696,10 @@ jsx-ast-utils@^2.0.0: dependencies: array-includes "^3.0.3" +just-extend@^1.1.22: + version "1.1.22" + resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.22.tgz#3330af756cab6a542700c64b2e4e4aa062d52fff" + kind-of@^3.0.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -3885,6 +3904,14 @@ loglevel@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.4.1.tgz#95b383f91a3c2756fd4ab093667e4309161f2bcd" +lolex@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6" + +lolex@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.1.2.tgz#2694b953c9ea4d013e5b8bfba891c991025b2629" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -4008,14 +4035,14 @@ mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: dependencies: mime-db "~1.29.0" -mime@^1.3.4: - version "1.3.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" - mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" +mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -4034,6 +4061,10 @@ minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + minimist@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" @@ -4046,11 +4077,7 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@0.5.1, mkdirp@0.5.x: +mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -4087,6 +4114,10 @@ nan@^2.3.0: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" +native-promise-only@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4101,6 +4132,15 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" +nise@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nise/-/nise-1.0.1.tgz#0da92b10a854e97c0f496f6c2845a301280b3eef" + dependencies: + formatio "^1.2.0" + just-extend "^1.1.22" + lolex "^1.6.0" + path-to-regexp "^1.7.0" + no-case@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.1.tgz#7aeba1c73a52184265554b7dc03baf720df80081" @@ -4466,6 +4506,12 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" +path-to-regexp@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -4612,26 +4658,26 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + q@^1.4.1: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - qs@6.5.0: version "6.5.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -4640,14 +4686,14 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -querystringify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" - querystringify@0.0.x: version "0.0.4" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" +querystringify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" + randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" @@ -4736,6 +4782,15 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" +readable-stream@1.0: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" @@ -4748,15 +4803,6 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable string_decoder "~1.0.3" util-deprecate "~1.0.1" -readable-stream@1.0: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -4896,16 +4942,16 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolve@^1.2.0, resolve@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" dependencies: path-parse "^1.0.5" -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -4919,7 +4965,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1, rimraf@2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -4948,10 +4994,14 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@5.1.1: +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" +samsam@1.x, samsam@^1.1.3: + version "1.2.1" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.2.1.tgz#edd39093a3184370cb859243b2bdf255e7d8ea67" + sane@~1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" @@ -4978,7 +5028,7 @@ selfsigned@^1.9.1: dependencies: node-forge "0.6.33" -semver@^5.0.1, semver@^5.1.0, semver@^5.3.0, "semver@2 || 3 || 4 || 5": +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0, semver@^5.3.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -5061,6 +5111,20 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +sinon@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-3.2.1.tgz#d8adabd900730fd497788a027049c64b08be91c2" + dependencies: + diff "^3.1.0" + formatio "1.2.0" + lolex "^2.1.2" + native-promise-only "^0.8.1" + nise "^1.0.1" + path-to-regexp "^1.7.0" + samsam "^1.1.3" + text-encoding "0.6.4" + type-detect "^4.0.0" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -5115,16 +5179,16 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" -source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@0.5.x: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -5168,18 +5232,18 @@ spdy@^3.4.1: select-hose "^2.0.0" spdy-transport "^2.0.18" -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - dependencies: - through "2" - split2@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" dependencies: through2 "^2.0.2" +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + dependencies: + through "2" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -5219,16 +5283,6 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - string-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -5250,6 +5304,16 @@ string-width@^2.0.0, string-width@^2.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -5266,16 +5330,16 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0, strip-bom@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -5388,6 +5452,10 @@ test-exclude@^4.1.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" +text-encoding@0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" + text-extensions@^1.0.0: version "1.5.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" @@ -5400,10 +5468,6 @@ throat@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" -through@^2.3.4, through@^2.3.6, "through@>=2.2.7 <3", through@2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - through2@^2.0.0, through2@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" @@ -5411,6 +5475,10 @@ through2@^2.0.0, through2@^2.0.2: readable-stream "^2.1.5" xtend "~4.0.1" +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + thunky@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/thunky/-/thunky-0.1.0.tgz#bf30146824e2b6e67b0f2d7a4ac8beb26908684e" @@ -5493,6 +5561,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-detect@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea" + type-is@~1.6.15: version "1.6.15" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" @@ -5508,6 +5580,13 @@ ua-parser-js@^0.7.9: version "0.7.14" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" +uglify-js@3.0.x: + version "3.0.27" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.27.tgz#a97db8c8ba6b9dba4e2f88d86aa9548fa6320034" + dependencies: + commander "~2.11.0" + source-map "~0.5.1" + uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" @@ -5517,13 +5596,6 @@ uglify-js@^2.6, uglify-js@^2.8.29: optionalDependencies: uglify-to-browserify "~1.0.0" -uglify-js@3.0.x: - version "3.0.27" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.27.tgz#a97db8c8ba6b9dba4e2f88d86aa9548fa6320034" - dependencies: - commander "~2.11.0" - source-map "~0.5.1" - uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" @@ -5552,13 +5624,6 @@ upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" -url-parse@^1.1.8: - version "1.1.9" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.9.tgz#c67f1d775d51f0a18911dd7b3ffad27bb9e5bd19" - dependencies: - querystringify "~1.0.0" - requires-port "1.0.x" - url-parse@1.0.x: version "1.0.5" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" @@ -5566,6 +5631,13 @@ url-parse@1.0.x: querystringify "0.0.x" requires-port "1.0.x" +url-parse@^1.1.8: + version "1.1.9" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.9.tgz#c67f1d775d51f0a18911dd7b3ffad27bb9e5bd19" + dependencies: + querystringify "~1.0.0" + requires-port "1.0.x" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -5577,7 +5649,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@^0.10.3, util@0.10.3: +util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -5789,6 +5861,10 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -5797,10 +5873,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - worker-farm@^1.3.1: version "1.5.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" @@ -5951,4 +6023,3 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" - From 1c07b6cbd39f036765eaed2ac45749d645517d25 Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 22 Aug 2017 10:35:13 -0500 Subject: [PATCH 008/136] Implement custom style/class on cell (#20) fix #19 --- packages/react-bootstrap-table2/src/cell.js | 27 ++++- packages/react-bootstrap-table2/src/row.js | 3 +- packages/react-bootstrap-table2/src/utils.js | 7 +- .../react-bootstrap-table2/test/cell.test.js | 114 +++++++++++++++++- 4 files changed, 138 insertions(+), 13 deletions(-) diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index ef70d54..a585d20 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -3,20 +3,35 @@ import PropTypes from 'prop-types'; import _ from './utils'; -const Cell = ({ row, rowIndex, column }) => { - let content = _.get(row, column.dataField); - if (column.formatter) { - content = column.formatter(content, row, rowIndex, column.formatExtraData); +const Cell = ({ row, rowIndex, column, columnIndex }) => { + const { + dataField, + formatter, + formatExtraData, + style, + classes + } = column; + let content = _.get(row, dataField); + const cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; + const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; + if (formatter) { + content = column.formatter(content, row, rowIndex, formatExtraData); } + + const attrs = { + style: cellStyle, + className: cellClasses + }; return ( - + ); }; Cell.propTypes = { row: PropTypes.object.isRequired, rowIndex: PropTypes.number.isRequired, - column: PropTypes.object.isRequired + column: PropTypes.object.isRequired, + columnIndex: PropTypes.number.isRequired }; export default Cell; diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index fdaad04..842127c 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -7,12 +7,13 @@ import Cell from './cell'; const Row = ({ row, rowIndex, columns }) => ( { - columns.map(column => + columns.map((column, index) => ( )) diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index 42a3cb5..bee745a 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -13,6 +13,11 @@ function get(target, field) { return result; } +function isFunction(obj) { + return obj && (typeof obj === 'function'); +} + export default { - get + get, + isFunction }; diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 0649ca5..45157c2 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -18,16 +18,16 @@ describe('Cell', () => { }; beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.contains()).toBe(true); + expect(wrapper.text()).toEqual(row[column.dataField].toString()); }); }); - describe('when formatter prop is defined', () => { + describe('when column.formatter prop is defined', () => { const rowIndex = 1; const column = { dataField: 'id', @@ -41,14 +41,16 @@ describe('Cell', () => { column.formatter = formatter; // defined column formatter beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); afterEach(() => { formatter.reset(); }); it('should render successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.contains()).toBe(true); + expect(wrapper.find('h3').length).toBe(1); + expect(wrapper.text()).toEqual(row[column.dataField].toString()); }); it('should call custom formatter correctly', () => { @@ -57,4 +59,106 @@ describe('Cell', () => { row, rowIndex, column.formatExtraData)).toBe(true); }); }); + + describe('when column.style prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when style is an object', () => { + beforeEach(() => { + column.style = { backgroundColor: 'red' }; + wrapper = shallow( + ); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('style')).toEqual(column.style); + }); + }); + + describe('when style is a function', () => { + const returnStyle = { backgroundColor: 'red' }; + let styleCallBack; + + beforeEach(() => { + styleCallBack = sinon.stub() + .withArgs(row[column.dataField], row, columnIndex) + .returns(returnStyle); + column.style = styleCallBack; + wrapper = shallow( + ); + }); + + afterEach(() => { styleCallBack.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('style')).toEqual(returnStyle); + }); + + it('should call custom style function correctly', () => { + expect(styleCallBack.callCount).toBe(1); + expect(styleCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + }); + }); + }); + + describe('when column.classes prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when classes is an object', () => { + beforeEach(() => { + column.classes = 'td-test-class'; + wrapper = shallow( + ); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(column.classes)).toBe(true); + }); + }); + + describe('when classes is a function', () => { + const returnClasses = 'td-test-class'; + let classesCallBack; + + beforeEach(() => { + classesCallBack = sinon.stub() + .withArgs(row[column.dataField], row, columnIndex) + .returns(returnClasses); + column.classes = classesCallBack; + wrapper = shallow( + ); + }); + + afterEach(() => { classesCallBack.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(returnClasses)).toBe(true); + }); + + it('should call custom classes function correctly', () => { + expect(classesCallBack.callCount).toBe(1); + expect(classesCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + }); + }); + }); }); From 20bb9c0d1b08e68b625b63fbe3a97e6236b4c7a6 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 26 Aug 2017 02:24:00 -0500 Subject: [PATCH 009/136] Implement column title (#22) fix #21 --- .../src/index.js | 60 ++++++++++++++++++- packages/react-bootstrap-table2/src/cell.js | 19 ++++-- .../react-bootstrap-table2/src/header-cell.js | 32 +++++++--- packages/react-bootstrap-table2/src/header.js | 5 +- .../react-bootstrap-table2/test/cell.test.js | 49 +++++++++++++++ .../test/header-cell.test.js | 58 ++++++++++++++++-- 6 files changed, 203 insertions(+), 20 deletions(-) diff --git a/packages/react-bootstrap-table2-example/src/index.js b/packages/react-bootstrap-table2-example/src/index.js index 642fdb1..e6730f5 100644 --- a/packages/react-bootstrap-table2-example/src/index.js +++ b/packages/react-bootstrap-table2-example/src/index.js @@ -3,8 +3,64 @@ import ReactDom from 'react-dom'; import { BootstrapTable } from 'react-bootstrap-table2'; -const data = [1, 2, 3, 4]; +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + nest: { + address: 'Address 1', + postcal: '0922-1234' + } + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + style: { + backgroundColor: 'red' + }, + headerTitle: (column, colIndex) => { + console.log(column); + console.log(colIndex); + return 'yes~~~ oh'; + }, + classes: 'my-xxx' +}, { + dataField: 'name', + text: 'Product Name', + headerTitle: true, + formatter: (cell, row) => + (

{ cell }::: ${ row.price }

) +}, { + dataField: 'price', + text: 'Product Price', + style: (cell, row, colIndex) => { + console.log(cell); + console.log(row); + console.log(colIndex); + return { + backgroundColor: 'blue' + }; + } +}, { + dataField: 'nest.address', + text: 'Address' +}, { + dataField: 'nest.postcal', + text: 'Postal' +}]; + ReactDom.render( - , + , document.getElementById('example')); diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index a585d20..8d082fe 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -9,19 +9,28 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { formatter, formatExtraData, style, - classes + classes, + title } = column; let content = _.get(row, dataField); + let cellTitle; + + const attrs = {}; const cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; + + if (title) { + cellTitle = _.isFunction(title) ? title(content, row, columnIndex) : content; + attrs.title = cellTitle; + } + if (formatter) { content = column.formatter(content, row, rowIndex, formatExtraData); } - const attrs = { - style: cellStyle, - className: cellClasses - }; + attrs.style = cellStyle; + attrs.className = cellClasses; + return (
); diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index e43713b..2385017 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -1,18 +1,36 @@ import React from 'react'; import PropTypes from 'prop-types'; +import _ from './utils'; -const HeaderCell = ({ column }) => ( - -); + +const HeaderCell = ({ column, index }) => { + const { headerTitle, text } = column; + const attrs = {}; + + if (headerTitle) { + attrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; + } + + return ( + + ); +}; HeaderCell.propTypes = { column: PropTypes.shape({ dataField: PropTypes.string.isRequired, - text: PropTypes.string.isRequired - }).isRequired + text: PropTypes.string.isRequired, + formatter: PropTypes.func, + formatExtraData: PropTypes.any, + classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + headerTitle: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]) + }).isRequired, + index: PropTypes.number.isRequired }; export default HeaderCell; diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index 692e920..eddf6a2 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -7,7 +7,10 @@ import HeaderCell from './header-cell'; const Header = ({ columns }) => ( - { columns.map(column => ) } + { + columns.map((column, i) => + ) + } ); diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 45157c2..1b204ed 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -161,4 +161,53 @@ describe('Cell', () => { }); }); }); + + describe('when column.title prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when title is boolean', () => { + beforeEach(() => { + column.title = true; + wrapper = shallow( + ); + }); + + it('should render title as cell value as default', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('title')).toEqual(row[column.dataField]); + }); + }); + + describe('when title is custom function', () => { + const customTitle = 'test_title'; + let titleCallBack; + + beforeEach(() => { + titleCallBack = sinon.stub() + .withArgs(row[column.dataField], row, columnIndex) + .returns(customTitle); + column.title = titleCallBack; + wrapper = shallow( + ); + }); + + it('should render title correctly by custom title function', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('title')).toBe(customTitle); + }); + + it('should call custom title function correctly', () => { + expect(titleCallBack.callCount).toBe(1); + expect(titleCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index e0cc3f7..56a9727 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -1,18 +1,21 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; import HeaderCell from '../src/header-cell'; describe('HeaderCell', () => { let wrapper; - const column = { - dataField: 'id', - text: 'ID' - }; + const index = 1; describe('simplest header cell', () => { + const column = { + dataField: 'id', + text: 'ID' + }; + beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { @@ -21,4 +24,49 @@ describe('HeaderCell', () => { expect(wrapper.contains()).toBe(true); }); }); + + describe('when column.headerTitle prop is defined', () => { + let column; + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when headerTitle is boolean', () => { + beforeEach(() => { + column.headerTitle = true; + wrapper = shallow(); + }); + + it('should render title as column.text as default', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('title')).toBe(column.text); + }); + }); + + describe('when headerTitle is custom function', () => { + const customTitle = 'test_title'; + let titleCallBack; + + beforeEach(() => { + titleCallBack = sinon.stub() + .withArgs(column) + .returns(customTitle); + column.headerTitle = titleCallBack; + wrapper = shallow(); + }); + + it('should render title correctly by custom title function', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('title')).toBe(customTitle); + }); + + it('should call custom title function correctly', () => { + expect(titleCallBack.callCount).toBe(1); + expect(titleCallBack.calledWith(column)).toBe(true); + }); + }); + }); }); From 95ca444edda542c35988e58e962eb4d3a45151df Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 26 Aug 2017 03:06:10 -0500 Subject: [PATCH 010/136] add event hooks on column (#25) fix #23 --- packages/react-bootstrap-table2/src/cell.js | 7 +++-- .../react-bootstrap-table2/src/header-cell.js | 3 +- .../react-bootstrap-table2/test/cell.test.js | 28 +++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 8d082fe..3286847 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -10,12 +10,15 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { formatExtraData, style, classes, - title + title, + events } = column; let content = _.get(row, dataField); let cellTitle; - const attrs = {}; + const attrs = { + ...events + }; const cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 2385017..49b455a 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -28,7 +28,8 @@ HeaderCell.propTypes = { classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headerTitle: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), - title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]) + title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + events: PropTypes.object }).isRequired, index: PropTypes.number.isRequired }; diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 1b204ed..fc054a2 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -210,4 +210,32 @@ describe('Cell', () => { }); }); }); + + describe('when column.events prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID', + events: { + onClick: sinon.stub() + } + }; + + wrapper = shallow( + ); + }); + + it('should attachs DOM event successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('onClick')).toBeDefined(); + }); + + it('event hook should be called when triggering', () => { + wrapper.find('td').simulate('click'); + expect(column.events.onClick.callCount).toBe(1); + }); + }); }); From b2bd0fc81af00f8b055a6d3697a0af512437f476 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 26 Aug 2017 04:05:25 -0500 Subject: [PATCH 011/136] implement align on header & body cell (#27) fix #24 --- packages/react-bootstrap-table2/src/cell.js | 15 ++++-- .../react-bootstrap-table2/src/header-cell.js | 13 ++++- .../react-bootstrap-table2/test/cell.test.js | 49 +++++++++++++++++ .../test/header-cell.test.js | 52 ++++++++++++++++++- 4 files changed, 123 insertions(+), 6 deletions(-) diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 3286847..844e501 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -11,17 +11,22 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { style, classes, title, - events + events, + align } = column; - let content = _.get(row, dataField); let cellTitle; + let cellStyle = {}; + let content = _.get(row, dataField); const attrs = { ...events }; - const cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; + if (style) { + cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; + } + if (title) { cellTitle = _.isFunction(title) ? title(content, row, columnIndex) : content; attrs.title = cellTitle; @@ -31,6 +36,10 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { content = column.formatter(content, row, rowIndex, formatExtraData); } + if (align) { + cellStyle.textAlign = _.isFunction(align) ? align(content, row, columnIndex) : align; + } + attrs.style = cellStyle; attrs.className = cellClasses; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 49b455a..0d3e1fd 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -5,13 +5,20 @@ import _ from './utils'; const HeaderCell = ({ column, index }) => { - const { headerTitle, text } = column; + const { headerTitle, text, headerAlign } = column; const attrs = {}; + const headerStyle = {}; if (headerTitle) { attrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; } + if (headerAlign) { + headerStyle.textAlign = _.isFunction(headerAlign) ? headerAlign(column, index) : headerAlign; + } + + attrs.style = headerStyle; + return ( )).toBe(true); + expect(wrapper.text()).toEqual(column.text); + }); + + it('should have correct default style', () => { + const style = wrapper.find('th').prop('style'); + expect(style).toBeDefined(); }); }); @@ -69,4 +74,49 @@ describe('HeaderCell', () => { }); }); }); + + describe('when column.headerAlign prop is defined', () => { + let column; + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when headerAlign is string', () => { + beforeEach(() => { + column.headerAlign = 'center'; + wrapper = shallow(); + }); + + it('should render style.textAlign correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('style').textAlign).toBe(column.headerAlign); + }); + }); + + describe('when headerAlign is custom function', () => { + const customAlign = 'center'; + let alignCallBack; + + beforeEach(() => { + alignCallBack = sinon.stub() + .withArgs(column, index) + .returns(customAlign); + column.headerAlign = alignCallBack; + wrapper = shallow(); + }); + + it('should render style.textAlign correctly by custom headerAlign function', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('style').textAlign).toBe(customAlign); + }); + + it('should call custom headerAlign function correctly', () => { + expect(alignCallBack.callCount).toBe(1); + expect(alignCallBack.calledWith(column, index)).toBe(true); + }); + }); + }); }); From b00007cde940755bf62cd1860df8bf688bda1a7d Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 26 Aug 2017 04:36:24 -0500 Subject: [PATCH 012/136] fix #26 --- .../react-bootstrap-table2/src/header-cell.js | 7 +++-- .../test/header-cell.test.js | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 0d3e1fd..40a9276 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -5,9 +5,10 @@ import _ from './utils'; const HeaderCell = ({ column, index }) => { - const { headerTitle, text, headerAlign } = column; + const { headerTitle, text, headerAlign, headerFormatter } = column; const attrs = {}; const headerStyle = {}; + const children = headerFormatter ? headerFormatter(column, index) : text; if (headerTitle) { attrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; @@ -19,9 +20,10 @@ const HeaderCell = ({ column, index }) => { attrs.style = headerStyle; + return ( ); }; @@ -30,6 +32,7 @@ HeaderCell.propTypes = { column: PropTypes.shape({ dataField: PropTypes.string.isRequired, text: PropTypes.string.isRequired, + headerFormatter: PropTypes.func, formatter: PropTypes.func, formatExtraData: PropTypes.any, classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 4e5ce23..78f826a 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -119,4 +119,32 @@ describe('HeaderCell', () => { }); }); }); + + describe('when column.headerFormatter prop is defined', () => { + const column = { + dataField: 'id', + text: 'ID' + }; + const formatterResult = (

{ column.text }

); + const formatter = sinon.stub() + .withArgs(column, index) + .returns(formatterResult); + column.headerFormatter = formatter; + + beforeEach(() => { + wrapper = shallow(); + }); + + afterEach(() => { formatter.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.contains(formatterResult)).toBe(true); + }); + + it('should call custom headerFormatter correctly', () => { + expect(formatter.callCount).toBe(1); + expect(formatter.calledWith(column, index)).toBe(true); + }); + }); }); From 4da199f4fc262add2746b476f8a89d9707a757af Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 26 Aug 2017 04:55:00 -0500 Subject: [PATCH 013/136] fix #29 --- .../react-bootstrap-table2/src/header-cell.js | 13 ++++++++-- .../test/header-cell.test.js | 26 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 40a9276..3f1e7b8 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -5,8 +5,16 @@ import _ from './utils'; const HeaderCell = ({ column, index }) => { - const { headerTitle, text, headerAlign, headerFormatter } = column; - const attrs = {}; + const { + text, + headerTitle, + headerAlign, + headerFormatter, + headerEvents + } = column; + const attrs = { + ...headerEvents + }; const headerStyle = {}; const children = headerFormatter ? headerFormatter(column, index) : text; @@ -39,6 +47,7 @@ HeaderCell.propTypes = { style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headerTitle: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + headerEvents: PropTypes.object, events: PropTypes.object, headerAlign: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 78f826a..76a2962 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -147,4 +147,30 @@ describe('HeaderCell', () => { expect(formatter.calledWith(column, index)).toBe(true); }); }); + + describe('when column.headerEvents prop is defined', () => { + let column; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID', + headerEvents: { + onClick: sinon.stub() + } + }; + + wrapper = shallow(); + }); + + it('should attachs DOM event successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('onClick')).toBeDefined(); + }); + + it('event hook should be called when triggering', () => { + wrapper.find('th').simulate('click'); + expect(column.headerEvents.onClick.callCount).toBe(1); + }); + }); }); From ee6afcb70513b717db25c63c4d1f1e8a768679e2 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sun, 27 Aug 2017 23:05:24 +0800 Subject: [PATCH 014/136] fix #17 * storybook environment setup * customized loader * add basic example of BasicTable * add script to bootstrap storybook * import bootstrap css for storybook * update webpack.config for adding loader for font and css * add sass loader and allow to customize css for storybook * uncheck lint for react-bootstrap-table-example * package example has its own lint check * run yarn in each package when boostrapping lerna * add peerDependencies for package example --- lerna.json | 3 +- package.json | 5 +- .../.storybook/addons.js | 4 + .../.storybook/config.js | 9 + .../.storybook/webpack.config.js | 50 + .../examples/basic/index.js | 53 + .../package.json | 13 +- .../stories/index.js | 16 + .../stories/stylesheet/storybook.scss | 1 + .../react-bootstrap-table2-example/yarn.lock | 4993 +++++++++++++++++ packages/react-bootstrap-table2/yarn.lock | 7 + webpack.config.babel.js | 14 +- yarn.lock | 219 +- 13 files changed, 5361 insertions(+), 26 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/.storybook/addons.js create mode 100644 packages/react-bootstrap-table2-example/.storybook/config.js create mode 100644 packages/react-bootstrap-table2-example/.storybook/webpack.config.js create mode 100644 packages/react-bootstrap-table2-example/examples/basic/index.js create mode 100644 packages/react-bootstrap-table2-example/stories/index.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss create mode 100644 packages/react-bootstrap-table2-example/yarn.lock create mode 100644 packages/react-bootstrap-table2/yarn.lock diff --git a/lerna.json b/lerna.json index b34dd47..8b7bad4 100644 --- a/lerna.json +++ b/lerna.json @@ -3,5 +3,6 @@ "packages": [ "packages/*" ], - "version": "0.0.0" + "version": "0.0.0", + "npmClient": "yarn" } diff --git a/package.json b/package.json index d486622..c78a245 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "pretest": "yarn lint --cache", "test": "jest", "test:coverage": "jest --coverage", - "test:watch": "jest --watch" + "test:watch": "jest --watch", + "storybook": "cd ./packages/react-bootstrap-table2-example && yarn storybook" }, "repository": { "type": "git", @@ -40,7 +41,9 @@ "html-webpack-plugin": "^2.30.1", "jest": "^20.0.4", "lerna": "^2.0.0", + "node-sass": "^4.5.3", "react-test-renderer": "^15.6.1", + "sass-loader": "^6.0.6", "sinon": "^3.2.1", "webpack": "^3.5.4", "webpack-dev-server": "^2.7.1" diff --git a/packages/react-bootstrap-table2-example/.storybook/addons.js b/packages/react-bootstrap-table2-example/.storybook/addons.js new file mode 100644 index 0000000..967b205 --- /dev/null +++ b/packages/react-bootstrap-table2-example/.storybook/addons.js @@ -0,0 +1,4 @@ +/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ + +import '@storybook/addon-actions/register'; +import '@storybook/addon-links/register'; diff --git a/packages/react-bootstrap-table2-example/.storybook/config.js b/packages/react-bootstrap-table2-example/.storybook/config.js new file mode 100644 index 0000000..6f68803 --- /dev/null +++ b/packages/react-bootstrap-table2-example/.storybook/config.js @@ -0,0 +1,9 @@ +/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ + +import { configure } from '@storybook/react'; + +function loadStories() { + require('stories'); +} + +configure(loadStories, module); diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js new file mode 100644 index 0000000..208e18e --- /dev/null +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -0,0 +1,50 @@ +const path = require('path'); + +const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/src'); +const storyPath = path.join(__dirname, '../stories'); +const examplesPath = path.join(__dirname, '../examples'); +const aliasPath = { + examples: examplesPath, + stories: storyPath, +}; + +const loaders = [{ + enforce: 'pre', + test: /\.js?$/, + exclude: /node_modules/, + include: [examplesPath, storyPath], + loader: 'eslint-loader', +}, { + test: /\.js?$/, + use: ['babel-loader'], + exclude: /node_modules/, + include: [sourcePath, storyPath], +}, { + test: /\.css$/, + use: ['style-loader', 'css-loader'], +}, { + test: /\.scss$/, + use: ['style-loader', 'css-loader', 'sass-loader'], + include: [storyPath, sourcePath, examplesPath], +}, { + test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, + loader: 'url-loader?limit=100000', +}]; + +// Export a function. Accept the base config as the only param. +module.exports = (storybookBaseConfig, configType) => { + // configType has a value of 'DEVELOPMENT' or 'PRODUCTION' + // You can change the configuration based on that. + // 'PRODUCTION' is used when building the static version of storybook. + + // loaders + loaders.forEach(value => { + storybookBaseConfig.module.rules.push(value); + }) + + // alias + storybookBaseConfig.resolve.alias = aliasPath; + + // Return the altered config + return storybookBaseConfig; +}; diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js new file mode 100644 index 0000000..dea94e0 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -0,0 +1,53 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + nest: { + address: 'Address 1', + postcal: '0922-1234' + } + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + style: { + backgroundColor: 'red' + }, + headerTitle: (column, colIndex) => 'yes~~~ oh', // eslint-disable-line no-unused-vars + classes: 'my-xxx' +}, { + dataField: 'name', + text: 'Product Name', + headerTitle: true, + formatter: (cell, row) => + (

{ cell }::: ${ row.price }

) +}, { + dataField: 'price', + text: 'Product Price', + style: (cell, row, colIndex) => ({ // eslint-disable-line no-unused-vars + backgroundColor: 'blue' + }) +}, { + dataField: 'nest.address', + text: 'Address' +}, { + dataField: 'nest.postcal', + text: 'Postal' +}]; + +export default () => ; diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index c1c7a06..15ea5f6 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -4,11 +4,22 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "storybook": "start-storybook -p 6006", + "build-storybook": "build-storybook" }, "author": "", "license": "ISC", + "peerDependencies": { + "prop-types": "^15.0.0", + "react": "^15.0.0", + "react-dom": "^15.0.0" + }, "dependencies": { + "bootstrap": "^3.3.7", "react-bootstrap-table2": "0.0.1" + }, + "devDependencies": { + "@storybook/react": "^3.2.8" } } diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js new file mode 100644 index 0000000..97fb566 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -0,0 +1,16 @@ +/* eslint import/no-unresolved: 0 */ +import React from 'react'; +import { storiesOf } from '@storybook/react'; +import { linkTo } from '@storybook/addon-links'; + +import { Welcome } from '@storybook/react/demo'; +import BasicTable from 'examples/basic/index.js'; + +// css style +import 'bootstrap/dist/css/bootstrap.min.css'; +import 'stories/stylesheet/storybook.scss'; + +storiesOf('Welcome', module).add('to Storybook', () => ); + +storiesOf('Basic Table', module) + .add('default', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss new file mode 100644 index 0000000..c5a965e --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -0,0 +1 @@ +/* customized style for storybook*/ diff --git a/packages/react-bootstrap-table2-example/yarn.lock b/packages/react-bootstrap-table2-example/yarn.lock new file mode 100644 index 0000000..6d9a83f --- /dev/null +++ b/packages/react-bootstrap-table2-example/yarn.lock @@ -0,0 +1,4993 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@hypnosphi/fuse.js@^3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@hypnosphi/fuse.js/-/fuse.js-3.0.9.tgz#ea99f6121b4a8f065b4c71f85595db2714498807" + +"@storybook/addon-actions@^3.2.6": + version "3.2.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.6.tgz#d8e476188a288f49f36a8482175bc2c1898dfc28" + dependencies: + "@storybook/addons" "^3.2.6" + deep-equal "^1.0.1" + json-stringify-safe "^5.0.1" + prop-types "^15.5.10" + react-inspector "^2.1.1" + uuid "^3.1.0" + +"@storybook/addon-links@^3.2.6": + version "3.2.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.6.tgz#93029ecee8a1a1939f01381c06ed19327acd746b" + dependencies: + "@storybook/addons" "^3.2.6" + +"@storybook/addons@^3.2.6": + version "3.2.6" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.6.tgz#c7974db36bd1b969d8ca3776f57fd955447dc7ed" + +"@storybook/channel-postmessage@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.2.0.tgz#612ff53120bf266660cb9328bac9ad671228a2f7" + dependencies: + "@storybook/channels" "^3.2.0" + global "^4.3.2" + json-stringify-safe "^5.0.1" + +"@storybook/channels@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.2.0.tgz#d75395212db76b49e3335f50cce5bc763cf0b5c6" + +"@storybook/components@^3.2.7": + version "3.2.7" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.2.7.tgz#7d4c7221851260e4236bbb3ef82a6494b23e5ec9" + dependencies: + glamor "^2.20.40" + glamorous "^4.1.2" + prop-types "^15.5.10" + +"@storybook/react-fuzzy@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@storybook/react-fuzzy/-/react-fuzzy-0.4.0.tgz#2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087" + dependencies: + babel-runtime "^6.23.0" + classnames "^2.2.5" + fuse.js "^3.0.1" + prop-types "^15.5.9" + +"@storybook/react@^3.2.8": + version "3.2.8" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.2.8.tgz#7d43ef450559b7cf3b3ecc17cc54d5a09d5ea402" + dependencies: + "@storybook/addon-actions" "^3.2.6" + "@storybook/addon-links" "^3.2.6" + "@storybook/addons" "^3.2.6" + "@storybook/channel-postmessage" "^3.2.0" + "@storybook/ui" "^3.2.7" + airbnb-js-shims "^1.1.1" + autoprefixer "^7.1.1" + babel-core "^6.25.0" + babel-loader "^7.0.0" + babel-plugin-react-docgen "^1.6.0" + babel-preset-env "^1.6.0" + babel-preset-minify "^0.2.0" + babel-preset-react "^6.24.1" + babel-preset-react-app "^3.0.0" + babel-preset-stage-0 "^6.24.1" + babel-runtime "^6.23.0" + case-sensitive-paths-webpack-plugin "^2.0.0" + chalk "^2.0.1" + commander "^2.9.0" + common-tags "^1.4.0" + configstore "^3.1.0" + css-loader "^0.28.1" + express "^4.15.3" + file-loader "^0.11.1" + find-cache-dir "^1.0.0" + glamor "^2.20.40" + glamorous "^4.1.2" + global "^4.3.2" + json-loader "^0.5.4" + json-stringify-safe "^5.0.1" + json5 "^0.5.1" + lodash.flattendeep "^4.4.0" + lodash.pick "^4.4.0" + postcss-flexbugs-fixes "^3.0.0" + postcss-loader "^2.0.5" + prop-types "^15.5.10" + qs "^6.4.0" + react-modal "^2.2.4" + redux "^3.6.0" + request "^2.81.0" + serve-favicon "^2.4.3" + shelljs "^0.7.8" + style-loader "^0.17.0" + url-loader "^0.5.8" + util-deprecate "^1.0.2" + uuid "^3.1.0" + webpack "^2.5.1 || ^3.0.0" + webpack-dev-middleware "^1.10.2" + webpack-hot-middleware "^2.18.0" + +"@storybook/ui@^3.2.7": + version "3.2.7" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.2.7.tgz#c07dd5523e2c83d9f8ac5a7982c305cc59f34e78" + dependencies: + "@hypnosphi/fuse.js" "^3.0.9" + "@storybook/components" "^3.2.7" + "@storybook/react-fuzzy" "^0.4.0" + babel-runtime "^6.23.0" + deep-equal "^1.0.1" + events "^1.1.1" + global "^4.3.2" + json-stringify-safe "^5.0.1" + keycode "^2.1.8" + lodash.debounce "^4.0.8" + lodash.pick "^4.4.0" + lodash.sortby "^4.7.0" + mantra-core "^1.7.0" + podda "^1.2.2" + prop-types "^15.5.10" + qs "^6.4.0" + react-icons "^2.2.5" + react-inspector "^2.1.1" + react-komposer "^2.0.0" + react-modal "^2.2.4" + react-split-pane "^0.1.65" + react-treebeard "^2.0.3" + redux "^3.6.0" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +accepts@~1.3.3: + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" + dependencies: + mime-types "~2.1.16" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" + +airbnb-js-shims@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/airbnb-js-shims/-/airbnb-js-shims-1.3.0.tgz#aac46d80057fb0b414f70e06d07e362fd99ee2fa" + dependencies: + array-includes "^3.0.3" + es5-shim "^4.5.9" + es6-shim "^0.35.3" + function.prototype.name "^1.0.3" + object.entries "^1.0.4" + object.getownpropertydescriptors "^2.0.3" + object.values "^1.0.4" + promise.prototype.finally "^3.0.0" + string.prototype.padend "^3.0.0" + string.prototype.padstart "^3.0.0" + +ajv-keywords@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.0.0, ajv@^5.1.5: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + json-schema-traverse "^0.3.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-find@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +ast-types@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.11.tgz#371177bb59232ff5ceaa1d09ee5cad705b1a5aa9" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^2.1.2, async@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +autoprefixer@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.2.tgz#fbeaf07d48fd878e0682bf7cbeeade728adb2b18" + dependencies: + browserslist "^2.1.5" + caniuse-lite "^1.0.30000697" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.6" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.11.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.25.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helper-bindify-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-evaluate-path@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.2.0.tgz#0bb2eb01996c0cef53c5e8405e999fe4a0244c08" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-explode-class@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" + dependencies: + babel-helper-bindify-decorators "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-flip-expressions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.2.0.tgz#160d2090a3d9f9c64a750905321a0bc218f884ec" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-is-nodes-equiv@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" + +babel-helper-is-void-0@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.2.0.tgz#6ed0ada8a9b1c5b6e88af6b47c1b3b5c080860eb" + +babel-helper-mark-eval-scopes@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.2.0.tgz#7648aaf2ec92aae9b09a20ad91e8df5e1fcc94b2" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-remove-or-void@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.2.0.tgz#8e46ad5b30560d57d7510b3fd93f332ee7c67386" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-to-multiple-sequence-expressions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.2.0.tgz#d1a419634c6cb301f27858c659167cfee0a9d318" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-loader@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" + dependencies: + find-cache-dir "^1.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-dynamic-import-node@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.0.2.tgz#adb5bc8f48a89311540395ae9f0cc3ed4b10bb2e" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-minify-builtins@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.2.0.tgz#317f824b0907210b6348671bb040ca072e2e0c82" + dependencies: + babel-helper-evaluate-path "^0.2.0" + +babel-plugin-minify-constant-folding@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.2.0.tgz#8c70b528b2eb7c13e94d95c8789077d4cdbc3970" + dependencies: + babel-helper-evaluate-path "^0.2.0" + +babel-plugin-minify-dead-code-elimination@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.2.0.tgz#e8025ee10a1e5e4f202633a6928ce892c33747e3" + dependencies: + babel-helper-evaluate-path "^0.2.0" + babel-helper-mark-eval-scopes "^0.2.0" + babel-helper-remove-or-void "^0.2.0" + lodash.some "^4.6.0" + +babel-plugin-minify-flip-comparisons@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.2.0.tgz#0c9c8e93155c8f09dedad8118b634c259f709ef5" + dependencies: + babel-helper-is-void-0 "^0.2.0" + +babel-plugin-minify-guarded-expressions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.2.0.tgz#8a8c950040fce3e258a12e6eb21eab94ad7235ab" + dependencies: + babel-helper-flip-expressions "^0.2.0" + +babel-plugin-minify-infinity@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.2.0.tgz#30960c615ddbc657c045bb00a1d8eb4af257cf03" + +babel-plugin-minify-mangle-names@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.2.0.tgz#719892297ff0106a6ec1a4b0fc062f1f8b6a8529" + dependencies: + babel-helper-mark-eval-scopes "^0.2.0" + +babel-plugin-minify-numeric-literals@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.2.0.tgz#5746e851700167a380c05e93f289a7070459a0d1" + +babel-plugin-minify-replace@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.2.0.tgz#3c1f06bc4e6d3e301eacb763edc1be611efc39b0" + +babel-plugin-minify-simplify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.2.0.tgz#21ceec4857100c5476d7cef121f351156e5c9bc0" + dependencies: + babel-helper-flip-expressions "^0.2.0" + babel-helper-is-nodes-equiv "^0.0.1" + babel-helper-to-multiple-sequence-expressions "^0.2.0" + +babel-plugin-minify-type-constructors@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.2.0.tgz#7f3b6458be0863cfd59e9985bed6d134aa7a2e17" + dependencies: + babel-helper-is-void-0 "^0.2.0" + +babel-plugin-react-docgen@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-plugin-react-docgen/-/babel-plugin-react-docgen-1.7.0.tgz#87e72d3d54b182a30706b740bb4d116f59aadc80" + dependencies: + babel-types "^6.24.1" + lodash "4.x.x" + react-docgen "^2.15.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-constructor-call@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-do-expressions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" + +babel-plugin-syntax-dynamic-import@6.18.0, babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-function-bind@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" + +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-constructor-call@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" + dependencies: + babel-plugin-syntax-class-constructor-call "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-class-properties@6.24.1, babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" + dependencies: + babel-helper-explode-class "^6.24.1" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-do-expressions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" + dependencies: + babel-plugin-syntax-do-expressions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-function-bind@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" + dependencies: + babel-plugin-syntax-function-bind "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-inline-consecutive-adds@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.2.0.tgz#15dae78921057f4004f8eafd79e15ddc5f12f426" + +babel-plugin-transform-member-expression-literals@^6.8.5: + version "6.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.5.tgz#e06ae305cf48d819822e93a70d79269f04d89eec" + +babel-plugin-transform-merge-sibling-variables@^6.8.6: + version "6.8.6" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.6.tgz#6d21efa5ee4981f71657fae716f9594bb2622aef" + +babel-plugin-transform-minify-booleans@^6.8.3: + version "6.8.3" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.3.tgz#5906ed776d3718250519abf1bace44b0b613ddf9" + +babel-plugin-transform-object-rest-spread@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-property-literals@^6.8.5: + version "6.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.5.tgz#67ed5930b34805443452c8b9690c7ebe1e206c40" + dependencies: + esutils "^2.0.2" + +babel-plugin-transform-react-constant-elements@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz#2f119bf4d2cdd45eb9baaae574053c604f6147dd" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-display-name@^6.23.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@6.22.0, babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-regexp-constructors@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.2.0.tgz#6aa5dd0acc515db4be929bbcec4ed4c946c534a3" + +babel-plugin-transform-remove-console@^6.8.5: + version "6.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.5.tgz#fde9d2d3d725530b0fadd8d31078402410386810" + +babel-plugin-transform-remove-debugger@^6.8.5: + version "6.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.5.tgz#809584d412bf918f071fdf41e1fdb15ea89cdcd5" + +babel-plugin-transform-remove-undefined@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.2.0.tgz#94f052062054c707e8d094acefe79416b63452b1" + dependencies: + babel-helper-evaluate-path "^0.2.0" + +babel-plugin-transform-runtime@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-simplify-comparison-operators@^6.8.5: + version "6.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.5.tgz#a838786baf40cc33a93b95ae09e05591227e43bf" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-undefined-to-void@^6.8.3: + version "6.8.3" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.3.tgz#fc52707f6ee1ddc71bb91b0d314fbefdeef9beb4" + +babel-preset-env@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-preset-env@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-minify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-minify/-/babel-preset-minify-0.2.0.tgz#006566552d9b83834472273f306c0131062a0acc" + dependencies: + babel-plugin-minify-builtins "^0.2.0" + babel-plugin-minify-constant-folding "^0.2.0" + babel-plugin-minify-dead-code-elimination "^0.2.0" + babel-plugin-minify-flip-comparisons "^0.2.0" + babel-plugin-minify-guarded-expressions "^0.2.0" + babel-plugin-minify-infinity "^0.2.0" + babel-plugin-minify-mangle-names "^0.2.0" + babel-plugin-minify-numeric-literals "^0.2.0" + babel-plugin-minify-replace "^0.2.0" + babel-plugin-minify-simplify "^0.2.0" + babel-plugin-minify-type-constructors "^0.2.0" + babel-plugin-transform-inline-consecutive-adds "^0.2.0" + babel-plugin-transform-member-expression-literals "^6.8.5" + babel-plugin-transform-merge-sibling-variables "^6.8.6" + babel-plugin-transform-minify-booleans "^6.8.3" + babel-plugin-transform-property-literals "^6.8.5" + babel-plugin-transform-regexp-constructors "^0.2.0" + babel-plugin-transform-remove-console "^6.8.5" + babel-plugin-transform-remove-debugger "^6.8.5" + babel-plugin-transform-remove-undefined "^0.2.0" + babel-plugin-transform-simplify-comparison-operators "^6.8.5" + babel-plugin-transform-undefined-to-void "^6.8.3" + lodash.isplainobject "^4.0.6" + +babel-preset-react-app@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-3.0.2.tgz#d062fca5dce68ed9c2615f2fecbc08861720f8e5" + dependencies: + babel-plugin-dynamic-import-node "1.0.2" + babel-plugin-syntax-dynamic-import "6.18.0" + babel-plugin-transform-class-properties "6.24.1" + babel-plugin-transform-object-rest-spread "6.23.0" + babel-plugin-transform-react-constant-elements "6.23.0" + babel-plugin-transform-react-jsx "6.24.1" + babel-plugin-transform-react-jsx-self "6.22.0" + babel-plugin-transform-react-jsx-source "6.22.0" + babel-plugin-transform-regenerator "6.24.1" + babel-plugin-transform-runtime "6.23.0" + babel-preset-env "1.5.2" + babel-preset-react "6.24.1" + +babel-preset-react@6.24.1, babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + +babel-preset-stage-0@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" + dependencies: + babel-plugin-transform-do-expressions "^6.22.0" + babel-plugin-transform-function-bind "^6.22.0" + babel-preset-stage-1 "^6.24.1" + +babel-preset-stage-1@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" + dependencies: + babel-plugin-transform-class-constructor-call "^6.24.1" + babel-plugin-transform-export-extensions "^6.22.0" + babel-preset-stage-2 "^6.24.1" + +babel-preset-stage-2@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators "^6.24.1" + babel-preset-stage-3 "^6.24.1" + +babel-preset-stage-3@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.24.1" + babel-plugin-transform-async-to-generator "^6.24.1" + babel-plugin-transform-exponentiation-operator "^6.24.1" + babel-plugin-transform-object-rest-spread "^6.22.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@6.x.x, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0, babel-runtime@^6.5.0, babel-runtime@^6.9.2: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +babylon@~5.8.3: + version "5.8.38" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.38.tgz#ec9b120b11bf6ccd4173a18bf217e60b79859ffd" + +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-js@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +bootstrap@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.3.7.tgz#5a389394549f23330875a3b150656574f8a9eb71" + +bowser@^1.0.0, bowser@^1.6.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.7.2.tgz#b94cc6925ba6b5e07c421a58e601ce4611264572" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +brcast@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/brcast/-/brcast-3.0.1.tgz#6256a8349b20de9eed44257a9b24d71493cd48dd" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + dependencies: + buffer-xor "^1.0.2" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + inherits "^2.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +browserslist@^2.1.2, browserslist@^2.1.5: + version "2.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.4.0.tgz#693ee93d01e66468a6348da5498e011f578f87f8" + dependencies: + caniuse-lite "^1.0.30000718" + electron-to-chromium "^1.3.18" + +buffer-xor@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000718" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000718.tgz#86cdd97987302554934c61e106f4e470f16f993c" + +caniuse-lite@^1.0.30000697, caniuse-lite@^1.0.30000718: + version "1.0.30000718" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000718.tgz#0dd24290beb11310b2d80f6b70a823c2a65a6fad" + +case-sensitive-paths-webpack-plugin@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chain-function@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.1, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +chokidar@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +clap@^1.0.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" + dependencies: + chalk "^1.1.3" + +classnames@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.3.0, color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +common-tags@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.4.0.tgz#1187be4f3d4cf0c0427d43f74eef1f73501614c0" + dependencies: + babel-runtime "^6.18.0" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +configstore@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.1.tgz#094ee662ab83fad9917678de114faaea8fcdca90" + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.1.tgz#948945efc6757a400d6e5e5af47194d10064279f" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-in-js-utils@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-1.0.3.tgz#9ac7e02f763cf85d94017666565ed68a5b5f3215" + dependencies: + hyphenate-style-name "^1.0.2" + +css-loader@^0.28.1: + version "0.28.5" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.5.tgz#dd02bb91b94545710212ef7f6aaa66663113d754" + dependencies: + babel-code-frame "^6.11.0" + css-selector-tokenizer "^0.7.0" + cssnano ">=2.6.1 <4" + icss-utils "^2.1.0" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.0.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.0" + postcss-value-parser "^3.3.0" + source-list-map "^2.0.0" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +"cssnano@>=2.6.1 <4": + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@2.6.8, debug@^2.2.0, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.1, depd@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +dom-helpers@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.2.1.tgz#3203e07fed217bd1f424b019735582fc37b2825a" + +dom-walk@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +dot-prop@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + dependencies: + is-obj "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.18: + version "1.3.18" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.18.tgz#3dcc99da3e6b665f6abbc71c28ad51a2cd731a9c" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +errno@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.30" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es5-shim@^4.5.9: + version "4.5.9" + resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.5.9.tgz#2a1e2b9e583ff5fed0c20a3ee2cbf3f75230a5c0" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-shim@^0.35.3: + version "0.35.3" + resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.3.tgz#9bfb7363feffff87a6cdb6cd93e405ec3c4b6f26" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0, esprima@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esrecurse@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" + dependencies: + estraverse "^4.1.0" + object-assign "^4.0.1" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +events@^1.0.0, events@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.2.tgz#f66bb88ecd57f71a766821e20283ea38c68bf80a" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exenv@^1.2.0, exenv@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +express@^4.15.3: + version "4.15.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.15.4.tgz#032e2253489cf8fce02666beca3d11ed7a2daed1" + dependencies: + accepts "~1.3.3" + array-flatten "1.1.1" + content-disposition "0.5.2" + content-type "~1.0.2" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.8" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + finalhandler "~1.0.4" + fresh "0.5.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.1" + path-to-regexp "0.1.7" + proxy-addr "~1.1.5" + qs "6.5.0" + range-parser "~1.2.0" + send "0.15.4" + serve-static "1.12.4" + setprototypeof "1.0.3" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.0" + vary "~1.1.1" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-memoize@^2.2.7: + version "2.2.8" + resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.2.8.tgz#d7f899f31d037b12d9db4281912f9018575720b1" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +fbjs@^0.8.12, fbjs@^0.8.9: + version "0.8.14" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +file-loader@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34" + dependencies: + loader-utils "^1.0.2" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.4.tgz#18574f2e7c4b98b8ae3b230c21f201f31bdb3fb7" + dependencies: + debug "2.6.8" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +forwarded@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" + +fresh@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.36" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +function.prototype.name@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.3.tgz#0099ae5572e9dd6f03c97d023fd92bcc5e639eac" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.0" + is-callable "^1.1.3" + +fuse.js@^3.0.1: + version "3.0.5" + resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.0.5.tgz#b58d85878802321de94461654947b93af1086727" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glamor@^2.20.40: + version "2.20.40" + resolved "https://registry.yarnpkg.com/glamor/-/glamor-2.20.40.tgz#f606660357b7cf18dface731ad1a2cfa93817f05" + dependencies: + fbjs "^0.8.12" + inline-style-prefixer "^3.0.6" + object-assign "^4.1.1" + prop-types "^15.5.10" + through "^2.3.8" + +glamorous@^4.1.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/glamorous/-/glamorous-4.4.0.tgz#626b03adcbab259bc97921de4378262f82887e25" + dependencies: + brcast "^3.0.0" + fast-memoize "^2.2.7" + html-tag-names "^1.1.1" + is-function "^1.0.1" + is-plain-object "^2.0.4" + react-html-attributes "^1.3.0" + svg-tag-names "^1.1.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.0, glob@^7.0.5: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" + dependencies: + min-document "^2.19.0" + process "~0.5.1" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoist-non-react-statics@1.x.x, hoist-non-react-statics@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +html-element-attributes@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/html-element-attributes/-/html-element-attributes-1.3.0.tgz#f06ebdfce22de979db82020265cac541fb17d4fc" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-tag-names@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22" + +http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +hyphenate-style-name@^1.0.1, hyphenate-style-name@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b" + +iconv-lite@~0.4.13: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" + dependencies: + postcss "^6.0.1" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +immutable@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inline-style-prefixer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz#c153c7e88fd84fef5c602e95a8168b2770671fe7" + dependencies: + bowser "^1.0.0" + hyphenate-style-name "^1.0.1" + +inline-style-prefixer@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-3.0.7.tgz#0ccc92e5902fe6e0d28d975c4258443f880615f8" + dependencies: + bowser "^1.6.0" + css-in-js-utils "^1.0.3" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@2.x.x, invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ipaddr.js@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dom@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/is-dom/-/is-dom-1.0.9.tgz#483832d52972073de12b9fe3f60320870da8370d" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-function@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.4.3: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keycode@^2.1.8: + version "2.1.9" + resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash-es@^4.2.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.keys@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.pick@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.some@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lodash@4.x.x, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@^3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +make-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" + dependencies: + pify "^2.3.0" + +mantra-core@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/mantra-core/-/mantra-core-1.7.0.tgz#a8c83e8cee83ef6a7383131519fe8031ad546386" + dependencies: + babel-runtime "6.x.x" + react-komposer "^1.9.0" + react-simple-di "^1.2.0" + +math-expression-evaluator@^1.2.14: + version "1.2.17" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +miller-rabin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.16, mime-types@~2.1.7: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +mime@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +mime@1.3.x, mime@^1.3.4: + version "1.3.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mobx@^2.3.4: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mobx/-/mobx-2.7.0.tgz#cf3d82d18c0ca7f458d8f2a240817b3dc7e54a01" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-dir@^0.1.10: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + dependencies: + minimatch "^3.0.2" + +node-fetch@^1.0.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.2.tgz#c54e9aac57e432875233525f3c891c4159ffefd7" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-libs-browser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-pre-gyp@^0.6.36: + version "0.6.36" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.entries@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.values@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.13" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.13.tgz#c37d295531e786b1da3e3eadc840426accb0ae25" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +podda@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/podda/-/podda-1.2.2.tgz#15b0edbd334ade145813343f5ecf9c10a71cf500" + dependencies: + babel-runtime "^6.11.6" + immutable "^3.8.1" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-flexbugs-fixes@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.2.0.tgz#9b8b932c53f9cf13ba0f61875303e447c33dcc51" + dependencies: + postcss "^6.0.1" + +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-loader@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.6.tgz#8c7e0055a3df1889abc6bad52dd45b2f41bbc6fc" + dependencies: + loader-utils "^1.1.0" + postcss "^6.0.2" + postcss-load-config "^1.2.0" + schema-utils "^0.3.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-scope@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.1, postcss@^6.0.2, postcss@^6.0.6: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.10.tgz#c311b89734483d87a91a56dc9e53f15f4e6e84e4" + dependencies: + chalk "^2.1.0" + source-map "^0.5.7" + supports-color "^4.2.1" + +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +private@^0.1.6, private@^0.1.7, private@~0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@^0.11.0: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + +promise.prototype.finally@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.0.0.tgz#afb1710ff2068562966f6d006d12c3107c7a4f39" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + function-bind "^1.1.0" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types@15.5.8: + version "15.5.8" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394" + dependencies: + fbjs "^0.8.9" + +prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + +proxy-addr@~1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918" + dependencies: + forwarded "~0.1.0" + ipaddr.js "1.4.0" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@6.5.0, qs@^6.4.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0, querystring@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +radium@^0.19.0: + version "0.19.4" + resolved "https://registry.yarnpkg.com/radium/-/radium-0.19.4.tgz#56aa49fde6181d2f5e1fa57b4710ffd0c23de820" + dependencies: + array-find "^1.0.0" + exenv "^1.2.1" + inline-style-prefixer "^2.0.5" + prop-types "^15.5.8" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +randombytes@^2.0.0, randombytes@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-docgen@^2.15.0: + version "2.17.0" + resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-2.17.0.tgz#b0f3e85af955714e1067593c1043cb82611a93d1" + dependencies: + async "^2.1.4" + babel-runtime "^6.9.2" + babylon "~5.8.3" + commander "^2.9.0" + doctrine "^2.0.0" + node-dir "^0.1.10" + recast "^0.12.6" + +react-dom-factories@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.1.tgz#c50692ac5ff1adb39d86dfe6dbe3485dacf58455" + +react-html-attributes@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/react-html-attributes/-/react-html-attributes-1.4.1.tgz#97b5ec710da68833598c8be6f89ac436216840a5" + dependencies: + html-element-attributes "^1.0.0" + +react-icon-base@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/react-icon-base/-/react-icon-base-2.0.7.tgz#0bd18736bd6ce79ca6d69ce8387a07fb8d4ceffe" + dependencies: + prop-types "15.5.8" + +react-icons@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-2.2.5.tgz#f942501c21a4cc0456ce2bbee5032c93f6051dcf" + dependencies: + react-icon-base "2.0.7" + +react-inspector@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.1.4.tgz#2123fab74f68ae3136fbd02392fadb764326d04d" + dependencies: + babel-runtime "^6.23.0" + is-dom "^1.0.9" + +react-komposer@^1.9.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/react-komposer/-/react-komposer-1.13.1.tgz#4b8ac4bcc71323bd7413dcab95c831197f50eed0" + dependencies: + babel-runtime "6.x.x" + hoist-non-react-statics "1.x.x" + invariant "2.x.x" + mobx "^2.3.4" + shallowequal "0.2.x" + +react-komposer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/react-komposer/-/react-komposer-2.0.0.tgz#b964738014a9b4aee494a83c0b5b833d66072a90" + dependencies: + babel-runtime "^6.11.6" + hoist-non-react-statics "^1.2.0" + lodash.pick "^4.4.0" + react-stubber "^1.0.0" + shallowequal "^0.2.2" + +react-modal@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-2.2.4.tgz#a32483c3555bd7677f09bca65d82f51da3abcbc0" + dependencies: + exenv "^1.2.0" + prop-types "^15.5.10" + react-dom-factories "^1.0.0" + +react-simple-di@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/react-simple-di/-/react-simple-di-1.2.0.tgz#dde0e5bf689f391ef2ab02c9043b213fe239c6d0" + dependencies: + babel-runtime "6.x.x" + hoist-non-react-statics "1.x.x" + +react-split-pane@^0.1.65: + version "0.1.66" + resolved "https://registry.yarnpkg.com/react-split-pane/-/react-split-pane-0.1.66.tgz#369085dd07ec1237bda123e73813dcc7dc6502c1" + dependencies: + inline-style-prefixer "^3.0.6" + prop-types "^15.5.10" + react-style-proptype "^3.0.0" + +react-stubber@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/react-stubber/-/react-stubber-1.0.0.tgz#41ee2cac72d4d4fd70a63896da98e13739b84628" + dependencies: + babel-runtime "^6.5.0" + +react-style-proptype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/react-style-proptype/-/react-style-proptype-3.0.0.tgz#89e0b646f266c656abb0f0dd8202dbd5036c31e6" + dependencies: + prop-types "^15.5.4" + +react-transition-group@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.0.tgz#b51fc921b0c3835a7ef7c571c79fc82c73e9204f" + dependencies: + chain-function "^1.0.0" + dom-helpers "^3.2.0" + loose-envify "^1.3.1" + prop-types "^15.5.6" + warning "^3.0.0" + +react-treebeard@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/react-treebeard/-/react-treebeard-2.0.3.tgz#cd644209c1be2fe2be3ae4bca8350ed6abf293d6" + dependencies: + babel-runtime "^6.23.0" + deep-equal "^1.0.1" + prop-types "^15.5.8" + radium "^0.19.0" + shallowequal "^0.2.2" + velocity-react "^1.3.1" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.6: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +recast@^0.12.6: + version "0.12.6" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.12.6.tgz#4b0fb82feb1d10b3bd62d34943426d9b3ed30d4c" + dependencies: + ast-types "0.9.11" + core-js "^2.4.1" + esprima "~4.0.0" + private "~0.1.5" + source-map "~0.5.0" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +redux@^3.6.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" + dependencies: + lodash "^4.2.1" + lodash-es "^4.2.1" + loose-envify "^1.1.0" + symbol-observable "^1.0.3" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@^1.1.6: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +safe-buffer@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sax@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + dependencies: + ajv "^5.0.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +send@0.15.4: + version "0.15.4" + resolved "https://registry.yarnpkg.com/send/-/send-0.15.4.tgz#985faa3e284b0273c793364a35c6737bd93905b9" + dependencies: + debug "2.6.8" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + fresh "0.5.0" + http-errors "~1.6.2" + mime "1.3.4" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-favicon@^2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.4.3.tgz#5986b17b0502642b641c21f818b1acce32025d23" + dependencies: + etag "~1.8.0" + fresh "0.5.0" + ms "2.0.0" + parseurl "~1.3.1" + safe-buffer "5.0.1" + +serve-static@1.12.4: + version "1.12.4" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.4.tgz#9b6aa98eeb7253c4eedc4c1f6fdbca609901a961" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.1" + send "0.15.4" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.8" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" + dependencies: + inherits "^2.0.1" + +shallowequal@0.2.x, shallowequal@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e" + dependencies: + lodash.keys "^3.1.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shelljs@^0.7.8: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-map-support@^0.4.15: + version "0.4.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + dependencies: + source-map "^0.5.6" + +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.3.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.2.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string.prototype.padend@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.4.3" + function-bind "^1.0.2" + +string.prototype.padstart@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz#5bcfad39f4649bb2d031292e19bcf0b510d4b242" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.4.3" + function-bind "^1.0.2" + +string_decoder@^0.10.25: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +style-loader@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.17.0.tgz#e8254bccdb7af74bd58274e36107b4d5ab4df310" + dependencies: + loader-utils "^1.0.2" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0, supports-color@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" + dependencies: + has-flag "^2.0.0" + +svg-tag-names@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/svg-tag-names/-/svg-tag-names-1.1.1.tgz#9641b29ef71025ee094c7043f7cdde7d99fbd50a" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +symbol-observable@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +time-stamp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" + +timers-browserify@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" + dependencies: + setimmediate "^1.0.4" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +ua-parser-js@^0.7.9: + version "0.7.14" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" + +uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + dependencies: + crypto-random-string "^1.0.0" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +url-loader@^0.5.8: + version "0.5.9" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.9.tgz#cc8fea82c7b906e7777019250869e569e995c295" + dependencies: + loader-utils "^1.0.2" + mime "1.3.x" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +util-deprecate@^1.0.2, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^3.0.0, uuid@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vary@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" + +velocity-animate@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/velocity-animate/-/velocity-animate-1.5.0.tgz#fc8771d8dfe1136ff02a707e10fbb0957c4b030f" + +velocity-react@^1.3.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/velocity-react/-/velocity-react-1.3.3.tgz#d6d47276cfc8be2a75623879b20140ac58c1b82b" + dependencies: + lodash "^3.10.1" + prop-types "^15.5.8" + react-transition-group "^1.1.2" + velocity-animate "^1.4.0" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +warning@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" + dependencies: + loose-envify "^1.0.0" + +watchpack@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" + dependencies: + async "^2.1.2" + chokidar "^1.7.0" + graceful-fs "^4.1.2" + +webpack-dev-middleware@^1.10.2: + version "1.12.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz#d34efefb2edda7e1d3b5dbe07289513219651709" + dependencies: + memory-fs "~0.4.1" + mime "^1.3.4" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + time-stamp "^2.0.0" + +webpack-hot-middleware@^2.18.0: + version "2.18.2" + resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.18.2.tgz#84dee643f037c3d59c9de142548430371aa8d3b2" + dependencies: + ansi-html "0.0.7" + html-entities "^1.2.0" + querystring "^0.2.0" + strip-ansi "^3.0.0" + +webpack-sources@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" + dependencies: + source-list-map "^2.0.0" + source-map "~0.5.3" + +"webpack@^2.5.1 || ^3.0.0": + version "3.5.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.5.tgz#3226f09fc8b3e435ff781e7af34f82b68b26996c" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/packages/react-bootstrap-table2/yarn.lock b/packages/react-bootstrap-table2/yarn.lock new file mode 100644 index 0000000..4933806 --- /dev/null +++ b/packages/react-bootstrap-table2/yarn.lock @@ -0,0 +1,7 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +bootstrap@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.3.7.tgz#5a389394549f23330875a3b150656574f8a9eb71" diff --git a/webpack.config.babel.js b/webpack.config.babel.js index b8888b9..a429319 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -23,21 +23,21 @@ module.exports = { filename: '[name].bundle.js' }, module: { - rules: [ { + rules: [{ enforce: 'pre', test: /\.js?$/, exclude: /node_modules/, - include: [ sourcePath, examplePath ], + include: [sourcePath], loader: 'eslint-loader' }, { test: /\.js?$/, - use: [ 'babel-loader' ], + use: ['babel-loader'], exclude: /node_modules/, - include: [ sourcePath, examplePath ], + include: [sourcePath, examplePath] }, { - test: /\.css$/, + test: /\.css$/, use: 'style-loader!css-loader' - } ] + }] }, plugins: [ new HtmlWebpackPlugin({ @@ -45,4 +45,4 @@ module.exports = { }), new webpack.HotModuleReplacementPlugin() ] -}; \ No newline at end of file +}; diff --git a/yarn.lock b/yarn.lock index 3060476..c1cf440 100644 --- a/yarn.lock +++ b/yarn.lock @@ -253,11 +253,15 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" + async@^1.4.0, async@^1.5.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2, async@^2.1.4: +async@^2.1.2, async@^2.1.4, async@^2.1.5: version "2.5.0" resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: @@ -1336,6 +1340,15 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +clone-deep@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.3.0.tgz#348c61ae9cdbe0edfe053d91ff4cc521d790ede8" + dependencies: + for-own "^1.0.0" + is-plain-object "^2.0.1" + kind-of "^3.2.2" + shallow-clone "^0.1.2" + clone@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" @@ -1679,6 +1692,13 @@ create-react-class@^15.6.0: loose-envify "^1.3.1" object-assign "^4.1.1" +cross-spawn@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2583,6 +2603,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +for-in@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" + for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -2593,6 +2617,12 @@ for-own@^0.1.4: dependencies: for-in "^1.0.1" +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + dependencies: + for-in "^1.0.1" + foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" @@ -2688,6 +2718,12 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +gaze@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + dependencies: + globule "^1.0.0" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" @@ -2767,7 +2803,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2803,6 +2839,14 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +globule@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" + dependencies: + glob "~7.1.1" + lodash "~4.17.4" + minimatch "~3.0.2" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -3033,6 +3077,10 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" @@ -3119,7 +3167,7 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-buffer@^1.1.5: +is-buffer@^1.0.2, is-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" @@ -3229,6 +3277,12 @@ is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" +is-plain-object@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -3297,6 +3351,10 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -3582,6 +3640,10 @@ jest-validate@^20.0.3: leven "^2.1.0" pretty-format "^20.0.3" +js-base64@^2.1.8: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -3700,7 +3762,13 @@ just-extend@^1.1.22: version "1.1.22" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.22.tgz#3330af756cab6a542700c64b2e4e4aa062d52fff" -kind-of@^3.0.2: +kind-of@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5" + dependencies: + is-buffer "^1.0.2" + +kind-of@^3.0.2, kind-of@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: @@ -3712,6 +3780,10 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" +lazy-cache@^0.2.3: + version "0.2.7" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-0.2.7.tgz#7feddf2dcb6edb77d11ef1d117ab5ffdf0ab1b65" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -3812,7 +3884,7 @@ loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" -loader-utils@^1.0.2, loader-utils@^1.1.0: +loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" dependencies: @@ -3831,6 +3903,10 @@ lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + lodash.assignin@^4.0.9: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" @@ -3839,6 +3915,10 @@ lodash.bind@^4.1.4: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" +lodash.clonedeep@^4.3.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" @@ -3867,6 +3947,10 @@ lodash.merge@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" +lodash.mergewith@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55" + lodash.pick@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -3883,6 +3967,10 @@ lodash.some@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" +lodash.tail@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" + lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -3896,7 +3984,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -4055,7 +4143,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -4077,7 +4165,14 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0: +mixin-object@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" + dependencies: + for-in "^0.1.3" + is-extendable "^0.1.1" + +mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -4110,7 +4205,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.3.0: +nan@^2.3.0, nan@^2.3.2: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" @@ -4158,6 +4253,24 @@ node-forge@0.6.33: version "0.6.33" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.6.33.tgz#463811879f573d45155ad6a9f43dc296e8e85ebc" +node-gyp@^3.3.1: + version "3.6.2" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + minimatch "^3.0.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "2" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4213,6 +4326,35 @@ node-pre-gyp@^0.6.36: tar "^2.2.1" tar-pack "^3.4.0" +node-sass@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.3.tgz#d09c9d1179641239d1b97ffc6231fdcec53e1568" + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash.assign "^4.2.0" + lodash.clonedeep "^4.3.2" + lodash.mergewith "^4.6.0" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.3.2" + node-gyp "^3.3.1" + npmlog "^4.0.0" + request "^2.79.0" + sass-graph "^2.1.1" + stdout-stream "^1.4.0" + +"nopt@2 || 3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -4241,7 +4383,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npmlog@^4.0.2, npmlog@^4.1.0: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: @@ -4400,7 +4542,7 @@ os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -osenv@^0.1.4: +osenv@0, osenv@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" dependencies: @@ -4892,7 +5034,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.79.0, request@^2.81.0: +request@2, request@^2.79.0, request@^2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: @@ -5014,10 +5156,36 @@ sane@~1.6.0: walker "~1.0.5" watch "~0.10.0" +sass-graph@^2.1.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" + dependencies: + glob "^7.0.0" + lodash "^4.0.0" + scss-tokenizer "^0.2.3" + yargs "^7.0.0" + +sass-loader@^6.0.6: + version "6.0.6" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-6.0.6.tgz#e9d5e6c1f155faa32a4b26d7a9b7107c225e40f9" + dependencies: + async "^2.1.5" + clone-deep "^0.3.0" + loader-utils "^1.0.1" + lodash.tail "^4.1.1" + pify "^3.0.0" + sax@^1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +scss-tokenizer@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" + dependencies: + js-base64 "^2.1.8" + source-map "^0.4.2" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -5032,6 +5200,10 @@ selfsigned@^1.9.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + send@0.15.4: version "0.15.4" resolved "https://registry.yarnpkg.com/send/-/send-0.15.4.tgz#985faa3e284b0273c793364a35c6737bd93905b9" @@ -5093,6 +5265,15 @@ sha.js@^2.4.0, sha.js@^2.4.8: dependencies: inherits "^2.0.1" +shallow-clone@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-0.1.2.tgz#5909e874ba77106d73ac414cfec1ffca87d97060" + dependencies: + is-extendable "^0.1.1" + kind-of "^2.0.1" + lazy-cache "^0.2.3" + mixin-object "^2.0.1" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -5183,7 +5364,7 @@ source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, sourc version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@^0.4.4: +source-map@^0.4.2, source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: @@ -5266,6 +5447,12 @@ sshpk@^1.7.0: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" +stdout-stream@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" + dependencies: + readable-stream "^2.0.1" + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" @@ -5412,7 +5599,7 @@ tar-pack@^3.4.0: tar "^2.2.1" uid-number "^0.0.6" -tar@^2.2.1: +tar@^2.0.0, tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" dependencies: @@ -5845,7 +6032,7 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.2.12, which@^1.2.9: +which@1, which@^1.2.12, which@^1.2.9: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: @@ -5979,7 +6166,7 @@ yargs@^6.0.0: y18n "^3.2.1" yargs-parser "^4.2.0" -yargs@^7.0.2: +yargs@^7.0.0, yargs@^7.0.2: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" dependencies: From 507e5544deee67ea14223d2d675bae9117c8c8b3 Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 27 Aug 2017 10:55:38 -0500 Subject: [PATCH 015/136] fix #11 * create document * CONTRIBUTING * refine contributing docs * patch for some propTypes definition missing --- CONTRIBUTING.md | 26 +-- docs/README.md | 21 +++ docs/columns.md | 161 ++++++++++++++++++ docs/development.md | 28 +++ .../src/bootstrap-table.js | 5 +- 5 files changed, 229 insertions(+), 12 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/columns.md create mode 100644 docs/development.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59a3a96..eab673b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,21 @@ -# Contributing to react-bootstrap-table2 +# Issues +Before open issue, please make sure your problem/request is open or not. When open issue, please give following information if you can: +* Example code or repo(Please keep it simple and minimal) +* Reproduce steps +* `react-bootstrap-table2` version -## Commands +Anyway, it's welcome to open issue to ask questions or feature request. -### Testing -In order to run the tests +# Pull Requests +Check [here](./docs/development.md) for getting start development. -`yarn test` +* When you want to implement a new feature, please let us know(via issues). +* Please run test before opening PR and also remember to write test code. +* If you PR is trying to fix bug, please describe the bug when PR open. -testing with `watch mode` +# For the member of react-bootstrap-table2 org -`yarn test:watch` - -see the coverage report - -`yarn test:coverage` +* Please convert ticket to issue when ticket move to `Ready` from `Backlog` in project +* Please write document if any new API/feature/props changed or added +* Please add story example if any new feature implement \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..fd43f93 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,21 @@ +# Documents + +## Props on BootstrapTable + +### keyField(**required**) - [String] +`keyField` is a prop to tell `react-bootstrap-table2` which column is unigue key. + +### data(**required**) - [Array] +Assign your table data via `data` prop. It only accept an Array object. + +### columns(**required**) - [Object] +`columns` props accept an Array object, please see [columns definition](./columns.md) for more detail. + +### striped - [Bool] +Same as `.table-striped` class for adding zebra-stripes to a table +### bordered - [Bool] +Same as `.table-bordered` class for adding borders on all sides of the table and cells +### hover - [Bool] +Same as `.table-hover` class for adding a hover effect (grey background color) on table rows +### condensed - [Bool] +Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half \ No newline at end of file diff --git a/docs/columns.md b/docs/columns.md new file mode 100644 index 0000000..1a28af7 --- /dev/null +++ b/docs/columns.md @@ -0,0 +1,161 @@ +# Definition of columns props on BootstrapTable + +Available properties in a column object: + +* [dataField (**required**)](#dataField) +* [text (**required**)](#text) +* [formatter](#formatter) +* [headerFormatter](#headerFormatter) +* [formatExtraData](#formatExtraData) +* [classes](#classes) +* [style](#style) +* [title](#title) +* [events](#events) +* [align](#align) +* [headerTitle](#headerTitle) +* [headerEvents](#headerEvents) +* [headerAlign](#headerAlign) + +Following is a most simplest and basic usage: + +```js +const rows = [ { id: 1, name: '...', price: '102' } ]; +const columns = [ { + dataField: id, + text: Production ID + }, { + dataField: name, + text: Production Name + }, { + dataField: price, + text: Production Price + } +]; +``` + +Let's introduce the definition of column object + +## column.dataField (**required**) - [String] +Use `dataField` to specify what field should be apply on this column. If your raw data is nested, for example: + +```js +const row = { + id: 'A001', + address: { + postal: '1234-12335', + city: 'Chicago' + } +} +``` +You can use `dataField` with dot(`.`) to describe nested object: + +```js +dataField: 'address.postal' +dataField: 'address.city' +``` + +## column.text (**required**) - [String] +`text` will be apply as the column text in header column, if your header is not only text and you want to customize your header column, please check [`column.headerFormatter`](#headerFormatter) + +## column.formatter - [Function] +`formatter` allow you to customize the table column and only accept a callback function which take four arguments and a JSX/String are expected for return. + +* `cell` +* `row` +* `rowIndex` +* [`formatExtraData`](#formatExtraData) + +## column.headerFormatter - [Function] +`headerFormatter` allow you to customize the header column and only accept a callback function which take two arguments and a JSX/String are expected for return. + +* `column`: column object itself +* `colIndex` + +## column.formatExtraData - [Any] +It's only used for [`column.formatter`](#formatter), you can define any value for it and will be passed as fourth argument for [`column.formatter`](#formatter) callback function. + +## column.classes - [String | Function] +It's availabe to have custom class on table column: + +```js +{ + // omit... + classes: 'id-custom-cell' +} +``` +In addition, `classes` also accept a callback function which have more power to custom the css class on each columns. This callback function take three arguments and a string is expect to return: + +* `cell` +* `row` +* `colIndex` + +## column.style - [Object | Function] +It's availabe to have custom class on table column: + +```js +{ + // omit... + style: { backgroundColor: 'green' } +} +``` +`style` like [`column.classes`](#classes), it accept a callback function too and have same arguments: `cell`, `row` and `colIndex`. + +## column.title - [Bool | Function] +`react-bootstrap-table2` is disable [`HTML title`](https://www.w3schools.com/tags/tag_title.asp) as default. You can assign `title` as `true` to enable the HTML title on table column. In addition, you can custom the title via a callback function: + +```js +{ + // omit... + title: (cell, row, colIndex) => { + // return custom title here + } +} +``` + +## column.headerTitle - [Bool | Function] +`headerTitle` is only for the title on header column, default is disable. The usage almost same as [`column.title`](#title), it's also availabe to custom via a callback function: + +```js +{ + // omit... + headerTitle: (column, colIndex) => { + // column is an object and perform itself + // return custom title here + } +} +``` + +## column.align - [String | Function] +You can configure the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) for table column by `align` property. However, `align` also accept a callback function for customizable reason and this function take fore arguments: + +* `cell` +* `row` +* `colIndex` + +## column.headerAlign - [String | Function] +It's almost same as [`column.align`](#align), but it's for the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) on header column. Also, you can custom the align by a callback function: + +```js +{ + // omit... + headerAlign: (column, colIndex) => { + // column is an object and perform itself + // return custom title here + } +} +``` + +## column.events - [Object] +You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via event property: + +```js +{ + // omit... + events: { + onClick: e => { ... } + } +} +``` + +## column.headerEvents - [Object] +`headerEvents` same as [`column.events`](#events) but this is for header column. \ No newline at end of file diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..bf91e47 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,28 @@ +## Development Guide + +### Setup +```bash +$ git clone https://github.com/react-bootstrap-table/react-bootstrap-table2.git +$ cd react-bootstrap-table +$ npm install +$ lerna bootstrap # ./node_modules/.bin/lerna bootstrap +``` +### Development +```bash +$ npm start +``` + +### Launch StoryBook +We use [storybook](https://storybook.js.org/) to list our examples and it also have hot reload from source code. Sometime, it is also a good entry point to develop. + +```bash +$ cd packages/react-bootstrap-table2-example +$ npm run storybook +``` + +### Testing +```bash +$ npm test +$ npm run test:watch # for watch mode +$ npm run test:coverage # generate coverage report +``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 36c8f00..4cbb69d 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -48,7 +48,10 @@ BootstrapTable.propTypes = { keyField: PropTypes.string.isRequired, data: PropTypes.array.isRequired, columns: PropTypes.array.isRequired, - striped: PropTypes.bool + striped: PropTypes.bool, + bordered: PropTypes.bool, + hover: PropTypes.bool, + condensed: PropTypes.bool }; BootstrapTable.defaultProps = { From c09bf7c2f12ef1a9cac9b2edb9aae1a80f1cc1e3 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Mon, 28 Aug 2017 08:52:49 +0800 Subject: [PATCH 016/136] enhance storybook * wrapper components with Decorators to set component margin * add sticker github-corners at welcome page * refactor welcome page for storybook * refactor scss code structure * add type.js to animate sub title --- .../.storybook/config.js | 16 ++++++- .../examples/welcome.js | 40 ++++++++++++++++ .../package.json | 3 +- .../stories/index.js | 8 ++-- .../stories/stylesheet/base/_base.scss | 10 ++++ .../stories/stylesheet/base/_misc.scss | 48 +++++++++++++++++++ .../stories/stylesheet/storybook.scss | 4 ++ .../stories/stylesheet/welcome/_index.scss | 17 +++++++ 8 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/welcome.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss diff --git a/packages/react-bootstrap-table2-example/.storybook/config.js b/packages/react-bootstrap-table2-example/.storybook/config.js index 6f68803..be93e84 100644 --- a/packages/react-bootstrap-table2-example/.storybook/config.js +++ b/packages/react-bootstrap-table2-example/.storybook/config.js @@ -1,9 +1,21 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ - -import { configure } from '@storybook/react'; +import React from 'react'; +import { configure, addDecorator } from '@storybook/react'; function loadStories() { require('stories'); } +const styles = { + margin: '15px', +}; + +const componentDecorator = (story) => ( +
+ { story() } +
+); + +addDecorator(componentDecorator); + configure(loadStories, module); diff --git a/packages/react-bootstrap-table2-example/examples/welcome.js b/packages/react-bootstrap-table2-example/examples/welcome.js new file mode 100644 index 0000000..7438298 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/welcome.js @@ -0,0 +1,40 @@ +import React from 'react'; +import Typed from 'typed.js'; + +export default class Welcome extends React.Component { + componentDidMount() { + // type.js config + const options = { + strings: ['It\'s a bootstrap table rebuilt for React.js ♥'], + typeSpeed: 50, + backSpeed: 50 + }; + this.typed = new Typed(this.el, options); + } + + componentWillUnmount() { + // Make sure to destroy Typed instance on unmounting to prevent memory leaks + this.typed.destroy(); + } + + render() { + return ( +
+
+

react-bootstrap-table2

+ { this.el = el; }} + /> +
+ + + +
+ ); + } +} diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index 15ea5f6..4e8bb00 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -20,6 +20,7 @@ "react-bootstrap-table2": "0.0.1" }, "devDependencies": { - "@storybook/react": "^3.2.8" + "@storybook/react": "^3.2.8", + "typed.js": "^2.0.5" } } diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 97fb566..bba557e 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -1,16 +1,16 @@ /* eslint import/no-unresolved: 0 */ import React from 'react'; import { storiesOf } from '@storybook/react'; -import { linkTo } from '@storybook/addon-links'; -import { Welcome } from '@storybook/react/demo'; -import BasicTable from 'examples/basic/index.js'; +import Welcome from 'examples/welcome'; +import BasicTable from 'examples/basic'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/storybook.scss'; -storiesOf('Welcome', module).add('to Storybook', () => ); +storiesOf('Welcome', module) + .add('react bootstrap table 2 ', () => ); storiesOf('Basic Table', module) .add('default', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss new file mode 100644 index 0000000..786a4b1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss @@ -0,0 +1,10 @@ + +body { + font-family: "Roboto", Arial, "Helvetica Neue", Helvetica, sans-serif; + font-weight: 300; +} + +// font color +$grey-500: #9E9E9E; +$grey-900: #212121; +$pink-500: #E91E63; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss new file mode 100644 index 0000000..a9c50f1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss @@ -0,0 +1,48 @@ +.github-corner:hover .octo-arm { + animation: octocat-wave 560ms ease-in-out; +} + +@keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +@media (max-width:500px) { + .github-corner:hover .octo-arm { + animation: none + } + .github-corner .octo-arm { + animation: octocat-wave 560ms ease-in-out + } +} + +/* Adding cursor blinking animation */ +.typed-cursor{ + font-size: 30px; + color: $grey-500; + opacity: 1; + animation: typedjsBlink 0.7s infinite; +} +@keyframes typedjsBlink{ + 50% { opacity: 0.0; } +} +@-webkit-keyframes typedjsBlink{ + 0% { opacity: 1; } + 50% { opacity: 0.0; } + 100% { opacity: 1; } +} +.typed-fade-out{ + opacity: 0; + transition: opacity .25s; + animation: 0; +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index c5a965e..5b4fa49 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -1 +1,5 @@ /* customized style for storybook*/ +@import "base/base"; +@import "base/misc"; + +@import "welcome/index"; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss new file mode 100644 index 0000000..00d6e64 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss @@ -0,0 +1,17 @@ +.welcome { + margin-top: 70px; + text-align: center; + padding: 30px 30px; + + &-title { + color: $grey-900; + } + &-sub-title { + font-size: 30px; + color: $grey-500; + } +} + +span.love-icon { + color: $pink-500; +} From 60d4e7e5d24ac27a6120876ab7f7492b73fcdbbb Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 2 Sep 2017 01:54:09 -0500 Subject: [PATCH 017/136] fix #34 * add basic stories * add google-prettify * add google-code-prettify-theme * add code example for each story * add column stories * add header column stories --- .../.storybook/preview-head.html | 2 + .../examples/basic/borderless-table.js | 50 +++++++++++ .../examples/basic/index.js | 49 +++++------ .../basic/striped-hover-condensed-table.js | 54 ++++++++++++ .../examples/columns/column-align-table.js | 62 ++++++++++++++ .../examples/columns/column-class-table.js | 62 ++++++++++++++ .../examples/columns/column-event-table.js | 60 +++++++++++++ .../examples/columns/column-format-table.js | 84 +++++++++++++++++++ .../column-format-with-extra-data-table.js | 78 +++++++++++++++++ .../examples/columns/column-style-table.js | 80 ++++++++++++++++++ .../examples/columns/column-title-table.js | 56 +++++++++++++ .../examples/columns/nested-data-table.js | 66 +++++++++++++++ .../header-columns/column-align-table.js | 56 +++++++++++++ .../header-columns/column-event-table.js | 60 +++++++++++++ .../header-columns/column-format-table.js | 71 ++++++++++++++++ .../header-columns/column-title-table.js | 56 +++++++++++++ .../stories/index.js | 43 +++++++++- .../stories/stylesheet/columns/_index.scss | 12 +++ .../stories/stylesheet/storybook.scss | 1 + .../stories/stylesheet/tomorrow.min.css | 2 + 20 files changed, 977 insertions(+), 27 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/.storybook/preview-head.html create mode 100644 packages/react-bootstrap-table2-example/examples/basic/borderless-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-align-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-class-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-event-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-format-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-style-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-title-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css diff --git a/packages/react-bootstrap-table2-example/.storybook/preview-head.html b/packages/react-bootstrap-table2-example/.storybook/preview-head.html new file mode 100644 index 0000000..25bdb14 --- /dev/null +++ b/packages/react-bootstrap-table2-example/.storybook/preview-head.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js new file mode 100644 index 0000000..881f939 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js @@ -0,0 +1,50 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js index dea94e0..b1b762c 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/index.js +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -11,11 +11,7 @@ function addProducts(quantity) { products.push({ id, name: `Item name ${id}`, - price: 2100 + i, - nest: { - address: 'Address 1', - postcal: '0922-1234' - } + price: 2100 + i }); } } @@ -24,30 +20,31 @@ addProducts(5); const columns = [{ dataField: 'id', - text: 'Product ID', - style: { - backgroundColor: 'red' - }, - headerTitle: (column, colIndex) => 'yes~~~ oh', // eslint-disable-line no-unused-vars - classes: 'my-xxx' + text: 'Product ID' }, { dataField: 'name', - text: 'Product Name', - headerTitle: true, - formatter: (cell, row) => - (

{ cell }::: ${ row.price }

) + text: 'Product Name' }, { dataField: 'price', - text: 'Product Price', - style: (cell, row, colIndex) => ({ // eslint-disable-line no-unused-vars - backgroundColor: 'blue' - }) -}, { - dataField: 'nest.address', - text: 'Address' -}, { - dataField: 'nest.postcal', - text: 'Postal' + text: 'Product Price' }]; -export default () => ; +export default () => ( +
+ +
{`const columns = [{
+  dataField: 'id',
+  text: 'Product ID'
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js new file mode 100644 index 0000000..84a86fc --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -0,0 +1,54 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js new file mode 100644 index 0000000..c79c502 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -0,0 +1,62 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + align: 'center' +}, { + dataField: 'name', + text: 'Product Name', + align: (cell, row, colIndex) => { + if (row.id % 2 === 0) return 'right'; + return 'left'; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  align: 'center'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  align: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) return 'right';
+    return 'left';
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js new file mode 100644 index 0000000..545616b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -0,0 +1,62 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + classes: 'demo-key-row' +}, { + dataField: 'name', + text: 'Product Name', + classes: (cell, row, colIndex) => { + if (row.id % 2 === 0) return 'demo-row-even'; + return 'demo-row-odd'; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  classes: 'demo-key-row'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  classes: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) return 'demo-row-even';
+    return 'demo-row-odd';
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js new file mode 100644 index 0000000..17bb43b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -0,0 +1,60 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-alert: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + events: { + onClick: () => alert('Click on Product ID field') + } +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+

Try to Click on Product ID columns

+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  events: {
+    onClick: () => alert('Click on Product ID field')
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js new file mode 100644 index 0000000..ecc40fe --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -0,0 +1,84 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + onSale: Math.random() >= 0.5 + }); + } +} + +addProducts(5); + +function priceFormatter(cell, row) { + if (row.onSale) { + return ( + $ { cell } NTD(Sales!!) + ); + } + + return ( + $ { cell } NTD + ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + formatter: priceFormatter +}]; + +export default () => ( +
+ +
{`
+function priceFormatter(cell, row) {
+  if (row.onSale) {
+    return (
+      
+        $ { cell } NTD(Sales!!)
+      
+    );
+  }
+
+  return (
+    $ { cell } NTD
+  );
+}
+
+const columns = [
+// omit...
+{
+  dataField: 'price',
+  text: 'Product Price',
+  formatter: priceFormatter
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js new file mode 100644 index 0000000..1e2e1ca --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js @@ -0,0 +1,78 @@ +/* eslint no-console: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + rank: Math.random() < 0.5 ? 'down' : 'up' + }); + } +} + +addProducts(5); + +function rankFormatter(cell, row, rowIndex, formatExtraData) { + return ( + + ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'rank', + text: 'Rank', + formatter: rankFormatter, + formatExtraData: { + up: 'glyphicon glyphicon-chevron-up', + down: 'glyphicon glyphicon-chevron-down' + } +}]; + +export default () => ( +
+ +
{`
+function rankFormatter(cell, row, rowIndex, formatExtraData) {
+  return (
+    
+  );
+}
+
+const columns = [
+// omit...
+{
+  dataField: 'rank',
+  text: 'Rank',
+  formatter: rankFormatter,
+  formatExtraData: {
+    up: 'glyphicon glyphicon-chevron-up',
+    down: 'glyphicon glyphicon-chevron-down'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js new file mode 100644 index 0000000..520e005 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -0,0 +1,80 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + style: { + fontWeight: 'bold', + fontSize: '18px' + } +}, { + dataField: 'name', + text: 'Product Name', + style: (cell, row, colIndex) => { + if (row.id % 2 === 0) { + return { + backgroundColor: '#bbe' + }; + } + return { + backgroundColor: '#fea' + }; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  style: {
+    fontWeight: 'bold',
+    fontSize: '18px'
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  style: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) {
+      return {
+        backgroundColor: '#bbe'
+      };
+    }
+    return {
+      backgroundColor: '#fea'
+    };
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js new file mode 100644 index 0000000..8951419 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + title: true +}, { + dataField: 'name', + text: 'Product Name', + title: (cell, row, colIndex) => `this is custom title for ${cell}` +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  title: true
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  title: (cell, row, colIndex) => \`this is custom title for \${cell}\`
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js new file mode 100644 index 0000000..48e3ced --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -0,0 +1,66 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `User Name ${id}`, + phone: 21009831 + i, + address: { + city: 'New York', + postCode: '1111-4512' + } + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'User ID' +}, { + dataField: 'name', + text: 'User Name' +}, { + dataField: 'phone', + text: 'Phone' +}, { + dataField: 'address.city', + text: 'City' +}, { + dataField: 'address.postCode', + text: 'PostCode' +}]; + +export default () => ( +
+ +
{`const columns = [{
+  dataField: 'id',
+  text: 'User ID'
+}, {
+  dataField: 'name',
+  text: 'User Name'
+}, {
+  dataField: 'phone',
+  text: 'Phone'
+}, {
+  dataField: 'address.city',
+  text: 'City'
+}, {
+  dataField: 'address.postCode',
+  text: 'PostCode'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js new file mode 100644 index 0000000..ef30e9e --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerAlign: 'center' +}, { + dataField: 'name', + text: 'Product Name', + headerAlign: (column, colIndex) => 'right' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  headerAlign: 'center'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerAlign: (column, colIndex) => 'right'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js new file mode 100644 index 0000000..1ab6533 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -0,0 +1,60 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-alert: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerEvents: { + onClick: () => alert('Click on Product ID header column') + } +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+

Try to Click on Product ID header column

+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  events: {
+    onClick: () => alert('Click on Product ID header column')
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js new file mode 100644 index 0000000..923c8c0 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -0,0 +1,71 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + onSale: Math.random() >= 0.5 + }); + } +} + +addProducts(5); + +function priceFormatter(column, colIndex) { + return ( +
$$ { column.text } $$
+ ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + headerFormatter: priceFormatter +}]; + +export default () => ( +
+ +
{`
+function priceFormatter(column, colIndex) {
+  return (
+    
$$ { column.text } $$
+ ); +} + +const columns = [ +// omit... +{ + dataField: 'price', + text: 'Product Price', + headerFormatter: priceFormatter +}]; + + + `} +
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js new file mode 100644 index 0000000..5af4b11 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerTitle: true +}, { + dataField: 'name', + text: 'Product Name', + headerTitle: (column, colIndex) => `this is custom title for ${column.text}` +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  headerTitle: true
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerTitle: (column, colIndex) => \`this is custom title for \${column.text}\`
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index bba557e..a0ea9d0 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -2,15 +2,56 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; +// welcome import Welcome from 'examples/welcome'; +// basic import BasicTable from 'examples/basic'; +import BorderlessTable from 'examples/basic/borderless-table'; +import StripHoverCondensedTable from 'examples/basic/striped-hover-condensed-table'; + +// work on columns +import NestedDataTable from 'examples/columns/nested-data-table'; +import ColumnFormatTable from 'examples/columns/column-format-table'; +import ColumnFormatExtraDataTable from 'examples/columns/column-format-with-extra-data-table'; +import ColumnClassTable from 'examples/columns/column-class-table'; +import ColumnStyleTable from 'examples/columns/column-style-table'; +import ColumnAlignTable from 'examples/columns/column-align-table'; +import ColumnTitleTable from 'examples/columns/column-title-table'; +import ColumnEventTable from 'examples/columns/column-event-table'; + +// work on header columns +import HeaderColumnFormatTable from 'examples/header-columns/column-format-table'; +import HeaderColumnAlignTable from 'examples/header-columns/column-align-table'; +import HeaderColumnTitleTable from 'examples/header-columns/column-title-table'; +import HeaderColumnEventTable from 'examples/header-columns/column-event-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/storybook.scss'; +// import { action } from '@storybook/addon-actions'; + +// action('hello'); storiesOf('Welcome', module) .add('react bootstrap table 2 ', () => ); storiesOf('Basic Table', module) - .add('default', () => ); + .add('basic table', () => ) + .add('striped, hover, condensed table', () => ) + .add('borderless table', () => ); + +storiesOf('Work on Columns', module) + .add('Display Nested Data', () => ) + .add('Column Formatter', () => ) + .add('Column Formatter with Custom Data', () => ) + .add('Column Align', () => ) + .add('Column Title', () => ) + .add('Column Event', () => ) + .add('Customize Column Class', () => ) + .add('Customize Column Style', () => ); + +storiesOf('Work on Header Columns', module) + .add('Column Formatter', () => ) + .add('Column Align', () => ) + .add('Column Title', () => ) + .add('Column Event', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss new file mode 100644 index 0000000..d8f5273 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss @@ -0,0 +1,12 @@ +.demo-key-row { + font-weight: bold; + font-size: 18px; +} + +.demo-row-even { + background-color: #bbe +} + +.demo-row-odd { + background-color: #fea +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index 5b4fa49..4b0b109 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -3,3 +3,4 @@ @import "base/misc"; @import "welcome/index"; +@import "columns/index"; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css b/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css new file mode 100644 index 0000000..3638ea9 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css @@ -0,0 +1,2 @@ +/*! Color themes for Google Code Prettify | MIT License | github.com/jmblog/color-themes-for-google-code-prettify */ +.prettyprint{background:#fff;font-family:Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Consolas,monospace;border:0!important}.pln{color:#4d4d4c}ol.linenums{margin-top:0;margin-bottom:0;color:#8e908c}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{padding-left:1em;background-color:#fff;list-style-type:decimal}@media screen{.str{color:#718c00}.kwd{color:#8959a8}.com{color:#8e908c}.typ{color:#4271ae}.lit{color:#f5871f}.pun{color:#4d4d4c}.opn{color:#4d4d4c}.clo{color:#4d4d4c}.tag{color:#c82829}.atn{color:#f5871f}.atv{color:#3e999f}.dec{color:#f5871f}.var{color:#c82829}.fun{color:#4271ae}} \ No newline at end of file From 6f45ae7886eb13488930ca6dc9eeb93fff66cf20 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 2 Sep 2017 02:36:26 -0500 Subject: [PATCH 018/136] fix #31 * implement column.hidden * add story for column.hidden * add docs for column.hidden --- docs/columns.md | 4 ++ .../examples/columns/column-hidden-table.js | 50 +++++++++++++++++++ .../stories/index.js | 2 + packages/react-bootstrap-table2/src/cell.js | 5 ++ .../react-bootstrap-table2/src/header-cell.js | 5 ++ .../react-bootstrap-table2/test/cell.test.js | 18 +++++++ .../test/header-cell.test.js | 18 +++++++ 7 files changed, 102 insertions(+) create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js diff --git a/docs/columns.md b/docs/columns.md index 1a28af7..281221a 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -4,6 +4,7 @@ Available properties in a column object: * [dataField (**required**)](#dataField) * [text (**required**)](#text) +* [hidden](#hidden) * [formatter](#formatter) * [headerFormatter](#headerFormatter) * [formatExtraData](#formatExtraData) @@ -57,6 +58,9 @@ dataField: 'address.city' ## column.text (**required**) - [String] `text` will be apply as the column text in header column, if your header is not only text and you want to customize your header column, please check [`column.headerFormatter`](#headerFormatter) +## column.hidden - [Bool] +`hidden` allow you to hide column when `true` given. + ## column.formatter - [Function] `formatter` allow you to customize the table column and only accept a callback function which take four arguments and a JSX/String are expected for return. diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js new file mode 100644 index 0000000..37d3519 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js @@ -0,0 +1,50 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + hidden: true +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  hidden: true
+},
+// omit...
+];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index a0ea9d0..45f5309 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -18,6 +18,7 @@ import ColumnStyleTable from 'examples/columns/column-style-table'; import ColumnAlignTable from 'examples/columns/column-align-table'; import ColumnTitleTable from 'examples/columns/column-title-table'; import ColumnEventTable from 'examples/columns/column-event-table'; +import ColumnHiddenTable from 'examples/columns/column-hidden-table'; // work on header columns import HeaderColumnFormatTable from 'examples/header-columns/column-format-table'; @@ -46,6 +47,7 @@ storiesOf('Work on Columns', module) .add('Column Formatter with Custom Data', () => ) .add('Column Align', () => ) .add('Column Title', () => ) + .add('Column Hidden', () => ) .add('Column Event', () => ) .add('Customize Column Class', () => ) .add('Customize Column Style', () => ); diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 844e501..8f590f5 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -6,6 +6,7 @@ import _ from './utils'; const Cell = ({ row, rowIndex, column, columnIndex }) => { const { dataField, + hidden, formatter, formatExtraData, style, @@ -43,6 +44,10 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { attrs.style = cellStyle; attrs.className = cellClasses; + if (hidden) { + attrs.style.display = 'none'; + } + return (
); diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 3f1e7b8..036366b 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -7,6 +7,7 @@ import _ from './utils'; const HeaderCell = ({ column, index }) => { const { text, + hidden, headerTitle, headerAlign, headerFormatter, @@ -28,6 +29,9 @@ const HeaderCell = ({ column, index }) => { attrs.style = headerStyle; + if (hidden) { + attrs.style.display = 'none'; + } return ( + + +); + +RowSection.propTypes = { + content: PropTypes.any, + colSpan: PropTypes.number +}; + +RowSection.defaultProps = { + content: null, + colSpan: 1 +}; + +export default RowSection; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 0ff1ef4..5805a43 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -3,4 +3,8 @@ export default class Store { const { data } = props; this.data = data ? data.slice() : []; } + + isEmpty() { + return this.data.length === 0; + } } diff --git a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss new file mode 100644 index 0000000..2737023 --- /dev/null +++ b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss @@ -0,0 +1,5 @@ +.react-bootstrap-table-container { + td.react-bs-table-no-data { + text-align: center + } +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 7528bed..e1bb741 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -1,8 +1,10 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; -import Row from '../src/row'; import Body from '../src/body'; +import Row from '../src/row'; +import RowSection from '../src/row-section'; describe('Body', () => { let wrapper; @@ -33,4 +35,80 @@ describe('Body', () => { expect(wrapper.find(Row).length).toBe(data.length); }); }); + + describe('when data is empty', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tbody').length).toBe(1); + expect(wrapper.find(RowSection).length).toBe(1); + expect(wrapper.find(RowSection).prop('colSpan')).toBe(columns.length); + expect(wrapper.find(RowSection).prop('content')).toBe(null); + }); + + describe('when noDataIndication props is defined', () => { + let emptyIndication; + + describe('and it is not a function', () => { + beforeEach(() => { + emptyIndication = 'Table is empty'; + wrapper = shallow( + ); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tbody').length).toBe(1); + expect(wrapper.find(RowSection).length).toBe(1); + expect(wrapper.find(RowSection).prop('content')).toEqual(emptyIndication); + }); + }); + + describe('and it is a function', () => { + const content = 'Table is empty'; + let emptyIndicationCallBack; + + beforeEach(() => { + emptyIndicationCallBack = sinon.stub().returns(content); + wrapper = shallow( + ); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tbody').length).toBe(1); + expect(wrapper.find(RowSection).length).toBe(1); + expect(wrapper.find(RowSection).prop('content')).toEqual(emptyIndication); + }); + + it('should call custom noDataIndication function correctly', () => { + expect(emptyIndicationCallBack.callCount).toBe(1); + }); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/row-section.test.js b/packages/react-bootstrap-table2/test/row-section.test.js new file mode 100644 index 0000000..640d11b --- /dev/null +++ b/packages/react-bootstrap-table2/test/row-section.test.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import RowSection from '../src/row-section'; + +describe('Row', () => { + const colSpan = 3; + let wrapper; + let content; + + describe('simplest row-section', () => { + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tr').length).toBe(1); + expect(wrapper.find('td').length).toBe(1); + expect(wrapper.find('td').prop('colSpan')).toEqual(colSpan); + expect(wrapper.find('.react-bs-table-no-data').length).toBe(1); + }); + }); +}); diff --git a/webpack.config.babel.js b/webpack.config.babel.js index a429319..bc25d70 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -4,6 +4,7 @@ import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; const sourcePath = path.join(__dirname, 'packages/react-bootstrap-table2/src'); +const sourceStylePath = path.join(__dirname, 'packages/react-bootstrap-table2/style'); const examplePath = path.join(__dirname, 'packages/react-bootstrap-table2-example/src'); const exampleHTMLPath = path.join(__dirname, 'packages/react-bootstrap-table2-example/src/index.html'); @@ -35,8 +36,9 @@ module.exports = { exclude: /node_modules/, include: [sourcePath, examplePath] }, { - test: /\.css$/, - use: 'style-loader!css-loader' + test: /\.scss$/, + use: ['style-loader', 'css-loader', 'sass-loader'], + include: [sourceStylePath] }] }, plugins: [ diff --git a/yarn.lock b/yarn.lock index c1cf440..d958144 100644 --- a/yarn.lock +++ b/yarn.lock @@ -90,6 +90,10 @@ align-text@^0.1.1, align-text@^0.1.3: longest "^1.0.1" repeat-string "^1.5.2" +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -271,6 +275,17 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -285,7 +300,7 @@ axobject-query@^0.1.0: dependencies: ast-types-flow "0.0.7" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -999,6 +1014,10 @@ babylon@^6.17.0, babylon@^6.17.4, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -1136,6 +1155,13 @@ browserify-zlib@^0.1.4: dependencies: pako "~0.2.0" +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" @@ -1224,6 +1250,19 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000721" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000721.tgz#cdc52efe8f82dd13916615b78e86f704ece61802" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -1304,6 +1343,12 @@ circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" +clap@^1.0.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" + dependencies: + chalk "^1.1.3" + classnames@^2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" @@ -1364,20 +1409,52 @@ co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^1.9.0: +color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" dependencies: color-name "^1.1.1" -color-name@^1.1.1: +color-name@^1.0.0, color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -1728,6 +1805,29 @@ crypto-browserify@^3.11.0: public-encrypt "^4.0.0" randombytes "^2.0.0" +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-loader@^0.28.1: + version "0.28.7" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.7.tgz#5f2ee989dd32edd907717f953317656160999c1b" + dependencies: + babel-code-frame "^6.11.0" + css-selector-tokenizer "^0.7.0" + cssnano ">=2.6.1 <4" + icss-utils "^2.1.0" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.0.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.0" + postcss-value-parser "^3.3.0" + source-list-map "^2.0.0" + css-select@^1.1.0, css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" @@ -1737,10 +1837,66 @@ css-select@^1.1.0, css-select@~1.2.0: domutils "1.5.1" nth-check "~1.0.1" +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +"cssnano@>=2.6.1 <4": + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" @@ -1835,6 +1991,10 @@ define-properties@^1.1.2: foreach "^2.0.5" object-keys "^1.0.8" +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -2015,6 +2175,10 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" +electron-to-chromium@^1.2.7: + version "1.3.20" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.20.tgz#2eedd5ccbae7ddc557f68ad1fce9c172e915e4e5" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -2314,7 +2478,7 @@ espree@^3.5.0: acorn "^5.1.1" acorn-jsx "^3.0.0" -esprima@^2.7.1: +esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -2483,6 +2647,10 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -2603,6 +2771,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + for-in@^0.1.3: version "0.1.8" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" @@ -2962,6 +3134,10 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + html-encoding-sniffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" @@ -3065,6 +3241,16 @@ iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.18" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" + dependencies: + postcss "^6.0.1" + ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" @@ -3087,6 +3273,10 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -3157,6 +3347,10 @@ ipaddr.js@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3315,6 +3509,12 @@ is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" @@ -3640,7 +3840,7 @@ jest-validate@^20.0.3: leven "^2.1.0" pretty-format "^20.0.3" -js-base64@^2.1.8: +js-base64@^2.1.8, js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" @@ -3655,6 +3855,13 @@ js-yaml@^3.7.0, js-yaml@^3.9.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -3915,6 +4122,10 @@ lodash.bind@^4.1.4: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + lodash.clonedeep@^4.3.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -3943,6 +4154,10 @@ lodash.map@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + lodash.merge@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" @@ -3984,6 +4199,10 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -4028,6 +4247,10 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + make-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" @@ -4044,6 +4267,10 @@ map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +math-expression-evaluator@^1.2.14: + version "1.2.17" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4172,7 +4399,7 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: +mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -4377,6 +4604,19 @@ normalize-path@^2.0.0, normalize-path@^2.0.1: dependencies: remove-trailing-separator "^1.0.1" +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -4398,6 +4638,10 @@ nth-check@~1.0.1: dependencies: boolbase "~1.0.0" +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -4724,10 +4968,260 @@ portfinder@^1.0.9: debug "^2.2.0" mkdirp "0.5.x" +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-scope@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.1: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.10.tgz#c311b89734483d87a91a56dc9e53f15f4e6e84e4" + dependencies: + chalk "^2.1.0" + source-map "^0.5.7" + supports-color "^4.2.1" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" +prepend-http@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" @@ -4808,7 +5302,7 @@ punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -q@^1.4.1: +q@^1.1.2, q@^1.4.1: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" @@ -4820,6 +5314,13 @@ qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -4961,6 +5462,20 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" @@ -4984,6 +5499,14 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -5175,7 +5698,7 @@ sass-loader@^6.0.6: lodash.tail "^4.1.1" pify "^3.0.0" -sax@^1.2.1: +sax@^1.2.1, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -5338,7 +5861,7 @@ sockjs@0.3.18: faye-websocket "^0.10.0" uuid "^2.0.2" -sort-keys@^1.1.1: +sort-keys@^1.0.0, sort-keys@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" dependencies: @@ -5370,6 +5893,10 @@ source-map@^0.4.2, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" +source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -5470,6 +5997,10 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + string-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -5551,11 +6082,17 @@ strong-log-transformer@^1.0.6: moment "^2.6.0" through "^2.3.4" +style-loader@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.17.0.tgz#e8254bccdb7af74bd58274e36107b4d5ab4df310" + dependencies: + loader-utils "^1.0.2" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.1, supports-color@^3.1.2: +supports-color@^3.1.1, supports-color@^3.1.2, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: @@ -5567,6 +6104,18 @@ supports-color@^4.0.0, supports-color@^4.2.1: dependencies: has-flag "^2.0.0" +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -5799,6 +6348,20 @@ uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -5873,6 +6436,10 @@ vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -6024,6 +6591,10 @@ whatwg-url@^4.3.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" From 67c37e95f9187f496fd4a50c6cf4248e1d9666c3 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sat, 2 Sep 2017 19:15:34 +0800 Subject: [PATCH 021/136] fix #18 * allow user to customize class for header cell * add corresponding story * allow user to customize inline-style for header cell * add corresponding story * [test] unit test for headerStyle * [test] unit test for headerClasses * update Document --- docs/columns.md | 27 ++++++ .../header-columns/column-class-table.js | 62 ++++++++++++ .../header-columns/column-style-table.js | 78 +++++++++++++++ .../stories/index.js | 6 +- .../react-bootstrap-table2/src/header-cell.js | 17 +++- .../test/header-cell.test.js | 96 +++++++++++++++++++ 6 files changed, 281 insertions(+), 5 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js diff --git a/docs/columns.md b/docs/columns.md index 281221a..38594d5 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -16,6 +16,8 @@ Available properties in a column object: * [headerTitle](#headerTitle) * [headerEvents](#headerEvents) * [headerAlign](#headerAlign) +* [headerClasses](#headerClasses) +* [headerStyle](#headerStyle) Following is a most simplest and basic usage: @@ -93,6 +95,20 @@ In addition, `classes` also accept a callback function which have more power to * `row` * `colIndex` +## column.headerClasses - [String | Function] +It's availabe to have customized class on table header column: + +```js +{ + // omit... + headerClasses: 'id-custom-cell' +} +``` +In addition, similar to [`column.classes`](#classes), `headerClasses` also accept a callback function which have more power to custom the css class on header column. This callback function take two arguments and a string is expect to return: + +* `column` +* `colIndex` + ## column.style - [Object | Function] It's availabe to have custom class on table column: @@ -104,6 +120,17 @@ It's availabe to have custom class on table column: ``` `style` like [`column.classes`](#classes), it accept a callback function too and have same arguments: `cell`, `row` and `colIndex`. +## column.headerStyle - [Object | Function] +It's availabe to have customized inline-style on table header column: + +```js +{ + // omit... + headerStyle: { backgroundColor: 'green' } +} +``` +`headerStyle` like [`column.headerClasses`](#headerClasses), it accept a callback function as well and have same arguments: `column` and `colIndex`. + ## column.title - [Bool | Function] `react-bootstrap-table2` is disable [`HTML title`](https://www.w3schools.com/tags/tag_title.asp) as default. You can assign `title` as `true` to enable the HTML title on table column. In addition, you can custom the title via a callback function: diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js new file mode 100644 index 0000000..31f7e8a --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js @@ -0,0 +1,62 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + headerClasses: 'demo-row-odd' +}, { + dataField: 'price', + text: 'Product Price', + headerClasses: (column, colIndex) => { + if (colIndex % 2 === 0) return 'demo-row-even'; + return 'demo-row-odd'; + } +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerClasses: 'demo-row-odd'
+}, {
+  dataField: 'price',
+  text: 'Product Price',
+  headerClasses: (column, colIndex) => {
+    if (colIndex % 2 === 0) return 'demo-row-even';
+    return 'demo-row-odd';
+  }
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js new file mode 100644 index 0000000..c02921e --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js @@ -0,0 +1,78 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + headerStyle: { + backgroundColor: '#fea' + } +}, { + dataField: 'price', + text: 'Product Price', + headerStyle: (column, colIndex) => { + if (colIndex % 2 === 0) { + return { + backgroundColor: '#bbe' + }; + } + return { + backgroundColor: '#fea' + }; + } +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerStyle: {
+    backgroundColor: '#fea'
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price',
+  headerStyle: (column, colIndex) => {
+    if (colIndex % 2 === 0) {
+      return {
+        backgroundColor: '#bbe'
+      };
+    }
+    return {
+      backgroundColor: '#fea'
+    };
+  }
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 6d3a202..9857f3d 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -26,6 +26,8 @@ import HeaderColumnFormatTable from 'examples/header-columns/column-format-table import HeaderColumnAlignTable from 'examples/header-columns/column-align-table'; import HeaderColumnTitleTable from 'examples/header-columns/column-title-table'; import HeaderColumnEventTable from 'examples/header-columns/column-event-table'; +import HeaderColumnClassTable from 'examples/header-columns/column-class-table'; +import HeaderColumnStyleTable from 'examples/header-columns/column-style-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -59,4 +61,6 @@ storiesOf('Work on Header Columns', module) .add('Column Formatter', () => ) .add('Column Align', () => ) .add('Column Title', () => ) - .add('Column Event', () => ); + .add('Column Event', () => ) + .add('Customize Column Class', () => ) + .add('Customize Column Style', () => ); diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 036366b..062e4f6 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -11,23 +11,32 @@ const HeaderCell = ({ column, index }) => { headerTitle, headerAlign, headerFormatter, - headerEvents + headerEvents, + headerClasses, + headerStyle } = column; const attrs = { ...headerEvents }; - const headerStyle = {}; const children = headerFormatter ? headerFormatter(column, index) : text; + const cellClasses = _.isFunction(headerClasses) ? headerClasses(column, index) : headerClasses; + + let cellStyle = {}; + + if (headerStyle) { + cellStyle = _.isFunction(headerStyle) ? headerStyle(column, index) : headerStyle; + } if (headerTitle) { attrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; } if (headerAlign) { - headerStyle.textAlign = _.isFunction(headerAlign) ? headerAlign(column, index) : headerAlign; + cellStyle.textAlign = _.isFunction(headerAlign) ? headerAlign(column, index) : headerAlign; } - attrs.style = headerStyle; + attrs.style = cellStyle; + attrs.className = cellClasses; if (hidden) { attrs.style.display = 'none'; diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 019f35b..0dd027a 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -191,4 +191,100 @@ describe('HeaderCell', () => { expect(column.headerEvents.onClick.callCount).toBe(1); }); }); + + describe('when column.headerStyle prop is defined', () => { + let column; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when headerStyle is an object', () => { + beforeEach(() => { + column.headerStyle = { backgroundColor: 'red' }; + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('style')).toEqual(column.headerStyle); + }); + }); + + describe('when headerStyle is a function', () => { + const returnStyle = { backgroundColor: 'red' }; + let styleCallBack; + + beforeEach(() => { + styleCallBack = sinon.stub() + .withArgs(column, index) + .returns(returnStyle); + column.headerStyle = styleCallBack; + wrapper = shallow(); + }); + + afterEach(() => { styleCallBack.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('style')).toEqual(returnStyle); + }); + + it('should call custom style function correctly', () => { + expect(styleCallBack.callCount).toBe(1); + expect(styleCallBack.calledWith(column, index)).toBe(true); + }); + }); + }); + + describe('when column.headerClasses prop is defined', () => { + let column; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when headerClasses is an object', () => { + beforeEach(() => { + column.headerClasses = 'td-test-class'; + wrapper = shallow(); + }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(column.headerClasses)).toBe(true); + }); + }); + + describe('when headerClasses is a function', () => { + const returnClasses = 'td-test-class'; + let classesCallBack; + + beforeEach(() => { + classesCallBack = sinon.stub() + .withArgs(column, index) + .returns(returnClasses); + column.headerClasses = classesCallBack; + wrapper = shallow(); + }); + + afterEach(() => { classesCallBack.reset(); }); + + it('should render successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(returnClasses)).toBe(true); + }); + + it('should call custom classes function correctly', () => { + expect(classesCallBack.callCount).toBe(1); + expect(classesCallBack.calledWith(column, index)).toBe(true); + }); + }); + }); }); From 82b827561dd3863e54481e3056fa4b88e9364e4b Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sun, 3 Sep 2017 13:31:58 +0800 Subject: [PATCH 022/136] Enhancement/code prettify (#46) * beautify code block with google-code-prettify * prettyPrint when componentDidMount * css style for code block * skip rule 'no-unresolved' for eslint * conflict with webpack resolve path * refactor all code block in example folder with component * refactor scss folder structure * specify the responsibility for each stylesheet with file name * load local color themes, tomorrow, for google code prettify * re-select demo color and save into variable * unify the color system for storybook --- .eslintrc | 2 +- .../.storybook/preview-head.html | 2 +- .../.storybook/webpack.config.js | 1 + .../examples/basic/borderless-table.js | 20 +++++++------- .../examples/basic/index.js | 15 ++++++----- .../examples/basic/no-data-table.js | 14 +++++----- .../basic/striped-hover-condensed-table.js | 24 +++++++++-------- .../examples/columns/column-align-table.js | 14 +++++----- .../examples/columns/column-class-table.js | 14 +++++----- .../examples/columns/column-event-table.js | 16 +++++++----- .../examples/columns/column-format-table.js | 22 +++++++++------- .../column-format-with-extra-data-table.js | 24 +++++++++-------- .../examples/columns/column-hidden-table.js | 14 +++++----- .../examples/columns/column-style-table.js | 22 +++++++++------- .../examples/columns/column-title-table.js | 14 +++++----- .../examples/columns/nested-data-table.js | 15 ++++++----- .../examples/common/codeBlock.js | 26 +++++++++++++++++++ .../header-columns/column-align-table.js | 14 +++++----- .../header-columns/column-class-table.js | 14 +++++----- .../header-columns/column-event-table.js | 16 +++++++----- .../header-columns/column-format-table.js | 22 +++++++++------- .../header-columns/column-style-table.js | 26 ++++++++++--------- .../header-columns/column-title-table.js | 14 +++++----- .../stories/index.js | 1 + .../stories/stylesheet/base/_base.scss | 3 +++ .../stories/stylesheet/base/_code-block.scss | 10 +++++++ .../base/{_misc.scss => _github-corner.scss} | 21 --------------- .../stories/stylesheet/columns/_index.scss | 4 +-- .../stories/stylesheet/storybook.scss | 3 ++- .../stories/stylesheet/welcome/_index.scss | 21 +++++++++++++++ 30 files changed, 255 insertions(+), 173 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/common/codeBlock.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/base/_code-block.scss rename packages/react-bootstrap-table2-example/stories/stylesheet/base/{_misc.scss => _github-corner.scss} (52%) diff --git a/.eslintrc b/.eslintrc index 9fb0e2b..c29b8e9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,7 @@ "react/jsx-space-before-closing": 0, "react/jsx-tag-spacing": ["error", { "beforeSelfClosing": "always" }], "import/extensions": 0, // skip import extensions - "import/no-unresolved": [1, { "ignore": ["^react-bootstrap-table"] }], // monorepo setup + "import/no-unresolved": [0, { "ignore": ["^react-bootstrap-table"] }], // monorepo setup "import/prefer-default-export": 0, "import/no-extraneous-dependencies": 0 }, diff --git a/packages/react-bootstrap-table2-example/.storybook/preview-head.html b/packages/react-bootstrap-table2-example/.storybook/preview-head.html index 25bdb14..edb9231 100644 --- a/packages/react-bootstrap-table2-example/.storybook/preview-head.html +++ b/packages/react-bootstrap-table2-example/.storybook/preview-head.html @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index a61d290..c30b7b0 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -6,6 +6,7 @@ const storyPath = path.join(__dirname, '../stories'); const examplesPath = path.join(__dirname, '../examples'); const aliasPath = { examples: examplesPath, + common: path.join(examplesPath, 'common'), stories: storyPath, }; diff --git a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js index 881f939..8ba0dbb 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -29,6 +30,15 @@ const columns = [{ text: 'Product Price' }]; +const sourceCode = `\ + +`; + export default () => (
( columns={ columns } bordered={ false } /> -
{`
-
-    `}
-    
+ { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js index b1b762c..a4da0a7 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/index.js +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -29,10 +30,8 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`const columns = [{
+const sourceCode = `\
+const columns = [{
   dataField: 'id',
   text: 'Product ID'
 }, {
@@ -44,7 +43,11 @@ export default () => (
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js index 25ecb9c..f386f68 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const columns = [{ dataField: 'id', @@ -13,10 +14,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 
 
 // Following is more customizable example
@@ -26,7 +24,11 @@ function indication() {
 }
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js index 84a86fc..2d62c32 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -29,6 +30,17 @@ const columns = [{ text: 'Product Price' }]; +const sourceCode = `\ + +`; + export default () => (
( hover condensed /> -
{`
-
-    `}
-    
+ { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js index c79c502..6e7d1bb 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -35,10 +36,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -56,7 +54,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js index 545616b..494f7a8 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -35,10 +36,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -56,7 +54,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js index 17bb43b..9d88412 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -3,6 +3,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -34,11 +35,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
-

Try to Click on Product ID columns

- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -54,7 +51,12 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+

Try to Click on Product ID columns

+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js index ecc40fe..641e1ee 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -43,14 +44,7 @@ const columns = [{ formatter: priceFormatter }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 function priceFormatter(cell, row) {
   if (row.onSale) {
     return (
@@ -78,7 +72,15 @@ const columns = [
   data={ products }
   columns={ columns }
 />
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js index 1e2e1ca..cf5cfce 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -41,15 +42,7 @@ const columns = [{ } }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 function rankFormatter(cell, row, rowIndex, formatExtraData) {
   return (
     
@@ -72,7 +65,16 @@ const columns = [
   data={ products }
   columns={ columns }
 />
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js index 37d3519..1a3973e 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -31,10 +32,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -44,7 +42,11 @@ const columns = [{
 ];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js index 520e005..455bed8 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -32,11 +33,11 @@ const columns = [{ style: (cell, row, colIndex) => { if (row.id % 2 === 0) { return { - backgroundColor: '#bbe' + backgroundColor: '#81c784' }; } return { - backgroundColor: '#fea' + backgroundColor: '#c8e6c9' }; } }, { @@ -44,10 +45,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -61,11 +59,11 @@ const columns = [{
   style: (cell, row, colIndex) => {
     if (row.id % 2 === 0) {
       return {
-        backgroundColor: '#bbe'
+        backgroundColor: '#81c784'
       };
     }
     return {
-      backgroundColor: '#fea'
+      backgroundColor: '#c8e6c9'
     };
   }
 }, {
@@ -74,7 +72,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js index 8951419..f0348d5 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -32,10 +33,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -50,7 +48,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js index 48e3ced..6d2b3dd 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -1,6 +1,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -39,10 +40,8 @@ const columns = [{ text: 'PostCode' }]; -export default () => ( -
- -
{`const columns = [{
+const sourceCode = `\
+const columns = [{
   dataField: 'id',
   text: 'User ID'
 }, {
@@ -60,7 +59,11 @@ export default () => (
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/common/codeBlock.js b/packages/react-bootstrap-table2-example/examples/common/codeBlock.js new file mode 100644 index 0000000..c1be07d --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/common/codeBlock.js @@ -0,0 +1,26 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +export default class extends Component { + static propTypes = { + children: PropTypes.string + } + static defaultProps = { + children: '' + } + componentDidMount() { + // code-prettify + // run the PR.prettyPrint() function once your page has finished loading + if (typeof (PR) !== 'undefined') PR.prettyPrint(); // eslint-disable-line no-undef + } + + render() { + return ( +
+
+          { this.props.children }
+        
+
+ ); + } +} diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js index ef30e9e..0894a29 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -32,10 +33,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -50,7 +48,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js index 31f7e8a..9191944 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -35,10 +36,7 @@ const columns = [{ } }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID'
@@ -56,7 +54,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js index 1ab6533..074a63e 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -3,6 +3,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -34,11 +35,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
-

Try to Click on Product ID header column

- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -54,7 +51,12 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+

Try to Click on Product ID header column

+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js index 923c8c0..3cffe55 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -38,14 +39,7 @@ const columns = [{ headerFormatter: priceFormatter }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 function priceFormatter(column, colIndex) {
   return (
     
$$ { column.text } $$
@@ -65,7 +59,15 @@ const columns = [ data={ products } columns={ columns } /> - `} -
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js index c02921e..38037a0 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -26,7 +27,7 @@ const columns = [{ dataField: 'name', text: 'Product Name', headerStyle: { - backgroundColor: '#fea' + backgroundColor: '#c8e6c9' } }, { dataField: 'price', @@ -34,19 +35,16 @@ const columns = [{ headerStyle: (column, colIndex) => { if (colIndex % 2 === 0) { return { - backgroundColor: '#bbe' + backgroundColor: '#81c784' }; } return { - backgroundColor: '#fea' + backgroundColor: '#c8e6c9' }; } }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID'
@@ -54,7 +52,7 @@ const columns = [{
   dataField: 'name',
   text: 'Product Name',
   headerStyle: {
-    backgroundColor: '#fea'
+    backgroundColor: '#c8e6c9'
   }
 }, {
   dataField: 'price',
@@ -62,17 +60,21 @@ const columns = [{
   headerStyle: (column, colIndex) => {
     if (colIndex % 2 === 0) {
       return {
-        backgroundColor: '#bbe'
+        backgroundColor: '#81c784'
       };
     }
     return {
-      backgroundColor: '#fea'
+      backgroundColor: '#c8e6c9'
     };
   }
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js index 5af4b11..bd1234b 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -2,6 +2,7 @@ import React from 'react'; import { BootstrapTable } from 'react-bootstrap-table2'; +import Code from 'common/codeBlock'; const products = []; @@ -32,10 +33,7 @@ const columns = [{ text: 'Product Price' }]; -export default () => ( -
- -
{`
+const sourceCode = `\
 const columns = [{
   dataField: 'id',
   text: 'Product ID',
@@ -50,7 +48,11 @@ const columns = [{
 }];
 
 
-    `}
-    
+`; + +export default () => ( +
+ + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 9857f3d..d63f949 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -31,6 +31,7 @@ import HeaderColumnStyleTable from 'examples/header-columns/column-style-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; +import 'stories/stylesheet/tomorrow.min.css'; import 'stories/stylesheet/storybook.scss'; import 'react-bootstrap-table2/style/react-bootstrap-table.scss'; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss index 786a4b1..5097d01 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_base.scss @@ -8,3 +8,6 @@ body { $grey-500: #9E9E9E; $grey-900: #212121; $pink-500: #E91E63; +$green-lighten-2: #81c784; +$green-lighten-4: #c8e6c9; +$markdown-color: #f6f8fa; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_code-block.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_code-block.scss new file mode 100644 index 0000000..48b2052 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_code-block.scss @@ -0,0 +1,10 @@ +.highlight-text-html-basic { + margin-bottom: 16px; + + pre { + background-color: $markdown-color; + padding: 16px; + border-radius: 3px; + } +} + diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_github-corner.scss similarity index 52% rename from packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss rename to packages/react-bootstrap-table2-example/stories/stylesheet/base/_github-corner.scss index a9c50f1..a00c580 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/base/_misc.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/base/_github-corner.scss @@ -25,24 +25,3 @@ animation: octocat-wave 560ms ease-in-out } } - -/* Adding cursor blinking animation */ -.typed-cursor{ - font-size: 30px; - color: $grey-500; - opacity: 1; - animation: typedjsBlink 0.7s infinite; -} -@keyframes typedjsBlink{ - 50% { opacity: 0.0; } -} -@-webkit-keyframes typedjsBlink{ - 0% { opacity: 1; } - 50% { opacity: 0.0; } - 100% { opacity: 1; } -} -.typed-fade-out{ - opacity: 0; - transition: opacity .25s; - animation: 0; -} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss index d8f5273..3468c70 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss @@ -4,9 +4,9 @@ } .demo-row-even { - background-color: #bbe + background-color: $green-lighten-2; } .demo-row-odd { - background-color: #fea + background-color: $green-lighten-4; } \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index 4b0b109..d5de950 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -1,6 +1,7 @@ /* customized style for storybook*/ @import "base/base"; -@import "base/misc"; +@import "base/github-corner"; +@import "base/code-block"; @import "welcome/index"; @import "columns/index"; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss index 00d6e64..1d7949c 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/welcome/_index.scss @@ -15,3 +15,24 @@ span.love-icon { color: $pink-500; } + +/* Adding cursor blinking animation */ +.typed-cursor{ + font-size: 30px; + color: $grey-500; + opacity: 1; + animation: typedjsBlink 0.7s infinite; +} +@keyframes typedjsBlink{ + 50% { opacity: 0.0; } +} +@-webkit-keyframes typedjsBlink{ + 0% { opacity: 1; } + 50% { opacity: 0.0; } + 100% { opacity: 1; } +} +.typed-fade-out{ + opacity: 0; + transition: opacity .25s; + animation: 0; +} From ae5c677854ebc18f0a5a026379af957a45a36f1f Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 3 Sep 2017 02:25:56 -0500 Subject: [PATCH 023/136] Implement stateful layer (#48) * implement an internal stateful layer for data change(update/insert/delete) * BootstrapTable -> BootstrapTableful --- .../examples/basic/borderless-table.js | 6 +++--- .../examples/basic/index.js | 6 +++--- .../examples/basic/no-data-table.js | 8 ++++---- .../basic/striped-hover-condensed-table.js | 6 +++--- .../examples/columns/column-align-table.js | 6 +++--- .../examples/columns/column-class-table.js | 6 +++--- .../examples/columns/column-event-table.js | 6 +++--- .../examples/columns/column-format-table.js | 6 +++--- .../column-format-with-extra-data-table.js | 6 +++--- .../examples/columns/column-hidden-table.js | 6 +++--- .../examples/columns/column-style-table.js | 6 +++--- .../examples/columns/column-title-table.js | 6 +++--- .../examples/columns/nested-data-table.js | 6 +++--- .../header-columns/column-align-table.js | 6 +++--- .../header-columns/column-class-table.js | 6 +++--- .../header-columns/column-event-table.js | 6 +++--- .../header-columns/column-format-table.js | 6 +++--- .../header-columns/column-style-table.js | 6 +++--- .../header-columns/column-title-table.js | 6 +++--- .../src/index.js | 4 ++-- .../src/bootstrap-table.js | 9 ++++++--- packages/react-bootstrap-table2/src/index.js | 6 +++++- .../src/props-resolver/index.js | 4 ++++ .../src/stateful-layer.js | 20 +++++++++++++++++++ 24 files changed, 95 insertions(+), 64 deletions(-) create mode 100644 packages/react-bootstrap-table2/src/stateful-layer.js diff --git a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js index 8ba0dbb..fdc07c7 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -31,7 +31,7 @@ const columns = [{ }]; const sourceCode = `\ - (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js index f386f68..0ed9f60 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const columns = [{ @@ -15,7 +15,7 @@ const columns = [{ }]; const sourceCode = `\ - + // Following is more customizable example @@ -23,12 +23,12 @@ function indication() { // return something here } - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js index 2d62c32..da0384f 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -31,7 +31,7 @@ const columns = [{ }]; const sourceCode = `\ - (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js index 494f7a8..6b7dcc7 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -53,12 +53,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js index 9d88412..4b3e0a2 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -2,7 +2,7 @@ /* eslint no-alert: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -50,13 +50,13 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (

Try to Click on Product ID columns

- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js index 641e1ee..5717bb5 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -67,7 +67,7 @@ const columns = [ formatter: priceFormatter }]; - (
- (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js index 455bed8..dcdd64b 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -71,12 +71,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js index f0348d5..140ae71 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -47,12 +47,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js index 6d2b3dd..c7d4774 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -58,12 +58,12 @@ const columns = [{ text: 'PostCode' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js index 0894a29..536b075 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -47,12 +47,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js index 9191944..ed3b463 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -53,12 +53,12 @@ const columns = [{ } }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js index 074a63e..002f527 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -2,7 +2,7 @@ /* eslint no-alert: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -50,13 +50,13 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (

Try to Click on Product ID header column

- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js index 3cffe55..703e2c5 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -54,7 +54,7 @@ const columns = [ headerFormatter: priceFormatter }]; - (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js index bd1234b..b936a21 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; import Code from 'common/codeBlock'; const products = []; @@ -47,12 +47,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/src/index.js b/packages/react-bootstrap-table2-example/src/index.js index e6730f5..6b2f5f9 100644 --- a/packages/react-bootstrap-table2-example/src/index.js +++ b/packages/react-bootstrap-table2-example/src/index.js @@ -1,7 +1,7 @@ import React from 'react'; import ReactDom from 'react-dom'; -import { BootstrapTable } from 'react-bootstrap-table2'; +import { BootstrapTableful } from 'react-bootstrap-table2'; const products = []; @@ -62,5 +62,5 @@ const columns = [{ ReactDom.render( - , + , document.getElementById('example')); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 8db2286..f60f519 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -11,11 +11,13 @@ class BootstrapTable extends PropsBaseResolver(Component) { constructor(props) { super(props); this.validateProps(); - this.store = new Store(props); + const { store } = this.props; + this.store = !store ? new Store(props) : store; } render() { const { + data, columns, keyField, striped, @@ -37,10 +39,10 @@ class BootstrapTable extends PropsBaseResolver(Component) {
{ value }{ content }
{ value }{ row[column.dataField] }

{ row[column.dataField] }

{ content }{ content }
{ row[column.dataField] }

{ row[column.dataField] }

{ content } - { column.text } - + { column.text } +
{ column.text } { column.text } @@ -29,7 +36,9 @@ HeaderCell.propTypes = { style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headerTitle: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), - events: PropTypes.object + events: PropTypes.object, + headerAlign: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) }).isRequired, index: PropTypes.number.isRequired }; diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index fc054a2..2a1cd75 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -238,4 +238,53 @@ describe('Cell', () => { expect(column.events.onClick.callCount).toBe(1); }); }); + + describe('when column.align prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when align is string', () => { + beforeEach(() => { + column.align = 'center'; + wrapper = shallow( + ); + }); + + it('should render style.textAlign correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('style').textAlign).toEqual(column.align); + }); + }); + + describe('when align is custom function', () => { + const customAlign = 'center'; + let alignCallBack; + + beforeEach(() => { + alignCallBack = sinon.stub() + .withArgs(row[column.dataField], row, columnIndex) + .returns(customAlign); + column.align = alignCallBack; + wrapper = shallow( + ); + }); + + it('should render style.textAlign correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('style').textAlign).toEqual(customAlign); + }); + + it('should call custom headerAlign function correctly', () => { + expect(alignCallBack.callCount).toBe(1); + expect(alignCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 56a9727..4e5ce23 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -21,7 +21,12 @@ describe('HeaderCell', () => { it('should render successfully', () => { expect(wrapper.length).toBe(1); expect(wrapper.find('th').length).toBe(1); - expect(wrapper.contains({ column.text } - { column.text } + { children } { content } @@ -40,6 +44,7 @@ HeaderCell.propTypes = { column: PropTypes.shape({ dataField: PropTypes.string.isRequired, text: PropTypes.string.isRequired, + hidden: PropTypes.bool, headerFormatter: PropTypes.func, formatter: PropTypes.func, formatExtraData: PropTypes.any, diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 2a1cd75..aebc348 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -27,6 +27,24 @@ describe('Cell', () => { }); }); + describe('when column.hidden prop is true', () => { + const column = { + dataField: 'id', + text: 'ID', + hidden: true + }; + + beforeEach(() => { + wrapper = shallow(); + }); + + it('should have \'none\' value for style.display', () => { + const style = wrapper.find('td').prop('style'); + expect(style).toBeDefined(); + expect(style.display).toEqual('none'); + }); + }); + describe('when column.formatter prop is defined', () => { const rowIndex = 1; const column = { diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 76a2962..019f35b 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -30,6 +30,24 @@ describe('HeaderCell', () => { }); }); + describe('when column.hidden props is true', () => { + const column = { + dataField: 'id', + text: 'ID', + hidden: true + }; + + beforeEach(() => { + wrapper = shallow(); + }); + + it('should have \'none\' value for style.display', () => { + const style = wrapper.find('th').prop('style'); + expect(style).toBeDefined(); + expect(style.display).toEqual('none'); + }); + }); + describe('when column.headerTitle prop is defined', () => { let column; beforeEach(() => { From 47e807672fabf6b8696da8132ed12e60ee361724 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 2 Sep 2017 03:45:53 -0500 Subject: [PATCH 019/136] refine the relation for props resolver and internal store --- .../src/bootstrap-table.js | 8 +++++--- .../src/props-resolver/column-resolver.js | 9 ++++++--- .../src/props-resolver/index.js | 6 +++--- .../react-bootstrap-table2/src/store/base.js | 16 ++++++---------- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 4cbb69d..4d7be74 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -4,12 +4,14 @@ import cs from 'classnames'; import Header from './header'; import Body from './body'; -import storeBase from './store/base'; +import Store from './store/base'; +import PropsBaseResolver from './props-resolver'; -class BootstrapTable extends storeBase(Component) { +class BootstrapTable extends PropsBaseResolver(Component) { constructor(props) { super(props); this.validateProps(); + this.store = new Store(props); } render() { @@ -34,7 +36,7 @@ class BootstrapTable extends storeBase(Component) {
diff --git a/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js index 0feef53..c49b395 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js +++ b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js @@ -1,3 +1,6 @@ -export function columnSize(columns) { - return columns.length; -} +export default ExtendBase => + class ColumnResolver extends ExtendBase { + columnSize() { + return this.props.columns.length; + } + }; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index 2cb8de1..252ffb4 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -1,13 +1,13 @@ -import { columnSize } from './column-resolver'; +import ColumnResolver from './column-resolver'; export default ExtendBase => - class TableResolver extends ExtendBase { + class TableResolver extends ColumnResolver(ExtendBase) { validateProps() { const { columns, keyField } = this.props; if (!keyField) { throw new Error('Please specify a field as key via keyField'); } - if (columnSize(columns) <= 0) { + if (this.columnSize(columns) <= 0) { throw new Error('No any visible columns detect'); } } diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index d58c626..0ff1ef4 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -1,10 +1,6 @@ -import TableResolver from '../props-resolver'; - -export default ExtendBase => - class Store extends TableResolver(ExtendBase) { - constructor(props) { - super(props); - const { data } = this.props; - this.data = data ? data.slice() : []; - } - }; +export default class Store { + constructor(props) { + const { data } = props; + this.data = data ? data.slice() : []; + } +} From 9f9f78e73be1702568ff0265b5e4a2b4ab644b1a Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 2 Sep 2017 06:10:24 -0500 Subject: [PATCH 020/136] fix #40 * add missing dependenies * tuning webpack loader for scss * implement noDataIndication * add story for noDataIndication prop * patch yarn.lock --- package.json | 2 + .../.storybook/webpack.config.js | 3 +- .../examples/basic/no-data-table.js | 32 + .../stories/index.js | 5 +- packages/react-bootstrap-table2/src/body.js | 46 +- .../src/bootstrap-table.js | 10 +- .../src/props-resolver/column-resolver.js | 2 +- .../src/props-resolver/index.js | 2 +- .../react-bootstrap-table2/src/row-section.js | 26 + .../react-bootstrap-table2/src/store/base.js | 4 + .../style/react-bootstrap-table.scss | 5 + .../react-bootstrap-table2/test/body.test.js | 80 ++- .../test/row-section.test.js | 24 + webpack.config.babel.js | 6 +- yarn.lock | 591 +++++++++++++++++- 15 files changed, 805 insertions(+), 33 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/basic/no-data-table.js create mode 100644 packages/react-bootstrap-table2/src/row-section.js create mode 100644 packages/react-bootstrap-table2/style/react-bootstrap-table.scss create mode 100644 packages/react-bootstrap-table2/test/row-section.test.js diff --git a/package.json b/package.json index c78a245..d3cc155 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "babel-register": "^6.24.1", + "css-loader": "^0.28.1", "enzyme": "^2.9.1", "eslint": "^4.5.0", "eslint-config-airbnb": "15.1.0", @@ -45,6 +46,7 @@ "react-test-renderer": "^15.6.1", "sass-loader": "^6.0.6", "sinon": "^3.2.1", + "style-loader": "^0.17.0", "webpack": "^3.5.4", "webpack-dev-server": "^2.7.1" }, diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index 208e18e..a61d290 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -1,6 +1,7 @@ const path = require('path'); const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/src'); +const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); const storyPath = path.join(__dirname, '../stories'); const examplesPath = path.join(__dirname, '../examples'); const aliasPath = { @@ -25,7 +26,7 @@ const loaders = [{ }, { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], - include: [storyPath, sourcePath, examplesPath], + include: [storyPath, sourceStylePath], }, { test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000', diff --git a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js new file mode 100644 index 0000000..25ecb9c --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js @@ -0,0 +1,32 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+
+
+// Following is more customizable example
+
+function indication() {
+  // return something here
+}
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 45f5309..6d3a202 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -8,6 +8,7 @@ import Welcome from 'examples/welcome'; import BasicTable from 'examples/basic'; import BorderlessTable from 'examples/basic/borderless-table'; import StripHoverCondensedTable from 'examples/basic/striped-hover-condensed-table'; +import NoDataTable from 'examples/basic/no-data-table'; // work on columns import NestedDataTable from 'examples/columns/nested-data-table'; @@ -29,6 +30,7 @@ import HeaderColumnEventTable from 'examples/header-columns/column-event-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/storybook.scss'; +import 'react-bootstrap-table2/style/react-bootstrap-table.scss'; // import { action } from '@storybook/addon-actions'; @@ -39,7 +41,8 @@ storiesOf('Welcome', module) storiesOf('Basic Table', module) .add('basic table', () => ) .add('striped, hover, condensed table', () => ) - .add('borderless table', () => ); + .add('borderless table', () => ) + .add('Indication For Empty Table', () => ); storiesOf('Work on Columns', module) .add('Display Nested Data', () => ) diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 33a8c18..a69af71 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -1,23 +1,41 @@ +/* eslint react/prop-types: 0 */ import React from 'react'; import PropTypes from 'prop-types'; import _ from './utils'; import Row from './row'; +import RowSection from './row-section'; -const Body = ({ columns, data, keyField }) => ( -
- { - data.map((row, index) => ( - - )) - } - -); +const Body = (props) => { + const { + columns, + data, + keyField, + isEmpty, + noDataIndication, + visibleColumnSize + } = props; + + let content; + + if (isEmpty) { + const indication = _.isFunction(noDataIndication) ? noDataIndication() : noDataIndication; + content = ; + } else { + content = data.map((row, index) => ( + + )); + } + + return ( + { content } + ); +}; Body.propTypes = { keyField: PropTypes.string.isRequired, diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 4d7be74..8db2286 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -21,7 +21,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { striped, hover, bordered, - condensed + condensed, + noDataIndication } = this.props; const tableClass = cs('table', { @@ -39,6 +40,9 @@ class BootstrapTable extends PropsBaseResolver(Component) { data={ this.store.data } keyField={ keyField } columns={ columns } + isEmpty={ this.store.isEmpty() } + visibleColumnSize={ this.visibleColumnSize() } + noDataIndication={ noDataIndication } />
@@ -50,6 +54,7 @@ BootstrapTable.propTypes = { keyField: PropTypes.string.isRequired, data: PropTypes.array.isRequired, columns: PropTypes.array.isRequired, + noDataIndication: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), striped: PropTypes.bool, bordered: PropTypes.bool, hover: PropTypes.bool, @@ -60,7 +65,8 @@ BootstrapTable.defaultProps = { striped: false, bordered: true, hover: false, - condensed: false + condensed: false, + noDataIndication: null }; export default BootstrapTable; diff --git a/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js index c49b395..e963f51 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js +++ b/packages/react-bootstrap-table2/src/props-resolver/column-resolver.js @@ -1,6 +1,6 @@ export default ExtendBase => class ColumnResolver extends ExtendBase { - columnSize() { + visibleColumnSize() { return this.props.columns.length; } }; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index 252ffb4..158d1dd 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -7,7 +7,7 @@ export default ExtendBase => if (!keyField) { throw new Error('Please specify a field as key via keyField'); } - if (this.columnSize(columns) <= 0) { + if (this.visibleColumnSize(columns) <= 0) { throw new Error('No any visible columns detect'); } } diff --git a/packages/react-bootstrap-table2/src/row-section.js b/packages/react-bootstrap-table2/src/row-section.js new file mode 100644 index 0000000..f0c6efd --- /dev/null +++ b/packages/react-bootstrap-table2/src/row-section.js @@ -0,0 +1,26 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +const RowSection = ({ content, colSpan }) => ( +
+ { content } +
@@ -54,6 +56,7 @@ BootstrapTable.propTypes = { keyField: PropTypes.string.isRequired, data: PropTypes.array.isRequired, columns: PropTypes.array.isRequired, + store: PropTypes.object, noDataIndication: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), striped: PropTypes.bool, bordered: PropTypes.bool, diff --git a/packages/react-bootstrap-table2/src/index.js b/packages/react-bootstrap-table2/src/index.js index a1dfa2d..c787801 100644 --- a/packages/react-bootstrap-table2/src/index.js +++ b/packages/react-bootstrap-table2/src/index.js @@ -1,5 +1,9 @@ import BootstrapTable from './bootstrap-table'; +import withStateful from './stateful-layer'; + +const BootstrapTableful = withStateful(BootstrapTable); export { - BootstrapTable + BootstrapTable, + BootstrapTableful }; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index 158d1dd..627f796 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -11,4 +11,8 @@ export default ExtendBase => throw new Error('No any visible columns detect'); } } + + isEmpty() { + return this.props.data.length === 0; + } }; diff --git a/packages/react-bootstrap-table2/src/stateful-layer.js b/packages/react-bootstrap-table2/src/stateful-layer.js new file mode 100644 index 0000000..ba0ad9d --- /dev/null +++ b/packages/react-bootstrap-table2/src/stateful-layer.js @@ -0,0 +1,20 @@ +/* eslint arrow-body-style: 0 */ +import React, { Component } from 'react'; +import Store from './store/base'; + +const withStateful = (Base) => { + class StatefulComponent extends Component { + constructor(props) { + super(props); + this.store = new Store(props); + } + + render() { + const { props } = this; + return ; + } + } + return StatefulComponent; +}; + +export default withStateful; From f9ccbd0717e265e450e09620dee211528f94653c Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Mon, 4 Sep 2017 21:46:01 +0800 Subject: [PATCH 024/136] examples enhance * utils for products generator * load test for each *.test.js file in packages folder * [test] unit test for utils/common * refactor all products with productGenerator for all examples * refactor folder structure * move component to src/components/common * rename component file name --- package.json | 2 +- .../.storybook/webpack.config.js | 5 ++- .../examples/basic/borderless-table.js | 19 ++-------- .../examples/basic/index.js | 19 ++-------- .../examples/basic/no-data-table.js | 2 +- .../basic/striped-hover-condensed-table.js | 19 ++-------- .../examples/columns/column-align-table.js | 19 ++-------- .../examples/columns/column-class-table.js | 19 ++-------- .../examples/columns/column-event-table.js | 19 ++-------- .../examples/columns/column-format-table.js | 20 ++--------- .../column-format-with-extra-data-table.js | 23 ++++-------- .../examples/columns/column-hidden-table.js | 19 ++-------- .../examples/columns/column-style-table.js | 19 ++-------- .../examples/columns/column-title-table.js | 19 ++-------- .../examples/columns/nested-data-table.js | 29 ++++++--------- .../header-columns/column-align-table.js | 19 ++-------- .../header-columns/column-class-table.js | 19 ++-------- .../header-columns/column-event-table.js | 19 ++-------- .../header-columns/column-format-table.js | 20 ++--------- .../header-columns/column-style-table.js | 19 ++-------- .../header-columns/column-title-table.js | 19 ++-------- .../components/common/code-block.js} | 0 .../src/utils/common.js | 21 +++++++++++ .../test/utils/common.test.js | 36 +++++++++++++++++++ 24 files changed, 128 insertions(+), 296 deletions(-) rename packages/react-bootstrap-table2-example/{examples/common/codeBlock.js => src/components/common/code-block.js} (100%) create mode 100644 packages/react-bootstrap-table2-example/src/utils/common.js create mode 100644 packages/react-bootstrap-table2-example/test/utils/common.test.js diff --git a/package.json b/package.json index d3cc155..f10666e 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ ], "testEnvironment": "node", "testMatch": [ - "**/test/*.js" + "**/test/**/*.js" ] } } diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index c30b7b0..cf7afd1 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -4,10 +4,13 @@ const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/src'); const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); const storyPath = path.join(__dirname, '../stories'); const examplesPath = path.join(__dirname, '../examples'); +const srcPath = path.join(__dirname, '../src'); const aliasPath = { examples: examplesPath, - common: path.join(examplesPath, 'common'), stories: storyPath, + src: srcPath, + components: path.join(srcPath, 'components'), + utils: path.join(srcPath, 'utils'), }; const loaders = [{ diff --git a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js index fdc07c7..f029661 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js @@ -1,23 +1,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js index f76dcad..096eb77 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/index.js +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -1,23 +1,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js index 0ed9f60..8c341d2 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js @@ -1,7 +1,7 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js index da0384f..bd1aa90 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -1,23 +1,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js index c274308..55ad2aa 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js index 6b7dcc7..44029ae 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js index 4b3e0a2..2ffc74a 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -3,23 +3,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js index 5717bb5..1d6ece6 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -1,24 +1,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i, - onSale: Math.random() >= 0.5 - }); - } -} - -addProducts(5); +const products = productsGenerator(); function priceFormatter(cell, row) { if (row.onSale) { diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js index 754a71d..7e5c683 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js @@ -2,23 +2,14 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - rank: Math.random() < 0.5 ? 'down' : 'up' - }); - } -} - -addProducts(5); +const products = productsGenerator(5, (value, index) => ({ + id: index, + name: `User Name ${index}`, + rank: Math.random() < 0.5 ? 'down' : 'up' +})); function rankFormatter(cell, row, rowIndex, formatExtraData) { return ( diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js index 8fd175f..24565e4 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-hidden-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js index dcdd64b..157193b 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js index 140ae71..ec2ee76 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js index c7d4774..2852c7c 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -1,27 +1,18 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `User Name ${id}`, - phone: 21009831 + i, - address: { - city: 'New York', - postCode: '1111-4512' - } - }); +const products = productsGenerator(5, (value, index) => ({ + id: index, + name: `User Name ${index}`, + phone: 21009831 + index, + address: { + city: 'New York', + postCode: '1111-4512' } -} - -addProducts(5); +})); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js index 536b075..cbdfcdd 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js index ed3b463..a317da1 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js index 002f527..3e892ef 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -3,23 +3,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js index 703e2c5..b9d6373 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -2,24 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i, - onSale: Math.random() >= 0.5 - }); - } -} - -addProducts(5); +const products = productsGenerator(); function priceFormatter(column, colIndex) { return ( diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js index 665e957..5098481 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-style-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js index b936a21..41884ab 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -2,23 +2,10 @@ import React from 'react'; import { BootstrapTableful } from 'react-bootstrap-table2'; -import Code from 'common/codeBlock'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; -const products = []; - -function addProducts(quantity) { - const startId = products.length; - for (let i = 0; i < quantity; i += 1) { - const id = startId + i; - products.push({ - id, - name: `Item name ${id}`, - price: 2100 + i - }); - } -} - -addProducts(5); +const products = productsGenerator(); const columns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2-example/examples/common/codeBlock.js b/packages/react-bootstrap-table2-example/src/components/common/code-block.js similarity index 100% rename from packages/react-bootstrap-table2-example/examples/common/codeBlock.js rename to packages/react-bootstrap-table2-example/src/components/common/code-block.js diff --git a/packages/react-bootstrap-table2-example/src/utils/common.js b/packages/react-bootstrap-table2-example/src/utils/common.js new file mode 100644 index 0000000..8d95013 --- /dev/null +++ b/packages/react-bootstrap-table2-example/src/utils/common.js @@ -0,0 +1,21 @@ +/** + * products generator for stories + * + * @param {Number} quantity - quantity of products + * @param {Function} callback - callback func which is similiar to 'mapFunction' + * aims to customize product format + * + * @return {Array} - products array + */ +export const productsGenerator = (quantity = 5, callback) => { + if (callback) return Array.from({ length: quantity }, callback); + + // if no given callback, retrun default product format. + return ( + Array.from({ length: quantity }, (value, index) => ({ + id: index, + name: `Item name ${index}`, + price: 2100 + index + })) + ); +}; diff --git a/packages/react-bootstrap-table2-example/test/utils/common.test.js b/packages/react-bootstrap-table2-example/test/utils/common.test.js new file mode 100644 index 0000000..ca8ecab --- /dev/null +++ b/packages/react-bootstrap-table2-example/test/utils/common.test.js @@ -0,0 +1,36 @@ +import { productsGenerator } from '../../src/utils/common'; + +describe('Utils', () => { + describe('productsGenerator', () => { + const quantity = 2; + + it('should return an array', () => { + expect(Array.isArray(productsGenerator())).toBe(true); + }); + + it('should return 5 products without params', () => { + expect(productsGenerator().length).toEqual(5); + }); + + it('should return an array with given quntity', () => { + expect(productsGenerator(quantity).length).toEqual(quantity); + }); + + describe('when callback is defined', () => { + const callback = (value, index) => ({ + id: index, + name: 'react-bootstrap-table-2' + }); + + it('should return customized products format', () => { + const products = productsGenerator(quantity, callback); + const product = products[0]; + + expect(Array.isArray(products)).toBe(true); + expect(products.length).toBe(quantity); + expect(product).toHaveProperty('id', 0); + expect(product).toHaveProperty('name', 'react-bootstrap-table-2'); + }); + }); + }); +}); From 9199484ab6a19b46d9418fa4f70d10a468c950f8 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sat, 9 Sep 2017 10:58:26 +0800 Subject: [PATCH 025/136] setup enhancement * lerna bootstrap after install * set npmClient to default instead of yarn to prevent from causing error with older yarn version * ref: https://github.com/lerna/lerna/pull/897 * update yarn.lock --- .gitignore | 4 +- lerna.json | 3 +- package.json | 1 + .../react-bootstrap-table2-example/yarn.lock | 4993 ----------------- packages/react-bootstrap-table2/yarn.lock | 7 - yarn.lock | 435 +- 6 files changed, 233 insertions(+), 5210 deletions(-) delete mode 100644 packages/react-bootstrap-table2-example/yarn.lock delete mode 100644 packages/react-bootstrap-table2/yarn.lock diff --git a/.gitignore b/.gitignore index 7627a42..1f0b21e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -# dependencies +# node node_modules +package-lock.json # testing coverage @@ -10,6 +11,7 @@ coverage .vscode # logs +lerna-debug.log npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/lerna.json b/lerna.json index 8b7bad4..b34dd47 100644 --- a/lerna.json +++ b/lerna.json @@ -3,6 +3,5 @@ "packages": [ "packages/*" ], - "version": "0.0.0", - "npmClient": "yarn" + "version": "0.0.0" } diff --git a/package.json b/package.json index f10666e..dd2cd5b 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Rebuilt for react-bootstrap-table", "main": "index.js", "scripts": { + "postinstall": "lerna bootstrap", "start": "node -r babel-register ./node_modules/.bin/webpack-dev-server --config webpack.config.babel.js", "lint": "eslint ./packages --ext .js --ext .jsx --ignore-path .gitignore", "pretest": "yarn lint --cache", diff --git a/packages/react-bootstrap-table2-example/yarn.lock b/packages/react-bootstrap-table2-example/yarn.lock deleted file mode 100644 index 6d9a83f..0000000 --- a/packages/react-bootstrap-table2-example/yarn.lock +++ /dev/null @@ -1,4993 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@hypnosphi/fuse.js@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@hypnosphi/fuse.js/-/fuse.js-3.0.9.tgz#ea99f6121b4a8f065b4c71f85595db2714498807" - -"@storybook/addon-actions@^3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.6.tgz#d8e476188a288f49f36a8482175bc2c1898dfc28" - dependencies: - "@storybook/addons" "^3.2.6" - deep-equal "^1.0.1" - json-stringify-safe "^5.0.1" - prop-types "^15.5.10" - react-inspector "^2.1.1" - uuid "^3.1.0" - -"@storybook/addon-links@^3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.6.tgz#93029ecee8a1a1939f01381c06ed19327acd746b" - dependencies: - "@storybook/addons" "^3.2.6" - -"@storybook/addons@^3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.6.tgz#c7974db36bd1b969d8ca3776f57fd955447dc7ed" - -"@storybook/channel-postmessage@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.2.0.tgz#612ff53120bf266660cb9328bac9ad671228a2f7" - dependencies: - "@storybook/channels" "^3.2.0" - global "^4.3.2" - json-stringify-safe "^5.0.1" - -"@storybook/channels@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.2.0.tgz#d75395212db76b49e3335f50cce5bc763cf0b5c6" - -"@storybook/components@^3.2.7": - version "3.2.7" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.2.7.tgz#7d4c7221851260e4236bbb3ef82a6494b23e5ec9" - dependencies: - glamor "^2.20.40" - glamorous "^4.1.2" - prop-types "^15.5.10" - -"@storybook/react-fuzzy@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@storybook/react-fuzzy/-/react-fuzzy-0.4.0.tgz#2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087" - dependencies: - babel-runtime "^6.23.0" - classnames "^2.2.5" - fuse.js "^3.0.1" - prop-types "^15.5.9" - -"@storybook/react@^3.2.8": - version "3.2.8" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.2.8.tgz#7d43ef450559b7cf3b3ecc17cc54d5a09d5ea402" - dependencies: - "@storybook/addon-actions" "^3.2.6" - "@storybook/addon-links" "^3.2.6" - "@storybook/addons" "^3.2.6" - "@storybook/channel-postmessage" "^3.2.0" - "@storybook/ui" "^3.2.7" - airbnb-js-shims "^1.1.1" - autoprefixer "^7.1.1" - babel-core "^6.25.0" - babel-loader "^7.0.0" - babel-plugin-react-docgen "^1.6.0" - babel-preset-env "^1.6.0" - babel-preset-minify "^0.2.0" - babel-preset-react "^6.24.1" - babel-preset-react-app "^3.0.0" - babel-preset-stage-0 "^6.24.1" - babel-runtime "^6.23.0" - case-sensitive-paths-webpack-plugin "^2.0.0" - chalk "^2.0.1" - commander "^2.9.0" - common-tags "^1.4.0" - configstore "^3.1.0" - css-loader "^0.28.1" - express "^4.15.3" - file-loader "^0.11.1" - find-cache-dir "^1.0.0" - glamor "^2.20.40" - glamorous "^4.1.2" - global "^4.3.2" - json-loader "^0.5.4" - json-stringify-safe "^5.0.1" - json5 "^0.5.1" - lodash.flattendeep "^4.4.0" - lodash.pick "^4.4.0" - postcss-flexbugs-fixes "^3.0.0" - postcss-loader "^2.0.5" - prop-types "^15.5.10" - qs "^6.4.0" - react-modal "^2.2.4" - redux "^3.6.0" - request "^2.81.0" - serve-favicon "^2.4.3" - shelljs "^0.7.8" - style-loader "^0.17.0" - url-loader "^0.5.8" - util-deprecate "^1.0.2" - uuid "^3.1.0" - webpack "^2.5.1 || ^3.0.0" - webpack-dev-middleware "^1.10.2" - webpack-hot-middleware "^2.18.0" - -"@storybook/ui@^3.2.7": - version "3.2.7" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.2.7.tgz#c07dd5523e2c83d9f8ac5a7982c305cc59f34e78" - dependencies: - "@hypnosphi/fuse.js" "^3.0.9" - "@storybook/components" "^3.2.7" - "@storybook/react-fuzzy" "^0.4.0" - babel-runtime "^6.23.0" - deep-equal "^1.0.1" - events "^1.1.1" - global "^4.3.2" - json-stringify-safe "^5.0.1" - keycode "^2.1.8" - lodash.debounce "^4.0.8" - lodash.pick "^4.4.0" - lodash.sortby "^4.7.0" - mantra-core "^1.7.0" - podda "^1.2.2" - prop-types "^15.5.10" - qs "^6.4.0" - react-icons "^2.2.5" - react-inspector "^2.1.1" - react-komposer "^2.0.0" - react-modal "^2.2.4" - react-split-pane "^0.1.65" - react-treebeard "^2.0.3" - redux "^3.6.0" - -abbrev@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" - -accepts@~1.3.3: - version "1.3.4" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" - dependencies: - mime-types "~2.1.16" - negotiator "0.6.1" - -acorn-dynamic-import@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - dependencies: - acorn "^4.0.3" - -acorn@^4.0.3: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - -acorn@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" - -airbnb-js-shims@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/airbnb-js-shims/-/airbnb-js-shims-1.3.0.tgz#aac46d80057fb0b414f70e06d07e362fd99ee2fa" - dependencies: - array-includes "^3.0.3" - es5-shim "^4.5.9" - es6-shim "^0.35.3" - function.prototype.name "^1.0.3" - object.entries "^1.0.4" - object.getownpropertydescriptors "^2.0.3" - object.values "^1.0.4" - promise.prototype.finally "^3.0.0" - string.prototype.padend "^3.0.0" - string.prototype.padstart "^3.0.0" - -ajv-keywords@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^5.0.0, ajv@^5.1.5: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - json-schema-traverse "^0.3.0" - json-stable-stringify "^1.0.1" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -aproba@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -array-find@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - -array-includes@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - -asn1.js@^4.0.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40" - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -ast-types@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.11.tgz#371177bb59232ff5ceaa1d09ee5cad705b1a5aa9" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async@^2.1.2, async@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -autoprefixer@^6.3.1: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" - -autoprefixer@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.2.tgz#fbeaf07d48fd878e0682bf7cbeeade728adb2b18" - dependencies: - browserslist "^2.1.5" - caniuse-lite "^1.0.30000697" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^6.0.6" - postcss-value-parser "^3.2.3" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -babel-code-frame@^6.11.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.25.0, babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-generator@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.6" - trim-right "^1.0.1" - -babel-helper-bindify-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-evaluate-path@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.2.0.tgz#0bb2eb01996c0cef53c5e8405e999fe4a0244c08" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-explode-class@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" - dependencies: - babel-helper-bindify-decorators "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-flip-expressions@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.2.0.tgz#160d2090a3d9f9c64a750905321a0bc218f884ec" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-is-nodes-equiv@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" - -babel-helper-is-void-0@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.2.0.tgz#6ed0ada8a9b1c5b6e88af6b47c1b3b5c080860eb" - -babel-helper-mark-eval-scopes@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.2.0.tgz#7648aaf2ec92aae9b09a20ad91e8df5e1fcc94b2" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-remove-or-void@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.2.0.tgz#8e46ad5b30560d57d7510b3fd93f332ee7c67386" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-to-multiple-sequence-expressions@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.2.0.tgz#d1a419634c6cb301f27858c659167cfee0a9d318" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-loader@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" - dependencies: - find-cache-dir "^1.0.0" - loader-utils "^1.0.2" - mkdirp "^0.5.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-dynamic-import-node@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.0.2.tgz#adb5bc8f48a89311540395ae9f0cc3ed4b10bb2e" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-minify-builtins@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.2.0.tgz#317f824b0907210b6348671bb040ca072e2e0c82" - dependencies: - babel-helper-evaluate-path "^0.2.0" - -babel-plugin-minify-constant-folding@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.2.0.tgz#8c70b528b2eb7c13e94d95c8789077d4cdbc3970" - dependencies: - babel-helper-evaluate-path "^0.2.0" - -babel-plugin-minify-dead-code-elimination@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.2.0.tgz#e8025ee10a1e5e4f202633a6928ce892c33747e3" - dependencies: - babel-helper-evaluate-path "^0.2.0" - babel-helper-mark-eval-scopes "^0.2.0" - babel-helper-remove-or-void "^0.2.0" - lodash.some "^4.6.0" - -babel-plugin-minify-flip-comparisons@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.2.0.tgz#0c9c8e93155c8f09dedad8118b634c259f709ef5" - dependencies: - babel-helper-is-void-0 "^0.2.0" - -babel-plugin-minify-guarded-expressions@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.2.0.tgz#8a8c950040fce3e258a12e6eb21eab94ad7235ab" - dependencies: - babel-helper-flip-expressions "^0.2.0" - -babel-plugin-minify-infinity@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.2.0.tgz#30960c615ddbc657c045bb00a1d8eb4af257cf03" - -babel-plugin-minify-mangle-names@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.2.0.tgz#719892297ff0106a6ec1a4b0fc062f1f8b6a8529" - dependencies: - babel-helper-mark-eval-scopes "^0.2.0" - -babel-plugin-minify-numeric-literals@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.2.0.tgz#5746e851700167a380c05e93f289a7070459a0d1" - -babel-plugin-minify-replace@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.2.0.tgz#3c1f06bc4e6d3e301eacb763edc1be611efc39b0" - -babel-plugin-minify-simplify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.2.0.tgz#21ceec4857100c5476d7cef121f351156e5c9bc0" - dependencies: - babel-helper-flip-expressions "^0.2.0" - babel-helper-is-nodes-equiv "^0.0.1" - babel-helper-to-multiple-sequence-expressions "^0.2.0" - -babel-plugin-minify-type-constructors@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.2.0.tgz#7f3b6458be0863cfd59e9985bed6d134aa7a2e17" - dependencies: - babel-helper-is-void-0 "^0.2.0" - -babel-plugin-react-docgen@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/babel-plugin-react-docgen/-/babel-plugin-react-docgen-1.7.0.tgz#87e72d3d54b182a30706b740bb4d116f59aadc80" - dependencies: - babel-types "^6.24.1" - lodash "4.x.x" - react-docgen "^2.15.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - -babel-plugin-syntax-do-expressions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" - -babel-plugin-syntax-dynamic-import@6.18.0, babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-function-bind@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" - -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-generator-functions@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-class-constructor-call@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-class-properties@6.24.1, babel-plugin-transform-class-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" - dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-decorators@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" - dependencies: - babel-helper-explode-class "^6.24.1" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-do-expressions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" - dependencies: - babel-plugin-syntax-do-expressions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-function-bind@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" - dependencies: - babel-plugin-syntax-function-bind "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-inline-consecutive-adds@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.2.0.tgz#15dae78921057f4004f8eafd79e15ddc5f12f426" - -babel-plugin-transform-member-expression-literals@^6.8.5: - version "6.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.5.tgz#e06ae305cf48d819822e93a70d79269f04d89eec" - -babel-plugin-transform-merge-sibling-variables@^6.8.6: - version "6.8.6" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.6.tgz#6d21efa5ee4981f71657fae716f9594bb2622aef" - -babel-plugin-transform-minify-booleans@^6.8.3: - version "6.8.3" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.3.tgz#5906ed776d3718250519abf1bace44b0b613ddf9" - -babel-plugin-transform-object-rest-spread@6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-object-rest-spread@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - -babel-plugin-transform-property-literals@^6.8.5: - version "6.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.5.tgz#67ed5930b34805443452c8b9690c7ebe1e206c40" - dependencies: - esutils "^2.0.2" - -babel-plugin-transform-react-constant-elements@6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz#2f119bf4d2cdd45eb9baaae574053c604f6147dd" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-self@6.22.0, babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" - dependencies: - regenerator-transform "0.9.11" - -babel-plugin-transform-regenerator@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-regexp-constructors@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.2.0.tgz#6aa5dd0acc515db4be929bbcec4ed4c946c534a3" - -babel-plugin-transform-remove-console@^6.8.5: - version "6.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.5.tgz#fde9d2d3d725530b0fadd8d31078402410386810" - -babel-plugin-transform-remove-debugger@^6.8.5: - version "6.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.5.tgz#809584d412bf918f071fdf41e1fdb15ea89cdcd5" - -babel-plugin-transform-remove-undefined@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.2.0.tgz#94f052062054c707e8d094acefe79416b63452b1" - dependencies: - babel-helper-evaluate-path "^0.2.0" - -babel-plugin-transform-runtime@6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-simplify-comparison-operators@^6.8.5: - version "6.8.5" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.5.tgz#a838786baf40cc33a93b95ae09e05591227e43bf" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-undefined-to-void@^6.8.3: - version "6.8.3" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.3.tgz#fc52707f6ee1ddc71bb91b0d314fbefdeef9beb4" - -babel-preset-env@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^2.1.2" - invariant "^2.2.2" - semver "^5.3.0" - -babel-preset-env@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.0.tgz#2de1c782a780a0a5d605d199c957596da43c44e4" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^2.1.2" - invariant "^2.2.2" - semver "^5.3.0" - -babel-preset-flow@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" - dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" - -babel-preset-minify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-minify/-/babel-preset-minify-0.2.0.tgz#006566552d9b83834472273f306c0131062a0acc" - dependencies: - babel-plugin-minify-builtins "^0.2.0" - babel-plugin-minify-constant-folding "^0.2.0" - babel-plugin-minify-dead-code-elimination "^0.2.0" - babel-plugin-minify-flip-comparisons "^0.2.0" - babel-plugin-minify-guarded-expressions "^0.2.0" - babel-plugin-minify-infinity "^0.2.0" - babel-plugin-minify-mangle-names "^0.2.0" - babel-plugin-minify-numeric-literals "^0.2.0" - babel-plugin-minify-replace "^0.2.0" - babel-plugin-minify-simplify "^0.2.0" - babel-plugin-minify-type-constructors "^0.2.0" - babel-plugin-transform-inline-consecutive-adds "^0.2.0" - babel-plugin-transform-member-expression-literals "^6.8.5" - babel-plugin-transform-merge-sibling-variables "^6.8.6" - babel-plugin-transform-minify-booleans "^6.8.3" - babel-plugin-transform-property-literals "^6.8.5" - babel-plugin-transform-regexp-constructors "^0.2.0" - babel-plugin-transform-remove-console "^6.8.5" - babel-plugin-transform-remove-debugger "^6.8.5" - babel-plugin-transform-remove-undefined "^0.2.0" - babel-plugin-transform-simplify-comparison-operators "^6.8.5" - babel-plugin-transform-undefined-to-void "^6.8.3" - lodash.isplainobject "^4.0.6" - -babel-preset-react-app@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-3.0.2.tgz#d062fca5dce68ed9c2615f2fecbc08861720f8e5" - dependencies: - babel-plugin-dynamic-import-node "1.0.2" - babel-plugin-syntax-dynamic-import "6.18.0" - babel-plugin-transform-class-properties "6.24.1" - babel-plugin-transform-object-rest-spread "6.23.0" - babel-plugin-transform-react-constant-elements "6.23.0" - babel-plugin-transform-react-jsx "6.24.1" - babel-plugin-transform-react-jsx-self "6.22.0" - babel-plugin-transform-react-jsx-source "6.22.0" - babel-plugin-transform-regenerator "6.24.1" - babel-plugin-transform-runtime "6.23.0" - babel-preset-env "1.5.2" - babel-preset-react "6.24.1" - -babel-preset-react@6.24.1, babel-preset-react@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" - dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" - -babel-preset-stage-0@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" - dependencies: - babel-plugin-transform-do-expressions "^6.22.0" - babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.24.1" - -babel-preset-stage-1@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" - dependencies: - babel-plugin-transform-class-constructor-call "^6.24.1" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^6.24.1" - -babel-preset-stage-2@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-plugin-transform-class-properties "^6.24.1" - babel-plugin-transform-decorators "^6.24.1" - babel-preset-stage-3 "^6.24.1" - -babel-preset-stage-3@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-generator-functions "^6.24.1" - babel-plugin-transform-async-to-generator "^6.24.1" - babel-plugin-transform-exponentiation-operator "^6.24.1" - babel-plugin-transform-object-rest-spread "^6.22.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@6.x.x, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0, babel-runtime@^6.5.0, babel-runtime@^6.9.2: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - -babylon@~5.8.3: - version "5.8.38" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.38.tgz#ec9b120b11bf6ccd4173a18bf217e60b79859ffd" - -balanced-match@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base64-js@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" - -binary-extensions@^1.0.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -bootstrap@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.3.7.tgz#5a389394549f23330875a3b150656574f8a9eb71" - -bowser@^1.0.0, bowser@^1.6.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.7.2.tgz#b94cc6925ba6b5e07c421a58e601ce4611264572" - -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -brcast@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/brcast/-/brcast-3.0.1.tgz#6256a8349b20de9eed44257a9b24d71493cd48dd" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" - dependencies: - buffer-xor "^1.0.2" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - inherits "^2.0.1" - -browserify-cipher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - -browserslist@^2.1.2, browserslist@^2.1.5: - version "2.4.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.4.0.tgz#693ee93d01e66468a6348da5498e011f578f87f8" - dependencies: - caniuse-lite "^1.0.30000718" - electron-to-chromium "^1.3.18" - -buffer-xor@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000718" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000718.tgz#86cdd97987302554934c61e106f4e470f16f993c" - -caniuse-lite@^1.0.30000697, caniuse-lite@^1.0.30000718: - version "1.0.30000718" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000718.tgz#0dd24290beb11310b2d80f6b70a823c2a65a6fad" - -case-sensitive-paths-webpack-plugin@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chain-function@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.1, chalk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chokidar@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -clap@^1.0.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" - dependencies: - chalk "^1.1.3" - -classnames@^2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -color-convert@^1.3.0, color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" - dependencies: - color-name "^1.1.1" - -color-name@^1.0.0, color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" - -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" - -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" - -colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -commander@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - -common-tags@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.4.0.tgz#1187be4f3d4cf0c0427d43f74eef1f73501614c0" - dependencies: - babel-runtime "^6.18.0" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -configstore@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.1.tgz#094ee662ab83fad9917678de114faaea8fcdca90" - dependencies: - dot-prop "^4.1.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - unique-string "^1.0.0" - write-file-atomic "^2.0.0" - xdg-basedir "^3.0.0" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - -content-type@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" - -convert-source-map@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.4.3" - minimist "^1.2.0" - object-assign "^4.1.0" - os-homedir "^1.0.1" - parse-json "^2.2.0" - require-from-string "^1.1.0" - -create-ecdh@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - ripemd160 "^2.0.0" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.6" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -crypto-browserify@^3.11.0: - version "3.11.1" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.1.tgz#948945efc6757a400d6e5e5af47194d10064279f" - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-in-js-utils@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-1.0.3.tgz#9ac7e02f763cf85d94017666565ed68a5b5f3215" - dependencies: - hyphenate-style-name "^1.0.2" - -css-loader@^0.28.1: - version "0.28.5" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.5.tgz#dd02bb91b94545710212ef7f6aaa66663113d754" - dependencies: - babel-code-frame "^6.11.0" - css-selector-tokenizer "^0.7.0" - cssnano ">=2.6.1 <4" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.0.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.0.0" - postcss-modules-local-by-default "^1.0.1" - postcss-modules-scope "^1.0.0" - postcss-modules-values "^1.1.0" - postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" - -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - -"cssnano@>=2.6.1 <4": - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" - -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@2.6.8, debug@^2.2.0, debug@^2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -depd@1.1.1, depd@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" - -diffie-hellman@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -dom-helpers@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.2.1.tgz#3203e07fed217bd1f424b019735582fc37b2825a" - -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - -dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - dependencies: - is-obj "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.18: - version "1.3.18" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.18.tgz#3dcc99da3e6b665f6abbc71c28ad51a2cd731a9c" - -elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -encodeurl@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - -enhanced-resolve@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.7" - -errno@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - -error-ex@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.0" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.30" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es5-shim@^4.5.9: - version "4.5.9" - resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.5.9.tgz#2a1e2b9e583ff5fed0c20a3ee2cbf3f75230a5c0" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-shim@^0.35.3: - version "0.35.3" - resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.3.tgz#9bfb7363feffff87a6cdb6cd93e405ec3c4b6f26" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -esprima@^4.0.0, esprima@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.1.0, estraverse@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -etag@~1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" - -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - -events@^1.0.0, events@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -evp_bytestokey@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.2.tgz#f66bb88ecd57f71a766821e20283ea38c68bf80a" - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exenv@^1.2.0, exenv@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -express@^4.15.3: - version "4.15.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.15.4.tgz#032e2253489cf8fce02666beca3d11ed7a2daed1" - dependencies: - accepts "~1.3.3" - array-flatten "1.1.1" - content-disposition "0.5.2" - content-type "~1.0.2" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.8" - depd "~1.1.1" - encodeurl "~1.0.1" - escape-html "~1.0.3" - etag "~1.8.0" - finalhandler "~1.0.4" - fresh "0.5.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.1" - path-to-regexp "0.1.7" - proxy-addr "~1.1.5" - qs "6.5.0" - range-parser "~1.2.0" - send "0.15.4" - serve-static "1.12.4" - setprototypeof "1.0.3" - statuses "~1.3.1" - type-is "~1.6.15" - utils-merge "1.0.0" - vary "~1.1.1" - -extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.3.0, extsprintf@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - -fast-memoize@^2.2.7: - version "2.2.8" - resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.2.8.tgz#d7f899f31d037b12d9db4281912f9018575720b1" - -fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - -fbjs@^0.8.12, fbjs@^0.8.9: - version "0.8.14" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.9" - -file-loader@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.11.2.tgz#4ff1df28af38719a6098093b88c82c71d1794a34" - dependencies: - loader-utils "^1.0.2" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -finalhandler@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.4.tgz#18574f2e7c4b98b8ae3b230c21f201f31bdb3fb7" - dependencies: - debug "2.6.8" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.1" - statuses "~1.3.1" - unpipe "~1.0.0" - -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" - -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -forwarded@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" - -fresh@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.36" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" - -function.prototype.name@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.3.tgz#0099ae5572e9dd6f03c97d023fd92bcc5e639eac" - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.0" - is-callable "^1.1.3" - -fuse.js@^3.0.1: - version "3.0.5" - resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.0.5.tgz#b58d85878802321de94461654947b93af1086727" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -glamor@^2.20.40: - version "2.20.40" - resolved "https://registry.yarnpkg.com/glamor/-/glamor-2.20.40.tgz#f606660357b7cf18dface731ad1a2cfa93817f05" - dependencies: - fbjs "^0.8.12" - inline-style-prefixer "^3.0.6" - object-assign "^4.1.1" - prop-types "^15.5.10" - through "^2.3.8" - -glamorous@^4.1.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/glamorous/-/glamorous-4.4.0.tgz#626b03adcbab259bc97921de4378262f82887e25" - dependencies: - brcast "^3.0.0" - fast-memoize "^2.2.7" - html-tag-names "^1.1.1" - is-function "^1.0.1" - is-plain-object "^2.0.4" - react-html-attributes "^1.3.0" - svg-tag-names "^1.1.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@^7.0.0, glob@^7.0.5: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - dependencies: - min-document "^2.19.0" - process "~0.5.1" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -hash-base@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" - dependencies: - inherits "^2.0.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hoist-non-react-statics@1.x.x, hoist-non-react-statics@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" - -html-element-attributes@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/html-element-attributes/-/html-element-attributes-1.3.0.tgz#f06ebdfce22de979db82020265cac541fb17d4fc" - -html-entities@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" - -html-tag-names@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22" - -http-errors@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -hyphenate-style-name@^1.0.1, hyphenate-style-name@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b" - -iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - dependencies: - postcss "^6.0.1" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -immutable@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -inline-style-prefixer@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz#c153c7e88fd84fef5c602e95a8168b2770671fe7" - dependencies: - bowser "^1.0.0" - hyphenate-style-name "^1.0.1" - -inline-style-prefixer@^3.0.6: - version "3.0.7" - resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-3.0.7.tgz#0ccc92e5902fe6e0d28d975c4258443f880615f8" - dependencies: - bowser "^1.6.0" - css-in-js-utils "^1.0.3" - -interpret@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" - -invariant@2.x.x, invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - -ipaddr.js@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - -is-dom@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/is-dom/-/is-dom-1.0.9.tgz#483832d52972073de12b9fe3f60320870da8370d" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - -is-plain-obj@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - -is-stream@^1.0.1, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - dependencies: - html-comment-regex "^1.1.0" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -js-base64@^2.1.9: - version "2.1.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" - -js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@^3.4.3: - version "3.9.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json-loader@^0.5.4: - version "0.5.7" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keycode@^2.1.8: - version "2.1.9" - resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.1.9.tgz#964a23c54e4889405b4861a5c9f0480d45141dfa" - -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - dependencies: - invert-kv "^1.0.0" - -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" - -loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash-es@^4.2.1: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - -lodash.keys@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.pick@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - -lodash.some@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lodash@4.x.x, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.1: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -lodash@^3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -lru-cache@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -macaddress@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - -make-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" - dependencies: - pify "^2.3.0" - -mantra-core@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/mantra-core/-/mantra-core-1.7.0.tgz#a8c83e8cee83ef6a7383131519fe8031ad546386" - dependencies: - babel-runtime "6.x.x" - react-komposer "^1.9.0" - react-simple-di "^1.2.0" - -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - dependencies: - mimic-fn "^1.0.0" - -memory-fs@^0.4.0, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -miller-rabin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d" - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@~1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" - -mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.16, mime-types@~2.1.7: - version "2.1.16" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" - dependencies: - mime-db "~1.29.0" - -mime@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" - -mime@1.3.x, mime@^1.3.4: - version "1.3.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" - -mimic-fn@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -mobx@^2.3.4: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mobx/-/mobx-2.7.0.tgz#cf3d82d18c0ca7f458d8f2a240817b3dc7e54a01" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -nan@^2.3.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - -node-dir@^0.1.10: - version "0.1.17" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" - dependencies: - minimatch "^3.0.2" - -node-fetch@^1.0.1: - version "1.7.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.2.tgz#c54e9aac57e432875233525f3c891c4159ffefd7" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-pre-gyp@^0.6.36: - version "0.6.36" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786" - dependencies: - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "^2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object.entries@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.values@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - -os-homedir@^1.0.0, os-homedir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - -p-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -parse-asn1@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - dependencies: - error-ex "^1.2.0" - -parseurl@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.13" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.13.tgz#c37d295531e786b1da3e3eadc840426accb0ae25" - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" - -podda@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/podda/-/podda-1.2.2.tgz#15b0edbd334ade145813343f5ecf9c10a71cf500" - dependencies: - babel-runtime "^6.11.6" - immutable "^3.8.1" - -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - dependencies: - postcss "^5.0.14" - -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - dependencies: - postcss "^5.0.4" - -postcss-discard-empty@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - dependencies: - postcss "^5.0.4" - uniqid "^4.0.0" - -postcss-flexbugs-fixes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.2.0.tgz#9b8b932c53f9cf13ba0f61875303e447c33dcc51" - dependencies: - postcss "^6.0.1" - -postcss-load-config@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - postcss-load-options "^1.2.0" - postcss-load-plugins "^2.3.0" - -postcss-load-options@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" - dependencies: - cosmiconfig "^2.1.0" - object-assign "^4.1.0" - -postcss-load-plugins@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" - dependencies: - cosmiconfig "^2.1.1" - object-assign "^4.1.0" - -postcss-loader@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.6.tgz#8c7e0055a3df1889abc6bad52dd45b2f41bbc6fc" - dependencies: - loader-utils "^1.1.0" - postcss "^6.0.2" - postcss-load-config "^1.2.0" - schema-utils "^0.3.0" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" - -postcss-message-helpers@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" - -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" - -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" - -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^6.0.1, postcss@^6.0.2, postcss@^6.0.6: - version "6.0.10" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.10.tgz#c311b89734483d87a91a56dc9e53f15f4e6e84e4" - dependencies: - chalk "^2.1.0" - source-map "^0.5.7" - supports-color "^4.2.1" - -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -private@^0.1.6, private@^0.1.7, private@~0.1.5: - version "0.1.7" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -process@^0.11.0: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - -promise.prototype.finally@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.0.0.tgz#afb1710ff2068562966f6d006d12c3107c7a4f39" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - function-bind "^1.1.0" - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - dependencies: - asap "~2.0.3" - -prop-types@15.5.8: - version "15.5.8" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394" - dependencies: - fbjs "^0.8.9" - -prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.5.9: - version "15.5.10" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - -proxy-addr@~1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918" - dependencies: - forwarded "~0.1.0" - ipaddr.js "1.4.0" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -public-encrypt@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -q@^1.1.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" - -qs@6.5.0, qs@^6.4.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0, querystring@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -radium@^0.19.0: - version "0.19.4" - resolved "https://registry.yarnpkg.com/radium/-/radium-0.19.4.tgz#56aa49fde6181d2f5e1fa57b4710ffd0c23de820" - dependencies: - array-find "^1.0.0" - exenv "^1.2.1" - inline-style-prefixer "^2.0.5" - prop-types "^15.5.8" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -randombytes@^2.0.0, randombytes@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79" - dependencies: - safe-buffer "^5.1.0" - -range-parser@^1.0.3, range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -rc@^1.1.7: - version "1.2.1" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-docgen@^2.15.0: - version "2.17.0" - resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-2.17.0.tgz#b0f3e85af955714e1067593c1043cb82611a93d1" - dependencies: - async "^2.1.4" - babel-runtime "^6.9.2" - babylon "~5.8.3" - commander "^2.9.0" - doctrine "^2.0.0" - node-dir "^0.1.10" - recast "^0.12.6" - -react-dom-factories@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.1.tgz#c50692ac5ff1adb39d86dfe6dbe3485dacf58455" - -react-html-attributes@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/react-html-attributes/-/react-html-attributes-1.4.1.tgz#97b5ec710da68833598c8be6f89ac436216840a5" - dependencies: - html-element-attributes "^1.0.0" - -react-icon-base@2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/react-icon-base/-/react-icon-base-2.0.7.tgz#0bd18736bd6ce79ca6d69ce8387a07fb8d4ceffe" - dependencies: - prop-types "15.5.8" - -react-icons@^2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-2.2.5.tgz#f942501c21a4cc0456ce2bbee5032c93f6051dcf" - dependencies: - react-icon-base "2.0.7" - -react-inspector@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.1.4.tgz#2123fab74f68ae3136fbd02392fadb764326d04d" - dependencies: - babel-runtime "^6.23.0" - is-dom "^1.0.9" - -react-komposer@^1.9.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/react-komposer/-/react-komposer-1.13.1.tgz#4b8ac4bcc71323bd7413dcab95c831197f50eed0" - dependencies: - babel-runtime "6.x.x" - hoist-non-react-statics "1.x.x" - invariant "2.x.x" - mobx "^2.3.4" - shallowequal "0.2.x" - -react-komposer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/react-komposer/-/react-komposer-2.0.0.tgz#b964738014a9b4aee494a83c0b5b833d66072a90" - dependencies: - babel-runtime "^6.11.6" - hoist-non-react-statics "^1.2.0" - lodash.pick "^4.4.0" - react-stubber "^1.0.0" - shallowequal "^0.2.2" - -react-modal@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-2.2.4.tgz#a32483c3555bd7677f09bca65d82f51da3abcbc0" - dependencies: - exenv "^1.2.0" - prop-types "^15.5.10" - react-dom-factories "^1.0.0" - -react-simple-di@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/react-simple-di/-/react-simple-di-1.2.0.tgz#dde0e5bf689f391ef2ab02c9043b213fe239c6d0" - dependencies: - babel-runtime "6.x.x" - hoist-non-react-statics "1.x.x" - -react-split-pane@^0.1.65: - version "0.1.66" - resolved "https://registry.yarnpkg.com/react-split-pane/-/react-split-pane-0.1.66.tgz#369085dd07ec1237bda123e73813dcc7dc6502c1" - dependencies: - inline-style-prefixer "^3.0.6" - prop-types "^15.5.10" - react-style-proptype "^3.0.0" - -react-stubber@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/react-stubber/-/react-stubber-1.0.0.tgz#41ee2cac72d4d4fd70a63896da98e13739b84628" - dependencies: - babel-runtime "^6.5.0" - -react-style-proptype@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/react-style-proptype/-/react-style-proptype-3.0.0.tgz#89e0b646f266c656abb0f0dd8202dbd5036c31e6" - dependencies: - prop-types "^15.5.4" - -react-transition-group@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.0.tgz#b51fc921b0c3835a7ef7c571c79fc82c73e9204f" - dependencies: - chain-function "^1.0.0" - dom-helpers "^3.2.0" - loose-envify "^1.3.1" - prop-types "^15.5.6" - warning "^3.0.0" - -react-treebeard@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/react-treebeard/-/react-treebeard-2.0.3.tgz#cd644209c1be2fe2be3ae4bca8350ed6abf293d6" - dependencies: - babel-runtime "^6.23.0" - deep-equal "^1.0.1" - prop-types "^15.5.8" - radium "^0.19.0" - shallowequal "^0.2.2" - velocity-react "^1.3.1" - -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.6: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -recast@^0.12.6: - version "0.12.6" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.12.6.tgz#4b0fb82feb1d10b3bd62d34943426d9b3ed30d4c" - dependencies: - ast-types "0.9.11" - core-js "^2.4.1" - esprima "~4.0.0" - private "~0.1.5" - source-map "~0.5.0" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" - -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - dependencies: - balanced-match "^0.4.2" - -redux@^3.6.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" - dependencies: - lodash "^4.2.1" - lodash-es "^4.2.1" - loose-envify "^1.1.0" - symbol-observable "^1.0.3" - -regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" - -regenerator-runtime@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" - -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" - dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" - -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - -request@^2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -resolve@^1.1.6: - version "1.4.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" - dependencies: - path-parse "^1.0.5" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" - dependencies: - glob "^7.0.5" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" - dependencies: - hash-base "^2.0.0" - inherits "^2.0.1" - -safe-buffer@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -sax@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -schema-utils@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - dependencies: - ajv "^5.0.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - -send@0.15.4: - version "0.15.4" - resolved "https://registry.yarnpkg.com/send/-/send-0.15.4.tgz#985faa3e284b0273c793364a35c6737bd93905b9" - dependencies: - debug "2.6.8" - depd "~1.1.1" - destroy "~1.0.4" - encodeurl "~1.0.1" - escape-html "~1.0.3" - etag "~1.8.0" - fresh "0.5.0" - http-errors "~1.6.2" - mime "1.3.4" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.3.1" - -serve-favicon@^2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.4.3.tgz#5986b17b0502642b641c21f818b1acce32025d23" - dependencies: - etag "~1.8.0" - fresh "0.5.0" - ms "2.0.0" - parseurl "~1.3.1" - safe-buffer "5.0.1" - -serve-static@1.12.4: - version "1.12.4" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.4.tgz#9b6aa98eeb7253c4eedc4c1f6fdbca609901a961" - dependencies: - encodeurl "~1.0.1" - escape-html "~1.0.3" - parseurl "~1.3.1" - send "0.15.4" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4, setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.8" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" - dependencies: - inherits "^2.0.1" - -shallowequal@0.2.x, shallowequal@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e" - dependencies: - lodash.keys "^3.1.2" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - -shelljs@^0.7.8: - version "0.7.8" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" - -source-map-support@^0.4.15: - version "0.4.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" - dependencies: - source-map "^0.5.6" - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" - dependencies: - spdx-license-ids "^1.0.2" - -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" - -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -"statuses@>= 1.3.1 < 2", statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.2.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string.prototype.padend@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.4.3" - function-bind "^1.0.2" - -string.prototype.padstart@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz#5bcfad39f4649bb2d031292e19bcf0b510d4b242" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.4.3" - function-bind "^1.0.2" - -string_decoder@^0.10.25: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -style-loader@^0.17.0: - version "0.17.0" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.17.0.tgz#e8254bccdb7af74bd58274e36107b4d5ab4df310" - dependencies: - loader-utils "^1.0.2" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -supports-color@^4.0.0, supports-color@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" - dependencies: - has-flag "^2.0.0" - -svg-tag-names@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/svg-tag-names/-/svg-tag-names-1.1.1.tgz#9641b29ef71025ee094c7043f7cdde7d99fbd50a" - -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" - -symbol-observable@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" - -tapable@^0.2.7: - version "0.2.8" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" - -tar-pack@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -time-stamp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" - -timers-browserify@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-is@~1.6.15: - version "1.6.15" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.15" - -ua-parser-js@^0.7.9: - version "0.7.14" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" - -uglify-js@^2.8.29: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uglifyjs-webpack-plugin@^0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" - dependencies: - source-map "^0.5.6" - uglify-js "^2.8.29" - webpack-sources "^1.0.1" - -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - -uniqid@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - dependencies: - macaddress "^0.2.8" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - dependencies: - crypto-random-string "^1.0.0" - -unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -url-loader@^0.5.8: - version "0.5.9" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.5.9.tgz#cc8fea82c7b906e7777019250869e569e995c295" - dependencies: - loader-utils "^1.0.2" - mime "1.3.x" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -utils-merge@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" - -uuid@^3.0.0, uuid@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - -validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" - dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" - -vary@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" - -velocity-animate@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/velocity-animate/-/velocity-animate-1.5.0.tgz#fc8771d8dfe1136ff02a707e10fbb0957c4b030f" - -velocity-react@^1.3.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/velocity-react/-/velocity-react-1.3.3.tgz#d6d47276cfc8be2a75623879b20140ac58c1b82b" - dependencies: - lodash "^3.10.1" - prop-types "^15.5.8" - react-transition-group "^1.1.2" - velocity-animate "^1.4.0" - -vendors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -warning@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" - dependencies: - loose-envify "^1.0.0" - -watchpack@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" - dependencies: - async "^2.1.2" - chokidar "^1.7.0" - graceful-fs "^4.1.2" - -webpack-dev-middleware@^1.10.2: - version "1.12.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz#d34efefb2edda7e1d3b5dbe07289513219651709" - dependencies: - memory-fs "~0.4.1" - mime "^1.3.4" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - time-stamp "^2.0.0" - -webpack-hot-middleware@^2.18.0: - version "2.18.2" - resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.18.2.tgz#84dee643f037c3d59c9de142548430371aa8d3b2" - dependencies: - ansi-html "0.0.7" - html-entities "^1.2.0" - querystring "^0.2.0" - strip-ansi "^3.0.0" - -webpack-sources@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" - dependencies: - source-list-map "^2.0.0" - source-map "~0.5.3" - -"webpack@^2.5.1 || ^3.0.0": - version "3.5.5" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.5.tgz#3226f09fc8b3e435ff781e7af34f82b68b26996c" - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^2.0.0" - ajv "^5.1.5" - ajv-keywords "^2.0.0" - async "^2.1.2" - enhanced-resolve "^3.4.0" - escope "^3.6.0" - interpret "^1.0.0" - json-loader "^0.5.4" - json5 "^0.5.1" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^4.2.1" - tapable "^0.2.7" - uglifyjs-webpack-plugin "^0.4.6" - watchpack "^1.4.0" - webpack-sources "^1.0.1" - yargs "^8.0.2" - -whatwg-fetch@>=0.10.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" - -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - -which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -write-file-atomic@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -xdg-basedir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - dependencies: - camelcase "^4.1.0" - -yargs@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" diff --git a/packages/react-bootstrap-table2/yarn.lock b/packages/react-bootstrap-table2/yarn.lock deleted file mode 100644 index 4933806..0000000 --- a/packages/react-bootstrap-table2/yarn.lock +++ /dev/null @@ -1,7 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -bootstrap@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.3.7.tgz#5a389394549f23330875a3b150656574f8a9eb71" diff --git a/yarn.lock b/yarn.lock index d958144..7c1361e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,10 +18,10 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" accepts@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" dependencies: - mime-types "~2.1.11" + mime-types "~2.1.16" negotiator "0.6.1" acorn-dynamic-import@^2.0.0: @@ -51,8 +51,8 @@ acorn@^4.0.3, acorn@^4.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" acorn@^5.0.0, acorn@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" + version "5.1.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" add-stream@^1.0.0: version "1.0.0" @@ -1010,7 +1010,7 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24 lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@^6.17.0, babylon@^6.17.4, babylon@^6.18.0: +babylon@^6.17.0, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -1105,14 +1105,15 @@ browser-resolve@^1.11.2: resolve "1.1.7" browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a" + version "1.0.8" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.8.tgz#c8fa3b1b7585bb7ba77c5560b60996ddec6d5309" dependencies: - buffer-xor "^1.0.2" + buffer-xor "^1.0.3" cipher-base "^1.0.0" create-hash "^1.1.0" - evp_bytestokey "^1.0.0" + evp_bytestokey "^1.0.3" inherits "^2.0.1" + safe-buffer "^5.0.1" browserify-cipher@^1.0.0: version "1.0.0" @@ -1175,10 +1176,10 @@ bser@^2.0.0: node-int64 "^0.4.0" buffer-indexof@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.0.tgz#f54f647c4f4e25228baa656a2e57e43d5f270982" + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" -buffer-xor@^1.0.2: +buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -1260,8 +1261,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000721" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000721.tgz#cdc52efe8f82dd13916615b78e86f704ece61802" + version "1.0.30000726" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000726.tgz#9bb742f8d026a62df873bc03c06843d2255b60d7" caseless@~0.12.0: version "0.12.0" @@ -1329,8 +1330,8 @@ chokidar@^1.6.0, chokidar@^1.7.0: fsevents "^1.0.0" ci-info@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + version "1.1.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -1354,8 +1355,8 @@ classnames@^2.2.5: resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" clean-css@4.1.x: - version "4.1.7" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.7.tgz#b9aea4f85679889cf3eae8b40349ec4ebdfdd032" + version "4.1.8" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.8.tgz#061455b2494a750ac98f46d8d5ebb17c679ea9d1" dependencies: source-map "0.5.x" @@ -1366,8 +1367,8 @@ cli-cursor@^2.1.0: restore-cursor "^2.0.0" cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" cliui@^2.1.0: version "2.1.0" @@ -1551,48 +1552,46 @@ content-type@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" -conventional-changelog-angular@^1.3.4: - version "1.4.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.4.0.tgz#118b9f7d41a3d99500bfb6bea1f3525e055e8b9b" +conventional-changelog-angular@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.0.tgz#50b2d45008448455fdf67e06ea01972fbd08182a" dependencies: compare-func "^1.3.1" - github-url-from-git "^1.4.0" q "^1.4.1" - read-pkg-up "^2.0.0" -conventional-changelog-atom@^0.1.0: +conventional-changelog-atom@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" dependencies: q "^1.4.1" -conventional-changelog-cli@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.2.tgz#33abf2b5720a9b094df38e81741ccb502e1a4125" +conventional-changelog-cli@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.3.tgz#ca38f229a27ec14036021b1786a48f5b8d48d7ff" dependencies: add-stream "^1.0.0" - conventional-changelog "^1.1.4" + conventional-changelog "^1.1.5" lodash "^4.1.0" meow "^3.7.0" tempfile "^1.1.1" -conventional-changelog-codemirror@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334" +conventional-changelog-codemirror@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459" dependencies: q "^1.4.1" -conventional-changelog-core@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" +conventional-changelog-core@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.1.tgz#ddf767c405850dfc8df31726c80fa1a6a10bdc7b" dependencies: - conventional-changelog-writer "^1.1.0" - conventional-commits-parser "^1.0.0" + conventional-changelog-writer "^2.0.1" + conventional-commits-parser "^2.0.0" dateformat "^1.0.12" get-pkg-repo "^1.0.0" git-raw-commits "^1.2.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^1.2.0" + git-semver-tags "^1.2.1" lodash "^4.0.0" normalize-package-data "^2.3.5" q "^1.4.1" @@ -1600,21 +1599,21 @@ conventional-changelog-core@^1.9.0: read-pkg-up "^1.0.1" through2 "^2.0.0" -conventional-changelog-ember@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" +conventional-changelog-ember@^0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.7.tgz#c6aff35976284e7222649f81c62bd96ff3217bd2" dependencies: q "^1.4.1" -conventional-changelog-eslint@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2" +conventional-changelog-eslint@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1" dependencies: q "^1.4.1" -conventional-changelog-express@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce" +conventional-changelog-express@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d" dependencies: q "^1.4.1" @@ -1630,16 +1629,16 @@ conventional-changelog-jscs@^0.1.0: dependencies: q "^1.4.1" -conventional-changelog-jshint@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07" +conventional-changelog-jshint@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872" dependencies: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-writer@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e" +conventional-changelog-writer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372" dependencies: compare-func "^1.3.1" conventional-commits-filter "^1.0.0" @@ -1652,20 +1651,20 @@ conventional-changelog-writer@^1.1.0: split "^1.0.0" through2 "^2.0.0" -conventional-changelog@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" +conventional-changelog@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.5.tgz#4c46fb64b2986cab19888d8c4b87ca7c0e431bfd" dependencies: - conventional-changelog-angular "^1.3.4" - conventional-changelog-atom "^0.1.0" - conventional-changelog-codemirror "^0.1.0" - conventional-changelog-core "^1.9.0" - conventional-changelog-ember "^0.2.6" - conventional-changelog-eslint "^0.1.0" - conventional-changelog-express "^0.1.0" + conventional-changelog-angular "^1.5.0" + conventional-changelog-atom "^0.1.1" + conventional-changelog-codemirror "^0.2.0" + conventional-changelog-core "^1.9.1" + conventional-changelog-ember "^0.2.7" + conventional-changelog-eslint "^0.2.0" + conventional-changelog-express "^0.2.0" conventional-changelog-jquery "^0.1.0" conventional-changelog-jscs "^0.1.0" - conventional-changelog-jshint "^0.1.0" + conventional-changelog-jshint "^0.2.0" conventional-commits-filter@^1.0.0: version "1.0.0" @@ -1674,18 +1673,6 @@ conventional-commits-filter@^1.0.0: is-subset "^0.1.1" modify-values "^1.0.0" -conventional-commits-parser@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.0" - lodash "^4.2.1" - meow "^3.3.0" - split2 "^2.0.0" - through2 "^2.0.0" - trim-off-newlines "^1.0.0" - conventional-commits-parser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" @@ -1698,7 +1685,7 @@ conventional-commits-parser@^2.0.0: through2 "^2.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@^1.0.0: +conventional-recommended-bump@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c" dependencies: @@ -1727,8 +1714,8 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0, core-js@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + version "2.5.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1741,7 +1728,7 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" dependencies: @@ -2056,8 +2043,8 @@ detect-node@^2.0.3: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" diff@^3.1.0, diff@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + version "3.3.1" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" diffie-hellman@^5.0.0: version "5.0.2" @@ -2176,8 +2163,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.2.7: - version "1.3.20" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.20.tgz#2eedd5ccbae7ddc557f68ad1fce9c172e915e4e5" + version "1.3.21" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.21.tgz#a967ebdcfe8ed0083fc244d1894022a8e8113ea2" elliptic@^6.0.0: version "6.4.0" @@ -2243,18 +2230,18 @@ errno@^0.1.3, errno@^0.1.4: dependencies: prr "~0.0.0" -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" es-abstract@^1.6.1, es-abstract@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914" + version "1.8.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee" dependencies: es-to-primitive "^1.1.1" - function-bind "^1.1.0" + function-bind "^1.1.1" has "^1.0.1" is-callable "^1.1.3" is-regex "^1.0.4" @@ -2268,8 +2255,8 @@ es-to-primitive@^1.1.1: is-symbol "^1.0.1" es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.29" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.29.tgz#768eb2dfc4957bcf35fa0568f193ab71ede53fd8" + version "0.10.30" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.30.tgz#7141a16836697dbabfaaaeee41495ce29f52c939" dependencies: es6-iterator "2" es6-symbol "~3.1" @@ -2348,8 +2335,8 @@ escope@^3.6.0: estraverse "^4.1.1" eslint-config-airbnb-base@^11.3.0: - version "11.3.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.1.tgz#c0ab108c9beed503cb999e4c60f4ef98eda0ed30" + version "11.3.2" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a" dependencies: eslint-restricted-globals "^0.1.1" @@ -2411,12 +2398,13 @@ eslint-plugin-jsx-a11y@5.1.1: jsx-ast-utils "^1.4.0" eslint-plugin-react@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.2.1.tgz#c2673526ed6571b08c69c5f453d03f5f13e8ddbe" + version "7.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.3.0.tgz#ca9368da36f733fbdc05718ae4e91f778f38e344" dependencies: doctrine "^2.0.0" has "^1.0.1" jsx-ast-utils "^2.0.0" + prop-types "^15.5.10" eslint-restricted-globals@^0.1.1: version "0.1.1" @@ -2430,8 +2418,8 @@ eslint-scope@^3.7.1: estraverse "^4.1.1" eslint@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.5.0.tgz#bb75d3b8bde97fb5e13efcd539744677feb019c3" + version "4.6.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.6.1.tgz#ddc7fc7fd70bf93205b0b3449bb16a1e9e7d4950" dependencies: ajv "^5.2.0" babel-code-frame "^6.22.0" @@ -2536,11 +2524,12 @@ eventsource@0.1.6: dependencies: original ">=0.0.5" -evp_bytestokey@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" dependencies: - create-hash "^1.1.1" + md5.js "^1.3.4" + safe-buffer "^5.1.1" exec-sh@^0.2.0: version "0.2.0" @@ -2548,9 +2537,9 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" -execa@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -2560,9 +2549,9 @@ execa@^0.6.3: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -2825,9 +2814,9 @@ fresh@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" dependencies: graceful-fs "^4.1.2" jsonfile "^3.0.0" @@ -2861,9 +2850,9 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2, function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" function.prototype.name@^1.0.0: version "1.0.3" @@ -2910,9 +2899,9 @@ get-pkg-repo@^1.0.0: parse-github-repo-url "^1.3.0" through2 "^2.0.0" -get-port@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.1.0.tgz#ef01b18a84ca6486970ff99e54446141a73ffd3e" +get-port@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" get-stdin@^4.0.1: version "4.0.1" @@ -2945,7 +2934,7 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^1.2.0, git-semver-tags@^1.2.1: +git-semver-tags@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" dependencies: @@ -2958,10 +2947,6 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -github-url-from-git@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -2975,6 +2960,13 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -3082,6 +3074,13 @@ hash-base@^2.0.0: dependencies: inherits "^2.0.1" +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" @@ -3256,8 +3255,8 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" ignore@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + version "3.3.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" imurmurhash@^0.1.4: version "0.1.4" @@ -3300,9 +3299,9 @@ ini@^1.3.2, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@^3.0.6: - version "3.2.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.2.tgz#c2aaede1507cc54d826818737742d621bef2e823" +inquirer@^3.0.6, inquirer@^3.2.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.3.tgz#1c7b1731cf77b934ec47d22c9ac5aa8fe7fbe095" dependencies: ansi-escapes "^2.0.0" chalk "^2.0.0" @@ -3567,17 +3566,17 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.1.1: - version "1.1.11" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + version "1.1.14" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.14.tgz#25bc5701f7c680c0ffff913de46e3619a3a6e680" dependencies: async "^2.1.4" fileset "^2.0.2" istanbul-lib-coverage "^1.1.1" istanbul-lib-hook "^1.0.7" - istanbul-lib-instrument "^1.7.4" + istanbul-lib-instrument "^1.8.0" istanbul-lib-report "^1.1.1" istanbul-lib-source-maps "^1.2.1" - istanbul-reports "^1.1.1" + istanbul-reports "^1.1.2" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" @@ -3592,15 +3591,15 @@ istanbul-lib-hook@^1.0.7: dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz#66f6c9421cc9ec4704f76f2db084ba9078a2b532" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.17.4" + babylon "^6.18.0" istanbul-lib-coverage "^1.1.1" semver "^5.3.0" @@ -3623,18 +3622,12 @@ istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" +istanbul-reports@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.2.tgz#0fb2e3f6aa9922bd3ce45d05d8ab4d5e8e07bd4f" dependencies: handlebars "^4.0.3" -jest: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" - dependencies: - jest-cli "^20.0.4" - jest-changed-files@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" @@ -3840,6 +3833,12 @@ jest-validate@^20.0.3: leven "^2.1.0" pretty-format "^20.0.3" +jest@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" + dependencies: + jest-cli "^20.0.4" + js-base64@^2.1.8, js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" @@ -3960,8 +3959,8 @@ jsx-ast-utils@^1.4.0: resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" jsx-ast-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.0.tgz#ec06a3d60cf307e5e119dac7bad81e89f096f0f8" + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: array-includes "^3.0.3" @@ -4002,44 +4001,45 @@ lcid@^1.0.0: invert-kv "^1.0.0" lerna@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea" + version "2.1.2" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.1.2.tgz#b07eb7a4d7dd7d44a105262fef49b2229301c577" dependencies: async "^1.5.0" - chalk "^1.1.1" + chalk "^2.1.0" cmd-shim "^2.0.2" columnify "^1.5.4" command-join "^2.0.0" - conventional-changelog-cli "^1.3.1" - conventional-recommended-bump "^1.0.0" + conventional-changelog-cli "^1.3.2" + conventional-recommended-bump "^1.0.1" dedent "^0.7.0" - execa "^0.6.3" + execa "^0.8.0" find-up "^2.1.0" - fs-extra "^3.0.1" - get-port "^3.1.0" + fs-extra "^4.0.1" + get-port "^3.2.0" glob "^7.1.2" + glob-parent "^3.1.0" globby "^6.1.0" graceful-fs "^4.1.11" - inquirer "^3.0.6" + inquirer "^3.2.2" is-ci "^1.0.10" - load-json-file "^2.0.0" + load-json-file "^3.0.0" lodash "^4.17.4" minimatch "^3.0.4" - npmlog "^4.1.0" + npmlog "^4.1.2" p-finally "^1.0.0" path-exists "^3.0.0" read-cmd-shim "^1.0.1" read-pkg "^2.0.0" rimraf "^2.6.1" - safe-buffer "^5.0.1" - semver "^5.1.0" + safe-buffer "^5.1.1" + semver "^5.4.1" signal-exit "^3.0.2" strong-log-transformer "^1.0.6" temp-write "^3.3.0" - write-file-atomic "^2.1.0" - write-json-file "^2.1.0" - write-pkg "^3.0.1" - yargs "^8.0.1" + write-file-atomic "^2.3.0" + write-json-file "^2.2.0" + write-pkg "^3.1.0" + yargs "^8.0.2" leven@^2.1.0: version "2.1.0" @@ -4071,6 +4071,15 @@ load-json-file@^2.0.0: pify "^2.0.0" strip-bom "^3.0.0" +load-json-file@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-3.0.0.tgz#7eb3735d983a7ed2262ade4ff769af5369c5c440" + dependencies: + graceful-fs "^4.1.2" + parse-json "^3.0.0" + pify "^2.0.0" + strip-bom "^3.0.0" + loader-fs-cache@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc" @@ -4271,6 +4280,13 @@ math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4340,23 +4356,23 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.29.0 < 2", mime-db@~1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" +"mime-db@>= 1.29.0 < 2", mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" -mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: - version "2.1.16" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" +mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.16, mime-types@~2.1.7: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: - mime-db "~1.29.0" + mime-db "~1.30.0" mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" mime@^1.3.4: - version "1.3.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" + version "1.4.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.0.tgz#69e9e0db51d44f2a3b56e48b7817d7d137f1a343" mimic-fn@^1.0.0: version "1.1.0" @@ -4433,8 +4449,8 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" nan@^2.3.0, nan@^2.3.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + version "2.7.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" native-promise-only@^0.8.1: version "0.8.1" @@ -4623,7 +4639,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.0: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: @@ -4832,8 +4848,8 @@ parse-asn1@^5.0.0: pbkdf2 "^3.0.3" parse-github-repo-url@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c" + version "1.4.1" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" parse-glob@^3.0.4: version "3.0.4" @@ -4850,6 +4866,12 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13" + dependencies: + error-ex "^1.3.1" + parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" @@ -4862,6 +4884,10 @@ path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -5207,12 +5233,12 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 supports-color "^3.2.3" postcss@^6.0.1: - version "6.0.10" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.10.tgz#c311b89734483d87a91a56dc9e53f15f4e6e84e4" + version "6.0.11" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.11.tgz#f48db210b1d37a7f7ab6499b7a54982997ab6f72" dependencies: chalk "^2.1.0" source-map "^0.5.7" - supports-color "^4.2.1" + supports-color "^4.4.0" prelude-ls@~1.1.2: version "1.1.2" @@ -5493,11 +5519,10 @@ regenerator-transform@^0.10.0: private "^0.1.6" regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" regexpu-core@^1.0.0: version "1.0.0" @@ -5659,7 +5684,7 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -5719,7 +5744,7 @@ selfsigned@^1.9.1: dependencies: node-forge "0.6.33" -"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0, semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.3.0, semver@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -5878,14 +5903,14 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" source-map-support@^0.4.15: - version "0.4.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + version "0.4.17" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.17.tgz#6f2150553e6375375d0ccb3180502b78c18ba430" dependencies: source-map "^0.5.6" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" source-map@^0.4.2, source-map@^0.4.4: version "0.4.4" @@ -5893,10 +5918,6 @@ source-map@^0.4.2, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -6098,9 +6119,9 @@ supports-color@^3.1.1, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0, supports-color@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" +supports-color@^4.0.0, supports-color@^4.2.1, supports-color@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" dependencies: has-flag "^2.0.0" @@ -6193,8 +6214,8 @@ text-encoding@0.6.4: resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" text-extensions@^1.0.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" + version "1.6.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.6.0.tgz#771561b26022783a45f5b6c2e78ad6e7de9fe322" text-table@~0.2.0: version "0.2.0" @@ -6317,8 +6338,8 @@ ua-parser-js@^0.7.9: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" uglify-js@3.0.x: - version "3.0.27" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.27.tgz#a97db8c8ba6b9dba4e2f88d86aa9548fa6320034" + version "3.0.28" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.28.tgz#96b8495f0272944787b5843a1679aa326640d5f7" dependencies: commander "~2.11.0" source-map "~0.5.1" @@ -6538,8 +6559,8 @@ webpack-sources@^1.0.1: source-map "~0.5.3" webpack@^3.5.4: - version "3.5.5" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.5.tgz#3226f09fc8b3e435ff781e7af34f82b68b26996c" + version "3.5.6" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.6.tgz#a492fb6c1ed7f573816f90e00c8fbb5a20cc5c36" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -6649,7 +6670,7 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: +write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" dependencies: @@ -6657,7 +6678,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-json-file@^2.1.0, write-json-file@^2.2.0: +write-json-file@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876" dependencies: @@ -6668,7 +6689,7 @@ write-json-file@^2.1.0, write-json-file@^2.2.0: sort-keys "^1.1.1" write-file-atomic "^2.0.0" -write-pkg@^3.0.1: +write-pkg@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" dependencies: @@ -6755,7 +6776,7 @@ yargs@^7.0.0, yargs@^7.0.2: y18n "^3.2.1" yargs-parser "^5.0.0" -yargs@^8.0.1, yargs@^8.0.2: +yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: From 79fb2523d496f9f618b55cd190fa5acb240371a1 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Tue, 12 Sep 2017 23:47:27 +0800 Subject: [PATCH 026/136] fix #51 * allow user to customize attrs for column cell * [test] add test for customized cell attrs * allow user to customize attrs for header column cell * [test] add test for customized header cell attrs * update document * add new utils isObject and isEmptyObject * make cell attrs lowest priority * if style, event, classes, hidden, style was not given, display the * HTML attributes if it's legal. However, if the attributes mentioned * above was defined at the same time, column.attrs has lowest priority * and it will be overwrited. * [test] unit test for column.attrs * [test] unit test for column.headerAttrs * update Document * rename story name * fix lint error --- docs/columns.md | 40 +++++- .../examples/columns/column-attrs-table.js | 45 +++++++ .../header-columns/column-attrs-table.js | 45 +++++++ .../stories/index.js | 8 +- packages/react-bootstrap-table2/src/cell.js | 20 +-- .../react-bootstrap-table2/src/header-cell.js | 20 +-- packages/react-bootstrap-table2/src/utils.js | 27 +++- .../react-bootstrap-table2/test/cell.test.js | 126 ++++++++++++++++++ .../test/header-cell.test.js | 102 +++++++++++++- .../react-bootstrap-table2/test/utils.test.js | 58 ++++++++ 10 files changed, 469 insertions(+), 22 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js diff --git a/docs/columns.md b/docs/columns.md index 38594d5..6546f81 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -13,11 +13,13 @@ Available properties in a column object: * [title](#title) * [events](#events) * [align](#align) +* [attrs](#attrs) * [headerTitle](#headerTitle) * [headerEvents](#headerEvents) * [headerAlign](#headerAlign) * [headerClasses](#headerClasses) * [headerStyle](#headerStyle) +* [headerAttrs](#headerAttrs) Following is a most simplest and basic usage: @@ -189,4 +191,40 @@ You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattribut ``` ## column.headerEvents - [Object] -`headerEvents` same as [`column.events`](#events) but this is for header column. \ No newline at end of file +`headerEvents` same as [`column.events`](#events) but this is for header column. + +## column.attrs - [Object | Function] +Via `attrs` property, You can costomize table column [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes) which allow user to configure the elements or adjust their behavior. It takes `Object` and `callback function` is also acceptable. + +```js +{ + // omit... + attrs: (cell, row, colIndex) => ({ + // return customized HTML attribute here + }) +} +``` + +#### * Caution + +If `column.classes`, `column.style`, `column.title`, `column.hidden` or `column.align` was given at the same time, property `attrs` has lower priorty and it will be overwrited. + +```js +{ + // omit... + title: true, // it will be chosen. + attrs: { title: 'test' } +} +``` + +## column.headerAttrs - [Object | Function] +`headerAttrs` is similiar to [`column.attrs`](#attrs) but it's for header column. + +```js +{ + // omit... + headerAttrs: (column, colIndex) => ({ + // return customized HTML attribute here + }) +} +``` diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js new file mode 100644 index 0000000..bb25ad5 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js @@ -0,0 +1,45 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + attrs: { title: 'id column' } +}, { + dataField: 'name', + text: 'Product Name', + attrs: (cell, row, colIndex) => ({ 'data-test': `customized data ${colIndex}` }) +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID', + attrs: { title: 'id column' } +}, { + dataField: 'name', + text: 'Product Name', + attrs: (cell, row, colIndex) => ({ 'data-test': \`customized data \${colIndex}\` }) +}, { + dataField: 'price', + text: 'Product Price' +}]; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js new file mode 100644 index 0000000..ad2c5d9 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js @@ -0,0 +1,45 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerAttrs: { title: 'ID header column' } +}, { + dataField: 'name', + text: 'Product Name', + headerAttrs: (column, colIndex) => ({ 'data-test': `customized data ${colIndex}` }) +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerAttrs: { title: 'ID header column' } +}, { + dataField: 'name', + text: 'Product Name', + headerAttrs: (column, colIndex) => ({ 'data-test': \`customized data \${colIndex}\` }) +}, { + dataField: 'price', + text: 'Product Price' +}]; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index d63f949..16c3bae 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -20,6 +20,7 @@ import ColumnAlignTable from 'examples/columns/column-align-table'; import ColumnTitleTable from 'examples/columns/column-title-table'; import ColumnEventTable from 'examples/columns/column-event-table'; import ColumnHiddenTable from 'examples/columns/column-hidden-table'; +import ColumnAttrsTable from 'examples/columns/column-attrs-table'; // work on header columns import HeaderColumnFormatTable from 'examples/header-columns/column-format-table'; @@ -28,6 +29,7 @@ import HeaderColumnTitleTable from 'examples/header-columns/column-title-table'; import HeaderColumnEventTable from 'examples/header-columns/column-event-table'; import HeaderColumnClassTable from 'examples/header-columns/column-class-table'; import HeaderColumnStyleTable from 'examples/header-columns/column-style-table'; +import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -56,7 +58,8 @@ storiesOf('Work on Columns', module) .add('Column Hidden', () => ) .add('Column Event', () => ) .add('Customize Column Class', () => ) - .add('Customize Column Style', () => ); + .add('Customize Column Style', () => ) + .add('Customize Column HTML attribute', () => ); storiesOf('Work on Header Columns', module) .add('Column Formatter', () => ) @@ -64,4 +67,5 @@ storiesOf('Work on Header Columns', module) .add('Column Title', () => ) .add('Column Event', () => ) .add('Customize Column Class', () => ) - .add('Customize Column Style', () => ); + .add('Customize Column Style', () => ) + .add('Customize Column HTML attribute', () => ); diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 8f590f5..4cb1621 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -13,15 +13,18 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { classes, title, events, - align + align, + attrs } = column; let cellTitle; let cellStyle = {}; let content = _.get(row, dataField); - const attrs = { + const cellAttrs = { + ..._.isFunction(attrs) ? attrs(content, row, columnIndex) : attrs, ...events }; + const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; if (style) { @@ -30,7 +33,7 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { if (title) { cellTitle = _.isFunction(title) ? title(content, row, columnIndex) : content; - attrs.title = cellTitle; + cellAttrs.title = cellTitle; } if (formatter) { @@ -41,15 +44,16 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { cellStyle.textAlign = _.isFunction(align) ? align(content, row, columnIndex) : align; } - attrs.style = cellStyle; - attrs.className = cellClasses; - if (hidden) { - attrs.style.display = 'none'; + cellStyle.display = 'none'; } + if (cellClasses) cellAttrs.className = cellClasses; + + if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; + return ( -
+ ); }; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 062e4f6..be2e525 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -13,9 +13,12 @@ const HeaderCell = ({ column, index }) => { headerFormatter, headerEvents, headerClasses, - headerStyle + headerStyle, + headerAttrs } = column; - const attrs = { + + const cellAttrs = { + ..._.isFunction(headerAttrs) ? headerAttrs(column, index) : headerAttrs, ...headerEvents }; const children = headerFormatter ? headerFormatter(column, index) : text; @@ -28,22 +31,23 @@ const HeaderCell = ({ column, index }) => { } if (headerTitle) { - attrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; + cellAttrs.title = _.isFunction(headerTitle) ? headerTitle(column, index) : text; } if (headerAlign) { cellStyle.textAlign = _.isFunction(headerAlign) ? headerAlign(column, index) : headerAlign; } - attrs.style = cellStyle; - attrs.className = cellClasses; - if (hidden) { - attrs.style.display = 'none'; + cellStyle.display = 'none'; } + if (cellClasses) cellAttrs.className = cellClasses; + + if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; + return ( - ); diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index bee745a..e86be0f 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -17,7 +17,32 @@ function isFunction(obj) { return obj && (typeof obj === 'function'); } +/** + * Checks if `value` is the Object. the `Object` except `Function` and `Array.` + * + * @param {*} obj - The value gonna check + */ +function isObject(obj) { + const type = typeof obj; + return obj !== null && type === 'object' && obj.constructor === Object; +} + +function isEmptyObject(obj) { + if (!isObject(obj)) return false; + + const hasOwnProperty = Object.prototype.hasOwnProperty; + const keys = Object.keys(obj); + + for (let i = 0; i < keys.length; i += 1) { + if (hasOwnProperty.call(obj, keys[i])) return false; + } + + return true; +} + export default { get, - isFunction + isFunction, + isObject, + isEmptyObject }; diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index aebc348..1d1bebb 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -305,4 +305,130 @@ describe('Cell', () => { }); }); }); + + describe('when column.attrs prop is defined', () => { + let column; + const columnIndex = 1; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when attrs is an object', () => { + it('should render column.attrs correctly', () => { + column.attrs = { + 'data-test': 'test', + title: 'title', + className: 'attrs-class', + style: { + backgroundColor: 'attrs-style-test', + display: 'none', + textAlign: 'right' + } + }; + wrapper = shallow( + ); + + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('data-test')).toEqual(column.attrs['data-test']); + expect(wrapper.find('td').prop('title')).toEqual(column.attrs.title); + expect(wrapper.hasClass(column.attrs.className)).toBe(true); + expect(wrapper.find('td').prop('style')).toEqual(column.attrs.style); + expect(wrapper.find('td').prop('style').textAlign).toEqual(column.attrs.style.textAlign); + }); + + describe('when column.title prop is defined', () => { + it('attrs.title should be overwrited', () => { + column.title = true; + column.attrs = { title: 'title' }; + + wrapper = shallow( + ); + + expect(wrapper.find('td').prop('title')).toEqual(row[column.dataField]); + }); + }); + + describe('when column.classes prop is defined', () => { + it('attrs.class should be overwrited', () => { + column.classes = 'td-test-class'; + column.attrs = { className: 'attrs-class' }; + + wrapper = shallow( + ); + + expect(wrapper.hasClass(column.classes)).toBe(true); + }); + }); + + describe('when column.style prop is defined', () => { + it('attrs.style should be overwrited', () => { + column.style = { backgroundColor: 'red' }; + column.attrs = { style: { backgroundColor: 'attrs-style-test' } }; + + wrapper = shallow( + ); + + expect(wrapper.find('td').prop('style')).toEqual(column.style); + }); + }); + + describe('when column.hidden prop is defined', () => { + it('attrs.style.hidden should be overwrited', () => { + column.hidden = true; + column.attrs = { style: { hidden: true } }; + + wrapper = shallow( + ); + + const style = wrapper.find('td').prop('style'); + expect(style).toBeDefined(); + expect(style.display).toEqual('none'); + }); + }); + + describe('when column.align prop is defined', () => { + it('attrs.style.textAlign should be overwrited', () => { + column.align = 'center'; + column.attrs = { style: { textAlign: 'right' } }; + + wrapper = shallow( + ); + + expect(wrapper.find('td').prop('style').textAlign).toEqual(column.align); + }); + }); + }); + + describe('when attrs is custom function', () => { + let attrsCallBack; + const customAttrs = { + title: 'title', + 'data-test': 'test' + }; + + beforeEach(() => { + attrsCallBack = sinon.stub() + .withArgs(row[column.dataField], row, columnIndex) + .returns(customAttrs); + column.attrs = attrsCallBack; + wrapper = shallow( + ); + }); + + it('should render style.attrs correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('data-test')).toEqual(customAttrs['data-test']); + expect(wrapper.find('td').prop('title')).toEqual(customAttrs.title); + }); + + it('should call custom attrs function correctly', () => { + expect(attrsCallBack.callCount).toBe(1); + expect(attrsCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 0dd027a..134de2d 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -24,9 +24,9 @@ describe('HeaderCell', () => { expect(wrapper.text()).toEqual(column.text); }); - it('should have correct default style', () => { + it('should not have default style', () => { const style = wrapper.find('th').prop('style'); - expect(style).toBeDefined(); + expect(style).toBeUndefined(); }); }); @@ -286,5 +286,103 @@ describe('HeaderCell', () => { expect(classesCallBack.calledWith(column, index)).toBe(true); }); }); + + describe('when column.headerAttrs prop is defined', () => { + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID' + }; + }); + + describe('when headerAttrs is an object', () => { + it('should render column.headerAttrs correctly', () => { + column.headerAttrs = { + 'data-test': 'test', + title: 'title', + className: 'attrs-class', + style: { backgroundColor: 'attrs-style-test' } + }; + wrapper = shallow(); + + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('data-test')).toEqual(column.headerAttrs['data-test']); + expect(wrapper.find('th').prop('title')).toEqual(column.headerAttrs.title); + expect(wrapper.hasClass(column.headerAttrs.className)).toBe(true); + expect(wrapper.find('th').prop('style')).toEqual(column.headerAttrs.style); + }); + + describe('when column.headerTitle prop is defined', () => { + it('title should be overwrited', () => { + column.headerAttrs = { title: 'title' }; + column.headerTitle = true; + wrapper = shallow(); + + expect(wrapper.find('th').prop('title')).toBe(column.text); + }); + }); + + describe('when column.headerClasses prop is defined', () => { + it('class should be overwrited', () => { + column.headerClasses = 'td-test-class'; + column.headerAttrs = { className: 'attrs-class' }; + + wrapper = shallow(); + + expect(wrapper.hasClass(column.headerClasses)).toBe(true); + }); + }); + + describe('when column.headerStyle prop is defined', () => { + it('style should be overwrited', () => { + column.headerStyle = { backgroundColor: 'red' }; + column.headerAttrs = { style: { backgroundColor: 'attrs-style-test' } }; + + wrapper = shallow(); + + expect(wrapper.find('th').prop('style')).toEqual(column.headerStyle); + }); + }); + + describe('when column.headerAlign prop is defined', () => { + it('style.textAlign should be overwrited', () => { + column.headerAlign = 'center'; + column.headerAttrs = { style: { textAlign: 'right' } }; + + wrapper = shallow(); + + expect(wrapper.find('th').prop('style').textAlign).toEqual(column.headerAlign); + }); + }); + }); + + describe('when headerAttrs is custom function', () => { + let headerAttrsCallBack; + const customHeaderAttrs = { + title: 'title', + 'data-test': 'test' + }; + + + beforeEach(() => { + headerAttrsCallBack = sinon.stub() + .withArgs(column, index) + .returns(customHeaderAttrs); + column.headerAttrs = headerAttrsCallBack; + wrapper = shallow(); + }); + + it('should render style.headerAttrs correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('th').prop('data-test')).toEqual(customHeaderAttrs['data-test']); + expect(wrapper.find('th').prop('title')).toEqual(customHeaderAttrs.title); + }); + + it('should call custom headerAttrs function correctly', () => { + expect(headerAttrsCallBack.callCount).toBe(1); + expect(headerAttrsCallBack.calledWith(column, index)).toBe(true); + }); + }); + }); }); }); diff --git a/packages/react-bootstrap-table2/test/utils.test.js b/packages/react-bootstrap-table2/test/utils.test.js index feb33e9..491cc04 100644 --- a/packages/react-bootstrap-table2/test/utils.test.js +++ b/packages/react-bootstrap-table2/test/utils.test.js @@ -21,4 +21,62 @@ describe('Utils', () => { expect(_.get(data, 'address.not.exist')).toEqual(undefined); }); }); + + describe('isObject', () => { + describe('when given Object', () => { + it('should return true', () => { + expect(_.isObject({})).toBe(true); + }); + }); + + describe('when given Function', () => { + it('should return false', () => { + expect(_.isObject(() => 'test')).toBe(false); + }); + }); + + describe('when given Array', () => { + it('should return false', () => { + expect(_.isObject([])).toBe(false); + }); + }); + + describe('when given null', () => { + it('should return false', () => { + expect(_.isObject(null)).toBe(false); + }); + }); + }); + + describe('isEmptyObject', () => { + describe('when given empty Object', () => { + it('should return true', () => { + expect(_.isEmptyObject({})).toBe(true); + }); + }); + + describe('when given non-empty Object', () => { + it('should return false', () => { + expect(_.isEmptyObject({ foo: 'test' })).toBe(false); + }); + }); + + describe('when given Function', () => { + it('should return false', () => { + expect(_.isEmptyObject(() => 'test')).toBe(false); + }); + }); + + describe('when given Array', () => { + it('should return false', () => { + expect(_.isEmptyObject([])).toBe(false); + }); + }); + + describe('when given null', () => { + it('should return false', () => { + expect(_.isEmptyObject(null)).toBe(false); + }); + }); + }); }); From ec1a927001d32bde607776fd6b8f4e0219306f66 Mon Sep 17 00:00:00 2001 From: "ChunMing, Chen" Date: Sat, 16 Sep 2017 13:03:07 +0800 Subject: [PATCH 027/136] fix #56 * redefine cell callback function * it takes 4 argus `content`, `row`, `rowIndex` and `columnIndex` in * sequence. * [test] fix unit test for new callback * correct the version of story for new cell callback * [DOC] re-define structure of Contents of Table * [DOC] update document for attrs * re-write description for each column props * [DOC] update document for headerCell * re-write and add extra description for each header column props --- docs/columns.md | 233 +++++++++++++++--- .../examples/columns/column-align-table.js | 8 +- .../examples/columns/column-attrs-table.js | 4 +- .../examples/columns/column-class-table.js | 8 +- .../examples/columns/column-style-table.js | 8 +- .../examples/columns/column-title-table.js | 4 +- packages/react-bootstrap-table2/src/cell.js | 12 +- .../react-bootstrap-table2/test/cell.test.js | 56 +++-- 8 files changed, 258 insertions(+), 75 deletions(-) diff --git a/docs/columns.md b/docs/columns.md index 6546f81..5e7a8b0 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -2,23 +2,26 @@ Available properties in a column object: +#### Required * [dataField (**required**)](#dataField) * [text (**required**)](#text) + +#### Optional * [hidden](#hidden) * [formatter](#formatter) -* [headerFormatter](#headerFormatter) * [formatExtraData](#formatExtraData) +* [headerFormatter](#headerFormatter) * [classes](#classes) * [style](#style) * [title](#title) * [events](#events) * [align](#align) * [attrs](#attrs) +* [headerClasses](#headerClasses) +* [headerStyle](#headerStyle) * [headerTitle](#headerTitle) * [headerEvents](#headerEvents) * [headerAlign](#headerAlign) -* [headerClasses](#headerClasses) -* [headerStyle](#headerStyle) * [headerAttrs](#headerAttrs) Following is a most simplest and basic usage: @@ -91,14 +94,27 @@ It's availabe to have custom class on table column: classes: 'id-custom-cell' } ``` -In addition, `classes` also accept a callback function which have more power to custom the css class on each columns. This callback function take three arguments and a string is expect to return: +In addition, `classes` also accept a callback function which have more power to custom the css class on each columns. This callback function take `4` arguments and a `string` is expect to return: -* `cell` -* `row` -* `colIndex` + +```js +{ + classes: function callback(cell, row, rowIndex, colIndex) { ... } +} +``` + +**Parameters** +* `cell`: The value of current cell. +* `row`: The value of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element class. ## column.headerClasses - [String | Function] -It's availabe to have customized class on table header column: +It's similar to [`column.classes`](#classes), `headerClasses` is availabe to have customized class on table header column: ```js { @@ -106,13 +122,24 @@ It's availabe to have customized class on table header column: headerClasses: 'id-custom-cell' } ``` -In addition, similar to [`column.classes`](#classes), `headerClasses` also accept a callback function which have more power to custom the css class on header column. This callback function take two arguments and a string is expect to return: +Furthermore, it also accept a callback function which takes 2 arguments and a `String` is expect to return: -* `column` -* `colIndex` +```js +{ + headerClasses: function callback(column, colIndex) { ... } +} +``` + +**Parameters** +* `column`: The value of current column. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element headerClasses. ## column.style - [Object | Function] -It's availabe to have custom class on table column: +It's availabe to have custom style on table column: ```js { @@ -120,7 +147,26 @@ It's availabe to have custom class on table column: style: { backgroundColor: 'green' } } ``` -`style` like [`column.classes`](#classes), it accept a callback function too and have same arguments: `cell`, `row` and `colIndex`. + +In addition, similar to [`column.classes`](#classes), `style` also accept a callback function which have more power to customize the `inline style` on each columns. This callback function takes `4` arguments and an `Object` is expect to return: + + +```js +{ + style: function callback(cell, row, rowIndex, colIndex) { ... } +} +``` + +**Parameters** +* `cell`: The value of current cell. +* `row`: The value of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `Object` will be the result of element style. + ## column.headerStyle - [Object | Function] It's availabe to have customized inline-style on table header column: @@ -131,42 +177,104 @@ It's availabe to have customized inline-style on table header column: headerStyle: { backgroundColor: 'green' } } ``` -`headerStyle` like [`column.headerClasses`](#headerClasses), it accept a callback function as well and have same arguments: `column` and `colIndex`. + +Moreover, it also accept a callback function which takes 2 arguments and an `Object` is expect to return: + +```js +{ + headerStyle: function callback(column, colIndex) { ... } +} +``` + +**Parameters** +* `column`: The value of current column. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `Object` will be the result of element headerStyle. + ## column.title - [Bool | Function] -`react-bootstrap-table2` is disable [`HTML title`](https://www.w3schools.com/tags/tag_title.asp) as default. You can assign `title` as `true` to enable the HTML title on table column. In addition, you can custom the title via a callback function: +`react-bootstrap-table2` is disable [`HTML title`](https://www.w3schools.com/tags/tag_title.asp) as default. You can assign `title` as `true` to enable the HTML title on table column and take `cell content` as default value. Additionally, you could customize title via a callback. It takes `4` arguments and a `String` is expect to return: + ```js { // omit... - title: (cell, row, colIndex) => { - // return custom title here - } + title: function callback(cell, row, rowIndex, colIndex) { ... } + // return custom title here } ``` +**Parameters** +* `cell`: The value of current cell. +* `row`: The value of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element title. + ## column.headerTitle - [Bool | Function] -`headerTitle` is only for the title on header column, default is disable. The usage almost same as [`column.title`](#title), it's also availabe to custom via a callback function: +`headerTitle` is only for the title on header column, default is disable. The usage almost same as [`column.title`](#title), ```js { // omit... - headerTitle: (column, colIndex) => { - // column is an object and perform itself - // return custom title here - } + headerTitle: true } ``` -## column.align - [String | Function] -You can configure the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) for table column by `align` property. However, `align` also accept a callback function for customizable reason and this function take fore arguments: +It's also availabe to custom via a callback function: +```js +{ + headerTitle: function callback(column, colIndex) { ... } +} +``` -* `cell` -* `row` -* `colIndex` +**Parameters** +* `column`: The value of current column. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element headerTitle. + +## column.align - [String | Function] +You can configure the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) for table column by `align` property. + +Besides, `align` also accept a callback function for dynamically setting text align. It takes `4` arguments and a `String` is expect to return: + +```js +{ + // omit... + align: function callback(cell, row, rowIndex, colIndex) { ... } +} +``` + +**Parameters** +* `cell`: The value of current cell. +* `row`: The value of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element text alignment. ## column.headerAlign - [String | Function] -It's almost same as [`column.align`](#align), but it's for the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) on header column. Also, you can custom the align by a callback function: +It's almost same as [`column.align`](#align), but it's for the [CSS text-align](https://www.w3schools.com/cssref/pr_text_text-align.asp) on header column. + +```js +{ + // omit... + headerAlign: 'center' +} +``` + +Also, you can custom the align by a callback function: ```js { @@ -177,6 +285,14 @@ It's almost same as [`column.align`](#align), but it's for the [CSS text-align]( } } ``` +**Parameters** +* `column`: The value of current column. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `String` will be the result of element headerAlign. + ## column.events - [Object] You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via event property: @@ -193,17 +309,44 @@ You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattribut ## column.headerEvents - [Object] `headerEvents` same as [`column.events`](#events) but this is for header column. +```js +{ + // omit... + headerEvents: { + onClick: e => { ... } + } +} +``` + ## column.attrs - [Object | Function] -Via `attrs` property, You can costomize table column [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes) which allow user to configure the elements or adjust their behavior. It takes `Object` and `callback function` is also acceptable. +Via `attrs` property, You can customize table column [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes) which allow user to configure the elements or adjust their behavior. ```js { // omit... - attrs: (cell, row, colIndex) => ({ - // return customized HTML attribute here - }) + attrs: { + title: 'bar', + 'data-test': 'foo' + } } ``` +Not only `Object`, `callback function` is also acceptable. It takes `4` arguments and an `Object` is expect to return: + +```js +{ + attrs: function callback(cell, row, rowIndex, colIndex) { ... } +} +``` + +**Parameters** +* `cell`: The value of current cell. +* `row`: The value of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `Object` will be the result of element HTML attributes. #### * Caution @@ -218,7 +361,18 @@ If `column.classes`, `column.style`, `column.title`, `column.hidden` or `column. ``` ## column.headerAttrs - [Object | Function] -`headerAttrs` is similiar to [`column.attrs`](#attrs) but it's for header column. +`headerAttrs` is similiar to [`column.attrs`](#attrs) but it works for header column. +```js +{ + // omit... + headerAttrs: { + title: 'bar', + 'data-test': 'foo' + } +} +``` + +Additionally, customize the header attributes by a `2-arguments` callback function: ```js { @@ -228,3 +382,14 @@ If `column.classes`, `column.style`, `column.title`, `column.hidden` or `column. }) } ``` + +**Parameters** +* `column`: The value of current column. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +**Return value** + +A new `Object` will be the result of element headerAttrs. + +#### * Caution +Same as [column.attrs](#attrs), it has lower priority and will be overwrited when other props related to HTML attributes were given. diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js index 55ad2aa..37b510f 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -14,8 +14,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - align: (cell, row, colIndex) => { - if (row.id % 2 === 0) return 'right'; + align: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) return 'right'; return 'left'; } }, { @@ -31,8 +31,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - align: (cell, row, colIndex) => { - if (row.id % 2 === 0) return 'right'; + align: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) return 'right'; return 'left'; } }, { diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js index bb25ad5..43c377a 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js @@ -14,7 +14,7 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - attrs: (cell, row, colIndex) => ({ 'data-test': `customized data ${colIndex}` }) + attrs: (cell, row, rowIndex, colIndex) => ({ 'data-test': `customized data ${rowIndex}` }) }, { dataField: 'price', text: 'Product Price' @@ -28,7 +28,7 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - attrs: (cell, row, colIndex) => ({ 'data-test': \`customized data \${colIndex}\` }) + attrs: (cell, row, rowIndex, colIndex) => ({ 'data-test': \`customized data \${rowIndex}\` }) }, { dataField: 'price', text: 'Product Price' diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js index 44029ae..3a1e6fc 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -14,8 +14,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - classes: (cell, row, colIndex) => { - if (row.id % 2 === 0) return 'demo-row-even'; + classes: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) return 'demo-row-even'; return 'demo-row-odd'; } }, { @@ -31,8 +31,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - classes: (cell, row, colIndex) => { - if (row.id % 2 === 0) return 'demo-row-even'; + classes: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) return 'demo-row-even'; return 'demo-row-odd'; } }, { diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js index 157193b..4dae9bc 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -17,8 +17,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - style: (cell, row, colIndex) => { - if (row.id % 2 === 0) { + style: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) { return { backgroundColor: '#81c784' }; @@ -43,8 +43,8 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - style: (cell, row, colIndex) => { - if (row.id % 2 === 0) { + style: (cell, row, rowIndex, colIndex) => { + if (rowIndex % 2 === 0) { return { backgroundColor: '#81c784' }; diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js index ec2ee76..f75455a 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -14,7 +14,7 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - title: (cell, row, colIndex) => `this is custom title for ${cell}` + title: (cell, row, rowIndex, colIndex) => `this is custom title for ${cell}` }, { dataField: 'price', text: 'Product Price' @@ -28,7 +28,7 @@ const columns = [{ }, { dataField: 'name', text: 'Product Name', - title: (cell, row, colIndex) => \`this is custom title for \${cell}\` + title: (cell, row, rowIndex, colIndex) => \`this is custom title for \${cell}\` }, { dataField: 'price', text: 'Product Price' diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 4cb1621..2126c93 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -21,18 +21,20 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { let content = _.get(row, dataField); const cellAttrs = { - ..._.isFunction(attrs) ? attrs(content, row, columnIndex) : attrs, + ..._.isFunction(attrs) ? attrs(content, row, rowIndex, columnIndex) : attrs, ...events }; - const cellClasses = _.isFunction(classes) ? classes(content, row, columnIndex) : classes; + const cellClasses = _.isFunction(classes) + ? classes(content, row, rowIndex, columnIndex) + : classes; if (style) { - cellStyle = _.isFunction(style) ? style(content, row, columnIndex) : style; + cellStyle = _.isFunction(style) ? style(content, row, rowIndex, columnIndex) : style; } if (title) { - cellTitle = _.isFunction(title) ? title(content, row, columnIndex) : content; + cellTitle = _.isFunction(title) ? title(content, row, rowIndex, columnIndex) : content; cellAttrs.title = cellTitle; } @@ -41,7 +43,7 @@ const Cell = ({ row, rowIndex, column, columnIndex }) => { } if (align) { - cellStyle.textAlign = _.isFunction(align) ? align(content, row, columnIndex) : align; + cellStyle.textAlign = _.isFunction(align) ? align(content, row, rowIndex, columnIndex) : align; } if (hidden) { diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 1d1bebb..21e7400 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -81,6 +81,7 @@ describe('Cell', () => { describe('when column.style prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -93,7 +94,7 @@ describe('Cell', () => { beforeEach(() => { column.style = { backgroundColor: 'red' }; wrapper = shallow( - ); + ); }); it('should render successfully', () => { @@ -108,11 +109,11 @@ describe('Cell', () => { beforeEach(() => { styleCallBack = sinon.stub() - .withArgs(row[column.dataField], row, columnIndex) + .withArgs(row[column.dataField], row, rowIndex, columnIndex) .returns(returnStyle); column.style = styleCallBack; wrapper = shallow( - ); + ); }); afterEach(() => { styleCallBack.reset(); }); @@ -124,7 +125,9 @@ describe('Cell', () => { it('should call custom style function correctly', () => { expect(styleCallBack.callCount).toBe(1); - expect(styleCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + expect( + styleCallBack.calledWith(row[column.dataField], row, rowIndex, columnIndex) + ).toBe(true); }); }); }); @@ -132,6 +135,7 @@ describe('Cell', () => { describe('when column.classes prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -144,7 +148,7 @@ describe('Cell', () => { beforeEach(() => { column.classes = 'td-test-class'; wrapper = shallow( - ); + ); }); it('should render successfully', () => { @@ -159,11 +163,11 @@ describe('Cell', () => { beforeEach(() => { classesCallBack = sinon.stub() - .withArgs(row[column.dataField], row, columnIndex) + .withArgs(row[column.dataField], row, rowIndex, columnIndex) .returns(returnClasses); column.classes = classesCallBack; wrapper = shallow( - ); + ); }); afterEach(() => { classesCallBack.reset(); }); @@ -175,7 +179,9 @@ describe('Cell', () => { it('should call custom classes function correctly', () => { expect(classesCallBack.callCount).toBe(1); - expect(classesCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + expect( + classesCallBack.calledWith(row[column.dataField], row, rowIndex, columnIndex) + ).toBe(true); }); }); }); @@ -183,6 +189,7 @@ describe('Cell', () => { describe('when column.title prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -195,7 +202,7 @@ describe('Cell', () => { beforeEach(() => { column.title = true; wrapper = shallow( - ); + ); }); it('should render title as cell value as default', () => { @@ -210,11 +217,11 @@ describe('Cell', () => { beforeEach(() => { titleCallBack = sinon.stub() - .withArgs(row[column.dataField], row, columnIndex) + .withArgs(row[column.dataField], row, rowIndex, columnIndex) .returns(customTitle); column.title = titleCallBack; wrapper = shallow( - ); + ); }); it('should render title correctly by custom title function', () => { @@ -224,7 +231,9 @@ describe('Cell', () => { it('should call custom title function correctly', () => { expect(titleCallBack.callCount).toBe(1); - expect(titleCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + expect( + titleCallBack.calledWith(row[column.dataField], row, rowIndex, columnIndex) + ).toBe(true); }); }); }); @@ -232,6 +241,7 @@ describe('Cell', () => { describe('when column.events prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -243,7 +253,7 @@ describe('Cell', () => { }; wrapper = shallow( - ); + ); }); it('should attachs DOM event successfully', () => { @@ -260,6 +270,7 @@ describe('Cell', () => { describe('when column.align prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -272,7 +283,7 @@ describe('Cell', () => { beforeEach(() => { column.align = 'center'; wrapper = shallow( - ); + ); }); it('should render style.textAlign correctly', () => { @@ -287,11 +298,11 @@ describe('Cell', () => { beforeEach(() => { alignCallBack = sinon.stub() - .withArgs(row[column.dataField], row, columnIndex) + .withArgs(row[column.dataField], row, rowIndex, columnIndex) .returns(customAlign); column.align = alignCallBack; wrapper = shallow( - ); + ); }); it('should render style.textAlign correctly', () => { @@ -301,7 +312,9 @@ describe('Cell', () => { it('should call custom headerAlign function correctly', () => { expect(alignCallBack.callCount).toBe(1); - expect(alignCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + expect( + alignCallBack.calledWith(row[column.dataField], row, rowIndex, columnIndex) + ).toBe(true); }); }); }); @@ -309,6 +322,7 @@ describe('Cell', () => { describe('when column.attrs prop is defined', () => { let column; const columnIndex = 1; + const rowIndex = 1; beforeEach(() => { column = { @@ -412,11 +426,11 @@ describe('Cell', () => { beforeEach(() => { attrsCallBack = sinon.stub() - .withArgs(row[column.dataField], row, columnIndex) + .withArgs(row[column.dataField], row, rowIndex, columnIndex) .returns(customAttrs); column.attrs = attrsCallBack; wrapper = shallow( - ); + ); }); it('should render style.attrs correctly', () => { @@ -427,7 +441,9 @@ describe('Cell', () => { it('should call custom attrs function correctly', () => { expect(attrsCallBack.callCount).toBe(1); - expect(attrsCallBack.calledWith(row[column.dataField], row, columnIndex)).toBe(true); + expect( + attrsCallBack.calledWith(row[column.dataField], row, rowIndex, columnIndex) + ).toBe(true); }); }); }); From 2e10cb132e04de23a740ded4cda0fe01f416f646 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 16 Sep 2017 01:33:25 -0500 Subject: [PATCH 028/136] fix #47 * implement table sort * path for component test for table sort * add store/base test * add store/sort test * add story for sort * add column.sort and column.sortFunc --- docs/columns.md | 22 +++++- .../examples/sort/custom-sort-table.js | 60 +++++++++++++++ .../examples/sort/enable-sort-table.js | 44 +++++++++++ .../stories/index.js | 8 ++ .../src/bootstrap-table.js | 26 ++++++- packages/react-bootstrap-table2/src/const.js | 4 + .../react-bootstrap-table2/src/header-cell.js | 42 ++++++++++- packages/react-bootstrap-table2/src/header.js | 44 ++++++++--- .../react-bootstrap-table2/src/sort-caret.js | 21 ++++++ .../react-bootstrap-table2/src/sort-symbol.js | 13 ++++ .../react-bootstrap-table2/src/store/base.js | 21 ++++++ .../react-bootstrap-table2/src/store/sort.js | 40 ++++++++++ packages/react-bootstrap-table2/src/utils.js | 7 +- .../style/react-bootstrap-table.scss | 23 +++++- .../test/header-cell.test.js | 74 ++++++++++++++++++ .../test/header.test.js | 18 +++++ .../test/sort-caret.test.js | 37 +++++++++ .../test/sort-symbol.test.js | 19 +++++ .../test/store/base.test.js | 75 +++++++++++++++++++ .../test/store/sort.test.js | 39 ++++++++++ 20 files changed, 615 insertions(+), 22 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js create mode 100644 packages/react-bootstrap-table2/src/const.js create mode 100644 packages/react-bootstrap-table2/src/sort-caret.js create mode 100644 packages/react-bootstrap-table2/src/sort-symbol.js create mode 100644 packages/react-bootstrap-table2/src/store/sort.js create mode 100644 packages/react-bootstrap-table2/test/sort-caret.test.js create mode 100644 packages/react-bootstrap-table2/test/sort-symbol.test.js create mode 100644 packages/react-bootstrap-table2/test/store/base.test.js create mode 100644 packages/react-bootstrap-table2/test/store/sort.test.js diff --git a/docs/columns.md b/docs/columns.md index 5e7a8b0..a517532 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -10,13 +10,15 @@ Available properties in a column object: * [hidden](#hidden) * [formatter](#formatter) * [formatExtraData](#formatExtraData) -* [headerFormatter](#headerFormatter) +* [sort](#sort) +* [sortFunc](#sortFunc) * [classes](#classes) * [style](#style) * [title](#title) * [events](#events) * [align](#align) * [attrs](#attrs) +* [headerFormatter](#headerFormatter) * [headerClasses](#headerClasses) * [headerStyle](#headerStyle) * [headerTitle](#headerTitle) @@ -85,6 +87,24 @@ dataField: 'address.city' ## column.formatExtraData - [Any] It's only used for [`column.formatter`](#formatter), you can define any value for it and will be passed as fourth argument for [`column.formatter`](#formatter) callback function. +## column.sort - [Bool] +Enable the column sort via a `true` value given. + +## column.sortFunc - [Function] +`column.sortFunc` only work when `column.sort` is enable. `sortFunc` allow you to define your sorting algorithm. This callback function accept four arguments: + +```js +{ + // omit... + sort: true, + sortFunc: (a, b, order, dataField) => { + if (order === 'asc') return a - b; + else return b - a; + } +} +``` +> The possible value of `order` argument is **`asc`** and **`desc`**. + ## column.classes - [String | Function] It's availabe to have custom class on table column: diff --git a/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js b/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js new file mode 100644 index 0000000..d362e8d --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js @@ -0,0 +1,60 @@ +/* eslint no-unused-vars: 0 */ + +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true, + // here, we implement a custom sort which perform a reverse sorting + sortFunc: (a, b, order, dataField) => { + if (order === 'asc') { + return b - a; + } + return a - b; // desc + } +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true, + // here, we implement a custom sort which perform a reverse sorting + sortFunc: (a, b, order, dataField) => { + if (order === 'asc') { + return b - a; + } + return a - b; // desc + } +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price' +}]; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js b/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js new file mode 100644 index 0000000..255414b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js @@ -0,0 +1,44 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price' +}]; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 16c3bae..8e40fcf 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -31,6 +31,10 @@ import HeaderColumnClassTable from 'examples/header-columns/column-class-table'; import HeaderColumnStyleTable from 'examples/header-columns/column-style-table'; import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; +// table sort +import EnableSortTable from 'examples/sort/enable-sort-table'; +import CustomSortTable from 'examples/sort/custom-sort-table'; + // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/tomorrow.min.css'; @@ -69,3 +73,7 @@ storiesOf('Work on Header Columns', module) .add('Customize Column Class', () => ) .add('Customize Column Style', () => ) .add('Customize Column HTML attribute', () => ); + +storiesOf('Sort Table', module) + .add('Enable Sort', () => ) + .add('Custom Sort Fuction', () => ); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index f60f519..5acfb2f 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -1,3 +1,4 @@ +/* eslint arrow-body-style: 0 */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import cs from 'classnames'; @@ -13,11 +14,15 @@ class BootstrapTable extends PropsBaseResolver(Component) { this.validateProps(); const { store } = this.props; this.store = !store ? new Store(props) : store; + + this.handleSort = this.handleSort.bind(this); + this.state = { + data: this.store.get() + }; } render() { const { - data, columns, keyField, striped, @@ -37,9 +42,14 @@ class BootstrapTable extends PropsBaseResolver(Component) { return (
{ content }{ content } + { children }
-
+
); } + + handleSort(column) { + this.store.sortBy(column); + + this.setState(() => { + return { + data: this.store.get() + }; + }); + } } BootstrapTable.propTypes = { diff --git a/packages/react-bootstrap-table2/src/const.js b/packages/react-bootstrap-table2/src/const.js new file mode 100644 index 0000000..acc75d2 --- /dev/null +++ b/packages/react-bootstrap-table2/src/const.js @@ -0,0 +1,4 @@ +export default { + SORT_ASC: 'asc', + SORT_DESC: 'desc' +}; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index be2e525..d419710 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -1,12 +1,25 @@ +/* eslint react/require-default-props: 0 */ import React from 'react'; +import cs from 'classnames'; import PropTypes from 'prop-types'; +import Const from './const'; +import SortSymbol from './sort-symbol'; +import SortCaret from './sort-caret'; import _ from './utils'; -const HeaderCell = ({ column, index }) => { +const HeaderCell = (props) => { + const { + column, + index, + onSort, + sorting, + sortOrder + } = props; const { text, + sort, hidden, headerTitle, headerAlign, @@ -25,6 +38,7 @@ const HeaderCell = ({ column, index }) => { const cellClasses = _.isFunction(headerClasses) ? headerClasses(column, index) : headerClasses; let cellStyle = {}; + let sortSymbol; if (headerStyle) { cellStyle = _.isFunction(headerStyle) ? headerStyle(column, index) : headerStyle; @@ -46,9 +60,24 @@ const HeaderCell = ({ column, index }) => { if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; + if (sort) { + const customClick = cellAttrs.onClick; + cellAttrs.onClick = (e) => { + onSort(column); + if (_.isFunction(customClick)) customClick(e); + }; + cellAttrs.className = cs(cellAttrs.className, 'sortable'); + + if (sorting) { + sortSymbol = ; + } else { + sortSymbol = ; + } + } + return (
); }; @@ -68,9 +97,14 @@ HeaderCell.propTypes = { headerEvents: PropTypes.object, events: PropTypes.object, headerAlign: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), - align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) + align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + sort: PropTypes.bool, + sortFunc: PropTypes.func }).isRequired, - index: PropTypes.number.isRequired + index: PropTypes.number.isRequired, + onSort: PropTypes.func, + sorting: PropTypes.bool, + sortOrder: PropTypes.oneOf([Const.SORT_ASC, Const.SORT_DESC]) }; export default HeaderCell; diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index eddf6a2..36752f1 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -1,22 +1,44 @@ +/* eslint react/require-default-props: 0 */ import React from 'react'; import PropTypes from 'prop-types'; import HeaderCell from './header-cell'; -const Header = ({ columns }) => ( - - - { - columns.map((column, i) => - ) - } - - -); +const Header = (props) => { + const { + columns, + onSort, + sortField, + sortOrder + } = props; + return ( + + + { + columns.map((column, i) => { + const currSort = column.dataField === sortField; + return ( + ); + }) + } + + + ); +}; Header.propTypes = { - columns: PropTypes.array.isRequired + columns: PropTypes.array.isRequired, + onSort: PropTypes.func, + sortField: PropTypes.string, + sortOrder: PropTypes.string }; export default Header; diff --git a/packages/react-bootstrap-table2/src/sort-caret.js b/packages/react-bootstrap-table2/src/sort-caret.js new file mode 100644 index 0000000..08a918a --- /dev/null +++ b/packages/react-bootstrap-table2/src/sort-caret.js @@ -0,0 +1,21 @@ +import React from 'react'; +import cs from 'classnames'; +import PropTypes from 'prop-types'; + +import Const from './const'; + +const SortCaret = ({ order }) => { + const orderClass = cs('react-bootstrap-table-sort-order', { + dropup: order === Const.SORT_ASC + }); + return ( + + + + ); +}; + +SortCaret.propTypes = { + order: PropTypes.oneOf([Const.SORT_ASC, Const.SORT_DESC]).isRequired +}; +export default SortCaret; diff --git a/packages/react-bootstrap-table2/src/sort-symbol.js b/packages/react-bootstrap-table2/src/sort-symbol.js new file mode 100644 index 0000000..ecaf324 --- /dev/null +++ b/packages/react-bootstrap-table2/src/sort-symbol.js @@ -0,0 +1,13 @@ +import React from 'react'; + +const SortSymbol = () => ( + + + + + + + + ); + +export default SortSymbol; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 5805a43..c44a5ef 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -1,10 +1,31 @@ +import { sort } from './sort'; +import Const from '../const'; + export default class Store { constructor(props) { const { data } = props; this.data = data ? data.slice() : []; + + this.sortOrder = undefined; + this.sortField = undefined; } isEmpty() { return this.data.length === 0; } + + sortBy({ dataField, sortFunc }) { + if (dataField !== this.sortField) { + this.sortOrder = Const.SORT_DESC; + } else { + this.sortOrder = this.sortOrder === Const.SORT_DESC ? Const.SORT_ASC : Const.SORT_DESC; + } + + this.data = sort(dataField, this.data, this.sortOrder, sortFunc); + this.sortField = dataField; + } + + get() { + return this.data; + } } diff --git a/packages/react-bootstrap-table2/src/store/sort.js b/packages/react-bootstrap-table2/src/store/sort.js new file mode 100644 index 0000000..95271b3 --- /dev/null +++ b/packages/react-bootstrap-table2/src/store/sort.js @@ -0,0 +1,40 @@ +/* eslint no-nested-ternary: 0 */ +/* eslint no-lonely-if: 0 */ +/* eslint no-underscore-dangle: 0 */ +import _ from '../utils'; +import Const from '../const'; + +function comparator(a, b) { + let result; + if (typeof b === 'string') { + result = b.localeCompare(a); + } else { + result = a > b ? -1 : ((a < b) ? 1 : 0); + } + return result; +} + +const sort = (dataField, data, order, sortFunc) => { + const _data = [...data]; + _data.sort((a, b) => { + let result; + let valueA = _.get(a, dataField); + let valueB = _.get(b, dataField); + valueA = _.isDefined(valueA) ? valueA : ''; + valueB = _.isDefined(valueB) ? valueB : ''; + + if (sortFunc) { + result = sortFunc(valueA, valueB, order, dataField); + } else { + if (order === Const.SORT_DESC) { + result = comparator(valueA, valueB); + } else { + result = comparator(valueB, valueA); + } + } + return result; + }); + return _data; +}; + +export { sort }; diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index e86be0f..780be47 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -40,9 +40,14 @@ function isEmptyObject(obj) { return true; } +function isDefined(value) { + return typeof value !== 'undefined' && value !== null; +} + export default { get, isFunction, isObject, - isEmptyObject + isEmptyObject, + isDefined }; diff --git a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss index 2737023..3a8a126 100644 --- a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss +++ b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss @@ -1,5 +1,24 @@ .react-bootstrap-table-container { + + th.sortable { + cursor: pointer; + } + + th > .order > .dropdown > .caret { + margin: 10px 0 10px 5px; + color: #cccccc; + } + + th > .order > .dropup > .caret { + margin: 10px 0; + color: #cccccc; + } + + th > .react-bootstrap-table-sort-order > .caret { + margin: 10px 6.5px; + } + td.react-bs-table-no-data { - text-align: center - } + text-align: center; + } } \ No newline at end of file diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 134de2d..408b853 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -2,6 +2,9 @@ import React from 'react'; import sinon from 'sinon'; import { shallow } from 'enzyme'; +import Const from '../src/const'; +import SortCaret from '../src/sort-caret'; +import SortSymbol from '../src/sort-symbol'; import HeaderCell from '../src/header-cell'; describe('HeaderCell', () => { @@ -385,4 +388,75 @@ describe('HeaderCell', () => { }); }); }); + + describe('when column.sort is enable', () => { + let column; + let onSortCallBack; + + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID', + sort: true + }; + onSortCallBack = sinon.stub().withArgs(column); + wrapper = shallow(); + }); + + it('should have sortable class on header cell', () => { + expect(wrapper.hasClass('sortable')).toBe(true); + }); + + it('should have onClick event on header cell', () => { + expect(wrapper.find('th').prop('onClick')).toBeDefined(); + }); + + it('should trigger onSort callback when click on header cell', () => { + wrapper.find('th').simulate('click'); + expect(onSortCallBack.callCount).toBe(1); + }); + + describe('and sorting prop is false', () => { + it('header should render SortSymbol as default', () => { + expect(wrapper.find(SortSymbol).length).toBe(1); + }); + }); + + describe('and sorting prop is true', () => { + [Const.SORT_ASC, Const.SORT_DESC].forEach((order) => { + describe(`and sortOrder is ${order}`, () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render SortCaret correctly', () => { + expect(wrapper.find(SortCaret).length).toBe(1); + expect(wrapper.find(SortCaret).prop('order')).toEqual(order); + }); + }); + }); + }); + + describe('when column.headerEvents prop is defined and have custom onClick', () => { + beforeEach(() => { + column = { + dataField: 'id', + text: 'ID', + sort: true, + headerEvents: { + onClick: sinon.stub() + } + }; + wrapper = shallow( + ); + }); + + it('custom event hook should still be called when triggering sorting', () => { + wrapper.find('th').simulate('click'); + expect(onSortCallBack.callCount).toBe(1); + expect(column.headerEvents.onClick.callCount).toBe(1); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js index 80abaa1..3f4e783 100644 --- a/packages/react-bootstrap-table2/test/header.test.js +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -3,6 +3,7 @@ import { shallow } from 'enzyme'; import HeaderCell from '../src/header-cell'; import Header from '../src/header'; +import Const from '../src/const'; describe('Header', () => { let wrapper; @@ -25,4 +26,21 @@ describe('Header', () => { expect(wrapper.find(HeaderCell).length).toBe(columns.length); }); }); + + describe('header with columns enable sort', () => { + const sortField = columns[1].dataField; + + beforeEach(() => { + wrapper = shallow( +
); + }); + + it('The HeaderCell should receive correct sorting props', () => { + const headerCells = wrapper.find(HeaderCell); + expect(headerCells.length).toBe(columns.length); + expect(headerCells.at(0).prop('sorting')).toBe(false); + expect(headerCells.at(1).prop('sorting')).toBe(true); + expect(headerCells.at(1).prop('sortOrder')).toBe(Const.SORT_ASC); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/sort-caret.test.js b/packages/react-bootstrap-table2/test/sort-caret.test.js new file mode 100644 index 0000000..933525d --- /dev/null +++ b/packages/react-bootstrap-table2/test/sort-caret.test.js @@ -0,0 +1,37 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import Const from '../src/const'; +import SortCaret from '../src/sort-caret'; + +describe('SortCaret', () => { + let wrapper; + + describe(`when order prop is ${Const.SORT_ASC}`, () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render caret correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('span').length).toBe(2); + expect(wrapper.find('.caret').length).toBe(1); + expect(wrapper.find('.dropup').length).toBe(1); + }); + }); + + describe(`when order prop is ${Const.SORT_DESC}`, () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render caret correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('span').length).toBe(2); + expect(wrapper.find('.caret').length).toBe(1); + expect(wrapper.find('.dropup').length).toBe(0); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/sort-symbol.test.js b/packages/react-bootstrap-table2/test/sort-symbol.test.js new file mode 100644 index 0000000..d13346c --- /dev/null +++ b/packages/react-bootstrap-table2/test/sort-symbol.test.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import SortSymbol from '../src/sort-symbol'; + +describe('SortSymbol', () => { + let wrapper; + beforeEach(() => { + wrapper = shallow( + ); + }); + it('should render sort symbol correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('.order').length).toBe(1); + expect(wrapper.find('.caret').length).toBe(2); + expect(wrapper.find('.dropdown').length).toBe(1); + expect(wrapper.find('.dropup').length).toBe(1); + }); +}); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js new file mode 100644 index 0000000..e633071 --- /dev/null +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -0,0 +1,75 @@ +import Base from '../../src/store/base'; +import Const from '../../src/const'; + +describe('Store Base', () => { + let store; + const data = [ + { id: 3, name: 'name2' }, + { id: 2, name: 'ABC' }, + { id: 4, name: '123tester' }, + { id: 1, name: '!@#' } + ]; + + beforeEach(() => { + store = new Base({ data }); + }); + + describe('initialize', () => { + it('should have correct initialize data', () => { + expect(store.sortOrder).toBeUndefined(); + expect(store.sortField).toBeUndefined(); + expect(store.data.length).toEqual(data.length); + }); + }); + + describe('isEmpty', () => { + beforeEach(() => { + store = new Base({ data: [] }); + }); + + it('should have correct initialize data', () => { + expect(store.isEmpty()).toBeTruthy(); + }); + }); + + describe('sortBy', () => { + let dataField; + + beforeEach(() => { + dataField = 'name'; + }); + + it('should change sortField by dataField param', () => { + store.sortBy({ dataField }); + expect(store.sortField).toEqual(dataField); + }); + + it('should change sortOrder correctly when sortBy same dataField', () => { + store.sortBy({ dataField }); + expect(store.sortOrder).toEqual(Const.SORT_DESC); + store.sortBy({ dataField }); + expect(store.sortOrder).toEqual(Const.SORT_ASC); + }); + + it('should change sortOrder correctly when sortBy different dataField', () => { + store.sortBy({ dataField }); + expect(store.sortOrder).toEqual(Const.SORT_DESC); + + dataField = 'id'; + store.sortBy({ dataField }); + expect(store.sortOrder).toEqual(Const.SORT_DESC); + + dataField = 'name'; + store.sortBy({ dataField }); + expect(store.sortOrder).toEqual(Const.SORT_DESC); + }); + + it('should have correct result after sortBy', () => { + store.sortBy({ dataField }); + const result = store.data.map(e => e[dataField]).sort((a, b) => b - a); + store.get().forEach((e, i) => { + expect(e[dataField]).toEqual(result[i]); + }); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/store/sort.test.js b/packages/react-bootstrap-table2/test/store/sort.test.js new file mode 100644 index 0000000..1eb42ff --- /dev/null +++ b/packages/react-bootstrap-table2/test/store/sort.test.js @@ -0,0 +1,39 @@ +import sinon from 'sinon'; + +import { sort } from '../../src/store/sort'; +import Const from '../../src/const'; + +describe('Sort Function', () => { + const data = [ + { id: 3, name: 'name2' }, + { id: 2, name: 'ABC' }, + { id: 4, name: '123tester' }, + { id: 1, name: '!@#' } + ]; + + it('should sort array with ASC order correctly', () => { + const result = sort('id', data, Const.SORT_ASC); + expect(result.length).toEqual(data.length); + + const sortedArray = data.map(e => e.id).sort((a, b) => a - b); + sortedArray.forEach((e, i) => { + expect(e).toEqual(result[i].id); + }); + }); + + it('should sort array with DESC order correctly', () => { + const result = sort('id', data, Const.SORT_DESC); + expect(result.length).toEqual(data.length); + + const sortedArray = data.map(e => e.id).sort((a, b) => b - a); + sortedArray.forEach((e, i) => { + expect(e).toEqual(result[i].id); + }); + }); + + it('should call custom sort function when sortFunc given', () => { + const sortFunc = sinon.stub().returns(1); + sort('id', data, Const.SORT_DESC, sortFunc); + expect(sortFunc.callCount).toBe(6); + }); +}); From f6eea2f6595d258f6ea5f0090802e18e75f78525 Mon Sep 17 00:00:00 2001 From: Allen Date: Wed, 20 Sep 2017 11:18:57 -0500 Subject: [PATCH 029/136] fix #60 * implement cell editor * keyField shouldn't be editable * add additional check to avoid some bugs * add jsdom for enzyme mount * add some helpers class for enzyme mounting * add testing for cellEdit * use npm instead * add test for TableResolver * table-layout: fixed; to fix the columns width when content of td changed * add stories for cell edit * add document for cellEdit --- .travis.yml | 11 +- docs/README.md | 39 +++- docs/columns.md | 9 +- package.json | 4 +- .../examples/cell-edit/blur-to-save-table.js | 54 ++++++ .../cell-edit/cell-edit-hooks-table.js | 58 ++++++ .../examples/cell-edit/click-to-edit-table.js | 52 +++++ .../cell-edit/column-level-editable-table.js | 57 ++++++ .../cell-edit/dbclick-to-edit-table.js | 52 +++++ .../cell-edit/row-level-editable-table.js | 57 ++++++ .../stories/index.js | 16 ++ packages/react-bootstrap-table2/src/body.js | 26 ++- .../src/bootstrap-table.js | 61 +++++- packages/react-bootstrap-table2/src/cell.js | 142 +++++++++----- packages/react-bootstrap-table2/src/const.js | 5 +- .../src/editing-cell.js | 66 +++++++ .../src/props-resolver/index.js | 25 +++ packages/react-bootstrap-table2/src/row.js | 75 ++++++-- .../src/stateful-layer.js | 11 +- .../react-bootstrap-table2/src/store/base.js | 13 +- .../react-bootstrap-table2/src/text-editor.js | 21 ++ packages/react-bootstrap-table2/src/utils.js | 29 ++- .../style/react-bootstrap-table.scss | 4 + .../react-bootstrap-table2/test/body.test.js | 32 ++++ .../test/bootstrap-table.test.js | 40 ++++ .../react-bootstrap-table2/test/cell.test.js | 95 +++++++++ .../test/editing-cell.test.js | 93 +++++++++ .../test/props-resolver/index.test.js | 146 ++++++++++++++ .../react-bootstrap-table2/test/row.test.js | 181 +++++++++++++++++- .../test/store/base.test.js | 51 ++++- .../test/test-helpers/mock-component.js | 15 ++ .../test/test-helpers/table-wrapper.js | 11 ++ .../test/text-editor.test.js | 24 +++ .../react-bootstrap-table2/test/utils.test.js | 36 ++++ 34 files changed, 1503 insertions(+), 108 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/blur-to-save-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js create mode 100644 packages/react-bootstrap-table2/src/editing-cell.js create mode 100644 packages/react-bootstrap-table2/src/text-editor.js create mode 100644 packages/react-bootstrap-table2/test/editing-cell.test.js create mode 100644 packages/react-bootstrap-table2/test/props-resolver/index.test.js create mode 100644 packages/react-bootstrap-table2/test/test-helpers/mock-component.js create mode 100644 packages/react-bootstrap-table2/test/test-helpers/table-wrapper.js create mode 100644 packages/react-bootstrap-table2/test/text-editor.test.js diff --git a/.travis.yml b/.travis.yml index bfcdb77..086f638 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ node_js: - "6" cache: - yarn: true + directories: + - node_modules branches: only: @@ -13,8 +14,8 @@ branches: # - master - develop -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s - - export PATH="$HOME/.yarn/bin:$PATH" +# before_install: +# - curl -o- -L https://yarnpkg.com/install.sh | bash -s +# - export PATH="$HOME/.yarn/bin:$PATH" -install: yarn --frozen-lockfile +# install: yarn --frozen-lockfile diff --git a/docs/README.md b/docs/README.md index fd43f93..19330f8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,6 +2,18 @@ ## Props on BootstrapTable +#### Required +* [keyField (**required**)](#keyField) +* [data (**required**)](#data) +* [columns (**required**)](#columns) + +#### Optional +* [striped](#striped) +* [bordered](#bordered) +* [hover](#hover) +* [condensed](#condensed) +* [cellEdit](#cellEdit) + ### keyField(**required**) - [String] `keyField` is a prop to tell `react-bootstrap-table2` which column is unigue key. @@ -18,4 +30,29 @@ Same as `.table-bordered` class for adding borders on all sides of the table and ### hover - [Bool] Same as `.table-hover` class for adding a hover effect (grey background color) on table rows ### condensed - [Bool] -Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half \ No newline at end of file +Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half + +### cellEdit - [Bool] +Assign a valid `cellEdit` object can enable the cell editing on the cell. The default usage is click/dbclick to trigger cell editing and press `ENTER` to save cell or press `ESC` to cancel editing. + +> Note: The `keyField` column can't be edited + +Following is a `cellEdit` object: +```js +{ + mode: 'click', + blurToSave: true, + onEditing: (rowId, dataField, newValue) => { ... }, + beforeSaveCell: (oldValue, newValue, row, column) => { ... }, + afterSaveCell: (oldValue, newValue, row, column) => { ... }, + nonEditableRows: () => { ... } +} +``` +#### cellEdit.mode - [String] +`cellEdit.mode` possible value is `click` and `dbclick`. It's required value that tell `react-bootstrap-table2` how to trigger the cell editing. + +#### cellEdit.blurToSave - [Bool] +Default is `false`, enable it will be able to save the cell automatically when blur from the cell editor. + +#### cellEdit.nonEditableRows - [Function] +`cellEdit.nonEditableRows` accept a callback function and expect return an array which used to restrict all the columns of some rows as non-editable. So the each item in return array should be rowkey(`keyField`) diff --git a/docs/columns.md b/docs/columns.md index a517532..8ac781e 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -25,6 +25,7 @@ Available properties in a column object: * [headerEvents](#headerEvents) * [headerAlign](#headerAlign) * [headerAttrs](#headerAttrs) +* [editable](#editable) Following is a most simplest and basic usage: @@ -411,5 +412,9 @@ Additionally, customize the header attributes by a `2-arguments` callback functi A new `Object` will be the result of element headerAttrs. -#### * Caution -Same as [column.attrs](#attrs), it has lower priority and will be overwrited when other props related to HTML attributes were given. +> Caution: +> Same as [column.attrs](#attrs), it has lower priority and will be +> overwrited when other props related to HTML attributes were given. + +## column.editable - [Bool] +`column.editable` default is true, means every column is editable if you configure [`cellEdit`](./README.md#cellEdit). But you can disable some columns editable via setting `false`. \ No newline at end of file diff --git a/package.json b/package.json index dd2cd5b..4e1840d 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,8 @@ "eslint-plugin-react": "^7.2.1", "html-webpack-plugin": "^2.30.1", "jest": "^20.0.4", + "jsdom": "^11.2.0", + "jsdom-global": "^3.0.2", "lerna": "^2.0.0", "node-sass": "^4.5.3", "react-test-renderer": "^15.6.1", @@ -71,7 +73,7 @@ ], "testEnvironment": "node", "testMatch": [ - "**/test/**/*.js" + "**/test/**/*.test.js" ] } } diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/blur-to-save-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/blur-to-save-table.js new file mode 100644 index 0000000..9452c8f --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/blur-to-save-table.js @@ -0,0 +1,54 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; + + +`; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js new file mode 100644 index 0000000..0238ec5 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js @@ -0,0 +1,58 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-console: 0 */ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'click', + beforeSaveCell: (oldValue, newValue, row, column) => { console.log('Before Saving Cell!!'); }, + afterSaveCell: (oldValue, newValue, row, column) => { console.log('After Saving Cell!!'); } +}; + + +`; + +const cellEdit = { + mode: 'click', + beforeSaveCell: (oldValue, newValue, row, column) => { console.log('Before Saving Cell!!'); }, + afterSaveCell: (oldValue, newValue, row, column) => { console.log('After Saving Cell!!'); } +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js new file mode 100644 index 0000000..0030936 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js @@ -0,0 +1,52 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'click' +}; + + +`; + +const cellEdit = { + mode: 'click' +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js new file mode 100644 index 0000000..b777486 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js @@ -0,0 +1,57 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + editable: false +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' + // Product Name column can't be edit anymore + editable: false +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; + + +`; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js new file mode 100644 index 0000000..37a1061 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js @@ -0,0 +1,52 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'dbclick' +}; + + +`; + +const cellEdit = { + mode: 'dbclick' +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js new file mode 100644 index 0000000..4033f75 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js @@ -0,0 +1,57 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const cellEdit = { + mode: 'click', + blurToSave: true, + // Product ID: 0, 3 will be non-editable + nonEditableRows: () => [0, 3] +}; + + +`; + +const cellEdit = { + mode: 'click', + blurToSave: true, + nonEditableRows: () => [0, 3] +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 8e40fcf..9ad48f2 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -35,6 +35,14 @@ import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; import EnableSortTable from 'examples/sort/enable-sort-table'; import CustomSortTable from 'examples/sort/custom-sort-table'; +// cell editing +import ClickToEditTable from 'examples/cell-edit/click-to-edit-table'; +import DoubleClickToEditTable from 'examples/cell-edit/dbclick-to-edit-table'; +import BlurToSaveTable from 'examples/cell-edit/blur-to-save-table'; +import RowLevelEditableTable from 'examples/cell-edit/row-level-editable-table'; +import ColumnLevelEditableTable from 'examples/cell-edit/column-level-editable-table'; +import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; + // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/tomorrow.min.css'; @@ -77,3 +85,11 @@ storiesOf('Work on Header Columns', module) storiesOf('Sort Table', module) .add('Enable Sort', () => ) .add('Custom Sort Fuction', () => ); + +storiesOf('Cell Editing', module) + .add('Click to Edit', () => ) + .add('DoubleClick to Edit', () => ) + .add('Blur to Save Cell', () => ) + .add('Row Level Editable', () => ) + .add('Column Level Editable', () => ) + .add('Rich Hook Functions', () => ); diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index a69af71..76cbd22 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -13,7 +13,8 @@ const Body = (props) => { keyField, isEmpty, noDataIndication, - visibleColumnSize + visibleColumnSize, + cellEdit } = props; let content; @@ -22,14 +23,21 @@ const Body = (props) => { const indication = _.isFunction(noDataIndication) ? noDataIndication() : noDataIndication; content = ; } else { - content = data.map((row, index) => ( - - )); + content = data.map((row, index) => { + const key = _.get(row, keyField); + const editable = !(cellEdit && cellEdit.nonEditableRows.indexOf(key) > -1); + return ( + + ); + }); } return ( diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 5acfb2f..d7ea363 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -7,6 +7,8 @@ import Header from './header'; import Body from './body'; import Store from './store/base'; import PropsBaseResolver from './props-resolver'; +import Const from './const'; +import _ from './utils'; class BootstrapTable extends PropsBaseResolver(Component) { constructor(props) { @@ -16,8 +18,15 @@ class BootstrapTable extends PropsBaseResolver(Component) { this.store = !store ? new Store(props) : store; this.handleSort = this.handleSort.bind(this); + this.startEditing = this.startEditing.bind(this); + this.escapeEditing = this.escapeEditing.bind(this); + this.completeEditing = this.completeEditing.bind(this); this.state = { - data: this.store.get() + data: this.store.get(), + currEditCell: { + ridx: null, + cidx: null + } }; } @@ -39,6 +48,12 @@ class BootstrapTable extends PropsBaseResolver(Component) { 'table-condensed': condensed }); + const cellEditInfo = this.resolveCellEditProps({ + onStart: this.startEditing, + onEscape: this.escapeEditing, + onComplete: this.completeEditing + }); + return (
- { children } + { children }{ sortSymbol }
@@ -55,6 +70,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { isEmpty={ this.isEmpty() } visibleColumnSize={ this.visibleColumnSize() } noDataIndication={ noDataIndication } + cellEdit={ cellEditInfo } />
@@ -70,6 +86,39 @@ class BootstrapTable extends PropsBaseResolver(Component) { }; }); } + + completeEditing(row, column, newValue) { + const { cellEdit, keyField } = this.props; + const { beforeSaveCell, onEditing, afterSaveCell } = cellEdit; + const oldValue = _.get(row, column.dataField); + const rowId = _.get(row, keyField); + if (_.isFunction(beforeSaveCell)) beforeSaveCell(oldValue, newValue, row, column); + onEditing(rowId, column.dataField, newValue); + if (_.isFunction(afterSaveCell)) afterSaveCell(oldValue, newValue, row, column); + + this.setState(() => { + return { + data: this.store.get(), + currEditCell: { ridx: null, cidx: null } + }; + }); + } + + startEditing(ridx, cidx) { + this.setState(() => { + return { + currEditCell: { ridx, cidx } + }; + }); + } + + escapeEditing() { + this.setState(() => { + return { + currEditCell: { ridx: null, cidx: null } + }; + }); + } } BootstrapTable.propTypes = { @@ -81,7 +130,15 @@ BootstrapTable.propTypes = { striped: PropTypes.bool, bordered: PropTypes.bool, hover: PropTypes.bool, - condensed: PropTypes.bool + condensed: PropTypes.bool, + cellEdit: PropTypes.shape({ + mode: PropTypes.oneOf([Const.CLICK_TO_CELL_EDIT, Const.DBCLICK_TO_CELL_EDIT]).isRequired, + onEditing: PropTypes.func.isRequired, + blurToSave: PropTypes.bool, + beforeSaveCell: PropTypes.func, + afterSaveCell: PropTypes.func, + nonEditableRows: PropTypes.func + }) }; BootstrapTable.defaultProps = { diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index 2126c93..e4431e6 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -1,63 +1,103 @@ -import React from 'react'; +/* eslint react/prop-types: 0 */ +import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import Const from './const'; import _ from './utils'; -const Cell = ({ row, rowIndex, column, columnIndex }) => { - const { - dataField, - hidden, - formatter, - formatExtraData, - style, - classes, - title, - events, - align, - attrs - } = column; - let cellTitle; - let cellStyle = {}; - let content = _.get(row, dataField); - - const cellAttrs = { - ..._.isFunction(attrs) ? attrs(content, row, rowIndex, columnIndex) : attrs, - ...events - }; - - const cellClasses = _.isFunction(classes) - ? classes(content, row, rowIndex, columnIndex) - : classes; - - if (style) { - cellStyle = _.isFunction(style) ? style(content, row, rowIndex, columnIndex) : style; +class Cell extends Component { + constructor(props) { + super(props); + this.handleEditingCell = this.handleEditingCell.bind(this); } - if (title) { - cellTitle = _.isFunction(title) ? title(content, row, rowIndex, columnIndex) : content; - cellAttrs.title = cellTitle; + handleEditingCell(e) { + const { editMode, column, onStart, rowIndex, columnIndex } = this.props; + const { events } = column; + if (events) { + if (editMode === Const.CLICK_TO_CELL_EDIT) { + const customClick = events.onClick; + if (_.isFunction(customClick)) customClick(e); + } else { + const customDbClick = events.onDoubleClick; + if (_.isFunction(customDbClick)) customDbClick(e); + } + } + onStart(rowIndex, columnIndex); } - if (formatter) { - content = column.formatter(content, row, rowIndex, formatExtraData); + render() { + const { + row, + rowIndex, + column, + columnIndex, + editMode, + editable + } = this.props; + const { + dataField, + hidden, + formatter, + formatExtraData, + style, + classes, + title, + events, + align, + attrs + } = column; + let cellTitle; + let cellStyle = {}; + let content = _.get(row, dataField); + + const cellAttrs = { + ..._.isFunction(attrs) ? attrs(content, row, rowIndex, columnIndex) : attrs, + ...events + }; + + const cellClasses = _.isFunction(classes) + ? classes(content, row, rowIndex, columnIndex) + : classes; + + if (style) { + cellStyle = _.isFunction(style) ? style(content, row, rowIndex, columnIndex) : style; + } + + if (title) { + cellTitle = _.isFunction(title) ? title(content, row, rowIndex, columnIndex) : content; + cellAttrs.title = cellTitle; + } + + if (formatter) { + content = column.formatter(content, row, rowIndex, formatExtraData); + } + + if (align) { + cellStyle.textAlign = + _.isFunction(align) ? align(content, row, rowIndex, columnIndex) : align; + } + + if (hidden) { + cellStyle.display = 'none'; + } + + if (cellClasses) cellAttrs.className = cellClasses; + + if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; + + if (editable && editMode !== Const.UNABLE_TO_CELL_EDIT) { + if (editMode === Const.CLICK_TO_CELL_EDIT) { // click to edit + cellAttrs.onClick = this.handleEditingCell; + } else { // dbclick to edit + cellAttrs.onDoubleClick = this.handleEditingCell; + } + } + return ( + { content } + ); } - - if (align) { - cellStyle.textAlign = _.isFunction(align) ? align(content, row, rowIndex, columnIndex) : align; - } - - if (hidden) { - cellStyle.display = 'none'; - } - - if (cellClasses) cellAttrs.className = cellClasses; - - if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; - - return ( - { content } - ); -}; +} Cell.propTypes = { row: PropTypes.object.isRequired, diff --git a/packages/react-bootstrap-table2/src/const.js b/packages/react-bootstrap-table2/src/const.js index acc75d2..8a812ee 100644 --- a/packages/react-bootstrap-table2/src/const.js +++ b/packages/react-bootstrap-table2/src/const.js @@ -1,4 +1,7 @@ export default { SORT_ASC: 'asc', - SORT_DESC: 'desc' + SORT_DESC: 'desc', + UNABLE_TO_CELL_EDIT: 'none', + CLICK_TO_CELL_EDIT: 'click', + DBCLICK_TO_CELL_EDIT: 'dbclick' }; diff --git a/packages/react-bootstrap-table2/src/editing-cell.js b/packages/react-bootstrap-table2/src/editing-cell.js new file mode 100644 index 0000000..f32e1ad --- /dev/null +++ b/packages/react-bootstrap-table2/src/editing-cell.js @@ -0,0 +1,66 @@ +/* eslint react/prop-types: 0 */ +/* eslint no-return-assign: 0 */ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +import _ from './utils'; +import TextEditor from './text-editor'; + +class EditingCell extends Component { + constructor(props) { + super(props); + this.handleBlur = this.handleBlur.bind(this); + this.handleKeyDown = this.handleKeyDown.bind(this); + } + + handleBlur() { + const { onEscape, onComplete, blurToSave, row, column } = this.props; + if (blurToSave) { + const value = this.editor.text.value; + if (!_.isDefined(value)) { + // TODO: for other custom or embed editor + } + onComplete(row, column, value); + } else { + onEscape(); + } + } + + handleKeyDown(e) { + const { onEscape, onComplete, row, column } = this.props; + if (e.keyCode === 27) { // ESC + onEscape(); + } else if (e.keyCode === 13) { // ENTER + const value = e.currentTarget.value; + if (!_.isDefined(value)) { + // TODO: for other custom or embed editor + } + onComplete(row, column, value); + } + } + + render() { + const { row, column } = this.props; + const { dataField } = column; + + const value = _.get(row, dataField); + const editorAttrs = { + onKeyDown: this.handleKeyDown, + onBlur: this.handleBlur + }; + return ( + + this.editor = node } defaultValue={ value } { ...editorAttrs } /> + + ); + } +} + +EditingCell.propTypes = { + row: PropTypes.object.isRequired, + column: PropTypes.object.isRequired, + onComplete: PropTypes.func.isRequired, + onEscape: PropTypes.func.isRequired +}; + +export default EditingCell; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index 627f796..d7ea8af 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -1,4 +1,6 @@ import ColumnResolver from './column-resolver'; +import Const from '../const'; +import _ from '../utils'; export default ExtendBase => class TableResolver extends ColumnResolver(ExtendBase) { @@ -15,4 +17,27 @@ export default ExtendBase => isEmpty() { return this.props.data.length === 0; } + + resolveCellEditProps(options) { + const { cellEdit } = this.props; + const { currEditCell } = this.state; + const nonEditableRows = + (cellEdit && _.isFunction(cellEdit.nonEditableRows)) ? cellEdit.nonEditableRows() : []; + const cellEditInfo = { + ...currEditCell, + nonEditableRows + }; + + if (_.isDefined(cellEdit)) { + return { + ...cellEdit, + ...cellEditInfo, + ...options + }; + } + return { + mode: Const.UNABLE_TO_CELL_EDIT, + ...cellEditInfo + }; + } }; diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 842127c..c0e06b2 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -1,25 +1,64 @@ +/* eslint react/prop-types: 0 */ import React from 'react'; import PropTypes from 'prop-types'; import _ from './utils'; import Cell from './cell'; +import EditingCell from './editing-cell'; -const Row = ({ row, rowIndex, columns }) => ( - - { - columns.map((column, index) => - ( - - )) - } - -); +const Row = (props) => { + const { + row, + columns, + keyField, + rowIndex, + cellEdit, + editable: editableRow + } = props; + const { + ridx: editingRowIdx, + cidx: editingColIdx, + mode, + onStart, + onEscape, + onComplete, + blurToSave + } = cellEdit; + return ( + + { + columns.map((column, index) => { + let editable = _.isDefined(column.editable) ? column.editable : true; + if (column.dataField === keyField || !editableRow) editable = false; + if (rowIndex === editingRowIdx && index === editingColIdx) { + return ( + + ); + } + return ( + + ); + }) + } + + ); +}; Row.propTypes = { row: PropTypes.object.isRequired, @@ -27,4 +66,8 @@ Row.propTypes = { columns: PropTypes.array.isRequired }; +Row.defaultProps = { + editable: true +}; + export default Row; diff --git a/packages/react-bootstrap-table2/src/stateful-layer.js b/packages/react-bootstrap-table2/src/stateful-layer.js index ba0ad9d..c6a0133 100644 --- a/packages/react-bootstrap-table2/src/stateful-layer.js +++ b/packages/react-bootstrap-table2/src/stateful-layer.js @@ -7,11 +7,20 @@ const withStateful = (Base) => { constructor(props) { super(props); this.store = new Store(props); + this.edit = this.edit.bind(this); + } + + edit(rowId, dataField, newValue) { + this.store.edit(rowId, dataField, newValue); } render() { const { props } = this; - return ; + const newProps = { ...props }; + if (newProps.cellEdit && !newProps.cellEdit.onEditing) { + newProps.cellEdit.onEditing = this.edit; + } + return ; } } return StatefulComponent; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index c44a5ef..2c92725 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -1,9 +1,11 @@ import { sort } from './sort'; import Const from '../const'; +import _ from '../utils'; export default class Store { constructor(props) { - const { data } = props; + const { data, keyField } = props; + this.keyField = keyField; this.data = data ? data.slice() : []; this.sortOrder = undefined; @@ -25,7 +27,16 @@ export default class Store { this.sortField = dataField; } + edit(rowId, dataField, newValue) { + const row = this.getRowByRowId(rowId); + if (row) _.set(row, dataField, newValue); + } + get() { return this.data; } + + getRowByRowId(rowId) { + return this.get().find(row => _.get(row, this.keyField) === rowId); + } } diff --git a/packages/react-bootstrap-table2/src/text-editor.js b/packages/react-bootstrap-table2/src/text-editor.js new file mode 100644 index 0000000..06c9cfe --- /dev/null +++ b/packages/react-bootstrap-table2/src/text-editor.js @@ -0,0 +1,21 @@ +/* eslint no-return-assign: 0 */ +import React, { Component } from 'react'; + +class TextEditor extends Component { + componentDidMount() { + this.text.focus(); + } + + render() { + return ( + this.text = node } + type="text" + className="form-control editor edit-text" + { ...this.props } + /> + ); + } +} + +export default TextEditor; diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index 780be47..bc4febf 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -1,11 +1,16 @@ /* eslint no-empty: 0 */ +/* eslint no-param-reassign: 0 */ -function get(target, field) { - const pathArray = [field] +function splitNested(str) { + return [str] .join('.') .replace(/\[/g, '.') .replace(/\]/g, '') .split('.'); +} + +function get(target, field) { + const pathArray = splitNested(field); let result; try { result = pathArray.reduce((curr, path) => curr[path], target); @@ -13,6 +18,25 @@ function get(target, field) { return result; } +function set(target, field, value, safe = false) { + const pathArray = splitNested(field); + let level = 0; + pathArray.reduce((a, b) => { + level += 1; + if (typeof a[b] === 'undefined') { + if (!safe) throw new Error(`${a}.${b} is undefined`); + a[b] = {}; + return a[b]; + } + + if (level === pathArray.length) { + a[b] = value; + return value; + } + return a[b]; + }, target); +} + function isFunction(obj) { return obj && (typeof obj === 'function'); } @@ -46,6 +70,7 @@ function isDefined(value) { export default { get, + set, isFunction, isObject, isEmptyObject, diff --git a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss index 3a8a126..91cc609 100644 --- a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss +++ b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss @@ -1,5 +1,9 @@ .react-bootstrap-table-container { + table { + table-layout: fixed; + } + th.sortable { cursor: pointer; } diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index e1bb741..54ba506 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -4,6 +4,7 @@ import { shallow } from 'enzyme'; import Body from '../src/body'; import Row from '../src/row'; +import Const from '../src/const'; import RowSection from '../src/row-section'; describe('Body', () => { @@ -111,4 +112,35 @@ describe('Body', () => { }); }); }); + + describe('when cellEdit.nonEditableRows props is defined', () => { + const nonEditableRows = [data[1].id]; + const keyField = 'id'; + const cellEdit = { + mode: Const.CLICK_TO_CELL_EDIT, + nonEditableRows + }; + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render Row component with correct editable prop', () => { + expect(wrapper.length).toBe(1); + const rows = wrapper.find(Row); + for (let i = 0; i < rows.length; i += 1) { + if (nonEditableRows.indexOf(rows.get(i).props.row[keyField]) > -1) { + expect(rows.get(i).props.editable).toBeFalsy(); + } else { + expect(rows.get(i).props.editable).toBeTruthy(); + } + } + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index c712b72..a475549 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -1,9 +1,11 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; import Header from '../src/header'; import Body from '../src/body'; import BootstrapTable from '../src/bootstrap-table'; +import Const from '../src/const'; describe('BootstrapTable', () => { let wrapper; @@ -36,6 +38,12 @@ describe('BootstrapTable', () => { expect(wrapper.find('.react-bootstrap-table-container').length).toBe(1); }); + it('should have correct default state', () => { + expect(wrapper.state().currEditCell).toBeDefined(); + expect(wrapper.state().currEditCell.ridx).toBeNull(); + expect(wrapper.state().currEditCell.cidx).toBeNull(); + }); + it('should have table-bordered class as default', () => { expect(wrapper.find('table.table-bordered').length).toBe(1); }); @@ -80,4 +88,36 @@ describe('BootstrapTable', () => { expect(wrapper.find('table.table-condensed').length).toBe(0); }); }); + + describe('when cellEdit props is defined', () => { + const nonEditableRows = [data[1].id]; + const cellEdit = { + mode: Const.CLICK_TO_CELL_EDIT, + onEditing: sinon.stub(), + nonEditableRows: () => nonEditableRows + }; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should resolve correct cellEdit object to Body component', () => { + const body = wrapper.find(Body); + expect(body.length).toBe(1); + expect(body.props().cellEdit.nonEditableRows).toEqual(nonEditableRows); + expect(body.props().cellEdit.ridx).toEqual(wrapper.state().currEditCell.ridx); + expect(body.props().cellEdit.cidx).toEqual(wrapper.state().currEditCell.cidx); + expect(body.props().cellEdit.onStart).toBeDefined(); + expect(body.props().cellEdit.onEscape).toBeDefined(); + expect(body.props().cellEdit.onComplete).toBeDefined(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js index 21e7400..49d9458 100644 --- a/packages/react-bootstrap-table2/test/cell.test.js +++ b/packages/react-bootstrap-table2/test/cell.test.js @@ -2,6 +2,7 @@ import React from 'react'; import sinon from 'sinon'; import { shallow } from 'enzyme'; +import Const from '../src/const'; import Cell from '../src/cell'; describe('Cell', () => { @@ -447,4 +448,98 @@ describe('Cell', () => { }); }); }); + + describe('when editable prop is true', () => { + let onStartCallBack; + const rowIndex = 1; + const columnIndex = 1; + const column = { + dataField: 'id', + text: 'ID' + }; + + beforeEach(() => { + onStartCallBack = sinon.stub().withArgs(rowIndex, columnIndex); + }); + + describe(`and editMode is ${Const.CLICK_TO_CELL_EDIT}`, () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render onClick attribute', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('onClick')).toBeDefined(); + }); + + it('should call onStart correctly when clicking cell', () => { + wrapper.find('td').simulate('click'); + expect(onStartCallBack.callCount).toBe(1); + expect(onStartCallBack.calledWith(rowIndex, columnIndex)).toBe(true); + }); + + describe('if when column.events.onClick prop is defined', () => { + beforeEach(() => { + column.events = { + onClick: sinon.stub() + }; + }); + it('should calling custom onClick callback also', () => { + wrapper.find('td').simulate('click'); + expect(onStartCallBack.callCount).toBe(1); + expect(column.events.onClick.callCount).toBe(1); + }); + }); + }); + + describe(`and editMode is ${Const.DBCLICK_TO_CELL_EDIT}`, () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render onDoubleClick attribute', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('onDoubleClick')).toBeDefined(); + }); + + it('should call onStart correctly when double clicking cell', () => { + wrapper.find('td').simulate('doubleclick'); + expect(onStartCallBack.callCount).toBe(1); + expect(onStartCallBack.calledWith(rowIndex, columnIndex)).toBe(true); + }); + + describe('if when column.events.onDoubleClick prop is defined', () => { + beforeEach(() => { + column.events = { + onDoubleClick: sinon.stub() + }; + }); + it('should calling custom onDoubleClick callback also', () => { + wrapper.find('td').simulate('doubleclick'); + expect(onStartCallBack.callCount).toBe(1); + expect(column.events.onDoubleClick.callCount).toBe(1); + }); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/editing-cell.test.js b/packages/react-bootstrap-table2/test/editing-cell.test.js new file mode 100644 index 0000000..9bf0f19 --- /dev/null +++ b/packages/react-bootstrap-table2/test/editing-cell.test.js @@ -0,0 +1,93 @@ +import 'jsdom-global/register'; +import React from 'react'; +import sinon from 'sinon'; +import { shallow, mount } from 'enzyme'; + +import { TableRowWrapper } from './test-helpers/table-wrapper'; +import EditingCell from '../src/editing-cell'; +import TextEditor from '../src/text-editor'; + + +describe('EditingCell', () => { + let wrapper; + let onEscape; + let onComplete; + const row = { + id: 1, + name: 'A' + }; + + const column = { + dataField: 'id', + text: 'ID' + }; + + beforeEach(() => { + onComplete = sinon.stub(); + onEscape = sinon.stub(); + wrapper = shallow( + + ); + }); + + it('should render default editor successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').length).toBe(1); + expect(wrapper.find(TextEditor).length).toBe(1); + }); + + it('should render TextEditor with correct props', () => { + const textEditor = wrapper.find(TextEditor); + expect(textEditor.props().defaultValue).toEqual(row[column.dataField]); + expect(textEditor.props().onKeyDown).toBeDefined(); + expect(textEditor.props().onBlur).toBeDefined(); + }); + + it('when press ENTER on TextEditor should call onComplete correctly', () => { + const newValue = 'test'; + const textEditor = wrapper.find(TextEditor); + textEditor.simulate('keyDown', { keyCode: 13, currentTarget: { value: newValue } }); + expect(onComplete.callCount).toBe(1); + expect(onComplete.calledWith(row, column, newValue)).toBe(true); + }); + + it('when press ESC on TextEditor should call onEscape correctly', () => { + const textEditor = wrapper.find(TextEditor); + textEditor.simulate('keyDown', { keyCode: 27 }); + expect(onEscape.callCount).toBe(1); + }); + + it('when blur from TextEditor should call onEscape correctly', () => { + const textEditor = wrapper.find(TextEditor); + textEditor.simulate('blur'); + expect(onEscape.callCount).toBe(1); + }); + + describe('if blurToSave prop is true', () => { + beforeEach(() => { + wrapper = mount( + + + + ); + }); + + it('when blur from TextEditor should call onComplete correctly', () => { + const textEditor = wrapper.find(TextEditor); + textEditor.simulate('blur'); + expect(onComplete.callCount).toBe(1); + expect(onComplete.calledWith(row, column, `${row[column.dataField]}`)).toBe(true); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/props-resolver/index.test.js b/packages/react-bootstrap-table2/test/props-resolver/index.test.js new file mode 100644 index 0000000..d27897a --- /dev/null +++ b/packages/react-bootstrap-table2/test/props-resolver/index.test.js @@ -0,0 +1,146 @@ +import React, { Component } from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import { extendTo } from '../test-helpers/mock-component'; +import baseResolver from '../../src/props-resolver/index'; +import Const from '../../src/const'; + +describe('TableResolver', () => { + const keyField = 'id'; + const columns = [{ + dataField: keyField, + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + const ExtendBase = baseResolver(Component); + const BootstrapTableMock = extendTo(ExtendBase); + let wrapper; + + describe('validateProps', () => { + describe('if keyField is defined and columns is all visible', () => { + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, columns, keyField + }, null); + wrapper = shallow(mockElement); + }); + + it('should not throw any errors', () => { + expect(() => wrapper.instance().validateProps()).not.toThrow(); + }); + }); + + describe('if keyField is not defined on props', () => { + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, columns + }, null); + wrapper = shallow(mockElement); + }); + + it('should throw error', () => { + expect(() => + wrapper.instance().validateProps() + ).toThrow(new Error('Please specify a field as key via keyField')); + }); + }); + + describe('if columns is all unvisible', () => { + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns: [] + }, null); + wrapper = shallow(mockElement); + }); + + it('should throw error', () => { + expect(() => + wrapper.instance().validateProps() + ).toThrow(new Error('No any visible columns detect')); + }); + }); + }); + + describe('resolveCellEditProps', () => { + describe('if cellEdit prop not defined', () => { + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns + }, null); + wrapper = shallow(mockElement); + }); + + it('should resolve a default cellEdit instance', () => { + const cellEdit = wrapper.instance().resolveCellEditProps(); + expect(cellEdit).toBeDefined(); + expect(cellEdit.mode).toEqual(Const.UNABLE_TO_CELL_EDIT); + expect(cellEdit.nonEditableRows.length).toEqual(0); + expect(cellEdit.ridx).toBeNull(); + expect(cellEdit.cidx).toBeNull(); + }); + + it('should resolve a default cellEdit instance even if state.currEditCell changed', () => { + const ridx = 1; + const cidx = 1; + wrapper.setState({ currEditCell: { ridx, cidx } }); + const cellEdit = wrapper.instance().resolveCellEditProps(); + expect(cellEdit).toBeDefined(); + expect(cellEdit.ridx).toEqual(ridx); + expect(cellEdit.cidx).toEqual(cidx); + }); + }); + }); + + describe('if cellEdit prop defined', () => { + const expectNonEditableRows = [1, 2]; + const cellEdit = { + mode: Const.DBCLICK_TO_CELL_EDIT, + onEditing: sinon.stub(), + blurToSave: true, + beforeSaveCell: sinon.stub(), + afterSaveCell: sinon.stub(), + nonEditableRows: sinon.stub().returns(expectNonEditableRows) + }; + + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, cellEdit + }, null); + wrapper = shallow(mockElement); + }); + + it('should resolve a cellEdit correctly', () => { + const cellEditInfo = wrapper.instance().resolveCellEditProps(); + expect(cellEditInfo).toBeDefined(); + expect(cellEditInfo.ridx).toBeNull(); + expect(cellEditInfo.cidx).toBeNull(); + expect(cellEditInfo.mode).toEqual(cellEdit.mode); + expect(cellEditInfo.onEditing).toEqual(cellEdit.onEditing); + expect(cellEditInfo.blurToSave).toEqual(cellEdit.blurToSave); + expect(cellEditInfo.beforeSaveCell).toEqual(cellEdit.beforeSaveCell); + expect(cellEditInfo.afterSaveCell).toEqual(cellEdit.afterSaveCell); + expect(cellEditInfo.nonEditableRows).toEqual(expectNonEditableRows); + }); + + it('should attach options to cellEdit props', () => { + const something = { + test: 1, + cb: sinon.stub() + }; + const cellEditInfo = wrapper.instance().resolveCellEditProps(something); + expect(cellEditInfo).toBeDefined(); + expect(cellEditInfo.test).toEqual(something.test); + expect(cellEditInfo.cb).toEqual(something.cb); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 0b111cc..84e54c3 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -1,27 +1,36 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; import Cell from '../src/cell'; import Row from '../src/row'; +import Const from '../src/const'; +import EditingCell from '../src/editing-cell'; + +const defaultColumns = [{ + dataField: 'id', + text: 'ID' +}, { + dataField: 'name', + text: 'Name' +}, { + dataField: 'price', + text: 'Price' +}]; describe('Row', () => { let wrapper; - const columns = [{ - dataField: 'id', - text: 'ID' - }, { - dataField: 'name', - text: 'Name' - }]; const row = { id: 1, - name: 'A' + name: 'A', + price: 1000 }; describe('simplest row', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should render successfully', () => { @@ -30,4 +39,158 @@ describe('Row', () => { expect(wrapper.find(Cell).length).toBe(Object.keys(row).length); }); }); + + describe('when cellEdit prop is defined', () => { + let columns; + let cellEdit; + const rowIndex = 1; + const keyField = 'id'; + + beforeEach(() => { + columns = defaultColumns; + cellEdit = { + mode: Const.CLICK_TO_CELL_EDIT + }; + wrapper = shallow( + + ); + }); + + afterEach(() => { + columns = undefined; + cellEdit = undefined; + }); + + it('Cell component should receive correct editable props', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + const column = columns[i]; + if (column.dataField === keyField) { + expect(wrapper.find(Cell).get(i).props.editable).toBeFalsy(); + } else { + expect(wrapper.find(Cell).get(i).props.editable).toBeTruthy(); + } + } + }); + + it('Cell component should receive correct editMode props', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + expect(wrapper.find(Cell).get(i).props.editMode).toEqual(cellEdit.mode); + } + }); + + describe('when have column.editable defined false', () => { + const nonEditableColIndex = 1; + beforeEach(() => { + columns[nonEditableColIndex].editable = false; + wrapper = shallow( + + ); + }); + + it('Cell component should receive correct editMode props', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + const column = columns[i]; + if (i === nonEditableColIndex || column.dataField === keyField) { + expect(wrapper.find(Cell).get(i).props.editable).toBeFalsy(); + } else { + expect(wrapper.find(Cell).get(i).props.editable).toBeTruthy(); + } + } + }); + }); + + // Means user defined cellEdit.nonEditableRows + // and some rows will be treated as noneditable by this rules + describe('when editable prop is false', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('All the Cell components should be noneditable', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + expect(wrapper.find(Cell).get(i).props.editable).toBeFalsy(); + } + }); + }); + + // Means a cell now is undering editing + describe('when cellEdit.ridx and cellEdit.cidx is defined', () => { + describe('and cellEdit.ridx is match to current row index', () => { + const editingColIndex = 1; + beforeEach(() => { + cellEdit.ridx = rowIndex; + cellEdit.cidx = editingColIndex; + cellEdit.onComplete = sinon.stub(); + cellEdit.onEscape = sinon.stub(); + wrapper = shallow( + + ); + }); + + it('should render EditingCell correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(EditingCell).length).toBe(1); + expect(wrapper.find('tr').children().at(editingColIndex).type()).toEqual(EditingCell); + }); + }); + + describe('and cellEdit.ridx is not match to current row index', () => { + const editingColIndex = 1; + beforeEach(() => { + cellEdit.ridx = 3; + cellEdit.cidx = editingColIndex; + cellEdit.onComplete = sinon.stub(); + cellEdit.onEscape = sinon.stub(); + wrapper = shallow( + + ); + }); + + it('should not render any EditingCell component', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(EditingCell).length).toBe(0); + expect(wrapper.find(Cell).length).toBe(columns.length); + }); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js index e633071..82e6d6c 100644 --- a/packages/react-bootstrap-table2/test/store/base.test.js +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -3,15 +3,16 @@ import Const from '../../src/const'; describe('Store Base', () => { let store; - const data = [ - { id: 3, name: 'name2' }, - { id: 2, name: 'ABC' }, - { id: 4, name: '123tester' }, - { id: 1, name: '!@#' } - ]; + let data; beforeEach(() => { - store = new Base({ data }); + data = [ + { id: 3, name: 'name2' }, + { id: 2, name: 'ABC' }, + { id: 4, name: '123tester' }, + { id: 1, name: '!@#' } + ]; + store = new Base({ data, keyField: 'id' }); }); describe('initialize', () => { @@ -72,4 +73,40 @@ describe('Store Base', () => { }); }); }); + + describe('getRowByRowId', () => { + it('should return data if specified id existing', () => { + const result = store.getRowByRowId(3); + expect(result).toBeDefined(); + }); + + it('should return undefined if specified id existing', () => { + const result = store.getRowByRowId(88); + expect(result).toBeUndefined(); + }); + }); + + describe('edit', () => { + it('should update a specified field correctly', () => { + const newValue = 'newValue'; + const dataField = 'name'; + const rowId = 2; + store.edit(rowId, dataField, newValue); + + const row = store.data.find(d => d[store.keyField] === rowId); + expect(row[dataField]).toEqual(newValue); + }); + + it('should not throw any error even if rowId is not existing', () => { + expect(() => { + store.edit('123', 'name', 'value'); + }).not.toThrow(); + }); + + it('should throwing error if dataField is not existing', () => { + expect(() => { + store.edit(2, 'non_exist_field', 'value'); + }).toThrow(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/test-helpers/mock-component.js b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js new file mode 100644 index 0000000..9f2d943 --- /dev/null +++ b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js @@ -0,0 +1,15 @@ +export const extendTo = Base => + class MockComponent extends Base { + constructor(props) { + super(props); + this.state = { + data: this.props.data, + currEditCell: { + ridx: null, + cidx: null + } + }; + } + + render() { return null; } + }; diff --git a/packages/react-bootstrap-table2/test/test-helpers/table-wrapper.js b/packages/react-bootstrap-table2/test/test-helpers/table-wrapper.js new file mode 100644 index 0000000..e2decdb --- /dev/null +++ b/packages/react-bootstrap-table2/test/test-helpers/table-wrapper.js @@ -0,0 +1,11 @@ +/* eslint react/prop-types: 0 */ +import React from 'react'; + +export const TableRowWrapper = props => ( + + + { props.children } + +
+); + diff --git a/packages/react-bootstrap-table2/test/text-editor.test.js b/packages/react-bootstrap-table2/test/text-editor.test.js new file mode 100644 index 0000000..dbdaeef --- /dev/null +++ b/packages/react-bootstrap-table2/test/text-editor.test.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import TextEditor from '../src/text-editor'; + +describe('TextEditor', () => { + let wrapper; + const value = 'test'; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render TextEditor correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('input').length).toBe(1); + expect(wrapper.find('input').prop('type')).toEqual('text'); + expect(wrapper.find('.form-control.editor.edit-text').length).toBe(1); + }); +}); diff --git a/packages/react-bootstrap-table2/test/utils.test.js b/packages/react-bootstrap-table2/test/utils.test.js index 491cc04..2aa43b1 100644 --- a/packages/react-bootstrap-table2/test/utils.test.js +++ b/packages/react-bootstrap-table2/test/utils.test.js @@ -22,6 +22,42 @@ describe('Utils', () => { }); }); + describe('set', () => { + const newValue = 'test'; + const data = { + name: 'A', + address: { + road: 'BCD', + postal: '1234-12345', + city: { + name: 'B' + } + } + }; + + it('should set data successfully', () => { + _.set(data, 'name', newValue); + _.set(data, 'address.road', newValue); + _.set(data, 'address.city.name', newValue); + expect(data.name).toEqual(newValue); + expect(data.address.road).toEqual(newValue); + expect(data.address.city.name).toEqual(newValue); + }); + + it('should throw error if target not existing', () => { + expect(() => { + _.set(data, 'address.not.existing', newValue); + }).toThrow(); + }); + + it('should not throw error if target not existing but with safe=true', () => { + expect(() => { + _.set(data, 'address.not.existing', newValue, true); + }).not.toThrow(); + expect(data.address.not.existing).toEqual({}); + }); + }); + describe('isObject', () => { describe('when given Object', () => { it('should return true', () => { From ba7c2e9bb7ed493eb05fda844bb321aee30548bd Mon Sep 17 00:00:00 2001 From: Daniil Khanin Date: Sat, 23 Sep 2017 09:15:01 +0300 Subject: [PATCH 030/136] Allow focus on the last character in Text Input (#65) --- packages/react-bootstrap-table2/src/text-editor.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/react-bootstrap-table2/src/text-editor.js b/packages/react-bootstrap-table2/src/text-editor.js index 06c9cfe..285236d 100644 --- a/packages/react-bootstrap-table2/src/text-editor.js +++ b/packages/react-bootstrap-table2/src/text-editor.js @@ -1,21 +1,31 @@ /* eslint no-return-assign: 0 */ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; class TextEditor extends Component { componentDidMount() { + const { defaultValue } = this.props; + this.text.value = defaultValue; this.text.focus(); } render() { + const { defaultValue, ...rest } = this.props; return ( this.text = node } type="text" className="form-control editor edit-text" - { ...this.props } + { ...rest } /> ); } } +TextEditor.propTypes = { + defaultValue: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.number + ]).isRequired +}; export default TextEditor; From 9f92b5368fdce89ced7b66be9d43401d1a36fa08 Mon Sep 17 00:00:00 2001 From: Allen Date: Sat, 23 Sep 2017 04:29:37 -0500 Subject: [PATCH 031/136] fix #63 (part1 - cell editing validation) * implement cell editing validation * add test cases for cell editing validation * add story for validator for cell editor * add docs for cell editor validation --- docs/README.md | 6 +- docs/columns.md | 24 ++++- .../cell-edit/cell-edit-validator-table.js | 85 ++++++++++++++++++ .../stories/index.js | 4 +- .../src/bootstrap-table.js | 3 +- packages/react-bootstrap-table2/src/const.js | 3 +- .../src/editing-cell.js | 68 ++++++++++++-- .../src/editor-indicator.js | 19 ++++ .../react-bootstrap-table2/src/header-cell.js | 4 +- packages/react-bootstrap-table2/src/row.js | 12 +-- .../react-bootstrap-table2/src/text-editor.js | 13 ++- .../style/react-bootstrap-table.scss | 90 +++++++++++++++++++ .../test/editing-cell.test.js | 82 ++++++++++++++++- .../test/text-editor.test.js | 17 ++++ 14 files changed, 406 insertions(+), 24 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js create mode 100644 packages/react-bootstrap-table2/src/editor-indicator.js diff --git a/docs/README.md b/docs/README.md index 19330f8..3b7311f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,6 +42,7 @@ Following is a `cellEdit` object: { mode: 'click', blurToSave: true, + timeToCloseMessage: 2500, onEditing: (rowId, dataField, newValue) => { ... }, beforeSaveCell: (oldValue, newValue, row, column) => { ... }, afterSaveCell: (oldValue, newValue, row, column) => { ... }, @@ -49,10 +50,13 @@ Following is a `cellEdit` object: } ``` #### cellEdit.mode - [String] -`cellEdit.mode` possible value is `click` and `dbclick`. It's required value that tell `react-bootstrap-table2` how to trigger the cell editing. +`cellEdit.mode` possible value is `click` and `dbclick`. **It's required value** that tell `react-bootstrap-table2` how to trigger the cell editing. #### cellEdit.blurToSave - [Bool] Default is `false`, enable it will be able to save the cell automatically when blur from the cell editor. #### cellEdit.nonEditableRows - [Function] `cellEdit.nonEditableRows` accept a callback function and expect return an array which used to restrict all the columns of some rows as non-editable. So the each item in return array should be rowkey(`keyField`) + +#### cellEdit.timeToCloseMessage - [Function] +If a [`column.validator`](./columns.md#validator) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond. \ No newline at end of file diff --git a/docs/columns.md b/docs/columns.md index 8ac781e..dc1e378 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -26,6 +26,7 @@ Available properties in a column object: * [headerAlign](#headerAlign) * [headerAttrs](#headerAttrs) * [editable](#editable) +* [validator](#validator) Following is a most simplest and basic usage: @@ -417,4 +418,25 @@ A new `Object` will be the result of element headerAttrs. > overwrited when other props related to HTML attributes were given. ## column.editable - [Bool] -`column.editable` default is true, means every column is editable if you configure [`cellEdit`](./README.md#cellEdit). But you can disable some columns editable via setting `false`. \ No newline at end of file +`column.editable` default is true, means every column is editable if you configure [`cellEdit`](./README.md#cellEdit). But you can disable some columns editable via setting `false`. + +## column.validator - [Function] +`column.validator` used for validate the data when cell on updating. it's should accept a callback function with following argument: +`newValue`, `row` and `column`: + +```js +{ + // omit... + validator: (newValue, row, column) => { + return ...; + } +} +``` + +The return value can be a bool or an object. If your valiation is pass, return `true` explicitly. If your valiation is invalid, return following object instead: +```js +{ + valid: false, + message: 'SOME_REASON_HERE' +} +``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js new file mode 100644 index 0000000..d3dcffb --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js @@ -0,0 +1,85 @@ +import React from 'react'; +/* eslint no-unused-vars: 0 */ +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + validator: (newValue, row, column) => { + if (isNaN(newValue)) { + return { + valid: false, + message: 'Price should be numeric' + }; + } + if (newValue < 2000) { + return { + valid: false, + message: 'Price should bigger than 2000' + }; + } + return true; + } +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + validator: (newValue, row, column) => { + if (isNaN(newValue)) { + return { + valid: false, + message: 'Price should be numeric' + }; + } + if (newValue < 2000) { + return { + valid: false, + message: 'Price should bigger than 2000' + }; + } + return true; + } +}]; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; + + +`; + +const cellEdit = { + mode: 'click', + blurToSave: true +}; +export default () => ( +
+

Product Price should bigger than $2000

+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 9ad48f2..7c43434 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -42,6 +42,7 @@ import BlurToSaveTable from 'examples/cell-edit/blur-to-save-table'; import RowLevelEditableTable from 'examples/cell-edit/row-level-editable-table'; import ColumnLevelEditableTable from 'examples/cell-edit/column-level-editable-table'; import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; +import CellEditValidator from 'examples/cell-edit/cell-edit-validator-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -92,4 +93,5 @@ storiesOf('Cell Editing', module) .add('Blur to Save Cell', () => ) .add('Row Level Editable', () => ) .add('Column Level Editable', () => ) - .add('Rich Hook Functions', () => ); + .add('Rich Hook Functions', () => ) + .add('Validation', () => ); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index d7ea363..f93a30a 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -137,7 +137,8 @@ BootstrapTable.propTypes = { blurToSave: PropTypes.bool, beforeSaveCell: PropTypes.func, afterSaveCell: PropTypes.func, - nonEditableRows: PropTypes.func + nonEditableRows: PropTypes.func, + timeToCloseMessage: PropTypes.number }) }; diff --git a/packages/react-bootstrap-table2/src/const.js b/packages/react-bootstrap-table2/src/const.js index 8a812ee..5391b82 100644 --- a/packages/react-bootstrap-table2/src/const.js +++ b/packages/react-bootstrap-table2/src/const.js @@ -3,5 +3,6 @@ export default { SORT_DESC: 'desc', UNABLE_TO_CELL_EDIT: 'none', CLICK_TO_CELL_EDIT: 'click', - DBCLICK_TO_CELL_EDIT: 'dbclick' + DBCLICK_TO_CELL_EDIT: 'dbclick', + TIME_TO_CLOSE_MESSAGE: 3000 }; diff --git a/packages/react-bootstrap-table2/src/editing-cell.js b/packages/react-bootstrap-table2/src/editing-cell.js index f32e1ad..97320c9 100644 --- a/packages/react-bootstrap-table2/src/editing-cell.js +++ b/packages/react-bootstrap-table2/src/editing-cell.js @@ -1,33 +1,73 @@ +/* eslint arrow-body-style: 0 */ /* eslint react/prop-types: 0 */ /* eslint no-return-assign: 0 */ import React, { Component } from 'react'; +import cs from 'classnames'; import PropTypes from 'prop-types'; import _ from './utils'; +import Const from './const'; import TextEditor from './text-editor'; +import EditorIndicator from './editor-indicator'; class EditingCell extends Component { constructor(props) { super(props); + this.indicatorTimer = null; + this.clearTimer = this.clearTimer.bind(this); this.handleBlur = this.handleBlur.bind(this); this.handleKeyDown = this.handleKeyDown.bind(this); + this.beforeComplete = this.beforeComplete.bind(this); + this.state = { + invalidMessage: null + }; + } + + componentWillUnmount() { + this.clearTimer(); + } + + clearTimer() { + if (this.indicatorTimer) { + clearTimeout(this.indicatorTimer); + } + } + + beforeComplete(row, column, newValue) { + this.clearTimer(); + const { onComplete, timeToCloseMessage } = this.props; + if (_.isFunction(column.validator)) { + const validateForm = column.validator(newValue, row, column); + if (_.isObject(validateForm) && !validateForm.valid) { + this.setState(() => { + return { invalidMessage: validateForm.message }; + }); + this.indicatorTimer = setTimeout(() => { + this.setState(() => { + return { invalidMessage: null }; + }); + }, timeToCloseMessage); + return; + } + } + onComplete(row, column, newValue); } handleBlur() { - const { onEscape, onComplete, blurToSave, row, column } = this.props; + const { onEscape, blurToSave, row, column } = this.props; if (blurToSave) { const value = this.editor.text.value; if (!_.isDefined(value)) { // TODO: for other custom or embed editor } - onComplete(row, column, value); + this.beforeComplete(row, column, value); } else { onEscape(); } } handleKeyDown(e) { - const { onEscape, onComplete, row, column } = this.props; + const { onEscape, row, column } = this.props; if (e.keyCode === 27) { // ESC onEscape(); } else if (e.keyCode === 13) { // ENTER @@ -35,11 +75,12 @@ class EditingCell extends Component { if (!_.isDefined(value)) { // TODO: for other custom or embed editor } - onComplete(row, column, value); + this.beforeComplete(row, column, value); } } render() { + const { invalidMessage } = this.state; const { row, column } = this.props; const { dataField } = column; @@ -48,9 +89,17 @@ class EditingCell extends Component { onKeyDown: this.handleKeyDown, onBlur: this.handleBlur }; + + const editorClass = invalidMessage ? cs('animated', 'shake') : null; return ( - - this.editor = node } defaultValue={ value } { ...editorAttrs } /> + + this.editor = node } + defaultValue={ value } + classNames={ editorClass } + { ...editorAttrs } + /> + { invalidMessage ? : null } ); } @@ -60,7 +109,12 @@ EditingCell.propTypes = { row: PropTypes.object.isRequired, column: PropTypes.object.isRequired, onComplete: PropTypes.func.isRequired, - onEscape: PropTypes.func.isRequired + onEscape: PropTypes.func.isRequired, + timeToCloseMessage: PropTypes.number +}; + +EditingCell.defaultProps = { + timeToCloseMessage: Const.TIME_TO_CLOSE_MESSAGE }; export default EditingCell; diff --git a/packages/react-bootstrap-table2/src/editor-indicator.js b/packages/react-bootstrap-table2/src/editor-indicator.js new file mode 100644 index 0000000..c19819d --- /dev/null +++ b/packages/react-bootstrap-table2/src/editor-indicator.js @@ -0,0 +1,19 @@ +/* eslint no-return-assign: 0 */ +import React from 'react'; +import PropTypes from 'prop-types'; + +const EditorIndicator = ({ invalidMessage }) => + ( +
+ { invalidMessage } +
+ ); + +EditorIndicator.propTypes = { + invalidMessage: PropTypes.string +}; + +EditorIndicator.defaultProps = { + invalidMessage: null +}; +export default EditorIndicator; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index d419710..1b9c42a 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -99,7 +99,9 @@ HeaderCell.propTypes = { headerAlign: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), sort: PropTypes.bool, - sortFunc: PropTypes.func + sortFunc: PropTypes.func, + editable: PropTypes.bool, + validator: PropTypes.func }).isRequired, index: PropTypes.number.isRequired, onSort: PropTypes.func, diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index c0e06b2..ed76102 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -16,13 +16,11 @@ const Row = (props) => { editable: editableRow } = props; const { - ridx: editingRowIdx, - cidx: editingColIdx, mode, onStart, - onEscape, - onComplete, - blurToSave + ridx: editingRowIdx, + cidx: editingColIdx, + ...rest } = cellEdit; return ( @@ -36,9 +34,7 @@ const Row = (props) => { key={ _.get(row, column.dataField) } row={ row } column={ column } - blurToSave={ blurToSave } - onComplete={ onComplete } - onEscape={ onEscape } + { ...rest } /> ); } diff --git a/packages/react-bootstrap-table2/src/text-editor.js b/packages/react-bootstrap-table2/src/text-editor.js index 285236d..4c41954 100644 --- a/packages/react-bootstrap-table2/src/text-editor.js +++ b/packages/react-bootstrap-table2/src/text-editor.js @@ -1,5 +1,6 @@ /* eslint no-return-assign: 0 */ import React, { Component } from 'react'; +import cs from 'classnames'; import PropTypes from 'prop-types'; class TextEditor extends Component { @@ -10,12 +11,13 @@ class TextEditor extends Component { } render() { - const { defaultValue, ...rest } = this.props; + const { defaultValue, classNames, ...rest } = this.props; + const editorClass = cs('form-control editor edit-text', classNames); return ( this.text = node } type="text" - className="form-control editor edit-text" + className={ editorClass } { ...rest } /> ); @@ -23,9 +25,16 @@ class TextEditor extends Component { } TextEditor.propTypes = { + classNames: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.object + ]), defaultValue: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]).isRequired }; +TextEditor.defaultProps = { + classNames: null +}; export default TextEditor; diff --git a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss index 91cc609..9720bd0 100644 --- a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss +++ b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss @@ -25,4 +25,94 @@ td.react-bs-table-no-data { text-align: center; } + + td.react-bootstrap-table-editing-cell { + .animated { + animation-fill-mode: both; + } + + .animated.bounceIn, + .animated.bounceOut{ + animation-duration: .75s; + } + + .animated.shake{ + animation-duration: .3s; + } + + @keyframes shake { + from, to { + transform: translate3d(0, 0, 0); + } + + 10%, 50%, 90% { + transform: translate3d(-10px, 0, 0); + } + + 30%, 70%{ + transform: translate3d(10px, 0, 0); + } + } + + .shake { + animation-name: shake; + } + + @keyframes bounceIn { + from, 20%, 40%, 60%, 80%, to { + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + transform: scale3d(.3, .3, .3); + } + + 20% { + transform: scale3d(1.1, 1.1, 1.1); + } + + 40% { + transform: scale3d(.9, .9, .9); + } + + 60% { + opacity: 1; + transform: scale3d(1.03, 1.03, 1.03); + } + + 80% { + transform: scale3d(.97, .97, .97); + } + + to { + opacity: 1; + transform: scale3d(1, 1, 1); + } + } + + .bounceIn { + animation-name: bounceIn; + } + + @keyframes bounceOut { + 20% { + transform: scale3d(.9, .9, .9); + } + + 50%, 55% { + opacity: 1; + transform: scale3d(1.1, 1.1, 1.1); + } + + to { + opacity: 0; + transform: scale3d(.3, .3, .3); + } + } + + .bounceOut { + animation-name: bounceOut; + } + } } \ No newline at end of file diff --git a/packages/react-bootstrap-table2/test/editing-cell.test.js b/packages/react-bootstrap-table2/test/editing-cell.test.js index 9bf0f19..835f7aa 100644 --- a/packages/react-bootstrap-table2/test/editing-cell.test.js +++ b/packages/react-bootstrap-table2/test/editing-cell.test.js @@ -6,6 +6,7 @@ import { shallow, mount } from 'enzyme'; import { TableRowWrapper } from './test-helpers/table-wrapper'; import EditingCell from '../src/editing-cell'; import TextEditor from '../src/text-editor'; +import EditorIndicator from '../src/editor-indicator'; describe('EditingCell', () => { @@ -17,7 +18,7 @@ describe('EditingCell', () => { name: 'A' }; - const column = { + let column = { dataField: 'id', text: 'ID' }; @@ -39,6 +40,7 @@ describe('EditingCell', () => { expect(wrapper.length).toBe(1); expect(wrapper.find('td').length).toBe(1); expect(wrapper.find(TextEditor).length).toBe(1); + expect(wrapper.state().invalidMessage).toBeNull(); }); it('should render TextEditor with correct props', () => { @@ -46,6 +48,12 @@ describe('EditingCell', () => { expect(textEditor.props().defaultValue).toEqual(row[column.dataField]); expect(textEditor.props().onKeyDown).toBeDefined(); expect(textEditor.props().onBlur).toBeDefined(); + expect(textEditor.props().classNames).toBeNull(); + }); + + it('should not render EditorIndicator due to state.invalidMessage is null', () => { + const indicator = wrapper.find(EditorIndicator); + expect(indicator.length).toEqual(0); }); it('when press ENTER on TextEditor should call onComplete correctly', () => { @@ -90,4 +98,76 @@ describe('EditingCell', () => { expect(onComplete.calledWith(row, column, `${row[column.dataField]}`)).toBe(true); }); }); + + describe('when column.validator is defined', () => { + let newValue; + let validForm; + let validatorCallBack; + + describe('and column.validator return an object', () => { + beforeEach(() => { + newValue = 'newValue'; + validForm = { valid: false, message: 'Something is invalid' }; + validatorCallBack = sinon.stub().returns(validForm); + column = { + dataField: 'id', + text: 'ID', + validator: validatorCallBack + }; + wrapper.instance().beforeComplete(row, column, newValue); + }); + + it('should call column.validator successfully', () => { + expect(validatorCallBack.callCount).toBe(1); + expect(validatorCallBack.calledWith(newValue, row, column)).toBe(true); + }); + + it('should not call onComplete', () => { + expect(onComplete.callCount).toBe(0); + }); + + it('should set indicatorTimer successfully', () => { + expect(wrapper.instance().indicatorTimer).toBeDefined(); + }); + + it('should set invalidMessage state correctly', () => { + expect(wrapper.state().invalidMessage).toEqual(validForm.message); + }); + + it('should render TextEditor with correct shake and animated class', () => { + const editor = wrapper.find(TextEditor); + expect(editor.length).toEqual(1); + expect(editor.props().classNames).toEqual('animated shake'); + }); + + it('should render EditorIndicator correctly', () => { + const indicator = wrapper.find(EditorIndicator); + expect(indicator.length).toEqual(1); + expect(indicator.props().invalidMessage).toEqual(validForm.message); + }); + }); + + describe('and column.validator return true or something', () => { + beforeEach(() => { + newValue = 'newValue'; + validForm = true; + validatorCallBack = sinon.stub().returns(validForm); + column = { + dataField: 'id', + text: 'ID', + validator: validatorCallBack + }; + wrapper.instance().beforeComplete(row, column, newValue); + }); + + it('should call column.validator successfully', () => { + expect(validatorCallBack.callCount).toBe(1); + expect(validatorCallBack.calledWith(newValue, row, column)).toBe(true); + }); + + it('should call onComplete', () => { + expect(onComplete.callCount).toBe(1); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/text-editor.test.js b/packages/react-bootstrap-table2/test/text-editor.test.js index dbdaeef..0150bc3 100644 --- a/packages/react-bootstrap-table2/test/text-editor.test.js +++ b/packages/react-bootstrap-table2/test/text-editor.test.js @@ -21,4 +21,21 @@ describe('TextEditor', () => { expect(wrapper.find('input').prop('type')).toEqual('text'); expect(wrapper.find('.form-control.editor.edit-text').length).toBe(1); }); + + describe('whenclassNames prop defined', () => { + const className = 'test-class'; + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render correct custom classname', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(`.${className}`).length).toBe(1); + }); + }); }); From c2e22d57100e0fe5aebd4dcdd3a24212b9e81001 Mon Sep 17 00:00:00 2001 From: Esa Juhana Date: Sat, 7 Oct 2017 12:16:33 +0300 Subject: [PATCH 032/136] Improve development setup experience by fixing misspelled areas --- CONTRIBUTING.md | 24 ++++++++++++------------ docs/development.md | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eab673b..1179bde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,21 +1,21 @@ # Issues -Before open issue, please make sure your problem/request is open or not. When open issue, please give following information if you can: +Before opening an issue, please make sure your problem/request doesn't exist. When you open issue, please provide the following information if possible: -* Example code or repo(Please keep it simple and minimal) -* Reproduce steps +* Example code or repo (please keep it simple and minimal) +* Steps to reproduce * `react-bootstrap-table2` version -Anyway, it's welcome to open issue to ask questions or feature request. +Anyway, you're welcome to open an issue to ask questions or discuss about a feature request. # Pull Requests -Check [here](./docs/development.md) for getting start development. +Check [here](./docs/development.md) for getting started with development. -* When you want to implement a new feature, please let us know(via issues). -* Please run test before opening PR and also remember to write test code. -* If you PR is trying to fix bug, please describe the bug when PR open. +* When you want to implement a new feature, please let us know (via issues). +* Please run tests before opening a PR and also remember to test the actual business logic. +* If your PR is trying to fix a bug, please describe the bug number with hashtag when creating the PR. -# For the member of react-bootstrap-table2 org +# For the members of react-bootstrap-table2 org -* Please convert ticket to issue when ticket move to `Ready` from `Backlog` in project -* Please write document if any new API/feature/props changed or added -* Please add story example if any new feature implement \ No newline at end of file +* Please convert the ticket to issue when is ticket moved from `Backlog` to `Ready` in project. +* Please write documentation if any new API/feature/props is changed or added. +* Please add a story example if any new feature is implemented \ No newline at end of file diff --git a/docs/development.md b/docs/development.md index bf91e47..372bfa9 100644 --- a/docs/development.md +++ b/docs/development.md @@ -13,7 +13,7 @@ $ npm start ``` ### Launch StoryBook -We use [storybook](https://storybook.js.org/) to list our examples and it also have hot reload from source code. Sometime, it is also a good entry point to develop. +We use [storybook](https://storybook.js.org/) to list our examples and it also has hot reload from source code. Sometimes, it is also a good entry point to development. ```bash $ cd packages/react-bootstrap-table2-example From 94d21fee772015d802500842b69722493be3959d Mon Sep 17 00:00:00 2001 From: Daniil Khanin Date: Tue, 10 Oct 2017 09:52:32 +0300 Subject: [PATCH 033/136] fix #66 --- .../cell-edit/cell-level-editable-table.js | 55 +++++++++++++++++++ .../stories/index.js | 4 +- packages/react-bootstrap-table2/src/cell.js | 15 +++-- .../react-bootstrap-table2/src/header-cell.js | 2 +- packages/react-bootstrap-table2/src/row.js | 11 +++- .../test/editing-cell.test.js | 35 +++++++++++- .../test/test-helpers/productGenerator.js | 21 +++++++ 7 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js create mode 100644 packages/react-bootstrap-table2/test/test-helpers/productGenerator.js diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js new file mode 100644 index 0000000..da825d1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js @@ -0,0 +1,55 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + editable: (content, row, rowIndex, columnIndex) => content > 2101 +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + editable: (content, row, rowIndex, columnIndex) => content > 2101 +}]; + +const cellEdit = { + mode: 'click' +}; + + +`; + +const cellEdit = { + mode: 'click' +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 7c43434..605d5d8 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -41,6 +41,7 @@ import DoubleClickToEditTable from 'examples/cell-edit/dbclick-to-edit-table'; import BlurToSaveTable from 'examples/cell-edit/blur-to-save-table'; import RowLevelEditableTable from 'examples/cell-edit/row-level-editable-table'; import ColumnLevelEditableTable from 'examples/cell-edit/column-level-editable-table'; +import CellLevelEditable from 'examples/cell-edit/cell-level-editable-table'; import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; import CellEditValidator from 'examples/cell-edit/cell-edit-validator-table'; @@ -94,4 +95,5 @@ storiesOf('Cell Editing', module) .add('Row Level Editable', () => ) .add('Column Level Editable', () => ) .add('Rich Hook Functions', () => ) - .add('Validation', () => ); + .add('Validation', () => ) + .add('Cell Level Editable', () => ); diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index e4431e6..d9e3582 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -60,6 +60,14 @@ class Cell extends Component { ? classes(content, row, rowIndex, columnIndex) : classes; + const setEditMode = () => { + if (editMode === Const.CLICK_TO_CELL_EDIT) { + cellAttrs.onClick = this.handleEditingCell; + } else { + cellAttrs.onDoubleClick = this.handleEditingCell; + } + }; + if (style) { cellStyle = _.isFunction(style) ? style(content, row, rowIndex, columnIndex) : style; } @@ -85,13 +93,8 @@ class Cell extends Component { if (cellClasses) cellAttrs.className = cellClasses; if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; - if (editable && editMode !== Const.UNABLE_TO_CELL_EDIT) { - if (editMode === Const.CLICK_TO_CELL_EDIT) { // click to edit - cellAttrs.onClick = this.handleEditingCell; - } else { // dbclick to edit - cellAttrs.onDoubleClick = this.handleEditingCell; - } + setEditMode(); } return ( { content } diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 1b9c42a..13c6727 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -100,7 +100,7 @@ HeaderCell.propTypes = { align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), sort: PropTypes.bool, sortFunc: PropTypes.func, - editable: PropTypes.bool, + editable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), validator: PropTypes.func }).isRequired, index: PropTypes.number.isRequired, diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index ed76102..117dce4 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -26,12 +26,17 @@ const Row = (props) => { { columns.map((column, index) => { + const { dataField } = column; + const content = _.get(row, dataField); let editable = _.isDefined(column.editable) ? column.editable : true; - if (column.dataField === keyField || !editableRow) editable = false; + if (dataField === keyField || !editableRow) editable = false; + if (_.isFunction(column.editable)) { + editable = column.editable(content, row, rowIndex, index); + } if (rowIndex === editingRowIdx && index === editingColIdx) { return ( { } return ( { let wrapper; @@ -170,4 +173,34 @@ describe('EditingCell', () => { }); }); }); + + describe('when column.editable is function', () => { + const products = productsGenerator(); + const mockFunction = jest.fn(content => content > 2102); + const col = [{ + dataField: 'id', + text: 'Product ID' + }, { + dataField: 'name', + text: 'Product Name' + }, { + dataField: 'price', + text: 'Product Price', + editable: mockFunction + }]; + const renderComponent = mount(); + const rowComponent = renderComponent.find(Row); + it(`column.editable function should be called ${products.length} times`, () => { + expect(mockFunction).toHaveBeenCalledTimes(products.length); + }); + it('should call callBack with right args', () => { + expect(mockFunction).toHaveBeenLastCalledWith(2104, { id: 4, name: 'Item name 4', price: 2104 }, 4, 2); + }); + it('should be "editable" === false', () => { + expect(rowComponent.at(2).find(Cell).at(2).props().editable).toBeFalsy(); + }); + it('should be "editable" === true', () => { + expect(rowComponent.at(3).find(Cell).at(2).props().editable).toBeTruthy(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/test-helpers/productGenerator.js b/packages/react-bootstrap-table2/test/test-helpers/productGenerator.js new file mode 100644 index 0000000..4049e60 --- /dev/null +++ b/packages/react-bootstrap-table2/test/test-helpers/productGenerator.js @@ -0,0 +1,21 @@ +/** + * products generator for stories + * + * @param {Number} quantity - quantity of products + * @param {Function} callback - callback func which is similiar to 'mapFunction' + * aims to customize product format + * + * @return {Array} - products array + */ +export const productsGenerator = (quantity = 5, callback) => { + if (callback) return Array.from({ length: quantity }, callback); + + // if no given callback, retrun default product format. + return ( + Array.from({ length: quantity }, (value, index) => ({ + id: index, + name: `Item name ${index}`, + price: 2100 + index + })) + ); +}; From 7760d6a7f8770976a1560ae3a1f7953ead60fb43 Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 10 Oct 2017 02:03:00 -0500 Subject: [PATCH 034/136] refine #71 * refine #71 * patch docs for column.editable --- docs/columns.md | 13 +++- .../stories/index.js | 4 +- packages/react-bootstrap-table2/src/cell.js | 14 ++-- .../test/editing-cell.test.js | 34 -------- .../react-bootstrap-table2/test/row.test.js | 77 ++++++++++++++++++- ...oductGenerator.js => product-generator.js} | 0 6 files changed, 94 insertions(+), 48 deletions(-) rename packages/react-bootstrap-table2/test/test-helpers/{productGenerator.js => product-generator.js} (100%) diff --git a/docs/columns.md b/docs/columns.md index dc1e378..f465c3b 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -417,9 +417,20 @@ A new `Object` will be the result of element headerAttrs. > Same as [column.attrs](#attrs), it has lower priority and will be > overwrited when other props related to HTML attributes were given. -## column.editable - [Bool] +## column.editable - [Bool | Function] `column.editable` default is true, means every column is editable if you configure [`cellEdit`](./README.md#cellEdit). But you can disable some columns editable via setting `false`. +If a callback function given, you can control the editable level as cell level: + +```js +{ + // omit... + editable: (cell, row, rowIndex, colIndex) => { + // return true or false; + } +} +``` + ## column.validator - [Function] `column.validator` used for validate the data when cell on updating. it's should accept a callback function with following argument: `newValue`, `row` and `column`: diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 605d5d8..26f7136 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -94,6 +94,6 @@ storiesOf('Cell Editing', module) .add('Blur to Save Cell', () => ) .add('Row Level Editable', () => ) .add('Column Level Editable', () => ) + .add('Cell Level Editable', () => ) .add('Rich Hook Functions', () => ) - .add('Validation', () => ) - .add('Cell Level Editable', () => ); + .add('Validation', () => ); diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js index d9e3582..add0f58 100644 --- a/packages/react-bootstrap-table2/src/cell.js +++ b/packages/react-bootstrap-table2/src/cell.js @@ -60,14 +60,6 @@ class Cell extends Component { ? classes(content, row, rowIndex, columnIndex) : classes; - const setEditMode = () => { - if (editMode === Const.CLICK_TO_CELL_EDIT) { - cellAttrs.onClick = this.handleEditingCell; - } else { - cellAttrs.onDoubleClick = this.handleEditingCell; - } - }; - if (style) { cellStyle = _.isFunction(style) ? style(content, row, rowIndex, columnIndex) : style; } @@ -94,7 +86,11 @@ class Cell extends Component { if (!_.isEmptyObject(cellStyle)) cellAttrs.style = cellStyle; if (editable && editMode !== Const.UNABLE_TO_CELL_EDIT) { - setEditMode(); + if (editMode === Const.CLICK_TO_CELL_EDIT) { + cellAttrs.onClick = this.handleEditingCell; + } else { + cellAttrs.onDoubleClick = this.handleEditingCell; + } } return ( { content } diff --git a/packages/react-bootstrap-table2/test/editing-cell.test.js b/packages/react-bootstrap-table2/test/editing-cell.test.js index 565d6a1..864b7c4 100644 --- a/packages/react-bootstrap-table2/test/editing-cell.test.js +++ b/packages/react-bootstrap-table2/test/editing-cell.test.js @@ -4,13 +4,9 @@ import sinon from 'sinon'; import { shallow, mount } from 'enzyme'; import { TableRowWrapper } from './test-helpers/table-wrapper'; -import BootstrapTable from '../src/bootstrap-table'; import EditingCell from '../src/editing-cell'; import TextEditor from '../src/text-editor'; import EditorIndicator from '../src/editor-indicator'; -import { productsGenerator } from './test-helpers/productGenerator'; -import Row from '../src/row'; -import Cell from '../src/cell'; describe('EditingCell', () => { let wrapper; @@ -173,34 +169,4 @@ describe('EditingCell', () => { }); }); }); - - describe('when column.editable is function', () => { - const products = productsGenerator(); - const mockFunction = jest.fn(content => content > 2102); - const col = [{ - dataField: 'id', - text: 'Product ID' - }, { - dataField: 'name', - text: 'Product Name' - }, { - dataField: 'price', - text: 'Product Price', - editable: mockFunction - }]; - const renderComponent = mount(); - const rowComponent = renderComponent.find(Row); - it(`column.editable function should be called ${products.length} times`, () => { - expect(mockFunction).toHaveBeenCalledTimes(products.length); - }); - it('should call callBack with right args', () => { - expect(mockFunction).toHaveBeenLastCalledWith(2104, { id: 4, name: 'Item name 4', price: 2104 }, 4, 2); - }); - it('should be "editable" === false', () => { - expect(rowComponent.at(2).find(Cell).at(2).props().editable).toBeFalsy(); - }); - it('should be "editable" === true', () => { - expect(rowComponent.at(3).find(Cell).at(2).props().editable).toBeTruthy(); - }); - }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 84e54c3..dd46177 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -86,7 +86,7 @@ describe('Row', () => { } }); - describe('when have column.editable defined false', () => { + describe('and column.editable defined false', () => { const nonEditableColIndex = 1; beforeEach(() => { columns[nonEditableColIndex].editable = false; @@ -101,7 +101,7 @@ describe('Row', () => { ); }); - it('Cell component should receive correct editMode props', () => { + it('Cell component should receive correct editable props', () => { expect(wrapper.length).toBe(1); for (let i = 0; i < columns.length; i += 1) { const column = columns[i]; @@ -114,6 +114,79 @@ describe('Row', () => { }); }); + describe('and column.editable defined as function', () => { + const nonEditableColIndex = 1; + let editableCallBack; + + afterEach(() => { + editableCallBack.reset(); + }); + + describe('which return false', () => { + beforeEach(() => { + editableCallBack = sinon.stub().returns(false); + columns[nonEditableColIndex].editable = editableCallBack; + wrapper = shallow( + + ); + }); + + it('column.editable callback function should be called once', () => { + expect(editableCallBack.callCount).toBe(1); + }); + + it('Cell component should receive correct editable props', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + const column = columns[i]; + if (i === nonEditableColIndex || column.dataField === keyField) { + expect(wrapper.find(Cell).get(i).props.editable).toBeFalsy(); + } else { + expect(wrapper.find(Cell).get(i).props.editable).toBeTruthy(); + } + } + }); + }); + + describe('which return true', () => { + beforeEach(() => { + editableCallBack = sinon.stub().returns(true); + columns[nonEditableColIndex].editable = editableCallBack; + wrapper = shallow( + + ); + }); + + it('column.editable callback function should be called once', () => { + expect(editableCallBack.callCount).toBe(1); + }); + + it('Cell component should receive correct editable props', () => { + expect(wrapper.length).toBe(1); + for (let i = 0; i < columns.length; i += 1) { + const column = columns[i]; + if (column.dataField === keyField) { + expect(wrapper.find(Cell).get(i).props.editable).toBeFalsy(); + } else { + expect(wrapper.find(Cell).get(i).props.editable).toBeTruthy(); + } + } + }); + }); + }); + // Means user defined cellEdit.nonEditableRows // and some rows will be treated as noneditable by this rules describe('when editable prop is false', () => { diff --git a/packages/react-bootstrap-table2/test/test-helpers/productGenerator.js b/packages/react-bootstrap-table2/test/test-helpers/product-generator.js similarity index 100% rename from packages/react-bootstrap-table2/test/test-helpers/productGenerator.js rename to packages/react-bootstrap-table2/test/test-helpers/product-generator.js From 3d6a293e5eed5ab03be323db84614385c2f4bd72 Mon Sep 17 00:00:00 2001 From: Esa Juhana Date: Tue, 10 Oct 2017 10:10:54 +0300 Subject: [PATCH 035/136] fix #77 * Implement basic usage of table element Add tableCaption prop, which can be a component / string Add simple test and an example to Storybook * Fix Caption example & Code syle fix for return statement * Rename tableCaption > caption --- .../examples/basic/table-with-caption.js | 47 +++++++++++++++++++ .../stories/index.js | 4 +- .../src/bootstrap-table.js | 9 +++- .../react-bootstrap-table2/src/caption.js | 19 ++++++++ .../test/bootstrap-table.test.js | 10 ++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js create mode 100644 packages/react-bootstrap-table2/src/caption.js diff --git a/packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js b/packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js new file mode 100644 index 0000000..fc20418 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js @@ -0,0 +1,47 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const CaptionElement = () =>

Component as Header

; + + + +} columns={ columns } /> +`; + +const Caption = () =>

Component as Header

; + +export default () => ( +
+ + } columns={ columns } /> + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 26f7136..0b76845 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -9,6 +9,7 @@ import BasicTable from 'examples/basic'; import BorderlessTable from 'examples/basic/borderless-table'; import StripHoverCondensedTable from 'examples/basic/striped-hover-condensed-table'; import NoDataTable from 'examples/basic/no-data-table'; +import TableWithCaption from 'examples/basic/table-with-caption'; // work on columns import NestedDataTable from 'examples/columns/nested-data-table'; @@ -61,7 +62,8 @@ storiesOf('Basic Table', module) .add('basic table', () => ) .add('striped, hover, condensed table', () => ) .add('borderless table', () => ) - .add('Indication For Empty Table', () => ); + .add('Indication For Empty Table', () => ) + .add('Table with caption', () => ); storiesOf('Work on Columns', module) .add('Display Nested Data', () => ) diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index f93a30a..f4aaf8b 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -4,6 +4,7 @@ import PropTypes from 'prop-types'; import cs from 'classnames'; import Header from './header'; +import Caption from './caption'; import Body from './body'; import Store from './store/base'; import PropsBaseResolver from './props-resolver'; @@ -38,7 +39,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { hover, bordered, condensed, - noDataIndication + noDataIndication, + caption } = this.props; const tableClass = cs('table', { @@ -57,6 +59,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { return (
+
{ + if (!props.children) return null; + return ( +
+ ); +}; + +Caption.propTypes = { + children: PropTypes.oneOfType([ + PropTypes.node, + PropTypes.string + ]) +}; + +export default Caption; diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index a475549..71cf0e4 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -89,6 +89,16 @@ describe('BootstrapTable', () => { }); }); + describe('when table should have a caption', () => { + beforeEach(() => { + wrapper = shallow(test} keyField="id" columns={ columns } data={ data } bordered={ false } />); + }); + + it('should render caption', () => { + expect(wrapper.find('.table-caption').length).toBe(1); + }); + }); + describe('when cellEdit props is defined', () => { const nonEditableRows = [data[1].id]; const cellEdit = { From 105bd36a5ea966f29f5d596bee6775931d6ec11f Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 10 Oct 2017 02:28:25 -0500 Subject: [PATCH 036/136] refine #78 * refine #78 * patch docs for caption prop --- docs/README.md | 4 ++++ .../{table-with-caption.js => caption-table.js} | 0 .../stories/index.js | 4 ++-- .../test/bootstrap-table.test.js | 14 ++++++++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) rename packages/react-bootstrap-table2-example/examples/basic/{table-with-caption.js => caption-table.js} (100%) diff --git a/docs/README.md b/docs/README.md index 3b7311f..3150a7b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,6 +8,7 @@ * [columns (**required**)](#columns) #### Optional +* [caption](#caption) * [striped](#striped) * [bordered](#bordered) * [hover](#hover) @@ -23,6 +24,9 @@ Assign your table data via `data` prop. It only accept an Array object. ### columns(**required**) - [Object] `columns` props accept an Array object, please see [columns definition](./columns.md) for more detail. +### caption - [String | Node] +Same as [caption tag](https://www.w3schools.com/TAgs/tag_caption.asp) in HTML. You can give a String or a React JSX. + ### striped - [Bool] Same as `.table-striped` class for adding zebra-stripes to a table ### bordered - [Bool] diff --git a/packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js b/packages/react-bootstrap-table2-example/examples/basic/caption-table.js similarity index 100% rename from packages/react-bootstrap-table2-example/examples/basic/table-with-caption.js rename to packages/react-bootstrap-table2-example/examples/basic/caption-table.js diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 0b76845..62829ef 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -9,7 +9,7 @@ import BasicTable from 'examples/basic'; import BorderlessTable from 'examples/basic/borderless-table'; import StripHoverCondensedTable from 'examples/basic/striped-hover-condensed-table'; import NoDataTable from 'examples/basic/no-data-table'; -import TableWithCaption from 'examples/basic/table-with-caption'; +import CaptionTable from 'examples/basic/caption-table'; // work on columns import NestedDataTable from 'examples/columns/nested-data-table'; @@ -63,7 +63,7 @@ storiesOf('Basic Table', module) .add('striped, hover, condensed table', () => ) .add('borderless table', () => ) .add('Indication For Empty Table', () => ) - .add('Table with caption', () => ); + .add('Table with caption', () => ); storiesOf('Work on Columns', module) .add('Display Nested Data', () => ) diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index 71cf0e4..e426a5a 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -2,6 +2,7 @@ import React from 'react'; import sinon from 'sinon'; import { shallow } from 'enzyme'; +import Caption from '../src/caption'; import Header from '../src/header'; import Body from '../src/body'; import BootstrapTable from '../src/bootstrap-table'; @@ -91,10 +92,19 @@ describe('BootstrapTable', () => { describe('when table should have a caption', () => { beforeEach(() => { - wrapper = shallow(test} keyField="id" columns={ columns } data={ data } bordered={ false } />); + wrapper = shallow( + test } + keyField="id" + columns={ columns } + data={ data } + bordered={ false } + /> + ); }); - it('should render caption', () => { + it('should render caption correctly', () => { + expect(wrapper.find(Caption).length).toBe(1); expect(wrapper.find('.table-caption').length).toBe(1); }); }); From 30d2645e4ae5dee356c0e287d5936341dc714c36 Mon Sep 17 00:00:00 2001 From: chunming Date: Wed, 11 Oct 2017 09:53:01 -0500 Subject: [PATCH 037/136] Improve yarn install for travis * yarn install instead * disable postinstall script --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 086f638..bcff7b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,7 @@ node_js: - "6" cache: - directories: - - node_modules + yarn: true branches: only: @@ -14,8 +13,8 @@ branches: # - master - develop -# before_install: -# - curl -o- -L https://yarnpkg.com/install.sh | bash -s -# - export PATH="$HOME/.yarn/bin:$PATH" +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash -s + - export PATH="$HOME/.yarn/bin:$PATH" -# install: yarn --frozen-lockfile +install: yarn install --pure-lockfile --ignore-scripts From 877259158ed4ea15b2cd92f467d499c37bf8267e Mon Sep 17 00:00:00 2001 From: chunming Date: Wed, 11 Oct 2017 10:28:53 -0500 Subject: [PATCH 038/136] fix #50 * implement row single and multiple selection * radio button for single, checkbox for multiple * update component if status was changing * implement header cell for row selection * render checkbox for multiple, nothing for single * default css for th[data-th-row-selection] * update component if status was changing * transform cursor to pointer when hover button radio and checkbox * story for single and multiple rows selection * remove props required field and turn off eslint * [test] adapt with other component * props resolver for cell selection * if row selection was disabled, return mode 'ROW_SELECT_DISABLED' * refactor row selection cell * rename to selection-cell * remove unnecessary props * better coding style * props resolver for header cell selection * refactor row selection for header cell * rename to selection-header-cell * remove unnecessary props * better coding style * new logic for handleSelectAllRows * tunning for multi selection logic * allow user to customize select all result * remove cursor point * remove uncessary utils * tunning for function naming * mock data for resolved props including both body and header * judge cell-editable and row-selectable with mode * [test] unit test for props-resolver * move position of test case of cellEdit * add test for resolveCellSelectionProps * add test for resolveHeaderCellSelectionProps * accept row keys for mock-component * [test] add test for body * [test] add test for header * [test] add test for row * [test] add test for selection-cell * fix typo * [test] add test for selection-header-cell * add test for checkbox in selection-header-cell * [test] add test for bootstrap-table * test for handleRowSelect * test for handleAllRowsSelect * remove uncessary prop * remove unnecessary dafault mode for selectRow * add description for props shape * remove uncessary declaration of inputType * add isRequred for selectRow.mode * [test] verify the correctness of params when clicking on selection cell * [test] modification for test wording and unmatched data type * handle logic of row selection inside the store * ignore the situation of pagination * correct the tests * [test] add test for store/base.js * Document for row selection * modication for defects * simplify proptypes to basic data type * row selection document in README * refactor all function test with sinon * refactor all mock function to sinon.stub() instead jest.fn() * fix conflict --- docs/README.md | 8 +- docs/row-selection.md | 48 +++ .../row-selection/multiple-selection.js | 53 ++++ .../row-selection/single-selection.js | 53 ++++ .../stories/index.js | 8 + packages/react-bootstrap-table2/src/body.js | 21 +- .../src/bootstrap-table.js | 62 ++++ packages/react-bootstrap-table2/src/const.js | 8 +- packages/react-bootstrap-table2/src/header.js | 15 +- .../src/props-resolver/index.js | 61 ++++ .../src/row-selection/selection-cell.js | 59 ++++ .../row-selection/selection-header-cell.js | 76 +++++ packages/react-bootstrap-table2/src/row.js | 19 ++ .../react-bootstrap-table2/src/store/base.js | 21 ++ .../style/react-bootstrap-table.scss | 4 + .../react-bootstrap-table2/test/body.test.js | 61 +++- .../test/bootstrap-table.test.js | 107 +++++++ .../test/header.test.js | 38 ++- .../test/mock-data/body-resolved-props.js | 16 + .../test/mock-data/header-resolved-props.js | 11 + .../test/props-resolver/index.test.js | 279 ++++++++++++++++-- .../test/row-selection/selection-cell.test.js | 136 +++++++++ .../selection-header-cell.test.js | 144 +++++++++ .../react-bootstrap-table2/test/row.test.js | 45 ++- .../test/store/base.test.js | 38 +++ .../test/test-helpers/mock-component.js | 8 +- 26 files changed, 1353 insertions(+), 46 deletions(-) create mode 100644 docs/row-selection.md create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js create mode 100644 packages/react-bootstrap-table2/src/row-selection/selection-cell.js create mode 100644 packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js create mode 100644 packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js create mode 100644 packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js create mode 100644 packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js create mode 100644 packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js diff --git a/docs/README.md b/docs/README.md index 3150a7b..66e6923 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,6 +14,7 @@ * [hover](#hover) * [condensed](#condensed) * [cellEdit](#cellEdit) +* [selectRow](#selectRow) ### keyField(**required**) - [String] `keyField` is a prop to tell `react-bootstrap-table2` which column is unigue key. @@ -36,7 +37,7 @@ Same as `.table-hover` class for adding a hover effect (grey background color) o ### condensed - [Bool] Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half -### cellEdit - [Bool] +### cellEdit - [Object] Assign a valid `cellEdit` object can enable the cell editing on the cell. The default usage is click/dbclick to trigger cell editing and press `ENTER` to save cell or press `ESC` to cancel editing. > Note: The `keyField` column can't be edited @@ -63,4 +64,7 @@ Default is `false`, enable it will be able to save the cell automatically when b `cellEdit.nonEditableRows` accept a callback function and expect return an array which used to restrict all the columns of some rows as non-editable. So the each item in return array should be rowkey(`keyField`) #### cellEdit.timeToCloseMessage - [Function] -If a [`column.validator`](./columns.md#validator) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond. \ No newline at end of file +If a [`column.validator`](./columns.md#validator) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond. + +### selectRow - [Object] +Pass prop `selectRow` to enable row selection. For more detail, please navigate to [row selection document](./row-selection.md). diff --git a/docs/row-selection.md b/docs/row-selection.md new file mode 100644 index 0000000..3671093 --- /dev/null +++ b/docs/row-selection.md @@ -0,0 +1,48 @@ + +# Row selection +`react-bootstrap-table2` supports the row selection feature. By passing prop `selectRow ` to enable row selection. When you enable this feature, `react-bootstrap-table2` will append a new selection column at first. + + +## Available properties + +The following are available properties in `selectRow`: + +#### Required +* [mode (required)](#mode) + +#### Optional + +## selectRow.mode - [String] + +Specifying the selection way for `single(radio)` or `multiple(checkbox)`. If `radio` was assigned, there will be a radio button in the selection column; otherwise, the `checkbox` instead. + +#### values +* `radio` +* `checkbox` + +#### examples + +```js +const selectRowProp = { + mode: 'radio' // single row selection +}; + +``` + +```js +const selectRowProp = { + mode: 'checkbox' // multiple row selection +}; + + +``` diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js new file mode 100644 index 0000000..46f2453 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js @@ -0,0 +1,53 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRowProp = { + mode: 'checkbox' +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRowProp = { + mode: 'checkbox' +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js new file mode 100644 index 0000000..b02f058 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js @@ -0,0 +1,53 @@ +import React from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRowProp = { + mode: 'radio' +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRowProp = { + mode: 'radio' +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 62829ef..4f0d85f 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -46,6 +46,10 @@ import CellLevelEditable from 'examples/cell-edit/cell-level-editable-table'; import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; import CellEditValidator from 'examples/cell-edit/cell-edit-validator-table'; +// work on row selection +import SingleSelectionTable from 'examples/row-selection/single-selection'; +import MultipleSelectionTable from 'examples/row-selection/multiple-selection'; + // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/tomorrow.min.css'; @@ -99,3 +103,7 @@ storiesOf('Cell Editing', module) .add('Cell Level Editable', () => ) .add('Rich Hook Functions', () => ) .add('Validation', () => ); + +storiesOf('Row Selection', module) + .add('Single selection', () => ) + .add('Multiple selection', () => ); diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 76cbd22..9a0cbba 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -1,10 +1,13 @@ /* eslint react/prop-types: 0 */ +/* eslint react/require-default-props: 0 */ + import React from 'react'; import PropTypes from 'prop-types'; import _ from './utils'; import Row from './row'; import RowSection from './row-section'; +import Const from './const'; const Body = (props) => { const { @@ -14,7 +17,9 @@ const Body = (props) => { isEmpty, noDataIndication, visibleColumnSize, - cellEdit + cellEdit, + selectRow, + selectedRowKeys } = props; let content; @@ -25,7 +30,13 @@ const Body = (props) => { } else { content = data.map((row, index) => { const key = _.get(row, keyField); - const editable = !(cellEdit && cellEdit.nonEditableRows.indexOf(key) > -1); + const editable = !(cellEdit.mode !== Const.UNABLE_TO_CELL_EDIT && + cellEdit.nonEditableRows.indexOf(key) > -1); + + const selected = selectRow.mode !== Const.ROW_SELECT_DISABLED + ? selectedRowKeys.includes(key) + : null; + return ( { columns={ columns } cellEdit={ cellEdit } editable={ editable } + selected={ selected } + selectRow={ selectRow } /> ); }); @@ -48,7 +61,9 @@ const Body = (props) => { Body.propTypes = { keyField: PropTypes.string.isRequired, data: PropTypes.array.isRequired, - columns: PropTypes.array.isRequired + columns: PropTypes.array.isRequired, + selectRow: PropTypes.object, + selectedRowKeys: PropTypes.array }; export default Body; diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index f4aaf8b..2aaf510 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -22,8 +22,11 @@ class BootstrapTable extends PropsBaseResolver(Component) { this.startEditing = this.startEditing.bind(this); this.escapeEditing = this.escapeEditing.bind(this); this.completeEditing = this.completeEditing.bind(this); + this.handleRowSelect = this.handleRowSelect.bind(this); + this.handleAllRowsSelect = this.handleAllRowsSelect.bind(this); this.state = { data: this.store.get(), + selectedRowKeys: this.store.getSelectedRowKeys(), currEditCell: { ridx: null, cidx: null @@ -56,6 +59,14 @@ class BootstrapTable extends PropsBaseResolver(Component) { onComplete: this.completeEditing }); + const cellSelectionInfo = this.resolveCellSelectionProps({ + onRowSelect: this.handleRowSelect + }); + + const headerCellSelectionInfo = this.resolveHeaderCellSelectionProps({ + onAllRowsSelect: this.handleAllRowsSelect + }); + return (
{ caption } { props.children }
@@ -65,6 +76,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { sortField={ this.store.sortField } sortOrder={ this.store.sortOrder } onSort={ this.handleSort } + selectRow={ headerCellSelectionInfo } />
); } + /** + * row selection handler + * @param {String} rowKey - row key of what was selected. + * @param {Boolean} checked - next checked status of input button. + */ + handleRowSelect(rowKey, checked) { + const { mode } = this.props.selectRow; + const { ROW_SELECT_SINGLE } = Const; + + let currSelected = [...this.store.getSelectedRowKeys()]; + + if (mode === ROW_SELECT_SINGLE) { // when select mode is radio + currSelected = [rowKey]; + } else if (checked) { // when select mode is checkbox + currSelected.push(rowKey); + } else { + currSelected = currSelected.filter(value => value !== rowKey); + } + + this.store.setSelectedRowKeys(currSelected); + + this.setState(() => ({ + selectedRowKeys: currSelected + })); + } + + /** + * handle all rows selection on header cell by store.selected or given specific result. + * @param {Boolean} option - customized result for all rows selection + */ + handleAllRowsSelect(option) { + const selected = this.store.isAnySelectedRow(); + + // set next status of all row selected by store.selected or customizing by user. + const result = option || !selected; + + const currSelected = result ? this.store.selectAllRowKeys() : []; + + this.store.setSelectedRowKeys(currSelected); + + this.setState(() => ({ + selectedRowKeys: currSelected + })); + } + handleSort(column) { this.store.sortBy(column); @@ -146,6 +205,9 @@ BootstrapTable.propTypes = { afterSaveCell: PropTypes.func, nonEditableRows: PropTypes.func, timeToCloseMessage: PropTypes.number + }), + selectRow: PropTypes.shape({ + mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired }) }; diff --git a/packages/react-bootstrap-table2/src/const.js b/packages/react-bootstrap-table2/src/const.js index 5391b82..4e10028 100644 --- a/packages/react-bootstrap-table2/src/const.js +++ b/packages/react-bootstrap-table2/src/const.js @@ -4,5 +4,11 @@ export default { UNABLE_TO_CELL_EDIT: 'none', CLICK_TO_CELL_EDIT: 'click', DBCLICK_TO_CELL_EDIT: 'dbclick', - TIME_TO_CLOSE_MESSAGE: 3000 + TIME_TO_CLOSE_MESSAGE: 3000, + ROW_SELECT_SINGLE: 'radio', + ROW_SELECT_MULTIPLE: 'checkbox', + ROW_SELECT_DISABLED: 'ROW_SELECT_DISABLED', + CHECKBOX_STATUS_CHECKED: 'checked', + CHECKBOX_STATUS_INDETERMINATE: 'indeterminate', + CHECKBOX_STATUS_UNCHECKED: 'unchecked' }; diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index 36752f1..8953c63 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -1,20 +1,28 @@ /* eslint react/require-default-props: 0 */ import React from 'react'; import PropTypes from 'prop-types'; +import Const from './const'; import HeaderCell from './header-cell'; - +import SelectionHeaderCell from './row-selection/selection-header-cell'; const Header = (props) => { + const { ROW_SELECT_DISABLED } = Const; + const { columns, onSort, sortField, - sortOrder + sortOrder, + selectRow } = props; + return ( + { + selectRow.mode === ROW_SELECT_DISABLED ? null : + } { columns.map((column, i) => { const currSort = column.dataField === sortField; @@ -38,7 +46,8 @@ Header.propTypes = { columns: PropTypes.array.isRequired, onSort: PropTypes.func, sortField: PropTypes.string, - sortOrder: PropTypes.string + sortOrder: PropTypes.string, + selectRow: PropTypes.object }; export default Header; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index d7ea8af..f01790c 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -40,4 +40,65 @@ export default ExtendBase => ...cellEditInfo }; } + + /** + * props resolver for cell selection + * @param {Object} options - addtional options like callback which are about to merge into props + * + * @returns {Object} result - props for cell selections + * @returns {String} result.mode - input type of row selection or disabled. + */ + resolveCellSelectionProps(options) { + const { selectRow } = this.props; + const { ROW_SELECT_DISABLED } = Const; + + if (_.isDefined(selectRow)) { + return { + ...selectRow, + ...options + }; + } + + return { + mode: ROW_SELECT_DISABLED + }; + } + + /** + * props resolver for header cell selection + * @param {Object} options - addtional options like callback which are about to merge into props + * + * @returns {Object} result - props for cell selections + * @returns {String} result.mode - input type of row selection or disabled. + * @returns {String} result.checkedStatus - checkbox status depending on selected rows counts + */ + resolveHeaderCellSelectionProps(options) { + const { selected } = this.store; + const { selectRow } = this.props; + const { + ROW_SELECT_DISABLED, CHECKBOX_STATUS_CHECKED, + CHECKBOX_STATUS_INDETERMINATE, CHECKBOX_STATUS_UNCHECKED + } = Const; + + if (_.isDefined(selectRow)) { + let checkedStatus; + + const allRowsSelected = this.store.isAllRowsSelected(); + + // checkbox status depending on selected rows counts + if (allRowsSelected) checkedStatus = CHECKBOX_STATUS_CHECKED; + else if (selected.length === 0) checkedStatus = CHECKBOX_STATUS_UNCHECKED; + else checkedStatus = CHECKBOX_STATUS_INDETERMINATE; + + return { + ...selectRow, + ...options, + checkedStatus + }; + } + + return { + mode: ROW_SELECT_DISABLED + }; + } }; diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js new file mode 100644 index 0000000..73b3e4a --- /dev/null +++ b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js @@ -0,0 +1,59 @@ +/* eslint + react/require-default-props: 0 + jsx-a11y/no-noninteractive-element-interactions: 0 +*/ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import Const from '../const'; + +export default class SelectionCell extends Component { + static propTypes = { + mode: PropTypes.string.isRequired, + rowKey: PropTypes.any, + selected: PropTypes.bool, + onRowSelect: PropTypes.func + } + + constructor() { + super(); + this.handleRowClick = this.handleRowClick.bind(this); + } + + shouldComponentUpdate(nextProps) { + const { selected } = this.props; + + return nextProps.selected !== selected; + } + + handleRowClick() { + const { ROW_SELECT_SINGLE } = Const; + const { + mode: inputType, + rowKey, + selected, + onRowSelect + } = this.props; + + const checked = inputType === ROW_SELECT_SINGLE + ? true + : !selected; + + onRowSelect(rowKey, checked); + } + + render() { + const { + mode: inputType, + selected + } = this.props; + + return ( + + + + ); + } +} diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js new file mode 100644 index 0000000..08516d1 --- /dev/null +++ b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js @@ -0,0 +1,76 @@ +/* eslint react/require-default-props: 0 */ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import Constant from '../const'; + +export const CheckBox = ({ checked, indeterminate }) => ( + { + if (input) input.indeterminate = indeterminate; // eslint-disable-line no-param-reassign + }} + /> +); + +CheckBox.propTypes = { + checked: PropTypes.bool.isRequired, + indeterminate: PropTypes.bool.isRequired +}; + +export default class SelectionHeaderCell extends Component { + static propTypes = { + mode: PropTypes.string.isRequired, + checkedStatus: PropTypes.string, + onAllRowsSelect: PropTypes.func + } + + constructor() { + super(); + this.handleCheckBoxClick = this.handleCheckBoxClick.bind(this); + } + + /** + * avoid updating if button is + * 1. radio + * 2. status was not changed. + */ + shouldComponentUpdate(nextProps) { + const { ROW_SELECT_SINGLE } = Constant; + const { mode, checkedStatus } = this.props; + + if (mode === ROW_SELECT_SINGLE) return false; + + return nextProps.checkedStatus !== checkedStatus; + } + + handleCheckBoxClick() { + const { onAllRowsSelect } = this.props; + + onAllRowsSelect(); + } + + render() { + const { + CHECKBOX_STATUS_CHECKED, CHECKBOX_STATUS_INDETERMINATE, ROW_SELECT_SINGLE + } = Constant; + + const { mode, checkedStatus } = this.props; + + const checked = checkedStatus === CHECKBOX_STATUS_CHECKED; + + const indeterminate = checkedStatus === CHECKBOX_STATUS_INDETERMINATE; + + return mode === ROW_SELECT_SINGLE + ? + : ( + + + + ); + } +} diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 117dce4..09d9d7b 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -4,17 +4,24 @@ import PropTypes from 'prop-types'; import _ from './utils'; import Cell from './cell'; +import SelectionCell from './row-selection/selection-cell'; import EditingCell from './editing-cell'; +import Const from './const'; const Row = (props) => { + const { ROW_SELECT_DISABLED } = Const; + const { row, columns, keyField, rowIndex, cellEdit, + selected, + selectRow, editable: editableRow } = props; + const { mode, onStart, @@ -22,8 +29,20 @@ const Row = (props) => { cidx: editingColIdx, ...rest } = cellEdit; + return ( + { + selectRow.mode === ROW_SELECT_DISABLED + ? null + : ( + + ) + } { columns.map((column, index) => { const { dataField } = column; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 2c92725..31a96cd 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -10,6 +10,7 @@ export default class Store { this.sortOrder = undefined; this.sortField = undefined; + this.selected = []; } isEmpty() { @@ -39,4 +40,24 @@ export default class Store { getRowByRowId(rowId) { return this.get().find(row => _.get(row, this.keyField) === rowId); } + + setSelectedRowKeys(selectedKeys) { + this.selected = selectedKeys; + } + + getSelectedRowKeys() { + return this.selected; + } + + selectAllRowKeys() { + return this.data.map(row => _.get(row, this.keyField)); + } + + isAllRowsSelected() { + return this.data.length === this.selected.length; + } + + isAnySelectedRow() { + return this.selected.length > 0; + } } diff --git a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss index 9720bd0..1a87c51 100644 --- a/packages/react-bootstrap-table2/style/react-bootstrap-table.scss +++ b/packages/react-bootstrap-table2/style/react-bootstrap-table.scss @@ -22,6 +22,10 @@ margin: 10px 6.5px; } + th[data-row-selection] { + width: 30px; + } + td.react-bs-table-no-data { text-align: center; } diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 54ba506..30f01dd 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -6,6 +6,7 @@ import Body from '../src/body'; import Row from '../src/row'; import Const from '../src/const'; import RowSection from '../src/row-section'; +import mockBodyResolvedProps from '../test/mock-data/body-resolved-props'; describe('Body', () => { let wrapper; @@ -27,7 +28,7 @@ describe('Body', () => { describe('simplest body', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { @@ -41,6 +42,7 @@ describe('Body', () => { beforeEach(() => { wrapper = shallow( { emptyIndication = 'Table is empty'; wrapper = shallow( { emptyIndicationCallBack = sinon.stub().returns(content); wrapper = shallow( { beforeEach(() => { wrapper = shallow( { } }); }); + + describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { + const keyField = 'id'; + const selectRow = { mode: 'checkbox' }; + + it('props selected should be true if all rows were selected', () => { + wrapper = shallow( + + ); + + expect(wrapper.find(Row).get(0).props.selected).toBe(true); + }); + + it('props selected should be false if all rows were not selected', () => { + wrapper = shallow( + + ); + + expect(wrapper.find(Row).get(0).props.selected).toBe(false); + }); + }); + + describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { + beforeEach(() => { + const keyField = 'id'; + wrapper = shallow( + + ); + }); + + it('prop selected should be null', () => { + expect(wrapper.find(Row).get(0).props.selected).toBeNull(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index e426a5a..2ee2b96 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -140,4 +140,111 @@ describe('BootstrapTable', () => { expect(body.props().cellEdit.onComplete).toBeDefined(); }); }); + + describe('handleRowSelect', () => { + const rowKey = 1; + + describe('when selectRow.mode is radio', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('state.selectedRowKeys should contain only single key', () => { + wrapper.instance().handleRowSelect(rowKey); + expect(wrapper.state('selectedRowKeys')).toEqual([rowKey]); + + wrapper.instance().handleRowSelect(rowKey); + expect(wrapper.state('selectedRowKeys')).toEqual([rowKey]); + }); + }); + + describe('when selectRow.mode is checbox', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + describe('if checked is false', () => { + it('state.selectedRowKeys should pop selected row key', () => { + wrapper.instance().handleRowSelect(rowKey, false); + + expect(wrapper.state('selectedRowKeys')).not.toContain(rowKey); + }); + }); + + describe('if checked is true', () => { + it('state.selectedRowKeys should push one extra key', () => { + wrapper.instance().handleRowSelect(rowKey, true); + + expect(wrapper.state('selectedRowKeys')).toContain(rowKey); + }); + }); + }); + }); + + describe('handleAllRowsSelect', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + describe('when customized option was not given', () => { + describe('when nothing was selected', () => { + it('should select all rows', () => { + wrapper.instance().store.setSelectedRowKeys([]); + + wrapper.instance().handleAllRowsSelect(); + + expect(wrapper.state('selectedRowKeys').length).toBe(data.length); + }); + }); + + describe('when one or more than one row was selected', () => { + it('should unselect all rows', () => { + wrapper.instance().store.setSelectedRowKeys([1]); + + wrapper.instance().handleAllRowsSelect(); + + expect(wrapper.state('selectedRowKeys').length).toBe(0); + }); + }); + }); + + describe('when customized option was given', () => { + describe('when option is truthy', () => { + it('should select all rows', () => { + wrapper.instance().handleAllRowsSelect(true); + + expect(wrapper.state('selectedRowKeys').length).toBe(data.length); + }); + }); + + describe('when option is falsy', () => { + it('should unselect all rows', () => { + wrapper.instance().store.setSelectedRowKeys([1]); + + wrapper.instance().handleAllRowsSelect(false); + + expect(wrapper.state('selectedRowKeys').length).toBe(0); + }); + }); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js index 3f4e783..bd45f41 100644 --- a/packages/react-bootstrap-table2/test/header.test.js +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -2,8 +2,10 @@ import React from 'react'; import { shallow } from 'enzyme'; import HeaderCell from '../src/header-cell'; +import SelectionHeaderCell from '../src//row-selection/selection-header-cell'; import Header from '../src/header'; import Const from '../src/const'; +import mockHeaderResolvedProps from '../test/mock-data/header-resolved-props'; describe('Header', () => { let wrapper; @@ -17,7 +19,7 @@ describe('Header', () => { describe('simplest header', () => { beforeEach(() => { - wrapper = shallow(
); + wrapper = shallow(
); }); it('should render successfully', () => { @@ -32,7 +34,12 @@ describe('Header', () => { beforeEach(() => { wrapper = shallow( -
); +
); }); it('The HeaderCell should receive correct sorting props', () => { @@ -43,4 +50,31 @@ describe('Header', () => { expect(headerCells.at(1).prop('sortOrder')).toBe(Const.SORT_ASC); }); }); + + describe('when the selectRow.mode is radio(single selection)', () => { + beforeEach(() => { + wrapper = shallow(
); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); + }); + + describe('when the selectRow.mode is checkbox(multiple selection)', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox' }; + wrapper = shallow( +
+ ); + }); + + it('should render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(1); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js b/packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js new file mode 100644 index 0000000..d95bf3e --- /dev/null +++ b/packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js @@ -0,0 +1,16 @@ +import Const from '../../src/const'; + +const { ROW_SELECT_DISABLED, UNABLE_TO_CELL_EDIT } = Const; + +export const cellSelectionResolvedProps = { + mode: ROW_SELECT_DISABLED +}; + +export const cellEditResolvedProps = { + mode: UNABLE_TO_CELL_EDIT +}; + +export default { + cellEdit: cellEditResolvedProps, + selectRow: cellSelectionResolvedProps +}; diff --git a/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js b/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js new file mode 100644 index 0000000..23ab27e --- /dev/null +++ b/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js @@ -0,0 +1,11 @@ +import Const from '../../src/const'; + +const { ROW_SELECT_DISABLED } = Const; + +export const headerCellSelectionResolvedProps = { + mode: ROW_SELECT_DISABLED +}; + +export default { + selectRow: headerCellSelectionResolvedProps +}; diff --git a/packages/react-bootstrap-table2/test/props-resolver/index.test.js b/packages/react-bootstrap-table2/test/props-resolver/index.test.js index d27897a..e865126 100644 --- a/packages/react-bootstrap-table2/test/props-resolver/index.test.js +++ b/packages/react-bootstrap-table2/test/props-resolver/index.test.js @@ -22,6 +22,7 @@ describe('TableResolver', () => { id: 2, name: 'B' }]; + const ExtendBase = baseResolver(Component); const BootstrapTableMock = extendTo(ExtendBase); let wrapper; @@ -99,48 +100,264 @@ describe('TableResolver', () => { expect(cellEdit.cidx).toEqual(cidx); }); }); + + describe('if cellEdit prop defined', () => { + const expectNonEditableRows = [1, 2]; + const cellEdit = { + mode: Const.DBCLICK_TO_CELL_EDIT, + onEditing: sinon.stub(), + blurToSave: true, + beforeSaveCell: sinon.stub(), + afterSaveCell: sinon.stub(), + nonEditableRows: sinon.stub().returns(expectNonEditableRows) + }; + + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, cellEdit + }, null); + wrapper = shallow(mockElement); + }); + + it('should resolve a cellEdit correctly', () => { + const cellEditInfo = wrapper.instance().resolveCellEditProps(); + expect(cellEditInfo).toBeDefined(); + expect(cellEditInfo.ridx).toBeNull(); + expect(cellEditInfo.cidx).toBeNull(); + expect(cellEditInfo.mode).toEqual(cellEdit.mode); + expect(cellEditInfo.onEditing).toEqual(cellEdit.onEditing); + expect(cellEditInfo.blurToSave).toEqual(cellEdit.blurToSave); + expect(cellEditInfo.beforeSaveCell).toEqual(cellEdit.beforeSaveCell); + expect(cellEditInfo.afterSaveCell).toEqual(cellEdit.afterSaveCell); + expect(cellEditInfo.nonEditableRows).toEqual(expectNonEditableRows); + }); + + it('should attach options to cellEdit props', () => { + const something = { + test: 1, + cb: sinon.stub() + }; + const cellEditInfo = wrapper.instance().resolveCellEditProps(something); + expect(cellEditInfo).toBeDefined(); + expect(cellEditInfo.test).toEqual(something.test); + expect(cellEditInfo.cb).toEqual(something.cb); + }); + }); }); - describe('if cellEdit prop defined', () => { - const expectNonEditableRows = [1, 2]; - const cellEdit = { - mode: Const.DBCLICK_TO_CELL_EDIT, - onEditing: sinon.stub(), - blurToSave: true, - beforeSaveCell: sinon.stub(), - afterSaveCell: sinon.stub(), - nonEditableRows: sinon.stub().returns(expectNonEditableRows) - }; + describe('resolveCellSelectionProps', () => { + let cellSelectionInfo; + let selectRow; + + describe('if selectRow was not defined', () => { + beforeEach(() => { + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns + }, null); + wrapper = shallow(mockElement); + cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + }); + + it('should return object', () => { + expect(cellSelectionInfo).toBeDefined(); + expect(cellSelectionInfo.constructor).toEqual(Object); + }); + + it('should contain mode in ROW_SELECT_DISABLED', () => { + expect(cellSelectionInfo.mode).toEqual(Const.ROW_SELECT_DISABLED); + }); + }); + + describe('if selectRow was defined', () => { + describe('when mode was defined', () => { + it('should return object which contains ROW_SELECT_SINGLE if mode is radio', () => { + selectRow = { mode: 'radio' }; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + wrapper = shallow(mockElement); + cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + + expect(cellSelectionInfo).toBeDefined(); + expect(cellSelectionInfo.constructor).toEqual(Object); + expect(cellSelectionInfo.mode).toEqual(Const.ROW_SELECT_SINGLE); + }); + + it('should return object which contains ROW_SELECT_MULTIPLE if mode is checkbox', () => { + selectRow = { mode: 'checkbox' }; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + wrapper = shallow(mockElement); + cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + + expect(cellSelectionInfo).toBeDefined(); + expect(cellSelectionInfo.constructor).toEqual(Object); + expect(cellSelectionInfo.mode).toEqual(Const.ROW_SELECT_MULTIPLE); + }); + }); + + describe('when options were given', () => { + beforeEach(() => { + selectRow = {}; + const mockOptions = { + foo: 'test', + bar: sinon.stub() + }; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + wrapper = shallow(mockElement); + cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(mockOptions); + }); + + it('should return object which contain options', () => { + expect(cellSelectionInfo).toEqual(expect.objectContaining({ + foo: 'test', + bar: expect.any(Function) + })); + }); + }); + }); + }); + + describe('resolveHeaderCellSelectionProps', () => { + let headerCellSelectionInfo; + let selectRow; beforeEach(() => { const mockElement = React.createElement(BootstrapTableMock, { - data, keyField, columns, cellEdit + data, keyField, columns }, null); wrapper = shallow(mockElement); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); }); - it('should resolve a cellEdit correctly', () => { - const cellEditInfo = wrapper.instance().resolveCellEditProps(); - expect(cellEditInfo).toBeDefined(); - expect(cellEditInfo.ridx).toBeNull(); - expect(cellEditInfo.cidx).toBeNull(); - expect(cellEditInfo.mode).toEqual(cellEdit.mode); - expect(cellEditInfo.onEditing).toEqual(cellEdit.onEditing); - expect(cellEditInfo.blurToSave).toEqual(cellEdit.blurToSave); - expect(cellEditInfo.beforeSaveCell).toEqual(cellEdit.beforeSaveCell); - expect(cellEditInfo.afterSaveCell).toEqual(cellEdit.afterSaveCell); - expect(cellEditInfo.nonEditableRows).toEqual(expectNonEditableRows); + describe('if selectRow was not defined', () => { + it('should return object', () => { + expect(headerCellSelectionInfo).toBeDefined(); + expect(headerCellSelectionInfo.constructor).toEqual(Object); + }); + + it('should contain mode in ROW_SELECT_DISABLED', () => { + expect(headerCellSelectionInfo.mode).toEqual(Const.ROW_SELECT_DISABLED); + }); }); - it('should attach options to cellEdit props', () => { - const something = { - test: 1, - cb: sinon.stub() - }; - const cellEditInfo = wrapper.instance().resolveCellEditProps(something); - expect(cellEditInfo).toBeDefined(); - expect(cellEditInfo.test).toEqual(something.test); - expect(cellEditInfo.cb).toEqual(something.cb); + describe('if selectRow was defined', () => { + describe('when mode was defined', () => { + it('should return object which contains ROW_SELECT_SINGLE if mode is radio', () => { + selectRow = { mode: 'radio' }; + const selectedRowKeys = []; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectedRowKeys, selectRow + }, null); + wrapper = shallow(mockElement); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + + expect(headerCellSelectionInfo).toBeDefined(); + expect(headerCellSelectionInfo.constructor).toEqual(Object); + expect(headerCellSelectionInfo.mode).toEqual(Const.ROW_SELECT_SINGLE); + }); + + it('should return object which contains ROW_SELECT_MULTIPLE if mode is checkbox', () => { + selectRow = { mode: 'checkbox' }; + const selectedRowKeys = []; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectedRowKeys, selectRow + }, null); + wrapper = shallow(mockElement); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + + expect(headerCellSelectionInfo).toBeDefined(); + expect(headerCellSelectionInfo.constructor).toEqual(Object); + expect(headerCellSelectionInfo.mode).toEqual(Const.ROW_SELECT_MULTIPLE); + }); + }); + + describe('when options were given', () => { + beforeEach(() => { + selectRow = {}; + const mockOptions = { + foo: 'test', + bar: sinon.stub() + }; + const selectedRowKeys = []; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectedRowKeys, selectRow + }, null); + wrapper = shallow(mockElement); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(mockOptions); + }); + + it('should return object which contain options', () => { + expect(headerCellSelectionInfo).toEqual(expect.objectContaining({ + foo: 'test', + bar: expect.any(Function) + })); + }); + }); + + describe('if all rows were selected', () => { + beforeEach(() => { + selectRow = {}; + const selectedRowKeys = [1, 2]; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + + wrapper = shallow(mockElement); + wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); + + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + }); + + it('should return checkedStatus which eqauls to checked', () => { + expect(headerCellSelectionInfo).toEqual(expect.objectContaining({ + checkedStatus: Const.CHECKBOX_STATUS_CHECKED + })); + }); + }); + describe('if part of rows were selected', () => { + beforeEach(() => { + selectRow = {}; + const selectedRowKeys = [1]; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + + wrapper = shallow(mockElement); + wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + }); + + it('should return checkedStatus which eqauls to indeterminate', () => { + expect(headerCellSelectionInfo).toEqual(expect.objectContaining({ + checkedStatus: Const.CHECKBOX_STATUS_INDETERMINATE + })); + }); + }); + + describe('if none of row was selected', () => { + beforeEach(() => { + selectRow = {}; + const selectedRowKeys = []; + const mockElement = React.createElement(BootstrapTableMock, { + data, keyField, columns, selectRow + }, null); + + wrapper = shallow(mockElement); + wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); + + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + }); + + it('should return checkedStatus which eqauls to unchecked', () => { + expect(headerCellSelectionInfo).toEqual(expect.objectContaining({ + checkedStatus: Const.CHECKBOX_STATUS_UNCHECKED + })); + }); + }); }); }); }); diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js new file mode 100644 index 0000000..ca64d3b --- /dev/null +++ b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js @@ -0,0 +1,136 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import sinon from 'sinon'; + +import SelectionCell from '../../src/row-selection/selection-cell'; + +describe('', () => { + const mode = 'checkbox'; + + let wrapper; + + describe('shouldComponentUpdate', () => { + const selected = true; + + describe('when selected prop has not been changed', () => { + it('should not update component', () => { + const nextProps = { selected }; + + wrapper = shallow(); + + expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(false); + }); + }); + + describe('when selected prop has been changed', () => { + it('should update component', () => { + const nextProps = { selected: !selected }; + + wrapper = shallow(); + + expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(true); + }); + }); + }); + + describe('handleRowClick', () => { + describe('when was been clicked', () => { + const rowKey = 1; + const mockOnRowSelect = sinon.stub(); + const spy = sinon.spy(SelectionCell.prototype, 'handleRowClick'); + + beforeEach(() => { + spy.reset(); + mockOnRowSelect.reset(); + }); + + it('should call handleRowClicked', () => { + wrapper = shallow( + + ); + + wrapper.find('td').simulate('click'); + + expect(spy.calledOnce).toBe(true); + expect(mockOnRowSelect.calledOnce).toBe(true); + }); + + describe('if selectRow.mode is radio', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should be called with correct paramters', () => { + // first click + wrapper.find('td').simulate('click'); + expect(mockOnRowSelect.callCount).toBe(1); + expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + + // second click + wrapper.find('td').simulate('click'); + expect(mockOnRowSelect.callCount).toBe(2); + expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + }); + }); + + describe('if selectRow.mode is checkbox', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should be called with correct paramters', () => { + // first click + wrapper.setProps({ selected: true }); + wrapper.find('td').simulate('click'); + expect(mockOnRowSelect.callCount).toBe(1); + expect(mockOnRowSelect.calledWith(rowKey, false)).toBe(true); + + // second click + wrapper.setProps({ selected: false }); + wrapper.find('td').simulate('click'); + expect(mockOnRowSelect.callCount).toBe(2); + expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + }); + }); + }); + }); + + describe('render', () => { + const selected = true; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render component correctly', () => { + expect(wrapper.find('td').length).toBe(1); + expect(wrapper.find('input').length).toBe(1); + expect(wrapper.find('input').get(0).props.type).toBe(mode); + expect(wrapper.find('input').get(0).props.checked).toBe(selected); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js new file mode 100644 index 0000000..ae3837b --- /dev/null +++ b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js @@ -0,0 +1,144 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import sinon from 'sinon'; + +import Constant from '../../src/const'; +import SelectionHeaderCell, { CheckBox } from '../../src/row-selection/selection-header-cell'; + +let wrapper; + +describe('', () => { + describe('shouldComponentUpdate', () => { + describe('when props.mode is radio', () => { + it('should not update component', () => { + wrapper = shallow(); + + expect(wrapper.instance().shouldComponentUpdate({})).toBe(false); + }); + }); + + describe('when props.mode is checkbox', () => { + describe('if checkedStatus prop has not been changed', () => { + it('should not update component', () => { + const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + const nextProps = { checkedStatus }; + + wrapper = shallow( + ); + + expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(false); + }); + }); + + describe('if checkedStatus prop has been changed', () => { + it('should update component', () => { + const { CHECKBOX_STATUS_INDETERMINATE, CHECKBOX_STATUS_CHECKED } = Constant; + const checkedStatus = CHECKBOX_STATUS_CHECKED; + const nextProps = { checkedStatus }; + + wrapper = shallow( + ); + + expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(true); + }); + }); + }); + }); + + describe('handleCheckBoxClick', () => { + describe('when was clicked', () => { + const spy = sinon.spy(SelectionHeaderCell.prototype, 'handleCheckBoxClick'); + const mockOnAllRowsSelect = sinon.stub(); + + beforeEach(() => { + spy.reset(); + mockOnAllRowsSelect.reset(); + }); + + describe('if props.mode is radio', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should do nothing', () => { + wrapper.find('th').simulate('click'); + + expect(spy.callCount).toBe(0); + expect(mockOnAllRowsSelect.callCount).toBe(0); + }); + }); + + describe('if props.mode is checkbox', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should call handleCheckBoxClick', () => { + wrapper.find('th').simulate('click'); + + expect(spy.calledOnce).toBe(true); + expect(mockOnAllRowsSelect.calledOnce).toBe(true); + }); + }); + }); + }); + + describe('render', () => { + describe('when props.mode is radio', () => { + beforeEach(() => { + const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + + wrapper = shallow(); + }); + + it('should not render checkbox', () => { + expect(wrapper.find('th').length).toBe(1); + expect(wrapper.find('th[data-row-selection]').length).toBe(1); + expect(wrapper.find(CheckBox).length).toBe(0); + }); + }); + + describe('when props.mode is checkbox', () => { + const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + + beforeEach(() => { + wrapper = shallow(); + }); + + it('should render checkbox', () => { + const checked = checkedStatus === Constant.CHECKBOX_STATUS_CHECKED; + const indeterminate = checkedStatus === Constant.CHECKBOX_STATUS_INDETERMINATE; + + expect(wrapper.find('th').length).toBe(1); + expect(wrapper.find('th[data-row-selection]').length).toBe(1); + expect(wrapper.find(CheckBox).length).toBe(1); + expect(wrapper.find(CheckBox).get(0).props.checked).toBe(checked); + expect(wrapper.find(CheckBox).get(0).props.indeterminate).toBe(indeterminate); + }); + }); + }); +}); + +describe('', () => { + describe('render', () => { + it('should render component correctly', () => { + const checked = true; + const indeterminate = false; + wrapper = shallow(); + + expect(wrapper.find('input').length).toBe(1); + expect(wrapper.find('input').prop('checked')).toBe(checked); + expect(wrapper.find('input').prop('type')).toBe('checkbox'); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index dd46177..cdbf885 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -6,6 +6,8 @@ import Cell from '../src/cell'; import Row from '../src/row'; import Const from '../src/const'; import EditingCell from '../src/editing-cell'; +import SelectionCell from '../src//row-selection/selection-cell'; +import mockBodyResolvedProps from '../test/mock-data/body-resolved-props'; const defaultColumns = [{ dataField: 'id', @@ -30,7 +32,7 @@ describe('Row', () => { describe('simplest row', () => { beforeEach(() => { wrapper = shallow( - ); + ); }); it('should render successfully', () => { @@ -53,6 +55,7 @@ describe('Row', () => { }; wrapper = shallow( { columns[nonEditableColIndex].editable = false; wrapper = shallow( { columns[nonEditableColIndex].editable = editableCallBack; wrapper = shallow( { columns[nonEditableColIndex].editable = editableCallBack; wrapper = shallow( { beforeEach(() => { wrapper = shallow( { cellEdit.onEscape = sinon.stub(); wrapper = shallow( { }); it('should render EditingCell correctly', () => { + const complexComponents = wrapper.find('tr').children().findWhere( + n => n.type().name === 'Cell' || n.type().name === 'EditingCell'); + expect(wrapper.length).toBe(1); expect(wrapper.find(EditingCell).length).toBe(1); - expect(wrapper.find('tr').children().at(editingColIndex).type()).toEqual(EditingCell); + expect(complexComponents.at(editingColIndex).type()).toEqual(EditingCell); }); }); @@ -248,6 +259,7 @@ describe('Row', () => { cellEdit.onEscape = sinon.stub(); wrapper = shallow( { }); }); }); + + describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(0); + }); + }); + + describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox' }; + wrapper = shallow( + ); + }); + + it('should render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js index 82e6d6c..d3b0ec3 100644 --- a/packages/react-bootstrap-table2/test/store/base.test.js +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -1,5 +1,6 @@ import Base from '../../src/store/base'; import Const from '../../src/const'; +import _ from '../../src/utils'; describe('Store Base', () => { let store; @@ -109,4 +110,41 @@ describe('Store Base', () => { }).toThrow(); }); }); + + describe('selectAllRowKeys', () => { + it('should return all row keys', () => { + const rowKeys = store.selectAllRowKeys(); + + expect(Array.isArray(rowKeys)).toBeTruthy(); + expect(rowKeys).toEqual([3, 2, 4, 1]); + }); + }); + + describe('isAllRowsSelected', () => { + it('should return true when all rows was selected', () => { + store.selected = data.map(row => _.get(row, store.keyField)); + + expect(store.isAllRowsSelected()).toBeTruthy(); + }); + + it('should return false when all rows was not selected', () => { + store.selected = [1]; + + expect(store.isAllRowsSelected()).not.toBeTruthy(); + }); + }); + + describe('isAnySelectedRow', () => { + it('should return true when one or more than one rows were selected', () => { + store.selected = data.map(row => _.get(row, store.keyField)); + + expect(store.isAnySelectedRow()).toBeTruthy(); + }); + + it('should return false when none was selected', () => { + store.selected = []; + + expect(store.isAnySelectedRow()).not.toBeTruthy(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/test-helpers/mock-component.js b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js index 9f2d943..ca7114d 100644 --- a/packages/react-bootstrap-table2/test/test-helpers/mock-component.js +++ b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js @@ -1,9 +1,15 @@ +import Store from '../../src/store/base'; + export const extendTo = Base => class MockComponent extends Base { constructor(props) { super(props); + + const { data } = props; + + this.store = new Store(props); this.state = { - data: this.props.data, + data, currEditCell: { ridx: null, cidx: null From 7a5b88bcf626cc26b6f40dd79233849e9a21385c Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 17 Oct 2017 02:27:48 -0500 Subject: [PATCH 039/136] fix #63 * support async cell editing * refine cellEdit.onUpdate and cellEdit.editing * refine cell edit * add redux * add stories for async cell edit * fix test case and patch tests for async cell editing * patch docs for cellEdit prop * fix bug produced by rebasing lol --- docs/README.md | 31 +- docs/cell-edit-prop.md | 136 +++++++++ .../cell-edit/cell-edit-with-promise-table.js | 75 +++++ .../cell-edit/cell-edit-with-redux-table.js | 212 ++++++++++++++ .../package.json | 3 + .../src/index.js | 84 ++++-- .../src/utils/common.js | 2 + .../stories/index.js | 7 +- .../src/bootstrap-table.js | 104 +++---- .../src/cell-edit-wrapper.js | 105 +++++++ .../src/editing-cell.js | 38 ++- .../src/props-resolver/index.js | 13 +- .../src/stateful-layer.js | 62 +++- .../react-bootstrap-table2/src/store/base.js | 7 +- packages/react-bootstrap-table2/src/utils.js | 7 +- .../test/bootstrap-table.test.js | 52 +++- .../test/cell-edit-wrapper.test.js | 268 ++++++++++++++++++ .../test/editing-cell.test.js | 28 +- .../test/props-resolver/index.test.js | 51 ++-- .../react-bootstrap-table2/test/row.test.js | 5 +- .../test/stateful-layer.test.js | 133 +++++++++ .../test/test-helpers/mock-component.js | 8 +- 22 files changed, 1232 insertions(+), 199 deletions(-) create mode 100644 docs/cell-edit-prop.md create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js create mode 100644 packages/react-bootstrap-table2/src/cell-edit-wrapper.js create mode 100644 packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js create mode 100644 packages/react-bootstrap-table2/test/stateful-layer.test.js diff --git a/docs/README.md b/docs/README.md index 66e6923..14c3cf3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -38,33 +38,4 @@ Same as `.table-hover` class for adding a hover effect (grey background color) o Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half ### cellEdit - [Object] -Assign a valid `cellEdit` object can enable the cell editing on the cell. The default usage is click/dbclick to trigger cell editing and press `ENTER` to save cell or press `ESC` to cancel editing. - -> Note: The `keyField` column can't be edited - -Following is a `cellEdit` object: -```js -{ - mode: 'click', - blurToSave: true, - timeToCloseMessage: 2500, - onEditing: (rowId, dataField, newValue) => { ... }, - beforeSaveCell: (oldValue, newValue, row, column) => { ... }, - afterSaveCell: (oldValue, newValue, row, column) => { ... }, - nonEditableRows: () => { ... } -} -``` -#### cellEdit.mode - [String] -`cellEdit.mode` possible value is `click` and `dbclick`. **It's required value** that tell `react-bootstrap-table2` how to trigger the cell editing. - -#### cellEdit.blurToSave - [Bool] -Default is `false`, enable it will be able to save the cell automatically when blur from the cell editor. - -#### cellEdit.nonEditableRows - [Function] -`cellEdit.nonEditableRows` accept a callback function and expect return an array which used to restrict all the columns of some rows as non-editable. So the each item in return array should be rowkey(`keyField`) - -#### cellEdit.timeToCloseMessage - [Function] -If a [`column.validator`](./columns.md#validator) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond. - -### selectRow - [Object] -Pass prop `selectRow` to enable row selection. For more detail, please navigate to [row selection document](./row-selection.md). +`cellEdit` props accept an object, please see [cellEdit definition](./cell-edit-prop.md) for more detail. diff --git a/docs/cell-edit-prop.md b/docs/cell-edit-prop.md new file mode 100644 index 0000000..328a94e --- /dev/null +++ b/docs/cell-edit-prop.md @@ -0,0 +1,136 @@ +# Properties on cellEdit prop +* [mode (**required**)](#mode) +* [blurToSave](#blurToSave) +* [nonEditableRows](#nonEditableRows) +* [timeToCloseMessage](#timeToCloseMessage) +* [beforeSaveCell](#beforeSaveCell) +* [afterSaveCell](#afterSaveCell) +* [onUpdate](#onUpdate) +* [editing](#editing) +* [errorMessage](#errorMessage) +* [onErrorMessageDisappear](#onErrorMessageDisappear) + +## cellEdit - [Object] +Assign a valid `cellEdit` object can enable the cell editing on the cell. The default usage is click/dbclick to trigger cell editing and press `ENTER` to save cell or press `ESC` to cancel editing. + +> Note: The `keyField` column can't be edited + +Following is the shape of `cellEdit` object: +```js +{ + mode: 'click', + blurToSave: true, + timeToCloseMessage: 2500, + editing: false|true, + errorMessage: '', + onUpdate: (rowId, dataField, newValue) => { ... }, + beforeSaveCell: (oldValue, newValue, row, column) => { ... }, + afterSaveCell: (oldValue, newValue, row, column) => { ... }, + onErrorMessageDisappear: () => { ... }, + nonEditableRows: () => { ... } +} +``` + +### cellEdit.mode - [String] +`cellEdit.mode` possible value is `click` and `dbclick`. **It's required value** that tell `react-bootstrap-table2` how to trigger the cell editing. + +### cellEdit.blurToSave - [Bool] +Default is `false`, enable it will be able to save the cell automatically when blur from the cell editor. + +### cellEdit.nonEditableRows - [Function] +`cellEdit.nonEditableRows` accept a callback function and expect return an array which used to restrict all the columns of some rows as non-editable. So the each item in return array should be rowkey(`keyField`) + +### cellEdit.timeToCloseMessage - [Function] +If a [`column.validator`](./columns.md#validator) defined and the new value is invalid, `react-bootstrap-table2` will popup a alert at the bottom of editor. `cellEdit.timeToCloseMessage` is a chance to let you decide how long the alert should be stay. Default is 3000 millisecond. + +### cellEdit.beforeSaveCell - [Function] +This callback function will be called before triggering cell update. + +```js +const cellEdit = { + // omit... + beforeSaveCell: (oldValue, newValue, row, column) => { ... } +} +``` + +### cellEdit.afterSaveCell - [Function] +This callback function will be called after updating cell. + +```js +const cellEdit = { + // omit... + afterSaveCell: (oldValue, newValue, row, column) => { ... } +}; +``` + +### cellEdit.onUpdate - [Function] +If you want to control the cell updating process by yourself, for example, connect with `Redux` or saving data to backend database, `cellEdit.onUpdate` is a great chance you can work on it. + +Firsylt, `react-bootstrap-table2` allow `cellEdit.onUpdate` to return a promise: + +```js +const cellEdit = { + // omit... + onUpdate: (rowId, dataField, newValue) => { + return apiCall().then(response => { + console.log('update cell to backend successfully'); + // Actually, you dont do any thing here, we will update the new value when resolve your promise + }) + .catch(err => throw new Error(err.message)); + } +}; +``` + +If your promise is resolved successfully, `react-bootstrap-table2` will default help you to update the new cell value. +If your promise is resolved failure, you can throw an `Error` instance, `react-bootstrap-table2` will show up the error message (Same behavior like [`column.validator`](./columns.md#validator)). + +In some case, backend will return a new value to client side and you want to apply this new value instead of the value that user input. In this situation, you can return an object which contain a `value` property: + +```js +const cellEdit = { + // omit... + onUpdate: (rowId, dataField, newValue) => { + return apiCall().then(response => { + return { value: response.value }; // response.value is from your backend api + }) + .catch(err => throw new Error(err.message)); + } +}; +``` + +If your application integgrate with `Redux`, you may need to dispatch an action in `cellEdit.onUpdate` callback. In this circumstances, you need to return `false` explicity which `react-bootstrap-table2` will stop any operation internally and wait rerender by your application. + +In a simple redux application, you probably need to handle those props by your application: + +* [`cellEdit.editing`](#editing): Is cell still on editing or not? This value should always be `true` when saving cell failure. +* [`cellEdit.errorMessage`](#errorMessage): Error message when save the cell failure. +* [`cellEdit.onErrorMessageDisappear`](#onErrorMessageDisappear): This callback will be called when error message alert closed automatically. +* `cellEdit.onUpdate` + +```js +const cellEdit = { + editing: this.props.editing, + errorMessage: this.props.errorMessage, + onErrorMessageDisappear: () => { + // cleanErrorMessage is an action creator + this.props.dispatch(cleanErrorMessage()); + }, + onUpdate: (rowId, dataField, newValue) => { + // updateCell is an action creator + this.props.dispatch(updateCell(rowId, dataField, newValue))); + return false; // Have to return false here + } +}; +``` + +Please check [this](https://github.com/react-bootstrap-table/react-bootstrap-table2/blob/develop/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js) exmaple to learn how use `cellEdit` with a redux application + +### cellEdit.editing - [Bool] +This only used when you want to control cell saving externally, `cellEdit.editing` will be a flag to tell `react-bootstrap-table2` whether currecnt editing cell is still editing or not. Because, it's possible that some error happen when you saving cell, in this situation, you need to configre this value as `false` to keep the cell as edtiable and show up an error message. + +### cellEdit.errorMessage - [String] +Same as [`cellEdit.editing`](#editing). This prop is not often used. Only used when you keep the error message in your application state. + +### cellEdit.onErrorMessageDisappear - [Function] +This callback function will be called when error message discard. + diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js new file mode 100644 index 0000000..c9e6874 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js @@ -0,0 +1,75 @@ +/* eslint no-unused-vars: 0 */ +/* eslint arrow-body-style: 0 */ +import React, { Component } from 'react'; + +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator, sleep } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +class CellEditWithPromise extends Component { + handleCellEditing = (rowId, dataField, newValue) => { + return sleep(1000).then(() => { + if (dataField === 'price' && (newValue < 2000 || isNaN(newValue))) { + throw new Error('Product Price should bigger than $2000'); + } + }); + } + + render() { + const cellEdit = { + mode: 'click', + blurToSave: true, + onUpdate: this.handleCellEditing + }; + + return ( +
+ + { sourceCode } +
+ ); + } +} +`; + +class CellEditWithPromise extends Component { + handleCellEditing = (rowId, dataField, newValue) => { + return sleep(1000).then(() => { + if (dataField === 'price' && (newValue < 2000 || isNaN(newValue))) { + throw new Error('Product Price should bigger than $2000'); + } + }); + } + + render() { + const cellEdit = { + mode: 'click', + blurToSave: true, + onUpdate: this.handleCellEditing + }; + + return ( +
+ + { sourceCode } +
+ ); + } +} + +export default CellEditWithPromise; + diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js new file mode 100644 index 0000000..d961ad1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js @@ -0,0 +1,212 @@ +/* eslint no-unused-vars: 0 */ +/* eslint react/prop-types: 0 */ +/* eslint arrow-body-style: 0 */ +/* eslint consistent-return: 0 */ +/* eslint no-class-assign: 0 */ +import React, { Component } from 'react'; +import thunk from 'redux-thunk'; +import { Provider, connect } from 'react-redux'; +import { createStore, applyMiddleware } from 'redux'; +import { BootstrapTableful } from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +/////////////////////// Action Creator /////////////////////// +const setErrorMessage = (errorMessage = null) => { + return { type: 'SET_ERR_MESSAGE', errorMessage }; +}; + +// Async Action, using redux-thunk +const cellEditingAsync = (rowId, dataField, newValue) => { + return (dispatch) => { + setTimeout(() => { + if (dataField === 'price' && (newValue < 2000 || isNaN(newValue))) { + dispatch(setErrorMessage('Product Price should bigger than $2000')); + } else { + dispatch({ type: 'ADD_SUCCESS', rowId, dataField, newValue }); + } + }, 1200); + }; +}; + +/////////////////////// Component /////////////////////// +class CellEditWithRedux extends Component { + // dispatch a async action + handleCellEditing = (rowId, dataField, newValue) => { + this.props.dispatch(cellEditingAsync(rowId, dataField, newValue)); + return false; + } + + handleErrorMsgDisappear = () => { + this.props.dispatch(setErrorMessage()); + } + + render() { + const cellEdit = { + mode: 'click', + editing: this.props.cellEditing, + errorMessage: this.props.errorMessage, + onUpdate: this.handleCellEditing, + onErrorMessageDisappear: this.handleErrorMsgDisappear + }; + + return ( +
+ + { sourceCode } +
+ ); + } +} +// connect +CellEditWithRedux = connect(state => state)(CellEditWithRedux); + +/////////////////////// Reducer /////////////////////// +// initial state object and simple reducers +const initialState = { + data: productsGenerator(), + cellEditing: false, + errorMessage: null +}; + +const reducers = (state, action) => { + switch (action.type) { + case 'ADD_SUCCESS': { + const { rowId, dataField, newValue } = action; + const data = [...state.data]; + const rowIndex = data.findIndex(r => r.id === rowId); + data[rowIndex][dataField] = newValue; + return { + data, + cellEditing: false, + errorMessage: null + }; + } + case 'SET_ERR_MESSAGE': { + const { errorMessage } = action; + return { + ...state, + cellEditing: true, + errorMessage + }; + } + default: { + return { ...state }; + } + } +}; + +/////////////////////// Index /////////////////////// +const store = createStore(reducers, initialState, applyMiddleware(thunk)); + +const Index = () => ( + + + +); +`; + +const setErrorMessage = (errorMessage = null) => { + return { type: 'SET_ERR_MESSAGE', errorMessage }; +}; + +// Async Action, using redux-thunk +const cellEditingAsync = (rowId, dataField, newValue) => { + return (dispatch) => { + setTimeout(() => { + if (dataField === 'price' && (newValue < 2000 || isNaN(newValue))) { + dispatch(setErrorMessage('Product Price should bigger than $2000')); + } else { + dispatch({ type: 'ADD_SUCCESS', rowId, dataField, newValue }); + } + }, 1200); + }; +}; + +class CellEditWithRedux extends Component { + // dispatch a async action + handleCellEditing = (rowId, dataField, newValue) => { + this.props.dispatch(cellEditingAsync(rowId, dataField, newValue)); + return false; + } + + handleErrorMsgDisappear = () => { + this.props.dispatch(setErrorMessage()); + } + + render() { + const cellEdit = { + mode: 'click', + editing: this.props.cellEditing, + errorMessage: this.props.errorMessage, + onUpdate: this.handleCellEditing, + onErrorMessageDisappear: this.handleErrorMsgDisappear + }; + + return ( +
+ + { sourceCode } +
+ ); + } +} +// connect +CellEditWithRedux = connect(state => state)(CellEditWithRedux); + +// initial state object and simple reducers +const initialState = { + data: productsGenerator(), + cellEditing: false, + errorMessage: null +}; + +const reducers = (state, action) => { + switch (action.type) { + case 'ADD_SUCCESS': { + const { rowId, dataField, newValue } = action; + const data = JSON.parse(JSON.stringify(state.data)); + const rowIndex = data.findIndex(r => r.id === rowId); + data[rowIndex][dataField] = newValue; + return { + data, + cellEditing: false, + errorMessage: null + }; + } + case 'SET_ERR_MESSAGE': { + const { errorMessage } = action; + return { + ...state, + cellEditing: true, + errorMessage + }; + } + default: { + return { ...state }; + } + } +}; + +const store = createStore(reducers, initialState, applyMiddleware(thunk)); + +const Index = () => ( + + + +); + +export default Index; + diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index 4e8bb00..76efab3 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -21,6 +21,9 @@ }, "devDependencies": { "@storybook/react": "^3.2.8", + "react-redux": "^5.0.6", + "redux": "^3.7.2", + "redux-thunk": "^2.2.0", "typed.js": "^2.0.5" } } diff --git a/packages/react-bootstrap-table2-example/src/index.js b/packages/react-bootstrap-table2-example/src/index.js index 6b2f5f9..a1af3b3 100644 --- a/packages/react-bootstrap-table2-example/src/index.js +++ b/packages/react-bootstrap-table2-example/src/index.js @@ -1,7 +1,12 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-debugger: 0 */ +/* eslint arrow-body-style: 0 */ import React from 'react'; import ReactDom from 'react-dom'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import { BootstrapTableful, createTable } from 'react-bootstrap-table2'; + +require('react-bootstrap-table2/style/react-bootstrap-table.scss'); const products = []; @@ -29,38 +34,85 @@ const columns = [{ style: { backgroundColor: 'red' }, - headerTitle: (column, colIndex) => { - console.log(column); - console.log(colIndex); - return 'yes~~~ oh'; - }, classes: 'my-xxx' }, { dataField: 'name', text: 'Product Name', headerTitle: true, formatter: (cell, row) => - (

{ cell }::: ${ row.price }

) + (

{ cell }::: ${ row.price }

), + validator: (newValue, row, column) => { + const validationForm = { + valid: true, + message: null + }; + validationForm.valid = false; + validationForm.message = 'Invalid message'; + return validationForm; + } }, { dataField: 'price', text: 'Product Price', - style: (cell, row, colIndex) => { - console.log(cell); - console.log(row); - console.log(colIndex); - return { - backgroundColor: 'blue' - }; + validator: (newValue, row, column) => { + if (newValue < 2000) { + return { + valid: false, + message: 'Price should bigger than 2000' + }; + } + return true; } }, { dataField: 'nest.address', text: 'Address' }, { dataField: 'nest.postcal', - text: 'Postal' + text: 'Postal', + editable: true, + validator: (newValue, row, column) => true }]; +const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); + +const cellEdit = { + mode: 'click', + blurToSave: true, + // beforeSaveCell: (oldValue, newValue, row, column) => { + // console.log('beforeSavecell'); + // // console.log(oldValue); + // // console.log(newValue); + // // console.log(row); + // // console.log(column); + // }, + // afterSaveCell: (oldValue, newValue, row, column) => { + // console.log('aftersavecell'); + // // console.log(oldValue); + // // console.log(newValue); + // // console.log(row); + // // console.log(column); + // } + onUpdate: (rowId, dataField, newValue) => { + return sleep(1000).then(() => { + // return { forceUpdate: true }; + throw new Error('test is not successfully'); + }); + } + // nonEditableRows: () => [1, 3, 7] +}; + + +// let Table = withCellEdit({ +// mode: 'click', +// blurToSave: true, +// onEditing: (rowId, dataField, newValue) => { +// return sleep(1000).then(() => { +// // return { forceUpdate: true }; +// throw new Error('test is not successfully'); +// }); +// } +// })(BootstrapTable); +// Table = createTable(Table); ReactDom.render( - , + , document.getElementById('example')); diff --git a/packages/react-bootstrap-table2-example/src/utils/common.js b/packages/react-bootstrap-table2-example/src/utils/common.js index 8d95013..724e042 100644 --- a/packages/react-bootstrap-table2-example/src/utils/common.js +++ b/packages/react-bootstrap-table2-example/src/utils/common.js @@ -19,3 +19,5 @@ export const productsGenerator = (quantity = 5, callback) => { })) ); }; + +export const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 4f0d85f..d3c1bec 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -45,6 +45,8 @@ import ColumnLevelEditableTable from 'examples/cell-edit/column-level-editable-t import CellLevelEditable from 'examples/cell-edit/cell-level-editable-table'; import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; import CellEditValidator from 'examples/cell-edit/cell-edit-validator-table'; +import CellEditWithPromise from 'examples/cell-edit/cell-edit-with-promise-table'; +import CellEditWithRedux from 'examples/cell-edit/cell-edit-with-redux-table'; // work on row selection import SingleSelectionTable from 'examples/row-selection/single-selection'; @@ -102,8 +104,11 @@ storiesOf('Cell Editing', module) .add('Column Level Editable', () => ) .add('Cell Level Editable', () => ) .add('Rich Hook Functions', () => ) - .add('Validation', () => ); + .add('Validation', () => ) + .add('Async Cell Editing(Promise)', () => ) + .add('Async Cell Editing(Redux)', () => ); storiesOf('Row Selection', module) .add('Single selection', () => ) .add('Multiple selection', () => ); + diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 2aaf510..d0332c0 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -6,36 +6,32 @@ import cs from 'classnames'; import Header from './header'; import Caption from './caption'; import Body from './body'; -import Store from './store/base'; import PropsBaseResolver from './props-resolver'; import Const from './const'; -import _ from './utils'; class BootstrapTable extends PropsBaseResolver(Component) { constructor(props) { super(props); this.validateProps(); - const { store } = this.props; - this.store = !store ? new Store(props) : store; this.handleSort = this.handleSort.bind(this); - this.startEditing = this.startEditing.bind(this); - this.escapeEditing = this.escapeEditing.bind(this); - this.completeEditing = this.completeEditing.bind(this); this.handleRowSelect = this.handleRowSelect.bind(this); this.handleAllRowsSelect = this.handleAllRowsSelect.bind(this); this.state = { - data: this.store.get(), - selectedRowKeys: this.store.getSelectedRowKeys(), - currEditCell: { - ridx: null, - cidx: null - } + data: props.store.get(), + selectedRowKeys: props.store.getSelectedRowKeys() }; } + componentWillReceiveProps(nextProps) { + this.setState({ + data: nextProps.store.get() + }); + } + render() { const { + store, columns, keyField, striped, @@ -54,9 +50,10 @@ class BootstrapTable extends PropsBaseResolver(Component) { }); const cellEditInfo = this.resolveCellEditProps({ - onStart: this.startEditing, - onEscape: this.escapeEditing, - onComplete: this.completeEditing + onStart: this.props.onStartEditing, + onEscape: this.props.onEscapeEditing, + onUpdate: this.props.onCellUpdate, + currEditCell: this.props.currEditCell }); const cellSelectionInfo = this.resolveCellSelectionProps({ @@ -64,7 +61,9 @@ class BootstrapTable extends PropsBaseResolver(Component) { }); const headerCellSelectionInfo = this.resolveHeaderCellSelectionProps({ - onAllRowsSelect: this.handleAllRowsSelect + onAllRowsSelect: this.handleAllRowsSelect, + selected: store.selected, + allRowsSelected: store.isAllRowsSelected() }); return ( @@ -73,8 +72,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { { caption }
@@ -100,10 +99,10 @@ class BootstrapTable extends PropsBaseResolver(Component) { * @param {Boolean} checked - next checked status of input button. */ handleRowSelect(rowKey, checked) { - const { mode } = this.props.selectRow; + const { selectRow: { mode }, store } = this.props; const { ROW_SELECT_SINGLE } = Const; - let currSelected = [...this.store.getSelectedRowKeys()]; + let currSelected = [...store.getSelectedRowKeys()]; if (mode === ROW_SELECT_SINGLE) { // when select mode is radio currSelected = [rowKey]; @@ -113,7 +112,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { currSelected = currSelected.filter(value => value !== rowKey); } - this.store.setSelectedRowKeys(currSelected); + store.setSelectedRowKeys(currSelected); this.setState(() => ({ selectedRowKeys: currSelected @@ -125,14 +124,15 @@ class BootstrapTable extends PropsBaseResolver(Component) { * @param {Boolean} option - customized result for all rows selection */ handleAllRowsSelect(option) { - const selected = this.store.isAnySelectedRow(); + const { store } = this.props; + const selected = store.isAnySelectedRow(); // set next status of all row selected by store.selected or customizing by user. const result = option || !selected; - const currSelected = result ? this.store.selectAllRowKeys() : []; + const currSelected = result ? store.selectAllRowKeys() : []; - this.store.setSelectedRowKeys(currSelected); + store.setSelectedRowKeys(currSelected); this.setState(() => ({ selectedRowKeys: currSelected @@ -140,44 +140,12 @@ class BootstrapTable extends PropsBaseResolver(Component) { } handleSort(column) { - this.store.sortBy(column); + const { store } = this.props; + store.sortBy(column); this.setState(() => { return { - data: this.store.get() - }; - }); - } - - completeEditing(row, column, newValue) { - const { cellEdit, keyField } = this.props; - const { beforeSaveCell, onEditing, afterSaveCell } = cellEdit; - const oldValue = _.get(row, column.dataField); - const rowId = _.get(row, keyField); - if (_.isFunction(beforeSaveCell)) beforeSaveCell(oldValue, newValue, row, column); - onEditing(rowId, column.dataField, newValue); - if (_.isFunction(afterSaveCell)) afterSaveCell(oldValue, newValue, row, column); - - this.setState(() => { - return { - data: this.store.get(), - currEditCell: { ridx: null, cidx: null } - }; - }); - } - - startEditing(ridx, cidx) { - this.setState(() => { - return { - currEditCell: { ridx, cidx } - }; - }); - } - - escapeEditing() { - this.setState(() => { - return { - currEditCell: { ridx: null, cidx: null } + data: store.get() }; }); } @@ -199,15 +167,27 @@ BootstrapTable.propTypes = { ]), cellEdit: PropTypes.shape({ mode: PropTypes.oneOf([Const.CLICK_TO_CELL_EDIT, Const.DBCLICK_TO_CELL_EDIT]).isRequired, - onEditing: PropTypes.func.isRequired, + onUpdate: PropTypes.func, + onErrorMessageDisappear: PropTypes.func, blurToSave: PropTypes.bool, beforeSaveCell: PropTypes.func, afterSaveCell: PropTypes.func, nonEditableRows: PropTypes.func, - timeToCloseMessage: PropTypes.number + editing: PropTypes.bool, + timeToCloseMessage: PropTypes.number, + errorMessage: PropTypes.string }), selectRow: PropTypes.shape({ mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired + }), + onCellUpdate: PropTypes.func, + onStartEditing: PropTypes.func, + onEscapeEditing: PropTypes.func, + currEditCell: PropTypes.shape({ + ridx: PropTypes.number, + cidx: PropTypes.number, + message: PropTypes.string, + editing: PropTypes.bool }) }; diff --git a/packages/react-bootstrap-table2/src/cell-edit-wrapper.js b/packages/react-bootstrap-table2/src/cell-edit-wrapper.js new file mode 100644 index 0000000..404d796 --- /dev/null +++ b/packages/react-bootstrap-table2/src/cell-edit-wrapper.js @@ -0,0 +1,105 @@ +/* eslint arrow-body-style: 0 */ +/* eslint react/prop-types: 0 */ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import _ from './utils'; + +class CellEditWrapper extends Component { + constructor(props) { + super(props); + this.startEditing = this.startEditing.bind(this); + this.escapeEditing = this.escapeEditing.bind(this); + this.completeEditing = this.completeEditing.bind(this); + this.handleCellUpdate = this.handleCellUpdate.bind(this); + this.updateEditingWithErr = this.updateEditingWithErr.bind(this); + this.state = { + ridx: null, + cidx: null, + message: null, + editing: false + }; + } + + componentWillReceiveProps(nextProps) { + if (nextProps.cellEdit) { + if (nextProps.cellEdit.editing) { + this.setState(() => { + return { + ...this.state, + message: nextProps.cellEdit.errorMessage + }; + }); + } else { + this.escapeEditing(); + } + } + } + + handleCellUpdate(row, column, newValue) { + const { keyField, cellEdit, onUpdateCell } = this.props; + const { beforeSaveCell, afterSaveCell } = cellEdit; + const oldValue = _.get(row, column.dataField); + const rowId = _.get(row, keyField); + if (_.isFunction(beforeSaveCell)) beforeSaveCell(oldValue, newValue, row, column); + if (onUpdateCell(rowId, column.dataField, newValue)) { + if (_.isFunction(afterSaveCell)) afterSaveCell(oldValue, newValue, row, column); + this.completeEditing(); + } + } + + completeEditing() { + this.setState(() => { + return { + ridx: null, + cidx: null, + message: null, + editing: false + }; + }); + } + + startEditing(ridx, cidx) { + this.setState(() => { + return { + ridx, + cidx, + editing: true + }; + }); + } + + escapeEditing() { + this.setState(() => { + return { + ridx: null, + cidx: null, + editing: false + }; + }); + } + + updateEditingWithErr(message) { + this.setState(() => { + return { + ...this.state, + message + }; + }); + } + + render() { + return React.cloneElement(this.props.elem, { + onCellUpdate: this.handleCellUpdate, + onStartEditing: this.startEditing, + onEscapeEditing: this.escapeEditing, + currEditCell: { ...this.state } + }); + } +} + +CellEditWrapper.propTypes = { + elem: PropTypes.element.isRequired, + onUpdateCell: PropTypes.func.isRequired +}; + +export default CellEditWrapper; diff --git a/packages/react-bootstrap-table2/src/editing-cell.js b/packages/react-bootstrap-table2/src/editing-cell.js index 97320c9..339426c 100644 --- a/packages/react-bootstrap-table2/src/editing-cell.js +++ b/packages/react-bootstrap-table2/src/editing-cell.js @@ -23,6 +23,15 @@ class EditingCell extends Component { }; } + componentWillReceiveProps({ message }) { + if (_.isDefined(message)) { + this.createTimer(); + this.setState(() => { + return { invalidMessage: message }; + }); + } + } + componentWillUnmount() { this.clearTimer(); } @@ -33,24 +42,30 @@ class EditingCell extends Component { } } - beforeComplete(row, column, newValue) { + createTimer() { this.clearTimer(); - const { onComplete, timeToCloseMessage } = this.props; + const { timeToCloseMessage, onErrorMessageDisappear } = this.props; + this.indicatorTimer = _.sleep(() => { + this.setState(() => { + return { invalidMessage: null }; + }); + if (_.isFunction(onErrorMessageDisappear)) onErrorMessageDisappear(); + }, timeToCloseMessage); + } + + beforeComplete(row, column, newValue) { + const { onUpdate } = this.props; if (_.isFunction(column.validator)) { const validateForm = column.validator(newValue, row, column); if (_.isObject(validateForm) && !validateForm.valid) { this.setState(() => { return { invalidMessage: validateForm.message }; }); - this.indicatorTimer = setTimeout(() => { - this.setState(() => { - return { invalidMessage: null }; - }); - }, timeToCloseMessage); + this.createTimer(); return; } } - onComplete(row, column, newValue); + onUpdate(row, column, newValue); } handleBlur() { @@ -90,7 +105,8 @@ class EditingCell extends Component { onBlur: this.handleBlur }; - const editorClass = invalidMessage ? cs('animated', 'shake') : null; + const hasError = _.isDefined(invalidMessage); + const editorClass = hasError ? cs('animated', 'shake') : null; return ( - { invalidMessage ? : null } + { hasError ? : null } ); } @@ -108,7 +124,7 @@ class EditingCell extends Component { EditingCell.propTypes = { row: PropTypes.object.isRequired, column: PropTypes.object.isRequired, - onComplete: PropTypes.func.isRequired, + onUpdate: PropTypes.func.isRequired, onEscape: PropTypes.func.isRequired, timeToCloseMessage: PropTypes.number }; diff --git a/packages/react-bootstrap-table2/src/props-resolver/index.js b/packages/react-bootstrap-table2/src/props-resolver/index.js index f01790c..5e227f8 100644 --- a/packages/react-bootstrap-table2/src/props-resolver/index.js +++ b/packages/react-bootstrap-table2/src/props-resolver/index.js @@ -18,13 +18,12 @@ export default ExtendBase => return this.props.data.length === 0; } - resolveCellEditProps(options) { + resolveCellEditProps(options = { currEditCell: null }) { const { cellEdit } = this.props; - const { currEditCell } = this.state; const nonEditableRows = (cellEdit && _.isFunction(cellEdit.nonEditableRows)) ? cellEdit.nonEditableRows() : []; const cellEditInfo = { - ...currEditCell, + ...options.currEditCell, nonEditableRows }; @@ -72,9 +71,9 @@ export default ExtendBase => * @returns {String} result.mode - input type of row selection or disabled. * @returns {String} result.checkedStatus - checkbox status depending on selected rows counts */ - resolveHeaderCellSelectionProps(options) { - const { selected } = this.store; + resolveHeaderCellSelectionProps(options = {}) { const { selectRow } = this.props; + const { allRowsSelected, selected = [], ...rest } = options; const { ROW_SELECT_DISABLED, CHECKBOX_STATUS_CHECKED, CHECKBOX_STATUS_INDETERMINATE, CHECKBOX_STATUS_UNCHECKED @@ -83,8 +82,6 @@ export default ExtendBase => if (_.isDefined(selectRow)) { let checkedStatus; - const allRowsSelected = this.store.isAllRowsSelected(); - // checkbox status depending on selected rows counts if (allRowsSelected) checkedStatus = CHECKBOX_STATUS_CHECKED; else if (selected.length === 0) checkedStatus = CHECKBOX_STATUS_UNCHECKED; @@ -92,7 +89,7 @@ export default ExtendBase => return { ...selectRow, - ...options, + ...rest, checkedStatus }; } diff --git a/packages/react-bootstrap-table2/src/stateful-layer.js b/packages/react-bootstrap-table2/src/stateful-layer.js index c6a0133..8ddfa77 100644 --- a/packages/react-bootstrap-table2/src/stateful-layer.js +++ b/packages/react-bootstrap-table2/src/stateful-layer.js @@ -1,26 +1,72 @@ /* eslint arrow-body-style: 0 */ +/* eslint react/jsx-no-bind: 0 */ +/* eslint no-return-assign: 0 */ +/* eslint react/prop-types: 0 */ import React, { Component } from 'react'; import Store from './store/base'; +import CellEditWrapper from './cell-edit-wrapper'; +import _ from './utils'; const withStateful = (Base) => { class StatefulComponent extends Component { constructor(props) { super(props); this.store = new Store(props); - this.edit = this.edit.bind(this); + this.handleUpdateCell = this.handleUpdateCell.bind(this); } - edit(rowId, dataField, newValue) { - this.store.edit(rowId, dataField, newValue); + componentWillReceiveProps(nextProps) { + this.store.set(nextProps.data); + } + + handleUpdateCell(rowId, dataField, newValue) { + const { cellEdit } = this.props; + // handle cell editing internal + if (!cellEdit.onUpdate) { + this.store.edit(rowId, dataField, newValue); + return true; + } + + // handle cell editing external + const aPromise = cellEdit.onUpdate(rowId, dataField, newValue); + if (_.isDefined(aPromise) && aPromise !== false) { // TODO: should be a promise here + aPromise.then((result = true) => { + const response = result === true ? {} : result; + if (_.isObject(response)) { + const { value } = response; + this.store.edit(rowId, dataField, value || newValue); + this.table.completeEditing(); + } + }).catch((e) => { + this.table.updateEditingWithErr(e.message); + }); + } + return false; + } + + renderCellEdit(elem) { + return ( + this.table = node } + elem={ elem } + onUpdateCell={ this.handleUpdateCell } + /> + ); } render() { - const { props } = this; - const newProps = { ...props }; - if (newProps.cellEdit && !newProps.cellEdit.onEditing) { - newProps.cellEdit.onEditing = this.edit; + const baseProps = { + ...this.props, + store: this.store + }; + + let element = React.createElement(Base, baseProps); + if (this.props.cellEdit) { + element = this.renderCellEdit(element); } - return ; + return element; } } return StatefulComponent; diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 31a96cd..6006861 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -1,3 +1,4 @@ +/* eslint class-methods-use-this: 0 */ import { sort } from './sort'; import Const from '../const'; import _ from '../utils'; @@ -6,7 +7,7 @@ export default class Store { constructor(props) { const { data, keyField } = props; this.keyField = keyField; - this.data = data ? data.slice() : []; + this.set(data); this.sortOrder = undefined; this.sortField = undefined; @@ -37,6 +38,10 @@ export default class Store { return this.data; } + set(data) { + this.data = data ? JSON.parse(JSON.stringify(data)) : []; + } + getRowByRowId(rowId) { return this.get().find(row => _.get(row, this.keyField) === rowId); } diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index bc4febf..4360d0d 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -68,11 +68,16 @@ function isDefined(value) { return typeof value !== 'undefined' && value !== null; } +function sleep(fn, ms) { + return setTimeout(() => fn(), ms); +} + export default { get, set, isFunction, isObject, isEmptyObject, - isDefined + isDefined, + sleep }; diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index 2ee2b96..95cc99e 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -3,6 +3,7 @@ import sinon from 'sinon'; import { shallow } from 'enzyme'; import Caption from '../src/caption'; +import Store from '../src/store/base'; import Header from '../src/header'; import Body from '../src/body'; import BootstrapTable from '../src/bootstrap-table'; @@ -26,9 +27,12 @@ describe('BootstrapTable', () => { name: 'B' }]; + const store = new Store({ data }); + describe('simplest table', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should render successfully', () => { @@ -40,9 +44,8 @@ describe('BootstrapTable', () => { }); it('should have correct default state', () => { - expect(wrapper.state().currEditCell).toBeDefined(); - expect(wrapper.state().currEditCell.ridx).toBeNull(); - expect(wrapper.state().currEditCell.cidx).toBeNull(); + expect(wrapper.state().data).toBeDefined(); + expect(wrapper.state().data).toEqual(store.get()); }); it('should have table-bordered class as default', () => { @@ -52,7 +55,8 @@ describe('BootstrapTable', () => { describe('when hover props is true', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should have table-hover class on table', () => { @@ -62,7 +66,8 @@ describe('BootstrapTable', () => { describe('when striped props is true', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should have table-striped class on table', () => { @@ -72,7 +77,8 @@ describe('BootstrapTable', () => { describe('when condensed props is true', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should have table-condensed class on table', () => { @@ -82,7 +88,8 @@ describe('BootstrapTable', () => { describe('when bordered props is false', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow( + ); }); it('should not have table-condensed class on table', () => { @@ -94,6 +101,7 @@ describe('BootstrapTable', () => { beforeEach(() => { wrapper = shallow( test } keyField="id" columns={ columns } @@ -111,6 +119,12 @@ describe('BootstrapTable', () => { describe('when cellEdit props is defined', () => { const nonEditableRows = [data[1].id]; + const currEditCell = { + ridx: 1, + cidx: 2, + message: null, + editing: false + }; const cellEdit = { mode: Const.CLICK_TO_CELL_EDIT, onEditing: sinon.stub(), @@ -124,7 +138,12 @@ describe('BootstrapTable', () => { columns={ columns } data={ data } bordered={ false } + store={ store } cellEdit={ cellEdit } + onCellUpdate={ sinon.stub() } + onStartEditing={ sinon.stub() } + onEscapeEditing={ sinon.stub() } + currEditCell={ currEditCell } /> ); }); @@ -133,11 +152,13 @@ describe('BootstrapTable', () => { const body = wrapper.find(Body); expect(body.length).toBe(1); expect(body.props().cellEdit.nonEditableRows).toEqual(nonEditableRows); - expect(body.props().cellEdit.ridx).toEqual(wrapper.state().currEditCell.ridx); - expect(body.props().cellEdit.cidx).toEqual(wrapper.state().currEditCell.cidx); + expect(body.props().cellEdit.ridx).toEqual(currEditCell.ridx); + expect(body.props().cellEdit.cidx).toEqual(currEditCell.cidx); + expect(body.props().cellEdit.message).toEqual(currEditCell.message); + expect(body.props().cellEdit.editing).toEqual(currEditCell.editing); expect(body.props().cellEdit.onStart).toBeDefined(); expect(body.props().cellEdit.onEscape).toBeDefined(); - expect(body.props().cellEdit.onComplete).toBeDefined(); + expect(body.props().cellEdit.onUpdate).toBeDefined(); }); }); @@ -149,6 +170,7 @@ describe('BootstrapTable', () => { wrapper = shallow( { wrapper = shallow( { wrapper = shallow( @@ -208,7 +232,7 @@ describe('BootstrapTable', () => { describe('when customized option was not given', () => { describe('when nothing was selected', () => { it('should select all rows', () => { - wrapper.instance().store.setSelectedRowKeys([]); + store.setSelectedRowKeys([]); wrapper.instance().handleAllRowsSelect(); @@ -218,7 +242,7 @@ describe('BootstrapTable', () => { describe('when one or more than one row was selected', () => { it('should unselect all rows', () => { - wrapper.instance().store.setSelectedRowKeys([1]); + store.setSelectedRowKeys([1]); wrapper.instance().handleAllRowsSelect(); @@ -238,7 +262,7 @@ describe('BootstrapTable', () => { describe('when option is falsy', () => { it('should unselect all rows', () => { - wrapper.instance().store.setSelectedRowKeys([1]); + store.setSelectedRowKeys([1]); wrapper.instance().handleAllRowsSelect(false); diff --git a/packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js b/packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js new file mode 100644 index 0000000..cfea0cf --- /dev/null +++ b/packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js @@ -0,0 +1,268 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import Store from '../src/store/base'; +import BootstrapTable from '../src/bootstrap-table'; +import CellEditWrapper from '../src/cell-edit-wrapper'; + +describe('CellEditWrapper', () => { + let wrapper; + let elem; + + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + const cellEdit = { + mode: 'click' + }; + + const keyField = 'id'; + + const store = new Store({ data, keyField }); + + beforeEach(() => { + elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); + wrapper = shallow( + + ); + }); + + it('should render CellEditWrapper correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(BootstrapTable)).toBeDefined(); + }); + + it('should have correct state', () => { + expect(wrapper.state().ridx).toBeNull(); + expect(wrapper.state().cidx).toBeNull(); + expect(wrapper.state().message).toBeNull(); + expect(wrapper.state().editing).toBeFalsy(); + }); + + it('should inject correct props to elem', () => { + expect(wrapper.props().onCellUpdate).toBeDefined(); + expect(wrapper.props().onStartEditing).toBeDefined(); + expect(wrapper.props().onEscapeEditing).toBeDefined(); + expect(wrapper.props().currEditCell).toBeDefined(); + expect(wrapper.props().currEditCell.ridx).toBeNull(); + expect(wrapper.props().currEditCell.cidx).toBeNull(); + expect(wrapper.props().currEditCell.message).toBeNull(); + expect(wrapper.props().currEditCell.editing).toBeFalsy(); + }); + + describe('when receive new cellEdit prop', () => { + const spy = jest.spyOn(CellEditWrapper.prototype, 'escapeEditing'); + + describe('and cellEdit.editing is false', () => { + beforeEach(() => { + elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); + wrapper = shallow( + + ); + wrapper.setProps({ cellEdit: { ...cellEdit, editing: false } }); + }); + + it('should call escapeEditing', () => { + expect(spy).toHaveBeenCalled(); + }); + + it('should have correct state', () => { + expect(wrapper.state().ridx).toBeNull(); + expect(wrapper.state().cidx).toBeNull(); + expect(wrapper.state().message).toBeNull(); + expect(wrapper.state().editing).toBeFalsy(); + }); + }); + + describe('and cellEdit.editing is true', () => { + const errorMessage = 'test'; + const ridx = 1; + const cidx = 2; + + beforeEach(() => { + elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); + wrapper = shallow( + + ); + wrapper.setState({ ridx, cidx, editing: true }); + wrapper.setProps({ cellEdit: { ...cellEdit, editing: true, errorMessage } }); + }); + + it('should have correct state', () => { + expect(wrapper.state().ridx).toEqual(ridx); + expect(wrapper.state().cidx).toEqual(cidx); + expect(wrapper.state().editing).toBeTruthy(); + expect(wrapper.state().message).toEqual(errorMessage); + }); + }); + }); + + describe('call updateEditingWithErr function', () => { + it('should set state.message correctly', () => { + const message = 'test'; + wrapper.instance().updateEditingWithErr(message); + expect(wrapper.state().message).toEqual(message); + }); + }); + + describe('call escapeEditing function', () => { + it('should set state correctly', () => { + wrapper.instance().escapeEditing(); + expect(wrapper.state().ridx).toBeNull(); + expect(wrapper.state().cidx).toBeNull(); + expect(wrapper.state().editing).toBeFalsy(); + }); + }); + + describe('call startEditing function', () => { + it('should set state correctly', () => { + const ridx = 1; + const cidx = 3; + wrapper.instance().startEditing(ridx, cidx); + expect(wrapper.state().ridx).toEqual(ridx); + expect(wrapper.state().cidx).toEqual(cidx); + expect(wrapper.state().editing).toBeTruthy(); + }); + }); + + describe('call completeEditing function', () => { + it('should set state correctly', () => { + wrapper.instance().completeEditing(); + expect(wrapper.state().ridx).toBeNull(); + expect(wrapper.state().cidx).toBeNull(); + expect(wrapper.state().message).toBeNull(); + expect(wrapper.state().editing).toBeFalsy(); + }); + }); + + describe('call handleCellUpdate function', () => { + let onUpdateCellCallBack; + const row = data[0]; + const column = columns[1]; + const newValue = 'new name'; + + beforeEach(() => { + onUpdateCellCallBack = sinon.stub().returns(true); + wrapper = shallow( + + ); + wrapper.instance().handleCellUpdate(row, column, newValue); + }); + + afterEach(() => { onUpdateCellCallBack.reset(); }); + + it('should calling onUpdateCell callback correctly', () => { + expect(onUpdateCellCallBack.callCount).toBe(1); + expect(onUpdateCellCallBack.calledWith(row.id, column.dataField, newValue)).toBe(true); + }); + + describe('when onUpdateCell function return true', () => { + const spy = jest.spyOn(CellEditWrapper.prototype, 'completeEditing'); + + it('should calling completeEditing function', () => { + expect(spy).toHaveBeenCalled(); + }); + + describe('if cellEdit.afterSaveCell prop defined', () => { + const aftereSaveCellCallBack = sinon.stub(); + beforeEach(() => { + cellEdit.beforeSaveCell = aftereSaveCellCallBack; + wrapper = shallow( + + ); + wrapper.instance().handleCellUpdate(row, column, newValue); + }); + + it('should calling cellEdit.afterSaveCell correctly', () => { + expect(aftereSaveCellCallBack.callCount).toBe(1); + expect(aftereSaveCellCallBack.calledWith( + row[column.dataField], newValue, row, column) + ).toBe(true); + }); + }); + }); + + describe('when onUpdateCell function return false', () => { + const spy = jest.spyOn(CellEditWrapper.prototype, 'completeEditing'); + + beforeEach(() => { + onUpdateCellCallBack = sinon.stub().returns(false); + wrapper = shallow( + + ); + wrapper.instance().handleCellUpdate(row, column, newValue); + }); + + it('shouldn\'t calling completeEditing function', () => { + expect(spy).toHaveBeenCalled(); + }); + }); + + describe('if cellEdit.beforeSaveCell prop defined', () => { + const beforeSaveCellCallBack = sinon.stub(); + beforeEach(() => { + cellEdit.beforeSaveCell = beforeSaveCellCallBack; + wrapper = shallow( + + ); + wrapper.instance().handleCellUpdate(row, column, newValue); + }); + + it('should calling cellEdit.beforeSaveCell correctly', () => { + expect(beforeSaveCellCallBack.callCount).toBe(1); + expect(beforeSaveCellCallBack.calledWith( + row[column.dataField], newValue, row, column) + ).toBe(true); + }); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/editing-cell.test.js b/packages/react-bootstrap-table2/test/editing-cell.test.js index 864b7c4..9523f60 100644 --- a/packages/react-bootstrap-table2/test/editing-cell.test.js +++ b/packages/react-bootstrap-table2/test/editing-cell.test.js @@ -10,8 +10,8 @@ import EditorIndicator from '../src/editor-indicator'; describe('EditingCell', () => { let wrapper; + let onUpdate; let onEscape; - let onComplete; const row = { id: 1, name: 'A' @@ -23,14 +23,14 @@ describe('EditingCell', () => { }; beforeEach(() => { - onComplete = sinon.stub(); onEscape = sinon.stub(); + onUpdate = sinon.stub(); wrapper = shallow( ); }); @@ -55,12 +55,12 @@ describe('EditingCell', () => { expect(indicator.length).toEqual(0); }); - it('when press ENTER on TextEditor should call onComplete correctly', () => { + it('when press ENTER on TextEditor should call onUpdate correctly', () => { const newValue = 'test'; const textEditor = wrapper.find(TextEditor); textEditor.simulate('keyDown', { keyCode: 13, currentTarget: { value: newValue } }); - expect(onComplete.callCount).toBe(1); - expect(onComplete.calledWith(row, column, newValue)).toBe(true); + expect(onUpdate.callCount).toBe(1); + expect(onUpdate.calledWith(row, column, newValue)).toBe(true); }); it('when press ESC on TextEditor should call onEscape correctly', () => { @@ -82,19 +82,19 @@ describe('EditingCell', () => { ); }); - it('when blur from TextEditor should call onComplete correctly', () => { + it('when blur from TextEditor should call onUpdate correctly', () => { const textEditor = wrapper.find(TextEditor); textEditor.simulate('blur'); - expect(onComplete.callCount).toBe(1); - expect(onComplete.calledWith(row, column, `${row[column.dataField]}`)).toBe(true); + expect(onUpdate.callCount).toBe(1); + expect(onUpdate.calledWith(row, column, `${row[column.dataField]}`)).toBe(true); }); }); @@ -121,8 +121,8 @@ describe('EditingCell', () => { expect(validatorCallBack.calledWith(newValue, row, column)).toBe(true); }); - it('should not call onComplete', () => { - expect(onComplete.callCount).toBe(0); + it('should not call onUpdate', () => { + expect(onUpdate.callCount).toBe(0); }); it('should set indicatorTimer successfully', () => { @@ -164,8 +164,8 @@ describe('EditingCell', () => { expect(validatorCallBack.calledWith(newValue, row, column)).toBe(true); }); - it('should call onComplete', () => { - expect(onComplete.callCount).toBe(1); + it('should call onUpdate', () => { + expect(onUpdate.callCount).toBe(1); }); }); }); diff --git a/packages/react-bootstrap-table2/test/props-resolver/index.test.js b/packages/react-bootstrap-table2/test/props-resolver/index.test.js index e865126..840db69 100644 --- a/packages/react-bootstrap-table2/test/props-resolver/index.test.js +++ b/packages/react-bootstrap-table2/test/props-resolver/index.test.js @@ -86,18 +86,6 @@ describe('TableResolver', () => { expect(cellEdit).toBeDefined(); expect(cellEdit.mode).toEqual(Const.UNABLE_TO_CELL_EDIT); expect(cellEdit.nonEditableRows.length).toEqual(0); - expect(cellEdit.ridx).toBeNull(); - expect(cellEdit.cidx).toBeNull(); - }); - - it('should resolve a default cellEdit instance even if state.currEditCell changed', () => { - const ridx = 1; - const cidx = 1; - wrapper.setState({ currEditCell: { ridx, cidx } }); - const cellEdit = wrapper.instance().resolveCellEditProps(); - expect(cellEdit).toBeDefined(); - expect(cellEdit.ridx).toEqual(ridx); - expect(cellEdit.cidx).toEqual(cidx); }); }); @@ -105,7 +93,7 @@ describe('TableResolver', () => { const expectNonEditableRows = [1, 2]; const cellEdit = { mode: Const.DBCLICK_TO_CELL_EDIT, - onEditing: sinon.stub(), + onUpdate: sinon.stub(), blurToSave: true, beforeSaveCell: sinon.stub(), afterSaveCell: sinon.stub(), @@ -122,10 +110,8 @@ describe('TableResolver', () => { it('should resolve a cellEdit correctly', () => { const cellEditInfo = wrapper.instance().resolveCellEditProps(); expect(cellEditInfo).toBeDefined(); - expect(cellEditInfo.ridx).toBeNull(); - expect(cellEditInfo.cidx).toBeNull(); expect(cellEditInfo.mode).toEqual(cellEdit.mode); - expect(cellEditInfo.onEditing).toEqual(cellEdit.onEditing); + expect(cellEditInfo.onUpdate).toEqual(cellEdit.onUpdate); expect(cellEditInfo.blurToSave).toEqual(cellEdit.blurToSave); expect(cellEditInfo.beforeSaveCell).toEqual(cellEdit.beforeSaveCell); expect(cellEditInfo.afterSaveCell).toEqual(cellEdit.afterSaveCell); @@ -280,7 +266,9 @@ describe('TableResolver', () => { selectRow = {}; const mockOptions = { foo: 'test', - bar: sinon.stub() + bar: sinon.stub(), + allRowsSelected: false, + selected: [] }; const selectedRowKeys = []; const mockElement = React.createElement(BootstrapTableMock, { @@ -290,12 +278,20 @@ describe('TableResolver', () => { headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(mockOptions); }); - it('should return object which contain options', () => { + it('should return object which contain specified options', () => { expect(headerCellSelectionInfo).toEqual(expect.objectContaining({ foo: 'test', bar: expect.any(Function) })); }); + + it('should return object which can not contain allRowsSelected option', () => { + expect(headerCellSelectionInfo.allRowsSelected).not.toBeDefined(); + }); + + it('should return object which can not contain allRowsSelected option', () => { + expect(headerCellSelectionInfo.selected).not.toBeDefined(); + }); }); describe('if all rows were selected', () => { @@ -307,9 +303,11 @@ describe('TableResolver', () => { }, null); wrapper = shallow(mockElement); - wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + allRowsSelected: true, + selected: selectedRowKeys + }); }); it('should return checkedStatus which eqauls to checked', () => { @@ -318,6 +316,7 @@ describe('TableResolver', () => { })); }); }); + describe('if part of rows were selected', () => { beforeEach(() => { selectRow = {}; @@ -327,8 +326,10 @@ describe('TableResolver', () => { }, null); wrapper = shallow(mockElement); - wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + allRowsSelected: false, + selected: selectedRowKeys + }); }); it('should return checkedStatus which eqauls to indeterminate', () => { @@ -347,9 +348,11 @@ describe('TableResolver', () => { }, null); wrapper = shallow(mockElement); - wrapper.instance().store.setSelectedRowKeys(selectedRowKeys); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + allRowsSelected: false, + selected: selectedRowKeys + }); }); it('should return checkedStatus which eqauls to unchecked', () => { diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index cdbf885..c03848a 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -225,8 +225,9 @@ describe('Row', () => { beforeEach(() => { cellEdit.ridx = rowIndex; cellEdit.cidx = editingColIndex; - cellEdit.onComplete = sinon.stub(); + cellEdit.onUpdate = sinon.stub(); cellEdit.onEscape = sinon.stub(); + cellEdit.onUpdate = sinon.stub(); wrapper = shallow( { beforeEach(() => { cellEdit.ridx = 3; cellEdit.cidx = editingColIndex; - cellEdit.onComplete = sinon.stub(); + cellEdit.onUpdate = sinon.stub(); cellEdit.onEscape = sinon.stub(); wrapper = shallow( { + let wrapper; + + const keyField = 'id'; + + const columns = [{ + dataField: keyField, + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + describe('initialization', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render BootstrapTable successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(BootstrapTable).length).toBe(1); + }); + + it('should creating store successfully', () => { + const store = wrapper.instance().store; + expect(store).toBeDefined(); + expect(store.get()).toEqual(data); + expect(store.keyField).toEqual(keyField); + }); + }); + + describe('when cellEdit is defined', () => { + const spy = jest.spyOn(BootstrapTableful.prototype, 'renderCellEdit'); + const cellEdit = { + mode: 'click' + }; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should calling renderCellEdit function', () => { + expect(spy).toHaveBeenCalled(); + }); + + it('should injecting correct props', () => { + expect(wrapper.props().keyField).toEqual('id'); + expect(wrapper.props().cellEdit).toEqual(cellEdit); + expect(wrapper.props().elem).toBeDefined(); + expect(wrapper.props().onUpdateCell).toBeDefined(); + }); + + describe('for handleUpdateCell function', () => { + const rowId = data[1].id; + const dataField = columns[1].dataField; + const newValue = 'tester'; + let result; + + describe('when cellEdit.onUpdate callback is not defined', () => { + beforeEach(() => { + result = wrapper.instance().handleUpdateCell(rowId, dataField, newValue); + }); + + it('should return true', () => { + expect(result).toBeTruthy(); + }); + + it('should update store data directly', () => { + const store = wrapper.instance().store; + const row = store.getRowByRowId(rowId); + expect(row[dataField]).toEqual(newValue); + }); + }); + + describe('when cellEdit.onUpdate callback is define and which return false', () => { + beforeEach(() => { + cellEdit.onUpdate = sinon.stub().returns(false); + wrapper = shallow( + + ); + result = wrapper.instance().handleUpdateCell(rowId, dataField, newValue); + }); + + it('should calling cellEdit.onUpdate callback correctly', () => { + expect(cellEdit.onUpdate.callCount).toBe(1); + expect(cellEdit.onUpdate.calledWith(rowId, dataField, newValue)).toBe(true); + }); + + it('should return false', () => { + expect(result).toBeFalsy(); + }); + + it('shouldn\'t update store data', () => { + const store = wrapper.instance().store; + const row = store.getRowByRowId(rowId); + expect(row[dataField]).not.toEqual(newValue); + }); + }); + + // We need refactoring handleUpdateCell function for handling promise firstly + // then it will be much easier to test + describe.skip('when cellEdit.onUpdate callback is define and which return a Promise', () => {}); + }); + }); +}); diff --git a/packages/react-bootstrap-table2/test/test-helpers/mock-component.js b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js index ca7114d..f09890e 100644 --- a/packages/react-bootstrap-table2/test/test-helpers/mock-component.js +++ b/packages/react-bootstrap-table2/test/test-helpers/mock-component.js @@ -8,13 +8,7 @@ export const extendTo = Base => const { data } = props; this.store = new Store(props); - this.state = { - data, - currEditCell: { - ridx: null, - cidx: null - } - }; + this.state = { data }; } render() { return null; } From bc67dfcd236661e5c3818508ad69290f3cc0cecb Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 17 Oct 2017 03:42:26 -0500 Subject: [PATCH 040/136] Refine the code base for cell edit --- .../src/{ => cell-edit}/editing-cell.js | 4 ++-- .../src/{ => cell-edit}/editor-indicator.js | 0 .../src/{ => cell-edit}/text-editor.js | 0 .../src/{cell-edit-wrapper.js => cell-edit/wrapper.js} | 2 +- packages/react-bootstrap-table2/src/row.js | 2 +- packages/react-bootstrap-table2/src/stateful-layer.js | 2 +- .../test/{ => cell-edit}/editing-cell.test.js | 8 ++++---- .../test/{ => cell-edit}/text-editor.test.js | 2 +- .../wrapper.test.js} | 6 +++--- packages/react-bootstrap-table2/test/row.test.js | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) rename packages/react-bootstrap-table2/src/{ => cell-edit}/editing-cell.js (98%) rename packages/react-bootstrap-table2/src/{ => cell-edit}/editor-indicator.js (100%) rename packages/react-bootstrap-table2/src/{ => cell-edit}/text-editor.js (100%) rename packages/react-bootstrap-table2/src/{cell-edit-wrapper.js => cell-edit/wrapper.js} (98%) rename packages/react-bootstrap-table2/test/{ => cell-edit}/editing-cell.test.js (95%) rename packages/react-bootstrap-table2/test/{ => cell-edit}/text-editor.test.js (94%) rename packages/react-bootstrap-table2/test/{cell-edit-wrapper.test.js => cell-edit/wrapper.test.js} (98%) diff --git a/packages/react-bootstrap-table2/src/editing-cell.js b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js similarity index 98% rename from packages/react-bootstrap-table2/src/editing-cell.js rename to packages/react-bootstrap-table2/src/cell-edit/editing-cell.js index 339426c..3102f58 100644 --- a/packages/react-bootstrap-table2/src/editing-cell.js +++ b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js @@ -5,8 +5,8 @@ import React, { Component } from 'react'; import cs from 'classnames'; import PropTypes from 'prop-types'; -import _ from './utils'; -import Const from './const'; +import _ from '../utils'; +import Const from '../const'; import TextEditor from './text-editor'; import EditorIndicator from './editor-indicator'; diff --git a/packages/react-bootstrap-table2/src/editor-indicator.js b/packages/react-bootstrap-table2/src/cell-edit/editor-indicator.js similarity index 100% rename from packages/react-bootstrap-table2/src/editor-indicator.js rename to packages/react-bootstrap-table2/src/cell-edit/editor-indicator.js diff --git a/packages/react-bootstrap-table2/src/text-editor.js b/packages/react-bootstrap-table2/src/cell-edit/text-editor.js similarity index 100% rename from packages/react-bootstrap-table2/src/text-editor.js rename to packages/react-bootstrap-table2/src/cell-edit/text-editor.js diff --git a/packages/react-bootstrap-table2/src/cell-edit-wrapper.js b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js similarity index 98% rename from packages/react-bootstrap-table2/src/cell-edit-wrapper.js rename to packages/react-bootstrap-table2/src/cell-edit/wrapper.js index 404d796..20f68c0 100644 --- a/packages/react-bootstrap-table2/src/cell-edit-wrapper.js +++ b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js @@ -2,7 +2,7 @@ /* eslint react/prop-types: 0 */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import _ from './utils'; +import _ from '../utils'; class CellEditWrapper extends Component { constructor(props) { diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 09d9d7b..fe894fc 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import _ from './utils'; import Cell from './cell'; import SelectionCell from './row-selection/selection-cell'; -import EditingCell from './editing-cell'; +import EditingCell from './cell-edit/editing-cell'; import Const from './const'; const Row = (props) => { diff --git a/packages/react-bootstrap-table2/src/stateful-layer.js b/packages/react-bootstrap-table2/src/stateful-layer.js index 8ddfa77..e7432fc 100644 --- a/packages/react-bootstrap-table2/src/stateful-layer.js +++ b/packages/react-bootstrap-table2/src/stateful-layer.js @@ -4,7 +4,7 @@ /* eslint react/prop-types: 0 */ import React, { Component } from 'react'; import Store from './store/base'; -import CellEditWrapper from './cell-edit-wrapper'; +import CellEditWrapper from './cell-edit/wrapper'; import _ from './utils'; const withStateful = (Base) => { diff --git a/packages/react-bootstrap-table2/test/editing-cell.test.js b/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js similarity index 95% rename from packages/react-bootstrap-table2/test/editing-cell.test.js rename to packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js index 9523f60..c6157ab 100644 --- a/packages/react-bootstrap-table2/test/editing-cell.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js @@ -3,10 +3,10 @@ import React from 'react'; import sinon from 'sinon'; import { shallow, mount } from 'enzyme'; -import { TableRowWrapper } from './test-helpers/table-wrapper'; -import EditingCell from '../src/editing-cell'; -import TextEditor from '../src/text-editor'; -import EditorIndicator from '../src/editor-indicator'; +import { TableRowWrapper } from '../test-helpers/table-wrapper'; +import EditingCell from '../../src/cell-edit/editing-cell'; +import TextEditor from '../../src/cell-edit/text-editor'; +import EditorIndicator from '../../src/cell-edit/editor-indicator'; describe('EditingCell', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/text-editor.test.js b/packages/react-bootstrap-table2/test/cell-edit/text-editor.test.js similarity index 94% rename from packages/react-bootstrap-table2/test/text-editor.test.js rename to packages/react-bootstrap-table2/test/cell-edit/text-editor.test.js index 0150bc3..907e991 100644 --- a/packages/react-bootstrap-table2/test/text-editor.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/text-editor.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import TextEditor from '../src/text-editor'; +import TextEditor from '../../src/cell-edit/text-editor'; describe('TextEditor', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js similarity index 98% rename from packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js rename to packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js index cfea0cf..ac504fa 100644 --- a/packages/react-bootstrap-table2/test/cell-edit-wrapper.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js @@ -2,9 +2,9 @@ import React from 'react'; import sinon from 'sinon'; import { shallow } from 'enzyme'; -import Store from '../src/store/base'; -import BootstrapTable from '../src/bootstrap-table'; -import CellEditWrapper from '../src/cell-edit-wrapper'; +import Store from '../../src/store/base'; +import BootstrapTable from '../../src/bootstrap-table'; +import CellEditWrapper from '../../src/cell-edit/wrapper'; describe('CellEditWrapper', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index c03848a..ea17158 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -5,7 +5,7 @@ import { shallow } from 'enzyme'; import Cell from '../src/cell'; import Row from '../src/row'; import Const from '../src/const'; -import EditingCell from '../src/editing-cell'; +import EditingCell from '../src/cell-edit/editing-cell'; import SelectionCell from '../src//row-selection/selection-cell'; import mockBodyResolvedProps from '../test/mock-data/body-resolved-props'; From 6887c12d11710727801d19cadc8573a494779331 Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 17 Oct 2017 04:30:23 -0500 Subject: [PATCH 041/136] no need BootstrapTableful anymore * refine BootstrapTableful -> BootstrapTable * refine stateful-layer as container --- docs/row-selection.md | 4 ++-- .../examples/basic/borderless-table.js | 6 +++--- .../examples/basic/caption-table.js | 10 +++++----- .../examples/basic/index.js | 6 +++--- .../examples/basic/no-data-table.js | 8 ++++---- .../examples/basic/striped-hover-condensed-table.js | 6 +++--- .../examples/cell-edit/blur-to-save-table.js | 6 +++--- .../examples/cell-edit/cell-edit-hooks-table.js | 6 +++--- .../examples/cell-edit/cell-edit-validator-table.js | 6 +++--- .../cell-edit/cell-edit-with-promise-table.js | 6 +++--- .../cell-edit/cell-edit-with-redux-table.js | 6 +++--- .../examples/cell-edit/cell-level-editable-table.js | 6 +++--- .../examples/cell-edit/click-to-edit-table.js | 6 +++--- .../cell-edit/column-level-editable-table.js | 6 +++--- .../examples/cell-edit/dbclick-to-edit-table.js | 6 +++--- .../examples/cell-edit/row-level-editable-table.js | 6 +++--- .../examples/columns/column-align-table.js | 6 +++--- .../examples/columns/column-attrs-table.js | 6 +++--- .../examples/columns/column-class-table.js | 6 +++--- .../examples/columns/column-event-table.js | 6 +++--- .../examples/columns/column-format-table.js | 6 +++--- .../columns/column-format-with-extra-data-table.js | 6 +++--- .../examples/columns/column-hidden-table.js | 6 +++--- .../examples/columns/column-style-table.js | 6 +++--- .../examples/columns/column-title-table.js | 6 +++--- .../examples/columns/nested-data-table.js | 6 +++--- .../examples/header-columns/column-align-table.js | 6 +++--- .../examples/header-columns/column-attrs-table.js | 6 +++--- .../examples/header-columns/column-class-table.js | 6 +++--- .../examples/header-columns/column-event-table.js | 6 +++--- .../examples/header-columns/column-format-table.js | 6 +++--- .../examples/header-columns/column-style-table.js | 6 +++--- .../examples/header-columns/column-title-table.js | 6 +++--- .../examples/row-selection/multiple-selection.js | 6 +++--- .../examples/row-selection/single-selection.js | 6 +++--- .../examples/sort/custom-sort-table.js | 6 +++--- .../examples/sort/enable-sort-table.js | 6 +++--- .../react-bootstrap-table2-example/src/index.js | 4 ++-- .../src/{stateful-layer.js => container.js} | 9 ++++----- packages/react-bootstrap-table2/src/index.js | 8 ++------ .../{stateful-layer.test.js => container.test.js} | 13 ++++++------- 41 files changed, 127 insertions(+), 133 deletions(-) rename packages/react-bootstrap-table2/src/{stateful-layer.js => container.js} (93%) rename packages/react-bootstrap-table2/test/{stateful-layer.test.js => container.test.js} (90%) diff --git a/docs/row-selection.md b/docs/row-selection.md index 3671093..b9a31c9 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -26,7 +26,7 @@ Specifying the selection way for `single(radio)` or `multiple(checkbox)`. If `ra const selectRowProp = { mode: 'radio' // single row selection }; - (
-

Component as Header

; - + -} columns={ columns } /> +} columns={ columns } /> `; const Caption = () =>

Component as Header

; export default () => (
- - } columns={ columns } /> + + } columns={ columns } /> { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js index 096eb77..91a6588 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/index.js +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -29,12 +29,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js index 8c341d2..44d8662 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/no-data-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; const columns = [{ @@ -15,7 +15,7 @@ const columns = [{ }]; const sourceCode = `\ - + // Following is more customizable example @@ -23,12 +23,12 @@ function indication() { // return something here } - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js index bd1aa90..97b4879 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -18,7 +18,7 @@ const columns = [{ }]; const sourceCode = `\ - (
- (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js index 0238ec5..24779fc 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-hooks-table.js @@ -2,7 +2,7 @@ /* eslint no-console: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,7 +37,7 @@ const cellEdit = { afterSaveCell: (oldValue, newValue, row, column) => { console.log('After Saving Cell!!'); } }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js index d3dcffb..6b31c5d 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-validator-table.js @@ -1,6 +1,6 @@ import React from 'react'; /* eslint no-unused-vars: 0 */ -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -64,7 +64,7 @@ const cellEdit = { blurToSave: true }; - (

Product Price should bigger than $2000

- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js index c9e6874..c66e3bd 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-promise-table.js @@ -2,7 +2,7 @@ /* eslint arrow-body-style: 0 */ import React, { Component } from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator, sleep } from 'utils/common'; @@ -38,7 +38,7 @@ class CellEditWithPromise extends Component { return (
- + { sourceCode }
); @@ -64,7 +64,7 @@ class CellEditWithPromise extends Component { return (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js index d961ad1..ebd0e3c 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js @@ -7,7 +7,7 @@ import React, { Component } from 'react'; import thunk from 'redux-thunk'; import { Provider, connect } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -64,7 +64,7 @@ class CellEditWithRedux extends Component { return (
- + { sourceCode }
); @@ -157,7 +157,7 @@ class CellEditWithRedux extends Component { return (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js index da825d1..331792a 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-level-editable-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -36,7 +36,7 @@ const cellEdit = { mode: 'click' }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js index 0030936..f48e6e4 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/click-to-edit-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -33,7 +33,7 @@ const cellEdit = { mode: 'click' }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js index b777486..0242911 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/column-level-editable-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,7 +37,7 @@ const cellEdit = { blurToSave: true }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js index 37a1061..c51a155 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/dbclick-to-edit-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -33,7 +33,7 @@ const cellEdit = { mode: 'dbclick' }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js index 4033f75..99f177a 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/row-level-editable-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -36,7 +36,7 @@ const cellEdit = { nonEditableRows: () => [0, 3] }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js index 37b510f..3385a6e 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -40,12 +40,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js index 43c377a..0446225 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-attrs-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -34,12 +34,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js index 3a1e6fc..d1c6057 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -40,12 +40,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js index 2ffc74a..3403a21 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -2,7 +2,7 @@ /* eslint no-alert: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,13 +37,13 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (

Try to Click on Product ID columns

- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js index 1d6ece6..6542af3 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -53,7 +53,7 @@ const columns = [ formatter: priceFormatter }]; - (
- (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js index 4dae9bc..c559317 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -58,12 +58,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js index f75455a..e92d3df 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -34,12 +34,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js index 2852c7c..8876d06 100644 --- a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -49,12 +49,12 @@ const columns = [{ text: 'PostCode' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js index cbdfcdd..013a443 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -34,12 +34,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js index ad2c5d9..4318fb6 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-attrs-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -34,12 +34,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js index a317da1..031e239 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-class-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -40,12 +40,12 @@ const columns = [{ } }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js index 3e892ef..ca547ac 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -2,7 +2,7 @@ /* eslint no-alert: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,13 +37,13 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (

Try to Click on Product ID header column

- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js index b9d6373..ddc554b 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -40,7 +40,7 @@ const columns = [ headerFormatter: priceFormatter }]; - (
- + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js index 41884ab..ac2b9b9 100644 --- a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -1,7 +1,7 @@ /* eslint no-unused-vars: 0 */ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -34,12 +34,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js index 46f2453..8228902 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,7 +37,7 @@ const selectRowProp = { mode: 'checkbox' }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js index b02f058..15827b9 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -37,7 +37,7 @@ const selectRowProp = { mode: 'radio' }; - (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js b/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js index d362e8d..1763a3e 100644 --- a/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js +++ b/packages/react-bootstrap-table2-example/examples/sort/custom-sort-table.js @@ -2,7 +2,7 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -49,12 +49,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js b/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js index 255414b..45c7ff4 100644 --- a/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js +++ b/packages/react-bootstrap-table2-example/examples/sort/enable-sort-table.js @@ -1,6 +1,6 @@ import React from 'react'; -import { BootstrapTableful } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; @@ -33,12 +33,12 @@ const columns = [{ text: 'Product Price' }]; - + `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/src/index.js b/packages/react-bootstrap-table2-example/src/index.js index a1af3b3..10b6085 100644 --- a/packages/react-bootstrap-table2-example/src/index.js +++ b/packages/react-bootstrap-table2-example/src/index.js @@ -4,7 +4,7 @@ import React from 'react'; import ReactDom from 'react-dom'; -import { BootstrapTableful, createTable } from 'react-bootstrap-table2'; +import BootstrapTable from 'react-bootstrap-table2'; require('react-bootstrap-table2/style/react-bootstrap-table.scss'); @@ -114,5 +114,5 @@ const cellEdit = { // Table = createTable(Table); ReactDom.render( - , + , document.getElementById('example')); diff --git a/packages/react-bootstrap-table2/src/stateful-layer.js b/packages/react-bootstrap-table2/src/container.js similarity index 93% rename from packages/react-bootstrap-table2/src/stateful-layer.js rename to packages/react-bootstrap-table2/src/container.js index e7432fc..f635789 100644 --- a/packages/react-bootstrap-table2/src/stateful-layer.js +++ b/packages/react-bootstrap-table2/src/container.js @@ -7,8 +7,8 @@ import Store from './store/base'; import CellEditWrapper from './cell-edit/wrapper'; import _ from './utils'; -const withStateful = (Base) => { - class StatefulComponent extends Component { +const withDataStore = (Base) => { + return class BootstrapTableContainer extends Component { constructor(props) { super(props); this.store = new Store(props); @@ -68,8 +68,7 @@ const withStateful = (Base) => { } return element; } - } - return StatefulComponent; + }; }; -export default withStateful; +export default withDataStore; diff --git a/packages/react-bootstrap-table2/src/index.js b/packages/react-bootstrap-table2/src/index.js index c787801..db955bd 100644 --- a/packages/react-bootstrap-table2/src/index.js +++ b/packages/react-bootstrap-table2/src/index.js @@ -1,9 +1,5 @@ import BootstrapTable from './bootstrap-table'; -import withStateful from './stateful-layer'; +import withDataStore from './container'; -const BootstrapTableful = withStateful(BootstrapTable); +export default withDataStore(BootstrapTable); -export { - BootstrapTable, - BootstrapTableful -}; diff --git a/packages/react-bootstrap-table2/test/stateful-layer.test.js b/packages/react-bootstrap-table2/test/container.test.js similarity index 90% rename from packages/react-bootstrap-table2/test/stateful-layer.test.js rename to packages/react-bootstrap-table2/test/container.test.js index 23bc888..371441f 100644 --- a/packages/react-bootstrap-table2/test/stateful-layer.test.js +++ b/packages/react-bootstrap-table2/test/container.test.js @@ -2,9 +2,9 @@ import React from 'react'; import sinon from 'sinon'; import { shallow } from 'enzyme'; -import { BootstrapTable, BootstrapTableful } from '../src'; +import BootstrapTable from '../src'; -describe('withStateful', () => { +describe('withDataStore', () => { let wrapper; const keyField = 'id'; @@ -28,13 +28,12 @@ describe('withStateful', () => { describe('initialization', () => { beforeEach(() => { wrapper = shallow( - + ); }); it('should render BootstrapTable successfully', () => { expect(wrapper.length).toBe(1); - expect(wrapper.find(BootstrapTable).length).toBe(1); }); it('should creating store successfully', () => { @@ -46,14 +45,14 @@ describe('withStateful', () => { }); describe('when cellEdit is defined', () => { - const spy = jest.spyOn(BootstrapTableful.prototype, 'renderCellEdit'); + const spy = jest.spyOn(BootstrapTable.prototype, 'renderCellEdit'); const cellEdit = { mode: 'click' }; beforeEach(() => { wrapper = shallow( - { beforeEach(() => { cellEdit.onUpdate = sinon.stub().returns(false); wrapper = shallow( - Date: Tue, 17 Oct 2017 10:23:36 -0500 Subject: [PATCH 042/136] refine row selection to wrapper * refine row selection code base to wrapper * refine testing for moving row selection code base to wrapper --- .../src/bootstrap-table.js | 59 +------- .../react-bootstrap-table2/src/container.js | 24 +++- .../src/row-selection/wrapper.js | 77 +++++++++++ .../test/bootstrap-table.test.js | 110 --------------- .../test/row-selection/wrapper.test.js | 126 ++++++++++++++++++ 5 files changed, 230 insertions(+), 166 deletions(-) create mode 100644 packages/react-bootstrap-table2/src/row-selection/wrapper.js create mode 100644 packages/react-bootstrap-table2/test/row-selection/wrapper.test.js diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index d0332c0..41ef625 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -15,11 +15,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { this.validateProps(); this.handleSort = this.handleSort.bind(this); - this.handleRowSelect = this.handleRowSelect.bind(this); - this.handleAllRowsSelect = this.handleAllRowsSelect.bind(this); this.state = { - data: props.store.get(), - selectedRowKeys: props.store.getSelectedRowKeys() + data: props.store.get() }; } @@ -57,11 +54,11 @@ class BootstrapTable extends PropsBaseResolver(Component) { }); const cellSelectionInfo = this.resolveCellSelectionProps({ - onRowSelect: this.handleRowSelect + onRowSelect: this.props.onRowSelect }); const headerCellSelectionInfo = this.resolveHeaderCellSelectionProps({ - onAllRowsSelect: this.handleAllRowsSelect, + onAllRowsSelect: this.props.onAllRowsSelect, selected: store.selected, allRowsSelected: store.isAllRowsSelected() }); @@ -86,59 +83,13 @@ class BootstrapTable extends PropsBaseResolver(Component) { noDataIndication={ noDataIndication } cellEdit={ cellEditInfo } selectRow={cellSelectionInfo} - selectedRowKeys={this.state.selectedRowKeys} + selectedRowKeys={store.getSelectedRowKeys()} />
); } - /** - * row selection handler - * @param {String} rowKey - row key of what was selected. - * @param {Boolean} checked - next checked status of input button. - */ - handleRowSelect(rowKey, checked) { - const { selectRow: { mode }, store } = this.props; - const { ROW_SELECT_SINGLE } = Const; - - let currSelected = [...store.getSelectedRowKeys()]; - - if (mode === ROW_SELECT_SINGLE) { // when select mode is radio - currSelected = [rowKey]; - } else if (checked) { // when select mode is checkbox - currSelected.push(rowKey); - } else { - currSelected = currSelected.filter(value => value !== rowKey); - } - - store.setSelectedRowKeys(currSelected); - - this.setState(() => ({ - selectedRowKeys: currSelected - })); - } - - /** - * handle all rows selection on header cell by store.selected or given specific result. - * @param {Boolean} option - customized result for all rows selection - */ - handleAllRowsSelect(option) { - const { store } = this.props; - const selected = store.isAnySelectedRow(); - - // set next status of all row selected by store.selected or customizing by user. - const result = option || !selected; - - const currSelected = result ? store.selectAllRowKeys() : []; - - store.setSelectedRowKeys(currSelected); - - this.setState(() => ({ - selectedRowKeys: currSelected - })); - } - handleSort(column) { const { store } = this.props; store.sortBy(column); @@ -180,6 +131,8 @@ BootstrapTable.propTypes = { selectRow: PropTypes.shape({ mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired }), + onRowSelect: PropTypes.func, + onAllRowsSelect: PropTypes.func, onCellUpdate: PropTypes.func, onStartEditing: PropTypes.func, onEscapeEditing: PropTypes.func, diff --git a/packages/react-bootstrap-table2/src/container.js b/packages/react-bootstrap-table2/src/container.js index f635789..fe35f9f 100644 --- a/packages/react-bootstrap-table2/src/container.js +++ b/packages/react-bootstrap-table2/src/container.js @@ -5,6 +5,7 @@ import React, { Component } from 'react'; import Store from './store/base'; import CellEditWrapper from './cell-edit/wrapper'; +import RowSelectionWrapper from './row-selection/wrapper'; import _ from './utils'; const withDataStore = (Base) => { @@ -35,10 +36,10 @@ const withDataStore = (Base) => { if (_.isObject(response)) { const { value } = response; this.store.edit(rowId, dataField, value || newValue); - this.table.completeEditing(); + this.cellEditWrapper.completeEditing(); } }).catch((e) => { - this.table.updateEditingWithErr(e.message); + this.cellEditWrapper.updateEditingWithErr(e.message); }); } return false; @@ -49,13 +50,24 @@ const withDataStore = (Base) => { this.table = node } + ref={ node => this.cellEditWrapper = node } elem={ elem } onUpdateCell={ this.handleUpdateCell } /> ); } + renderRowSelection(elem) { + return ( + + ); + } + render() { const baseProps = { ...this.props, @@ -63,9 +75,15 @@ const withDataStore = (Base) => { }; let element = React.createElement(Base, baseProps); + + if (this.props.selectRow) { + element = this.renderRowSelection(element); + } + if (this.props.cellEdit) { element = this.renderCellEdit(element); } + return element; } }; diff --git a/packages/react-bootstrap-table2/src/row-selection/wrapper.js b/packages/react-bootstrap-table2/src/row-selection/wrapper.js new file mode 100644 index 0000000..ab2fb9f --- /dev/null +++ b/packages/react-bootstrap-table2/src/row-selection/wrapper.js @@ -0,0 +1,77 @@ +/* eslint arrow-body-style: 0 */ +/* eslint react/prop-types: 0 */ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +import Const from '../const'; + +class RowSelectionWrapper extends Component { + constructor(props) { + super(props); + this.handleRowSelect = this.handleRowSelect.bind(this); + this.handleAllRowsSelect = this.handleAllRowsSelect.bind(this); + this.state = { + selectedRowKeys: props.store.getSelectedRowKeys() + }; + } + + /** + * row selection handler + * @param {String} rowKey - row key of what was selected. + * @param {Boolean} checked - next checked status of input button. + */ + handleRowSelect(rowKey, checked) { + const { selectRow: { mode }, store } = this.props; + const { ROW_SELECT_SINGLE } = Const; + + let currSelected = [...store.getSelectedRowKeys()]; + + if (mode === ROW_SELECT_SINGLE) { // when select mode is radio + currSelected = [rowKey]; + } else if (checked) { // when select mode is checkbox + currSelected.push(rowKey); + } else { + currSelected = currSelected.filter(value => value !== rowKey); + } + + store.setSelectedRowKeys(currSelected); + + this.setState(() => ({ + selectedRowKeys: currSelected + })); + } + + /** + * handle all rows selection on header cell by store.selected or given specific result. + * @param {Boolean} option - customized result for all rows selection + */ + handleAllRowsSelect(option) { + const { store } = this.props; + const selected = store.isAnySelectedRow(); + + // set next status of all row selected by store.selected or customizing by user. + const result = option || !selected; + + const currSelected = result ? store.selectAllRowKeys() : []; + + store.setSelectedRowKeys(currSelected); + + this.setState(() => ({ + selectedRowKeys: currSelected + })); + } + + render() { + return React.cloneElement(this.props.elem, { + onRowSelect: this.handleRowSelect, + onAllRowsSelect: this.handleAllRowsSelect + }); + } +} + +RowSelectionWrapper.propTypes = { + elem: PropTypes.element.isRequired, + store: PropTypes.object.isRequired +}; + +export default RowSelectionWrapper; diff --git a/packages/react-bootstrap-table2/test/bootstrap-table.test.js b/packages/react-bootstrap-table2/test/bootstrap-table.test.js index 95cc99e..36241dc 100644 --- a/packages/react-bootstrap-table2/test/bootstrap-table.test.js +++ b/packages/react-bootstrap-table2/test/bootstrap-table.test.js @@ -161,114 +161,4 @@ describe('BootstrapTable', () => { expect(body.props().cellEdit.onUpdate).toBeDefined(); }); }); - - describe('handleRowSelect', () => { - const rowKey = 1; - - describe('when selectRow.mode is radio', () => { - beforeEach(() => { - wrapper = shallow( - - ); - }); - - it('state.selectedRowKeys should contain only single key', () => { - wrapper.instance().handleRowSelect(rowKey); - expect(wrapper.state('selectedRowKeys')).toEqual([rowKey]); - - wrapper.instance().handleRowSelect(rowKey); - expect(wrapper.state('selectedRowKeys')).toEqual([rowKey]); - }); - }); - - describe('when selectRow.mode is checbox', () => { - beforeEach(() => { - wrapper = shallow( - - ); - }); - describe('if checked is false', () => { - it('state.selectedRowKeys should pop selected row key', () => { - wrapper.instance().handleRowSelect(rowKey, false); - - expect(wrapper.state('selectedRowKeys')).not.toContain(rowKey); - }); - }); - - describe('if checked is true', () => { - it('state.selectedRowKeys should push one extra key', () => { - wrapper.instance().handleRowSelect(rowKey, true); - - expect(wrapper.state('selectedRowKeys')).toContain(rowKey); - }); - }); - }); - }); - - describe('handleAllRowsSelect', () => { - beforeEach(() => { - wrapper = shallow( - - ); - }); - - describe('when customized option was not given', () => { - describe('when nothing was selected', () => { - it('should select all rows', () => { - store.setSelectedRowKeys([]); - - wrapper.instance().handleAllRowsSelect(); - - expect(wrapper.state('selectedRowKeys').length).toBe(data.length); - }); - }); - - describe('when one or more than one row was selected', () => { - it('should unselect all rows', () => { - store.setSelectedRowKeys([1]); - - wrapper.instance().handleAllRowsSelect(); - - expect(wrapper.state('selectedRowKeys').length).toBe(0); - }); - }); - }); - - describe('when customized option was given', () => { - describe('when option is truthy', () => { - it('should select all rows', () => { - wrapper.instance().handleAllRowsSelect(true); - - expect(wrapper.state('selectedRowKeys').length).toBe(data.length); - }); - }); - - describe('when option is falsy', () => { - it('should unselect all rows', () => { - store.setSelectedRowKeys([1]); - - wrapper.instance().handleAllRowsSelect(false); - - expect(wrapper.state('selectedRowKeys').length).toBe(0); - }); - }); - }); - }); }); diff --git a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js new file mode 100644 index 0000000..1404259 --- /dev/null +++ b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js @@ -0,0 +1,126 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import Store from '../../src/store/base'; +import BootstrapTable from '../../src/bootstrap-table'; +import RowSelectionWrapper from '../../src/row-selection/wrapper'; + +describe('RowSelectionWrapper', () => { + let wrapper; + let elem; + + const columns = [{ + dataField: 'id', + text: 'ID' + }, { + dataField: 'name', + text: 'Name' + }]; + + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + const selectRow = { + mode: 'radio' + }; + + const keyField = 'id'; + + const store = new Store({ data, keyField }); + + beforeEach(() => { + elem = React.createElement(BootstrapTable, { data, selectRow, columns, keyField, store }); + wrapper = shallow( + + ); + }); + + it('should render RowSelectionWrapper correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(BootstrapTable)).toBeDefined(); + }); + + it('should have correct state', () => { + expect(wrapper.state().selectedRowKeys).toBeDefined(); + expect(wrapper.state().selectedRowKeys.length).toEqual(0); + }); + + it('should inject correct props to elem', () => { + expect(wrapper.props().onRowSelect).toBeDefined(); + expect(wrapper.props().onAllRowsSelect).toBeDefined(); + }); + + describe('when selectRow.mode is \'radio\'', () => { + const firstSelectedRow = data[0][keyField]; + const secondSelectedRow = data[1][keyField]; + + it('call handleRowSelect function should seting correct state.selectedRowKeys', () => { + wrapper.instance().handleRowSelect(firstSelectedRow); + expect(wrapper.state('selectedRowKeys')).toEqual([firstSelectedRow]); + + wrapper.instance().handleRowSelect(secondSelectedRow); + expect(wrapper.state('selectedRowKeys')).toEqual([secondSelectedRow]); + }); + }); + + describe('when selectRow.mode is \'checkbox\'', () => { + const firstSelectedRow = data[0][keyField]; + const secondSelectedRow = data[1][keyField]; + + beforeEach(() => { + selectRow.mode = 'checkbox'; + elem = React.createElement(BootstrapTable, { data, selectRow, columns, keyField, store }); + wrapper = shallow( + + ); + }); + + it('call handleRowSelect function should seting correct state.selectedRowKeys', () => { + wrapper.instance().handleRowSelect(firstSelectedRow, true); + expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow])); + + wrapper.instance().handleRowSelect(secondSelectedRow, true); + expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow, secondSelectedRow])); + + wrapper.instance().handleRowSelect(firstSelectedRow, false); + expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([secondSelectedRow])); + + wrapper.instance().handleRowSelect(secondSelectedRow, false); + expect(wrapper.state('selectedRowKeys')).toEqual([]); + }); + + it('call handleAllRowsSelect function should seting correct state.selectedRowKeys', () => { + wrapper.instance().handleAllRowsSelect(); + expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow, secondSelectedRow])); + + wrapper.instance().handleAllRowsSelect(); + expect(wrapper.state('selectedRowKeys')).toEqual([]); + }); + + it('call handleAllRowsSelect function with a bool args should seting correct state.selectedRowKeys', () => { + wrapper.instance().handleAllRowsSelect(true); + expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow, secondSelectedRow])); + + wrapper.instance().handleAllRowsSelect(false); + expect(wrapper.state('selectedRowKeys')).toEqual([]); + }); + }); +}); From f52baa47ea0f0738da7ef6604f9b748a29d45f02 Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 17 Oct 2017 12:17:53 -0500 Subject: [PATCH 043/136] refine sort logic to wrapper * move sort relevant components to sort dir * refine sort logic to wrapper --- .../src/bootstrap-table.js | 15 +--- .../react-bootstrap-table2/src/container.js | 14 ++++ .../react-bootstrap-table2/src/header-cell.js | 4 +- .../src/{sort-caret.js => sort/caret.js} | 2 +- .../src/{sort-symbol.js => sort/symbol.js} | 0 .../src/sort/wrapper.js | 35 ++++++++ .../test/header-cell.test.js | 4 +- .../caret.test.js} | 4 +- .../symbol.test.js} | 2 +- .../test/sort/wrapper.test.js | 81 +++++++++++++++++++ 10 files changed, 140 insertions(+), 21 deletions(-) rename packages/react-bootstrap-table2/src/{sort-caret.js => sort/caret.js} (93%) rename packages/react-bootstrap-table2/src/{sort-symbol.js => sort/symbol.js} (100%) create mode 100644 packages/react-bootstrap-table2/src/sort/wrapper.js rename packages/react-bootstrap-table2/test/{sort-caret.test.js => sort/caret.test.js} (92%) rename packages/react-bootstrap-table2/test/{sort-symbol.test.js => sort/symbol.test.js} (91%) create mode 100644 packages/react-bootstrap-table2/test/sort/wrapper.test.js diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 41ef625..f3e502c 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -14,7 +14,6 @@ class BootstrapTable extends PropsBaseResolver(Component) { super(props); this.validateProps(); - this.handleSort = this.handleSort.bind(this); this.state = { data: props.store.get() }; @@ -71,7 +70,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { columns={ columns } sortField={ store.sortField } sortOrder={ store.sortOrder } - onSort={ this.handleSort } + onSort={ this.props.onSort } selectRow={ headerCellSelectionInfo } /> ); } - - handleSort(column) { - const { store } = this.props; - store.sortBy(column); - - this.setState(() => { - return { - data: store.get() - }; - }); - } } BootstrapTable.propTypes = { @@ -116,6 +104,7 @@ BootstrapTable.propTypes = { PropTypes.node, PropTypes.string ]), + onSort: PropTypes.func, cellEdit: PropTypes.shape({ mode: PropTypes.oneOf([Const.CLICK_TO_CELL_EDIT, Const.DBCLICK_TO_CELL_EDIT]).isRequired, onUpdate: PropTypes.func, diff --git a/packages/react-bootstrap-table2/src/container.js b/packages/react-bootstrap-table2/src/container.js index fe35f9f..d8d964a 100644 --- a/packages/react-bootstrap-table2/src/container.js +++ b/packages/react-bootstrap-table2/src/container.js @@ -4,6 +4,7 @@ /* eslint react/prop-types: 0 */ import React, { Component } from 'react'; import Store from './store/base'; +import SortWrapper from './sort/wrapper'; import CellEditWrapper from './cell-edit/wrapper'; import RowSelectionWrapper from './row-selection/wrapper'; import _ from './utils'; @@ -68,6 +69,12 @@ const withDataStore = (Base) => { ); } + renderSort(elem) { + return ( + + ); + } + render() { const baseProps = { ...this.props, @@ -76,6 +83,13 @@ const withDataStore = (Base) => { let element = React.createElement(Base, baseProps); + // @TODO + // the logic of checking sort is enable or not should be placed in the props resolver.. + // but currently, I've no idea to refactoring this + if (this.props.columns.filter(col => col.sort).length > 0) { + element = this.renderSort(element); + } + if (this.props.selectRow) { element = this.renderRowSelection(element); } diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 13c6727..a7bfc25 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -4,8 +4,8 @@ import cs from 'classnames'; import PropTypes from 'prop-types'; import Const from './const'; -import SortSymbol from './sort-symbol'; -import SortCaret from './sort-caret'; +import SortSymbol from './sort/symbol'; +import SortCaret from './sort/caret'; import _ from './utils'; diff --git a/packages/react-bootstrap-table2/src/sort-caret.js b/packages/react-bootstrap-table2/src/sort/caret.js similarity index 93% rename from packages/react-bootstrap-table2/src/sort-caret.js rename to packages/react-bootstrap-table2/src/sort/caret.js index 08a918a..cc64f9d 100644 --- a/packages/react-bootstrap-table2/src/sort-caret.js +++ b/packages/react-bootstrap-table2/src/sort/caret.js @@ -2,7 +2,7 @@ import React from 'react'; import cs from 'classnames'; import PropTypes from 'prop-types'; -import Const from './const'; +import Const from '../const'; const SortCaret = ({ order }) => { const orderClass = cs('react-bootstrap-table-sort-order', { diff --git a/packages/react-bootstrap-table2/src/sort-symbol.js b/packages/react-bootstrap-table2/src/sort/symbol.js similarity index 100% rename from packages/react-bootstrap-table2/src/sort-symbol.js rename to packages/react-bootstrap-table2/src/sort/symbol.js diff --git a/packages/react-bootstrap-table2/src/sort/wrapper.js b/packages/react-bootstrap-table2/src/sort/wrapper.js new file mode 100644 index 0000000..e9643eb --- /dev/null +++ b/packages/react-bootstrap-table2/src/sort/wrapper.js @@ -0,0 +1,35 @@ +/* eslint arrow-body-style: 0 */ +/* eslint react/prop-types: 0 */ +/* eslint no-return-assign: 0 */ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +class SortWrapper extends Component { + constructor(props) { + super(props); + this.handleSort = this.handleSort.bind(this); + } + + handleSort(column) { + const { store } = this.props; + store.sortBy(column); + + this.table.setState({ + data: store.get() + }); + } + + render() { + return React.cloneElement(this.props.elem, { + ref: node => this.table = node, + onSort: this.handleSort + }); + } +} + +SortWrapper.propTypes = { + elem: PropTypes.element.isRequired, + store: PropTypes.object.isRequired +}; + +export default SortWrapper; diff --git a/packages/react-bootstrap-table2/test/header-cell.test.js b/packages/react-bootstrap-table2/test/header-cell.test.js index 408b853..4e2dda5 100644 --- a/packages/react-bootstrap-table2/test/header-cell.test.js +++ b/packages/react-bootstrap-table2/test/header-cell.test.js @@ -3,8 +3,8 @@ import sinon from 'sinon'; import { shallow } from 'enzyme'; import Const from '../src/const'; -import SortCaret from '../src/sort-caret'; -import SortSymbol from '../src/sort-symbol'; +import SortCaret from '../src/sort/caret'; +import SortSymbol from '../src/sort/symbol'; import HeaderCell from '../src/header-cell'; describe('HeaderCell', () => { diff --git a/packages/react-bootstrap-table2/test/sort-caret.test.js b/packages/react-bootstrap-table2/test/sort/caret.test.js similarity index 92% rename from packages/react-bootstrap-table2/test/sort-caret.test.js rename to packages/react-bootstrap-table2/test/sort/caret.test.js index 933525d..f2f5407 100644 --- a/packages/react-bootstrap-table2/test/sort-caret.test.js +++ b/packages/react-bootstrap-table2/test/sort/caret.test.js @@ -1,8 +1,8 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Const from '../src/const'; -import SortCaret from '../src/sort-caret'; +import Const from '../../src/const'; +import SortCaret from '../../src/sort/caret'; describe('SortCaret', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/sort-symbol.test.js b/packages/react-bootstrap-table2/test/sort/symbol.test.js similarity index 91% rename from packages/react-bootstrap-table2/test/sort-symbol.test.js rename to packages/react-bootstrap-table2/test/sort/symbol.test.js index d13346c..4e7cd07 100644 --- a/packages/react-bootstrap-table2/test/sort-symbol.test.js +++ b/packages/react-bootstrap-table2/test/sort/symbol.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import SortSymbol from '../src/sort-symbol'; +import SortSymbol from '../../src/sort/symbol'; describe('SortSymbol', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/sort/wrapper.test.js b/packages/react-bootstrap-table2/test/sort/wrapper.test.js new file mode 100644 index 0000000..e0a9ed4 --- /dev/null +++ b/packages/react-bootstrap-table2/test/sort/wrapper.test.js @@ -0,0 +1,81 @@ +import 'jsdom-global/register'; +import React from 'react'; +import { shallow, mount } from 'enzyme'; + +import Const from '../../src/const'; +import Store from '../../src/store/base'; +import BootstrapTable from '../../src/bootstrap-table'; +import SortWrapper from '../../src/sort/wrapper'; + +describe('SortWrapper', () => { + let wrapper; + let elem; + + const columns = [{ + dataField: 'id', + text: 'ID', + sort: true + }, { + dataField: 'name', + text: 'Name' + }]; + + const data = [{ + id: 1, + name: 'A' + }, { + id: 2, + name: 'B' + }]; + + const keyField = 'id'; + + let store = new Store({ data, keyField }); + + beforeEach(() => { + elem = React.createElement(BootstrapTable, { data, columns, keyField, store }); + wrapper = shallow( + + ); + }); + + it('should render SortWrapper correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(BootstrapTable)).toBeDefined(); + }); + + it('should inject correct props to elem', () => { + expect(wrapper.props().onSort).toBeDefined(); + }); + + describe('call handleSort function', () => { + const sortColumn = columns[0]; + + beforeEach(() => { + store = new Store({ data, keyField }); + wrapper = mount( + + ); + wrapper.instance().handleSort(sortColumn); + }); + + it('should sorting data correctly', () => { + expect(wrapper.instance().table.state.data[0][keyField]).toEqual(data[1][keyField]); + }); + + it('should operating on store correctly', () => { + expect(store.sortOrder).toEqual(Const.SORT_DESC); + expect(store.sortField).toEqual(sortColumn.dataField); + + wrapper.instance().handleSort(sortColumn); // sort same column again + expect(store.sortOrder).toEqual(Const.SORT_ASC); + expect(store.sortField).toEqual(sortColumn.dataField); + }); + }); +}); From 4f7a3d7eaf32d793c0d041bfd74b8cdd1d39a2de Mon Sep 17 00:00:00 2001 From: Allen Date: Wed, 18 Oct 2017 01:13:06 -0500 Subject: [PATCH 044/136] refine row selection * adjust propType order * rename for resolving selectRow prop * refine row selection * refine document --- docs/README.md | 5 +++- docs/{cell-edit-prop.md => cell-edit.md} | 0 docs/row-selection.md | 8 +++--- .../src/bootstrap-table.js | 16 ++++++------ .../src/props-resolver/index.js | 4 +-- .../row-selection/selection-header-cell.js | 6 ++--- .../react-bootstrap-table2/test/body.test.js | 2 +- .../test/header.test.js | 2 +- .../test/mock-data/header-resolved-props.js | 11 -------- .../test/props-resolver/index.test.js | 26 +++++++++---------- .../selection-header-cell.test.js | 18 ++++++------- .../react-bootstrap-table2/test/row.test.js | 2 +- .../mock}/body-resolved-props.js | 6 ++--- .../mock/header-resolved-props.js | 11 ++++++++ 14 files changed, 60 insertions(+), 57 deletions(-) rename docs/{cell-edit-prop.md => cell-edit.md} (100%) delete mode 100644 packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js rename packages/react-bootstrap-table2/test/{mock-data => test-helpers/mock}/body-resolved-props.js (64%) create mode 100644 packages/react-bootstrap-table2/test/test-helpers/mock/header-resolved-props.js diff --git a/docs/README.md b/docs/README.md index 14c3cf3..f1d3d9e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -38,4 +38,7 @@ Same as `.table-hover` class for adding a hover effect (grey background color) o Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half ### cellEdit - [Object] -`cellEdit` props accept an object, please see [cellEdit definition](./cell-edit-prop.md) for more detail. +`cellEdit` allow you to enable cell editing on table, please see [cellEdit definition](./cell-edit.md) for more detail. + +### selectRow - [Object] +`selectRow` allow you to have a mechanism to select rows, please see [selectRow definition](./row-selection.md) for more detail. \ No newline at end of file diff --git a/docs/cell-edit-prop.md b/docs/cell-edit.md similarity index 100% rename from docs/cell-edit-prop.md rename to docs/cell-edit.md diff --git a/docs/row-selection.md b/docs/row-selection.md index b9a31c9..87626ab 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -1,6 +1,6 @@ # Row selection -`react-bootstrap-table2` supports the row selection feature. By passing prop `selectRow ` to enable row selection. When you enable this feature, `react-bootstrap-table2` will append a new selection column at first. +`react-bootstrap-table2` supports the row selection feature. By passing prop `selectRow` to enable row selection. When you enable this feature, `react-bootstrap-table2` will append a new selection column at first. ## Available properties @@ -8,7 +8,7 @@ The following are available properties in `selectRow`: #### Required -* [mode (required)](#mode) +* [mode (**required**)](#mode) #### Optional @@ -23,7 +23,7 @@ Specifying the selection way for `single(radio)` or `multiple(checkbox)`. If `ra #### examples ```js -const selectRowProp = { +const selectRow = { mode: 'radio' // single row selection }; * @returns {Object} result - props for cell selections * @returns {String} result.mode - input type of row selection or disabled. */ - resolveCellSelectionProps(options) { + resolveSelectRowProps(options) { const { selectRow } = this.props; const { ROW_SELECT_DISABLED } = Const; @@ -71,7 +71,7 @@ export default ExtendBase => * @returns {String} result.mode - input type of row selection or disabled. * @returns {String} result.checkedStatus - checkbox status depending on selected rows counts */ - resolveHeaderCellSelectionProps(options = {}) { + resolveSelectRowPropsForHeader(options = {}) { const { selectRow } = this.props; const { allRowsSelected, selected = [], ...rest } = options; const { diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js index 08516d1..b23e52c 100644 --- a/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js +++ b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js @@ -1,7 +1,7 @@ /* eslint react/require-default-props: 0 */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import Constant from '../const'; +import Const from '../const'; export const CheckBox = ({ checked, indeterminate }) => ( { let wrapper; diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js index bd45f41..9d121f4 100644 --- a/packages/react-bootstrap-table2/test/header.test.js +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -5,7 +5,7 @@ import HeaderCell from '../src/header-cell'; import SelectionHeaderCell from '../src//row-selection/selection-header-cell'; import Header from '../src/header'; import Const from '../src/const'; -import mockHeaderResolvedProps from '../test/mock-data/header-resolved-props'; +import mockHeaderResolvedProps from './test-helpers/mock/header-resolved-props'; describe('Header', () => { let wrapper; diff --git a/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js b/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js deleted file mode 100644 index 23ab27e..0000000 --- a/packages/react-bootstrap-table2/test/mock-data/header-resolved-props.js +++ /dev/null @@ -1,11 +0,0 @@ -import Const from '../../src/const'; - -const { ROW_SELECT_DISABLED } = Const; - -export const headerCellSelectionResolvedProps = { - mode: ROW_SELECT_DISABLED -}; - -export default { - selectRow: headerCellSelectionResolvedProps -}; diff --git a/packages/react-bootstrap-table2/test/props-resolver/index.test.js b/packages/react-bootstrap-table2/test/props-resolver/index.test.js index 840db69..79eabb4 100644 --- a/packages/react-bootstrap-table2/test/props-resolver/index.test.js +++ b/packages/react-bootstrap-table2/test/props-resolver/index.test.js @@ -131,7 +131,7 @@ describe('TableResolver', () => { }); }); - describe('resolveCellSelectionProps', () => { + describe('resolveSelectRowProps', () => { let cellSelectionInfo; let selectRow; @@ -141,7 +141,7 @@ describe('TableResolver', () => { data, keyField, columns }, null); wrapper = shallow(mockElement); - cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + cellSelectionInfo = wrapper.instance().resolveSelectRowProps(); }); it('should return object', () => { @@ -162,7 +162,7 @@ describe('TableResolver', () => { data, keyField, columns, selectRow }, null); wrapper = shallow(mockElement); - cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + cellSelectionInfo = wrapper.instance().resolveSelectRowProps(); expect(cellSelectionInfo).toBeDefined(); expect(cellSelectionInfo.constructor).toEqual(Object); @@ -175,7 +175,7 @@ describe('TableResolver', () => { data, keyField, columns, selectRow }, null); wrapper = shallow(mockElement); - cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(); + cellSelectionInfo = wrapper.instance().resolveSelectRowProps(); expect(cellSelectionInfo).toBeDefined(); expect(cellSelectionInfo.constructor).toEqual(Object); @@ -194,7 +194,7 @@ describe('TableResolver', () => { data, keyField, columns, selectRow }, null); wrapper = shallow(mockElement); - cellSelectionInfo = wrapper.instance().resolveCellSelectionProps(mockOptions); + cellSelectionInfo = wrapper.instance().resolveSelectRowProps(mockOptions); }); it('should return object which contain options', () => { @@ -207,7 +207,7 @@ describe('TableResolver', () => { }); }); - describe('resolveHeaderCellSelectionProps', () => { + describe('resolveSelectRowPropsForHeader', () => { let headerCellSelectionInfo; let selectRow; @@ -216,7 +216,7 @@ describe('TableResolver', () => { data, keyField, columns }, null); wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader(); }); describe('if selectRow was not defined', () => { @@ -239,7 +239,7 @@ describe('TableResolver', () => { data, keyField, columns, selectedRowKeys, selectRow }, null); wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader(); expect(headerCellSelectionInfo).toBeDefined(); expect(headerCellSelectionInfo.constructor).toEqual(Object); @@ -253,7 +253,7 @@ describe('TableResolver', () => { data, keyField, columns, selectedRowKeys, selectRow }, null); wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(); + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader(); expect(headerCellSelectionInfo).toBeDefined(); expect(headerCellSelectionInfo.constructor).toEqual(Object); @@ -275,7 +275,7 @@ describe('TableResolver', () => { data, keyField, columns, selectedRowKeys, selectRow }, null); wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps(mockOptions); + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader(mockOptions); }); it('should return object which contain specified options', () => { @@ -304,7 +304,7 @@ describe('TableResolver', () => { wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader({ allRowsSelected: true, selected: selectedRowKeys }); @@ -326,7 +326,7 @@ describe('TableResolver', () => { }, null); wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader({ allRowsSelected: false, selected: selectedRowKeys }); @@ -349,7 +349,7 @@ describe('TableResolver', () => { wrapper = shallow(mockElement); - headerCellSelectionInfo = wrapper.instance().resolveHeaderCellSelectionProps({ + headerCellSelectionInfo = wrapper.instance().resolveSelectRowPropsForHeader({ allRowsSelected: false, selected: selectedRowKeys }); diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js index ae3837b..c877dac 100644 --- a/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; -import Constant from '../../src/const'; +import Const from '../../src/const'; import SelectionHeaderCell, { CheckBox } from '../../src/row-selection/selection-header-cell'; let wrapper; @@ -20,7 +20,7 @@ describe('', () => { describe('when props.mode is checkbox', () => { describe('if checkedStatus prop has not been changed', () => { it('should not update component', () => { - const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + const checkedStatus = Const.CHECKBOX_STATUS_CHECKED; const nextProps = { checkedStatus }; wrapper = shallow( @@ -32,7 +32,7 @@ describe('', () => { describe('if checkedStatus prop has been changed', () => { it('should update component', () => { - const { CHECKBOX_STATUS_INDETERMINATE, CHECKBOX_STATUS_CHECKED } = Constant; + const { CHECKBOX_STATUS_INDETERMINATE, CHECKBOX_STATUS_CHECKED } = Const; const checkedStatus = CHECKBOX_STATUS_CHECKED; const nextProps = { checkedStatus }; @@ -60,7 +60,7 @@ describe('', () => { wrapper = shallow( ); }); @@ -78,7 +78,7 @@ describe('', () => { wrapper = shallow( ); }); @@ -96,7 +96,7 @@ describe('', () => { describe('render', () => { describe('when props.mode is radio', () => { beforeEach(() => { - const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + const checkedStatus = Const.CHECKBOX_STATUS_CHECKED; wrapper = shallow(); }); @@ -109,15 +109,15 @@ describe('', () => { }); describe('when props.mode is checkbox', () => { - const checkedStatus = Constant.CHECKBOX_STATUS_CHECKED; + const checkedStatus = Const.CHECKBOX_STATUS_CHECKED; beforeEach(() => { wrapper = shallow(); }); it('should render checkbox', () => { - const checked = checkedStatus === Constant.CHECKBOX_STATUS_CHECKED; - const indeterminate = checkedStatus === Constant.CHECKBOX_STATUS_INDETERMINATE; + const checked = checkedStatus === Const.CHECKBOX_STATUS_CHECKED; + const indeterminate = checkedStatus === Const.CHECKBOX_STATUS_INDETERMINATE; expect(wrapper.find('th').length).toBe(1); expect(wrapper.find('th[data-row-selection]').length).toBe(1); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index ea17158..1e9d22f 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -7,7 +7,7 @@ import Row from '../src/row'; import Const from '../src/const'; import EditingCell from '../src/cell-edit/editing-cell'; import SelectionCell from '../src//row-selection/selection-cell'; -import mockBodyResolvedProps from '../test/mock-data/body-resolved-props'; +import mockBodyResolvedProps from './test-helpers/mock/body-resolved-props'; const defaultColumns = [{ dataField: 'id', diff --git a/packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js b/packages/react-bootstrap-table2/test/test-helpers/mock/body-resolved-props.js similarity index 64% rename from packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js rename to packages/react-bootstrap-table2/test/test-helpers/mock/body-resolved-props.js index d95bf3e..0eafb00 100644 --- a/packages/react-bootstrap-table2/test/mock-data/body-resolved-props.js +++ b/packages/react-bootstrap-table2/test/test-helpers/mock/body-resolved-props.js @@ -1,8 +1,8 @@ -import Const from '../../src/const'; +import Const from '../../../src/const'; const { ROW_SELECT_DISABLED, UNABLE_TO_CELL_EDIT } = Const; -export const cellSelectionResolvedProps = { +export const rowSelectionResolvedProps = { mode: ROW_SELECT_DISABLED }; @@ -12,5 +12,5 @@ export const cellEditResolvedProps = { export default { cellEdit: cellEditResolvedProps, - selectRow: cellSelectionResolvedProps + selectRow: rowSelectionResolvedProps }; diff --git a/packages/react-bootstrap-table2/test/test-helpers/mock/header-resolved-props.js b/packages/react-bootstrap-table2/test/test-helpers/mock/header-resolved-props.js new file mode 100644 index 0000000..bcc8a2b --- /dev/null +++ b/packages/react-bootstrap-table2/test/test-helpers/mock/header-resolved-props.js @@ -0,0 +1,11 @@ +import Const from '../../../src/const'; + +const { ROW_SELECT_DISABLED } = Const; + +export const rowSelectionResolvedProps = { + mode: ROW_SELECT_DISABLED +}; + +export default { + selectRow: rowSelectionResolvedProps +}; From 0440c63c66321e92a5c834c5fcbba4fad4bba8ca Mon Sep 17 00:00:00 2001 From: Allen Date: Wed, 18 Oct 2017 01:31:12 -0500 Subject: [PATCH 045/136] always jsx-curly-spacing --- .eslintrc | 2 +- .../examples/basic/caption-table.js | 4 +-- .../cell-edit/cell-edit-with-redux-table.js | 2 +- .../examples/welcome.js | 6 ++--- .../src/bootstrap-table.js | 4 +-- packages/react-bootstrap-table2/src/header.js | 2 +- .../src/row-selection/selection-cell.js | 6 ++--- .../row-selection/selection-header-cell.js | 14 +++++----- packages/react-bootstrap-table2/src/row.js | 4 +-- .../react-bootstrap-table2/test/body.test.js | 26 +++++++++---------- .../test/header.test.js | 10 +++---- .../test/row-selection/selection-cell.test.js | 24 ++++++++--------- .../selection-header-cell.test.js | 18 ++++++------- .../react-bootstrap-table2/test/row.test.js | 22 ++++++++-------- 14 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.eslintrc b/.eslintrc index c29b8e9..ca70c65 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,7 +11,7 @@ ], "rules": { "comma-dangle": ["error", "never"], - "react/jsx-curly-spacing": 0, + "react/jsx-curly-spacing": [2, "always"], "react/forbid-prop-types": 0, "react/jsx-filename-extension": 0, "react/jsx-space-before-closing": 0, diff --git a/packages/react-bootstrap-table2-example/examples/basic/caption-table.js b/packages/react-bootstrap-table2-example/examples/basic/caption-table.js index 2315f90..7f84142 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/caption-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/caption-table.js @@ -36,12 +36,12 @@ const CaptionElement = () =>

} columns={ columns } /> `; -const Caption = () =>

Component as Header

; +const Caption = () =>

Component as Header

; export default () => (
- } columns={ columns } /> + } columns={ columns } /> { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js index ebd0e3c..760c6d9 100644 --- a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-with-redux-table.js @@ -203,7 +203,7 @@ const reducers = (state, action) => { const store = createStore(reducers, initialState, applyMiddleware(thunk)); const Index = () => ( - + ); diff --git a/packages/react-bootstrap-table2-example/examples/welcome.js b/packages/react-bootstrap-table2-example/examples/welcome.js index 7438298..41f3547 100644 --- a/packages/react-bootstrap-table2-example/examples/welcome.js +++ b/packages/react-bootstrap-table2-example/examples/welcome.js @@ -24,13 +24,13 @@ export default class Welcome extends React.Component {

react-bootstrap-table2

{ this.el = el; }} + ref={ (el) => { this.el = el; } } />
- diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 834362c..f466618 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -81,8 +81,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { visibleColumnSize={ this.visibleColumnSize() } noDataIndication={ noDataIndication } cellEdit={ cellEditInfo } - selectRow={cellSelectionInfo} - selectedRowKeys={store.getSelectedRowKeys()} + selectRow={ cellSelectionInfo } + selectedRowKeys={ store.getSelectedRowKeys() } />
diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index 8953c63..4730c34 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -21,7 +21,7 @@ const Header = (props) => { { - selectRow.mode === ROW_SELECT_DISABLED ? null : + selectRow.mode === ROW_SELECT_DISABLED ? null : } { columns.map((column, i) => { diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js index 73b3e4a..604188b 100644 --- a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js +++ b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js @@ -48,10 +48,10 @@ export default class SelectionCell extends Component { } = this.props; return ( - + ); diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js index b23e52c..a2c6956 100644 --- a/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js +++ b/packages/react-bootstrap-table2/src/row-selection/selection-header-cell.js @@ -6,10 +6,10 @@ import Const from '../const'; export const CheckBox = ({ checked, indeterminate }) => ( { + checked={ checked } + ref={ (input) => { if (input) input.indeterminate = indeterminate; // eslint-disable-line no-param-reassign - }} + } } /> ); @@ -64,11 +64,11 @@ export default class SelectionHeaderCell extends Component { return mode === ROW_SELECT_SINGLE ? : ( - + ); diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index fe894fc..b0b99a9 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -38,8 +38,8 @@ const Row = (props) => { : ( ) } diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index d4dc9b4..c89c35d 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -28,7 +28,7 @@ describe('Body', () => { describe('simplest body', () => { beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render successfully', () => { @@ -42,7 +42,7 @@ describe('Body', () => { beforeEach(() => { wrapper = shallow( { emptyIndication = 'Table is empty'; wrapper = shallow( { emptyIndicationCallBack = sinon.stub().returns(content); wrapper = shallow( { beforeEach(() => { wrapper = shallow( { it('props selected should be true if all rows were selected', () => { wrapper = shallow( ); @@ -171,12 +171,12 @@ describe('Body', () => { it('props selected should be false if all rows were not selected', () => { wrapper = shallow( ); @@ -189,11 +189,11 @@ describe('Body', () => { const keyField = 'id'; wrapper = shallow( ); }); diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js index 9d121f4..0b01089 100644 --- a/packages/react-bootstrap-table2/test/header.test.js +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -19,7 +19,7 @@ describe('Header', () => { describe('simplest header', () => { beforeEach(() => { - wrapper = shallow(
); + wrapper = shallow(
); }); it('should render successfully', () => { @@ -35,7 +35,7 @@ describe('Header', () => { beforeEach(() => { wrapper = shallow(
{ describe('when the selectRow.mode is radio(single selection)', () => { beforeEach(() => { - wrapper = shallow(
); + wrapper = shallow(
); }); it('should not render ', () => { @@ -66,9 +66,9 @@ describe('Header', () => { const selectRow = { mode: 'checkbox' }; wrapper = shallow(
); }); diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js index ca64d3b..d443301 100644 --- a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js @@ -16,7 +16,7 @@ describe('', () => { it('should not update component', () => { const nextProps = { selected }; - wrapper = shallow(); + wrapper = shallow(); expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(false); }); @@ -26,7 +26,7 @@ describe('', () => { it('should update component', () => { const nextProps = { selected: !selected }; - wrapper = shallow(); + wrapper = shallow(); expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(true); }); @@ -48,9 +48,9 @@ describe('', () => { wrapper = shallow( ); @@ -65,9 +65,9 @@ describe('', () => { wrapper = shallow( ); }); @@ -89,9 +89,9 @@ describe('', () => { beforeEach(() => { wrapper = shallow( ); }); @@ -119,9 +119,9 @@ describe('', () => { beforeEach(() => { wrapper = shallow( ); }); diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js index c877dac..d1e4b03 100644 --- a/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/selection-header-cell.test.js @@ -24,7 +24,7 @@ describe('', () => { const nextProps = { checkedStatus }; wrapper = shallow( - ); + ); expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(false); }); @@ -37,7 +37,7 @@ describe('', () => { const nextProps = { checkedStatus }; wrapper = shallow( - ); + ); expect(wrapper.instance().shouldComponentUpdate(nextProps)).toBe(true); }); @@ -60,8 +60,8 @@ describe('', () => { wrapper = shallow( ); }); @@ -78,8 +78,8 @@ describe('', () => { wrapper = shallow( ); }); @@ -98,7 +98,7 @@ describe('', () => { beforeEach(() => { const checkedStatus = Const.CHECKBOX_STATUS_CHECKED; - wrapper = shallow(); + wrapper = shallow(); }); it('should not render checkbox', () => { @@ -112,7 +112,7 @@ describe('', () => { const checkedStatus = Const.CHECKBOX_STATUS_CHECKED; beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); it('should render checkbox', () => { @@ -134,7 +134,7 @@ describe('', () => { it('should render component correctly', () => { const checked = true; const indeterminate = false; - wrapper = shallow(); + wrapper = shallow(); expect(wrapper.find('input').length).toBe(1); expect(wrapper.find('input').prop('checked')).toBe(checked); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 1e9d22f..f304dd8 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -32,7 +32,7 @@ describe('Row', () => { describe('simplest row', () => { beforeEach(() => { wrapper = shallow( - ); + ); }); it('should render successfully', () => { @@ -55,7 +55,7 @@ describe('Row', () => { }; wrapper = shallow( { columns[nonEditableColIndex].editable = false; wrapper = shallow( { columns[nonEditableColIndex].editable = editableCallBack; wrapper = shallow( { columns[nonEditableColIndex].editable = editableCallBack; wrapper = shallow( { beforeEach(() => { wrapper = shallow( { cellEdit.onUpdate = sinon.stub(); wrapper = shallow( { cellEdit.onEscape = sinon.stub(); wrapper = shallow( { describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { beforeEach(() => { wrapper = shallow( - ); + ); }); it('should not render ', () => { @@ -296,11 +296,11 @@ describe('Row', () => { const selectRow = { mode: 'checkbox' }; wrapper = shallow( ); }); From afef2adcafe4603930497aa6bc4bb065aa0cd18a Mon Sep 17 00:00:00 2001 From: Allen Date: Wed, 18 Oct 2017 02:09:24 -0500 Subject: [PATCH 046/136] add missing HeaderCell.propTypes --- packages/react-bootstrap-table2/src/header-cell.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index a7bfc25..30960bf 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -90,7 +90,9 @@ HeaderCell.propTypes = { headerFormatter: PropTypes.func, formatter: PropTypes.func, formatExtraData: PropTypes.any, + headerClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + headerStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headerTitle: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), title: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), @@ -98,6 +100,8 @@ HeaderCell.propTypes = { events: PropTypes.object, headerAlign: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), align: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + headerAttrs: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + attrs: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), sort: PropTypes.bool, sortFunc: PropTypes.func, editable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), From cb6410bbe487669a472b18307f924b790c336274 Mon Sep 17 00:00:00 2001 From: Allen Date: Wed, 18 Oct 2017 09:15:41 -0500 Subject: [PATCH 047/136] fix #101 * implement cell editor style/class * add stories for custom cell editor style and class * patch testing for cell editor style and class * patch docs for cell editor style and class --- docs/columns.md | 44 +++++++ .../cell-edit/cell-edit-class-table.js | 59 +++++++++ .../cell-edit/cell-edit-style-table.js | 67 ++++++++++ .../stories/index.js | 4 + .../stories/stylesheet/cell-edit/_index.scss | 11 ++ .../stories/stylesheet/storybook.scss | 1 + .../src/cell-edit/editing-cell.js | 15 ++- .../react-bootstrap-table2/src/header-cell.js | 2 + packages/react-bootstrap-table2/src/row.js | 10 ++ .../test/cell-edit/editing-cell.test.js | 40 ++++++ .../react-bootstrap-table2/test/row.test.js | 116 ++++++++++++++++++ 11 files changed, 365 insertions(+), 4 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-class-table.js create mode 100644 packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-style-table.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/cell-edit/_index.scss diff --git a/docs/columns.md b/docs/columns.md index f465c3b..7fba38a 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -27,6 +27,8 @@ Available properties in a column object: * [headerAttrs](#headerAttrs) * [editable](#editable) * [validator](#validator) +* [editCellStyle](#editCellStyle) +* [editCellClasses](#editCellClasses) Following is a most simplest and basic usage: @@ -450,4 +452,46 @@ The return value can be a bool or an object. If your valiation is pass, return ` valid: false, message: 'SOME_REASON_HERE' } +``` + +## column.editCellStyle - [Object | Function] +You can use `column.editCellStyle` to custom the style of `` when cell editing. It like most of customizable functionality, it also accept a callback function with following params: + +**Parameters** +* `cell`: The value of current cell. +* `row`: The object of `row` being processed in the `BootstrapTable`. +* `rowIndex`: The index of the current `row` being processed in the `BootstrapTable`. +* `colIndex`: The index of the current `column` being processed in `BootstrapTable`. + +```js +{ + editCellStyle: { ... } +} +``` +Or take a callback function + +```js +{ + editCellStyle: (cell, row, rowIndex, colIndex) => { + // it is suppose to return an object + } +} +``` + +## column.editCellClasses - [Object | Function] +You can use `column.editCellClasses` to add custom class on `` when cell editing. It's same as [`column.editCellStyle`](#editCellStyle) which also accept a callback function to able to custom your class more flexible. Following is the arguments of this callback function: `cell`, `row`, `rowIndex`, `colIndex`. + +```js +{ + editCellClasses: 'custom-class' +} +``` +Or take a callback function + +```js +{ + editCellClasses: (cell, row, rowIndex, colIndex) => { + // it is suppose to return a string + } +} ``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-class-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-class-table.js new file mode 100644 index 0000000..3486700 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-class-table.js @@ -0,0 +1,59 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + editCellClasses: 'editing-name' +}, { + dataField: 'price', + text: 'Product Price', + editCellClasses: (cell, row, rowIndex, colIndex) => + (cell > 2101 ? 'editing-price-bigger-than-2101' : 'editing-price-small-than-2101') +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + editCellClasses: 'editing-name' +}, { + dataField: 'price', + text: 'Product Price', + editCellClasses: (cell, row, rowIndex, colIndex) => + (cell > 2101 ? 'editing-price-bigger-than-2101' : 'editing-price-small-than-2101') +}]; + +const cellEdit = { + mode: 'click' +}; + + +`; + +const cellEdit = { + mode: 'click' +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-style-table.js b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-style-table.js new file mode 100644 index 0000000..2101bd3 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/cell-edit/cell-edit-style-table.js @@ -0,0 +1,67 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + editCellStyle: { + backgroundColor: '#20B2AA' + } +}, { + dataField: 'price', + text: 'Product Price', + editCellStyle: (cell, row, rowIndex, colIndex) => { + const backgroundColor = cell > 2101 ? '#00BFFF' : '#00FFFF'; + return { backgroundColor }; + } +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name', + editCellStyle: { + backgroundColor: '#20B2AA' + } +}, { + dataField: 'price', + text: 'Product Price', + editCellStyle: (cell, row, rowIndex, colIndex) => { + const backgroundColor = cell > 2101 ? '#00BFFF' : '#00FFFF'; + return { backgroundColor }; + } +}]; + +const cellEdit = { + mode: 'click' +}; + + +`; + +const cellEdit = { + mode: 'click' +}; +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index d3c1bec..b96d8b9 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -45,6 +45,8 @@ import ColumnLevelEditableTable from 'examples/cell-edit/column-level-editable-t import CellLevelEditable from 'examples/cell-edit/cell-level-editable-table'; import CellEditHooks from 'examples/cell-edit/cell-edit-hooks-table'; import CellEditValidator from 'examples/cell-edit/cell-edit-validator-table'; +import CellEditStyleTable from 'examples/cell-edit/cell-edit-style-table'; +import CellEditClassTable from 'examples/cell-edit/cell-edit-class-table'; import CellEditWithPromise from 'examples/cell-edit/cell-edit-with-promise-table'; import CellEditWithRedux from 'examples/cell-edit/cell-edit-with-redux-table'; @@ -105,6 +107,8 @@ storiesOf('Cell Editing', module) .add('Cell Level Editable', () => ) .add('Rich Hook Functions', () => ) .add('Validation', () => ) + .add('Custom Cell Style When Editing', () => ) + .add('Custom Cell Classes When Editing', () => ) .add('Async Cell Editing(Promise)', () => ) .add('Async Cell Editing(Redux)', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/cell-edit/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/cell-edit/_index.scss new file mode 100644 index 0000000..23f543a --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/cell-edit/_index.scss @@ -0,0 +1,11 @@ +.editing-name { + background-color: #20B2AA; +} + +.editing-price-bigger-than-2101 { + background-color: #00BFFF; +} + +.editing-price-small-than-2101 { + background-color: #00FFFF; +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index d5de950..3c33215 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -5,3 +5,4 @@ @import "welcome/index"; @import "columns/index"; +@import "cell-edit/index"; \ No newline at end of file diff --git a/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js index 3102f58..ee432dd 100644 --- a/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js +++ b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js @@ -96,7 +96,7 @@ class EditingCell extends Component { render() { const { invalidMessage } = this.state; - const { row, column } = this.props; + const { row, column, className, style } = this.props; const { dataField } = column; const value = _.get(row, dataField); @@ -108,7 +108,10 @@ class EditingCell extends Component { const hasError = _.isDefined(invalidMessage); const editorClass = hasError ? cs('animated', 'shake') : null; return ( - + this.editor = node } defaultValue={ value } @@ -126,11 +129,15 @@ EditingCell.propTypes = { column: PropTypes.object.isRequired, onUpdate: PropTypes.func.isRequired, onEscape: PropTypes.func.isRequired, - timeToCloseMessage: PropTypes.number + timeToCloseMessage: PropTypes.number, + className: PropTypes.string, + style: PropTypes.object }; EditingCell.defaultProps = { - timeToCloseMessage: Const.TIME_TO_CLOSE_MESSAGE + timeToCloseMessage: Const.TIME_TO_CLOSE_MESSAGE, + className: null, + style: {} }; export default EditingCell; diff --git a/packages/react-bootstrap-table2/src/header-cell.js b/packages/react-bootstrap-table2/src/header-cell.js index 30960bf..15f7b52 100644 --- a/packages/react-bootstrap-table2/src/header-cell.js +++ b/packages/react-bootstrap-table2/src/header-cell.js @@ -105,6 +105,8 @@ HeaderCell.propTypes = { sort: PropTypes.bool, sortFunc: PropTypes.func, editable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), + editCellStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + editCellClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), validator: PropTypes.func }).isRequired, index: PropTypes.number.isRequired, diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index b0b99a9..b183cd9 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -53,11 +53,21 @@ const Row = (props) => { editable = column.editable(content, row, rowIndex, index); } if (rowIndex === editingRowIdx && index === editingColIdx) { + let style = column.editCellStyle || {}; + let classes = column.editCellClasses; + if (_.isFunction(column.editCellStyle)) { + style = column.editCellStyle(content, row, rowIndex, index); + } + if (_.isFunction(column.editCellClasses)) { + classes = column.editCellClasses(content, row, rowIndex, index); + } return ( ); diff --git a/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js b/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js index c6157ab..1eee68f 100644 --- a/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/editing-cell.test.js @@ -75,6 +75,46 @@ describe('EditingCell', () => { expect(onEscape.callCount).toBe(1); }); + describe('if style prop is defined', () => { + const customStyle = { backgroundColor: 'red' }; + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render component with style successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('td').prop('style')).toEqual(customStyle); + }); + }); + + describe('if className prop is defined', () => { + const className = 'test-class'; + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render component with style successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(className)).toBe(true); + }); + }); + describe('if blurToSave prop is true', () => { beforeEach(() => { wrapper = mount( diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index f304dd8..56b6b32 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -249,6 +249,122 @@ describe('Row', () => { expect(wrapper.find(EditingCell).length).toBe(1); expect(complexComponents.at(editingColIndex).type()).toEqual(EditingCell); }); + + describe('if column.editCellStyle defined as object', () => { + const definedStyleColIndex = editingColIndex; + + beforeEach(() => { + columns[definedStyleColIndex].editCellStyle = { backgroundColor: 'red' }; + wrapper = shallow( + + ); + }); + + it('should also rendering EditingCell with correct style object', () => { + expect(wrapper.find(EditingCell).length).toBe(1); + expect(wrapper.find(EditingCell).props().style) + .toEqual(columns[definedStyleColIndex].editCellStyle); + }); + }); + + describe('if column.editCellStyle defined as function', () => { + const definedStyleColIndex = editingColIndex; + const customStyle = { backgroundColor: 'red' }; + let editCellStyleCallBack; + + beforeEach(() => { + editCellStyleCallBack = sinon.stub().returns(customStyle); + columns[definedStyleColIndex].editCellStyle = editCellStyleCallBack; + wrapper = shallow( + + ); + }); + + it('should calling custom column.editCellStyle callback correctly', () => { + expect(editCellStyleCallBack.callCount).toBe(1); + expect( + editCellStyleCallBack.calledWith( + row[columns[editingColIndex].dataField], row, rowIndex, editingColIndex) + ).toBe(true); + }); + + it('should also rendering EditingCell with correct style object', () => { + expect(wrapper.find(EditingCell).length).toBe(1); + expect(wrapper.find(EditingCell).props().style).toEqual(customStyle); + }); + }); + + describe('if column.editCellClasses defined as string', () => { + const definedStyleColIndex = editingColIndex; + + beforeEach(() => { + columns[definedStyleColIndex].editCellClasses = 'custom-class'; + wrapper = shallow( + + ); + }); + + it('should also rendering EditingCell with correct class', () => { + expect(wrapper.find(EditingCell).length).toBe(1); + expect(wrapper.find(EditingCell).props().className) + .toEqual(columns[definedStyleColIndex].editCellClasses); + }); + }); + + describe('if column.editCellClasses defined as function', () => { + const definedStyleColIndex = editingColIndex; + const customClass = 'custom-class'; + let editCellClassesCallBack; + + beforeEach(() => { + editCellClassesCallBack = sinon.stub().returns(customClass); + columns[definedStyleColIndex].editCellClasses = editCellClassesCallBack; + wrapper = shallow( + + ); + }); + + it('should calling custom column.editCellStyle callback correctly', () => { + expect(editCellClassesCallBack.callCount).toBe(1); + expect( + editCellClassesCallBack.calledWith( + row[columns[editingColIndex].dataField], row, rowIndex, editingColIndex) + ).toBe(true); + }); + + it('should also rendering EditingCell with correct class', () => { + expect(wrapper.find(EditingCell).length).toBe(1); + expect(wrapper.find(EditingCell).props().className).toEqual(customClass); + }); + }); }); describe('and cellEdit.ridx is not match to current row index', () => { From 10f06dca102b46c1ad44121491c0f8bf90d190bf Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 20 Oct 2017 00:44:25 -0500 Subject: [PATCH 048/136] fix #104 * implement row seleciton style and class * add testing for row selection style and class * refine select row test * add stories for row selection style and class * add docs for row selection style and class * patch for wrong docs --- docs/columns.md | 2 +- docs/row-selection.md | 40 ++++++ .../examples/row-selection/selection-class.js | 90 +++++++++++++ .../examples/row-selection/selection-style.js | 94 +++++++++++++ .../stories/index.js | 8 +- .../stylesheet/row-selection/_index.scss | 11 ++ .../stories/stylesheet/storybook.scss | 3 +- packages/react-bootstrap-table2/src/body.js | 14 ++ .../src/bootstrap-table.js | 4 +- packages/react-bootstrap-table2/src/row.js | 28 ++-- .../react-bootstrap-table2/test/body.test.js | 125 +++++++++++++++--- .../react-bootstrap-table2/test/row.test.js | 38 ++++++ 12 files changed, 424 insertions(+), 33 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/row-selection/_index.scss diff --git a/docs/columns.md b/docs/columns.md index 7fba38a..9fe7745 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -478,7 +478,7 @@ Or take a callback function } ``` -## column.editCellClasses - [Object | Function] +## column.editCellClasses - [String | Function] You can use `column.editCellClasses` to add custom class on `` when cell editing. It's same as [`column.editCellStyle`](#editCellStyle) which also accept a callback function to able to custom your class more flexible. Following is the arguments of this callback function: `cell`, `row`, `rowIndex`, `colIndex`. ```js diff --git a/docs/row-selection.md b/docs/row-selection.md index 87626ab..3b6ddcd 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -9,6 +9,8 @@ The following are available properties in `selectRow`: #### Required * [mode (**required**)](#mode) +* [style](#style) +* [classes)](#classes) #### Optional @@ -46,3 +48,41 @@ const selectRow = { selectRow={ selectRowProp } /> ``` + +## selectRow.style - [Object | Function] +`selectRow.style` allow you to have custom style on selected rows: + +```js +const selectRow = { + mode: 'checkbox', + style: { background: 'red' } +}; +``` + +If you wanna more flexible customization, `selectRow.style` also accept a function: + +```js +const selectRow = { + mode: 'checkbox', + style: (row, rowIndex) => { return ...; } +}; +``` + +## selectRow.classes - [String | Function] +`selectRow.classes` allow you to add css class on selected rows: + +```js +const selectRow = { + mode: 'checkbox', + classes: 'custom-class' +}; +``` + +If you wanna more flexible customization, `selectRow.classes` also accept a function: + +```js +const selectRow = { + mode: 'checkbox', + classes: (row, rowIndex) => { return ...; } +}; +``` diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js new file mode 100644 index 0000000..ffce5b8 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js @@ -0,0 +1,90 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow1 = { + mode: 'checkbox', + classes: 'selection-row' +}; + +const selectRow2 = { + mode: 'checkbox', + classes: (row, rowIndex) => + (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') +}; + +const sourceCode1 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + classes: 'selection-row' +}; + + +`; + +const sourceCode2 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + classes: (row, rowIndex) => + (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') +}; + + +`; + +export default () => ( +
+ + { sourceCode1 } + + { sourceCode2 } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js new file mode 100644 index 0000000..1608fdf --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js @@ -0,0 +1,94 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow1 = { + mode: 'checkbox', + style: { backgroundColor: '#c8e6c9' } +}; + +const selectRow2 = { + mode: 'checkbox', + style: (row, rowIndex) => { + const backgroundColor = rowIndex > 1 ? '#00BFFF' : '#00FFFF'; + return { backgroundColor }; + } +}; + +const sourceCode1 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + style: { backgroundColor: '#c8e6c9' } +}; + + +`; + +const sourceCode2 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + style: (row, rowIndex) => { + const backgroundColor = rowIndex > 1 ? '#00BFFF' : '#00FFFF'; + return { backgroundColor }; + } +}; + + +`; + +export default () => ( +
+ + { sourceCode1 } + + { sourceCode2 } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index b96d8b9..e0ed3ca 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -53,6 +53,8 @@ import CellEditWithRedux from 'examples/cell-edit/cell-edit-with-redux-table'; // work on row selection import SingleSelectionTable from 'examples/row-selection/single-selection'; import MultipleSelectionTable from 'examples/row-selection/multiple-selection'; +import SelectionStyleTable from 'examples/row-selection/selection-style'; +import SelectionClassTable from 'examples/row-selection/selection-class'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -113,6 +115,8 @@ storiesOf('Cell Editing', module) .add('Async Cell Editing(Redux)', () => ); storiesOf('Row Selection', module) - .add('Single selection', () => ) - .add('Multiple selection', () => ); + .add('Single Selection', () => ) + .add('Multiple Selection', () => ) + .add('Selection Style', () => ) + .add('Selection Class', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/row-selection/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/row-selection/_index.scss new file mode 100644 index 0000000..91cfc67 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/row-selection/_index.scss @@ -0,0 +1,11 @@ +.selection-row { + background-color: #c8e6c9; +} + +.row-index-bigger-than-2101 { + background-color: #00BFFF; +} + +.row-index-small-than-2101 { + background-color: #00FFFF; +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index 3c33215..47a18b1 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -5,4 +5,5 @@ @import "welcome/index"; @import "columns/index"; -@import "cell-edit/index"; \ No newline at end of file +@import "cell-edit/index"; +@import "row-selection/index"; \ No newline at end of file diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 9a0cbba..fe0bcaa 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -22,6 +22,11 @@ const Body = (props) => { selectedRowKeys } = props; + const { + style: selectedStyle, + classes: selectedClasses + } = selectRow; + let content; if (isEmpty) { @@ -37,6 +42,13 @@ const Body = (props) => { ? selectedRowKeys.includes(key) : null; + let style = {}; + let classes = ''; + if (selected) { + style = _.isFunction(selectedStyle) ? selectedStyle(row, index) : selectedStyle; + classes = _.isFunction(selectedClasses) ? selectedClasses(row, index) : selectedClasses; + } + return ( { editable={ editable } selected={ selected } selectRow={ selectRow } + style={ style } + className={ classes } /> ); }); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index f466618..13a9cce 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -127,7 +127,9 @@ BootstrapTable.propTypes = { editing: PropTypes.bool }), selectRow: PropTypes.shape({ - mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired + mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired, + style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) }), onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index b183cd9..1949c33 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -9,13 +9,13 @@ import EditingCell from './cell-edit/editing-cell'; import Const from './const'; const Row = (props) => { - const { ROW_SELECT_DISABLED } = Const; - const { row, columns, keyField, rowIndex, + className, + style, cellEdit, selected, selectRow, @@ -31,9 +31,9 @@ const Row = (props) => { } = cellEdit; return ( - + { - selectRow.mode === ROW_SELECT_DISABLED + selectRow.mode === Const.ROW_SELECT_DISABLED ? null : ( { editable = column.editable(content, row, rowIndex, index); } if (rowIndex === editingRowIdx && index === editingColIdx) { - let style = column.editCellStyle || {}; - let classes = column.editCellClasses; + let editCellstyle = column.editCellStyle || {}; + let editCellclasses = column.editCellClasses; if (_.isFunction(column.editCellStyle)) { - style = column.editCellStyle(content, row, rowIndex, index); + editCellstyle = column.editCellStyle(content, row, rowIndex, index); } if (_.isFunction(column.editCellClasses)) { - classes = column.editCellClasses(content, row, rowIndex, index); + editCellclasses = column.editCellClasses(content, row, rowIndex, index); } return ( ); @@ -93,11 +93,15 @@ const Row = (props) => { Row.propTypes = { row: PropTypes.object.isRequired, rowIndex: PropTypes.number.isRequired, - columns: PropTypes.array.isRequired + columns: PropTypes.array.isRequired, + style: PropTypes.object, + className: PropTypes.string }; Row.defaultProps = { - editable: true + editable: true, + style: {}, + className: null }; export default Row; diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index c89c35d..9a670a8 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -152,35 +152,128 @@ describe('Body', () => { describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { const keyField = 'id'; const selectRow = { mode: 'checkbox' }; + const selectedRowKey = data[0][keyField]; + const selectedRowKeys = [selectedRowKey]; - it('props selected should be true if all rows were selected', () => { + beforeEach(() => { wrapper = shallow( ); - - expect(wrapper.find(Row).get(0).props.selected).toBe(true); }); - it('props selected should be false if all rows were not selected', () => { - wrapper = shallow( - - ); + it('should render Row component with correct selected prop', () => { + const rows = wrapper.find(Row); + for (let i = 0; i < rows.length; i += 1) { + const row = rows.get(i); + expect(row.props.selected).toBe(selectedRowKeys.indexOf(row.props.row[keyField]) > -1); + } + }); - expect(wrapper.find(Row).get(0).props.selected).toBe(false); + describe('if selectRow.style is defined as an object', () => { + const style = { backgroundColor: 'red' }; + + beforeEach(() => { + selectRow.style = style; + wrapper = shallow( + + ); + }); + + it('should render Row component with correct style prop', () => { + expect(wrapper.find(Row).get(0).props.style).toBe(style); + }); + }); + + describe('if selectRow.style is defined as a function', () => { + const style = { backgroundColor: 'red' }; + const styleCallBack = sinon.stub().returns(style); + + beforeEach(() => { + selectRow.style = styleCallBack; + wrapper = shallow( + + ); + }); + + it('should calling style callback correctly', () => { + expect(styleCallBack.callCount).toBe(1); + expect(styleCallBack.calledWith(data[0]), 1); + }); + + it('should render Row component with correct style prop', () => { + expect(wrapper.find(Row).get(0).props.style).toBe(style); + }); + }); + + describe('if selectRow.classes is defined as a string', () => { + const className = 'custom-class'; + + beforeEach(() => { + selectRow.classes = className; + wrapper = shallow( + + ); + }); + + it('should render Row component with correct className prop', () => { + expect(wrapper.find(Row).get(0).props.className).toEqual(className); + }); + }); + + describe('if selectRow.classes is defined as a function', () => { + const className = 'custom-class'; + const classesCallBack = sinon.stub().returns(className); + + beforeEach(() => { + selectRow.classes = classesCallBack; + wrapper = shallow( + + ); + }); + + it('should calling style callback correctly', () => { + expect(classesCallBack.callCount).toBe(1); + expect(classesCallBack.calledWith(data[0]), 1); + }); + + it('should render Row component with correct style prop', () => { + expect(wrapper.find(Row).get(0).props.className).toEqual(className); + }); }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 56b6b32..c332f27 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -42,6 +42,44 @@ describe('Row', () => { }); }); + describe('when style prop is defined', () => { + const customStyle = { backgroundColor: 'red' }; + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render component with style successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.prop('style')).toEqual(customStyle); + }); + }); + + describe('when className prop is defined', () => { + const className = 'test-class'; + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render component with style successfully', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass(className)).toBe(true); + }); + }); + describe('when cellEdit prop is defined', () => { let columns; let cellEdit; From afc41879ee6bec84acad9847c3b0fe58171c3cd2 Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 20 Oct 2017 03:25:48 -0500 Subject: [PATCH 049/136] fix #106 * implement selectRow.nonSelectable * add story for selectRow.nonSelectable * add testing for selectRow.nonSelectable * refine tests about row selection * patch docs for selectRow.nonSelectable --- docs/row-selection.md | 11 +++ .../row-selection/non-selectable-rows.js | 55 ++++++++++++ .../stories/index.js | 5 +- .../src/bootstrap-table.js | 3 +- .../src/row-selection/selection-cell.js | 15 ++-- .../src/row-selection/wrapper.js | 9 +- packages/react-bootstrap-table2/src/row.js | 4 + .../react-bootstrap-table2/src/store/base.js | 23 ++++- .../test/row-selection/selection-cell.test.js | 80 +++++++++++++++--- .../react-bootstrap-table2/test/row.test.js | 83 ++++++++++++++++--- .../test/store/base.test.js | 55 +++++++++--- 11 files changed, 294 insertions(+), 49 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js diff --git a/docs/row-selection.md b/docs/row-selection.md index 3b6ddcd..6143295 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -11,6 +11,7 @@ The following are available properties in `selectRow`: * [mode (**required**)](#mode) * [style](#style) * [classes)](#classes) +* [nonSelectable)](#nonSelectable) #### Optional @@ -86,3 +87,13 @@ const selectRow = { classes: (row, rowIndex) => { return ...; } }; ``` + +## selectRow.nonSelectable - [Array] +This prop allow you to restrict some rows which can not be selected by user. `selectRow.nonSelectable` accept an rowkeys array. + +```js +const selectRow = { + mode: 'checkbox', + nonSelectable: [1, 3 ,5] +}; +``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js b/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js new file mode 100644 index 0000000..d74d785 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js @@ -0,0 +1,55 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + nonSelectable: [0, 2, 4] +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + nonSelectable: [0, 2, 4] +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index e0ed3ca..95192e0 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -55,6 +55,7 @@ import SingleSelectionTable from 'examples/row-selection/single-selection'; import MultipleSelectionTable from 'examples/row-selection/multiple-selection'; import SelectionStyleTable from 'examples/row-selection/selection-style'; import SelectionClassTable from 'examples/row-selection/selection-class'; +import NonSelectableRowsTable from 'examples/row-selection/non-selectable-rows'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -118,5 +119,5 @@ storiesOf('Row Selection', module) .add('Single Selection', () => ) .add('Multiple Selection', () => ) .add('Selection Style', () => ) - .add('Selection Class', () => ); - + .add('Selection Class', () => ) + .add('Not Selectabled Rows', () => ); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 13a9cce..f336f04 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -129,7 +129,8 @@ BootstrapTable.propTypes = { selectRow: PropTypes.shape({ mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired, style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), - classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) + classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + nonSelectable: PropTypes.array }), onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js index 604188b..fa41f3a 100644 --- a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js +++ b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js @@ -11,7 +11,8 @@ export default class SelectionCell extends Component { mode: PropTypes.string.isRequired, rowKey: PropTypes.any, selected: PropTypes.bool, - onRowSelect: PropTypes.func + onRowSelect: PropTypes.func, + disabled: PropTypes.bool } constructor() { @@ -26,15 +27,17 @@ export default class SelectionCell extends Component { } handleRowClick() { - const { ROW_SELECT_SINGLE } = Const; const { mode: inputType, rowKey, selected, - onRowSelect + onRowSelect, + disabled } = this.props; - const checked = inputType === ROW_SELECT_SINGLE + if (disabled) return; + + const checked = inputType === Const.ROW_SELECT_SINGLE ? true : !selected; @@ -44,7 +47,8 @@ export default class SelectionCell extends Component { render() { const { mode: inputType, - selected + selected, + disabled } = this.props; return ( @@ -52,6 +56,7 @@ export default class SelectionCell extends Component { ); diff --git a/packages/react-bootstrap-table2/src/row-selection/wrapper.js b/packages/react-bootstrap-table2/src/row-selection/wrapper.js index ab2fb9f..97909f2 100644 --- a/packages/react-bootstrap-table2/src/row-selection/wrapper.js +++ b/packages/react-bootstrap-table2/src/row-selection/wrapper.js @@ -46,13 +46,16 @@ class RowSelectionWrapper extends Component { * @param {Boolean} option - customized result for all rows selection */ handleAllRowsSelect(option) { - const { store } = this.props; - const selected = store.isAnySelectedRow(); + const { store, selectRow } = this.props; + const selected = store.isAnySelectedRow(selectRow.nonSelectable); // set next status of all row selected by store.selected or customizing by user. const result = option || !selected; - const currSelected = result ? store.selectAllRowKeys() : []; + const currSelected = result ? + store.selectAllRows(selectRow.nonSelectable) : + store.cleanSelectedRows(selectRow.nonSelectable); + store.setSelectedRowKeys(currSelected); diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 1949c33..d93f384 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -30,6 +30,9 @@ const Row = (props) => { ...rest } = cellEdit; + const key = _.get(row, keyField); + const { nonSelectable } = selectRow; + return ( { @@ -40,6 +43,7 @@ const Row = (props) => { { ...selectRow } rowKey={ _.get(row, keyField) } selected={ selected } + disabled={ nonSelectable && nonSelectable.includes(key) } /> ) } diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 6006861..eb435d1 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -54,15 +54,30 @@ export default class Store { return this.selected; } - selectAllRowKeys() { - return this.data.map(row => _.get(row, this.keyField)); + selectAllRows(nonSelectableRows = []) { + if (nonSelectableRows.length === 0) { + return this.data.map(row => _.get(row, this.keyField)); + } + return this.data + .filter(row => !nonSelectableRows.includes(_.get(row, this.keyField))) + .map(row => _.get(row, this.keyField)); + } + + cleanSelectedRows(nonSelectableRows = []) { + if (nonSelectableRows.length === 0) { + return []; + } + return this.selected.filter(x => nonSelectableRows.includes(x)); } isAllRowsSelected() { return this.data.length === this.selected.length; } - isAnySelectedRow() { - return this.selected.length > 0; + isAnySelectedRow(nonSelectableRows = []) { + if (nonSelectableRows.length === 0) { + return this.selected.length > 0; + } + return this.selected.filter(x => !nonSelectableRows.includes(x)).length; } } diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js index d443301..5c92145 100644 --- a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js @@ -36,28 +36,65 @@ describe('', () => { describe('handleRowClick', () => { describe('when was been clicked', () => { const rowKey = 1; - const mockOnRowSelect = sinon.stub(); + const selected = true; + let mockOnRowSelect; const spy = sinon.spy(SelectionCell.prototype, 'handleRowClick'); beforeEach(() => { + mockOnRowSelect = sinon.stub(); + }); + + afterEach(() => { spy.reset(); mockOnRowSelect.reset(); }); - it('should call handleRowClicked', () => { - wrapper = shallow( - - ); + describe('when disabled prop is false', () => { + beforeEach(() => { + wrapper = shallow( + + ); + wrapper.find('td').simulate('click'); + }); - wrapper.find('td').simulate('click'); + it('should calling handleRowClicked', () => { + expect(spy.calledOnce).toBe(true); + }); - expect(spy.calledOnce).toBe(true); - expect(mockOnRowSelect.calledOnce).toBe(true); + it('should calling onRowSelect callback correctly', () => { + expect(mockOnRowSelect.calledOnce).toBe(true); + expect( + mockOnRowSelect.calledWith(rowKey, !selected) + ).toBe(true); + }); + }); + + describe('when disabled prop is true', () => { + beforeEach(() => { + wrapper = shallow( + + ); + wrapper.find('td').simulate('click'); + }); + + it('should calling handleRowClicked', () => { + expect(spy.calledOnce).toBe(true); + }); + + it('should not calling onRowSelect callback', () => { + expect(mockOnRowSelect.calledOnce).toBe(false); + }); }); describe('if selectRow.mode is radio', () => { @@ -132,5 +169,22 @@ describe('', () => { expect(wrapper.find('input').get(0).props.type).toBe(mode); expect(wrapper.find('input').get(0).props.checked).toBe(selected); }); + + describe('when disabled prop give as true', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render component with disabled attribute', () => { + expect(wrapper.find('input').get(0).props.disabled).toBeTruthy(); + }); + }); }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index c332f27..73d01ea 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -20,6 +20,9 @@ const defaultColumns = [{ text: 'Price' }]; +const keyField = 'id'; +const rowIndex = 1; + describe('Row', () => { let wrapper; @@ -32,7 +35,13 @@ describe('Row', () => { describe('simplest row', () => { beforeEach(() => { wrapper = shallow( - ); + + ); }); it('should render successfully', () => { @@ -48,7 +57,7 @@ describe('Row', () => { wrapper = shallow( { wrapper = shallow( { describe('when cellEdit prop is defined', () => { let columns; let cellEdit; - const rowIndex = 1; - const keyField = 'id'; beforeEach(() => { columns = defaultColumns; @@ -270,7 +277,7 @@ describe('Row', () => { { describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { beforeEach(() => { wrapper = shallow( - ); + + ); }); - it('should not render ', () => { + it('should not render SelectionCell component', () => { expect(wrapper.find(SelectionCell).length).toBe(0); }); }); describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { + let selectRow; beforeEach(() => { - const selectRow = { mode: 'checkbox' }; + selectRow = { mode: 'checkbox' }; wrapper = shallow( ); }); - it('should render ', () => { + it('should rendering SelectionCell component correctly', () => { expect(wrapper.find(SelectionCell).length).toBe(1); }); + + it('should render SelectionCell component with correct props', () => { + expect(wrapper.find(SelectionCell).props().selected).toBeTruthy(); + expect(wrapper.find(SelectionCell).props().disabled).toBeFalsy(); + expect(wrapper.find(SelectionCell).props().mode).toEqual(selectRow.mode); + }); + + describe('if selectRow.nonSelectable is defined and contain a rowkey which is match to current row', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox', nonSelectable: [row.id] }; + wrapper = shallow( + ); + }); + + it('should render SelectionCell component with correct disable prop correctly', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + expect(wrapper.find(SelectionCell).prop('disabled')).toBeTruthy(); + }); + }); + + describe('if selectRow.nonSelectable is defined and not contain any rowkey which is match to current row', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox', nonSelectable: [3, 4, 6] }; + wrapper = shallow( + ); + }); + + it('should render SelectionCell component with correct disable prop correctly', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + expect(wrapper.find(SelectionCell).prop('disabled')).toBeFalsy(); + }); + }); }); }); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js index d3b0ec3..716a350 100644 --- a/packages/react-bootstrap-table2/test/store/base.test.js +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -111,37 +111,72 @@ describe('Store Base', () => { }); }); - describe('selectAllRowKeys', () => { + describe('selectAllRows', () => { it('should return all row keys', () => { - const rowKeys = store.selectAllRowKeys(); + const rowKeys = store.selectAllRows(); expect(Array.isArray(rowKeys)).toBeTruthy(); - expect(rowKeys).toEqual([3, 2, 4, 1]); + expect(rowKeys).toEqual(data.map(x => x[store.keyField])); + }); + + it('should return correct row keys when nonSelectableRows args is not empty', () => { + const nonSelectableRows = [1, 3]; + const rowKeys = store.selectAllRows(nonSelectableRows); + + expect(Array.isArray(rowKeys)).toBeTruthy(); + expect(rowKeys).toEqual( + data + .filter(x => !nonSelectableRows.includes(_.get(x, store.keyField))) + .map(x => x[store.keyField]) + ); }); }); describe('isAllRowsSelected', () => { - it('should return true when all rows was selected', () => { + it('should return true when all rows is selected', () => { store.selected = data.map(row => _.get(row, store.keyField)); expect(store.isAllRowsSelected()).toBeTruthy(); }); - it('should return false when all rows was not selected', () => { + it('should return false when not all of rows is selected', () => { store.selected = [1]; - expect(store.isAllRowsSelected()).not.toBeTruthy(); + expect(store.isAllRowsSelected()).toBeFalsy(); }); }); describe('isAnySelectedRow', () => { - it('should return true when one or more than one rows were selected', () => { - store.selected = data.map(row => _.get(row, store.keyField)); + describe('if store.selected not empty', () => { + it('should return true', () => { + store.selected = data.map(row => _.get(row, store.keyField)); + expect(store.isAnySelectedRow()).toBeTruthy(); + }); - expect(store.isAnySelectedRow()).toBeTruthy(); + describe('when nonSelectableRows given and not all of nonselectable rows are match current store.selected', () => { + const nonSelectableRows = [1, 3]; + beforeEach(() => { + store.selected = [1, 4]; + }); + + it('should return true', () => { + expect(store.isAnySelectedRow(nonSelectableRows)).toBeTruthy(); + }); + }); + + describe('when nonSelectableRows given and all of nonselectable rows are match current store.selected', () => { + const nonSelectableRows = [1, 3]; + beforeEach(() => { + store.selected = nonSelectableRows; + }); + + it('should return false', () => { + expect(store.isAnySelectedRow(nonSelectableRows)).toBeFalsy(); + }); + }); }); - it('should return false when none was selected', () => { + it('should return false if store.selected is empty', () => { store.selected = []; expect(store.isAnySelectedRow()).not.toBeTruthy(); From b16da90ae9c0552beb39abc0c12a4e8ddf150c43 Mon Sep 17 00:00:00 2001 From: Allen Date: Mon, 23 Oct 2017 03:08:30 -0500 Subject: [PATCH 050/136] fix #108 * implement selectRow.bgColor * add story for selectRow.bgColor * add testing for selectRow.bgColor * patch docs for selectRow.bgColor --- docs/row-selection.md | 22 +++++ .../row-selection/selection-bgcolor.js | 88 +++++++++++++++++++ .../stories/index.js | 2 + packages/react-bootstrap-table2/src/body.js | 12 ++- .../src/bootstrap-table.js | 3 +- .../react-bootstrap-table2/test/body.test.js | 74 ++++++++++++++++ 6 files changed, 197 insertions(+), 4 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js diff --git a/docs/row-selection.md b/docs/row-selection.md index 6143295..9726ce2 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -11,6 +11,7 @@ The following are available properties in `selectRow`: * [mode (**required**)](#mode) * [style](#style) * [classes)](#classes) +* [bgColor](#bgColor) * [nonSelectable)](#nonSelectable) #### Optional @@ -88,6 +89,27 @@ const selectRow = { }; ``` +## selectRow.bgColor - [String | Function] +The backgroud color when row is selected + +```js +const selectRow = { + mode: 'checkbox', + bgColor: 'red' +}; +``` + +There's also a more good way to custom it: + +```js +const selectRow = { + mode: 'checkbox', + bgColor: (row, rowIndex) => { + return ....; // return a color code + } +}; +``` + ## selectRow.nonSelectable - [Array] This prop allow you to restrict some rows which can not be selected by user. `selectRow.nonSelectable` accept an rowkeys array. diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js new file mode 100644 index 0000000..a1dc2db --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js @@ -0,0 +1,88 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow1 = { + mode: 'checkbox', + bgColor: '#00BFFF' +}; + +const selectRow2 = { + mode: 'checkbox', + bgColor: (row, rowIndex) => (rowIndex > 1 ? '#00BFFF' : '#00FFFF') +}; + +const sourceCode1 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + bgColor: '#00BFFF' +}; + + +`; + +const sourceCode2 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + bgColor: (row, rowIndex) => (rowIndex > 1 ? '#00BFFF' : '#00FFFF') +}; + + +`; + +export default () => ( +
+ + { sourceCode1 } + + { sourceCode2 } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 95192e0..7be418f 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -56,6 +56,7 @@ import MultipleSelectionTable from 'examples/row-selection/multiple-selection'; import SelectionStyleTable from 'examples/row-selection/selection-style'; import SelectionClassTable from 'examples/row-selection/selection-class'; import NonSelectableRowsTable from 'examples/row-selection/non-selectable-rows'; +import SelectionBgColorTable from 'examples/row-selection/selection-bgcolor'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -120,4 +121,5 @@ storiesOf('Row Selection', module) .add('Multiple Selection', () => ) .add('Selection Style', () => ) .add('Selection Class', () => ) + .add('Selection Background Color', () => ) .add('Not Selectabled Rows', () => ); diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index fe0bcaa..18ccef8 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -24,7 +24,8 @@ const Body = (props) => { const { style: selectedStyle, - classes: selectedClasses + classes: selectedClasses, + bgColor } = selectRow; let content; @@ -42,11 +43,16 @@ const Body = (props) => { ? selectedRowKeys.includes(key) : null; - let style = {}; - let classes = ''; + let style; + let classes; if (selected) { style = _.isFunction(selectedStyle) ? selectedStyle(row, index) : selectedStyle; classes = _.isFunction(selectedClasses) ? selectedClasses(row, index) : selectedClasses; + + if (bgColor) { + style = style || {}; + style.backgroundColor = _.isFunction(bgColor) ? bgColor(row, index) : bgColor; + } } return ( diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index f336f04..c90823a 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -130,7 +130,8 @@ BootstrapTable.propTypes = { mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired, style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), - nonSelectable: PropTypes.array + nonSelectable: PropTypes.array, + bgColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) }), onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 9a670a8..fc30b0b 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -275,6 +275,80 @@ describe('Body', () => { expect(wrapper.find(Row).get(0).props.className).toEqual(className); }); }); + + describe('if selectRow.bgColor is defined as a string', () => { + const bgColor = 'red'; + + beforeEach(() => { + selectRow.bgColor = bgColor; + wrapper = shallow( + + ); + }); + + it('should render Row component with correct style.backgroundColor prop', () => { + expect(wrapper.find(Row).get(0).props.style).toEqual({ backgroundColor: bgColor }); + }); + }); + + describe('if selectRow.bgColor is defined as a string', () => { + const bgColor = 'red'; + const bgColorCallBack = sinon.stub().returns(bgColor); + + beforeEach(() => { + selectRow.bgColor = bgColorCallBack; + wrapper = shallow( + + ); + }); + + it('should calling selectRow.bgColor callback correctly', () => { + expect(bgColorCallBack.calledOnce).toBeTruthy(); + expect(bgColorCallBack.calledWith(data[0]), 1); + }); + + it('should render Row component with correct style.backgroundColor prop', () => { + expect(wrapper.find(Row).get(0).props.style).toEqual({ backgroundColor: bgColor }); + }); + }); + + describe('if selectRow.bgColor defined and selectRow.style.backgroundColor defined', () => { + const bgColor = 'yellow'; + const style = { backgroundColor: 'red' }; + + beforeEach(() => { + selectRow.style = style; + selectRow.bgColor = bgColor; + wrapper = shallow( + + ); + }); + + it('should take selectRow.bgColor as higher priority', () => { + expect(wrapper.find(Row).get(0).props.style.backgroundColor).toBe(bgColor); + }); + }); }); describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { From bbeb122af1a994946401ec0beb298ddc164ab98d Mon Sep 17 00:00:00 2001 From: Allen Date: Tue, 24 Oct 2017 00:56:59 -0500 Subject: [PATCH 051/136] fix wrong higher order wrapping (#112) * fix wrong higher order wrapping * fix tests for wrong wrapper design --- .../src/cell-edit/wrapper.js | 8 ++- .../react-bootstrap-table2/src/container.js | 71 +++++-------------- .../src/row-selection/wrapper.js | 7 +- .../src/sort/wrapper.js | 8 ++- .../src/table-factory.js | 27 +++++++ .../test/cell-edit/wrapper.test.js | 34 +++++---- .../test/container.test.js | 61 +++++++++++++--- .../test/row-selection/wrapper.test.js | 14 ++-- .../test/sort/wrapper.test.js | 12 ++-- 9 files changed, 146 insertions(+), 96 deletions(-) create mode 100644 packages/react-bootstrap-table2/src/table-factory.js diff --git a/packages/react-bootstrap-table2/src/cell-edit/wrapper.js b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js index 20f68c0..da6963f 100644 --- a/packages/react-bootstrap-table2/src/cell-edit/wrapper.js +++ b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js @@ -1,9 +1,11 @@ /* eslint arrow-body-style: 0 */ /* eslint react/prop-types: 0 */ -import React, { Component } from 'react'; +import { Component } from 'react'; import PropTypes from 'prop-types'; import _ from '../utils'; +import { cellEditElement } from '../table-factory'; + class CellEditWrapper extends Component { constructor(props) { super(props); @@ -88,7 +90,8 @@ class CellEditWrapper extends Component { } render() { - return React.cloneElement(this.props.elem, { + return cellEditElement({ + ...this.props, onCellUpdate: this.handleCellUpdate, onStartEditing: this.startEditing, onEscapeEditing: this.escapeEditing, @@ -98,7 +101,6 @@ class CellEditWrapper extends Component { } CellEditWrapper.propTypes = { - elem: PropTypes.element.isRequired, onUpdateCell: PropTypes.func.isRequired }; diff --git a/packages/react-bootstrap-table2/src/container.js b/packages/react-bootstrap-table2/src/container.js index d8d964a..e4bf9a4 100644 --- a/packages/react-bootstrap-table2/src/container.js +++ b/packages/react-bootstrap-table2/src/container.js @@ -1,16 +1,18 @@ -/* eslint arrow-body-style: 0 */ -/* eslint react/jsx-no-bind: 0 */ /* eslint no-return-assign: 0 */ /* eslint react/prop-types: 0 */ import React, { Component } from 'react'; import Store from './store/base'; -import SortWrapper from './sort/wrapper'; -import CellEditWrapper from './cell-edit/wrapper'; -import RowSelectionWrapper from './row-selection/wrapper'; + +import { + wrapWithCellEdit, + wrapWithSelection, + wrapWithSort +} from './table-factory'; + import _ from './utils'; -const withDataStore = (Base) => { - return class BootstrapTableContainer extends Component { +const withDataStore = Base => + class BootstrapTableContainer extends Component { constructor(props) { super(props); this.store = new Store(props); @@ -46,61 +48,26 @@ const withDataStore = (Base) => { return false; } - renderCellEdit(elem) { - return ( - this.cellEditWrapper = node } - elem={ elem } - onUpdateCell={ this.handleUpdateCell } - /> - ); - } - - renderRowSelection(elem) { - return ( - - ); - } - - renderSort(elem) { - return ( - - ); - } - render() { const baseProps = { ...this.props, store: this.store }; - let element = React.createElement(Base, baseProps); - - // @TODO - // the logic of checking sort is enable or not should be placed in the props resolver.. - // but currently, I've no idea to refactoring this - if (this.props.columns.filter(col => col.sort).length > 0) { - element = this.renderSort(element); - } - - if (this.props.selectRow) { - element = this.renderRowSelection(element); - } - if (this.props.cellEdit) { - element = this.renderCellEdit(element); + return wrapWithCellEdit({ + ref: node => this.cellEditWrapper = node, + onUpdateCell: this.handleUpdateCell, + ...baseProps + }); + } else if (this.props.selectRow) { + return wrapWithSelection(baseProps); + } else if (this.props.columns.filter(col => col.sort).length > 0) { + return wrapWithSort(baseProps); } - return element; + return React.createElement(Base, baseProps); } }; -}; export default withDataStore; diff --git a/packages/react-bootstrap-table2/src/row-selection/wrapper.js b/packages/react-bootstrap-table2/src/row-selection/wrapper.js index 97909f2..dad9d6e 100644 --- a/packages/react-bootstrap-table2/src/row-selection/wrapper.js +++ b/packages/react-bootstrap-table2/src/row-selection/wrapper.js @@ -1,7 +1,8 @@ /* eslint arrow-body-style: 0 */ /* eslint react/prop-types: 0 */ -import React, { Component } from 'react'; +import { Component } from 'react'; import PropTypes from 'prop-types'; +import { selectionElement } from '../table-factory'; import Const from '../const'; @@ -65,7 +66,8 @@ class RowSelectionWrapper extends Component { } render() { - return React.cloneElement(this.props.elem, { + return selectionElement({ + ...this.props, onRowSelect: this.handleRowSelect, onAllRowsSelect: this.handleAllRowsSelect }); @@ -73,7 +75,6 @@ class RowSelectionWrapper extends Component { } RowSelectionWrapper.propTypes = { - elem: PropTypes.element.isRequired, store: PropTypes.object.isRequired }; diff --git a/packages/react-bootstrap-table2/src/sort/wrapper.js b/packages/react-bootstrap-table2/src/sort/wrapper.js index e9643eb..af16eed 100644 --- a/packages/react-bootstrap-table2/src/sort/wrapper.js +++ b/packages/react-bootstrap-table2/src/sort/wrapper.js @@ -1,9 +1,11 @@ /* eslint arrow-body-style: 0 */ /* eslint react/prop-types: 0 */ /* eslint no-return-assign: 0 */ -import React, { Component } from 'react'; +import { Component } from 'react'; import PropTypes from 'prop-types'; +import { sortableElement } from '../table-factory'; + class SortWrapper extends Component { constructor(props) { super(props); @@ -20,7 +22,8 @@ class SortWrapper extends Component { } render() { - return React.cloneElement(this.props.elem, { + return sortableElement({ + ...this.props, ref: node => this.table = node, onSort: this.handleSort }); @@ -28,7 +31,6 @@ class SortWrapper extends Component { } SortWrapper.propTypes = { - elem: PropTypes.element.isRequired, store: PropTypes.object.isRequired }; diff --git a/packages/react-bootstrap-table2/src/table-factory.js b/packages/react-bootstrap-table2/src/table-factory.js new file mode 100644 index 0000000..0eddc84 --- /dev/null +++ b/packages/react-bootstrap-table2/src/table-factory.js @@ -0,0 +1,27 @@ +import React from 'react'; + +import BootstrapTable from './bootstrap-table'; + +import SortWrapper from './sort/wrapper'; +import RowSelectionWrapper from './row-selection/wrapper'; +import CellEditWrapper from './cell-edit/wrapper'; + + +export const wrapWithCellEdit = props => + React.createElement(CellEditWrapper, { ...props }); + +export const wrapWithSelection = props => + React.createElement(RowSelectionWrapper, { ...props }); + +export const wrapWithSort = props => + React.createElement(SortWrapper, { ...props }); + +export const pureTable = props => + React.createElement(BootstrapTable, { ...props }); + + +export const sortableElement = props => pureTable(props); + +export const selectionElement = props => wrapWithSort(props); + +export const cellEditElement = props => wrapWithSelection(props); diff --git a/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js index ac504fa..49ebd22 100644 --- a/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js @@ -8,7 +8,6 @@ import CellEditWrapper from '../../src/cell-edit/wrapper'; describe('CellEditWrapper', () => { let wrapper; - let elem; const columns = [{ dataField: 'id', @@ -35,12 +34,13 @@ describe('CellEditWrapper', () => { const store = new Store({ data, keyField }); beforeEach(() => { - elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); wrapper = shallow( ); @@ -58,7 +58,7 @@ describe('CellEditWrapper', () => { expect(wrapper.state().editing).toBeFalsy(); }); - it('should inject correct props to elem', () => { + it('should inject correct props to base component', () => { expect(wrapper.props().onCellUpdate).toBeDefined(); expect(wrapper.props().onStartEditing).toBeDefined(); expect(wrapper.props().onEscapeEditing).toBeDefined(); @@ -74,12 +74,13 @@ describe('CellEditWrapper', () => { describe('and cellEdit.editing is false', () => { beforeEach(() => { - elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); wrapper = shallow( ); @@ -104,12 +105,13 @@ describe('CellEditWrapper', () => { const cidx = 2; beforeEach(() => { - elem = React.createElement(BootstrapTable, { data, cellEdit, columns, keyField, store }); wrapper = shallow( ); @@ -175,8 +177,10 @@ describe('CellEditWrapper', () => { wrapper = shallow( ); @@ -204,8 +208,10 @@ describe('CellEditWrapper', () => { wrapper = shallow( ); @@ -229,8 +235,10 @@ describe('CellEditWrapper', () => { wrapper = shallow( ); @@ -249,8 +257,10 @@ describe('CellEditWrapper', () => { wrapper = shallow( ); diff --git a/packages/react-bootstrap-table2/test/container.test.js b/packages/react-bootstrap-table2/test/container.test.js index 371441f..dc6cbd2 100644 --- a/packages/react-bootstrap-table2/test/container.test.js +++ b/packages/react-bootstrap-table2/test/container.test.js @@ -3,6 +3,9 @@ import sinon from 'sinon'; import { shallow } from 'enzyme'; import BootstrapTable from '../src'; +import SortWrapper from '../src/sort/wrapper'; +import CellEditWrapper from '../src/cell-edit/wrapper'; +import RowSelectionWrapper from '../src/row-selection/wrapper'; describe('withDataStore', () => { let wrapper; @@ -44,8 +47,7 @@ describe('withDataStore', () => { }); }); - describe('when cellEdit is defined', () => { - const spy = jest.spyOn(BootstrapTable.prototype, 'renderCellEdit'); + describe('when cellEdit prop is defined', () => { const cellEdit = { mode: 'click' }; @@ -61,15 +63,14 @@ describe('withDataStore', () => { ); }); - it('should calling renderCellEdit function', () => { - expect(spy).toHaveBeenCalled(); + it('should render CellEditWrapper component successfully', () => { + const component = wrapper.find(CellEditWrapper); + expect(component.length).toBe(1); }); - it('should injecting correct props', () => { - expect(wrapper.props().keyField).toEqual('id'); - expect(wrapper.props().cellEdit).toEqual(cellEdit); - expect(wrapper.props().elem).toBeDefined(); - expect(wrapper.props().onUpdateCell).toBeDefined(); + it('should injecting correct props to CellEditWrapper', () => { + const component = wrapper.find(CellEditWrapper); + expect(component.props().onUpdateCell).toBeDefined(); }); describe('for handleUpdateCell function', () => { @@ -129,4 +130,46 @@ describe('withDataStore', () => { describe.skip('when cellEdit.onUpdate callback is define and which return a Promise', () => {}); }); }); + + describe('when selectRow prop is defined', () => { + const selectRow = { + mode: 'checkbox' + }; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render RowSelectionWrapper component successfully', () => { + expect(wrapper.find(RowSelectionWrapper).length).toBe(1); + }); + }); + + describe('when any column.sort is defined', () => { + beforeEach(() => { + const columnsWithSort = [{ + dataField: keyField, + text: 'ID', + sort: true + }]; + wrapper = shallow( + + ); + }); + + it('should render SortWrapper component successfully', () => { + expect(wrapper.find(SortWrapper).length).toBe(1); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js index 1404259..9ab18b6 100644 --- a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js @@ -1,5 +1,4 @@ import React from 'react'; -import sinon from 'sinon'; import { shallow } from 'enzyme'; import Store from '../../src/store/base'; @@ -8,7 +7,6 @@ import RowSelectionWrapper from '../../src/row-selection/wrapper'; describe('RowSelectionWrapper', () => { let wrapper; - let elem; const columns = [{ dataField: 'id', @@ -35,14 +33,13 @@ describe('RowSelectionWrapper', () => { const store = new Store({ data, keyField }); beforeEach(() => { - elem = React.createElement(BootstrapTable, { data, selectRow, columns, keyField, store }); wrapper = shallow( ); }); @@ -57,7 +54,7 @@ describe('RowSelectionWrapper', () => { expect(wrapper.state().selectedRowKeys.length).toEqual(0); }); - it('should inject correct props to elem', () => { + it('should inject correct props to base component', () => { expect(wrapper.props().onRowSelect).toBeDefined(); expect(wrapper.props().onAllRowsSelect).toBeDefined(); }); @@ -81,14 +78,13 @@ describe('RowSelectionWrapper', () => { beforeEach(() => { selectRow.mode = 'checkbox'; - elem = React.createElement(BootstrapTable, { data, selectRow, columns, keyField, store }); wrapper = shallow( ); }); diff --git a/packages/react-bootstrap-table2/test/sort/wrapper.test.js b/packages/react-bootstrap-table2/test/sort/wrapper.test.js index e0a9ed4..f6f9613 100644 --- a/packages/react-bootstrap-table2/test/sort/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/sort/wrapper.test.js @@ -9,7 +9,6 @@ import SortWrapper from '../../src/sort/wrapper'; describe('SortWrapper', () => { let wrapper; - let elem; const columns = [{ dataField: 'id', @@ -33,10 +32,11 @@ describe('SortWrapper', () => { let store = new Store({ data, keyField }); beforeEach(() => { - elem = React.createElement(BootstrapTable, { data, columns, keyField, store }); wrapper = shallow( ); @@ -47,7 +47,7 @@ describe('SortWrapper', () => { expect(wrapper.find(BootstrapTable)).toBeDefined(); }); - it('should inject correct props to elem', () => { + it('should inject correct props to base component', () => { expect(wrapper.props().onSort).toBeDefined(); }); @@ -58,7 +58,9 @@ describe('SortWrapper', () => { store = new Store({ data, keyField }); wrapper = mount( ); From 985a1713ae4ff294dbf5cc8da674adaae66e07c2 Mon Sep 17 00:00:00 2001 From: Allen Date: Thu, 26 Oct 2017 01:35:09 -0500 Subject: [PATCH 052/136] fix #111 * implement selectRow.clickToSelect and selectRow.clickToEdit * add selectRow.clickToSelect and selectRow.clickToEdit stories * add clickToSelect to row selection examples for easier to select row * refine selectRow.nonSelectable * patch tests for selectRow.clickToSelect and selectRow.clickToEdit * patch docs for selectRow.clickToSelect and selectRow.clickToEdit --- docs/row-selection.md | 26 +++ .../click-to-select-with-cell-edit.js | 65 ++++++ .../examples/row-selection/click-to-select.js | 55 +++++ .../row-selection/multiple-selection.js | 14 +- .../row-selection/non-selectable-rows.js | 2 + .../row-selection/selection-bgcolor.js | 4 + .../examples/row-selection/selection-class.js | 4 + .../examples/row-selection/selection-style.js | 4 + .../row-selection/single-selection.js | 14 +- .../stories/index.js | 4 + packages/react-bootstrap-table2/src/body.js | 6 +- .../src/bootstrap-table.js | 2 + .../src/cell-edit/editing-cell.js | 13 ++ .../src/cell-edit/wrapper.js | 19 +- packages/react-bootstrap-table2/src/const.js | 3 +- packages/react-bootstrap-table2/src/row.js | 192 +++++++++++------- packages/react-bootstrap-table2/src/utils.js | 27 ++- .../react-bootstrap-table2/test/body.test.js | 24 +++ .../test/cell-edit/wrapper.test.js | 51 ++++- .../react-bootstrap-table2/test/row.test.js | 162 ++++++++++++++- 20 files changed, 588 insertions(+), 103 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/click-to-select-with-cell-edit.js create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/click-to-select.js diff --git a/docs/row-selection.md b/docs/row-selection.md index 9726ce2..832ef1d 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -13,6 +13,8 @@ The following are available properties in `selectRow`: * [classes)](#classes) * [bgColor](#bgColor) * [nonSelectable)](#nonSelectable) +* [clickToSelect)](#clickToSelect) +* [clickToEdit](#clickToEdit) #### Optional @@ -118,4 +120,28 @@ const selectRow = { mode: 'checkbox', nonSelectable: [1, 3 ,5] }; +``` + +## selectRow.clickToSelect - [Bool] +Able to select row when clicking on row. + +```js +const selectRow = { + mode: 'checkbox', + clickToSelect: true +}; +``` + +> Note: if you also enable [cellEdit](./cell-edit.md), the `selectRow.clickToSelect` will deactivate the functionality of cell editing +> If you want to click on row to select row and edit cell simultaneously, you are suppose to enable [`selectRow.clickToEdit`](#clickToEdit) + +## selectRow.clickToEdit - [Bool] +Able to click to edit cell and select row + +```js +const selectRow = { + mode: 'checkbox', + clickToSelect: true + clickToEdit: true +}; ``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select-with-cell-edit.js b/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select-with-cell-edit.js new file mode 100644 index 0000000..cc0c1fe --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select-with-cell-edit.js @@ -0,0 +1,65 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true, + clickToEdit: true +}; + +const cellEdit = { + mode: 'click' +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true, + clickToEdit: true // Click to edit cell also +}; + +const cellEdit = { + mode: 'click' +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select.js b/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select.js new file mode 100644 index 0000000..b792b43 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/click-to-select.js @@ -0,0 +1,55 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js index 8228902..b792b43 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/multiple-selection.js @@ -17,8 +17,9 @@ const columns = [{ text: 'Product Price' }]; -const selectRowProp = { - mode: 'checkbox' +const selectRow = { + mode: 'checkbox', + clickToSelect: true }; const sourceCode = `\ @@ -33,21 +34,22 @@ const columns = [{ text: 'Product Price' }]; -const selectRowProp = { - mode: 'checkbox' +const selectRow = { + mode: 'checkbox', + clickToSelect: true }; `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js b/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js index d74d785..69fbf0a 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/non-selectable-rows.js @@ -19,6 +19,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, nonSelectable: [0, 2, 4] }; @@ -36,6 +37,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, nonSelectable: [0, 2, 4] }; diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js index a1dc2db..ede13e0 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-bgcolor.js @@ -20,11 +20,13 @@ const columns = [{ const selectRow1 = { mode: 'checkbox', + clickToSelect: true, bgColor: '#00BFFF' }; const selectRow2 = { mode: 'checkbox', + clickToSelect: true, bgColor: (row, rowIndex) => (rowIndex > 1 ? '#00BFFF' : '#00FFFF') }; @@ -42,6 +44,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, bgColor: '#00BFFF' }; @@ -67,6 +70,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, bgColor: (row, rowIndex) => (rowIndex > 1 ? '#00BFFF' : '#00FFFF') }; diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js index ffce5b8..4c6b794 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-class.js @@ -20,11 +20,13 @@ const columns = [{ const selectRow1 = { mode: 'checkbox', + clickToSelect: true, classes: 'selection-row' }; const selectRow2 = { mode: 'checkbox', + clickToSelect: true, classes: (row, rowIndex) => (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') }; @@ -43,6 +45,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, classes: 'selection-row' }; @@ -68,6 +71,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, classes: (row, rowIndex) => (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') }; diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js index 1608fdf..e347c1e 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-style.js @@ -20,11 +20,13 @@ const columns = [{ const selectRow1 = { mode: 'checkbox', + clickToSelect: true, style: { backgroundColor: '#c8e6c9' } }; const selectRow2 = { mode: 'checkbox', + clickToSelect: true, style: (row, rowIndex) => { const backgroundColor = rowIndex > 1 ? '#00BFFF' : '#00FFFF'; return { backgroundColor }; @@ -45,6 +47,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, style: { backgroundColor: '#c8e6c9' } }; @@ -70,6 +73,7 @@ const columns = [{ const selectRow = { mode: 'checkbox', + clickToSelect: true, style: (row, rowIndex) => { const backgroundColor = rowIndex > 1 ? '#00BFFF' : '#00FFFF'; return { backgroundColor }; diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js index 15827b9..936dde4 100644 --- a/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js +++ b/packages/react-bootstrap-table2-example/examples/row-selection/single-selection.js @@ -17,8 +17,9 @@ const columns = [{ text: 'Product Price' }]; -const selectRowProp = { - mode: 'radio' +const selectRow = { + mode: 'radio', + clickToSelect: true }; const sourceCode = `\ @@ -33,21 +34,22 @@ const columns = [{ text: 'Product Price' }]; -const selectRowProp = { - mode: 'radio' +const selectRow = { + mode: 'radio', + clickToSelect: true }; `; export default () => (
- + { sourceCode }
); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 7be418f..6598dd6 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -53,6 +53,8 @@ import CellEditWithRedux from 'examples/cell-edit/cell-edit-with-redux-table'; // work on row selection import SingleSelectionTable from 'examples/row-selection/single-selection'; import MultipleSelectionTable from 'examples/row-selection/multiple-selection'; +import ClickToSelectTable from 'examples/row-selection/click-to-select'; +import ClickToSelectWithCellEditTable from 'examples/row-selection/click-to-select-with-cell-edit'; import SelectionStyleTable from 'examples/row-selection/selection-style'; import SelectionClassTable from 'examples/row-selection/selection-class'; import NonSelectableRowsTable from 'examples/row-selection/non-selectable-rows'; @@ -119,6 +121,8 @@ storiesOf('Cell Editing', module) storiesOf('Row Selection', module) .add('Single Selection', () => ) .add('Multiple Selection', () => ) + .add('Click to Select', () => ) + .add('Click to Select and Edit Cell', () => ) .add('Selection Style', () => ) .add('Selection Class', () => ) .add('Selection Background Color', () => ) diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 18ccef8..453ab0d 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -25,7 +25,8 @@ const Body = (props) => { const { style: selectedStyle, classes: selectedClasses, - bgColor + bgColor, + nonSelectable } = selectRow; let content; @@ -55,6 +56,8 @@ const Body = (props) => { } } + const selectable = !nonSelectable || !nonSelectable.includes(key); + return ( { columns={ columns } cellEdit={ cellEdit } editable={ editable } + selectable={ selectable } selected={ selected } selectRow={ selectRow } style={ style } diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index c90823a..11530c8 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -128,6 +128,8 @@ BootstrapTable.propTypes = { }), selectRow: PropTypes.shape({ mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired, + clickToSelect: PropTypes.bool, + clickToEdit: PropTypes.bool, style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), nonSelectable: PropTypes.array, diff --git a/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js index ee432dd..48a7299 100644 --- a/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js +++ b/packages/react-bootstrap-table2/src/cell-edit/editing-cell.js @@ -1,6 +1,8 @@ /* eslint arrow-body-style: 0 */ /* eslint react/prop-types: 0 */ /* eslint no-return-assign: 0 */ +/* eslint class-methods-use-this: 0 */ +/* eslint jsx-a11y/no-noninteractive-element-interactions: 0 */ import React, { Component } from 'react'; import cs from 'classnames'; import PropTypes from 'prop-types'; @@ -16,6 +18,7 @@ class EditingCell extends Component { this.indicatorTimer = null; this.clearTimer = this.clearTimer.bind(this); this.handleBlur = this.handleBlur.bind(this); + this.handleClick = this.handleClick.bind(this); this.handleKeyDown = this.handleKeyDown.bind(this); this.beforeComplete = this.beforeComplete.bind(this); this.state = { @@ -94,6 +97,15 @@ class EditingCell extends Component { } } + handleClick(e) { + if (e.target.tagName !== 'TD') { + // To avoid the row selection event be triggered, + // When user define selectRow.clickToSelect and selectRow.clickToEdit + // We shouldn't trigger selection event even if user click on the cell editor(input) + e.stopPropagation(); + } + } + render() { const { invalidMessage } = this.state; const { row, column, className, style } = this.props; @@ -111,6 +123,7 @@ class EditingCell extends Component { this.editor = node } diff --git a/packages/react-bootstrap-table2/src/cell-edit/wrapper.js b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js index da6963f..60e3134 100644 --- a/packages/react-bootstrap-table2/src/cell-edit/wrapper.js +++ b/packages/react-bootstrap-table2/src/cell-edit/wrapper.js @@ -61,13 +61,18 @@ class CellEditWrapper extends Component { } startEditing(ridx, cidx) { - this.setState(() => { - return { - ridx, - cidx, - editing: true - }; - }); + const editing = () => { + this.setState(() => { + return { + ridx, + cidx, + editing: true + }; + }); + }; + + const { selectRow } = this.props; + if (!selectRow || (selectRow.clickToEdit || !selectRow.clickToSelect)) editing(); } escapeEditing() { diff --git a/packages/react-bootstrap-table2/src/const.js b/packages/react-bootstrap-table2/src/const.js index 4e10028..e9ebaa6 100644 --- a/packages/react-bootstrap-table2/src/const.js +++ b/packages/react-bootstrap-table2/src/const.js @@ -10,5 +10,6 @@ export default { ROW_SELECT_DISABLED: 'ROW_SELECT_DISABLED', CHECKBOX_STATUS_CHECKED: 'checked', CHECKBOX_STATUS_INDETERMINATE: 'indeterminate', - CHECKBOX_STATUS_UNCHECKED: 'unchecked' + CHECKBOX_STATUS_UNCHECKED: 'unchecked', + DELAY_FOR_DBCLICK: 200 }; diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index d93f384..23a8cf2 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -1,5 +1,5 @@ /* eslint react/prop-types: 0 */ -import React from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; import _ from './utils'; @@ -8,91 +8,133 @@ import SelectionCell from './row-selection/selection-cell'; import EditingCell from './cell-edit/editing-cell'; import Const from './const'; -const Row = (props) => { - const { - row, - columns, - keyField, - rowIndex, - className, - style, - cellEdit, - selected, - selectRow, - editable: editableRow - } = props; +class Row extends Component { + constructor(props) { + super(props); + this.clickNum = 0; + this.handleRowClick = this.handleRowClick.bind(this); + } - const { - mode, - onStart, - ridx: editingRowIdx, - cidx: editingColIdx, - ...rest - } = cellEdit; - - const key = _.get(row, keyField); - const { nonSelectable } = selectRow; - - return ( - - { - selectRow.mode === Const.ROW_SELECT_DISABLED - ? null - : ( - - ) + handleRowClick() { + const { + row, + selected, + keyField, + selectable, + selectRow: { + onRowSelect, + clickToEdit } - { - columns.map((column, index) => { - const { dataField } = column; - const content = _.get(row, dataField); - let editable = _.isDefined(column.editable) ? column.editable : true; - if (dataField === keyField || !editableRow) editable = false; - if (_.isFunction(column.editable)) { - editable = column.editable(content, row, rowIndex, index); + } = this.props; + const key = _.get(row, keyField); + if (selectable) { + const { cellEdit: { mode } } = this.props; + if (mode === Const.DBCLICK_TO_CELL_EDIT && clickToEdit) { + this.clickNum += 1; + _.debounce(() => { + if (this.clickNum === 1) { + onRowSelect(key, !selected); } - if (rowIndex === editingRowIdx && index === editingColIdx) { - let editCellstyle = column.editCellStyle || {}; - let editCellclasses = column.editCellClasses; - if (_.isFunction(column.editCellStyle)) { - editCellstyle = column.editCellStyle(content, row, rowIndex, index); + this.clickNum = 0; + }, Const.DELAY_FOR_DBCLICK)(); + } else { + onRowSelect(key, !selected); + } + } + } + + render() { + const { + row, + columns, + keyField, + rowIndex, + className, + style, + cellEdit, + selected, + selectRow, + selectable, + editable: editableRow + } = this.props; + + const { + mode, + onStart, + ridx: editingRowIdx, + cidx: editingColIdx, + ...rest + } = cellEdit; + + const key = _.get(row, keyField); + const { clickToSelect } = selectRow; + + const trAttrs = {}; + if (clickToSelect) { + trAttrs.onClick = this.handleRowClick; + } + + return ( + + { + selectRow.mode === Const.ROW_SELECT_DISABLED + ? null + : ( + + ) + } + { + columns.map((column, index) => { + const { dataField } = column; + const content = _.get(row, dataField); + let editable = _.isDefined(column.editable) ? column.editable : true; + if (dataField === keyField || !editableRow) editable = false; + if (_.isFunction(column.editable)) { + editable = column.editable(content, row, rowIndex, index); } - if (_.isFunction(column.editCellClasses)) { - editCellclasses = column.editCellClasses(content, row, rowIndex, index); + if (rowIndex === editingRowIdx && index === editingColIdx) { + let editCellstyle = column.editCellStyle || {}; + let editCellclasses = column.editCellClasses; + if (_.isFunction(column.editCellStyle)) { + editCellstyle = column.editCellStyle(content, row, rowIndex, index); + } + if (_.isFunction(column.editCellClasses)) { + editCellclasses = column.editCellClasses(content, row, rowIndex, index); + } + return ( + + ); } return ( - ); - } - return ( - - ); - }) - } - - ); -}; + }) + } + + ); + } +} Row.propTypes = { row: PropTypes.object.isRequired, diff --git a/packages/react-bootstrap-table2/src/utils.js b/packages/react-bootstrap-table2/src/utils.js index 4360d0d..16572b2 100644 --- a/packages/react-bootstrap-table2/src/utils.js +++ b/packages/react-bootstrap-table2/src/utils.js @@ -1,5 +1,6 @@ /* eslint no-empty: 0 */ /* eslint no-param-reassign: 0 */ +/* eslint prefer-rest-params: 0 */ function splitNested(str) { return [str] @@ -72,6 +73,29 @@ function sleep(fn, ms) { return setTimeout(() => fn(), ms); } +function debounce(func, wait, immediate) { + let timeout; + + return () => { + const later = () => { + timeout = null; + + if (!immediate) { + func.apply(this, arguments); + } + }; + + const callNow = immediate && !timeout; + + clearTimeout(timeout); + timeout = setTimeout(later, wait || 0); + + if (callNow) { + func.appy(this, arguments); + } + }; +} + export default { get, set, @@ -79,5 +103,6 @@ export default { isObject, isEmptyObject, isDefined, - sleep + sleep, + debounce }; diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index fc30b0b..717e34e 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -349,6 +349,30 @@ describe('Body', () => { expect(wrapper.find(Row).get(0).props.style.backgroundColor).toBe(bgColor); }); }); + + describe('if selectRow.nonSelectable is defined', () => { + const nonSelectableRowIndex = 1; + const nonSelectable = [data[nonSelectableRowIndex][keyField]]; + + beforeEach(() => { + selectRow.nonSelectable = nonSelectable; + wrapper = shallow( + + ); + }); + + it('should render Row component with correct selectable prop', () => { + expect(wrapper.find(Row).get(0).props.selectable).toBeTruthy(); + expect(wrapper.find(Row).get(nonSelectableRowIndex).props.selectable).toBeFalsy(); + }); + }); }); describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { diff --git a/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js index 49ebd22..c41d336 100644 --- a/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/cell-edit/wrapper.test.js @@ -146,14 +146,61 @@ describe('CellEditWrapper', () => { }); describe('call startEditing function', () => { + const ridx = 1; + const cidx = 3; it('should set state correctly', () => { - const ridx = 1; - const cidx = 3; wrapper.instance().startEditing(ridx, cidx); expect(wrapper.state().ridx).toEqual(ridx); expect(wrapper.state().cidx).toEqual(cidx); expect(wrapper.state().editing).toBeTruthy(); }); + + describe('if selectRow.clickToSelect is defined', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox', clickToSelect: true }; + wrapper = shallow( + + ); + }); + + it('should not set state', () => { + wrapper.instance().startEditing(ridx, cidx); + expect(wrapper.state().ridx).toBeNull(); + expect(wrapper.state().cidx).toBeDefined(); + }); + }); + + describe('if selectRow.clickToSelect and selectRow.clickToEdit is defined', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox', clickToSelect: true, clickToEdit: true }; + wrapper = shallow( + + ); + }); + + it('should set state correctly', () => { + wrapper.instance().startEditing(ridx, cidx); + expect(wrapper.state().ridx).toEqual(ridx); + expect(wrapper.state().cidx).toEqual(cidx); + expect(wrapper.state().editing).toBeTruthy(); + }); + }); }); describe('call completeEditing function', () => { diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 73d01ea..f720ee7 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -37,6 +37,7 @@ describe('Row', () => { wrapper = shallow( { row={ row } selectRow={ selectRow } selected + selectable />); }); @@ -483,9 +485,8 @@ describe('Row', () => { expect(wrapper.find(SelectionCell).props().mode).toEqual(selectRow.mode); }); - describe('if selectRow.nonSelectable is defined and contain a rowkey which is match to current row', () => { + describe('if selectable prop is false', () => { beforeEach(() => { - selectRow = { mode: 'checkbox', nonSelectable: [row.id] }; wrapper = shallow( { row={ row } keyField={ keyField } selectRow={ selectRow } + selectable={ false } />); }); @@ -503,9 +505,8 @@ describe('Row', () => { }); }); - describe('if selectRow.nonSelectable is defined and not contain any rowkey which is match to current row', () => { + describe('if selectable prop is true', () => { beforeEach(() => { - selectRow = { mode: 'checkbox', nonSelectable: [3, 4, 6] }; wrapper = shallow( { row={ row } keyField={ keyField } selectRow={ selectRow } + selectable />); }); @@ -522,5 +524,157 @@ describe('Row', () => { expect(wrapper.find(SelectionCell).prop('disabled')).toBeFalsy(); }); }); + + describe('if selectRow.clickToSelect is true', () => { + beforeEach(() => { + selectRow.clickToSelect = true; + wrapper = shallow( + ); + }); + + it('should render Row component successfully with onClick event', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tr').prop('onClick')).toBeDefined(); + }); + }); + }); + + describe('handleRowClick', () => { + let selectRow; + let onRowSelectCallBack; + + describe('selectable prop is false', () => { + beforeEach(() => { + onRowSelectCallBack = sinon.stub(); + selectRow = { + mode: 'checkbox', + clickToSelect: true, + onRowSelect: onRowSelectCallBack + }; + wrapper = shallow( + ); + wrapper.find('tr').simulate('click'); + }); + + it('should not calling selectRow.onRowSelect callback', () => { + expect(onRowSelectCallBack.callCount).toEqual(0); + }); + }); + + describe('selectable prop is true', () => { + describe('and selected prop is true', () => { + beforeEach(() => { + onRowSelectCallBack = sinon.stub(); + selectRow = { + mode: 'checkbox', + clickToSelect: true, + onRowSelect: onRowSelectCallBack + }; + wrapper = shallow( + ); + wrapper.find('tr').simulate('click'); + }); + + it('should calling selectRow.onRowSelect callback', () => { + expect(onRowSelectCallBack.callCount).toEqual(1); + }); + + it('should calling selectRow.onRowSelect with correct argument', () => { + expect(onRowSelectCallBack.calledWith(row[keyField], false)).toBeTruthy(); + }); + }); + + describe('and selected prop is false', () => { + beforeEach(() => { + onRowSelectCallBack = sinon.stub(); + selectRow = { + mode: 'checkbox', + clickToSelect: true, + onRowSelect: onRowSelectCallBack + }; + wrapper = shallow( + ); + wrapper.find('tr').simulate('click'); + }); + + it('should calling selectRow.onRowSelect callback', () => { + expect(onRowSelectCallBack.callCount).toEqual(1); + }); + + it('should calling selectRow.onRowSelect with correct argument', () => { + expect(onRowSelectCallBack.calledWith(row[keyField], true)).toBeTruthy(); + }); + }); + }); + + describe('if cellEdit.mode is dbclick and selectRow.clickToEdit is true', () => { + beforeEach(() => { + onRowSelectCallBack = sinon.stub(); + const cellEdit = { + mode: Const.DBCLICK_TO_CELL_EDIT, + ridx: undefined, + cidx: undefined, + onStart: sinon.stub() + }; + selectRow = { + mode: 'checkbox', + clickToSelect: true, + clickToEdit: true, + onRowSelect: onRowSelectCallBack + }; + wrapper = shallow( + ); + wrapper.instance().handleRowClick(); + wrapper.instance().handleRowClick(); + }); + + it('should increase clickNum as 2', () => { + expect(wrapper.instance().clickNum).toEqual(2); + }); + }); }); }); From cf142d3b395b565ffde0de3cb5d112c28d1c93be Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 26 Oct 2017 14:36:13 +0800 Subject: [PATCH 053/136] Improve CONTRIBUTING doc * Improve CONTRIBUTING doc * Correct some typos and grammar errors * Improve docs/README.md --- CONTRIBUTING.md | 23 ++++++++++++----------- docs/README.md | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1179bde..9d8ed01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,21 +1,22 @@ +# Contributing + # Issues -Before opening an issue, please make sure your problem/request doesn't exist. When you open issue, please provide the following information if possible: +Before opening an issue, please make sure your problem or request doesn't exist. When opening an issue, please provide the following information if possible: * Example code or repo (please keep it simple and minimal) -* Steps to reproduce -* `react-bootstrap-table2` version +* Steps to reproduce. +* `react-bootstrap-table2` version. -Anyway, you're welcome to open an issue to ask questions or discuss about a feature request. +Additionally, asking questions and requesting new features are welcomed via [issue tracker](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues). # Pull Requests Check [here](./docs/development.md) for getting started with development. -* When you want to implement a new feature, please let us know (via issues). -* Please run tests before opening a PR and also remember to test the actual business logic. -* If your PR is trying to fix a bug, please describe the bug number with hashtag when creating the PR. +* We recommend filing an [issue](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues) before you implement any new features. +* Please ensure that all the test suites have passed before submitting a PR. Besides, always test the actual business logic. +* If your PR is trying to fix a bug, please describe the details as much as you could and tag the bug number with hashtag. # For the members of react-bootstrap-table2 org - -* Please convert the ticket to issue when is ticket moved from `Backlog` to `Ready` in project. -* Please write documentation if any new API/feature/props is changed or added. -* Please add a story example if any new feature is implemented \ No newline at end of file +* Please convert the ticket to issue when the ticket has moved from `Backlog` to `Ready`. +* Please update the docs if any API, feature or component props was changed or added. The code and docs should always be in sync. +* Please add a story example if any new feature was implemented. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index f1d3d9e..4140d37 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# Documents +# Documentation -## Props on BootstrapTable +## BootstrapTable Props #### Required * [keyField (**required**)](#keyField) @@ -17,28 +17,28 @@ * [selectRow](#selectRow) ### keyField(**required**) - [String] -`keyField` is a prop to tell `react-bootstrap-table2` which column is unigue key. +Tells `react-bootstrap-table2` which column is unique. ### data(**required**) - [Array] -Assign your table data via `data` prop. It only accept an Array object. +Provides data for your table. It accepts a single Array object. ### columns(**required**) - [Object] -`columns` props accept an Array object, please see [columns definition](./columns.md) for more detail. +Accepts a single Array object, please see [columns definition](./columns.md) for more detail. ### caption - [String | Node] -Same as [caption tag](https://www.w3schools.com/TAgs/tag_caption.asp) in HTML. You can give a String or a React JSX. +Same as HTML [caption tag](https://www.w3schools.com/TAgs/tag_caption.asp), you can set it as String or a React JSX. ### striped - [Bool] -Same as `.table-striped` class for adding zebra-stripes to a table +Same as bootstrap `.table-striped` class for adding zebra-stripes to a table. ### bordered - [Bool] -Same as `.table-bordered` class for adding borders on all sides of the table and cells +Same as bootstrap `.table-bordered` class for adding borders to a table and table cells. ### hover - [Bool] -Same as `.table-hover` class for adding a hover effect (grey background color) on table rows +Same as bootstrap `.table-hover` class for adding mouse hover effect (grey background color) on table rows. ### condensed - [Bool] -Same as `.table-condensed` class for makeing a table more compact by cutting cell padding in half +Same as bootstrap `.table-condensed` class for making a table more compact by cutting cell padding in half. ### cellEdit - [Object] -`cellEdit` allow you to enable cell editing on table, please see [cellEdit definition](./cell-edit.md) for more detail. +Makes table cells editable, please see [cellEdit definition](./cell-edit.md) for more detail. ### selectRow - [Object] -`selectRow` allow you to have a mechanism to select rows, please see [selectRow definition](./row-selection.md) for more detail. \ No newline at end of file +Makes table rows selectable, please see [selectRow definition](./row-selection.md) for more detail. \ No newline at end of file From 974f129aad4e665f9ebc72492e4394722526d562 Mon Sep 17 00:00:00 2001 From: Allen Date: Thu, 26 Oct 2017 03:49:35 -0500 Subject: [PATCH 054/136] fix #116 * implement selection hook * add story for selection hooks * add tests for selection hooks * add missing test for store.setSelectedRowKeys(array) * patch docs for selection hooks --- docs/row-selection.md | 29 +++++++- .../examples/row-selection/selection-hooks.js | 66 +++++++++++++++++ .../stories/index.js | 4 +- .../src/bootstrap-table.js | 2 + .../src/row-selection/selection-cell.js | 8 ++- .../src/row-selection/wrapper.js | 24 +++++-- packages/react-bootstrap-table2/src/row.js | 6 +- .../react-bootstrap-table2/src/store/base.js | 4 ++ .../react-bootstrap-table2/test/body.test.js | 2 +- .../test/row-selection/selection-cell.test.js | 17 +++-- .../test/row-selection/wrapper.test.js | 72 +++++++++++++++++-- .../react-bootstrap-table2/test/row.test.js | 4 +- .../test/store/base.test.js | 25 +++++++ 13 files changed, 236 insertions(+), 27 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/selection-hooks.js diff --git a/docs/row-selection.md b/docs/row-selection.md index 832ef1d..0aa5f2c 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -15,6 +15,8 @@ The following are available properties in `selectRow`: * [nonSelectable)](#nonSelectable) * [clickToSelect)](#clickToSelect) * [clickToEdit](#clickToEdit) +* [onSelect](#onSelect) +* [onSelectAll](#onSelectAll) #### Optional @@ -144,4 +146,29 @@ const selectRow = { clickToSelect: true clickToEdit: true }; -``` \ No newline at end of file +``` + +# selectRow.onSelect - [Function] +This callback function will be called when a row is select/unselect and pass following three arguments: +`row`, `isSelect` and `rowIndex`. + +```js +const selectRow = { + mode: 'checkbox', + onSelect: (row, isSelect, rowIndex) => { + // ... + } +}; +``` + +# selectRow.onSelectAll - [Function] +This callback function will be called when select/unselect all and it only work when you configure [`selectRow.mode`](#mode) as `checkbox`. + +```js +const selectRow = { + mode: 'checkbox', + onSelectAll: (isSelect, results) => { + // ... + } +}; +``` diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/selection-hooks.js b/packages/react-bootstrap-table2-example/examples/row-selection/selection-hooks.js new file mode 100644 index 0000000..fd94d6b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/selection-hooks.js @@ -0,0 +1,66 @@ + +/* eslint no-console: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true, + onSelect: (row, isSelect, rowIndex) => { + console.log(row.id); + console.log(isSelect); + console.log(rowIndex); + }, + onSelectAll: (isSelect, rows) => { + console.log(isSelect); + console.log(rows); + } +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 6598dd6..31a03c1 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -59,6 +59,7 @@ import SelectionStyleTable from 'examples/row-selection/selection-style'; import SelectionClassTable from 'examples/row-selection/selection-class'; import NonSelectableRowsTable from 'examples/row-selection/non-selectable-rows'; import SelectionBgColorTable from 'examples/row-selection/selection-bgcolor'; +import SelectionHooks from 'examples/row-selection/selection-hooks'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -126,4 +127,5 @@ storiesOf('Row Selection', module) .add('Selection Style', () => ) .add('Selection Class', () => ) .add('Selection Background Color', () => ) - .add('Not Selectabled Rows', () => ); + .add('Not Selectabled Rows', () => ) + .add('Selection Hooks', () => ); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 11530c8..bcbf5cf 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -130,6 +130,8 @@ BootstrapTable.propTypes = { mode: PropTypes.oneOf([Const.ROW_SELECT_SINGLE, Const.ROW_SELECT_MULTIPLE]).isRequired, clickToSelect: PropTypes.bool, clickToEdit: PropTypes.bool, + onSelect: PropTypes.func, + onSelectAll: PropTypes.func, style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), nonSelectable: PropTypes.array, diff --git a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js index fa41f3a..bc7e0c5 100644 --- a/packages/react-bootstrap-table2/src/row-selection/selection-cell.js +++ b/packages/react-bootstrap-table2/src/row-selection/selection-cell.js @@ -12,7 +12,8 @@ export default class SelectionCell extends Component { rowKey: PropTypes.any, selected: PropTypes.bool, onRowSelect: PropTypes.func, - disabled: PropTypes.bool + disabled: PropTypes.bool, + rowIndex: PropTypes.number } constructor() { @@ -32,7 +33,8 @@ export default class SelectionCell extends Component { rowKey, selected, onRowSelect, - disabled + disabled, + rowIndex } = this.props; if (disabled) return; @@ -41,7 +43,7 @@ export default class SelectionCell extends Component { ? true : !selected; - onRowSelect(rowKey, checked); + onRowSelect(rowKey, checked, rowIndex); } render() { diff --git a/packages/react-bootstrap-table2/src/row-selection/wrapper.js b/packages/react-bootstrap-table2/src/row-selection/wrapper.js index dad9d6e..0e6b1c7 100644 --- a/packages/react-bootstrap-table2/src/row-selection/wrapper.js +++ b/packages/react-bootstrap-table2/src/row-selection/wrapper.js @@ -21,8 +21,8 @@ class RowSelectionWrapper extends Component { * @param {String} rowKey - row key of what was selected. * @param {Boolean} checked - next checked status of input button. */ - handleRowSelect(rowKey, checked) { - const { selectRow: { mode }, store } = this.props; + handleRowSelect(rowKey, checked, rowIndex) { + const { selectRow: { mode, onSelect }, store } = this.props; const { ROW_SELECT_SINGLE } = Const; let currSelected = [...store.getSelectedRowKeys()]; @@ -37,6 +37,11 @@ class RowSelectionWrapper extends Component { store.setSelectedRowKeys(currSelected); + if (onSelect) { + const row = store.getRowByRowId(rowKey); + onSelect(row, checked, rowIndex); + } + this.setState(() => ({ selectedRowKeys: currSelected })); @@ -47,19 +52,26 @@ class RowSelectionWrapper extends Component { * @param {Boolean} option - customized result for all rows selection */ handleAllRowsSelect(option) { - const { store, selectRow } = this.props; - const selected = store.isAnySelectedRow(selectRow.nonSelectable); + const { store, selectRow: { + onSelectAll, + nonSelectable + } } = this.props; + const selected = store.isAnySelectedRow(nonSelectable); // set next status of all row selected by store.selected or customizing by user. const result = option || !selected; const currSelected = result ? - store.selectAllRows(selectRow.nonSelectable) : - store.cleanSelectedRows(selectRow.nonSelectable); + store.selectAllRows(nonSelectable) : + store.cleanSelectedRows(nonSelectable); store.setSelectedRowKeys(currSelected); + if (onSelectAll) { + onSelectAll(result, store.getSelectedRows()); + } + this.setState(() => ({ selectedRowKeys: currSelected })); diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index 23a8cf2..a53682e 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -21,6 +21,7 @@ class Row extends Component { selected, keyField, selectable, + rowIndex, selectRow: { onRowSelect, clickToEdit @@ -33,12 +34,12 @@ class Row extends Component { this.clickNum += 1; _.debounce(() => { if (this.clickNum === 1) { - onRowSelect(key, !selected); + onRowSelect(key, !selected, rowIndex); } this.clickNum = 0; }, Const.DELAY_FOR_DBCLICK)(); } else { - onRowSelect(key, !selected); + onRowSelect(key, !selected, rowIndex); } } } @@ -83,6 +84,7 @@ class Row extends Component { diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index eb435d1..509dc63 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -50,6 +50,10 @@ export default class Store { this.selected = selectedKeys; } + getSelectedRows() { + return this.selected.map(k => this.getRowByRowId(k)); + } + getSelectedRowKeys() { return this.selected; } diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 717e34e..2e98068 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -318,7 +318,7 @@ describe('Body', () => { it('should calling selectRow.bgColor callback correctly', () => { expect(bgColorCallBack.calledOnce).toBeTruthy(); - expect(bgColorCallBack.calledWith(data[0]), 1); + expect(bgColorCallBack.calledWith(data[0]), 1).toBeTruthy(); }); it('should render Row component with correct style.backgroundColor prop', () => { diff --git a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js index 5c92145..bcb5799 100644 --- a/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/selection-cell.test.js @@ -6,6 +6,7 @@ import SelectionCell from '../../src/row-selection/selection-cell'; describe('', () => { const mode = 'checkbox'; + const rowIndex = 1; let wrapper; @@ -56,6 +57,7 @@ describe('', () => { selected rowKey={ rowKey } mode={ mode } + rowIndex={ rowIndex } onRowSelect={ mockOnRowSelect } /> ); @@ -69,7 +71,7 @@ describe('', () => { it('should calling onRowSelect callback correctly', () => { expect(mockOnRowSelect.calledOnce).toBe(true); expect( - mockOnRowSelect.calledWith(rowKey, !selected) + mockOnRowSelect.calledWith(rowKey, !selected, rowIndex) ).toBe(true); }); }); @@ -81,6 +83,7 @@ describe('', () => { selected rowKey={ rowKey } mode={ mode } + rowIndex={ rowIndex } onRowSelect={ mockOnRowSelect } disabled /> @@ -104,6 +107,7 @@ describe('', () => { selected rowKey={ rowKey } mode="radio" + rowIndex={ rowIndex } onRowSelect={ mockOnRowSelect } /> ); @@ -113,12 +117,12 @@ describe('', () => { // first click wrapper.find('td').simulate('click'); expect(mockOnRowSelect.callCount).toBe(1); - expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + expect(mockOnRowSelect.calledWith(rowKey, true, rowIndex)).toBe(true); // second click wrapper.find('td').simulate('click'); expect(mockOnRowSelect.callCount).toBe(2); - expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + expect(mockOnRowSelect.calledWith(rowKey, true, rowIndex)).toBe(true); }); }); @@ -128,6 +132,7 @@ describe('', () => { ); @@ -138,13 +143,13 @@ describe('', () => { wrapper.setProps({ selected: true }); wrapper.find('td').simulate('click'); expect(mockOnRowSelect.callCount).toBe(1); - expect(mockOnRowSelect.calledWith(rowKey, false)).toBe(true); + expect(mockOnRowSelect.calledWith(rowKey, false, rowIndex)).toBe(true); // second click wrapper.setProps({ selected: false }); wrapper.find('td').simulate('click'); expect(mockOnRowSelect.callCount).toBe(2); - expect(mockOnRowSelect.calledWith(rowKey, true)).toBe(true); + expect(mockOnRowSelect.calledWith(rowKey, true, rowIndex)).toBe(true); }); }); }); @@ -158,6 +163,7 @@ describe('', () => { ); @@ -176,6 +182,7 @@ describe('', () => { diff --git a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js index 9ab18b6..ed5c858 100644 --- a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js @@ -1,4 +1,5 @@ import React from 'react'; +import sinon from 'sinon'; import { shallow } from 'enzyme'; import Store from '../../src/store/base'; @@ -28,6 +29,8 @@ describe('RowSelectionWrapper', () => { mode: 'radio' }; + const rowIndex = 1; + const keyField = 'id'; const store = new Store({ data, keyField }); @@ -64,10 +67,10 @@ describe('RowSelectionWrapper', () => { const secondSelectedRow = data[1][keyField]; it('call handleRowSelect function should seting correct state.selectedRowKeys', () => { - wrapper.instance().handleRowSelect(firstSelectedRow); + wrapper.instance().handleRowSelect(firstSelectedRow, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual([firstSelectedRow]); - wrapper.instance().handleRowSelect(secondSelectedRow); + wrapper.instance().handleRowSelect(secondSelectedRow, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual([secondSelectedRow]); }); }); @@ -90,16 +93,16 @@ describe('RowSelectionWrapper', () => { }); it('call handleRowSelect function should seting correct state.selectedRowKeys', () => { - wrapper.instance().handleRowSelect(firstSelectedRow, true); + wrapper.instance().handleRowSelect(firstSelectedRow, true, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow])); - wrapper.instance().handleRowSelect(secondSelectedRow, true); + wrapper.instance().handleRowSelect(secondSelectedRow, true, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([firstSelectedRow, secondSelectedRow])); - wrapper.instance().handleRowSelect(firstSelectedRow, false); + wrapper.instance().handleRowSelect(firstSelectedRow, false, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual(expect.arrayContaining([secondSelectedRow])); - wrapper.instance().handleRowSelect(secondSelectedRow, false); + wrapper.instance().handleRowSelect(secondSelectedRow, false, rowIndex); expect(wrapper.state('selectedRowKeys')).toEqual([]); }); @@ -119,4 +122,61 @@ describe('RowSelectionWrapper', () => { expect(wrapper.state('selectedRowKeys')).toEqual([]); }); }); + + describe('when selectRow.onSelect is defined', () => { + const selectedRow = data[0][keyField]; + const onSelectCallBack = sinon.stub(); + + beforeEach(() => { + selectRow.mode = 'checkbox'; + selectRow.onSelect = onSelectCallBack; + wrapper = shallow( + + ); + }); + + it('selectRow.onSelect callback should be called correctly when calling handleRowSelect function', () => { + wrapper.instance().handleRowSelect(selectedRow, true, rowIndex); + expect(onSelectCallBack.callCount).toEqual(1); + expect(onSelectCallBack.calledWith(data[0], true, rowIndex)).toBeTruthy(); + + wrapper.instance().handleRowSelect(selectedRow, false, rowIndex); + expect(onSelectCallBack.callCount).toEqual(2); + expect(onSelectCallBack.calledWith(data[0], false, rowIndex)).toBeTruthy(); + }); + }); + + describe('when selectRow.onSelectAll is defined', () => { + const onSelectAllCallBack = sinon.stub(); + + beforeEach(() => { + selectRow.mode = 'checkbox'; + selectRow.onSelectAll = onSelectAllCallBack; + wrapper = shallow( + + ); + }); + + it('selectRow.onSelect callback should be called correctly when calling handleRowSelect function', () => { + wrapper.instance().handleAllRowsSelect(); + expect(onSelectAllCallBack.callCount).toEqual(1); + expect(onSelectAllCallBack.calledWith(true, data)).toBeTruthy(); + + wrapper.instance().handleAllRowsSelect(); + expect(onSelectAllCallBack.callCount).toEqual(2); + expect(onSelectAllCallBack.calledWith(false, [])).toBeTruthy(); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index f720ee7..84241e7 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -605,7 +605,7 @@ describe('Row', () => { }); it('should calling selectRow.onRowSelect with correct argument', () => { - expect(onRowSelectCallBack.calledWith(row[keyField], false)).toBeTruthy(); + expect(onRowSelectCallBack.calledWith(row[keyField], false, rowIndex)).toBeTruthy(); }); }); @@ -636,7 +636,7 @@ describe('Row', () => { }); it('should calling selectRow.onRowSelect with correct argument', () => { - expect(onRowSelectCallBack.calledWith(row[keyField], true)).toBeTruthy(); + expect(onRowSelectCallBack.calledWith(row[keyField], true, rowIndex)).toBeTruthy(); }); }); }); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js index 716a350..7bfb8f6 100644 --- a/packages/react-bootstrap-table2/test/store/base.test.js +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -87,6 +87,31 @@ describe('Store Base', () => { }); }); + describe('getSelectedRows', () => { + const selected = [1, 4]; + beforeEach(() => { + store.setSelectedRowKeys(selected); + }); + + it('should return all selected rows by store.selected', () => { + const result = store.getSelectedRows(); + expect(result).toBeDefined(); + expect(result.length).toEqual(2); + result.forEach((r) => { + expect(r).toBeDefined(); + expect(selected.includes(r[store.keyField])).toBeTruthy(); + }); + }); + }); + + describe('setSelectedRowKeys', () => { + const selected = [1, 4]; + it('should set store.selected correctly', () => { + store.setSelectedRowKeys(selected); + expect(store.getSelectedRowKeys()).toEqual(selected); + }); + }); + describe('edit', () => { it('should update a specified field correctly', () => { const newValue = 'newValue'; From ca02af3d6a8ee88f95c0d226a0b44b4fd6bd9f3a Mon Sep 17 00:00:00 2001 From: chunming Date: Sun, 29 Oct 2017 01:01:03 -0500 Subject: [PATCH 055/136] logs messages on the story panel (#123) * ref: https://github.com/storybooks/storybook-addon-console --- packages/react-bootstrap-table2-example/.storybook/addons.js | 1 + packages/react-bootstrap-table2-example/.storybook/config.js | 5 +++++ packages/react-bootstrap-table2-example/package.json | 1 + 3 files changed, 7 insertions(+) diff --git a/packages/react-bootstrap-table2-example/.storybook/addons.js b/packages/react-bootstrap-table2-example/.storybook/addons.js index 967b205..afebf47 100644 --- a/packages/react-bootstrap-table2-example/.storybook/addons.js +++ b/packages/react-bootstrap-table2-example/.storybook/addons.js @@ -2,3 +2,4 @@ import '@storybook/addon-actions/register'; import '@storybook/addon-links/register'; +import '@storybook/addon-console'; diff --git a/packages/react-bootstrap-table2-example/.storybook/config.js b/packages/react-bootstrap-table2-example/.storybook/config.js index be93e84..f50d246 100644 --- a/packages/react-bootstrap-table2-example/.storybook/config.js +++ b/packages/react-bootstrap-table2-example/.storybook/config.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ import React from 'react'; import { configure, addDecorator } from '@storybook/react'; +import { withConsole } from '@storybook/addon-console'; function loadStories() { require('stories'); @@ -16,6 +17,10 @@ const componentDecorator = (story) => (
); + +// prepend the story name to log messages +addDecorator((storyFn, context) => withConsole()(storyFn)(context)); + addDecorator(componentDecorator); configure(loadStories, module); diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index 76efab3..5872311 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -20,6 +20,7 @@ "react-bootstrap-table2": "0.0.1" }, "devDependencies": { + "@storybook/addon-console": "^1.0.0", "@storybook/react": "^3.2.8", "react-redux": "^5.0.6", "redux": "^3.7.2", From ab305a7db2eabe1bdb2e510bd0086a4fd880bf64 Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 29 Oct 2017 14:58:33 +0800 Subject: [PATCH 056/136] fix #119 * implement selectRow.hideSelectColumn * add story for selectRow.hideSelectColumn * add tests for selectRow.hideSelectColumn * patch docs for selectRow.hideSelectColumn --- docs/row-selection.md | 17 +++++- .../row-selection/hide-selection-column.js | 59 +++++++++++++++++++ .../stories/index.js | 4 +- .../src/bootstrap-table.js | 3 +- packages/react-bootstrap-table2/src/header.js | 5 +- packages/react-bootstrap-table2/src/row.js | 8 +-- .../test/header.test.js | 43 +++++++++++++- .../react-bootstrap-table2/test/row.test.js | 21 +++++++ 8 files changed, 149 insertions(+), 11 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/row-selection/hide-selection-column.js diff --git a/docs/row-selection.md b/docs/row-selection.md index 0aa5f2c..6262be4 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -17,6 +17,7 @@ The following are available properties in `selectRow`: * [clickToEdit](#clickToEdit) * [onSelect](#onSelect) * [onSelectAll](#onSelectAll) +* [hideSelectColumn](#hideSelectColumn) #### Optional @@ -148,7 +149,7 @@ const selectRow = { }; ``` -# selectRow.onSelect - [Function] +## selectRow.onSelect - [Function] This callback function will be called when a row is select/unselect and pass following three arguments: `row`, `isSelect` and `rowIndex`. @@ -161,7 +162,7 @@ const selectRow = { }; ``` -# selectRow.onSelectAll - [Function] +## selectRow.onSelectAll - [Function] This callback function will be called when select/unselect all and it only work when you configure [`selectRow.mode`](#mode) as `checkbox`. ```js @@ -172,3 +173,15 @@ const selectRow = { } }; ``` + +## selectRow.hideSelectColumn - [Bool] +Default is `false`, if you don't want to have a selection column, give this prop as `true` + +```js +const selectRow = { + mode: 'radio', + hideSelectColumn: true, + clickToSelect: true, + bgColor: 'red' +}; +``` diff --git a/packages/react-bootstrap-table2-example/examples/row-selection/hide-selection-column.js b/packages/react-bootstrap-table2-example/examples/row-selection/hide-selection-column.js new file mode 100644 index 0000000..b654411 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/row-selection/hide-selection-column.js @@ -0,0 +1,59 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true, + hideSelectColumn: true, + bgColor: '#00BFFF' +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const selectRow = { + mode: 'checkbox', + clickToSelect: true, + hideSelectColumn: true, + bgColor: '#00BFFF' +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 31a03c1..99cee5a 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -60,6 +60,7 @@ import SelectionClassTable from 'examples/row-selection/selection-class'; import NonSelectableRowsTable from 'examples/row-selection/non-selectable-rows'; import SelectionBgColorTable from 'examples/row-selection/selection-bgcolor'; import SelectionHooks from 'examples/row-selection/selection-hooks'; +import HideSelectionColumnTable from 'examples/row-selection/hide-selection-column'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; @@ -128,4 +129,5 @@ storiesOf('Row Selection', module) .add('Selection Class', () => ) .add('Selection Background Color', () => ) .add('Not Selectabled Rows', () => ) - .add('Selection Hooks', () => ); + .add('Selection Hooks', () => ) + .add('Hide Selection Column', () => ); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index bcbf5cf..cb6734c 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -135,7 +135,8 @@ BootstrapTable.propTypes = { style: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), classes: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), nonSelectable: PropTypes.array, - bgColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]) + bgColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + hideSelectColumn: PropTypes.bool }), onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index 4730c34..9c89ac8 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -7,7 +7,7 @@ import HeaderCell from './header-cell'; import SelectionHeaderCell from './row-selection/selection-header-cell'; const Header = (props) => { - const { ROW_SELECT_DISABLED } = Const; + const { ROW_SELECT_MULTIPLE } = Const; const { columns, @@ -21,7 +21,8 @@ const Header = (props) => { { - selectRow.mode === ROW_SELECT_DISABLED ? null : + (selectRow.mode === ROW_SELECT_MULTIPLE && !selectRow.hideSelectColumn) + ? : null } { columns.map((column, i) => { diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index a53682e..d08fbec 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -68,7 +68,7 @@ class Row extends Component { } = cellEdit; const key = _.get(row, keyField); - const { clickToSelect } = selectRow; + const { clickToSelect, hideSelectColumn } = selectRow; const trAttrs = {}; if (clickToSelect) { @@ -78,9 +78,8 @@ class Row extends Component { return ( { - selectRow.mode === Const.ROW_SELECT_DISABLED - ? null - : ( + (selectRow.mode === Const.ROW_SELECT_MULTIPLE && !hideSelectColumn) + ? ( ) + : null } { columns.map((column, index) => { diff --git a/packages/react-bootstrap-table2/test/header.test.js b/packages/react-bootstrap-table2/test/header.test.js index 0b01089..7af7ad9 100644 --- a/packages/react-bootstrap-table2/test/header.test.js +++ b/packages/react-bootstrap-table2/test/header.test.js @@ -53,12 +53,36 @@ describe('Header', () => { describe('when the selectRow.mode is radio(single selection)', () => { beforeEach(() => { - wrapper = shallow(
); + const selectRow = { mode: 'radio' }; + wrapper = shallow( +
+ ); }); it('should not render ', () => { expect(wrapper.find(SelectionHeaderCell).length).toBe(0); }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + const selectRow = { mode: 'radio', hideSelectColumn: true }; + wrapper = shallow( +
+ ); + }); + + it('should rendering header with selection column', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); + }); }); describe('when the selectRow.mode is checkbox(multiple selection)', () => { @@ -76,5 +100,22 @@ describe('Header', () => { it('should render ', () => { expect(wrapper.find(SelectionHeaderCell).length).toBe(1); }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox', hideSelectColumn: true }; + wrapper = shallow( +
+ ); + }); + + it('should rendering header with selection column', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); + }); }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 84241e7..10555bc 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -545,6 +545,27 @@ describe('Row', () => { expect(wrapper.find('tr').prop('onClick')).toBeDefined(); }); }); + + describe('if selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + selectRow.hideSelectColumn = true; + wrapper = shallow( + ); + }); + + it('should render Row component without selection column', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find(SelectionCell).length).toBe(0); + }); + }); }); describe('handleRowClick', () => { From e1e8c002714ccfd85b2f37490761371d35dbebe8 Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 29 Oct 2017 16:58:37 +0800 Subject: [PATCH 057/136] fix #64 * implement default sort * add story for default sort * add test for default sort * patch docs for default sort * a workaround to avoid render twice by story.add --- docs/README.md | 13 +++- .../examples/sort/default-sort-table.js | 59 +++++++++++++++++++ .../stories/index.js | 2 + .../src/bootstrap-table.js | 6 +- .../src/sort/wrapper.js | 17 +++++- .../react-bootstrap-table2/src/store/base.js | 6 +- .../test/sort/wrapper.test.js | 34 ++++++++++- .../test/store/base.test.js | 5 ++ 8 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/sort/default-sort-table.js diff --git a/docs/README.md b/docs/README.md index 4140d37..1d45c9e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,6 +15,7 @@ * [condensed](#condensed) * [cellEdit](#cellEdit) * [selectRow](#selectRow) +* [defaultSorted](#defaultSorted) ### keyField(**required**) - [String] Tells `react-bootstrap-table2` which column is unique. @@ -41,4 +42,14 @@ Same as bootstrap `.table-condensed` class for making a table more compact by cu Makes table cells editable, please see [cellEdit definition](./cell-edit.md) for more detail. ### selectRow - [Object] -Makes table rows selectable, please see [selectRow definition](./row-selection.md) for more detail. \ No newline at end of file +Makes table rows selectable, please see [selectRow definition](./row-selection.md) for more detail. + +### defaultSorted - [Array] +`defaultSorted` accept an object array which allow you to define the default sort columns when first render. + +```js +const defaultSorted = [{ + dataField: 'name', // if dataField is not match to any column you defined, it will be ignored. + order: 'desc' // desc or asc +}]; +``` \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/sort/default-sort-table.js b/packages/react-bootstrap-table2-example/examples/sort/default-sort-table.js new file mode 100644 index 0000000..0f238a8 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/sort/default-sort-table.js @@ -0,0 +1,59 @@ +/* eslint react/prefer-stateless-function: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price', + sort: true +}]; + +const defaultSorted = [{ + dataField: 'name', + order: 'desc' +}]; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID', + sort: true +}, { + dataField: 'name', + text: 'Product Name', + sort: true +}, { + dataField: 'price', + text: 'Product Price', + sort: true +}]; + + +`; + + +class DefaultSortTable extends React.PureComponent { + render() { + return ( +
+ + { sourceCode } +
+ ); + } +} + +export default DefaultSortTable; diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 99cee5a..98d0331 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -34,6 +34,7 @@ import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; // table sort import EnableSortTable from 'examples/sort/enable-sort-table'; +import DefaultSortTable from 'examples/sort/default-sort-table'; import CustomSortTable from 'examples/sort/custom-sort-table'; // cell editing @@ -104,6 +105,7 @@ storiesOf('Work on Header Columns', module) storiesOf('Sort Table', module) .add('Enable Sort', () => ) + .add('Default Sort Table', () => ) .add('Custom Sort Fuction', () => ); storiesOf('Cell Editing', module) diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index cb6734c..2c4e2fd 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -139,7 +139,11 @@ BootstrapTable.propTypes = { hideSelectColumn: PropTypes.bool }), onRowSelect: PropTypes.func, - onAllRowsSelect: PropTypes.func + onAllRowsSelect: PropTypes.func, + defaultSorted: PropTypes.arrayOf(PropTypes.shape({ + dataField: PropTypes.string.isRequired, + order: PropTypes.oneOf([Const.SORT_DESC, Const.SORT_ASC]).isRequired + })) }; BootstrapTable.defaultProps = { diff --git a/packages/react-bootstrap-table2/src/sort/wrapper.js b/packages/react-bootstrap-table2/src/sort/wrapper.js index af16eed..78e4c03 100644 --- a/packages/react-bootstrap-table2/src/sort/wrapper.js +++ b/packages/react-bootstrap-table2/src/sort/wrapper.js @@ -12,6 +12,20 @@ class SortWrapper extends Component { this.handleSort = this.handleSort.bind(this); } + componentWillMount() { + const { columns, defaultSorted, store } = this.props; + // defaultSorted is an array, it's ready to use as multi / single sort + // when we start to support multi sort, please update following code to use array.forEach + if (defaultSorted && defaultSorted.length > 0) { + const dataField = defaultSorted[0].dataField; + const order = defaultSorted[0].order; + const column = columns.filter(col => col.dataField === dataField); + if (column.length > 0) { + store.sortBy(column[0], order); + } + } + } + handleSort(column) { const { store } = this.props; store.sortBy(column); @@ -25,7 +39,8 @@ class SortWrapper extends Component { return sortableElement({ ...this.props, ref: node => this.table = node, - onSort: this.handleSort + onSort: this.handleSort, + data: this.props.store.get() }); } } diff --git a/packages/react-bootstrap-table2/src/store/base.js b/packages/react-bootstrap-table2/src/store/base.js index 509dc63..bc0dcf4 100644 --- a/packages/react-bootstrap-table2/src/store/base.js +++ b/packages/react-bootstrap-table2/src/store/base.js @@ -18,8 +18,10 @@ export default class Store { return this.data.length === 0; } - sortBy({ dataField, sortFunc }) { - if (dataField !== this.sortField) { + sortBy({ dataField, sortFunc }, order) { + if (order) { + this.sortOrder = order; + } else if (dataField !== this.sortField) { this.sortOrder = Const.SORT_DESC; } else { this.sortOrder = this.sortOrder === Const.SORT_DESC ? Const.SORT_ASC : Const.SORT_DESC; diff --git a/packages/react-bootstrap-table2/test/sort/wrapper.test.js b/packages/react-bootstrap-table2/test/sort/wrapper.test.js index f6f9613..6dafc1b 100644 --- a/packages/react-bootstrap-table2/test/sort/wrapper.test.js +++ b/packages/react-bootstrap-table2/test/sort/wrapper.test.js @@ -16,7 +16,8 @@ describe('SortWrapper', () => { sort: true }, { dataField: 'name', - text: 'Name' + text: 'Name', + sort: true }]; const data = [{ @@ -80,4 +81,35 @@ describe('SortWrapper', () => { expect(store.sortField).toEqual(sortColumn.dataField); }); }); + + describe('when defaultSorted prop is defined', () => { + const defaultSorted = [{ + dataField: 'name', + order: Const.SORT_DESC + }]; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render table with correct default sorted', () => { + expect(wrapper.props().data).toEqual(store.get()); + }); + + it('should update store.sortField correctly', () => { + expect(store.sortField).toEqual(defaultSorted[0].dataField); + }); + + it('should update store.sortOrder correctly', () => { + expect(store.sortOrder).toEqual(defaultSorted[0].order); + }); + }); }); diff --git a/packages/react-bootstrap-table2/test/store/base.test.js b/packages/react-bootstrap-table2/test/store/base.test.js index 7bfb8f6..c60260f 100644 --- a/packages/react-bootstrap-table2/test/store/base.test.js +++ b/packages/react-bootstrap-table2/test/store/base.test.js @@ -73,6 +73,11 @@ describe('Store Base', () => { expect(e[dataField]).toEqual(result[i]); }); }); + + it('should force assign sortOrder correctly if second argument is passed', () => { + store.sortBy({ dataField }, Const.SORT_DESC); + expect(store.sortOrder).toEqual(Const.SORT_DESC); + }); }); describe('getRowByRowId', () => { From 19dc4d398425b9176e48452dc620c70d6d830c5d Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 29 Oct 2017 18:17:20 +0800 Subject: [PATCH 058/136] fix #129 * implement custom row style * add story for custom row style * add tests for rowStyle * patch docs for rowStyle --- docs/README.md | 18 +++ .../examples/rows/row-style.js | 93 +++++++++++ .../stories/index.js | 6 + packages/react-bootstrap-table2/src/body.js | 14 +- .../src/bootstrap-table.js | 5 +- .../react-bootstrap-table2/test/body.test.js | 149 +++++++++++++++++- 6 files changed, 275 insertions(+), 10 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/rows/row-style.js diff --git a/docs/README.md b/docs/README.md index 1d45c9e..1d852ca 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,6 +15,7 @@ * [condensed](#condensed) * [cellEdit](#cellEdit) * [selectRow](#selectRow) +* [rowStyle](#rowStyle) * [defaultSorted](#defaultSorted) ### keyField(**required**) - [String] @@ -44,6 +45,23 @@ Makes table cells editable, please see [cellEdit definition](./cell-edit.md) for ### selectRow - [Object] Makes table rows selectable, please see [selectRow definition](./row-selection.md) for more detail. +### rowStyle = [Object | Function] +Custom the style of table rows: + +```js + +``` + +This prop also accept a callback function for flexible to custom row style: + +```js +const rowStyle = (row, rowIndex) => { + return { ... }; +}; + + +``` + ### defaultSorted - [Array] `defaultSorted` accept an object array which allow you to define the default sort columns when first render. diff --git a/packages/react-bootstrap-table2-example/examples/rows/row-style.js b/packages/react-bootstrap-table2-example/examples/rows/row-style.js new file mode 100644 index 0000000..76de2ea --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/rows/row-style.js @@ -0,0 +1,93 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowStyle1 = { backgroundColor: '#c8e6c9' }; + +const sourceCode1 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowStyle = { backgroundColor: '#c8e6c9' }; + + +`; + +const rowStyle2 = (row, rowIndex) => { + const style = {}; + if (row.id > 3) { + style.backgroundColor = '#c8e6c9'; + } else { + style.backgroundColor = '#00BFFF'; + } + + if (rowIndex > 2) { + style.fontWeight = 'bold'; + style.color = 'white'; + } + + return style; +}; + +const sourceCode2 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowStyle2 = (row, rowIndex) => { + const style = {}; + if (row.id > 3) { + style.backgroundColor = '#c8e6c9'; + } else { + style.backgroundColor = '#00BFFF'; + } + + if (rowIndex > 2) { + style.fontWeight = 'bold'; + style.color = 'white'; + } + + return style; +}; + + +`; + +export default () => ( +
+ + { sourceCode1 } + + { sourceCode2 } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 98d0331..bd1522f 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -32,6 +32,9 @@ import HeaderColumnClassTable from 'examples/header-columns/column-class-table'; import HeaderColumnStyleTable from 'examples/header-columns/column-style-table'; import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; +// work on rows +import RowStyleTable from 'examples/rows/row-style'; + // table sort import EnableSortTable from 'examples/sort/enable-sort-table'; import DefaultSortTable from 'examples/sort/default-sort-table'; @@ -103,6 +106,9 @@ storiesOf('Work on Header Columns', module) .add('Customize Column Style', () => ) .add('Customize Column HTML attribute', () => ); +storiesOf('Work on Rows', module) + .add('Row Style', () => ); + storiesOf('Sort Table', module) .add('Enable Sort', () => ) .add('Default Sort Table', () => ) diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 453ab0d..f8c07f9 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -19,11 +19,11 @@ const Body = (props) => { visibleColumnSize, cellEdit, selectRow, - selectedRowKeys + selectedRowKeys, + rowStyle } = props; const { - style: selectedStyle, classes: selectedClasses, bgColor, nonSelectable @@ -44,10 +44,16 @@ const Body = (props) => { ? selectedRowKeys.includes(key) : null; - let style; + let style = _.isFunction(rowStyle) ? rowStyle(row, index) : rowStyle; let classes; if (selected) { - style = _.isFunction(selectedStyle) ? selectedStyle(row, index) : selectedStyle; + const selectedStyle = _.isFunction(selectRow.style) + ? selectRow.style(row, index) + : selectRow.style; + style = { + ...style, + ...selectedStyle + }; classes = _.isFunction(selectedClasses) ? selectedClasses(row, index) : selectedClasses; if (bgColor) { diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 2c4e2fd..32103b2 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -35,7 +35,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { bordered, condensed, noDataIndication, - caption + caption, + rowStyle } = this.props; const tableClass = cs('table', { @@ -83,6 +84,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { cellEdit={ cellEditInfo } selectRow={ cellSelectionInfo } selectedRowKeys={ store.getSelectedRowKeys() } + rowStyle={ rowStyle } />
@@ -140,6 +142,7 @@ BootstrapTable.propTypes = { }), onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func, + rowStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), defaultSorted: PropTypes.arrayOf(PropTypes.shape({ dataField: PropTypes.string.isRequired, order: PropTypes.oneOf([Const.SORT_DESC, Const.SORT_ASC]).isRequired diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 2e98068..1f160ad 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -26,6 +26,8 @@ describe('Body', () => { name: 'B' }]; + const keyField = 'id'; + describe('simplest body', () => { beforeEach(() => { wrapper = shallow(); @@ -117,9 +119,148 @@ describe('Body', () => { }); }); + describe('when rowStyle prop is defined', () => { + const rowStyle = { backgroundColor: 'red', color: 'white' }; + + describe('and it is a style object', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should rendering Row component with correct style', () => { + const rows = wrapper.find(Row); + rows.forEach((row) => { + expect(row.props().style).toEqual(rowStyle); + }); + }); + }); + + describe('and it is a callback functoin', () => { + const rowStyleCallBack = sinon.stub().returns(rowStyle); + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should calling rowStyleCallBack correctly', () => { + expect(rowStyleCallBack.callCount).toBe(data.length); + }); + + it('should calling rowStyleCallBack with correct argument', () => { + expect(rowStyleCallBack.firstCall.calledWith(data[0], 0)).toBeTruthy(); + expect(rowStyleCallBack.secondCall.calledWith(data[1], 1)).toBeTruthy(); + }); + + it('should rendering Row component with correct style', () => { + const rows = wrapper.find(Row); + rows.forEach((row) => { + expect(row.props().style).toEqual(rowStyle); + }); + }); + }); + + describe('when selectRow.style is defined', () => { + const selectedRowKey = data[0][keyField]; + const selectedRowKeys = [selectedRowKey]; + const selectedStyle = { backgroundColor: 'green', fontWeight: 'bold' }; + const selectRow = { mode: 'radio', style: selectedStyle }; + + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should rendering selected Row component with mixing selectRow.style correctly', () => { + const selectedRow = wrapper.find(Row).get(0); + expect(JSON.stringify(selectedRow.props.style)).toBe(JSON.stringify({ + ...rowStyle, + ...selectedStyle + })); + }); + + describe('and selectRow.bgColor is also defined', () => { + beforeEach(() => { + selectRow.bgColor = 'gray'; + wrapper = shallow( + ); + }); + + it('should rendering selected Row component with mixing selectRow.style correctly', () => { + const selectedRow = wrapper.find(Row).get(0); + expect(JSON.stringify(selectedRow.props.style)).toBe(JSON.stringify({ + ...rowStyle, + ...selectedStyle, + backgroundColor: selectRow.bgColor + })); + }); + + it('should render selected Row component with correct style.backgroundColor', () => { + const selectedRow = wrapper.find(Row).get(0); + expect(selectedRow.props.style.backgroundColor).toEqual(selectRow.bgColor); + }); + }); + }); + + describe('when selectRow.bgColor is defined', () => { + const selectedRowKey = data[0][keyField]; + const selectedRowKeys = [selectedRowKey]; + const selectRow = { mode: 'radio', bgColor: 'gray' }; + + beforeEach(() => { + selectRow.bgColor = 'gray'; + wrapper = shallow( + ); + }); + + it('should rendering selected Row component with correct style', () => { + const selectedRow = wrapper.find(Row).get(0); + expect(JSON.stringify(selectedRow.props.style)).toBe(JSON.stringify({ + ...rowStyle, + backgroundColor: selectRow.bgColor + })); + }); + }); + }); + describe('when cellEdit.nonEditableRows props is defined', () => { const nonEditableRows = [data[1].id]; - const keyField = 'id'; const cellEdit = { mode: Const.CLICK_TO_CELL_EDIT, nonEditableRows @@ -150,7 +291,6 @@ describe('Body', () => { }); describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { - const keyField = 'id'; const selectRow = { mode: 'checkbox' }; const selectedRowKey = data[0][keyField]; const selectedRowKeys = [selectedRowKey]; @@ -194,7 +334,7 @@ describe('Body', () => { }); it('should render Row component with correct style prop', () => { - expect(wrapper.find(Row).get(0).props.style).toBe(style); + expect(JSON.stringify(wrapper.find(Row).get(0).props.style)).toBe(JSON.stringify(style)); }); }); @@ -222,7 +362,7 @@ describe('Body', () => { }); it('should render Row component with correct style prop', () => { - expect(wrapper.find(Row).get(0).props.style).toBe(style); + expect(JSON.stringify(wrapper.find(Row).get(0).props.style)).toBe(JSON.stringify(style)); }); }); @@ -377,7 +517,6 @@ describe('Body', () => { describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { beforeEach(() => { - const keyField = 'id'; wrapper = shallow( Date: Mon, 30 Oct 2017 14:24:39 +0800 Subject: [PATCH 059/136] fix #128 * implement custom row classes * add story for customizing row classes * add test for rowClasses * patch docs for rowClasses --- docs/README.md | 18 ++++ .../examples/rows/row-class.js | 81 ++++++++++++++++++ .../stories/index.js | 4 +- .../stories/stylesheet/rows/_index.scss | 7 ++ .../stories/stylesheet/storybook.scss | 3 +- packages/react-bootstrap-table2/src/body.js | 14 +++- .../src/bootstrap-table.js | 5 +- .../react-bootstrap-table2/test/body.test.js | 84 ++++++++++++++++++- 8 files changed, 207 insertions(+), 9 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/rows/row-class.js create mode 100644 packages/react-bootstrap-table2-example/stories/stylesheet/rows/_index.scss diff --git a/docs/README.md b/docs/README.md index 1d852ca..aab6265 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,6 +16,7 @@ * [cellEdit](#cellEdit) * [selectRow](#selectRow) * [rowStyle](#rowStyle) +* [rowClasses](#rowClasses) * [defaultSorted](#defaultSorted) ### keyField(**required**) - [String] @@ -62,6 +63,23 @@ const rowStyle = (row, rowIndex) => { ``` +### rowClasses = [String | Function] +Custom the style of table rows: + +```js + +``` + +This prop also accept a callback function for flexible to custom row style: + +```js +const rowClasses = (row, rowIndex) => { + return 'custom-row-class'; +}; + + +``` + ### defaultSorted - [Array] `defaultSorted` accept an object array which allow you to define the default sort columns when first render. diff --git a/packages/react-bootstrap-table2-example/examples/rows/row-class.js b/packages/react-bootstrap-table2-example/examples/rows/row-class.js new file mode 100644 index 0000000..b17f6b1 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/rows/row-class.js @@ -0,0 +1,81 @@ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowClasses1 = 'custom-row-class'; + +const sourceCode1 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowClasses = 'custom-row-class'; + + +`; + +const rowClasses2 = (row, rowIndex) => { + let classes = null; + + if (rowIndex > 2) { + classes = 'index-bigger-than-two'; + } + + return classes; +}; + +const sourceCode2 = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowClasses = (row, rowIndex) => { + let classes = null; + + if (rowIndex > 2) { + classes = 'index-bigger-than-two'; + } + + return classes; +}; + + +`; + +export default () => ( +
+ + { sourceCode1 } + + { sourceCode2 } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index bd1522f..c267778 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -34,6 +34,7 @@ import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; // work on rows import RowStyleTable from 'examples/rows/row-style'; +import RowClassTable from 'examples/rows/row-class'; // table sort import EnableSortTable from 'examples/sort/enable-sort-table'; @@ -107,7 +108,8 @@ storiesOf('Work on Header Columns', module) .add('Customize Column HTML attribute', () => ); storiesOf('Work on Rows', module) - .add('Row Style', () => ); + .add('Customize Row Style', () => ) + .add('Customize Row Class', () => ); storiesOf('Sort Table', module) .add('Enable Sort', () => ) diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/rows/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/rows/_index.scss new file mode 100644 index 0000000..16da83d --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/rows/_index.scss @@ -0,0 +1,7 @@ +.custom-row-class { + background-color: #c8e6c9; +} + +.index-bigger-than-two { + background-color: #00BFFF; +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index 47a18b1..3bbec85 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -6,4 +6,5 @@ @import "welcome/index"; @import "columns/index"; @import "cell-edit/index"; -@import "row-selection/index"; \ No newline at end of file +@import "row-selection/index"; +@import "rows/index"; \ No newline at end of file diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index f8c07f9..85f4e35 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -3,6 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +import cs from 'classnames'; import _ from './utils'; import Row from './row'; @@ -20,11 +21,11 @@ const Body = (props) => { cellEdit, selectRow, selectedRowKeys, - rowStyle + rowStyle, + rowClasses } = props; const { - classes: selectedClasses, bgColor, nonSelectable } = selectRow; @@ -45,16 +46,21 @@ const Body = (props) => { : null; let style = _.isFunction(rowStyle) ? rowStyle(row, index) : rowStyle; - let classes; + let classes = (_.isFunction(rowClasses) ? rowClasses(row, index) : rowClasses); if (selected) { const selectedStyle = _.isFunction(selectRow.style) ? selectRow.style(row, index) : selectRow.style; + + const selectedClasses = _.isFunction(selectRow.classes) + ? selectRow.classes(row, index) + : selectRow.classes; + style = { ...style, ...selectedStyle }; - classes = _.isFunction(selectedClasses) ? selectedClasses(row, index) : selectedClasses; + classes = cs(classes, selectedClasses); if (bgColor) { style = style || {}; diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 32103b2..b82d819 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -36,7 +36,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { condensed, noDataIndication, caption, - rowStyle + rowStyle, + rowClasses } = this.props; const tableClass = cs('table', { @@ -85,6 +86,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { selectRow={ cellSelectionInfo } selectedRowKeys={ store.getSelectedRowKeys() } rowStyle={ rowStyle } + rowClasses={ rowClasses } /> @@ -143,6 +145,7 @@ BootstrapTable.propTypes = { onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func, rowStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + rowClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), defaultSorted: PropTypes.arrayOf(PropTypes.shape({ dataField: PropTypes.string.isRequired, order: PropTypes.oneOf([Const.SORT_DESC, Const.SORT_ASC]).isRequired diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 1f160ad..51176d6 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -155,11 +155,11 @@ describe('Body', () => { />); }); - it('should calling rowStyleCallBack correctly', () => { + it('should calling rowStyle callBack correctly', () => { expect(rowStyleCallBack.callCount).toBe(data.length); }); - it('should calling rowStyleCallBack with correct argument', () => { + it('should calling rowStyle callBack with correct argument', () => { expect(rowStyleCallBack.firstCall.calledWith(data[0], 0)).toBeTruthy(); expect(rowStyleCallBack.secondCall.calledWith(data[1], 1)).toBeTruthy(); }); @@ -259,6 +259,86 @@ describe('Body', () => { }); }); + describe('when rowClasses prop is defined', () => { + const rowClasses = 'test-classe'; + + describe('and it is a string', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should rendering Row component with correct className', () => { + const rows = wrapper.find(Row); + rows.forEach((row) => { + expect(row.props().className).toEqual(rowClasses); + }); + }); + }); + + describe('and it is a callback function', () => { + const rowClassesCallBack = sinon.stub().returns(rowClasses); + + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should calling rowClasses callback correctly', () => { + expect(rowClassesCallBack.callCount).toBe(data.length); + }); + + it('should calling rowClasses callback with correct argument', () => { + expect(rowClassesCallBack.firstCall.calledWith(data[0], 0)).toBeTruthy(); + expect(rowClassesCallBack.secondCall.calledWith(data[1], 1)).toBeTruthy(); + }); + + it('should rendering Row component with correct className', () => { + const rows = wrapper.find(Row); + rows.forEach((row) => { + expect(row.props().className).toEqual(rowClasses); + }); + }); + }); + + describe('when selectRow.classes is defined', () => { + const selectedRowKey = data[0][keyField]; + const selectedRowKeys = [selectedRowKey]; + const selectedClasses = 'selected-classes'; + const selectRow = { mode: 'radio', classes: selectedClasses }; + + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should rendering selected Row component with mixing selectRow.classes correctly', () => { + const selectedRow = wrapper.find(Row).get(0); + expect(selectedRow.props.className).toBe(`${rowClasses} ${selectedClasses}`); + }); + }); + }); + describe('when cellEdit.nonEditableRows props is defined', () => { const nonEditableRows = [data[1].id]; const cellEdit = { From 316b4e53021d8060b98c9a06cb3ffb607c3ff254 Mon Sep 17 00:00:00 2001 From: Allen Date: Mon, 30 Oct 2017 16:07:59 +0800 Subject: [PATCH 060/136] fix #133 * implement row events * add story for row event * add tests for row events * patch docs for rowEvents --- docs/README.md | 21 +++++-- .../examples/rows/row-event.js | 54 ++++++++++++++++++ .../stories/index.js | 4 +- packages/react-bootstrap-table2/src/body.js | 5 +- .../src/bootstrap-table.js | 5 +- packages/react-bootstrap-table2/src/row.js | 46 +++++++++------ .../react-bootstrap-table2/test/body.test.js | 24 ++++++++ .../react-bootstrap-table2/test/row.test.js | 57 ++++++++++++++++++- 8 files changed, 191 insertions(+), 25 deletions(-) create mode 100644 packages/react-bootstrap-table2-example/examples/rows/row-event.js diff --git a/docs/README.md b/docs/README.md index aab6265..fb53620 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,6 +17,7 @@ * [selectRow](#selectRow) * [rowStyle](#rowStyle) * [rowClasses](#rowClasses) +* [rowEvents](#rowEvents) * [defaultSorted](#defaultSorted) ### keyField(**required**) - [String] @@ -50,7 +51,7 @@ Makes table rows selectable, please see [selectRow definition](./row-selection.m Custom the style of table rows: ```js - + ``` This prop also accept a callback function for flexible to custom row style: @@ -60,14 +61,14 @@ const rowStyle = (row, rowIndex) => { return { ... }; }; - + ``` ### rowClasses = [String | Function] Custom the style of table rows: ```js - + ``` This prop also accept a callback function for flexible to custom row style: @@ -77,7 +78,19 @@ const rowClasses = (row, rowIndex) => { return 'custom-row-class'; }; - + +``` + +### rowEvents - [Object] +Custom the events on row: + +```js +const rowEvents = { + onClick: (e) => { + .... + } +}; + ``` ### defaultSorted - [Array] diff --git a/packages/react-bootstrap-table2-example/examples/rows/row-event.js b/packages/react-bootstrap-table2-example/examples/rows/row-event.js new file mode 100644 index 0000000..1ec5022 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/rows/row-event.js @@ -0,0 +1,54 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-console: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowEvents = { + onClick: (e) => { + console.log('click on row'); + } +}; + +const sourceCode = `\ +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const rowEvents = { + onClick: (e) => { + console.log('click on row'); + } +}; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index c267778..c97b373 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -35,6 +35,7 @@ import HeaderColumnAttrsTable from 'examples/header-columns/column-attrs-table'; // work on rows import RowStyleTable from 'examples/rows/row-style'; import RowClassTable from 'examples/rows/row-class'; +import RowEventTable from 'examples/rows/row-event'; // table sort import EnableSortTable from 'examples/sort/enable-sort-table'; @@ -109,7 +110,8 @@ storiesOf('Work on Header Columns', module) storiesOf('Work on Rows', module) .add('Customize Row Style', () => ) - .add('Customize Row Class', () => ); + .add('Customize Row Class', () => ) + .add('Row Event', () => ); storiesOf('Sort Table', module) .add('Enable Sort', () => ) diff --git a/packages/react-bootstrap-table2/src/body.js b/packages/react-bootstrap-table2/src/body.js index 85f4e35..b0182da 100644 --- a/packages/react-bootstrap-table2/src/body.js +++ b/packages/react-bootstrap-table2/src/body.js @@ -22,7 +22,8 @@ const Body = (props) => { selectRow, selectedRowKeys, rowStyle, - rowClasses + rowClasses, + rowEvents } = props; const { @@ -45,6 +46,7 @@ const Body = (props) => { ? selectedRowKeys.includes(key) : null; + const attrs = rowEvents || {}; let style = _.isFunction(rowStyle) ? rowStyle(row, index) : rowStyle; let classes = (_.isFunction(rowClasses) ? rowClasses(row, index) : rowClasses); if (selected) { @@ -84,6 +86,7 @@ const Body = (props) => { selectRow={ selectRow } style={ style } className={ classes } + attrs={ attrs } /> ); }); diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index b82d819..d77d47f 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -37,7 +37,8 @@ class BootstrapTable extends PropsBaseResolver(Component) { noDataIndication, caption, rowStyle, - rowClasses + rowClasses, + rowEvents } = this.props; const tableClass = cs('table', { @@ -87,6 +88,7 @@ class BootstrapTable extends PropsBaseResolver(Component) { selectedRowKeys={ store.getSelectedRowKeys() } rowStyle={ rowStyle } rowClasses={ rowClasses } + rowEvents={ rowEvents } /> @@ -145,6 +147,7 @@ BootstrapTable.propTypes = { onRowSelect: PropTypes.func, onAllRowsSelect: PropTypes.func, rowStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + rowEvents: PropTypes.object, rowClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), defaultSorted: PropTypes.arrayOf(PropTypes.shape({ dataField: PropTypes.string.isRequired, diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index d08fbec..a39d965 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -15,7 +15,7 @@ class Row extends Component { this.handleRowClick = this.handleRowClick.bind(this); } - handleRowClick() { + handleRowClick(e) { const { row, selected, @@ -25,22 +25,31 @@ class Row extends Component { selectRow: { onRowSelect, clickToEdit - } + }, + cellEdit: { mode }, + attrs } = this.props; - const key = _.get(row, keyField); - if (selectable) { - const { cellEdit: { mode } } = this.props; - if (mode === Const.DBCLICK_TO_CELL_EDIT && clickToEdit) { - this.clickNum += 1; - _.debounce(() => { - if (this.clickNum === 1) { - onRowSelect(key, !selected, rowIndex); - } - this.clickNum = 0; - }, Const.DELAY_FOR_DBCLICK)(); - } else { + + const clickFn = () => { + if (attrs.onClick) { + attrs.onClick(e); + } + if (selectable) { + const key = _.get(row, keyField); onRowSelect(key, !selected, rowIndex); } + }; + + if (mode === Const.DBCLICK_TO_CELL_EDIT && clickToEdit) { + this.clickNum += 1; + _.debounce(() => { + if (this.clickNum === 1) { + clickFn(); + } + this.clickNum = 0; + }, Const.DELAY_FOR_DBCLICK)(); + } else { + clickFn(); } } @@ -52,6 +61,7 @@ class Row extends Component { rowIndex, className, style, + attrs, cellEdit, selected, selectRow, @@ -70,7 +80,7 @@ class Row extends Component { const key = _.get(row, keyField); const { clickToSelect, hideSelectColumn } = selectRow; - const trAttrs = {}; + const trAttrs = { ...attrs }; if (clickToSelect) { trAttrs.onClick = this.handleRowClick; } @@ -143,13 +153,15 @@ Row.propTypes = { rowIndex: PropTypes.number.isRequired, columns: PropTypes.array.isRequired, style: PropTypes.object, - className: PropTypes.string + className: PropTypes.string, + attrs: PropTypes.object }; Row.defaultProps = { editable: true, style: {}, - className: null + className: null, + attrs: {} }; export default Row; diff --git a/packages/react-bootstrap-table2/test/body.test.js b/packages/react-bootstrap-table2/test/body.test.js index 51176d6..5674b83 100644 --- a/packages/react-bootstrap-table2/test/body.test.js +++ b/packages/react-bootstrap-table2/test/body.test.js @@ -339,6 +339,30 @@ describe('Body', () => { }); }); + describe('when rowEvents prop is defined', () => { + const rowEvents = { onClick: sinon.stub() }; + + describe('and it is a string', () => { + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should rendering Row component with correct attrs prop', () => { + const rows = wrapper.find(Row); + rows.forEach((row) => { + expect(row.props().attrs).toEqual(rowEvents); + }); + }); + }); + }); + describe('when cellEdit.nonEditableRows props is defined', () => { const nonEditableRows = [data[1].id]; const cellEdit = { diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index 10555bc..de8f5c5 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -84,7 +84,7 @@ describe('Row', () => { />); }); - it('should render component with style successfully', () => { + it('should render component with className successfully', () => { expect(wrapper.length).toBe(1); expect(wrapper.hasClass(className)).toBe(true); }); @@ -442,6 +442,27 @@ describe('Row', () => { }); }); + describe('when attrs prop is defined', () => { + const customClickCallBack = sinon.stub(); + const attrs = { 'data-index': 1, onClick: customClickCallBack }; + beforeEach(() => { + wrapper = shallow( + ); + }); + + it('should render component with correct attributes', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.prop('data-index')).toBe(attrs['data-index']); + expect(wrapper.prop('onClick')).toBeDefined(); + }); + }); + describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { beforeEach(() => { wrapper = shallow( @@ -697,5 +718,39 @@ describe('Row', () => { expect(wrapper.instance().clickNum).toEqual(2); }); }); + + describe('when attrs.onClick prop is defined', () => { + const customClickCallBack = sinon.stub(); + const attrs = { onClick: customClickCallBack }; + + beforeEach(() => { + onRowSelectCallBack = sinon.stub(); + selectRow = { + mode: 'checkbox', + clickToSelect: true, + onRowSelect: onRowSelectCallBack + }; + wrapper = shallow( + ); + wrapper.find('tr').simulate('click'); + }); + + it('should calling attrs.onClick callback', () => { + expect(customClickCallBack.callCount).toEqual(1); + }); + + it('should calling selectRow.onRowSelect callback', () => { + expect(onRowSelectCallBack.callCount).toEqual(1); + }); + }); }); }); From 79a81e87a5a0db9101134bad5dca950e6f5fe0c3 Mon Sep 17 00:00:00 2001 From: chunming Date: Sun, 5 Nov 2017 03:37:30 -0600 Subject: [PATCH 061/136] Bugfix/row selection (#131) * bugfix for missing radio button when single selection * [test] correct and group the test for row selection * re-order for better position --- packages/react-bootstrap-table2/src/header.js | 4 +- packages/react-bootstrap-table2/src/row.js | 2 +- .../test/header.test.js | 99 ++++--- .../react-bootstrap-table2/test/row.test.js | 268 +++++++++++------- 4 files changed, 220 insertions(+), 153 deletions(-) diff --git a/packages/react-bootstrap-table2/src/header.js b/packages/react-bootstrap-table2/src/header.js index 9c89ac8..e301eb0 100644 --- a/packages/react-bootstrap-table2/src/header.js +++ b/packages/react-bootstrap-table2/src/header.js @@ -7,7 +7,7 @@ import HeaderCell from './header-cell'; import SelectionHeaderCell from './row-selection/selection-header-cell'; const Header = (props) => { - const { ROW_SELECT_MULTIPLE } = Const; + const { ROW_SELECT_DISABLED } = Const; const { columns, @@ -21,7 +21,7 @@ const Header = (props) => { { - (selectRow.mode === ROW_SELECT_MULTIPLE && !selectRow.hideSelectColumn) + (selectRow.mode !== ROW_SELECT_DISABLED && !selectRow.hideSelectColumn) ? : null } { diff --git a/packages/react-bootstrap-table2/src/row.js b/packages/react-bootstrap-table2/src/row.js index a39d965..b1dea9c 100644 --- a/packages/react-bootstrap-table2/src/row.js +++ b/packages/react-bootstrap-table2/src/row.js @@ -88,7 +88,7 @@ class Row extends Component { return ( { - (selectRow.mode === Const.ROW_SELECT_MULTIPLE && !hideSelectColumn) + (selectRow.mode !== Const.ROW_SELECT_DISABLED && !hideSelectColumn) ? ( { }); }); - describe('when the selectRow.mode is radio(single selection)', () => { - beforeEach(() => { - const selectRow = { mode: 'radio' }; - wrapper = shallow( -
- ); - }); - - it('should not render ', () => { - expect(wrapper.find(SelectionHeaderCell).length).toBe(0); - }); - - describe('when selectRow.hideSelectColumn is true', () => { + describe('selectRow', () => { + describe('when selectRow.mode is ROW_SELECT_DISABLED (row is not able to select)', () => { beforeEach(() => { - const selectRow = { mode: 'radio', hideSelectColumn: true }; + wrapper = shallow( +
+ ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); + }); + + describe('when selectRow.mode is radio (single selection)', () => { + beforeEach(() => { + const selectRow = { mode: 'radio' }; wrapper = shallow(
{ ); }); - it('should rendering header with selection column', () => { - expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + it('should render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(1); + }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + const selectRow = { mode: 'radio', hideSelectColumn: true }; + wrapper = shallow( +
+ ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); }); }); - }); - describe('when the selectRow.mode is checkbox(multiple selection)', () => { - beforeEach(() => { - const selectRow = { mode: 'checkbox' }; - wrapper = shallow( -
- ); - }); - - it('should render ', () => { - expect(wrapper.find(SelectionHeaderCell).length).toBe(1); - }); - - describe('when selectRow.hideSelectColumn is true', () => { + describe('when selectRow.mode is checkbox (multiple selection)', () => { beforeEach(() => { - const selectRow = { mode: 'checkbox', hideSelectColumn: true }; + const selectRow = { mode: 'checkbox' }; wrapper = shallow(
{ ); }); - it('should rendering header with selection column', () => { - expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + it('should render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(1); + }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + const selectRow = { mode: 'checkbox', hideSelectColumn: true }; + wrapper = shallow( +
+ ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionHeaderCell).length).toBe(0); + }); }); }); }); diff --git a/packages/react-bootstrap-table2/test/row.test.js b/packages/react-bootstrap-table2/test/row.test.js index de8f5c5..11ccdd6 100644 --- a/packages/react-bootstrap-table2/test/row.test.js +++ b/packages/react-bootstrap-table2/test/row.test.js @@ -463,50 +463,11 @@ describe('Row', () => { }); }); - describe('when selectRow.mode is ROW_SELECT_DISABLED (row was un-selectable)', () => { - beforeEach(() => { - wrapper = shallow( - - ); - }); - it('should not render SelectionCell component', () => { - expect(wrapper.find(SelectionCell).length).toBe(0); - }); - }); - - describe('when selectRow.mode is checkbox or radio (row was selectable)', () => { + describe('selectRow', () => { let selectRow; - beforeEach(() => { - selectRow = { mode: 'checkbox' }; - wrapper = shallow( - ); - }); - it('should rendering SelectionCell component correctly', () => { - expect(wrapper.find(SelectionCell).length).toBe(1); - }); - - it('should render SelectionCell component with correct props', () => { - expect(wrapper.find(SelectionCell).props().selected).toBeTruthy(); - expect(wrapper.find(SelectionCell).props().disabled).toBeFalsy(); - expect(wrapper.find(SelectionCell).props().mode).toEqual(selectRow.mode); - }); - - describe('if selectable prop is false', () => { + describe('when selectRow.mode is ROW_SELECT_DISABLED (row is not able to select)', () => { beforeEach(() => { wrapper = shallow( { rowIndex={ rowIndex } columns={ defaultColumns } row={ row } - keyField={ keyField } - selectRow={ selectRow } - selectable={ false } - />); + /> + ); }); - it('should render SelectionCell component with correct disable prop correctly', () => { - expect(wrapper.find(SelectionCell).length).toBe(1); - expect(wrapper.find(SelectionCell).prop('disabled')).toBeTruthy(); - }); - }); - - describe('if selectable prop is true', () => { - beforeEach(() => { - wrapper = shallow( - ); - }); - - it('should render SelectionCell component with correct disable prop correctly', () => { - expect(wrapper.find(SelectionCell).length).toBe(1); - expect(wrapper.find(SelectionCell).prop('disabled')).toBeFalsy(); - }); - }); - - describe('if selectRow.clickToSelect is true', () => { - beforeEach(() => { - selectRow.clickToSelect = true; - wrapper = shallow( - ); - }); - - it('should render Row component successfully with onClick event', () => { - expect(wrapper.length).toBe(1); - expect(wrapper.find('tr').prop('onClick')).toBeDefined(); - }); - }); - - describe('if selectRow.hideSelectColumn is true', () => { - beforeEach(() => { - selectRow.hideSelectColumn = true; - wrapper = shallow( - ); - }); - - it('should render Row component without selection column', () => { - expect(wrapper.length).toBe(1); + it('should not render ', () => { expect(wrapper.find(SelectionCell).length).toBe(0); }); }); + + describe('when selectRow.mode was defined (single or multiple selection)', () => { + describe('if selectRow.mode is radio (single selection)', () => { + beforeEach(() => { + selectRow = { mode: 'radio' }; + wrapper = shallow( + ); + }); + + it('should render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + }); + + it('should render with correct props', () => { + expect(wrapper.find(SelectionCell).props().selected).toBeTruthy(); + expect(wrapper.find(SelectionCell).props().disabled).toBeFalsy(); + expect(wrapper.find(SelectionCell).props().mode).toEqual(selectRow.mode); + }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + selectRow = { mode: 'radio', hideSelectColumn: true }; + wrapper = shallow( + ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(0); + }); + }); + }); + + describe('if selectRow.mode is checkbox (multiple selection)', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox' }; + wrapper = shallow( + ); + }); + + it('should render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + }); + + it('should render with correct props', () => { + expect(wrapper.find(SelectionCell).props().selected).toBeTruthy(); + expect(wrapper.find(SelectionCell).props().disabled).toBeFalsy(); + expect(wrapper.find(SelectionCell).props().mode).toEqual(selectRow.mode); + }); + + describe('when selectRow.hideSelectColumn is true', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox', hideSelectColumn: true }; + wrapper = shallow( + ); + }); + + it('should not render ', () => { + expect(wrapper.find(SelectionCell).length).toBe(0); + }); + }); + }); + + describe('if selectable prop is false', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox' }; + wrapper = shallow( + ); + }); + + it('should render SelectionCell component with correct disable prop correctly', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + expect(wrapper.find(SelectionCell).prop('disabled')).toBeTruthy(); + }); + }); + + describe('if selectable prop is true', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox' }; + wrapper = shallow( + ); + }); + + it('should render SelectionCell component with correct disable prop correctly', () => { + expect(wrapper.find(SelectionCell).length).toBe(1); + expect(wrapper.find(SelectionCell).prop('disabled')).toBeFalsy(); + }); + }); + + describe('if selectRow.clickToSelect is true', () => { + beforeEach(() => { + selectRow = { mode: 'checkbox' }; + selectRow.clickToSelect = true; + wrapper = shallow( + ); + }); + + it('should render Row component successfully with onClick event', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('tr').prop('onClick')).toBeDefined(); + }); + }); + }); }); describe('handleRowClick', () => { From 3c88364efe98a321661054a7415061281d920b4f Mon Sep 17 00:00:00 2001 From: Allen Date: Sun, 19 Nov 2017 17:42:20 +0800 Subject: [PATCH 062/136] fix #135 * init react-bootstrap-table2-paginator * add react-bootstrap-table2-paginator as dependency * no container * handle for wrapping pagination component * add style for paginator addon * add story for pagination * implement pagination list * constants maintain in core package * implement sizePerPage dropdown * fix unalign for sizePerPage dropdown and pagination list * allow to return array from render(react@16 new feature) * implement pagination hooks * add story for pagination hooks * fixed dependencies version and upgrade enzyme * Shallow renderer no longer calls componentDidMount because DOM refs are not available * classNames -> className for TextEditor * add tests for pagination * fix react-bootstrap-table can't be resolved in other modules * implement custom page button title * add test for page button title * fix bug when sizePerPageList is an object array * add story for custom pagination * remove necessary component extends * move pagination options to react-bootstrap-table2-paginator * refine pagination stories * implement hideSizePerPage * implement hidePageListOnlyOnePage * fix multiple same key warning * remove help * support start from react@^16 --- enzyme-setup.js | 8 + package.json | 71 +- .../.storybook/webpack.config.js | 6 +- .../examples/pagination/custom-pagination.js | 82 +++ .../examples/pagination/index.js | 45 ++ .../examples/pagination/pagination-hooks.js | 82 +++ .../package.json | 3 +- .../stories/index.js | 11 + .../package.json | 11 + .../src/const.js | 17 + .../src/index.js | 8 + .../src/page-button.js | 47 ++ .../src/page-resolver.js | 134 ++++ .../src/pagination-list.js | 30 + .../src/pagination.js | 171 +++++ .../src/size-per-page-dropdown.js | 85 +++ .../src/size-per-page-option.js | 32 + .../src/wrapper.js | 99 +++ .../react-bootstrap-table-paginator.scss | 8 + .../test/page-button.test.js | 117 ++++ .../test/page-resolver.test.js | 416 ++++++++++++ .../test/pagination-list.test.js | 42 ++ .../test/pagination.test.js | 287 ++++++++ .../test/size-per-page-dropdown.test.js | 127 ++++ .../test/size-per-page-option.test.js | 39 ++ .../test/wrapper.test.js | 435 ++++++++++++ .../src/bootstrap-table.js | 7 +- .../src/cell-edit/editing-cell.js | 2 +- .../src/cell-edit/text-editor.js | 8 +- .../react-bootstrap-table2/src/container.js | 5 +- .../src/sort/wrapper.js | 4 +- .../react-bootstrap-table2/src/store/base.js | 16 + .../src/table-factory.js | 14 +- .../style/react-bootstrap-table.scss | 2 +- .../test/bootstrap-table.test.js | 1 - .../test/cell-edit/editing-cell.test.js | 19 +- .../test/cell-edit/text-editor.test.js | 13 +- yarn.lock | 631 +++++++++++------- 38 files changed, 2842 insertions(+), 293 deletions(-) create mode 100644 enzyme-setup.js create mode 100644 packages/react-bootstrap-table2-example/examples/pagination/custom-pagination.js create mode 100644 packages/react-bootstrap-table2-example/examples/pagination/index.js create mode 100644 packages/react-bootstrap-table2-example/examples/pagination/pagination-hooks.js create mode 100644 packages/react-bootstrap-table2-paginator/package.json create mode 100644 packages/react-bootstrap-table2-paginator/src/const.js create mode 100644 packages/react-bootstrap-table2-paginator/src/index.js create mode 100644 packages/react-bootstrap-table2-paginator/src/page-button.js create mode 100644 packages/react-bootstrap-table2-paginator/src/page-resolver.js create mode 100644 packages/react-bootstrap-table2-paginator/src/pagination-list.js create mode 100644 packages/react-bootstrap-table2-paginator/src/pagination.js create mode 100644 packages/react-bootstrap-table2-paginator/src/size-per-page-dropdown.js create mode 100644 packages/react-bootstrap-table2-paginator/src/size-per-page-option.js create mode 100644 packages/react-bootstrap-table2-paginator/src/wrapper.js create mode 100644 packages/react-bootstrap-table2-paginator/style/react-bootstrap-table-paginator.scss create mode 100644 packages/react-bootstrap-table2-paginator/test/page-button.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/page-resolver.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/pagination-list.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/pagination.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/size-per-page-dropdown.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/size-per-page-option.test.js create mode 100644 packages/react-bootstrap-table2-paginator/test/wrapper.test.js diff --git a/enzyme-setup.js b/enzyme-setup.js new file mode 100644 index 0000000..e952b30 --- /dev/null +++ b/enzyme-setup.js @@ -0,0 +1,8 @@ +import Adapter from 'enzyme-adapter-react-16'; +import { configure } from 'enzyme'; + +const configureEnzyme = () => { + configure({ adapter: new Adapter() }); +}; + +configureEnzyme(); diff --git a/package.json b/package.json index 4e1840d..c4eb899 100644 --- a/package.json +++ b/package.json @@ -24,45 +24,46 @@ }, "homepage": "https://github.com/react-bootstrap-table/react-bootstrap-table2#readme", "devDependencies": { - "babel-core": "^6.25.0", - "babel-eslint": "^7.2.3", - "babel-jest": "^20.0.3", - "babel-loader": "^7.1.1", - "babel-preset-es2015": "^6.24.1", - "babel-preset-react": "^6.24.1", - "babel-preset-stage-0": "^6.24.1", - "babel-register": "^6.24.1", - "css-loader": "^0.28.1", - "enzyme": "^2.9.1", - "eslint": "^4.5.0", + "babel-core": "6.25.0", + "babel-eslint": "7.2.3", + "babel-jest": "20.0.3", + "babel-loader": "7.1.1", + "babel-preset-es2015": "6.24.1", + "babel-preset-react": "6.24.1", + "babel-preset-stage-0": "6.24.1", + "babel-register": "6.24.1", + "css-loader": "0.28.1", + "enzyme": "3.1.1", + "enzyme-adapter-react-16": "1.0.4", + "eslint": "4.5.0", "eslint-config-airbnb": "15.1.0", - "eslint-loader": "^1.9.0", - "eslint-plugin-import": "^2.7.0", + "eslint-loader": "1.9.0", + "eslint-plugin-import": "2.7.0", "eslint-plugin-jsx-a11y": "5.1.1", - "eslint-plugin-react": "^7.2.1", - "html-webpack-plugin": "^2.30.1", - "jest": "^20.0.4", - "jsdom": "^11.2.0", - "jsdom-global": "^3.0.2", - "lerna": "^2.0.0", - "node-sass": "^4.5.3", - "react-test-renderer": "^15.6.1", - "sass-loader": "^6.0.6", - "sinon": "^3.2.1", - "style-loader": "^0.17.0", - "webpack": "^3.5.4", - "webpack-dev-server": "^2.7.1" + "eslint-plugin-react": "7.2.1", + "html-webpack-plugin": "2.30.1", + "jest": "20.0.4", + "jsdom": "11.2.0", + "jsdom-global": "3.0.2", + "lerna": "2.0.0", + "node-sass": "4.5.3", + "react-test-renderer": "16.0.0", + "sass-loader": "6.0.6", + "sinon": "3.2.1", + "style-loader": "0.17.0", + "webpack": "3.5.4", + "webpack-dev-server": "2.7.1" }, "dependencies": { - "classnames": "^2.2.5", - "prop-types": "^15.5.10", - "react": "^15.6.1", - "react-dom": "^15.6.1" + "classnames": "2.2.5", + "prop-types": "15.5.10", + "react": "16.0.0", + "react-dom": "16.0.0" }, "peerDependencies": { "prop-types": "^15.0.0", - "react": "^15.0.0", - "react-dom": "^15.0.0" + "react": "^16.0.0", + "react-dom": "^16.0.0" }, "jest": { "collectCoverageFrom": [ @@ -71,6 +72,12 @@ "roots": [ "/packages" ], + "setupFiles": [ + "/enzyme-setup.js" + ], + "modulePaths": [ + "/packages/react-bootstrap-table2" + ], "testEnvironment": "node", "testMatch": [ "**/test/**/*.test.js" diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index cf7afd1..3e55ec8 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -1,7 +1,9 @@ const path = require('path'); const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/src'); +const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/src'); const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); +const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style'); const storyPath = path.join(__dirname, '../stories'); const examplesPath = path.join(__dirname, '../examples'); const srcPath = path.join(__dirname, '../src'); @@ -23,14 +25,14 @@ const loaders = [{ test: /\.js?$/, use: ['babel-loader'], exclude: /node_modules/, - include: [sourcePath, storyPath], + include: [sourcePath, paginationSourcePath, storyPath], }, { test: /\.css$/, use: ['style-loader', 'css-loader'], }, { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], - include: [storyPath, sourceStylePath], + include: [storyPath, sourceStylePath, paginationStylePath], }, { test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000', diff --git a/packages/react-bootstrap-table2-example/examples/pagination/custom-pagination.js b/packages/react-bootstrap-table2-example/examples/pagination/custom-pagination.js new file mode 100644 index 0000000..b9b2fdb --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/pagination/custom-pagination.js @@ -0,0 +1,82 @@ +/* eslint react/prefer-stateless-function: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(87); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +// ... + +const options = { + paginationSize: 4, + pageStartIndex: 0, + // alwaysShowAllBtns: true, // Always show next and previous button + // withFirstAndLast: false, // Hide the going to First and Last page button + // hideSizePerPage: true, // Hide the sizePerPage dropdown always + // hidePageListOnlyOnePage: true, // Hide the pagination list when only one page + firstPageText: 'First', + prePageText: 'Back', + nextPageText: 'Next', + lastPageText: 'Last', + nextPageTitle: 'First page', + prePageTitle: 'Pre page', + firstPageTitle: 'Next page', + lastPageTitle: 'Last page', + sizePerPageList: [{ + text: '5', value: 5 + }, { + text: '10', value: 10 + }, { + text: 'All', value: products.length + }] // A numeric array is also available. the purpose of above example is custom the text +}; + + +`; +const options = { + paginationSize: 4, + pageStartIndex: 0, + // alwaysShowAllBtns: true // Always show next and previous button + // withFirstAndLast: false // Hide the going to First and Last page button + // hideSizePerPage: true, // Hide the sizePerPage dropdown always + // hidePageListOnlyOnePage: true, // Hide the pagination list when only one page + firstPageText: 'First', + prePageText: 'Back', + nextPageText: 'Next', + lastPageText: 'Last', + nextPageTitle: 'First page', + prePageTitle: 'Pre page', + firstPageTitle: 'Next page', + lastPageTitle: 'Last page', + sizePerPageList: [{ + text: '5', value: 5 + }, { + text: '10', value: 10 + }, { + text: 'All', value: products.length + }] // A numeric array is also available. the purpose of above example is custom the text +}; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/pagination/index.js b/packages/react-bootstrap-table2-example/examples/pagination/index.js new file mode 100644 index 0000000..979d59b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/pagination/index.js @@ -0,0 +1,45 @@ +/* eslint react/prefer-stateless-function: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(87); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +// ... +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + + +`; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/examples/pagination/pagination-hooks.js b/packages/react-bootstrap-table2-example/examples/pagination/pagination-hooks.js new file mode 100644 index 0000000..3ff1b15 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/pagination/pagination-hooks.js @@ -0,0 +1,82 @@ +/* eslint react/prefer-stateless-function: 0 */ +/* eslint no-console: 0 */ +import React from 'react'; + +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +import Code from 'components/common/code-block'; +import { productsGenerator } from 'utils/common'; + +const products = productsGenerator(87); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const sourceCode = `\ +import BootstrapTable from 'react-bootstrap-table2'; +import paginator from 'react-bootstrap-table2-paginator'; +// ... +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +const options = { + onSizePerPageChange: (sizePerPage, page) => { + console.log('Size per page change!!!'); + console.log('Newest size per page:' + sizePerPage); + console.log('Newest page:' + page); + }, + onPageChange: (page, sizePerPage) => { + console.log('Page change!!!'); + console.log('Newest size per page:' + sizePerPage); + console.log('Newest page:' + page); + } +}; + + +`; + +const options = { + onSizePerPageChange: (sizePerPage, page) => { + console.log('Size per page change!!!'); + console.log(`Newest size per page: ${sizePerPage}`); + console.log(`Newest page: ${page}`); + }, + onPageChange: (page, sizePerPage) => { + console.log('Page change!!!'); + console.log(`Newest size per page: ${sizePerPage}`); + console.log(`Newest page: ${page}`); + } +}; + +export default () => ( +
+ + { sourceCode } +
+); diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index 5872311..563432b 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -17,7 +17,8 @@ }, "dependencies": { "bootstrap": "^3.3.7", - "react-bootstrap-table2": "0.0.1" + "react-bootstrap-table2": "0.0.1", + "react-bootstrap-table2-paginator": "0.0.1" }, "devDependencies": { "@storybook/addon-console": "^1.0.0", diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index c97b373..78a1c0e 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -68,11 +68,17 @@ import SelectionBgColorTable from 'examples/row-selection/selection-bgcolor'; import SelectionHooks from 'examples/row-selection/selection-hooks'; import HideSelectionColumnTable from 'examples/row-selection/hide-selection-column'; +// pagination +import PaginationTable from 'examples/pagination'; +import PaginationHooksTable from 'examples/pagination/pagination-hooks'; +import CustomPaginationTable from 'examples/pagination/custom-pagination'; + // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/tomorrow.min.css'; import 'stories/stylesheet/storybook.scss'; import 'react-bootstrap-table2/style/react-bootstrap-table.scss'; +import 'react-bootstrap-table2-paginator/style/react-bootstrap-table-paginator.scss'; // import { action } from '@storybook/addon-actions'; @@ -143,3 +149,8 @@ storiesOf('Row Selection', module) .add('Not Selectabled Rows', () => ) .add('Selection Hooks', () => ) .add('Hide Selection Column', () => ); + +storiesOf('Pagination', module) + .add('Basic Pagination Table', () => ) + .add('Pagination Hooks', () => ) + .add('Custom Pagination', () => ); diff --git a/packages/react-bootstrap-table2-paginator/package.json b/packages/react-bootstrap-table2-paginator/package.json new file mode 100644 index 0000000..bb30b4b --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/package.json @@ -0,0 +1,11 @@ +{ + "name": "react-bootstrap-table2-paginator", + "version": "0.0.1", + "description": "it's the pagination addon for react-bootstrap-table2", + "main": "src/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/react-bootstrap-table2-paginator/src/const.js b/packages/react-bootstrap-table2-paginator/src/const.js new file mode 100644 index 0000000..eaa1bac --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/const.js @@ -0,0 +1,17 @@ +export default { + PAGINATION_SIZE: 5, + PAGE_START_INDEX: 1, + With_FIRST_AND_LAST: true, + SHOW_ALL_PAGE_BTNS: false, + FIRST_PAGE_TEXT: '<<', + PRE_PAGE_TEXT: '<', + NEXT_PAGE_TEXT: '>', + LAST_PAGE_TEXT: '>>', + NEXT_PAGE_TITLE: 'next page', + LAST_PAGE_TITLE: 'last page', + PRE_PAGE_TITLE: 'previous page', + FIRST_PAGE_TITLE: 'first page', + SIZE_PER_PAGE_LIST: [10, 25, 30, 50], + HIDE_SIZE_PER_PAGE: false, + HIDE_PAGE_LIST_ONLY_ONE_PAGE: false +}; diff --git a/packages/react-bootstrap-table2-paginator/src/index.js b/packages/react-bootstrap-table2-paginator/src/index.js new file mode 100644 index 0000000..c74c016 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/index.js @@ -0,0 +1,8 @@ +import Pagination from './pagination'; +import wrapper from './wrapper'; + +export default (options = {}) => ({ + Pagination, + wrapper, + options +}); diff --git a/packages/react-bootstrap-table2-paginator/src/page-button.js b/packages/react-bootstrap-table2-paginator/src/page-button.js new file mode 100644 index 0000000..272fa19 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/page-button.js @@ -0,0 +1,47 @@ +/* eslint react/require-default-props: 0 */ +/* eslint jsx-a11y/href-no-hash: 0 */ +import cs from 'classnames'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +class PageButton extends Component { + constructor(props) { + super(props); + this.handleClick = this.handleClick.bind(this); + } + + handleClick(e) { + e.preventDefault(); + this.props.onPageChange(this.props.page); + } + + render() { + const { + page, + title, + active, + disabled + } = this.props; + const classes = cs({ + active, + disabled, + 'page-item': true + }); + + return ( +
  • + { page } +
  • + ); + } +} + +PageButton.propTypes = { + onPageChange: PropTypes.func.isRequired, + page: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, + active: PropTypes.bool.isRequired, + disabled: PropTypes.bool.isRequired, + title: PropTypes.string +}; + +export default PageButton; diff --git a/packages/react-bootstrap-table2-paginator/src/page-resolver.js b/packages/react-bootstrap-table2-paginator/src/page-resolver.js new file mode 100644 index 0000000..ef2e6d2 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/page-resolver.js @@ -0,0 +1,134 @@ +/* eslint no-mixed-operators: 0 */ +export default ExtendBase => + class PageResolver extends ExtendBase { + backToPrevPage() { + const { currPage, pageStartIndex } = this.props; + return (currPage - 1) < pageStartIndex ? pageStartIndex : currPage - 1; + } + + goToNextPage() { + const { currPage } = this.props; + const { lastPage } = this.state; + return (currPage + 1) > lastPage ? lastPage : currPage + 1; + } + + initialState() { + const totalPages = this.calculateTotalPage(); + const lastPage = this.calculateLastPage(totalPages); + return { totalPages, lastPage, dropdownOpen: false }; + } + + calculateTotalPage(sizePerPage = this.props.currSizePerPage) { + const { dataSize } = this.props; + return Math.ceil(dataSize / sizePerPage); + } + + calculateLastPage(totalPages) { + const { pageStartIndex } = this.props; + return pageStartIndex + totalPages - 1; + } + + calculatePages( + totalPages = this.state.totalPages, + lastPage = this.state.lastPage) { + const { + currPage, + paginationSize, + pageStartIndex, + withFirstAndLast, + firstPageText, + prePageText, + nextPageText, + lastPageText, + alwaysShowAllBtns + } = this.props; + + let pages; + let endPage = totalPages; + if (endPage <= 0) return []; + + let startPage = Math.max(currPage - Math.floor(paginationSize / 2), pageStartIndex); + endPage = startPage + paginationSize - 1; + + if (endPage > lastPage) { + endPage = lastPage; + startPage = endPage - paginationSize + 1; + } + + if (startPage !== pageStartIndex && totalPages > paginationSize && withFirstAndLast) { + pages = [firstPageText, prePageText]; + } else if (totalPages > 1 || alwaysShowAllBtns) { + pages = [prePageText]; + } else { + pages = []; + } + + for (let i = startPage; i <= endPage; i += 1) { + if (i >= pageStartIndex) pages.push(i); + } + + if (endPage <= lastPage && pages.length > 1) { + pages.push(nextPageText); + } + if (endPage !== lastPage && withFirstAndLast) { + pages.push(lastPageText); + } + return pages; + } + + calculatePageStatus(pages = [], lastPage = this.state.lastPage) { + const { + currPage, + pageStartIndex, + firstPageText, + prePageText, + nextPageText, + lastPageText, + alwaysShowAllBtns + } = this.props; + const isStart = page => + (currPage === pageStartIndex && (page === firstPageText || page === prePageText)); + const isEnd = page => + (currPage === lastPage && (page === nextPageText || page === lastPageText)); + + return pages + .filter((page) => { + if (alwaysShowAllBtns) { + return true; + } + return !(isStart(page) || isEnd(page)); + }) + .map((page) => { + let title; + const active = page === currPage; + const disabled = (isStart(page) || isEnd(page)); + + if (page === nextPageText) { + title = this.props.nextPageTitle; + } else if (page === prePageText) { + title = this.props.prePageTitle; + } else if (page === firstPageText) { + title = this.props.firstPageTitle; + } else if (page === lastPageText) { + title = this.props.lastPageTitle; + } else { + title = `${page}`; + } + + return { page, active, disabled, title }; + }); + } + + calculateSizePerPageStatus() { + const { sizePerPageList } = this.props; + return sizePerPageList.map((_sizePerPage) => { + const pageText = _sizePerPage.text || _sizePerPage; + const pageNumber = _sizePerPage.value || _sizePerPage; + return { + text: `${pageText}`, + page: pageNumber + }; + }); + } + }; + diff --git a/packages/react-bootstrap-table2-paginator/src/pagination-list.js b/packages/react-bootstrap-table2-paginator/src/pagination-list.js new file mode 100644 index 0000000..805af53 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/pagination-list.js @@ -0,0 +1,30 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import PageButton from './page-button'; + +const PaginatonList = props => ( +
      + { + props.pages.map(pageProps => ( + + )) + } +
    +); + +PaginatonList.propTypes = { + pages: PropTypes.arrayOf(PropTypes.shape({ + page: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + active: PropTypes.bool, + disable: PropTypes.bool, + title: PropTypes.string + })).isRequired, + onPageChange: PropTypes.func.isRequired +}; + +export default PaginatonList; diff --git a/packages/react-bootstrap-table2-paginator/src/pagination.js b/packages/react-bootstrap-table2-paginator/src/pagination.js new file mode 100644 index 0000000..ee685c7 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/pagination.js @@ -0,0 +1,171 @@ +/* eslint react/require-default-props: 0 */ +/* eslint arrow-body-style: 0 */ +import cs from 'classnames'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import pageResolver from './page-resolver'; +import SizePerPageDropDown from './size-per-page-dropdown'; +import PaginationList from './pagination-list'; +import Const from './const'; + +class Pagination extends pageResolver(Component) { + constructor(props) { + super(props); + this.closeDropDown = this.closeDropDown.bind(this); + this.toggleDropDown = this.toggleDropDown.bind(this); + this.handleChangePage = this.handleChangePage.bind(this); + this.handleChangeSizePerPage = this.handleChangeSizePerPage.bind(this); + this.state = this.initialState(); + } + + componentWillReceiveProps(nextProps) { + const { dataSize, currSizePerPage } = nextProps; + + if (currSizePerPage !== this.props.currSizePerPage || dataSize !== this.props.dataSize) { + const totalPages = this.calculateTotalPage(currSizePerPage); + const lastPage = this.calculateLastPage(totalPages); + this.setState({ totalPages, lastPage }); + } + } + + toggleDropDown() { + const dropdownOpen = !this.state.dropdownOpen; + this.setState(() => { + return { dropdownOpen }; + }); + } + + closeDropDown() { + this.setState(() => { + return { dropdownOpen: false }; + }); + } + + handleChangeSizePerPage(sizePerPage) { + const { currSizePerPage, onSizePerPageChange } = this.props; + const selectedSize = typeof sizePerPage === 'string' ? parseInt(sizePerPage, 10) : sizePerPage; + let { currPage } = this.props; + if (selectedSize !== currSizePerPage) { + const newTotalPages = this.calculateTotalPage(selectedSize); + const newLastPage = this.calculateLastPage(newTotalPages); + if (currPage > newLastPage) currPage = newLastPage; + onSizePerPageChange(selectedSize, currPage); + } + this.closeDropDown(); + } + + handleChangePage(newPage) { + let page; + const { + currPage, + pageStartIndex, + prePageText, + nextPageText, + lastPageText, + firstPageText, + onPageChange + // keepSizePerPageState + } = this.props; + const { lastPage } = this.state; + + if (newPage === prePageText) { + page = this.backToPrevPage(); + } else if (newPage === nextPageText) { + page = (currPage + 1) > lastPage ? lastPage : currPage + 1; + } else if (newPage === lastPageText) { + page = lastPage; + } else if (newPage === firstPageText) { + page = pageStartIndex; + } else { + page = parseInt(newPage, 10); + } + + // if (keepSizePerPageState) { this.closeDropDown(); } + + if (page !== currPage) { + onPageChange(page); + } + } + + render() { + const { totalPages, lastPage, dropdownOpen: open } = this.state; + const { + sizePerPageList, + currSizePerPage, + hideSizePerPage, + hidePageListOnlyOnePage + } = this.props; + const pages = this.calculatePageStatus(this.calculatePages(totalPages), lastPage); + + const pageListClass = cs( + 'react-bootstrap-table-pagination-list', + 'col-md-6 col-xs-6 col-sm-6 col-lg-6', { + 'react-bootstrap-table-pagination-list-hidden': (hidePageListOnlyOnePage && totalPages === 1) + }); + return ( +
    +
    + { + sizePerPageList.length > 1 && !hideSizePerPage ? + ( + + ) : null + } +
    +
    + +
    +
    + ); + } +} + +Pagination.propTypes = { + dataSize: PropTypes.number.isRequired, + sizePerPageList: PropTypes.array.isRequired, + currPage: PropTypes.number.isRequired, + currSizePerPage: PropTypes.number.isRequired, + onPageChange: PropTypes.func.isRequired, + onSizePerPageChange: PropTypes.func.isRequired, + pageStartIndex: PropTypes.number, + paginationSize: PropTypes.number, + firstPageText: PropTypes.string, + prePageText: PropTypes.string, + nextPageText: PropTypes.string, + lastPageText: PropTypes.string, + nextPageTitle: PropTypes.string, + prePageTitle: PropTypes.string, + firstPageTitle: PropTypes.string, + lastPageTitle: PropTypes.string, + withFirstAndLast: PropTypes.bool, + alwaysShowAllBtns: PropTypes.bool, + hideSizePerPage: PropTypes.bool, + hidePageListOnlyOnePage: PropTypes.bool +}; + +Pagination.defaultProps = { + pageStartIndex: Const.PAGE_START_INDEX, + paginationSize: Const.PAGINATION_SIZE, + withFirstAndLast: Const.With_FIRST_AND_LAST, + alwaysShowAllBtns: Const.SHOW_ALL_PAGE_BTNS, + firstPageText: Const.FIRST_PAGE_TEXT, + prePageText: Const.PRE_PAGE_TEXT, + nextPageText: Const.NEXT_PAGE_TEXT, + lastPageText: Const.LAST_PAGE_TEXT, + sizePerPageList: Const.SIZE_PER_PAGE_LIST, + nextPageTitle: Const.NEXT_PAGE_TITLE, + prePageTitle: Const.PRE_PAGE_TITLE, + firstPageTitle: Const.FIRST_PAGE_TITLE, + lastPageTitle: Const.LAST_PAGE_TITLE, + hideSizePerPage: Const.HIDE_SIZE_PER_PAGE, + hidePageListOnlyOnePage: Const.HIDE_PAGE_LIST_ONLY_ONE_PAGE +}; + +export default Pagination; diff --git a/packages/react-bootstrap-table2-paginator/src/size-per-page-dropdown.js b/packages/react-bootstrap-table2-paginator/src/size-per-page-dropdown.js new file mode 100644 index 0000000..5ae4298 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/size-per-page-dropdown.js @@ -0,0 +1,85 @@ +import React from 'react'; +import cs from 'classnames'; +import PropTypes from 'prop-types'; +import SizePerPageOption from './size-per-page-option'; + +const sizePerPageDefaultClass = 'react-bs-table-sizePerPage-dropdown'; + +const SizePerPageDropDown = (props) => { + const { + open, + hidden, + onClick, + onBlur, + options, + className, + variation, + btnContextual, + currSizePerPage, + onSizePerPageChange + } = props; + + const dropDownStyle = { visibility: hidden ? 'hidden' : 'visible' }; + const dropdownClasses = cs( + open ? 'open show' : '', + sizePerPageDefaultClass, + variation, + className, + ); + + return ( + + +
      + { + options.map(option => ( + + )) + } +
    +
    + ); +}; + +SizePerPageDropDown.propTypes = { + currSizePerPage: PropTypes.string.isRequired, + options: PropTypes.array.isRequired, + onClick: PropTypes.func.isRequired, + onBlur: PropTypes.func.isRequired, + onSizePerPageChange: PropTypes.func.isRequired, + open: PropTypes.bool, + hidden: PropTypes.bool, + btnContextual: PropTypes.string, + variation: PropTypes.oneOf(['dropdown', 'dropup']), + className: PropTypes.string +}; +SizePerPageDropDown.defaultProps = { + open: false, + hidden: false, + btnContextual: 'btn-default btn-secondary', + variation: 'dropdown', + className: '' +}; + + +export default SizePerPageDropDown; diff --git a/packages/react-bootstrap-table2-paginator/src/size-per-page-option.js b/packages/react-bootstrap-table2-paginator/src/size-per-page-option.js new file mode 100644 index 0000000..eba6ca6 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/size-per-page-option.js @@ -0,0 +1,32 @@ +/* eslint jsx-a11y/href-no-hash: 0 */ +import React from 'react'; +import PropTypes from 'prop-types'; + +const SizePerPageOption = ({ + text, + page, + onSizePerPageChange +}) => ( +
  • + { + e.preventDefault(); + onSizePerPageChange(page); + } } + > + { text } + +
  • +); + +SizePerPageOption.propTypes = { + text: PropTypes.string.isRequired, + page: PropTypes.number.isRequired, + onSizePerPageChange: PropTypes.func.isRequired +}; + +export default SizePerPageOption; diff --git a/packages/react-bootstrap-table2-paginator/src/wrapper.js b/packages/react-bootstrap-table2-paginator/src/wrapper.js new file mode 100644 index 0000000..fcc6cb7 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/src/wrapper.js @@ -0,0 +1,99 @@ +/* eslint react/prop-types: 0 */ +/* eslint arrow-body-style: 0 */ + +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +import Const from './const'; + +const wrapperFactory = baseElement => + class PaginationWrapper extends Component { + static propTypes = { + store: PropTypes.object.isRequired + } + + constructor(props) { + super(props); + this.handleChangePage = this.handleChangePage.bind(this); + this.handleChangeSizePerPage = this.handleChangeSizePerPage.bind(this); + + const options = props.pagination.options || {}; + const currPage = options.pageStartIndex || Const.PAGE_START_INDEX; + const sizePerPageList = options.sizePerPageList || Const.SIZE_PER_PAGE_LIST; + const currSizePerPage = typeof sizePerPageList[0] === 'object' ? sizePerPageList[0].value : sizePerPageList[0]; + this.state = { currPage, currSizePerPage }; + } + + handleChangePage(currPage) { + const { pagination: { options } } = this.props; + if (options.onPageChange) { + options.onPageChange(currPage, this.state.currSizePerPage); + } + this.setState(() => { + return { + currPage + }; + }); + } + + handleChangeSizePerPage(currSizePerPage, currPage) { + const { pagination: { options } } = this.props; + if (options.onSizePerPageChange) { + options.onSizePerPageChange(currSizePerPage, currPage); + } + this.setState(() => { + return { + currPage, + currSizePerPage + }; + }); + } + + render() { + const { pagination: { Pagination, options }, store } = this.props; + const { currPage, currSizePerPage } = this.state; + const withFirstAndLast = typeof options.withFirstAndLast === 'undefined' ? + Const.With_FIRST_AND_LAST : options.withFirstAndLast; + const alwaysShowAllBtns = typeof options.alwaysShowAllBtns === 'undefined' ? + Const.SHOW_ALL_PAGE_BTNS : options.alwaysShowAllBtns; + const hideSizePerPage = typeof options.hideSizePerPage === 'undefined' ? + Const.HIDE_SIZE_PER_PAGE : options.hideSizePerPage; + const hidePageListOnlyOnePage = typeof options.hidePageListOnlyOnePage === 'undefined' ? + Const.HIDE_PAGE_LIST_ONLY_ONE_PAGE : options.hidePageListOnlyOnePage; + + const base = baseElement({ + ...this.props, + key: 'table', + data: store.getByCurrPage(currPage, currSizePerPage) + }); + + return [ + base, + + ]; + } + }; + +export default wrapperFactory; diff --git a/packages/react-bootstrap-table2-paginator/style/react-bootstrap-table-paginator.scss b/packages/react-bootstrap-table2-paginator/style/react-bootstrap-table-paginator.scss new file mode 100644 index 0000000..a99007e --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/style/react-bootstrap-table-paginator.scss @@ -0,0 +1,8 @@ +.react-bootstrap-table-page-btns-ul { + float: right; + margin-top: 0px; +} + +.react-bootstrap-table-pagination-list-hidden { + display: none; +} diff --git a/packages/react-bootstrap-table2-paginator/test/page-button.test.js b/packages/react-bootstrap-table2-paginator/test/page-button.test.js new file mode 100644 index 0000000..4e3d800 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/test/page-button.test.js @@ -0,0 +1,117 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import PageButton from '../src/page-button'; + +describe('PageButton', () => { + let wrapper; + const onPageChangeCallback = sinon.stub(); + const props = { + onPageChange: onPageChangeCallback, + page: 2 + }; + + describe('default PageButton', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should rendering PageButton correctly', () => { + expect(wrapper.find('a.page-link').length).toBe(1); + expect(wrapper.text()).toEqual(`${props.page}`); + }); + + describe('when clicking', () => { + let preventDefault; + beforeEach(() => { + preventDefault = sinon.stub(); + wrapper.find('a.page-link').simulate('click', { preventDefault }); + }); + + afterEach(() => { + onPageChangeCallback.reset(); + }); + + it('should calling e.preventDefault', () => { + expect(preventDefault.calledOnce).toBeTruthy(); + }); + + it('should calling onPageChange prop', () => { + expect(onPageChangeCallback.calledOnce).toBeTruthy(); + }); + + it('should calling onPageChange prop with correct argument', () => { + expect(onPageChangeCallback.calledWith(props.page)).toBeTruthy(); + }); + }); + }); + + describe('when active prop is true', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render PageButton correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass('active')).toBeTruthy(); + }); + }); + + describe('when active prop is false', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render PageButton correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass('active')).toBeFalsy(); + }); + }); + + describe('when disabled prop is true', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render PageButton correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass('disabled')).toBeTruthy(); + }); + }); + + describe('when disabled prop is false', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render PageButton correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass('disabled')).toBeFalsy(); + }); + }); + + describe('when title prop is defined', () => { + const title = 'aTitle'; + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should render PageButton correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.prop('title')).toEqual(title); + }); + }); +}); diff --git a/packages/react-bootstrap-table2-paginator/test/page-resolver.test.js b/packages/react-bootstrap-table2-paginator/test/page-resolver.test.js new file mode 100644 index 0000000..cb5d5cf --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/test/page-resolver.test.js @@ -0,0 +1,416 @@ +import React, { Component } from 'react'; +import { shallow } from 'enzyme'; + +import pageResolver from '../src/page-resolver'; + +const extendTo = Base => + class MockComponent extends Base { + constructor(props) { + super(props); + this.state = this.initialState(); + } + render() { return null; } + }; + +describe('PageResolver', () => { + const ExtendBase = pageResolver(Component); + const MockComponent = extendTo(ExtendBase); + + const createMockProps = () => ({ + dataSize: 100, + sizePerPageList: [10, 20, 30, 50], + currPage: 1, + currSizePerPage: 10, + pageStartIndex: 1, + paginationSize: 5, + withFirstAndLast: true, + firstPageText: '<<', + prePageText: '<', + nextPageText: '>', + lastPageText: '>>', + alwaysShowAllBtns: false + }); + + let wrapper; + + describe('initialize', () => { + beforeEach(() => { + const mockElement = React.createElement(MockComponent, createMockProps(), null); + wrapper = shallow(mockElement); + }); + + it('should creating initial state correctly', () => { + const instance = wrapper.instance(); + expect(instance.state.totalPages).toBeDefined(); + expect(instance.state.totalPages).toEqual(instance.calculateTotalPage()); + expect(instance.state.lastPage).toBeDefined(); + expect(instance.state.lastPage).toEqual( + instance.calculateLastPage(instance.state.totalPages)); + expect(instance.state.dropdownOpen).toBeDefined(); + expect(instance.state.dropdownOpen).toBeFalsy(); + }); + }); + + describe('backToPrevPage', () => { + const props = createMockProps(); + + describe('when props.currPage is not hitting props.pageStartIndex', () => { + beforeEach(() => { + props.currPage = 2; + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting previous page correctly', () => { + const instance = wrapper.instance(); + expect(instance.backToPrevPage()).toEqual(props.currPage - 1); + }); + }); + + describe('when props.currPage is hitting props.pageStartIndex', () => { + beforeEach(() => { + props.currPage = props.pageStartIndex; + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should always getting page which must eq props.pageStartIndex', () => { + const instance = wrapper.instance(); + expect(instance.backToPrevPage()).toEqual(props.pageStartIndex); + }); + }); + }); + + describe('goToNextPage', () => { + const props = createMockProps(); + + describe('when props.currPage is not hitting state.lastPage', () => { + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting previous page correctly', () => { + const instance = wrapper.instance(); + expect(instance.goToNextPage()).toEqual(props.currPage + 1); + }); + }); + + describe('when props.currPage is hitting state.lastpage', () => { + beforeEach(() => { + props.currPage = 10; + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should always getting page which must eq props.pageStartIndex', () => { + const instance = wrapper.instance(); + expect(instance.goToNextPage()).toEqual(instance.state.lastPage); + }); + }); + }); + + describe('calculateTotalPage', () => { + const props = createMockProps(); + + describe('when missing sizePerPage argument', () => { + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting total pages correctly by default props.currSizePerPage', () => { + const instance = wrapper.instance(); + expect(instance.calculateTotalPage()).toEqual(10); + }); + }); + + describe('when sizePerPage argument given', () => { + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting total pages correctly by sizePerPage argument', () => { + const instance = wrapper.instance(); + expect(instance.calculateTotalPage(25)).toEqual(4); + }); + }); + }); + + describe('calculateLastPage', () => { + beforeEach(() => { + const props = createMockProps(); + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting last page correctly', () => { + const instance = wrapper.instance(); + expect(instance.calculateLastPage(instance.state.totalPages)).toEqual(10); + }); + }); + + describe('calculatePages', () => { + describe('calculate by state.totalPages and state.lastPage', () => { + const props = createMockProps(); + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting pages list correctly', () => { + const instance = wrapper.instance(); + expect(instance.calculatePages()).toEqual( + [props.prePageText, 1, 2, 3, 4, 5, props.nextPageText, props.lastPageText]); + + expect(instance.calculatePages(4, 4)).toEqual( + [props.prePageText, 1, 2, 3, 4, props.nextPageText]); + }); + }); + + describe('calculate by props.currPage', () => { + const props = createMockProps(); + const { firstPageText, prePageText, nextPageText, lastPageText } = props; + + it('should getting pages list correctly', () => { + const currPages = Array.from(Array(10).keys()); + currPages.forEach((currPage) => { + props.currPage = currPage + 1; + wrapper = shallow(); + const pageList = wrapper.instance().calculatePages(); + + if (props.currPage < 4) { + expect(pageList).toEqual( + [prePageText, 1, 2, 3, 4, 5, nextPageText, lastPageText]); + } else if (props.currPage > 7) { + expect(pageList).toEqual( + [firstPageText, prePageText, 6, 7, 8, 9, 10, nextPageText]); + } else if (props.currPage === 4) { + expect(pageList).toEqual( + [firstPageText, prePageText, 2, 3, 4, 5, 6, nextPageText, lastPageText]); + } else if (props.currPage === 5) { + expect(pageList).toEqual( + [firstPageText, prePageText, 3, 4, 5, 6, 7, nextPageText, lastPageText]); + } else if (props.currPage === 6) { + expect(pageList).toEqual( + [firstPageText, prePageText, 4, 5, 6, 7, 8, nextPageText, lastPageText]); + } else { + expect(pageList).toEqual( + [firstPageText, prePageText, 5, 6, 7, 8, 9, nextPageText, lastPageText]); + } + }); + }); + }); + + describe('the quantity of pages is calculated by props.paginationSize', () => { + const props = createMockProps(); + const indicators = [ + props.firstPageText, props.prePageText, props.lastPageText, props.nextPageText + ]; + + it('should getting pages list correctly', () => { + [1, 3, 5, 8, 10].forEach((paginationSize) => { + props.paginationSize = paginationSize; + wrapper = shallow(); + const pageList = wrapper.instance().calculatePages(); + const result = pageList.filter(p => indicators.indexOf(p) === -1); + expect(result.length).toEqual(props.paginationSize); + }); + }); + }); + + describe('when props.withFirstAndLast is true', () => { + const props = createMockProps(); + describe('and last page is not visible by props.currPage', () => { + it('should getting pages list which contain last page indication', () => { + [1, 2, 3, 4, 5, 6, 7].forEach((currPage) => { + props.currPage = currPage; + wrapper = shallow(); + const pageList = wrapper.instance().calculatePages(); + expect(pageList.indexOf(props.lastPageText) > -1).toBeTruthy(); + }); + }); + }); + + describe('and first page is not visible by props.currPage', () => { + it('should getting pages list which contain first page indication', () => { + [10, 9, 8, 7, 6, 5, 4].forEach((currPage) => { + props.currPage = currPage; + wrapper = shallow(); + const pageList = wrapper.instance().calculatePages(); + expect(pageList.indexOf(props.firstPageText) > -1).toBeTruthy(); + }); + }); + }); + }); + + describe('when props.withFirstAndLast is false', () => { + const props = createMockProps(); + it('should not contain first and last page indication always', () => { + const currPages = Array.from(Array(10).keys()); + currPages.forEach((currPage) => { + props.currPage = currPage + 1; + props.withFirstAndLast = false; + wrapper = shallow(); + const pageList = wrapper.instance().calculatePages(); + expect(pageList.indexOf(props.lastPageText) > -1).toBeFalsy(); + expect(pageList.indexOf(props.firstPageText) > -1).toBeFalsy(); + }); + }); + }); + + describe('when props.pageStartIndex is negative number', () => { + const props = createMockProps(); + props.pageStartIndex = -2; + props.currPage = -2; + + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting last page correctly', () => { + const pageList = wrapper.instance().calculatePages(); + expect(pageList).toEqual( + [props.prePageText, -2, -1, 0, 1, 2, props.nextPageText, props.lastPageText]); + }); + }); + + describe('when props.alwaysShowAllBtns is true', () => { + const props = createMockProps(); + props.alwaysShowAllBtns = true; + props.currPage = 1; + props.dataSize = 11; + + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should always having next and previous page indication', () => { + const pageList = wrapper.instance().calculatePages(); + expect(pageList.indexOf(props.nextPageText) > -1).toBeTruthy(); + expect(pageList.indexOf(props.prePageText) > -1).toBeTruthy(); + }); + }); + + describe('when state.totalPages is zero', () => { + const props = createMockProps(); + props.dataSize = 0; + + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting empty array', () => { + expect(wrapper.instance().calculatePages()).toEqual([]); + }); + }); + }); + + describe('calculatePageStatus', () => { + let instance; + let pageStatus; + + describe('default case', () => { + const props = createMockProps(); + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + instance = wrapper.instance(); + pageStatus = instance.calculatePageStatus(instance.calculatePages()); + }); + + it('should returning correct format for page status', () => { + pageStatus.forEach((p) => { + expect(Object.prototype.hasOwnProperty.call(p, 'page')).toBeTruthy(); + expect(Object.prototype.hasOwnProperty.call(p, 'active')).toBeTruthy(); + expect(Object.prototype.hasOwnProperty.call(p, 'disabled')).toBeTruthy(); + expect(Object.prototype.hasOwnProperty.call(p, 'title')).toBeTruthy(); + }); + }); + + it('should mark active status as true when it is props.currPage', () => { + expect(pageStatus.find(p => p.page === props.currPage).active).toBeTruthy(); + }); + + it('only have one page\'s active status is true', () => { + expect(pageStatus.filter(p => p.page === props.currPage).length).toEqual(1); + }); + }); + + describe('when alwaysShowAllBtns is false', () => { + const props = createMockProps(); + describe('and props.currPage is on first page', () => { + it('should filter out previous page indication', () => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + instance = wrapper.instance(); + const pageList = instance.calculatePages(); + pageStatus = instance.calculatePageStatus(pageList); + + expect(pageStatus.find(p => p.page === props.prePageText)).not.toBeDefined(); + }); + }); + + describe('and props.currPage is on last page', () => { + it('should filter out next page indication', () => { + props.currPage = 10; + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + instance = wrapper.instance(); + const pageList = instance.calculatePages(); + pageStatus = instance.calculatePageStatus(pageList); + + expect(pageStatus.find(p => p.page === props.nextPageText)).not.toBeDefined(); + }); + }); + }); + }); + + describe('calculateSizePerPageStatus', () => { + describe('when props.sizePerPageList is an number array', () => { + const props = createMockProps(); + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting correctly sizePerPage status', () => { + const instance = wrapper.instance(); + const result = instance.calculateSizePerPageStatus(); + expect(result.length).toEqual(props.sizePerPageList.length); + result.forEach((sizePerPage, i) => { + expect(sizePerPage.text).toEqual(`${props.sizePerPageList[i]}`); + expect(sizePerPage.page).toEqual(props.sizePerPageList[i]); + }); + }); + }); + + describe('when props.sizePerPageList is an object array', () => { + const props = createMockProps(); + props.sizePerPageList = [{ + text: 'ten', value: 10 + }, { + text: 'thirty', value: 30 + }]; + + beforeEach(() => { + const mockElement = React.createElement(MockComponent, props, null); + wrapper = shallow(mockElement); + }); + + it('should getting correctly sizePerPage status', () => { + const instance = wrapper.instance(); + const result = instance.calculateSizePerPageStatus(); + expect(result.length).toEqual(props.sizePerPageList.length); + result.forEach((sizePerPage, i) => { + expect(sizePerPage.text).toEqual(props.sizePerPageList[i].text); + expect(sizePerPage.page).toEqual(props.sizePerPageList[i].value); + }); + }); + }); + }); +}); diff --git a/packages/react-bootstrap-table2-paginator/test/pagination-list.test.js b/packages/react-bootstrap-table2-paginator/test/pagination-list.test.js new file mode 100644 index 0000000..0545006 --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/test/pagination-list.test.js @@ -0,0 +1,42 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import PageButton from '../src/page-button'; +import PaginationList from '../src/pagination-list'; + +describe('PaginationList', () => { + let wrapper; + const onPageChange = sinon.stub(); + const pages = [{ + page: 1, + active: false, + disabled: false, + title: '1' + }, { + page: 2, + active: true, + disabled: false, + title: '2' + }, { + page: 3, + active: false, + disabled: false, + title: '3' + }]; + + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should rendering PaginatonList correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('ul.react-bootstrap-table-page-btns-ul').length).toBe(1); + expect(wrapper.find(PageButton).length).toBe(pages.length); + }); +}); diff --git a/packages/react-bootstrap-table2-paginator/test/pagination.test.js b/packages/react-bootstrap-table2-paginator/test/pagination.test.js new file mode 100644 index 0000000..cf8e44d --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/test/pagination.test.js @@ -0,0 +1,287 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import SizePerPageDropDown from '../src/size-per-page-dropdown'; +import PaginationList from '../src/pagination-list'; +import Pagination from '../src/pagination'; + +describe('Pagination', () => { + let wrapper; + let instance; + + const createMockProps = props => ({ + dataSize: 100, + sizePerPageList: [10, 20, 30, 50], + currPage: 1, + currSizePerPage: 10, + pageStartIndex: 1, + paginationSize: 5, + withFirstAndLast: true, + firstPageText: '<<', + prePageText: '<', + nextPageText: '>', + lastPageText: '>>', + alwaysShowAllBtns: false, + onPageChange: sinon.stub(), + onSizePerPageChange: sinon.stub(), + hidePageListOnlyOnePage: false, + hideSizePerPage: false, + ...props + }); + + describe('default pagiantion', () => { + const props = createMockProps(); + + beforeEach(() => { + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should rendering correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.hasClass('react-bootstrap-table-pagination')).toBeTruthy(); + expect(wrapper.find('.react-bootstrap-table-pagination-list-hidden').length).toBe(0); + }); + + it('should having correct state', () => { + expect(instance.state).toBeDefined(); + expect(instance.state.totalPages).toEqual(instance.calculateTotalPage()); + expect(instance.state.lastPage).toEqual( + instance.calculateLastPage(instance.state.totalPages)); + expect(instance.state.dropdownOpen).toBeFalsy(); + }); + + it('should rendering PaginationList component successfully', () => { + const paginationList = wrapper.find(PaginationList); + expect(paginationList.length).toBe(1); + expect(paginationList.prop('pages')).toEqual(instance.calculatePageStatus(instance.calculatePages())); + expect(paginationList.prop('onPageChange')).toEqual(instance.handleChangePage); + }); + + it('should rendering SizePerPageDropDown component successfully', () => { + const sizePerPageDropDown = wrapper.find(SizePerPageDropDown); + expect(sizePerPageDropDown.length).toBe(1); + + expect(sizePerPageDropDown.prop('currSizePerPage')).toEqual(`${props.currSizePerPage}`); + expect(sizePerPageDropDown.prop('options')).toEqual(instance.calculateSizePerPageStatus()); + expect(sizePerPageDropDown.prop('onSizePerPageChange')).toEqual(instance.handleChangeSizePerPage); + expect(sizePerPageDropDown.prop('onClick')).toEqual(instance.toggleDropDown); + expect(sizePerPageDropDown.prop('open')).toEqual(instance.state.dropdownOpen); + }); + }); + + describe('when props.sizePerPageList is empty array', () => { + beforeEach(() => { + const props = createMockProps({ sizePerPageList: [] }); + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should not rendering SizePerPageDropDown component', () => { + const sizePerPageDropDown = wrapper.find(SizePerPageDropDown); + expect(sizePerPageDropDown.length).toBe(0); + }); + }); + + describe('when props.hideSizePerPage is true', () => { + beforeEach(() => { + const props = createMockProps({ hideSizePerPage: true }); + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should not rendering SizePerPageDropDown component', () => { + const sizePerPageDropDown = wrapper.find(SizePerPageDropDown); + expect(sizePerPageDropDown.length).toBe(0); + }); + }); + + describe('when props.hidePageListOnlyOnePage is true', () => { + beforeEach(() => { + const props = createMockProps({ hidePageListOnlyOnePage: true, dataSize: 7 }); + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should find react-bootstrap-table-pagination-list-hidden class when only one page', () => { + expect(wrapper.find('.react-bootstrap-table-pagination-list-hidden').length).toBe(1); + }); + }); + + describe('componentWillReceiveProps', () => { + describe('when next props.currSizePerPage is diff than current one', () => { + const nextProps = createMockProps({ currSizePerPage: 20 }); + + beforeEach(() => { + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should setting correct state.totalPages', () => { + instance.componentWillReceiveProps(nextProps); + expect(instance.state.totalPages).toEqual( + instance.calculateTotalPage(nextProps.currSizePerPage)); + }); + + it('should setting correct state.lastPage', () => { + instance.componentWillReceiveProps(nextProps); + const totalPages = instance.calculateTotalPage(nextProps.currSizePerPage); + expect(instance.state.lastPage).toEqual( + instance.calculateLastPage(totalPages)); + }); + }); + + describe('when next props.dataSize is diff than current one', () => { + const nextProps = createMockProps({ dataSize: 33 }); + + beforeEach(() => { + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should setting correct state.totalPages', () => { + instance.componentWillReceiveProps(nextProps); + expect(instance.state.totalPages).toEqual( + instance.calculateTotalPage(nextProps.currSizePerPage)); + }); + + it('should setting correct state.lastPage', () => { + instance.componentWillReceiveProps(nextProps); + const totalPages = instance.calculateTotalPage(nextProps.currSizePerPage); + expect(instance.state.lastPage).toEqual( + instance.calculateLastPage(totalPages)); + }); + }); + }); + + describe('toggleDropDown', () => { + beforeEach(() => { + const props = createMockProps(); + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should setting state.dropdownOpen as true when it is false', () => { + instance.toggleDropDown(); + expect(instance.state.dropdownOpen).toBeTruthy(); + }); + + it('should setting state.dropdownOpen as false when it is true', () => { + instance.toggleDropDown(); + instance.toggleDropDown(); + expect(instance.state.dropdownOpen).toBeFalsy(); + }); + }); + + describe('closeDropDown', () => { + beforeEach(() => { + const props = createMockProps(); + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should always setting state.dropdownOpen as false', () => { + instance.closeDropDown(); + expect(instance.state.dropdownOpen).toBeFalsy(); + instance.closeDropDown(); + expect(instance.state.dropdownOpen).toBeFalsy(); + }); + }); + + describe('handleChangeSizePerPage', () => { + const props = createMockProps(); + + beforeEach(() => { + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should always setting state.dropdownOpen to false', () => { + instance.handleChangeSizePerPage(10); + expect(instance.state.dropdownOpen).toBeFalsy(); + }); + + describe('when new sizePerPage is same as current one', () => { + it('should not calling props.onSizePerPageChange callback', () => { + instance.handleChangeSizePerPage(10); + expect(props.onSizePerPageChange.callCount).toBe(0); + }); + }); + + describe('when new sizePerPage is diff than current one', () => { + it('should not calling props.onSizePerPageChange callback', () => { + instance.handleChangeSizePerPage(30); + expect(props.onSizePerPageChange.callCount).toBe(1); + }); + + describe('and new current page is still in the new lagination list', () => { + it('should calling props.onSizePerPageChange with correct argument', () => { + expect(props.onSizePerPageChange.calledWith(30, props.currPage)); + }); + }); + + describe('and new current page is still in the new lagination list', () => { + beforeEach(() => { + wrapper = shallow(); + instance = wrapper.instance(); + }); + + it('should calling props.onSizePerPageChange with correct argument', () => { + expect(props.onSizePerPageChange.calledWith(30, 4)); + }); + }); + }); + }); + + describe('handleChangePage', () => { + const props = createMockProps(); + + beforeEach(() => { + props.currPage = 6; + wrapper = shallow(); + instance = wrapper.instance(); + }); + + afterEach(() => { + props.onPageChange.reset(); + }); + + it('should calling props.onPageChange correctly when new page is eq props.prePageText', () => { + instance.handleChangePage(props.prePageText); + expect(props.onPageChange.callCount).toBe(1); + expect(props.onPageChange.calledWith(5)).toBeTruthy(); + }); + + it('should calling props.onPageChange correctly when new page is eq props.nextPageText', () => { + instance.handleChangePage(props.nextPageText); + expect(props.onPageChange.callCount).toBe(1); + expect(props.onPageChange.calledWith(7)).toBeTruthy(); + }); + + it('should calling props.onPageChange correctly when new page is eq props.lastPageText', () => { + instance.handleChangePage(props.lastPageText); + expect(props.onPageChange.callCount).toBe(1); + expect(props.onPageChange.calledWith(10)).toBeTruthy(); + }); + + it('should calling props.onPageChange correctly when new page is eq props.firstPageText', () => { + instance.handleChangePage(props.firstPageText); + expect(props.onPageChange.callCount).toBe(1); + expect(props.onPageChange.calledWith(props.pageStartIndex)).toBeTruthy(); + }); + + it('should calling props.onPageChange correctly when new page is a numeric page', () => { + const newPage = '8'; + instance.handleChangePage(newPage); + expect(props.onPageChange.callCount).toBe(1); + expect(props.onPageChange.calledWith(parseInt(newPage, 10))).toBeTruthy(); + }); + + it('should not calling props.onPageChange correctly when page is not changed', () => { + const newPage = props.currPage; + instance.handleChangePage(newPage); + expect(props.onPageChange.callCount).toBe(0); + }); + }); +}); diff --git a/packages/react-bootstrap-table2-paginator/test/size-per-page-dropdown.test.js b/packages/react-bootstrap-table2-paginator/test/size-per-page-dropdown.test.js new file mode 100644 index 0000000..21e11cc --- /dev/null +++ b/packages/react-bootstrap-table2-paginator/test/size-per-page-dropdown.test.js @@ -0,0 +1,127 @@ +import React from 'react'; +import sinon from 'sinon'; +import { shallow } from 'enzyme'; + +import SizePerPageOption from '../src/size-per-page-option'; +import SizePerPageDropDown from '../src/size-per-page-dropdown'; + +describe('SizePerPageDropDown', () => { + let wrapper; + const currSizePerPage = '25'; + const options = [{ + text: '10', + page: 10 + }, { + text: '25', + page: 25 + }]; + const onClick = sinon.stub(); + const onBlur = sinon.stub(); + const onSizePerPageChange = sinon.stub(); + const props = { + currSizePerPage, + options, + onClick, + onBlur, + onSizePerPageChange + }; + + describe('default SizePerPageDropDown component', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should rendering SizePerPageDropDown correctly', () => { + expect(wrapper.length).toBe(1); + expect(wrapper.find('button').length).toBe(1); + expect(wrapper.find('button').text()).toEqual(`${currSizePerPage} `); + }); + + it('should rendering SizePerPageOption successfully', () => { + expect(wrapper.find('ul.dropdown-menu').length).toBe(1); + const sizePerPageOptions = wrapper.find(SizePerPageOption); + expect(sizePerPageOptions.length).toBe(options.length); + sizePerPageOptions.forEach((sizePerPage, i) => { + const option = options[i]; + expect(sizePerPage.prop('text')).toEqual(option.text); + expect(sizePerPage.prop('page')).toEqual(option.page); + expect(sizePerPage.prop('onSizePerPageChange')).toEqual(onSizePerPageChange); + }); + }); + + it('default variation is dropdown', () => { + expect(wrapper.hasClass('dropdown')).toBeTruthy(); + }); + + it('default dropdown is not open', () => { + expect(wrapper.hasClass('open show')).toBeFalsy(); + expect(wrapper.find('[aria-expanded=false]').length).toBe(1); + }); + }); + + describe('when open prop is true', () => { + beforeEach(() => { + wrapper = shallow( + + ); + }); + + it('should rendering SizePerPageDropDown correctly', () => { + expect(wrapper.hasClass('open show')).toBeTruthy(); + expect(wrapper.find('[aria-expanded=true]').length).toBe(1); + }); + }); + + describe('when hidden prop is true', () => { + beforeEach(() => { + wrapper = shallow( +