Compare commits

..

31 Commits

Author SHA1 Message Date
AllenFang
88234fead0 Publish
- react-bootstrap-table2-editor@0.1.1
 - react-bootstrap-table2-example@0.1.1
 - react-bootstrap-table2-filter@0.1.2
 - react-bootstrap-table2-overlay@0.1.1
 - react-bootstrap-table2-paginator@0.1.1
 - react-bootstrap-table-next@0.1.2
2018-02-01 23:17:40 +08:00
Allen
dea780519f Merge pull request #188 from react-bootstrap-table/develop
2018/02/02 release
2018-02-01 23:07:20 +08:00
AllenFang
38bb2290dc README 2018-01-31 23:50:02 +08:00
AllenFang
8bfbc14bd9 fix #185 2018-01-31 00:01:04 +08:00
Allen
ee4eb8f2c6 Merge pull request #183 from react-bootstrap-table/feat/select-filter
Select filter
2018-01-30 23:53:50 +08:00
AllenFang
8fa6389c81 patch docs 2018-01-30 23:39:18 +08:00
AllenFang
9a354444d0 fix bug for wrap not existing method 2018-01-30 23:25:58 +08:00
AllenFang
2533a63430 patch test for select component 2018-01-30 23:20:47 +08:00
AllenFang
81e0080aa6 add styles for filter modules 2018-01-30 23:20:47 +08:00
AllenFang
094a0682f1 add select filter stories 2018-01-30 23:20:47 +08:00
AllenFang
3f2c6201d9 implement select filter 2018-01-30 23:20:47 +08:00
AllenFang
280c423298 fix #180 2018-01-28 22:09:00 +08:00
AllenFang
fc813e80b6 fix #172 2018-01-28 21:57:30 +08:00
AllenFang
4bb2ae2ba0 fix typo 2018-01-28 21:53:33 +08:00
AllenFang
09fadeb02b CONTRIBUTING.md 2018-01-22 23:09:07 +08:00
AllenFang
283179ebe1 Merge branch 'master' of https://github.com/react-bootstrap-table/react-bootstrap-table2 2018-01-22 00:31:21 +08:00
AllenFang
e83dd1bf07 v0.1.1 2018-01-22 00:30:26 +08:00
Chun-MingChen
760011ac03 update README and migration.md 2018-01-22 00:24:32 +08:00
AllenFang
067a94bea7 v0.1.0 2018-01-22 00:17:24 +08:00
AllenFang
d8ecc6277b README 2018-01-22 00:11:01 +08:00
AllenFang
216befae4b typo 2018-01-22 00:10:30 +08:00
Allen
3c9cd22d42 merge 0.1.0 code base
Develop -> Master (Not Version Bump)
2018-01-22 00:04:09 +08:00
AllenFang
d84b614599 tweak README.md 2018-01-21 23:31:42 +08:00
AllenFang
85f1eba7cb tweak stories 2018-01-21 17:12:07 +08:00
AllenFang
045ca4adb0 fix bug when remote pagination have same filter conds but change pages will cause data doesnt reflect 2018-01-21 17:12:07 +08:00
AllenFang
2263282629 tweak storybook webpack 2018-01-21 16:10:55 +08:00
AllenFang
a2d082babf due to container will always set source data via store.setAllData so that handle the filtered data in the filter wrapper 2018-01-21 15:44:11 +08:00
AllenFang
79d5a51a39 tweak package.json 2018-01-21 14:31:01 +08:00
AllenFang
51e0cc9129 README.md 2018-01-21 14:31:01 +08:00
AllenFang
659f2e2636 upgrade lerna 2018-01-21 14:10:57 +08:00
ChunMing, Chen
badce54b95 Set theme jekyll-theme-cayman 2017-08-19 23:01:09 +08:00
98 changed files with 1502 additions and 123 deletions

View File

