mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-06-29 13:40:07 +00:00
Compare commits
31 Commits
react-boot
...
react-boot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88234fead0 | ||
|
|
dea780519f | ||
|
|
38bb2290dc | ||
|
|
8bfbc14bd9 | ||
|
|
ee4eb8f2c6 | ||
|
|
8fa6389c81 | ||
|
|
9a354444d0 | ||
|
|
2533a63430 | ||
|
|
81e0080aa6 | ||
|
|
094a0682f1 | ||
|
|
3f2c6201d9 | ||
|
|
280c423298 | ||
|
|
fc813e80b6 | ||
|
|
4bb2ae2ba0 | ||
|
|
09fadeb02b | ||
|
|
283179ebe1 | ||
|
|
e83dd1bf07 | ||
|
|
760011ac03 | ||
|
|
067a94bea7 | ||
|
|
d8ecc6277b | ||
|
|
216befae4b | ||
|
|
3c9cd22d42 | ||
|
|
d84b614599 | ||
|
|
85f1eba7cb | ||
|
|
045ca4adb0 | ||
|
|
2263282629 | ||
|
|
a2d082babf | ||
|
|
79d5a51a39 | ||
|
|
51e0cc9129 | ||
|
|
659f2e2636 | ||
|
|
badce54b95 |
@@ -12,6 +12,7 @@ Additionally, asking questions and requesting new features are welcomed via [iss
|
||||
# Pull Requests
|
||||
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.
|
||||
* 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.
|
||||
|
||||
33
README.md
33
README.md
@@ -1,12 +1,41 @@
|
||||
# react-bootstrap-table2
|
||||
Rebuilt [react-bootstrap-table](https://github.com/AllenFang/react-bootstrap-table)
|
||||
|
||||
## Development
|
||||
Please check [development guide](./docs/development.md).
|
||||
> `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
|
||||
|
||||
`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
|
||||
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
|
||||
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
1
_config.yml
Normal file
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-cayman
|
||||
@@ -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:
|
||||
|
||||
* Text(`textFilter`)
|
||||
* Select(`selectFilter`)
|
||||
|
||||
We have a quick example to show you how to use `column.filter`:
|
||||
|
||||
|
||||
117
docs/migration.md
Normal file
117
docs/migration.md
Normal 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).
|
||||
@@ -24,6 +24,7 @@ const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`;
|
||||
|
||||
const STYLE_PKGS = [
|
||||
'react-bootstrap-table2',
|
||||
'react-bootstrap-table2-filter',
|
||||
'react-bootstrap-table2-paginator'
|
||||
].reduce((pkg, curr) => `${curr}|${pkg}`, '');
|
||||
|
||||
|
||||
20
package.json
20
package.json
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"description": "Rebuilt for react-bootstrap-table",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -20,11 +21,18 @@
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
},
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/react-bootstrap-table/react-bootstrap-table2/issues"
|
||||
@@ -60,7 +68,7 @@
|
||||
"jest": "20.0.4",
|
||||
"jsdom": "11.2.0",
|
||||
"jsdom-global": "3.0.2",
|
||||
"lerna": "2.0.0",
|
||||
"lerna": "2.8.0",
|
||||
"node-sass": "4.5.3",
|
||||
"react-test-renderer": "16.0.0",
|
||||
"sass-loader": "6.0.6",
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
**[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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-editor",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.1",
|
||||
"description": "it's the editor addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
@@ -28,6 +28,11 @@
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]]
|
||||
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]],
|
||||
"plugins": ["transform-class-properties"]
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
const path = require('path');
|
||||
|
||||
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2');
|
||||
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator');
|
||||
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay');
|
||||
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter');
|
||||
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor');
|
||||
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/index.js');
|
||||
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/index.js');
|
||||
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay/index.js');
|
||||
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter/index.js');
|
||||
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/index.js');
|
||||
const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/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 examplesPath = path.join(__dirname, '../examples');
|
||||
const srcPath = path.join(__dirname, '../src');
|
||||
@@ -33,15 +34,14 @@ const loaders = [{
|
||||
}, {
|
||||
test: /\.js?$/,
|
||||
use: ['babel-loader'],
|
||||
exclude: /node_modules/,
|
||||
include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath]
|
||||
exclude: /node_modules/
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader'],
|
||||
}, {
|
||||
test: /\.scss$/,
|
||||
use: ['style-loader', 'css-loader', 'sass-loader'],
|
||||
include: [storyPath, sourceStylePath, paginationStylePath],
|
||||
include: [storyPath, sourceStylePath, paginationStylePath, filterStylePath],
|
||||
}, {
|
||||
test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/,
|
||||
loader: 'url-loader?limit=100000',
|
||||
|
||||
@@ -18,6 +18,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
// omit...
|
||||
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -18,6 +18,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -18,6 +18,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -15,9 +15,12 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
// omit...
|
||||
|
||||
<BootstrapTable keyField='id' data={ [] } columns={ columns } noDataIndication="Table is Empty" />
|
||||
|
||||
// Following is more customizable example
|
||||
// Following is a more flexible example
|
||||
|
||||
function indication() {
|
||||
// return something here
|
||||
|
||||
@@ -18,6 +18,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
// omit...
|
||||
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -19,8 +19,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -23,8 +23,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -21,8 +21,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -27,8 +27,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -34,8 +34,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -21,8 +21,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -45,6 +46,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Only Product Price is bigger than 2101 is editable</h3>
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -20,8 +20,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -43,6 +44,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Click to edit cell</h3>
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -20,8 +20,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -48,6 +49,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Product Name is non editable</h3>
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -19,8 +19,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -42,6 +43,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Double click to edit cell</h3>
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -19,8 +19,9 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -45,6 +46,7 @@ const columns = [{
|
||||
`;
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Product ID: 0, 3 is non editable</h3>
|
||||
<BootstrapTable
|
||||
keyField="id"
|
||||
data={ products }
|
||||
|
||||
@@ -32,6 +32,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const owners = ['Allen', 'Bob', 'Cat'];
|
||||
|
||||
80
packages/react-bootstrap-table2-example/examples/column-filter/custom-select-filter.js
vendored
Normal file
80
packages/react-bootstrap-table2-example/examples/column-filter/custom-select-filter.js
vendored
Normal 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>
|
||||
);
|
||||
@@ -29,6 +29,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{
|
||||
|
||||
70
packages/react-bootstrap-table2-example/examples/column-filter/select-filter-default-value.js
vendored
Normal file
70
packages/react-bootstrap-table2-example/examples/column-filter/select-filter-default-value.js
vendored
Normal 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>
|
||||
);
|
||||
69
packages/react-bootstrap-table2-example/examples/column-filter/select-filter-like-comparator.js
vendored
Normal file
69
packages/react-bootstrap-table2-example/examples/column-filter/select-filter-like-comparator.js
vendored
Normal 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>
|
||||
);
|
||||
68
packages/react-bootstrap-table2-example/examples/column-filter/select-filter.js
vendored
Normal file
68
packages/react-bootstrap-table2-example/examples/column-filter/select-filter.js
vendored
Normal 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>
|
||||
);
|
||||
@@ -22,6 +22,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{
|
||||
|
||||
@@ -22,6 +22,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{
|
||||
|
||||
@@ -20,6 +20,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{
|
||||
|
||||
@@ -24,6 +24,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -21,6 +21,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
@@ -39,6 +41,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Try to hover on Product Name header column</h3>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -23,6 +23,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -31,6 +31,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
function priceFormatter(cell, row) {
|
||||
if (row.onSale) {
|
||||
return (
|
||||
|
||||
@@ -34,6 +34,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
function rankFormatter(cell, row, rowIndex, formatExtraData) {
|
||||
return (
|
||||
<i className={ formatExtraData[cell] } />
|
||||
|
||||
@@ -20,6 +20,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -33,6 +33,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -39,6 +39,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Try to hover on any Product Name cells</h3>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'User ID'
|
||||
|
||||
@@ -21,6 +21,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -21,6 +21,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -24,6 +24,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -23,6 +23,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -41,6 +41,7 @@ const defaultSorted = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
// ...
|
||||
function priceFormatter(column, colIndex, { sortElement, filterElement }) {
|
||||
|
||||
@@ -26,6 +26,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
function priceFormatter(column, colIndex) {
|
||||
return (
|
||||
<h5><strong>$$ { column.text } $$</strong></h5>
|
||||
|
||||
@@ -32,6 +32,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -21,6 +21,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -22,7 +22,7 @@ const columns = [{
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -23,7 +23,7 @@ const columns = [{
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -19,8 +19,10 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
// ...
|
||||
|
||||
const RemoteCellEdit = (props) => {
|
||||
const cellEdit = {
|
||||
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 {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@@ -23,6 +23,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
|
||||
const columns = [{
|
||||
@@ -38,7 +39,61 @@ const columns = [{
|
||||
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 => (
|
||||
|
||||
@@ -47,7 +47,7 @@ class Container extends React.Component {
|
||||
};
|
||||
}
|
||||
|
||||
handleTableChange = ({ page, sizePerPage }) => {
|
||||
handleTableChange = (type, { page, sizePerPage }) => {
|
||||
const currentIndex = (page - 1) * sizePerPage;
|
||||
setTimeout(() => {
|
||||
this.setState(() => ({
|
||||
|
||||
@@ -21,7 +21,7 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
@@ -36,7 +36,64 @@ const columns = [{
|
||||
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 => (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -23,11 +24,10 @@ const selectRow = {
|
||||
clickToEdit: true
|
||||
};
|
||||
|
||||
const cellEdit = {
|
||||
mode: 'click'
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import cellEditFactory from 'react-bootstrap-table2-editor';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -50,16 +50,23 @@ const cellEdit = {
|
||||
};
|
||||
|
||||
<BootstrapTable
|
||||
keyField='id'
|
||||
keyField="id"
|
||||
data={ products }
|
||||
columns={ columns }
|
||||
selectRow={ selectRow }
|
||||
cellEdit={ cellEditFactory({ mode: 'click' }) }
|
||||
/>
|
||||
`;
|
||||
|
||||
export default () => (
|
||||
<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>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -23,6 +23,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -25,6 +25,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -23,6 +23,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -24,6 +24,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -31,6 +31,8 @@ const selectRow2 = {
|
||||
};
|
||||
|
||||
const sourceCode1 = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -32,6 +32,8 @@ const selectRow2 = {
|
||||
};
|
||||
|
||||
const sourceCode1 = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -34,6 +34,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -34,6 +34,8 @@ const selectRow2 = {
|
||||
};
|
||||
|
||||
const sourceCode1 = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -23,6 +23,8 @@ const selectRow = {
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -20,6 +20,8 @@ const columns = [{
|
||||
const rowClasses1 = 'custom-row-class';
|
||||
|
||||
const sourceCode1 = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
/* eslint no-console: 0 */
|
||||
/* eslint no-alert: 0 */
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@@ -21,11 +21,13 @@ const columns = [{
|
||||
|
||||
const rowEvents = {
|
||||
onClick: (e) => {
|
||||
console.log('click on row');
|
||||
alert('click on row');
|
||||
}
|
||||
};
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
@@ -39,15 +41,16 @@ const columns = [{
|
||||
|
||||
const rowEvents = {
|
||||
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 () => (
|
||||
<div>
|
||||
<h3>Try to click on any rows</h3>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } rowEvents={ rowEvents } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,8 @@ const columns = [{
|
||||
const rowStyle1 = { backgroundColor: '#c8e6c9' };
|
||||
|
||||
const sourceCode1 = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID'
|
||||
|
||||
@@ -29,6 +29,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
@@ -54,6 +56,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Product ID sorting is reverted</h3>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,8 @@ const defaultSorted = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -20,6 +20,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
|
||||
@@ -31,6 +31,8 @@ const columns = [{
|
||||
}];
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const headerSortingClasses = (column, sortOrder, isLastSorting, colIndex) => (
|
||||
sortOrder === 'asc' ? 'demo-sorting-asc' : 'demo-sorting-desc'
|
||||
);
|
||||
|
||||
@@ -26,6 +26,8 @@ const columns = [{
|
||||
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
|
||||
const headerSortingStyle = { backgroundColor: '#c8e6c9' };
|
||||
|
||||
const columns = [{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-example",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
@@ -23,6 +23,7 @@
|
||||
"devDependencies": {
|
||||
"@storybook/addon-console": "^1.0.0",
|
||||
"@storybook/react": "^3.2.8",
|
||||
"babel-plugin-transform-class-properties": "6.24.1",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"react-redux": "^5.0.6",
|
||||
"redux": "^3.7.2",
|
||||
|
||||
@@ -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) =>
|
||||
Array.from({ length: quantity }, (value, index) => ({
|
||||
id: index,
|
||||
|
||||
@@ -39,6 +39,10 @@ import TextFilterWithDefaultValue from 'examples/column-filter/text-filter-defau
|
||||
import TextFilterComparator from 'examples/column-filter/text-filter-eq-comparator';
|
||||
import CustomTextFilter from 'examples/column-filter/custom-text-filter';
|
||||
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
|
||||
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 'stories/stylesheet/tomorrow.min.css';
|
||||
import 'stories/stylesheet/storybook.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/style/react-bootstrap-table2.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';
|
||||
|
||||
@@ -140,6 +145,10 @@ storiesOf('Column Filter', module)
|
||||
.add('Text Filter with Comparator', () => <TextFilterComparator />)
|
||||
.add('Custom Text Filter', () => <CustomTextFilter />)
|
||||
// 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 />);
|
||||
|
||||
storiesOf('Work on Rows', module)
|
||||
|
||||
@@ -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)**
|
||||
|
||||
**[API&Props Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/filter-props.html)**
|
||||
|
||||
-----
|
||||
|
||||
## 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:
|
||||
|
||||
* TextFilter
|
||||
* SelectFilter
|
||||
* **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
|
||||
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
|
||||
});
|
||||
|
||||
// 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...
|
||||
```
|
||||
@@ -1,4 +1,5 @@
|
||||
import TextFilter from './src/components/text';
|
||||
import SelectFilter from './src/components/select';
|
||||
import wrapperFactory from './src/wrapper';
|
||||
import * as Comparison from './src/comparison';
|
||||
|
||||
@@ -13,3 +14,8 @@ export const textFilter = (props = {}) => ({
|
||||
Filter: TextFilter,
|
||||
props
|
||||
});
|
||||
|
||||
export const selectFilter = (props = {}) => ({
|
||||
Filter: SelectFilter,
|
||||
props
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-filter",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.2",
|
||||
"description": "it's a column filter addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -25,6 +25,11 @@
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
|
||||
132
packages/react-bootstrap-table2-filter/src/components/select.js
vendored
Normal file
132
packages/react-bootstrap-table2-filter/src/components/select.js
vendored
Normal 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;
|
||||
@@ -1,5 +1,6 @@
|
||||
export const FILTER_TYPE = {
|
||||
TEXT: 'TEXT'
|
||||
TEXT: 'TEXT',
|
||||
SELECT: 'SELECT'
|
||||
};
|
||||
|
||||
export const FILTER_DELAY = 500;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { filters } from './filter';
|
||||
import { LIKE } from './comparison';
|
||||
import { LIKE, EQ } from './comparison';
|
||||
import { FILTER_TYPE } from './const';
|
||||
|
||||
export default (Base, {
|
||||
_,
|
||||
@@ -23,11 +24,14 @@ export default (Base, {
|
||||
|
||||
componentWillReceiveProps({ isDataChanged, store, columns }) {
|
||||
// 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 }));
|
||||
} else if (isDataChanged) {
|
||||
if (!(this.isRemoteFiltering() || this.isRemotePagination()) &&
|
||||
Object.keys(this.state.currFilters).length > 0) {
|
||||
if (!isRemoteFilter && Object.keys(this.state.currFilters).length > 0) {
|
||||
store.filteredData = filters(store, columns, _)(this.state.currFilters);
|
||||
}
|
||||
this.setState(() => ({ isDataChanged }));
|
||||
@@ -44,7 +48,8 @@ export default (Base, {
|
||||
if (!_.isDefined(filterVal) || filterVal === '') {
|
||||
delete currFilters[dataField];
|
||||
} 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 };
|
||||
}
|
||||
store.filters = currFilters;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -106,7 +106,7 @@ describe('Wrapper', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('when props.isDataChanged is true and remote is enable', () => {
|
||||
describe('when props.isDataChanged is true', () => {
|
||||
beforeEach(() => {
|
||||
nextProps = createTableProps({ isDataChanged: true });
|
||||
instance.componentWillReceiveProps(nextProps);
|
||||
@@ -118,13 +118,36 @@ describe('Wrapper', () => {
|
||||
});
|
||||
|
||||
describe('when props.store.filters is different from current state.currFilters', () => {
|
||||
const nextData = [];
|
||||
|
||||
beforeEach(() => {
|
||||
nextProps = createTableProps();
|
||||
nextProps.store.filters = { price: { filterVal: 20, filterType: FILTER_TYPE.TEXT } };
|
||||
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.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.currFilters).toBe(nextProps.store.filters);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-overlay",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.1",
|
||||
"description": "it's a loading overlay addons for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -25,6 +25,11 @@
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
|
||||
@@ -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)**
|
||||
|
||||
**[API&Props Definitation](https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/pagination-props.html)**
|
||||
|
||||
-----
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install react-bootstrap-table2-pagination --save
|
||||
$ npm install react-bootstrap-table2-paginator --save
|
||||
```
|
||||
|
||||
## Add CSS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-paginator",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.1",
|
||||
"description": "it's the pagination addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -25,6 +25,11 @@
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table-next",
|
||||
"version": "0.0.3",
|
||||
"version": "0.1.2",
|
||||
"description": "Next generation of react-bootstrap-table",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
@@ -24,6 +24,11 @@
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Allen Fang",
|
||||
"email": "ayu780129@hotmail.com",
|
||||
"url": "https://github.com/AllenFang"
|
||||
},
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default ExtendBase =>
|
||||
class ColumnResolver extends ExtendBase {
|
||||
visibleColumnSize() {
|
||||
return this.props.columns.length;
|
||||
return this.props.columns.filter(c => !c.hidden).length;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,12 +13,13 @@ export default class SelectionCell extends Component {
|
||||
selected: PropTypes.bool,
|
||||
onRowSelect: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
rowIndex: PropTypes.number
|
||||
rowIndex: PropTypes.number,
|
||||
clickToSelect: PropTypes.bool
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.handleRowClick = this.handleRowClick.bind(this);
|
||||
this.handleClick = this.handleClick.bind(this);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
@@ -27,17 +28,19 @@ export default class SelectionCell extends Component {
|
||||
return nextProps.selected !== selected;
|
||||
}
|
||||
|
||||
handleRowClick() {
|
||||
handleClick() {
|
||||
const {
|
||||
mode: inputType,
|
||||
rowKey,
|
||||
selected,
|
||||
onRowSelect,
|
||||
disabled,
|
||||
rowIndex
|
||||
rowIndex,
|
||||
clickToSelect
|
||||
} = this.props;
|
||||
|
||||
if (disabled) return;
|
||||
if (clickToSelect) return;
|
||||
|
||||
const checked = inputType === Const.ROW_SELECT_SINGLE
|
||||
? true
|
||||
@@ -54,7 +57,7 @@ export default class SelectionCell extends Component {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<td onClick={ this.handleRowClick }>
|
||||
<td onClick={ this.handleClick }>
|
||||
<input
|
||||
type={ inputType }
|
||||
checked={ selected }
|
||||
|
||||
5
packages/react-bootstrap-table2/src/row.js
vendored
5
packages/react-bootstrap-table2/src/row.js
vendored
@@ -1,4 +1,5 @@
|
||||
/* eslint react/prop-types: 0 */
|
||||
/* eslint react/no-array-index-key: 0 */
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -126,7 +127,7 @@ class Row extends Component {
|
||||
}
|
||||
return (
|
||||
<EditingCell
|
||||
key={ content }
|
||||
key={ `${content}-${index}` }
|
||||
row={ row }
|
||||
column={ column }
|
||||
className={ editCellclasses }
|
||||
@@ -137,7 +138,7 @@ class Row extends Component {
|
||||
}
|
||||
return (
|
||||
<Cell
|
||||
key={ content }
|
||||
key={ `${content}-${index}` }
|
||||
row={ row }
|
||||
rowIndex={ rowIndex }
|
||||
columnIndex={ index }
|
||||
|
||||
@@ -34,12 +34,12 @@ describe('<SelectionCell />', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleRowClick', () => {
|
||||
describe('handleClick', () => {
|
||||
describe('when <input /> was been clicked', () => {
|
||||
const rowKey = 1;
|
||||
const selected = true;
|
||||
let mockOnRowSelect;
|
||||
const spy = sinon.spy(SelectionCell.prototype, 'handleRowClick');
|
||||
const spy = sinon.spy(SelectionCell.prototype, 'handleClick');
|
||||
|
||||
beforeEach(() => {
|
||||
mockOnRowSelect = sinon.stub();
|
||||
|
||||
219
yarn.lock
219
yarn.lock
@@ -1564,6 +1564,10 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
||||
version "1.0.30000787"
|
||||
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:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
|
||||
@@ -1944,7 +1948,7 @@ conventional-changelog-atom@^0.1.2:
|
||||
dependencies:
|
||||
q "^1.4.1"
|
||||
|
||||
conventional-changelog-cli@^1.3.1:
|
||||
conventional-changelog-cli@^1.3.2:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.5.tgz#46c51496216b7406588883defa6fac589e9bb31e"
|
||||
dependencies:
|
||||
@@ -2064,7 +2068,7 @@ conventional-commits-parser@^2.1.0:
|
||||
through2 "^2.0.0"
|
||||
trim-off-newlines "^1.0.0"
|
||||
|
||||
conventional-recommended-bump@^1.0.0:
|
||||
conventional-recommended-bump@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.1.0.tgz#964d4fcc70fb5259d41fa9b39d3df6afdb87d253"
|
||||
dependencies:
|
||||
@@ -2118,6 +2122,12 @@ create-ecdh@^4.0.0:
|
||||
bn.js "^4.1.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:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
|
||||
@@ -2589,6 +2599,10 @@ duplexer2@0.0.2:
|
||||
dependencies:
|
||||
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:
|
||||
version "0.1.1"
|
||||
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:
|
||||
prr "~1.0.1"
|
||||
|
||||
error-ex@^1.2.0:
|
||||
error-ex@^1.2.0, error-ex@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
|
||||
dependencies:
|
||||
@@ -3024,9 +3038,9 @@ exec-sh@^0.2.0:
|
||||
dependencies:
|
||||
merge "^1.1.3"
|
||||
|
||||
execa@^0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe"
|
||||
execa@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||
dependencies:
|
||||
cross-spawn "^5.0.1"
|
||||
get-stream "^3.0.0"
|
||||
@@ -3036,9 +3050,9 @@ execa@^0.6.3:
|
||||
signal-exit "^3.0.0"
|
||||
strip-eof "^1.0.0"
|
||||
|
||||
execa@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||
execa@^0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
|
||||
dependencies:
|
||||
cross-spawn "^5.0.1"
|
||||
get-stream "^3.0.0"
|
||||
@@ -3422,12 +3436,12 @@ fresh@0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
||||
|
||||
fs-extra@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291"
|
||||
fs-extra@^4.0.1:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^3.0.0"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-mkdirp-stream@^1.0.0:
|
||||
@@ -3528,7 +3542,7 @@ get-pkg-repo@^1.0.0:
|
||||
parse-github-repo-url "^1.3.0"
|
||||
through2 "^2.0.0"
|
||||
|
||||
get-port@^3.1.0:
|
||||
get-port@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
|
||||
|
||||
@@ -3702,6 +3716,22 @@ glogg@^1.0.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||
@@ -4002,7 +4032,7 @@ homedir-polyfill@^1.0.1:
|
||||
dependencies:
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
|
||||
dependencies:
|
||||
@@ -4458,6 +4488,10 @@ is-property@^1.0.0:
|
||||
version "1.0.2"
|
||||
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:
|
||||
version "1.0.4"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
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:
|
||||
version "0.3.1"
|
||||
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"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
|
||||
|
||||
jsonfile@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
|
||||
jsonfile@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
@@ -5059,45 +5101,49 @@ lead@^1.0.0:
|
||||
dependencies:
|
||||
flush-write-stream "^1.0.2"
|
||||
|
||||
lerna@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea"
|
||||
lerna@2.8.0:
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.8.0.tgz#309a816fca5c73ea38f9f20e314a836e99b54cf0"
|
||||
dependencies:
|
||||
async "^1.5.0"
|
||||
chalk "^1.1.1"
|
||||
chalk "^2.1.0"
|
||||
cmd-shim "^2.0.2"
|
||||
columnify "^1.5.4"
|
||||
command-join "^2.0.0"
|
||||
conventional-changelog-cli "^1.3.1"
|
||||
conventional-recommended-bump "^1.0.0"
|
||||
conventional-changelog-cli "^1.3.2"
|
||||
conventional-recommended-bump "^1.0.1"
|
||||
dedent "^0.7.0"
|
||||
execa "^0.6.3"
|
||||
execa "^0.8.0"
|
||||
find-up "^2.1.0"
|
||||
fs-extra "^3.0.1"
|
||||
get-port "^3.1.0"
|
||||
fs-extra "^4.0.1"
|
||||
get-port "^3.2.0"
|
||||
glob "^7.1.2"
|
||||
glob-parent "^3.1.0"
|
||||
globby "^6.1.0"
|
||||
graceful-fs "^4.1.11"
|
||||
inquirer "^3.0.6"
|
||||
hosted-git-info "^2.5.0"
|
||||
inquirer "^3.2.2"
|
||||
is-ci "^1.0.10"
|
||||
load-json-file "^2.0.0"
|
||||
load-json-file "^4.0.0"
|
||||
lodash "^4.17.4"
|
||||
minimatch "^3.0.4"
|
||||
npmlog "^4.1.0"
|
||||
npmlog "^4.1.2"
|
||||
p-finally "^1.0.0"
|
||||
package-json "^4.0.1"
|
||||
path-exists "^3.0.0"
|
||||
read-cmd-shim "^1.0.1"
|
||||
read-pkg "^2.0.0"
|
||||
read-pkg "^3.0.0"
|
||||
rimraf "^2.6.1"
|
||||
safe-buffer "^5.0.1"
|
||||
semver "^5.1.0"
|
||||
safe-buffer "^5.1.1"
|
||||
semver "^5.4.1"
|
||||
signal-exit "^3.0.2"
|
||||
slash "^1.0.0"
|
||||
strong-log-transformer "^1.0.6"
|
||||
temp-write "^3.3.0"
|
||||
write-file-atomic "^2.1.0"
|
||||
write-json-file "^2.1.0"
|
||||
write-pkg "^3.0.1"
|
||||
yargs "^8.0.1"
|
||||
write-file-atomic "^2.3.0"
|
||||
write-json-file "^2.2.0"
|
||||
write-pkg "^3.1.0"
|
||||
yargs "^8.0.2"
|
||||
|
||||
leven@^2.1.0:
|
||||
version "2.1.0"
|
||||
@@ -5142,6 +5188,15 @@ load-json-file@^2.0.0:
|
||||
pify "^2.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:
|
||||
version "1.0.1"
|
||||
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"
|
||||
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:
|
||||
version "4.1.1"
|
||||
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:
|
||||
path-key "^2.0.0"
|
||||
|
||||
"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.0:
|
||||
"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
||||
dependencies:
|
||||
@@ -6124,6 +6183,15 @@ p-try@^1.0.0:
|
||||
version "1.0.0"
|
||||
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:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"
|
||||
@@ -6171,6 +6239,13 @@ parse-json@^2.2.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
|
||||
@@ -6261,6 +6336,12 @@ path-type@^2.0.0:
|
||||
dependencies:
|
||||
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:
|
||||
version "3.0.14"
|
||||
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"
|
||||
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"
|
||||
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"
|
||||
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:
|
||||
version "1.2.2"
|
||||
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"
|
||||
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:
|
||||
version "1.0.34"
|
||||
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"
|
||||
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:
|
||||
version "0.2.0"
|
||||
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"
|
||||
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:
|
||||
version "5.3.0"
|
||||
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"
|
||||
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:
|
||||
version "2.0.4"
|
||||
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"
|
||||
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:
|
||||
version "1.1.3"
|
||||
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"
|
||||
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:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b"
|
||||
@@ -8582,7 +8711,7 @@ wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
|
||||
write-file-atomic@^2.0.0, write-file-atomic@^2.1.0:
|
||||
write-file-atomic@^2.0.0, write-file-atomic@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
|
||||
dependencies:
|
||||
@@ -8590,7 +8719,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0:
|
||||
imurmurhash "^0.1.4"
|
||||
signal-exit "^3.0.2"
|
||||
|
||||
write-json-file@^2.1.0, write-json-file@^2.2.0:
|
||||
write-json-file@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f"
|
||||
dependencies:
|
||||
@@ -8601,7 +8730,7 @@ write-json-file@^2.1.0, write-json-file@^2.2.0:
|
||||
sort-keys "^2.0.0"
|
||||
write-file-atomic "^2.0.0"
|
||||
|
||||
write-pkg@^3.0.1:
|
||||
write-pkg@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9"
|
||||
dependencies:
|
||||
@@ -8688,7 +8817,7 @@ yargs@^7.0.0, yargs@^7.0.2, yargs@^7.1.0:
|
||||
y18n "^3.2.1"
|
||||
yargs-parser "^5.0.0"
|
||||
|
||||
yargs@^8.0.1, yargs@^8.0.2:
|
||||
yargs@^8.0.2:
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user