@@ -12,6 +12,7 @@ Additionally, asking questions and requesting new features are welcomed via [iss
# Pull Requests # Pull Requests
Check [here](./docs/development.md) for getting started with development. Check [here](./docs/development.md) for getting started with development.
* PR base is `develop` branch
* We recommend filing an [issue](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues) before you implement any new features. * 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. * 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. * 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.

View File

@@ -1,12 +1,41 @@
# react-bootstrap-table2 # react-bootstrap-table2
Rebuilt [react-bootstrap-table](https://github.com/AllenFang/react-bootstrap-table) Rebuilt [react-bootstrap-table](https://github.com/AllenFang/react-bootstrap-table)
## Development > `react-bootstrap-table2`'s npm module name is [**`react-bootstrap-table-next`**](https://www.npmjs.com/package/react-bootstrap-table-next) due to some guys already used it
Please check [development guide](./docs/development.md).
`react-bootstrap-table2` separate some functionalities from core modules to other modules like following:
* [`react-bootstrap-table-next`](https://www.npmjs.com/package/react-bootstrap-table-next)
* [`react-bootstrap-table2-filter`](https://www.npmjs.com/package/react-bootstrap-table2-filter)
* [`react-bootstrap-table2-editor`](https://www.npmjs.com/package/react-bootstrap-table2-editor)
* [`react-bootstrap-table2-paginator`](https://www.npmjs.com/package/react-bootstrap-table2-paginator)
* [`react-bootstrap-table2-overlay`](https://www.npmjs.com/package/react-bootstrap-table2-overlay)
This can help your application with less bundled size and also help us have clean design to avoid handling to much logic in kernal module(SRP).
## Migration
If you are the user from legacy [`react-bootstrap-table`](https://github.com/AllenFang/react-bootstrap-table/), please have a look on [this](./docs/migration.md).
## Usage ## Usage
See [getting started](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/getting-started.html). See [getting started](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/getting-started.html).
## Online Demo
See `react-bootstrap-table2` [storybook](https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html).
## Roadmap ## Roadmap
See [release plans](https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/2018/01/24/release-plan.html). See [release plans](https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/2018/01/24/release-plan.html).
## Development
Please check [development guide](./docs/development.md).
## How should I run storybook example in my local?
```sh
$ git clone https://github.com/react-bootstrap-table/react-bootstrap-table2.git
$ cd react-bootstrap-table2
$ yarn install
$ yarn storybook
$ Go to localhost:6006
```
**Storybook examples: [`packages/react-bootstrap-table2-example/examples`](https://github.com/react-bootstrap-table/react-bootstrap-table2/tree/master/packages/react-bootstrap-table2-example/examples)**

1
_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-cayman

View File

@@ -542,6 +542,7 @@ Or take a callback function
Configure `column.filter` will able to setup a column level filter on the header column. Currently, `react-bootstrap-table2` support following filters: Configure `column.filter` will able to setup a column level filter on the header column. Currently, `react-bootstrap-table2` support following filters:
* Text(`textFilter`) * Text(`textFilter`)
* Select(`selectFilter`)
We have a quick example to show you how to use `column.filter`: We have a quick example to show you how to use `column.filter`:

117
docs/migration.md Normal file
View File

@@ -0,0 +1,117 @@
# Migration Guide
* Please see the [CHANGELOG](https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/2018/01/24/new-version-0.1.0.html) for `react-bootstrap-table2` first drop.
* Please see the [Roadmap](https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/2018/01/24/release-plan.html) for `react-bootstrap-table2` in 2018/Q1.
* Feel free to see the [offical docs](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/about.html), we list all the basic usage here!!
## Preface
Currently, **I still can't implement all the mainly features in legacy `react-bootstrap-table`**, so please watch our github repo or [blog](https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/) to make sure the legacy features you wanted are already implemented on `react-bootstrap-table2`. Anyway, ask me by open issue is ok.
-----
`react-bootstrap-table2` separate some functionalities from core modules to other modules like following:
* [`react-bootstrap-table-next`](https://www.npmjs.com/package/react-bootstrap-table-next)
* Core table module, include sorting and row selection
* [`react-bootstrap-table2-filter`](https://www.npmjs.com/package/react-bootstrap-table2-filter)
* Column filter Addons
* [`react-bootstrap-table2-editor`](https://www.npmjs.com/package/react-bootstrap-table2-editor)
* Cell Editing Addons
* [`react-bootstrap-table2-paginator`](https://www.npmjs.com/package/react-bootstrap-table2-paginator)
* Pagination Addons
* [`react-bootstrap-table2-overlay`](https://www.npmjs.com/package/react-bootstrap-table2-overlay)
* Overlay/Loading Addons
This can help your application with less bundled size and also help `react-bootstrap-table2` have clean design to avoid handling to much logic in kernal module(SRP). Hence, which means you probably need to install above addons when you need specific features.
## Core Table Migration
There is a big chagne is that there's no `TableHeaderColumn` in the `react-bootstrap-table2`, instead you are supposed to be define the `columns` prop on `BootstrapTable`:
```js
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'price',
text: 'Product Price'
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } />
```
The `text` property is just same as the children for the `TableHeaderColumn`, if you want to custom the header, there's a new property is: [`headerFormatter`](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnheaderformatter-function).
* [`BootstrapTable` Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/table-props.html)
* [Column Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html)
## Table Sort
Please see [Work with table sort](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-sort.html).
- [x] Basic sorting
- [x] Custom sort function
- [x] Default Sort
- [x] Remote mode
- [x] Custom the sorting header
- [ ] Custom the sort caret
- [ ] Sort management
- [ ] Multi sort
Due to no `TableHeaderColumn` so that no `dataSort` here, please add [`sort`](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnsort-bool) property on column definitation.
## Row Selection
Please see [Work with selection](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-row-select.html).
Please see [available selectRow configurations](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/row-select-props.html).
No huge change for row selection, but can not custom the selection column currently. Coming soon!!!
## Column Filter
Please see [Work with column filter](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-filter.html).
Please see [available filter configuration](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/filter-props.html).
- [x] Text Filter
- [x] Custom Text Filter
- [x] Remote Filter
- [ ] Custom Filter Component
- [ ] Regex Filter
- [x] Select Filter
- [x] Custom Select Filter
- [ ] Number Filter
- [ ] Date Filter
- [ ] Array Filter
- [ ] Programmatically Filter
Remember to install [`react-bootstrap-table2-filter`](https://www.npmjs.com/package/react-bootstrap-table2-filter) firstly.
Due to no `TableHeaderColumn` so that no `filter` here, please add [`filter`](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnfilter-object) property on column definitation and [`filter`](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/table-props.html#filter-object) prop on `BootstrapTable`.
## Cell Edit
Please see [Work with cell edit](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-celledit.html).
Please see [available cell edit configurations](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/cell-edit-props.html).
Remember to install [`react-bootstrap-table2-editor`](https://www.npmjs.com/package/react-bootstrap-table2-editor) firstly.
No big changes for cell editing, [`validator`](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnvalidator-function) will not support the async call(Promise).
## Pagination
Please see [Work with pagination](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-pagination.html).
Please see [available pagination configurations](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/pagination-props.html).
Remember to install [`react-bootstrap-table2-paginator`](https://www.npmjs.com/package/react-bootstrap-table2-paginator) firstly.
No big changes for pagination, but still can't custom the pagination list, button and sizePerPage dropdown.
## Remote
> It's totally different in `react-bootstrap-table2`. Please [see](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/basic-remote.html).

View File

@@ -24,6 +24,7 @@ const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`;
const STYLE_PKGS = [ const STYLE_PKGS = [
'react-bootstrap-table2', 'react-bootstrap-table2',
'react-bootstrap-table2-filter',
'react-bootstrap-table2-paginator' 'react-bootstrap-table2-paginator'
].reduce((pkg, curr) => `${curr}|${pkg}`, ''); ].reduce((pkg, curr) => `${curr}|${pkg}`, '');

View File

@@ -1,6 +1,7 @@
{ {
"name": "react-bootstrap-table2", "name": "react-bootstrap-table2",
"version": "0.0.1", "version": "0.0.1",
"private": true,
"description": "Rebuilt for react-bootstrap-table", "description": "Rebuilt for react-bootstrap-table",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@@ -20,11 +21,18 @@
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git" "url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
}, },
"author": "AllenFang", "author": "AllenFang",
"contributors": [{ "contributors": [
"name": "Chun-MingChen", {
"email": "nick830314@gmail.com", "name": "Allen Fang",
"url": "https://github.com/Chun-MingChen" "email": "ayu780129@hotmail.com",
}], "url": "https://github.com/AllenFang"
},
{
"name": "Chun-MingChen",
"email": "nick830314@gmail.com",
"url": "https://github.com/Chun-MingChen"
}
],
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/react-bootstrap-table/react-bootstrap-table2/issues" "url": "https://github.com/react-bootstrap-table/react-bootstrap-table2/issues"
@@ -60,7 +68,7 @@
"jest": "20.0.4", "jest": "20.0.4",
"jsdom": "11.2.0", "jsdom": "11.2.0",
"jsdom-global": "3.0.2", "jsdom-global": "3.0.2",
"lerna": "2.0.0", "lerna": "2.8.0",
"node-sass": "4.5.3", "node-sass": "4.5.3",
"react-test-renderer": "16.0.0", "react-test-renderer": "16.0.0",
"sass-loader": "6.0.6", "sass-loader": "6.0.6",

View File

@@ -4,6 +4,8 @@
**[Live Demo For Cell Edit](https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Cell%20Editing)** **[Live Demo For Cell Edit](https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Cell%20Editing)**
**[API&Props Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/cell-edit-props.html)**
----- -----
## Install ## Install

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table2-editor", "name": "react-bootstrap-table2-editor",
"version": "0.0.3", "version": "0.1.1",
"description": "it's the editor addon for react-bootstrap-table2", "description": "it's the editor addon for react-bootstrap-table2",
"main": "./lib/index.js", "main": "./lib/index.js",
"scripts": { "scripts": {
@@ -28,6 +28,11 @@
], ],
"author": "AllenFang", "author": "AllenFang",
"contributors": [ "contributors": [
{
"name": "Allen Fang",
"email": "ayu780129@hotmail.com",
"url": "https://github.com/AllenFang"
},
{ {
"name": "Chun-MingChen", "name": "Chun-MingChen",
"email": "nick830314@gmail.com", "email": "nick830314@gmail.com",

View File

@@ -1,3 +1,4 @@
{ {
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]] "presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]],
"plugins": ["transform-class-properties"]
} }

View File

@@ -1,12 +1,13 @@
const path = require('path'); const path = require('path');
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2'); const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/index.js');
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator'); const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/index.js');
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay'); const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay/index.js');
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter'); const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter/index.js');
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor'); const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/index.js');
const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style');
const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style'); const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style');
const filterStylePath = path.join(__dirname, '../../react-bootstrap-table2-filter/style');
const storyPath = path.join(__dirname, '../stories'); const storyPath = path.join(__dirname, '../stories');
const examplesPath = path.join(__dirname, '../examples'); const examplesPath = path.join(__dirname, '../examples');
const srcPath = path.join(__dirname, '../src'); const srcPath = path.join(__dirname, '../src');
@@ -33,15 +34,14 @@ const loaders = [{
}, { }, {
test: /\.js?$/, test: /\.js?$/,
use: ['babel-loader'], use: ['babel-loader'],
exclude: /node_modules/, exclude: /node_modules/
include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath]
}, { }, {
test: /\.css$/, test: /\.css$/,
use: ['style-loader', 'css-loader'], use: ['style-loader', 'css-loader'],
}, { }, {
test: /\.scss$/, test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'], use: ['style-loader', 'css-loader', 'sass-loader'],
include: [storyPath, sourceStylePath, paginationStylePath], include: [storyPath, sourceStylePath, paginationStylePath, filterStylePath],
}, { }, {
test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader?limit=100000', loader: 'url-loader?limit=100000',

View File

@@ -18,6 +18,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
// omit...
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -18,6 +18,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -18,6 +18,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -15,9 +15,12 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
// omit...
<BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication="Table is Empty" /> <BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication="Table is Empty" />
// Following is more customizable example // Following is a more flexible example
function indication() { function indication() {
// return something here // return something here

View File

@@ -18,6 +18,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
// omit...
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -19,8 +19,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -23,8 +23,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -21,8 +21,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -27,8 +27,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -34,8 +34,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -21,8 +21,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -45,6 +46,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Only Product Price is bigger than 2101 is editable</h3>
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -20,8 +20,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -43,6 +44,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Click to edit cell</h3>
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -20,8 +20,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -48,6 +49,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Product Name is non editable</h3>
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -19,8 +19,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -42,6 +43,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Double click to edit cell</h3>
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -19,8 +19,9 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -45,6 +46,7 @@ const columns = [{
`; `;
export default () => ( export default () => (
<div> <div>
<h3>Product ID: 0, 3 is non editable</h3>
<BootstrapTable <BootstrapTable
keyField="id" keyField="id"
data={ products } data={ products }

View File

@@ -32,6 +32,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const owners = ['Allen', 'Bob', 'Cat']; const owners = ['Allen', 'Bob', 'Cat'];

View File

@@ -0,0 +1,80 @@
import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
import Code from 'components/common/code-block';
import { productsQualityGenerator } from 'utils/common';
const products = productsQualityGenerator(6);
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions,
withoutEmptyOption: true,
style: {
backgroundColor: 'pink'
},
className: 'test-classname',
datamycustomattr: 'datamycustomattr'
})
}];
const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions,
withoutEmptyOption: true,
style: {
backgroundColor: 'pink'
},
className: 'test-classname',
datamycustomattr: 'datamycustomattr'
})
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
`;
export default () => (
<div>
<BootstrapTable
keyField="id"
data={ products }
columns={ columns }
filter={ filterFactory() }
/>
<Code>{ sourceCode }</Code>
</div>
);

View File

@@ -29,6 +29,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const columns = [{ const columns = [{

View File

@@ -0,0 +1,70 @@
import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
import Code from 'components/common/code-block';
import { productsQualityGenerator } from 'utils/common';
const products = productsQualityGenerator(6);
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions,
defaultValue: 2
})
}];
const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions,
defaultValue: 2
})
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
`;
export default () => (
<div>
<BootstrapTable
keyField="id"
data={ products }
columns={ columns }
filter={ filterFactory() }
/>
<Code>{ sourceCode }</Code>
</div>
);

View File

@@ -0,0 +1,69 @@
import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter, Comparator } from 'react-bootstrap-table2-filter';
import Code from 'components/common/code-block';
import { productsGenerator } from 'utils/common';
const products = productsGenerator(6);
const selectOptions = {
'03': '03',
'04': '04',
'01': '01'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'price',
text: 'Product Price',
filter: selectFilter({
options: selectOptions,
comparator: Comparator.LIKE // default is Comparator.EQ
})
}];
const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
const selectOptions = {
'03': '03',
'04': '04',
'01': '01'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'price',
text: 'Product Price',
filter: selectFilter({
options: selectOptions,
comparator: Comparator.LIKE // default is Comparator.EQ
})
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
`;
export default () => (
<div>
<h3>Select Filter with LIKE Comparator</h3>
<BootstrapTable
keyField="id"
data={ products }
columns={ columns }
filter={ filterFactory() }
/>
<Code>{ sourceCode }</Code>
</div>
);

View File

@@ -0,0 +1,68 @@
import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
import Code from 'components/common/code-block';
import { productsQualityGenerator } from 'utils/common';
const products = productsQualityGenerator(6);
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions
})
}];
const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [{
dataField: 'id',
text: 'Product ID'
}, {
dataField: 'name',
text: 'Product Name'
}, {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions
})
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
`;
export default () => (
<div>
<BootstrapTable
keyField="id"
data={ products }
columns={ columns }
filter={ filterFactory() }
/>
<Code>{ sourceCode }</Code>
</div>
);

View File

@@ -22,6 +22,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const columns = [{ const columns = [{

View File

@@ -22,6 +22,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter';
const columns = [{ const columns = [{

View File

@@ -20,6 +20,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const columns = [{ const columns = [{

View File

@@ -24,6 +24,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -21,6 +21,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',
@@ -39,6 +41,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Try to hover on Product Name header column</h3>
<BootstrapTable keyField="id" data={ products } columns={ columns } /> <BootstrapTable keyField="id" data={ products } columns={ columns } />
<Code>{ sourceCode }</Code> <Code>{ sourceCode }</Code>
</div> </div>

View File

@@ -24,6 +24,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -23,6 +23,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -31,6 +31,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
function priceFormatter(cell, row) { function priceFormatter(cell, row) {
if (row.onSale) { if (row.onSale) {
return ( return (

View File

@@ -34,6 +34,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
function rankFormatter(cell, row, rowIndex, formatExtraData) { function rankFormatter(cell, row, rowIndex, formatExtraData) {
return ( return (
<i className={ formatExtraData[cell] } /> <i className={ formatExtraData[cell] } />

View File

@@ -20,6 +20,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -33,6 +33,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -39,6 +39,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Try to hover on any Product Name cells</h3>
<BootstrapTable keyField="id" data={ products } columns={ columns } /> <BootstrapTable keyField="id" data={ products } columns={ columns } />
<Code>{ sourceCode }</Code> <Code>{ sourceCode }</Code>
</div> </div>

View File

@@ -32,6 +32,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'User ID' text: 'User ID'

View File

@@ -21,6 +21,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -21,6 +21,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -24,6 +24,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -23,6 +23,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -41,6 +41,7 @@ const defaultSorted = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
// ... // ...
function priceFormatter(column, colIndex, { sortElement, filterElement }) { function priceFormatter(column, colIndex, { sortElement, filterElement }) {

View File

@@ -26,6 +26,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
function priceFormatter(column, colIndex) { function priceFormatter(column, colIndex) {
return ( return (
<h5><strong>$$ { column.text } $$</strong></h5> <h5><strong>$$ { column.text } $$</strong></h5>

View File

@@ -32,6 +32,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -21,6 +21,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -22,7 +22,7 @@ const columns = [{
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next'; import BootstrapTable from 'react-bootstrap-table-next';
import paginationFactory from 'react-bootstrap-table2-paginator'; import paginationFactory from 'react-bootstrap-table2-paginator';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -23,7 +23,7 @@ const columns = [{
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next'; import BootstrapTable from 'react-bootstrap-table-next';
import paginationFactory from 'react-bootstrap-table2-paginator'; import paginationFactory from 'react-bootstrap-table2-paginator';
// ...
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -19,8 +19,10 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor'; import cellEditFactory from 'react-bootstrap-table2-editor';
// ... // ...
const RemoteCellEdit = (props) => { const RemoteCellEdit = (props) => {
const cellEdit = { const cellEdit = {
mode: 'click', mode: 'click',
@@ -42,12 +44,6 @@ const RemoteCellEdit = (props) => {
); );
}; };
RemoteCellEdit.propTypes = {
data: PropTypes.array.isRequired,
onTableChange: PropTypes.func.isRequired,
errorMessage: PropTypes.string.isRequired
};
class Container extends React.Component { class Container extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);

View File

@@ -23,6 +23,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const columns = [{ const columns = [{
@@ -38,7 +39,61 @@ const columns = [{
filter: textFilter() filter: textFilter()
}]; }];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } /> const RemoteFilter = props => (
<div>
<BootstrapTable
remote={ { filter: true } }
keyField="id"
data={ props.data }
columns={ columns }
filter={ filterFactory() }
onTableChange={ props.onTableChange }
/>
<Code>{ sourceCode }</Code>
</div>
);
class Container extends React.Component {
constructor(props) {
super(props);
this.state = {
data: products
};
}
handleTableChange = (type, { filters }) => {
setTimeout(() => {
const result = products.filter((row) => {
let valid = true;
for (const dataField in filters) {
const { filterVal, filterType, comparator } = filters[dataField];
if (filterType === 'TEXT') {
if (comparator === Comparator.LIKE) {
valid = row[dataField].toString().indexOf(filterVal) > -1;
} else {
valid = row[dataField] === filterVal;
}
}
if (!valid) break;
}
return valid;
});
this.setState(() => ({
data: result
}));
}, 2000);
}
render() {
return (
<RemoteFilter
data={ this.state.data }
onTableChange={ this.handleTableChange }
/>
);
}
}
`; `;
const RemoteFilter = props => ( const RemoteFilter = props => (

View File

@@ -47,7 +47,7 @@ class Container extends React.Component {
}; };
} }
handleTableChange = ({ page, sizePerPage }) => { handleTableChange = (type, { page, sizePerPage }) => {
const currentIndex = (page - 1) * sizePerPage; const currentIndex = (page - 1) * sizePerPage;
setTimeout(() => { setTimeout(() => {
this.setState(() => ({ this.setState(() => ({

View File

@@ -21,7 +21,7 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter'; import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
@@ -36,7 +36,64 @@ const columns = [{
filter: textFilter() filter: textFilter()
}]; }];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } /> const RemoteSort = props => (
<div>
<BootstrapTable
remote={ { sort: true } }
keyField="id"
data={ props.data }
columns={ columns }
onTableChange={ props.onTableChange }
/>
<Code>{ sourceCode }</Code>
</div>
);
class Container extends React.Component {
constructor(props) {
super(props);
this.state = {
data: products
};
}
handleTableChange = (type, { sortField, sortOrder, data }) => {
setTimeout(() => {
let result;
if (sortOrder === 'asc') {
result = data.sort((a, b) => {
if (a[sortField] > b[sortField]) {
return 1;
} else if (b[sortField] > a[sortField]) {
return -1;
}
return 0;
});
} else {
result = data.sort((a, b) => {
if (a[sortField] > b[sortField]) {
return -1;
} else if (b[sortField] > a[sortField]) {
return 1;
}
return 0;
});
}
this.setState(() => ({
data: result
}));
}, 2000);
}
render() {
return (
<RemoteSort
data={ this.state.data }
onTableChange={ this.handleTableChange }
/>
);
}
}
`; `;
const RemoteSort = props => ( const RemoteSort = props => (

View File

@@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next'; import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor';
import Code from 'components/common/code-block'; import Code from 'components/common/code-block';
import { productsGenerator } from 'utils/common'; import { productsGenerator } from 'utils/common';
@@ -23,11 +24,10 @@ const selectRow = {
clickToEdit: true clickToEdit: true
}; };
const cellEdit = {
mode: 'click'
};
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
import cellEditFactory from 'react-bootstrap-table2-editor';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -50,16 +50,23 @@ const cellEdit = {
}; };
<BootstrapTable <BootstrapTable
keyField='id' keyField="id"
data={ products } data={ products }
columns={ columns } columns={ columns }
selectRow={ selectRow } selectRow={ selectRow }
cellEdit={ cellEditFactory({ mode: 'click' }) }
/> />
`; `;
export default () => ( export default () => (
<div> <div>
<BootstrapTable keyField="id" data={ products } columns={ columns } selectRow={ selectRow } cellEdit={ cellEdit } /> <BootstrapTable
keyField="id"
data={ products }
columns={ columns }
selectRow={ selectRow }
cellEdit={ cellEditFactory({ mode: 'click' }) }
/>
<Code>{ sourceCode }</Code> <Code>{ sourceCode }</Code>
</div> </div>
); );

View File

@@ -23,6 +23,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -25,6 +25,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -23,6 +23,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -24,6 +24,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -31,6 +31,8 @@ const selectRow2 = {
}; };
const sourceCode1 = `\ const sourceCode1 = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -32,6 +32,8 @@ const selectRow2 = {
}; };
const sourceCode1 = `\ const sourceCode1 = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -34,6 +34,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -34,6 +34,8 @@ const selectRow2 = {
}; };
const sourceCode1 = `\ const sourceCode1 = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -23,6 +23,8 @@ const selectRow = {
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -20,6 +20,8 @@ const columns = [{
const rowClasses1 = 'custom-row-class'; const rowClasses1 = 'custom-row-class';
const sourceCode1 = `\ const sourceCode1 = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -1,5 +1,5 @@
/* eslint no-unused-vars: 0 */ /* eslint no-unused-vars: 0 */
/* eslint no-console: 0 */ /* eslint no-alert: 0 */
import React from 'react'; import React from 'react';
import BootstrapTable from 'react-bootstrap-table-next'; import BootstrapTable from 'react-bootstrap-table-next';
@@ -21,11 +21,13 @@ const columns = [{
const rowEvents = { const rowEvents = {
onClick: (e) => { onClick: (e) => {
console.log('click on row'); alert('click on row');
} }
}; };
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'
@@ -39,15 +41,16 @@ const columns = [{
const rowEvents = { const rowEvents = {
onClick: (e) => { onClick: (e) => {
console.log('click on row'); alert('click on row');
} }
}; };
<BootstrapTable keyField='id' data={ products } columns={ columns } rowStyle={ rowStyle } /> <BootstrapTable keyField='id' data={ products } columns={ columns } rowEvents={ rowEvents } />
`; `;
export default () => ( export default () => (
<div> <div>
<h3>Try to click on any rows</h3>
<BootstrapTable keyField="id" data={ products } columns={ columns } rowEvents={ rowEvents } /> <BootstrapTable keyField="id" data={ products } columns={ columns } rowEvents={ rowEvents } />
<Code>{ sourceCode }</Code> <Code>{ sourceCode }</Code>
</div> </div>

View File

@@ -20,6 +20,8 @@ const columns = [{
const rowStyle1 = { backgroundColor: '#c8e6c9' }; const rowStyle1 = { backgroundColor: '#c8e6c9' };
const sourceCode1 = `\ const sourceCode1 = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID' text: 'Product ID'

View File

@@ -29,6 +29,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',
@@ -54,6 +56,7 @@ const columns = [{
export default () => ( export default () => (
<div> <div>
<h3>Product ID sorting is reverted</h3>
<BootstrapTable keyField="id" data={ products } columns={ columns } /> <BootstrapTable keyField="id" data={ products } columns={ columns } />
<Code>{ sourceCode }</Code> <Code>{ sourceCode }</Code>
</div> </div>

View File

@@ -27,6 +27,8 @@ const defaultSorted = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -20,6 +20,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const columns = [{ const columns = [{
dataField: 'id', dataField: 'id',
text: 'Product ID', text: 'Product ID',

View File

@@ -31,6 +31,8 @@ const columns = [{
}]; }];
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const headerSortingClasses = (column, sortOrder, isLastSorting, colIndex) => ( const headerSortingClasses = (column, sortOrder, isLastSorting, colIndex) => (
sortOrder === 'asc' ? 'demo-sorting-asc' : 'demo-sorting-desc' sortOrder === 'asc' ? 'demo-sorting-asc' : 'demo-sorting-desc'
); );

View File

@@ -26,6 +26,8 @@ const columns = [{
const sourceCode = `\ const sourceCode = `\
import BootstrapTable from 'react-bootstrap-table-next';
const headerSortingStyle = { backgroundColor: '#c8e6c9' }; const headerSortingStyle = { backgroundColor: '#c8e6c9' };
const columns = [{ const columns = [{

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table2-example", "name": "react-bootstrap-table2-example",
"version": "0.0.3", "version": "0.1.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"private": true, "private": true,
@@ -23,6 +23,7 @@
"devDependencies": { "devDependencies": {
"@storybook/addon-console": "^1.0.0", "@storybook/addon-console": "^1.0.0",
"@storybook/react": "^3.2.8", "@storybook/react": "^3.2.8",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"react-redux": "^5.0.6", "react-redux": "^5.0.6",
"redux": "^3.7.2", "redux": "^3.7.2",

View File

@@ -20,6 +20,13 @@ export const productsGenerator = (quantity = 5, callback) => {
); );
}; };
export const productsQualityGenerator = (quantity = 5) =>
Array.from({ length: quantity }, (value, index) => ({
id: index,
name: `Item name ${index}`,
quality: index % 3
}));
export const jobsGenerator = (quantity = 5) => export const jobsGenerator = (quantity = 5) =>
Array.from({ length: quantity }, (value, index) => ({ Array.from({ length: quantity }, (value, index) => ({
id: index, id: index,

View File

@@ -39,6 +39,10 @@ import TextFilterWithDefaultValue from 'examples/column-filter/text-filter-defau
import TextFilterComparator from 'examples/column-filter/text-filter-eq-comparator'; import TextFilterComparator from 'examples/column-filter/text-filter-eq-comparator';
import CustomTextFilter from 'examples/column-filter/custom-text-filter'; import CustomTextFilter from 'examples/column-filter/custom-text-filter';
import CustomFilterValue from 'examples/column-filter/custom-filter-value'; import CustomFilterValue from 'examples/column-filter/custom-filter-value';
import SelectFilter from 'examples/column-filter/select-filter';
import SelectFilterWithDefaultValue from 'examples/column-filter/select-filter-default-value';
import SelectFilterComparator from 'examples/column-filter/select-filter-like-comparator';
import CustomSelectFilter from 'examples/column-filter/custom-select-filter';
// work on rows // work on rows
import RowStyleTable from 'examples/rows/row-style'; import RowStyleTable from 'examples/rows/row-style';
@@ -96,8 +100,9 @@ import RemoteAll from 'examples/remote/remote-all';
import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/css/bootstrap.min.css';
import 'stories/stylesheet/tomorrow.min.css'; import 'stories/stylesheet/tomorrow.min.css';
import 'stories/stylesheet/storybook.scss'; import 'stories/stylesheet/storybook.scss';
import 'react-bootstrap-table2/style/react-bootstrap-table2.scss'; import '../../react-bootstrap-table2/style/react-bootstrap-table2.scss';
import 'react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss'; import '../../react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss';
import '../../react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss';
// import { action } from '@storybook/addon-actions'; // import { action } from '@storybook/addon-actions';
@@ -140,6 +145,10 @@ storiesOf('Column Filter', module)
.add('Text Filter with Comparator', () => <TextFilterComparator />) .add('Text Filter with Comparator', () => <TextFilterComparator />)
.add('Custom Text Filter', () => <CustomTextFilter />) .add('Custom Text Filter', () => <CustomTextFilter />)
// add another filter type example right here. // add another filter type example right here.
.add('Select Filter', () => <SelectFilter />)
.add('Select Filter with Default Value', () => <SelectFilterWithDefaultValue />)
.add('Select Filter with Comparator', () => <SelectFilterComparator />)
.add('Custom Select Filter', () => <CustomSelectFilter />)
.add('Custom Filter Value', () => <CustomFilterValue />); .add('Custom Filter Value', () => <CustomFilterValue />);
storiesOf('Work on Rows', module) storiesOf('Work on Rows', module)

View File

@@ -4,6 +4,8 @@
**[Live Demo For Column Filter](https://github.com/react-bootstrap-table/react-bootstrap-table2/blob/gh-pages-src/storybook/index.html?selectedKind=Column%20Filter)** **[Live Demo For Column Filter](https://github.com/react-bootstrap-table/react-bootstrap-table2/blob/gh-pages-src/storybook/index.html?selectedKind=Column%20Filter)**
**[API&Props Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/filter-props.html)**
----- -----
## Install ## Install
@@ -15,8 +17,19 @@ $ npm install react-bootstrap-table2-filter --save
You can get all types of filters via import and these filters are a factory function to create a individual filter instance. Currently, we support following filters: You can get all types of filters via import and these filters are a factory function to create a individual filter instance. Currently, we support following filters:
* TextFilter * TextFilter
* SelectFilter
* **Coming soon!** * **Coming soon!**
## Add CSS
```js
// es5
require('react-bootstrap-table2-filter/dist/react-bootstrap-table2-filter.min.css');
// es6
import 'react-bootstrap-table2-filter/dist/react-bootstrap-table2-filter.min.css';
```
## Text Filter ## Text Filter
Following is a quick demo for enable the column filter on **Product Price** column!! Following is a quick demo for enable the column filter on **Product Price** column!!
@@ -49,5 +62,50 @@ const priceFilter = textFilter({
delay: 1000 // how long will trigger filtering after user typing, default is 500 ms delay: 1000 // how long will trigger filtering after user typing, default is 500 ms
}); });
// omit...
```
## Select Filter
A quick example:
```js
import filterFactory, { selectFilter } from 'react-bootstrap-table2-filter';
// omit...
const selectOptions = {
0: 'good',
1: 'Bad',
2: 'unknown'
};
const columns = [
..., {
dataField: 'quality',
text: 'Product Quailty',
formatter: cell => selectOptions[cell],
filter: selectFilter({
options: selectOptions
})
}];
<BootstrapTable keyField='id' data={ products } columns={ columns } filter={ filterFactory() } />
```
Following is an example for custom select filter:
```js
import filterFactory, { selectFilter, Comparator } from 'react-bootstrap-table2-filter';
// omit...
const qualityFilter = selectFilter({
options: selectOptions,
placeholder: 'My Custom PlaceHolder', // custom the input placeholder
className: 'my-custom-text-filter', // custom classname on input
defaultValue: '2', // default filtering value
comparator: Comparator.LIKE, // default is Comparator.EQ
style: { ... }, // your custom styles on input
withoutEmptyOption: true // hide the default select option
});
// omit... // omit...
``` ```

View File

@@ -1,4 +1,5 @@
import TextFilter from './src/components/text'; import TextFilter from './src/components/text';
import SelectFilter from './src/components/select';
import wrapperFactory from './src/wrapper'; import wrapperFactory from './src/wrapper';
import * as Comparison from './src/comparison'; import * as Comparison from './src/comparison';
@@ -13,3 +14,8 @@ export const textFilter = (props = {}) => ({
Filter: TextFilter, Filter: TextFilter,
props props
}); });
export const selectFilter = (props = {}) => ({
Filter: SelectFilter,
props
});

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table2-filter", "name": "react-bootstrap-table2-filter",
"version": "0.0.3", "version": "0.1.2",
"description": "it's a column filter addon for react-bootstrap-table2", "description": "it's a column filter addon for react-bootstrap-table2",
"main": "./lib/index.js", "main": "./lib/index.js",
"repository": { "repository": {
@@ -25,6 +25,11 @@
], ],
"author": "AllenFang", "author": "AllenFang",
"contributors": [ "contributors": [
{
"name": "Allen Fang",
"email": "ayu780129@hotmail.com",
"url": "https://github.com/AllenFang"
},
{ {
"name": "Chun-MingChen", "name": "Chun-MingChen",
"email": "nick830314@gmail.com", "email": "nick830314@gmail.com",

View File

@@ -0,0 +1,132 @@
/* eslint react/require-default-props: 0 */
/* eslint no-return-assign: 0 */
/* eslint react/no-unused-prop-types: 0 */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { LIKE, EQ } from '../comparison';
import { FILTER_TYPE } from '../const';
function optionsEquals(currOpts, prevOpts) {
const keys = Object.keys(currOpts);
for (let i = 0; i < keys.length; i += 1) {
if (currOpts[keys[i]] !== prevOpts[keys[i]]) {
return false;
}
}
return Object.keys(currOpts).length === Object.keys(prevOpts).length;
}
class SelectFilter extends Component {
constructor(props) {
super(props);
this.filter = this.filter.bind(this);
const isSelected = props.options[props.defaultValue] !== undefined;
this.state = { isSelected };
}
componentDidMount() {
const value = this.selectInput.value;
if (value && value !== '') {
this.props.onFilter(this.props.column, value, FILTER_TYPE.SELECT);
}
}
componentDidUpdate(prevProps) {
let needFilter = false;
if (this.props.defaultValue !== prevProps.defaultValue) {
needFilter = true;
} else if (!optionsEquals(this.props.options, prevProps.options)) {
needFilter = true;
}
if (needFilter) {
const value = this.selectInput.value;
if (value) {
this.props.onFilter(this.props.column, value, FILTER_TYPE.SELECT);
}
}
}
getOptions() {
const optionTags = [];
const { options, placeholder, column, withoutEmptyOption } = this.props;
if (!withoutEmptyOption) {
optionTags.push((
<option key="-1" value="">{ placeholder || `Select ${column.text}...` }</option>
));
}
Object.keys(options).forEach(key =>
optionTags.push(<option key={ key } value={ key }>{ options[key] }</option>)
);
return optionTags;
}
cleanFiltered() {
const value = (this.props.defaultValue !== undefined) ? this.props.defaultValue : '';
this.setState(() => ({ isSelected: value !== '' }));
this.selectInput.value = value;
this.props.onFilter(this.props.column, value, FILTER_TYPE.SELECT);
}
applyFilter(value) {
this.selectInput.value = value;
this.setState(() => ({ isSelected: value !== '' }));
this.props.onFilter(this.props.column, value, FILTER_TYPE.SELECT);
}
filter(e) {
const { value } = e.target;
this.setState(() => ({ isSelected: value !== '' }));
this.props.onFilter(this.props.column, value, FILTER_TYPE.SELECT);
}
render() {
const {
style,
className,
defaultValue,
onFilter,
column,
options,
comparator,
withoutEmptyOption,
...rest
} = this.props;
const selectClass =
`filter select-filter form-control ${className} ${this.state.isSelected ? '' : 'placeholder-selected'}`;
return (
<select
{ ...rest }
ref={ n => this.selectInput = n }
style={ style }
className={ selectClass }
onChange={ this.filter }
defaultValue={ defaultValue !== undefined ? defaultValue : '' }
>
{ this.getOptions() }
</select>
);
}
}
SelectFilter.propTypes = {
onFilter: PropTypes.func.isRequired,
column: PropTypes.object.isRequired,
options: PropTypes.object.isRequired,
comparator: PropTypes.oneOf([LIKE, EQ]),
placeholder: PropTypes.string,
style: PropTypes.object,
className: PropTypes.string,
withoutEmptyOption: PropTypes.bool,
defaultValue: PropTypes.any
};
SelectFilter.defaultProps = {
defaultValue: '',
className: '',
withoutEmptyOption: false,
comparator: EQ
};
export default SelectFilter;

View File

@@ -1,5 +1,6 @@
export const FILTER_TYPE = { export const FILTER_TYPE = {
TEXT: 'TEXT' TEXT: 'TEXT',
SELECT: 'SELECT'
}; };
export const FILTER_DELAY = 500; export const FILTER_DELAY = 500;

View File

@@ -3,7 +3,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { filters } from './filter'; import { filters } from './filter';
import { LIKE } from './comparison'; import { LIKE, EQ } from './comparison';
import { FILTER_TYPE } from './const';
export default (Base, { export default (Base, {
_, _,
@@ -23,11 +24,14 @@ export default (Base, {
componentWillReceiveProps({ isDataChanged, store, columns }) { componentWillReceiveProps({ isDataChanged, store, columns }) {
// consider to use lodash.isEqual // consider to use lodash.isEqual
if (JSON.stringify(this.state.currFilters) !== JSON.stringify(store.filters)) { const isRemoteFilter = this.isRemoteFiltering() || this.isRemotePagination();
if (isRemoteFilter ||
JSON.stringify(this.state.currFilters) !== JSON.stringify(store.filters)) {
// I think this condition only isRemoteFilter is enough
store.filteredData = store.getAllData();
this.setState(() => ({ isDataChanged: true, currFilters: store.filters })); this.setState(() => ({ isDataChanged: true, currFilters: store.filters }));
} else if (isDataChanged) { } else if (isDataChanged) {
if (!(this.isRemoteFiltering() || this.isRemotePagination()) && if (!isRemoteFilter && Object.keys(this.state.currFilters).length > 0) {
Object.keys(this.state.currFilters).length > 0) {
store.filteredData = filters(store, columns, _)(this.state.currFilters); store.filteredData = filters(store, columns, _)(this.state.currFilters);
} }
this.setState(() => ({ isDataChanged })); this.setState(() => ({ isDataChanged }));
@@ -44,7 +48,8 @@ export default (Base, {
if (!_.isDefined(filterVal) || filterVal === '') { if (!_.isDefined(filterVal) || filterVal === '') {
delete currFilters[dataField]; delete currFilters[dataField];
} else { } else {
const { comparator = LIKE } = filter.props; // select default comparator is EQ, others are LIKE
const { comparator = (filterType === FILTER_TYPE.SELECT ? EQ : LIKE) } = filter.props;
currFilters[dataField] = { filterVal, filterType, comparator }; currFilters[dataField] = { filterVal, filterType, comparator };
} }
store.filters = currFilters; store.filters = currFilters;

View File

@@ -0,0 +1,14 @@
.react-bootstrap-table > table > thead > tr > th .filter {
font-weight: normal;
}
.react-bootstrap-table > table > thead > tr > th .select-filter option[value=''],
.react-bootstrap-table > table > thead > tr > th .select-filter.placeholder-selected {
color: lightgrey;
font-style: italic;
}
.react-bootstrap-table > table > thead > tr > th .select-filter.placeholder-selected option:not([value='']) {
color: initial;
font-style: initial;
}

View File

@@ -0,0 +1,296 @@
import 'jsdom-global/register';
import React from 'react';
import sinon from 'sinon';
import { mount } from 'enzyme';
import SelectFilter from '../../src/components/select';
import { FILTER_TYPE } from '../../src/const';
describe('Select Filter', () => {
let wrapper;
let instance;
const onFilter = sinon.stub();
const column = {
dataField: 'quality',
text: 'Product Quality'
};
const options = {
0: 'Bad',
1: 'Good',
2: 'Unknow'
};
afterEach(() => {
onFilter.reset();
});
describe('initialization', () => {
beforeEach(() => {
wrapper = mount(
<SelectFilter onFilter={ onFilter } column={ column } options={ options } />
);
instance = wrapper.instance();
});
it('should have correct state', () => {
expect(instance.state.isSelected).toBeFalsy();
});
it('should rendering component successfully', () => {
expect(wrapper).toHaveLength(1);
expect(wrapper.find('select')).toHaveLength(1);
expect(wrapper.find('.select-filter')).toHaveLength(1);
expect(wrapper.find('.placeholder-selected')).toHaveLength(1);
});
it('should rendering select options correctly', () => {
const select = wrapper.find('select');
expect(select.find('option')).toHaveLength(Object.keys(options).length + 1);
expect(select.childAt(0).text()).toEqual(`Select ${column.text}...`);
Object.keys(options).forEach((key, i) => {
expect(select.childAt(i + 1).prop('value')).toEqual(key);
expect(select.childAt(i + 1).text()).toEqual(options[key]);
});
});
});
describe('when defaultValue is defined', () => {
let defaultValue;
describe('and it is valid', () => {
beforeEach(() => {
defaultValue = '0';
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
defaultValue={ defaultValue }
/>
);
instance = wrapper.instance();
});
it('should have correct state', () => {
expect(instance.state.isSelected).toBeTruthy();
});
it('should rendering component successfully', () => {
expect(wrapper).toHaveLength(1);
expect(wrapper.find('.placeholder-selected')).toHaveLength(0);
});
it('should calling onFilter on componentDidMount', () => {
expect(onFilter.calledOnce).toBeTruthy();
expect(onFilter.calledWith(column, defaultValue, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
});
describe('when placeholder is defined', () => {
const placeholder = 'test';
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
placeholder={ placeholder }
/>
);
instance = wrapper.instance();
});
it('should rendering component successfully', () => {
expect(wrapper).toHaveLength(1);
const select = wrapper.find('select');
expect(select.childAt(0).text()).toEqual(placeholder);
});
});
describe('when style is defined', () => {
const style = { backgroundColor: 'red' };
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
style={ style }
/>
);
});
it('should rendering component successfully', () => {
expect(wrapper).toHaveLength(1);
expect(wrapper.find('select').prop('style')).toEqual(style);
});
});
describe('when withoutEmptyOption is defined', () => {
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
withoutEmptyOption
/>
);
});
it('should rendering select without default empty option', () => {
const select = wrapper.find('select');
expect(select.find('option')).toHaveLength(Object.keys(options).length);
});
});
describe('componentDidUpdate', () => {
let prevProps;
describe('when props.defaultValue is diff from prevProps.defaultValue', () => {
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
defaultValue="0"
/>
);
prevProps = {
column,
options,
defaultValue: '1'
};
instance = wrapper.instance();
instance.componentDidUpdate(prevProps);
});
it('should update', () => {
expect(onFilter.callCount).toBe(2);
expect(onFilter.calledWith(
column, instance.props.defaultValue, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
describe('when props.options is diff from prevProps.options', () => {
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ {
...options,
3: 'Best'
} }
defaultValue="1"
/>
);
prevProps = {
column,
options
};
instance = wrapper.instance();
instance.componentDidUpdate(prevProps);
});
it('should update', () => {
expect(onFilter.callCount).toBe(2);
expect(onFilter.calledWith(
column, instance.props.defaultValue, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
});
describe('cleanFiltered', () => {
describe('when props.defaultValue is defined', () => {
const defaultValue = '0';
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
defaultValue={ defaultValue }
/>
);
instance = wrapper.instance();
instance.cleanFiltered();
});
it('should setting state correctly', () => {
expect(instance.state.isSelected).toBeTruthy();
});
it('should calling onFilter correctly', () => {
expect(onFilter.callCount).toBe(2);
expect(onFilter.calledWith(column, defaultValue, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
describe('when props.defaultValue is not defined', () => {
beforeEach(() => {
wrapper = mount(
<SelectFilter
onFilter={ onFilter }
column={ column }
options={ options }
/>
);
instance = wrapper.instance();
instance.cleanFiltered();
});
it('should setting state correctly', () => {
expect(instance.state.isSelected).toBeFalsy();
});
it('should calling onFilter correctly', () => {
expect(onFilter.callCount).toBe(1);
});
});
});
describe('applyFilter', () => {
const value = '2';
beforeEach(() => {
wrapper = mount(
<SelectFilter onFilter={ onFilter } column={ column } options={ options } />
);
instance = wrapper.instance();
instance.applyFilter(value);
});
it('should setting state correctly', () => {
expect(instance.state.isSelected).toBeTruthy();
});
it('should calling onFilter correctly', () => {
expect(onFilter.callCount).toBe(1);
expect(onFilter.calledWith(column, value, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
describe('filter', () => {
const event = { target: { value: 'tester' } };
beforeEach(() => {
wrapper = mount(
<SelectFilter onFilter={ onFilter } column={ column } options={ options } />
);
instance = wrapper.instance();
instance.filter(event);
});
it('should setting state correctly', () => {
expect(instance.state.isSelected).toBeTruthy();
});
it('should calling onFilter correctly', () => {
expect(onFilter.callCount).toBe(1);
expect(onFilter.calledWith(column, event.target.value, FILTER_TYPE.SELECT)).toBeTruthy();
});
});
});

View File

@@ -106,7 +106,7 @@ describe('Wrapper', () => {
}); });
}); });
describe('when props.isDataChanged is true and remote is enable', () => { describe('when props.isDataChanged is true', () => {
beforeEach(() => { beforeEach(() => {
nextProps = createTableProps({ isDataChanged: true }); nextProps = createTableProps({ isDataChanged: true });
instance.componentWillReceiveProps(nextProps); instance.componentWillReceiveProps(nextProps);
@@ -118,13 +118,36 @@ describe('Wrapper', () => {
}); });
describe('when props.store.filters is different from current state.currFilters', () => { describe('when props.store.filters is different from current state.currFilters', () => {
const nextData = [];
beforeEach(() => { beforeEach(() => {
nextProps = createTableProps(); nextProps = createTableProps();
nextProps.store.filters = { price: { filterVal: 20, filterType: FILTER_TYPE.TEXT } }; nextProps.store.filters = { price: { filterVal: 20, filterType: FILTER_TYPE.TEXT } };
nextProps.store.setAllData(nextData);
instance.componentWillReceiveProps(nextProps); instance.componentWillReceiveProps(nextProps);
}); });
it('should setting states correctly', () => { it('should setting states correctly', () => {
expect(nextProps.store.filteredData).toEqual(nextData);
expect(instance.state.isDataChanged).toBeTruthy();
expect(instance.state.currFilters).toBe(nextProps.store.filters);
});
});
describe('when remote filter is enabled', () => {
let props;
const nextData = [];
beforeEach(() => {
props = createTableProps({ remote: { filter: true } });
createFilterWrapper(props);
nextProps = createTableProps({ remote: { filter: true } });
nextProps.store.setAllData(nextData);
instance.componentWillReceiveProps(nextProps);
});
it('should setting states correctly', () => {
expect(nextProps.store.filteredData).toEqual(nextData);
expect(instance.state.isDataChanged).toBeTruthy(); expect(instance.state.isDataChanged).toBeTruthy();
expect(instance.state.currFilters).toBe(nextProps.store.filters); expect(instance.state.currFilters).toBe(nextProps.store.filters);
}); });

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table2-overlay", "name": "react-bootstrap-table2-overlay",
"version": "0.0.3", "version": "0.1.1",
"description": "it's a loading overlay addons for react-bootstrap-table2", "description": "it's a loading overlay addons for react-bootstrap-table2",
"main": "./lib/index.js", "main": "./lib/index.js",
"repository": { "repository": {
@@ -25,6 +25,11 @@
], ],
"author": "AllenFang", "author": "AllenFang",
"contributors": [ "contributors": [
{
"name": "Allen Fang",
"email": "ayu780129@hotmail.com",
"url": "https://github.com/AllenFang"
},
{ {
"name": "Chun-MingChen", "name": "Chun-MingChen",
"email": "nick830314@gmail.com", "email": "nick830314@gmail.com",

View File

@@ -1,15 +1,17 @@
# react-bootstrap-table2-pagination # react-bootstrap-table2-paginator
`react-bootstrap-table2` separate the pagination code base to [`react-bootstrap-table2-pagination`](https://github.com/react-bootstrap-table/react-bootstrap-table2/tree/develop/packages/react-bootstrap-table2-paginator), so there's a little bit different when you use pagination. In the following, we are going to show you how to enable and configure the a pagination table `react-bootstrap-table2` separate the pagination code base to [`react-bootstrap-table2-paginator`](https://github.com/react-bootstrap-table/react-bootstrap-table2/tree/develop/packages/react-bootstrap-table2-paginator), so there's a little bit different when you use pagination. In the following, we are going to show you how to enable and configure the a pagination table
**[Live Demo For Pagination](https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Pagination)** **[Live Demo For Pagination](https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Pagination)**
**[API&Props Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/pagination-props.html)**
----- -----
## Install ## Install
```sh ```sh
$ npm install react-bootstrap-table2-pagination --save $ npm install react-bootstrap-table2-paginator --save
``` ```
## Add CSS ## Add CSS

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table2-paginator", "name": "react-bootstrap-table2-paginator",
"version": "0.0.3", "version": "0.1.1",
"description": "it's the pagination addon for react-bootstrap-table2", "description": "it's the pagination addon for react-bootstrap-table2",
"main": "./lib/index.js", "main": "./lib/index.js",
"repository": { "repository": {
@@ -25,6 +25,11 @@
], ],
"author": "AllenFang", "author": "AllenFang",
"contributors": [ "contributors": [
{
"name": "Allen Fang",
"email": "ayu780129@hotmail.com",
"url": "https://github.com/AllenFang"
},
{ {
"name": "Chun-MingChen", "name": "Chun-MingChen",
"email": "nick830314@gmail.com", "email": "nick830314@gmail.com",

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-bootstrap-table-next", "name": "react-bootstrap-table-next",
"version": "0.0.3", "version": "0.1.2",
"description": "Next generation of react-bootstrap-table", "description": "Next generation of react-bootstrap-table",
"main": "./lib/index.js", "main": "./lib/index.js",
"repository": { "repository": {
@@ -24,6 +24,11 @@
], ],
"author": "AllenFang", "author": "AllenFang",
"contributors": [ "contributors": [
{
"name": "Allen Fang",
"email": "ayu780129@hotmail.com",
"url": "https://github.com/AllenFang"
},
{ {
"name": "Chun-MingChen", "name": "Chun-MingChen",
"email": "nick830314@gmail.com", "email": "nick830314@gmail.com",

View File

@@ -1,6 +1,6 @@
export default ExtendBase => export default ExtendBase =>
class ColumnResolver extends ExtendBase { class ColumnResolver extends ExtendBase {
visibleColumnSize() { visibleColumnSize() {
return this.props.columns.length; return this.props.columns.filter(c => !c.hidden).length;
} }
}; };

View File

@@ -13,12 +13,13 @@ export default class SelectionCell extends Component {
selected: PropTypes.bool, selected: PropTypes.bool,
onRowSelect: PropTypes.func, onRowSelect: PropTypes.func,
disabled: PropTypes.bool, disabled: PropTypes.bool,
rowIndex: PropTypes.number rowIndex: PropTypes.number,
clickToSelect: PropTypes.bool
} }
constructor() { constructor() {
super(); super();
this.handleRowClick = this.handleRowClick.bind(this); this.handleClick = this.handleClick.bind(this);
} }
shouldComponentUpdate(nextProps) { shouldComponentUpdate(nextProps) {
@@ -27,17 +28,19 @@ export default class SelectionCell extends Component {
return nextProps.selected !== selected; return nextProps.selected !== selected;
} }
handleRowClick() { handleClick() {
const { const {
mode: inputType, mode: inputType,
rowKey, rowKey,
selected, selected,
onRowSelect, onRowSelect,
disabled, disabled,
rowIndex rowIndex,
clickToSelect
} = this.props; } = this.props;
if (disabled) return; if (disabled) return;
if (clickToSelect) return;
const checked = inputType === Const.ROW_SELECT_SINGLE const checked = inputType === Const.ROW_SELECT_SINGLE
? true ? true
@@ -54,7 +57,7 @@ export default class SelectionCell extends Component {
} = this.props; } = this.props;
return ( return (
<td onClick={ this.handleRowClick }> <td onClick={ this.handleClick }>
<input <input
type={ inputType } type={ inputType }
checked={ selected } checked={ selected }

View File

@@ -1,4 +1,5 @@
/* eslint react/prop-types: 0 */ /* eslint react/prop-types: 0 */
/* eslint react/no-array-index-key: 0 */
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@@ -126,7 +127,7 @@ class Row extends Component {
} }
return ( return (
<EditingCell <EditingCell
key={ content } key={ `${content}-${index}` }
row={ row } row={ row }
column={ column } column={ column }
className={ editCellclasses } className={ editCellclasses }
@@ -137,7 +138,7 @@ class Row extends Component {
} }
return ( return (
<Cell <Cell
key={ content } key={ `${content}-${index}` }
row={ row } row={ row }
rowIndex={ rowIndex } rowIndex={ rowIndex }
columnIndex={ index } columnIndex={ index }

View File

@@ -34,12 +34,12 @@ describe('<SelectionCell />', () => {
}); });
}); });
describe('handleRowClick', () => { describe('handleClick', () => {
describe('when <input /> was been clicked', () => { describe('when <input /> was been clicked', () => {
const rowKey = 1; const rowKey = 1;
const selected = true; const selected = true;
let mockOnRowSelect; let mockOnRowSelect;
const spy = sinon.spy(SelectionCell.prototype, 'handleRowClick'); const spy = sinon.spy(SelectionCell.prototype, 'handleClick');
beforeEach(() => { beforeEach(() => {
mockOnRowSelect = sinon.stub(); mockOnRowSelect = sinon.stub();

219
yarn.lock
View File

@@ -1564,6 +1564,10 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000787" version "1.0.30000787"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000787.tgz#ca07a281be536a88bd7fac96ba895f3cf53f811b" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000787.tgz#ca07a281be536a88bd7fac96ba895f3cf53f811b"
capture-stack-trace@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d"
caseless@~0.11.0: caseless@~0.11.0:
version "0.11.0" version "0.11.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
@@ -1944,7 +1948,7 @@ conventional-changelog-atom@^0.1.2:
dependencies: dependencies:
q "^1.4.1" q "^1.4.1"
conventional-changelog-cli@^1.3.1: conventional-changelog-cli@^1.3.2:
version "1.3.5" version "1.3.5"
resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.5.tgz#46c51496216b7406588883defa6fac589e9bb31e" resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.5.tgz#46c51496216b7406588883defa6fac589e9bb31e"
dependencies: dependencies:
@@ -2064,7 +2068,7 @@ conventional-commits-parser@^2.1.0:
through2 "^2.0.0" through2 "^2.0.0"
trim-off-newlines "^1.0.0" trim-off-newlines "^1.0.0"
conventional-recommended-bump@^1.0.0: conventional-recommended-bump@^1.0.1:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.1.0.tgz#964d4fcc70fb5259d41fa9b39d3df6afdb87d253" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.1.0.tgz#964d4fcc70fb5259d41fa9b39d3df6afdb87d253"
dependencies: dependencies:
@@ -2118,6 +2122,12 @@ create-ecdh@^4.0.0:
bn.js "^4.1.0" bn.js "^4.1.0"
elliptic "^6.0.0" elliptic "^6.0.0"
create-error-class@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
dependencies:
capture-stack-trace "^1.0.0"
create-hash@^1.1.0, create-hash@^1.1.2: create-hash@^1.1.0, create-hash@^1.1.2:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
@@ -2589,6 +2599,10 @@ duplexer2@0.0.2:
dependencies: dependencies:
readable-stream "~1.1.9" readable-stream "~1.1.9"
duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
duplexer@^0.1.1: duplexer@^0.1.1:
version "0.1.1" version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
@@ -2718,7 +2732,7 @@ errno@^0.1.3, errno@^0.1.4:
dependencies: dependencies:
prr "~1.0.1" prr "~1.0.1"
error-ex@^1.2.0: error-ex@^1.2.0, error-ex@^1.3.1:
version "1.3.1" version "1.3.1"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
dependencies: dependencies:
@@ -3024,9 +3038,9 @@ exec-sh@^0.2.0:
dependencies: dependencies:
merge "^1.1.3" merge "^1.1.3"
execa@^0.6.3: execa@^0.7.0:
version "0.6.3" version "0.7.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
dependencies: dependencies:
cross-spawn "^5.0.1" cross-spawn "^5.0.1"
get-stream "^3.0.0" get-stream "^3.0.0"
@@ -3036,9 +3050,9 @@ execa@^0.6.3:
signal-exit "^3.0.0" signal-exit "^3.0.0"
strip-eof "^1.0.0" strip-eof "^1.0.0"
execa@^0.7.0: execa@^0.8.0:
version "0.7.0" version "0.8.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
dependencies: dependencies:
cross-spawn "^5.0.1" cross-spawn "^5.0.1"
get-stream "^3.0.0" get-stream "^3.0.0"
@@ -3422,12 +3436,12 @@ fresh@0.5.2:
version "0.5.2" version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
fs-extra@^3.0.1: fs-extra@^4.0.1:
version "3.0.1" version "4.0.3"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
dependencies: dependencies:
graceful-fs "^4.1.2" graceful-fs "^4.1.2"
jsonfile "^3.0.0" jsonfile "^4.0.0"
universalify "^0.1.0" universalify "^0.1.0"
fs-mkdirp-stream@^1.0.0: fs-mkdirp-stream@^1.0.0:
@@ -3528,7 +3542,7 @@ get-pkg-repo@^1.0.0:
parse-github-repo-url "^1.3.0" parse-github-repo-url "^1.3.0"
through2 "^2.0.0" through2 "^2.0.0"
get-port@^3.1.0: get-port@^3.2.0:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
@@ -3702,6 +3716,22 @@ glogg@^1.0.0:
dependencies: dependencies:
sparkles "^1.0.0" sparkles "^1.0.0"
got@^6.7.1:
version "6.7.1"
resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
dependencies:
create-error-class "^3.0.0"
duplexer3 "^0.1.4"
get-stream "^3.0.0"
is-redirect "^1.0.0"
is-retry-allowed "^1.0.0"
is-stream "^1.0.0"
lowercase-keys "^1.0.0"
safe-buffer "^5.0.1"
timed-out "^4.0.0"
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6:
version "4.1.11" version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
@@ -4002,7 +4032,7 @@ homedir-polyfill@^1.0.1:
dependencies: dependencies:
parse-passwd "^1.0.0" parse-passwd "^1.0.0"
hosted-git-info@^2.1.4: hosted-git-info@^2.1.4, hosted-git-info@^2.5.0:
version "2.5.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"
@@ -4183,7 +4213,7 @@ ini@^1.3.2, ini@^1.3.4, ini@~1.3.0:
version "1.3.5" version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
inquirer@^3.0.6: inquirer@^3.0.6, inquirer@^3.2.2:
version "3.3.0" version "3.3.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
dependencies: dependencies:
@@ -4458,6 +4488,10 @@ is-property@^1.0.0:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
is-redirect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
is-regex@^1.0.4: is-regex@^1.0.4:
version "1.0.4" version "1.0.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
@@ -4474,7 +4508,11 @@ is-resolvable@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.1.tgz#acca1cd36dbe44b974b924321555a70ba03b1cf4" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.1.tgz#acca1cd36dbe44b974b924321555a70ba03b1cf4"
is-stream@^1.0.1, is-stream@^1.1.0: is-retry-allowed@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
@@ -4919,6 +4957,10 @@ json-loader@^0.5.4:
version "0.5.7" version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"
json-parse-better-errors@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a"
json-schema-traverse@^0.3.0: json-schema-traverse@^0.3.0:
version "0.3.1" version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
@@ -4945,9 +4987,9 @@ json5@^0.5.0, json5@^0.5.1:
version "0.5.1" version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
jsonfile@^3.0.0: jsonfile@^4.0.0:
version "3.0.1" version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
@@ -5059,45 +5101,49 @@ lead@^1.0.0:
dependencies: dependencies:
flush-write-stream "^1.0.2" flush-write-stream "^1.0.2"
lerna@2.0.0: lerna@2.8.0:
version "2.0.0" version "2.8.0"
resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea" resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.8.0.tgz#309a816fca5c73ea38f9f20e314a836e99b54cf0"
dependencies: dependencies:
async "^1.5.0" async "^1.5.0"
chalk "^1.1.1" chalk "^2.1.0"
cmd-shim "^2.0.2" cmd-shim "^2.0.2"
columnify "^1.5.4" columnify "^1.5.4"
command-join "^2.0.0" command-join "^2.0.0"
conventional-changelog-cli "^1.3.1" conventional-changelog-cli "^1.3.2"
conventional-recommended-bump "^1.0.0" conventional-recommended-bump "^1.0.1"
dedent "^0.7.0" dedent "^0.7.0"
execa "^0.6.3" execa "^0.8.0"
find-up "^2.1.0" find-up "^2.1.0"
fs-extra "^3.0.1" fs-extra "^4.0.1"
get-port "^3.1.0" get-port "^3.2.0"
glob "^7.1.2" glob "^7.1.2"
glob-parent "^3.1.0"
globby "^6.1.0" globby "^6.1.0"
graceful-fs "^4.1.11" graceful-fs "^4.1.11"
inquirer "^3.0.6" hosted-git-info "^2.5.0"
inquirer "^3.2.2"
is-ci "^1.0.10" is-ci "^1.0.10"
load-json-file "^2.0.0" load-json-file "^4.0.0"
lodash "^4.17.4" lodash "^4.17.4"
minimatch "^3.0.4" minimatch "^3.0.4"
npmlog "^4.1.0" npmlog "^4.1.2"
p-finally "^1.0.0" p-finally "^1.0.0"
package-json "^4.0.1"
path-exists "^3.0.0" path-exists "^3.0.0"
read-cmd-shim "^1.0.1" read-cmd-shim "^1.0.1"
read-pkg "^2.0.0" read-pkg "^3.0.0"
rimraf "^2.6.1" rimraf "^2.6.1"
safe-buffer "^5.0.1" safe-buffer "^5.1.1"
semver "^5.1.0" semver "^5.4.1"
signal-exit "^3.0.2" signal-exit "^3.0.2"
slash "^1.0.0"
strong-log-transformer "^1.0.6" strong-log-transformer "^1.0.6"
temp-write "^3.3.0" temp-write "^3.3.0"
write-file-atomic "^2.1.0" write-file-atomic "^2.3.0"
write-json-file "^2.1.0" write-json-file "^2.2.0"
write-pkg "^3.0.1" write-pkg "^3.1.0"
yargs "^8.0.1" yargs "^8.0.2"
leven@^2.1.0: leven@^2.1.0:
version "2.1.0" version "2.1.0"
@@ -5142,6 +5188,15 @@ load-json-file@^2.0.0:
pify "^2.0.0" pify "^2.0.0"
strip-bom "^3.0.0" strip-bom "^3.0.0"
load-json-file@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
dependencies:
graceful-fs "^4.1.2"
parse-json "^4.0.0"
pify "^3.0.0"
strip-bom "^3.0.0"
loader-fs-cache@^1.0.0: loader-fs-cache@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc" resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc"
@@ -5350,6 +5405,10 @@ lower-case@^1.1.1:
version "1.1.4" version "1.1.4"
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
lowercase-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
lru-cache@^4.0.1: lru-cache@^4.0.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
@@ -5868,7 +5927,7 @@ npm-run-path@^2.0.0:
dependencies: dependencies:
path-key "^2.0.0" 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" version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
dependencies: dependencies:
@@ -6124,6 +6183,15 @@ p-try@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
package-json@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
dependencies:
got "^6.7.1"
registry-auth-token "^3.0.1"
registry-url "^3.0.3"
semver "^5.1.0"
pako@~1.0.5: pako@~1.0.5:
version "1.0.6" version "1.0.6"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"
@@ -6171,6 +6239,13 @@ parse-json@^2.2.0:
dependencies: dependencies:
error-ex "^1.2.0" error-ex "^1.2.0"
parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
dependencies:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
parse-passwd@^1.0.0: parse-passwd@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
@@ -6261,6 +6336,12 @@ path-type@^2.0.0:
dependencies: dependencies:
pify "^2.0.0" pify "^2.0.0"
path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
dependencies:
pify "^3.0.0"
pbkdf2@^3.0.3: pbkdf2@^3.0.3:
version "3.0.14" version "3.0.14"
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade"
@@ -6589,7 +6670,7 @@ prelude-ls@~1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
prepend-http@^1.0.0: prepend-http@^1.0.0, prepend-http@^1.0.1:
version "1.0.4" version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
@@ -6793,6 +6874,15 @@ raw-body@2.3.2:
iconv-lite "0.4.19" iconv-lite "0.4.19"
unpipe "1.0.0" unpipe "1.0.0"
rc@^1.0.1, rc@^1.1.6:
version "1.2.4"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.4.tgz#a0f606caae2a3b862bbd0ef85482c0125b315fa3"
dependencies:
deep-extend "~0.4.0"
ini "~1.3.0"
minimist "^1.2.0"
strip-json-comments "~2.0.1"
rc@^1.1.7: rc@^1.1.7:
version "1.2.2" version "1.2.2"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077"
@@ -6871,6 +6961,14 @@ read-pkg@^2.0.0:
normalize-package-data "^2.3.2" normalize-package-data "^2.3.2"
path-type "^2.0.0" path-type "^2.0.0"
read-pkg@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
dependencies:
load-json-file "^4.0.0"
normalize-package-data "^2.3.2"
path-type "^3.0.0"
readable-stream@1.0: readable-stream@1.0:
version "1.0.34" version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
@@ -6985,6 +7083,19 @@ regexpu-core@^2.0.0:
regjsgen "^0.2.0" regjsgen "^0.2.0"
regjsparser "^0.1.4" regjsparser "^0.1.4"
registry-auth-token@^3.0.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.1.tgz#fb0d3289ee0d9ada2cbb52af5dfe66cb070d3006"
dependencies:
rc "^1.1.6"
safe-buffer "^5.0.1"
registry-url@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942"
dependencies:
rc "^1.0.1"
regjsgen@^0.2.0: regjsgen@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
@@ -7324,6 +7435,10 @@ semver-greatest-satisfied-range@^1.0.0:
version "5.4.1" version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
semver@^5.4.1:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
semver@~5.3.0: semver@~5.3.0:
version "5.3.0" version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@@ -7961,6 +8076,10 @@ time-stamp@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357"
timed-out@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
timers-browserify@^2.0.4: timers-browserify@^2.0.4:
version "2.0.4" version "2.0.4"
resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6"
@@ -8203,6 +8322,10 @@ unset-value@^1.0.0:
has-value "^0.3.1" has-value "^0.3.1"
isobject "^3.0.0" isobject "^3.0.0"
unzip-response@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
upper-case@^1.1.1: upper-case@^1.1.1:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
@@ -8211,6 +8334,12 @@ urix@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
url-parse-lax@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
dependencies:
prepend-http "^1.0.1"
url-parse@1.0.x: url-parse@1.0.x:
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b"
@@ -8582,7 +8711,7 @@ wrappy@1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 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" version "2.3.0"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
dependencies: dependencies:
@@ -8590,7 +8719,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0:
imurmurhash "^0.1.4" imurmurhash "^0.1.4"
signal-exit "^3.0.2" 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.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f"
dependencies: dependencies:
@@ -8601,7 +8730,7 @@ write-json-file@^2.1.0, write-json-file@^2.2.0:
sort-keys "^2.0.0" sort-keys "^2.0.0"
write-file-atomic "^2.0.0" write-file-atomic "^2.0.0"
write-pkg@^3.0.1: write-pkg@^3.1.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9"
dependencies: dependencies:
@@ -8688,7 +8817,7 @@ yargs@^7.0.0, yargs@^7.0.2, yargs@^7.1.0:
y18n "^3.2.1" y18n "^3.2.1"
yargs-parser "^5.0.0" yargs-parser "^5.0.0"
yargs@^8.0.1, yargs@^8.0.2: yargs@^8.0.2:
version "8.0.2" version "8.0.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
dependencies: dependencies: