diff --git a/.eslintrc.js b/.eslintrc.js index 62859ad..fbb977f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,3 @@ module.exports = { - extends: 'react-tools' + extends: 'react-tools', } diff --git a/CHANGELOG.md b/CHANGELOG.md index 97184ce..10cbb84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,119 +1,149 @@ ## 6.7.5 + #### Fixes & Optimizations -- Now passes `column` to `getResizerProps` (#667) -- NOTE: `getResizerProps` is now only called if the column is resizable -- Fixes the `className` ordering in defaultProps for ThComponent (#673) -- NOTE: user supplied classNames now come at the end so they can extend the defaults + +* Now passes `column` to `getResizerProps` (#667) +* NOTE: `getResizerProps` is now only called if the column is resizable +* Fixes the `className` ordering in defaultProps for ThComponent (#673) +* NOTE: user supplied classNames now come at the end so they can extend the defaults ## 6.7.4 + #### Fixes & Optimizations -- Fix Prop types for columns + +* Fix Prop types for columns ## 6.7.3 + #### Fixes & Optimizations -- Fix the rest of the proptypes + +* Fix the rest of the proptypes ## 6.7.2 + #### Fixes & Optimizations -- `getPropTypes` proptype check + +* `getPropTypes` proptype check ## 6.7.1 + #### Fixes & Optimizations -- `eslint-config` moved to dev deps + +* `eslint-config` moved to dev deps ## 6.7.0 + ## 6.7.0-alpha-0 + #### New Features -- Expose page/pageSize to rows/cells -- Supply sort direction to custom sort methods + +* Expose page/pageSize to rows/cells +* Supply sort direction to custom sort methods #### Fixes & Optimizations -- README updates -- Linter cleanup -- Added PropTypes node module -- Deps, linting and style upgrades + +* README updates +* Linter cleanup +* Added PropTypes node module +* Deps, linting and style upgrades ## 6.6.0 -#### Fixes & Optimizations -- moved repo to react-tools -- Doc examples moved to codesandbox.io -- README updates -- CSS refacting for rt-tfoot to match rt-thead -- CSS more specific for input and select -## 6.5.3 #### Fixes & Optimizations -- `onClick` proxying and eslint + +* moved repo to react-tools +* Doc examples moved to codesandbox.io +* README updates +* CSS refacting for rt-tfoot to match rt-thead +* CSS more specific for input and select + +## 6.5.3 + +#### Fixes & Optimizations + +* `onClick` proxying and eslint ## 6.5.2 + #### New Features -- Provide onClick handleOriginal function - #406 + +* Provide onClick handleOriginal function - #406 #### Fixes & Optimizations -- README updates -- `makePathArray` in utils - #326 -- Various fixes: #294, #376, #398, #415, + +* README updates +* `makePathArray` in utils - #326 +* Various fixes: #294, #376, #398, #415, ## 6.5.1 + #### Fixes & Optimizations -- `defaultExpanded` now works correctly - #372 -- `column.getProps().rest` props are now applied correctly -- `makeTemplateComponent` now supports `displayName` - #289 + +* `defaultExpanded` now works correctly - #372 +* `column.getProps().rest` props are now applied correctly +* `makeTemplateComponent` now supports `displayName` - #289 ## 6.5.0 + ##### New Features -- `column.filterAll` - defaults to `false`, but when set to `true` will provide the entire array of rows to `filterMethod` as opposed to one row at a time. This allows for more fine-grained filtering using any method you can dream up. See the [Custom Filtering example](https://react-table.js.org/#/story/custom-filtering) for more info. + +* `column.filterAll` - defaults to `false`, but when set to `true` will provide the entire array of rows to `filterMethod` as opposed to one row at a time. This allows for more fine-grained filtering using any method you can dream up. See the [Custom Filtering example](https://react-table.js.org/#/story/custom-filtering) for more info. ## 6.4.0 + ##### New Features -- `PadRowComponent` - the content rendered inside of a padding row. Defaults to a react component that renders ` ` + +* `PadRowComponent` - the content rendered inside of a padding row. Defaults to a react component that renders ` ` ## 6.3.0 + ##### New Features -- `defaultSortDesc` - allows you to set the default sorting direction for all columns to descending. -- `column.defaultSortDesc` - allows you to set the default sorting direction for a specific column. Falls back to the global `defaultSortDesc` when not set at all. + +* `defaultSortDesc` - allows you to set the default sorting direction for all columns to descending. +* `column.defaultSortDesc` - allows you to set the default sorting direction for a specific column. Falls back to the global `defaultSortDesc` when not set at all. ## 6.0.0 ##### New Features -- New Renderers: - - `Aggregated` - Custom renderer for aggregated cells - - `Pivot` - Custom renderer for Pivoted Cells (utilizes `Expander` and `PivotValue`) - - `PivotValue` - Custom renderer for Pivot cell values (deprecates the undocumented `pivotRender` option) - - `Expander` - Custom renderer for Pivot cell Expander -- Added custom sorting methods per table via `defaultSortMethod` and per column via `column.sortMethod` -- Pivot columns are now visibly separate and sorted/filtered independently. -- Added `column.resizable` to override global table `resizable` option for specific columns. -- Added `column.sortable` to override global table `sortable` option for specific columns. -- Added `column.filterable` to override global table `filterable` option for specific columns. -- Added `defaultExpanded` table option. -- All callbacks can now be utilized without needing to hoist and manage the piece of state they export. That is what their prop counterparts are for, so now the corresponding prop is used instead of the callback to detect a "fully controlled" state. -- Prevent transitions while column resizing for a smoother resize effect. -- Disable text selection while resizing columns. +* New Renderers: + * `Aggregated` - Custom renderer for aggregated cells + * `Pivot` - Custom renderer for Pivoted Cells (utilizes `Expander` and `PivotValue`) + * `PivotValue` - Custom renderer for Pivot cell values (deprecates the undocumented `pivotRender` option) + * `Expander` - Custom renderer for Pivot cell Expander +* Added custom sorting methods per table via `defaultSortMethod` and per column via `column.sortMethod` +* Pivot columns are now visibly separate and sorted/filtered independently. +* Added `column.resizable` to override global table `resizable` option for specific columns. +* Added `column.sortable` to override global table `sortable` option for specific columns. +* Added `column.filterable` to override global table `filterable` option for specific columns. +* Added `defaultExpanded` table option. +* All callbacks can now be utilized without needing to hoist and manage the piece of state they export. That is what their prop counterparts are for, so now the corresponding prop is used instead of the callback to detect a "fully controlled" state. +* Prevent transitions while column resizing for a smoother resize effect. +* Disable text selection while resizing columns. ##### Breaking API Changes -- New Renderers: - - `Cell` - deprecates and replaces `render` - - `Header` - deprecates and replaces `header` - - `Footer` - deprecates and replaces `footer` - - `Filter`- deprecates and replaces `filterRender` -- Callbacks now provide the destination state as the primary parameter(s). This makes hoisting and controlling the state in redux or component state much easier. eg. - - `onSorting` no longer requires you to build your own toggle logic - - `onResize` no longer requires you to build your own resize logic -- Renamed `onChange` callback -> `onFetchData` which will always fire when a new data model needs to be fetched (or if not using `manual`, when new data is materialized internally). -- Renamed `filtering` -> `filtered` -- Renamed `sorting` -> `sorted` -- Renamed `expandedRows` -> `expanded` -- Renamed `resizing` -> `resized` -- Renamed `defaultResizing` -> `defaultResized` -- Renamed `defaultFiltering` -> `defaultFiltered` -- Renamed `defaultSorting` -> `defaultSorted` -- Renamed `onSortingChange` -> `onSortedChange` -- Renamed `onFilteringChange` -> `onFilteredChange` -- Renamed `onResize` -> `onResizedChange` -- Renamed `onExpandRow` -> `onExpandedChange` -- Renamed `showFilters` -> `filterable` -- Renamed `hideFilter` -> `filterable` (Column option. Note the true/false value is now flipped.) -- `cellInfo.row` and `rowInfo.row` now reference the materialize data for the table. To reference the original row, use `cellInfo.original` and `rowInfo.original` -- Removed `pivotRender` column option. You can now control how the value is displayed by overriding the `PivotValueComponent` or the individual column's `PivotValue` renderer. See [Pivoting Options Story](https://react-table.js.org/?selectedKind=2.%20Demos&selectedStory=Pivoting%20Options&full=0&down=1&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel) for a reference on how to customize pivot column rendering. + +* New Renderers: + * `Cell` - deprecates and replaces `render` + * `Header` - deprecates and replaces `header` + * `Footer` - deprecates and replaces `footer` + * `Filter`- deprecates and replaces `filterRender` +* Callbacks now provide the destination state as the primary parameter(s). This makes hoisting and controlling the state in redux or component state much easier. eg. + * `onSorting` no longer requires you to build your own toggle logic + * `onResize` no longer requires you to build your own resize logic +* Renamed `onChange` callback -> `onFetchData` which will always fire when a new data model needs to be fetched (or if not using `manual`, when new data is materialized internally). +* Renamed `filtering` -> `filtered` +* Renamed `sorting` -> `sorted` +* Renamed `expandedRows` -> `expanded` +* Renamed `resizing` -> `resized` +* Renamed `defaultResizing` -> `defaultResized` +* Renamed `defaultFiltering` -> `defaultFiltered` +* Renamed `defaultSorting` -> `defaultSorted` +* Renamed `onSortingChange` -> `onSortedChange` +* Renamed `onFilteringChange` -> `onFilteredChange` +* Renamed `onResize` -> `onResizedChange` +* Renamed `onExpandRow` -> `onExpandedChange` +* Renamed `showFilters` -> `filterable` +* Renamed `hideFilter` -> `filterable` (Column option. Note the true/false value is now flipped.) +* `cellInfo.row` and `rowInfo.row` now reference the materialize data for the table. To reference the original row, use `cellInfo.original` and `rowInfo.original` +* Removed `pivotRender` column option. You can now control how the value is displayed by overriding the `PivotValueComponent` or the individual column's `PivotValue` renderer. See [Pivoting Options Story](https://react-table.js.org/?selectedKind=2.%20Demos&selectedStory=Pivoting%20Options&full=0&down=1&left=1&panelRight=0&downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel) for a reference on how to customize pivot column rendering. diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index bd19e34..1979b80 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,14 +1,18 @@ ## What version of React-Table are you using? + Your bug may already be fixed in the latest release. Run `yarn upgrade react-table`! Place your version here... ## What bug are you experiencing, or what feature are you proposing? + Please include a detailed explanation here... ## Use https://codesandbox.io/s/X6npLXPRW (by clicking the "Fork" button) to reproduce the issue. + Then paste a link to your newly forked codesandbox here... ## What are the steps to reproduce the issue? -1. list the steps -2. to reproduce -3. the issue + +1. list the steps +2. to reproduce +3. the issue diff --git a/README.md b/README.md index a7916b3..56a5cca 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ # React Table + `react-table` is a **lightweight, fast and extendable datagrid** built for React @@ -28,49 +29,53 @@
## Features -- Lightweight at 11kb (and just 2kb more for styles) -- Fully customizable (JSX, templates, state, styles, callbacks) -- Client-side & Server-side pagination -- Multi-sort -- Filters -- Pivoting & Aggregation -- Minimal design & easily themeable -- Fully controllable via optional props and callbacks --
"Why I wrote React Table and the problems it has solved for Nozzle.io" by Tanner Linsley + +* Lightweight at 11kb (and just 2kb more for styles) +* Fully customizable (JSX, templates, state, styles, callbacks) +* Client-side & Server-side pagination +* Multi-sort +* Filters +* Pivoting & Aggregation +* Minimal design & easily themeable +* Fully controllable via optional props and callbacks +* "Why I wrote React Table and the problems it has solved for Nozzle.io" by Tanner Linsley ## [Demos and examples](http://react-table.js.org/#/story/simple-table) ## Versions -- This documentation is for version 6 of react-table. -- [View the Changelog](https://github.com/react-tools/react-table/blob/master/CHANGELOG.md) -- Previous versions: - - [5.x.x Readme](https://github.com/react-tools/react-table/blob/ad7d31cd3978eb45da7c6194dbab93c1e9a8594d/README.md) + +* This documentation is for version 6 of react-table. +* [View the Changelog](https://github.com/react-tools/react-table/blob/master/CHANGELOG.md) +* Previous versions: + * [5.x.x Readme](https://github.com/react-tools/react-table/blob/ad7d31cd3978eb45da7c6194dbab93c1e9a8594d/README.md) ## Table of Contents -- [Installation](#installation) -- [Example](#example) -- [Data](#data) -- [Props](#props) -- [Columns](#columns) -- [Column Header Groups](#column-header-groups) -- [Custom Cell and Header and Footer Rendering](#custom-cell-header-and-footer-rendering) -- [Styles](#styles) -- [Custom Props](#custom-props) -- [Pivoting and Aggregation](#pivoting-and-aggregation) -- [Sub Tables and Sub Components](#sub-tables-and-sub-components) -- [Server-side Data](#server-side-data) -- [Fully Controlled Component](#fully-controlled-component) -- [Functional Rendering](#functional-rendering) -- [Multi-Sort](#multi-sort) -- [Filtering](#filtering) -- [Component Overrides](#component-overrides) -- [Contributing](#contributing) -- [Scripts](#scripts) -- [Used By](#used-by) +* [Installation](#installation) +* [Example](#example) +* [Data](#data) +* [Props](#props) +* [Columns](#columns) +* [Column Header Groups](#column-header-groups) +* [Custom Cell and Header and Footer Rendering](#custom-cell-header-and-footer-rendering) +* [Styles](#styles) +* [Custom Props](#custom-props) +* [Pivoting and Aggregation](#pivoting-and-aggregation) +* [Sub Tables and Sub Components](#sub-tables-and-sub-components) +* [Server-side Data](#server-side-data) +* [Fully Controlled Component](#fully-controlled-component) +* [Functional Rendering](#functional-rendering) +* [Multi-Sort](#multi-sort) +* [Filtering](#filtering) +* [Component Overrides](#component-overrides) +* [Contributing](#contributing) +* [Scripts](#scripts) +* [Used By](#used-by) ## Installation -1. Install React Table as a dependency + +1. Install React Table as a dependency + ```bash # Yarn $ yarn add react-table @@ -78,21 +83,27 @@ $ yarn add react-table # NPM $ npm install react-table ``` -2. Import the `react-table` module + +2. Import the `react-table` module + ```javascript // ES6 -import ReactTable from 'react-table' +import ReactTable from "react-table"; // ES5 -var ReactTable = require('react-table').default +var ReactTable = require("react-table").default; ``` -3. Import styles by including `react-table.css` + +3. Import styles by including `react-table.css` + ```javascript // JS (Webpack) import 'react-table/react-table.css' // Old-school ``` + ##### CDN + ```html @@ -106,8 +117,8 @@ import 'react-table/react-table.css' ``` - ## Example + ```javascript import ReactTable from 'react-table' @@ -147,11 +158,13 @@ render() { ``` ## Data + Simply pass the `data` prop anything that resembles an array or object. Client-side sorting and pagination are built in, and your table will update gracefully as you change any props. [Server-side data](#server-side-data) is also supported! - ## Props + These are all of the available props (and their default values) for the main `` component. + ```javascript { // General @@ -323,13 +336,13 @@ These are all of the available props (and their default values) for the main `` requires a `columns` prop, which is an array of objects containing the following properties ```javascript @@ -412,23 +426,27 @@ Or just define them as props ``` ## Renderers + React Table supports very flexible renderers for just about everything: -- `Cell` - Renders a standard cell -- `Header` - Renders a column header or column group header -- `Footer` - Renders a column footer -- `Filter` - Renders a column's filter UI -- `Aggregated` - Renders an aggregated cell -- `Pivot` - Renders a pivoted cell (by default, will utilize `Expander` and `PivotValue` renderers) -- `PivotValue` - Renders the value inside a `Pivot` renderer -- `Expander` - Renders the Expander used in both the default `Pivot` renderer and any expander-designated column + +* `Cell` - Renders a standard cell +* `Header` - Renders a column header or column group header +* `Footer` - Renders a column footer +* `Filter` - Renders a column's filter UI +* `Aggregated` - Renders an aggregated cell +* `Pivot` - Renders a pivoted cell (by default, will utilize `Expander` and `PivotValue` renderers) +* `PivotValue` - Renders the value inside a `Pivot` renderer +* `Expander` - Renders the Expander used in both the default `Pivot` renderer and any expander-designated column Any of these renderers can be one of the following: -- A React Class -- JSX or any rendered react component -- Stateless functional component -- Function that returns any primitive + +* A React Class +* JSX or any rendered react component +* Stateless functional component +* Function that returns any primitive All of these formats receive the following props: + ```javascript { // Row-level props @@ -457,6 +475,7 @@ All of these formats receive the following props: ``` ## Accessors + Accessors are functions that return the value to populate the row's value for the column. This lets the render function not have to worry about accessing the correct data, the value is automatically populated in it's props. @@ -469,18 +488,19 @@ This array is then used as the path to the value to return. ("$" is the placeholder value that would be returned by the default accessor) | value | path | data | -|--------------|-----------------|------------------------| +| ------------ | --------------- | ---------------------- | | "a" | ["a"] | {"a": $} | | "a.b" | ["a", "b"] | {"a": {"b": $}} | | "a[0]" | ["a", "0"] | {"a": [$]} | | ["a.b", "c"] | ["a", "b", "c"] | {"a": {"b": {"c": $}}} | -*NOTE* +_NOTE_ If your data has a field/key with a dot (`.`) you will need to supply a custom accessor. - ## Column Header Groups + To group columns with another header column, just nest your columns in a header column. Header columns utilize the same header properties as regular columns. + ```javascript const columns = [{ Header: 'Favorites', @@ -499,66 +519,83 @@ const columns = [{ ``` ## Custom Cell, Header and Footer Rendering + You can use any react component or JSX to display content in column headers, cells and footers. Any component you use will be passed the following props (if available): -- `row` - Original row from your data -- `original` - The post-accessed values from the original row -- `index` - The index of the row -- `viewIndex` - the index of the row relative to the current page -- `level` - The nesting depth (zero-indexed) -- `nestingPath` - The nesting path of the row -- `aggregated` - A boolean stating if the row is an aggregation row -- `subRows` - An array of any expandable sub-rows contained in this row + +* `row` - Original row from your data +* `original` - The post-accessed values from the original row +* `index` - The index of the row +* `viewIndex` - the index of the row relative to the current page +* `level` - The nesting depth (zero-indexed) +* `nestingPath` - The nesting path of the row +* `aggregated` - A boolean stating if the row is an aggregation row +* `subRows` - An array of any expandable sub-rows contained in this row ```javascript // This column uses a stateless component to produce a different colored bar depending on the value // You can also use stateful components or any other function that returns JSX -const columns = [{ - Header: () => Progress, - accessor: 'progress', - Cell: row => ( -
+const columns = [ + { + Header: () => ( + + Progress + + ), + accessor: "progress", + Cell: row => (
66 ? '#85cc00' - : row.value > 33 ? '#ffbf00' - : '#ff2e00', - borderRadius: '2px', - transition: 'all .2s ease-out' + width: "100%", + height: "100%", + backgroundColor: "#dadada", + borderRadius: "2px" }} - /> -
- ) -}] + > +
66 + ? "#85cc00" + : row.value > 33 + ? "#ffbf00" + : "#ff2e00", + borderRadius: "2px", + transition: "all .2s ease-out" + }} + /> +
+ ) + } +]; ``` ## Styles -- React-table ships with a minimal and clean stylesheet to get you on your feet quickly. -- The stylesheet is located at `react-table/react-table.css`. -- There are countless ways to import a stylesheet. If you have questions on how to do so, consult the documentation of your build system. + +* React-table ships with a minimal and clean stylesheet to get you on your feet quickly. +* The stylesheet is located at `react-table/react-table.css`. +* There are countless ways to import a stylesheet. If you have questions on how to do so, consult the documentation of your build system. #### Classes -- Adding a `-striped` className to ReactTable will slightly color odd numbered rows for legibility -- Adding a `-highlight` className to ReactTable will highlight any row as you hover over it + +* Adding a `-striped` className to ReactTable will slightly color odd numbered rows for legibility +* Adding a `-highlight` className to ReactTable will highlight any row as you hover over it #### CSS + We think the default styles looks great! But, if you prefer a more custom look, all of the included styles are easily overridable. Every single component contains a unique class that makes it super easy to customize. Just go for it! #### JS Styles + Every single react-table element and `get[ComponentName]Props` callback supports `classname` and `style` props. ## Custom Props #### Built-in Components + Every single built-in component's props can be dynamically extended using any one of these prop-callbacks: + ```javascript { return { onClick: (e, handleOriginal) => { - console.log('A Td Element was clicked!') - console.log('it produced this event:', e) - console.log('It was in this column:', column) - console.log('It was in this row:', rowInfo) - console.log('It was in this table instance:', instance) + console.log("A Td Element was clicked!"); + console.log("it produced this event:", e); + console.log("It was in this column:", column); + console.log("It was in this row:", rowInfo); + console.log("It was in this table instance:", instance); // IMPORTANT! React-Table uses onClick internally to trigger // events like expanding SubComponents and pivots. @@ -608,32 +647,35 @@ This makes it extremely easy to add, say... a row click callback! // If you want to fire the original onClick handler, call the // 'handleOriginal' function. if (handleOriginal) { - handleOriginal() + handleOriginal(); } } - } + }; }} /> ``` You can use these callbacks for dynamic styling as well! + ```javascript // Any Tr element will be green if its (row.age > 20) { return { style: { - background: rowInfo.row.age > 20 ? 'green' : 'red' + background: rowInfo.row.age > 20 ? "green" : "red" } - } + }; }} /> ``` #### Column Components + Just as core components can have dynamic props, columns and column headers can too! You can utilize either of these prop callbacks on columns: + ```javascript const columns = [{ getHeaderProps: () => (...), @@ -642,22 +684,27 @@ const columns = [{ ``` In a similar fashion these can be used to dynamically style just about anything! + ```javascript // This columns cells will be red if (row.name === Santa Clause) -const columns = [{ - getProps: (state, rowInfo, column) => { - return { - style: { - background: rowInfo.row.name === 'Santa Clause' ? 'red' : null - } +const columns = [ + { + getProps: (state, rowInfo, column) => { + return { + style: { + background: rowInfo.row.name === "Santa Clause" ? "red" : null + } + }; } } -}] +]; ``` ## Pivoting and Aggregation + Pivoting the table will group records together based on their accessed values and allow the rows in that group to be expanded underneath it. To pivot, pass an array of `columnID`'s to `pivotBy`. Remember, a column's `id` is either the one that you assign it (when using a custom accessors) or its `accessor` string. + ```javascript _.round(_.mean(values)), - Aggregated: row => { - // You can even render the cell differently if it's an aggregated cell - return row.value (avg) +const columns = [ + { + Header: "Age", + accessor: "age", + aggregate: (values, rows) => _.round(_.mean(values)), + Aggregated: row => { + // You can even render the cell differently if it's an aggregated cell + return row.value (avg); + } + }, + { + Header: "Visits", + accessor: "visits", + aggregate: (values, rows) => _.sum(values) } -}, { - Header: 'Visits', - accessor: 'visits', - aggregate: (values, rows) => _.sum(values) -}] +]; ``` Pivoted columns can be sorted just like regular columns including holding down the `` button to multi-sort. ## Sub Tables and Sub Components + By adding a `SubComponent` props, you can easily add an expansion level to all root-level rows: + ```javascript { + SubComponent={row => { return (
- You can put any component you want here, even another React Table! You even have access to the row-level data if you need! Spark-charts, drill-throughs, infographics... the possibilities are endless! + You can put any component you want here, even another React Table! You + even have access to the row-level data if you need! Spark-charts, + drill-throughs, infographics... the possibilities are endless!
- ) + ); }} /> ``` - ## Server-side Data + If you want to handle pagination, sorting, and filtering on the server, `react-table` makes it easy on you. -1. Feed React Table `data` from somewhere dynamic. eg. `state`, a redux store, etc... -1. Add `manual` as a prop. This informs React Table that you'll be handling sorting and pagination server-side -1. Subscribe to the `onFetchData` prop. This function is called at `compomentDidMount` and any time sorting, pagination or filterting is changed in the table -1. In the `onFetchData` callback, request your data using the provided information in the params of the function (current state and instance) -1. Update your data with the rows to be displayed -1. Optionally set how many pages there are total +1. Feed React Table `data` from somewhere dynamic. eg. `state`, a redux store, etc... +1. Add `manual` as a prop. This informs React Table that you'll be handling sorting and pagination server-side +1. Subscribe to the `onFetchData` prop. This function is called at `compomentDidMount` and any time sorting, pagination or filterting is changed in the table +1. In the `onFetchData` callback, request your data using the provided information in the params of the function (current state and instance) +1. Update your data with the rows to be displayed +1. Optionally set how many pages there are total ```javascript async table mockup ## Fully Controlled Component -React Table by default works fantastically out of the box, but you can achieve even more control and customization if you choose to maintain the state yourself. It is very easy to do, even if you only want to manage *parts* of the state. + +React Table by default works fantastically out of the box, but you can achieve even more control and customization if you choose to maintain the state yourself. It is very easy to do, even if you only want to manage _parts_ of the state. Here are the props and their corresponding callbacks that control the state of the a table: + ```javascript `. The function you pass will be called with the following items: -- Fully-resolved state of the table -- A function that returns the standard table component -- The instance of the component + +* Fully-resolved state of the table +* A function that returns the standard table component +* The instance of the component You can then return any JSX or react you want! This turns out to be perfect for: -- Accessing the internal state of the table without a `ref` -- Decorating the table or extending it with your own UI -- Building your own custom display logic + +* Accessing the internal state of the table without a `ref` +* Decorating the table or extending it with your own UI +* Building your own custom display logic Accessing internal state and wrapping with more UI: + ```javascript - + {(state, makeTable, instance) => { return ( -
-
state.allVisibleColumns === {JSON.stringify(state.allVisibleColumns, null, 4)}
+
+
+          
+            state.allVisibleColumns ==={" "}
+            {JSON.stringify(state.allVisibleColumns, null, 4)}
+          
+        
{makeTable()}
- ) + ); }} ``` @@ -825,48 +890,55 @@ Accessing internal state and wrapping with more UI: The possibilities are endless! ## Sorting + Sorting comes built in with React-Table. -- Click a column header to sort by its accessor. -- Click it again to reverse the sort. -- Set `defaultSortDesc` property to `true` to make the first sort direction default to descending. -- Override a specific column's default sort direction by using the same `defaultSortDesc` property on a column, set to `true` + +* Click a column header to sort by its accessor. +* Click it again to reverse the sort. +* Set `defaultSortDesc` property to `true` to make the first sort direction default to descending. +* Override a specific column's default sort direction by using the same `defaultSortDesc` property on a column, set to `true` ## Multi-Sort + When clicking on a column header, hold shift to multi-sort! You can toggle `ascending` `descending` and `none` for multi-sort columns. Clicking on a header without holding shift will clear the multi-sort and replace it with the single sort of that column. It's quite handy! You can set the `multiSort` prop to `false` to disable this feature (which may be useful for server-side sorting when you are not going to sort multiple columns). ## Custom Sorting Algorithm + To override the default sorting algorithm for the whole table use the `defaultSortMethod` prop. To override the sorting algorithm for a single column, use the `sortMethod` column property. Supply a function that implements the native javascript [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) interface. This is React Table's default sorting algorithm: -- `a` the first value to compare -- `b` the second value to compare -- `desc` true if sort is descending, false if ascending + +* `a` the first value to compare +* `b` the second value to compare +* `desc` true if sort is descending, false if ascending + ```javascript defaultSortMethod = (a, b, desc) => { // force null and undefined to the bottom - a = (a === null || a === undefined) ? -Infinity : a - b = (b === null || b === undefined) ? -Infinity : b + a = a === null || a === undefined ? -Infinity : a; + b = b === null || b === undefined ? -Infinity : b; // force any string values to lowercase - a = typeof a === 'string' ? a.toLowerCase() : a - b = typeof b === 'string' ? b.toLowerCase() : b + a = typeof a === "string" ? a.toLowerCase() : a; + b = typeof b === "string" ? b.toLowerCase() : b; // Return either 1 or -1 to indicate a sort priority if (a > b) { - return 1 + return 1; } if (a < b) { - return -1 + return -1; } // returning 0 or undefined will use any subsequent column sorting methods or the row index as a tiebreaker - return 0 -} + return 0; +}; ``` ## Filtering + Filtering can be enabled by setting the `filterable` option on the table. If you don't want particular column to be filtered you can set the `filterable={false}` option on the column. @@ -884,7 +956,9 @@ To completely override the filter that is shown, you can set the `Filter` column See Custom Filtering demo for examples. ## Component Overrides + Though we confidently stand by the markup and architecture behind it, `react-table` does offer the ability to change the core componentry it uses to render everything. You can extend or override these internal components by passing a react component to it's corresponding prop on either the global props or on a one-off basis like so: + ```javascript // Change the global default import { ReactTableDefaults } from 'react-table' @@ -920,24 +994,24 @@ Object.assign(ReactTableDefaults, { If you choose to change the core components React-Table uses to render, you must make sure your replacement components consume and utilize all of the supplied and inherited props that are needed for that component to function properly. We would suggest investigating the source for the component you wish to replace. - ## Contributing + To suggest a feature, create an issue if it does not already exist. If you would like to help develop a suggested feature follow these steps: -- Fork this repo -- Install dependencies with `$ yarn` -- Auto-build files as you edit with `$ yarn run watch` -- Implement your changes to files in the `src/` directory -- Run the React Story locally with `$ yarn run docs` -- View changes as you edit `docs/src` -- Submit PR for review +* Fork this repo +* Install dependencies with `$ yarn` +* Auto-build files as you edit with `$ yarn run watch` +* Implement your changes to files in the `src/` directory +* Run the React Story locally with `$ yarn run docs` +* View changes as you edit `docs/src` +* Submit PR for review #### Scripts -- `$ yarn run watch` Watches files and builds via babel -- `$ yarn run docs` Runs the storybook server -- `$ yarn run test` Runs the test suite +* `$ yarn run watch` Watches files and builds via babel +* `$ yarn run docs` Runs the storybook server +* `$ yarn run test` Runs the test suite ## Used By diff --git a/docs/README.md b/docs/README.md index a520336..b2b01ab 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,83 +5,83 @@ You can find the most recent version of this guide [here](https://github.com/fac ## Table of Contents -- [Updating to New Releases](#updating-to-new-releases) -- [Sending Feedback](#sending-feedback) -- [Folder Structure](#folder-structure) -- [Available Scripts](#available-scripts) - - [npm start](#npm-start) - - [npm test](#npm-test) - - [npm run build](#npm-run-build) - - [npm run eject](#npm-run-eject) -- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) -- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) -- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) -- [Debugging in the Editor](#debugging-in-the-editor) -- [Changing the Page ``](#changing-the-page-title) -- [Installing a Dependency](#installing-a-dependency) -- [Importing a Component](#importing-a-component) -- [Adding a Stylesheet](#adding-a-stylesheet) -- [Post-Processing CSS](#post-processing-css) -- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) -- [Adding Images and Fonts](#adding-images-and-fonts) -- [Using the `public` Folder](#using-the-public-folder) - - [Changing the HTML](#changing-the-html) - - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) - - [When to Use the `public` Folder](#when-to-use-the-public-folder) -- [Using Global Variables](#using-global-variables) -- [Adding Bootstrap](#adding-bootstrap) - - [Using a Custom Theme](#using-a-custom-theme) -- [Adding Flow](#adding-flow) -- [Adding Custom Environment Variables](#adding-custom-environment-variables) - - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) - - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) - - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) -- [Can I Use Decorators?](#can-i-use-decorators) -- [Integrating with an API Backend](#integrating-with-an-api-backend) - - [Node](#node) - - [Ruby on Rails](#ruby-on-rails) -- [Proxying API Requests in Development](#proxying-api-requests-in-development) -- [Using HTTPS in Development](#using-https-in-development) -- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) -- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) -- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) -- [Running Tests](#running-tests) - - [Filename Conventions](#filename-conventions) - - [Command Line Interface](#command-line-interface) - - [Version Control Integration](#version-control-integration) - - [Writing Tests](#writing-tests) - - [Testing Components](#testing-components) - - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) - - [Initializing Test Environment](#initializing-test-environment) - - [Focusing and Excluding Tests](#focusing-and-excluding-tests) - - [Coverage Reporting](#coverage-reporting) - - [Continuous Integration](#continuous-integration) - - [Disabling jsdom](#disabling-jsdom) - - [Snapshot Testing](#snapshot-testing) - - [Editor Integration](#editor-integration) -- [Developing Components in Isolation](#developing-components-in-isolation) -- [Making a Progressive Web App](#making-a-progressive-web-app) -- [Deployment](#deployment) - - [Static Server](#static-server) - - [Other Solutions](#other-solutions) - - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) - - [Building for Relative Paths](#building-for-relative-paths) - - [Azure](#azure) - - [Firebase](#firebase) - - [GitHub Pages](#github-pages) - - [Heroku](#heroku) - - [Modulus](#modulus) - - [Netlify](#netlify) - - [Now](#now) - - [S3 and CloudFront](#s3-and-cloudfront) - - [Surge](#surge) -- [Advanced Configuration](#advanced-configuration) -- [Troubleshooting](#troubleshooting) - - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) - - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) - - [`npm run build` silently fails](#npm-run-build-silently-fails) - - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) -- [Something Missing?](#something-missing) +* [Updating to New Releases](#updating-to-new-releases) +* [Sending Feedback](#sending-feedback) +* [Folder Structure](#folder-structure) +* [Available Scripts](#available-scripts) + * [npm start](#npm-start) + * [npm test](#npm-test) + * [npm run build](#npm-run-build) + * [npm run eject](#npm-run-eject) +* [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) +* [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) +* [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) +* [Debugging in the Editor](#debugging-in-the-editor) +* [Changing the Page `<title>`](#changing-the-page-title) +* [Installing a Dependency](#installing-a-dependency) +* [Importing a Component](#importing-a-component) +* [Adding a Stylesheet](#adding-a-stylesheet) +* [Post-Processing CSS](#post-processing-css) +* [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) +* [Adding Images and Fonts](#adding-images-and-fonts) +* [Using the `public` Folder](#using-the-public-folder) + * [Changing the HTML](#changing-the-html) + * [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) + * [When to Use the `public` Folder](#when-to-use-the-public-folder) +* [Using Global Variables](#using-global-variables) +* [Adding Bootstrap](#adding-bootstrap) + * [Using a Custom Theme](#using-a-custom-theme) +* [Adding Flow](#adding-flow) +* [Adding Custom Environment Variables](#adding-custom-environment-variables) + * [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) + * [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) + * [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) +* [Can I Use Decorators?](#can-i-use-decorators) +* [Integrating with an API Backend](#integrating-with-an-api-backend) + * [Node](#node) + * [Ruby on Rails](#ruby-on-rails) +* [Proxying API Requests in Development](#proxying-api-requests-in-development) +* [Using HTTPS in Development](#using-https-in-development) +* [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) +* [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) +* [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) +* [Running Tests](#running-tests) + * [Filename Conventions](#filename-conventions) + * [Command Line Interface](#command-line-interface) + * [Version Control Integration](#version-control-integration) + * [Writing Tests](#writing-tests) + * [Testing Components](#testing-components) + * [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) + * [Initializing Test Environment](#initializing-test-environment) + * [Focusing and Excluding Tests](#focusing-and-excluding-tests) + * [Coverage Reporting](#coverage-reporting) + * [Continuous Integration](#continuous-integration) + * [Disabling jsdom](#disabling-jsdom) + * [Snapshot Testing](#snapshot-testing) + * [Editor Integration](#editor-integration) +* [Developing Components in Isolation](#developing-components-in-isolation) +* [Making a Progressive Web App](#making-a-progressive-web-app) +* [Deployment](#deployment) + * [Static Server](#static-server) + * [Other Solutions](#other-solutions) + * [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) + * [Building for Relative Paths](#building-for-relative-paths) + * [Azure](#azure) + * [Firebase](#firebase) + * [GitHub Pages](#github-pages) + * [Heroku](#heroku) + * [Modulus](#modulus) + * [Netlify](#netlify) + * [Now](#now) + * [S3 and CloudFront](#s3-and-cloudfront) + * [Surge](#surge) +* [Advanced Configuration](#advanced-configuration) +* [Troubleshooting](#troubleshooting) + * [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) + * [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) + * [`npm run build` silently fails](#npm-run-build-silently-fails) + * [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) +* [Something Missing?](#something-missing) ## Updating to New Releases @@ -207,7 +207,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ ## Displaying Lint Output in the Editor ->Note: this feature is available with `react-scripts@0.2.0` and higher. +> Note: this feature is available with `react-scripts@0.2.0` and higher. Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. @@ -215,24 +215,24 @@ They are not required for linting. You should see the linter output right in you You would need to install an ESLint plugin for your editor first. ->**A note for Atom `linter-eslint` users** +> **A note for Atom `linter-eslint` users** ->If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked: +> If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked: -><img src="http://i.imgur.com/yVNNHJM.png" width="300"> +> <img src="http://i.imgur.com/yVNNHJM.png" width="300"> +> **For Visual Studio Code users** ->**For Visual Studio Code users** +> VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create `eslintrc.json` at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line: ->VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create `eslintrc.json` at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line: - ->```js -{ - // ... - "extends": "react-app" -} -``` +> ```js +> { +> // ... +> "extends": "react-app" +> } +> ``` +```` Then add this block to the `package.json` file of your project: ```js @@ -242,9 +242,9 @@ Then add this block to the `package.json` file of your project: "extends": "react-app" } } -``` +```` -Finally, you will need to install some packages *globally*: +Finally, you will need to install some packages _globally_: ```sh npm install -g eslint-config-react-app@0.3.0 eslint@3.8.1 babel-eslint@7.0.0 eslint-plugin-react@6.4.1 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@4.0.0 eslint-plugin-flowtype@2.21.0 @@ -265,17 +265,19 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco ```json { "version": "0.2.0", - "configurations": [{ - "name": "Chrome", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3000", - "webRoot": "${workspaceRoot}/src", - "userDataDir": "${workspaceRoot}/.vscode/chrome", - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" + "configurations": [ + { + "name": "Chrome", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceRoot}/src", + "userDataDir": "${workspaceRoot}/.vscode/chrome", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } } - }] + ] } ``` @@ -309,7 +311,7 @@ For example: ### `Button.js` ```js -import React, { Component } from 'react'; +import React, { Component } from "react"; class Button extends Component { render() { @@ -322,10 +324,9 @@ export default Button; // Don’t forget to use export default! ### `DangerButton.js` - ```js -import React, { Component } from 'react'; -import Button from './Button'; // Import a component from another file +import React, { Component } from "react"; +import Button from "./Button"; // Import a component from another file class DangerButton extends Component { render() { @@ -363,8 +364,8 @@ This project setup uses [Webpack](https://webpack.github.io/) for handling all a ### `Button.js` ```js -import React, { Component } from 'react'; -import './Button.css'; // Tell Webpack that Button.js uses these styles +import React, { Component } from "react"; +import "./Button.css"; // Tell Webpack that Button.js uses these styles class Button extends Component { render() { @@ -403,11 +404,11 @@ becomes this: display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + -ms-flex-align: center; + align-items: center; } ``` @@ -436,7 +437,7 @@ Then in `package.json`, add the following lines to `scripts`: "test": "react-scripts test --env=jsdom", ``` ->Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. +> Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. @@ -477,8 +478,8 @@ You can **`import` an image right in a JavaScript module**. This tells Webpack t Here is an example: ```js -import React from 'react'; -import logo from './logo.png'; // Tell Webpack this JS file uses this image +import React from "react"; +import logo from "./logo.png"; // Tell Webpack this JS file uses this image console.log(logo); // /logo.84287d09.png @@ -509,7 +510,7 @@ An alternative way of handling static assets is described in the next section. ## Using the `public` Folder ->Note: this feature is available with `react-scripts@0.5.0` and higher. +> Note: this feature is available with `react-scripts@0.5.0` and higher. ### Changing the HTML @@ -530,7 +531,7 @@ This mechanism provides a number of benefits: However there is an **escape hatch** that you can use to add an asset outside of the module system. -If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. +If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. Inside `index.html`, you can use it like this: @@ -596,19 +597,19 @@ npm install react-bootstrap --save npm install bootstrap@3 --save ``` -Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: +Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your `src/index.js` file: ```js -import 'bootstrap/dist/css/bootstrap.css'; -import 'bootstrap/dist/css/bootstrap-theme.css'; +import "bootstrap/dist/css/bootstrap.css"; +import "bootstrap/dist/css/bootstrap-theme.css"; // Put any other imports below so that CSS from your // components takes precedence over default styles. ``` -Import required React Bootstrap components within ```src/App.js``` file or your custom component files: +Import required React Bootstrap components within `src/App.js` file or your custom component files: ```js -import { Navbar, Jumbotron, Button } from 'react-bootstrap'; +import { Navbar, Jumbotron, Button } from "react-bootstrap"; ``` Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. @@ -632,10 +633,10 @@ Recent versions of [Flow](http://flowtype.org/) work with Create React App proje To add Flow to a Create React App project, follow these steps: -1. Run `npm install --save-dev flow-bin` (or `yarn add --dev flow-bin`). -2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Run `npm run flow -- init` (or `yarn flow -- init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. -4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). +1. Run `npm install --save-dev flow-bin` (or `yarn add --dev flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow -- init` (or `yarn flow -- init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. @@ -645,7 +646,7 @@ To learn more about Flow, check out [its documentation](https://flowtype.org/). ## Adding Custom Environment Variables ->Note: this feature is available with `react-scripts@0.2.3` and higher. +> Note: this feature is available with `react-scripts@0.2.3` and higher. Your project can consume variables declared in your environment as if they were declared locally in your JS files. By default you will have `NODE_ENV` defined for you, and any other environment variables starting with @@ -653,7 +654,7 @@ default you will have `NODE_ENV` defined for you, and any other environment vari **The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. ->Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. +> Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. These environment variables will be defined for you on `process.env`. For example, having an environment variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. @@ -699,7 +700,7 @@ a `.env` file. Both of these ways are described in the next few sections. Having access to the `NODE_ENV` is also useful for performing actions conditionally: ```js -if (process.env.NODE_ENV !== 'production') { +if (process.env.NODE_ENV !== "production") { analytics.disable(); } ``` @@ -708,7 +709,7 @@ When you compile the app with `npm run build`, the minification step will strip ### Referencing Environment Variables in the HTML ->Note: this feature is available with `react-scripts@0.9.0` and higher. +> Note: this feature is available with `react-scripts@0.9.0` and higher. You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: @@ -742,7 +743,7 @@ REACT_APP_SECRET_CODE=abcdef npm start ### Adding Development Environment Variables In `.env` ->Note: this feature is available with `react-scripts@0.5.0` and higher. +> Note: this feature is available with `react-scripts@0.5.0` and higher. To define permanent environment variables, create a file called `.env` in the root of your project: @@ -753,8 +754,8 @@ REACT_APP_SECRET_CODE=abcdef These variables will act as the defaults if the machine does not explicitly set them.<br> Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. ->Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need -these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). +> Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need +> these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). ## Can I Use Decorators? @@ -779,6 +780,7 @@ These tutorials will help you to integrate your app with an API backend running using `fetch()` to access it. ### Node + Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). @@ -789,7 +791,7 @@ You can find the companion GitHub repository [here](https://github.com/fullstack ## Proxying API Requests in Development ->Note: this feature is available with `react-scripts@0.2.3` and higher. +> Note: this feature is available with `react-scripts@0.2.3` and higher. People often serve the front-end React app from the same host and port as their backend implementation.<br> For example, a production setup might look like this after the app is deployed: @@ -826,7 +828,7 @@ If the `proxy` option is **not** flexible enough for you, alternatively you can: ## Using HTTPS in Development ->Note: this feature is available with `react-scripts@0.4.0` and higher. +> Note: this feature is available with `react-scripts@0.4.0` and higher. You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. @@ -891,8 +893,7 @@ Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data ## Running Tests ->Note: this feature is available with `react-scripts@0.3.0` and higher.<br> ->[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) +> Note: this feature is available with `react-scripts@0.3.0` and higher.<br> >[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. @@ -937,9 +938,9 @@ To create tests, add `it()` (or `test()`) blocks with the name of the test and i Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: ```js -import sum from './sum'; +import sum from "./sum"; -it('sums numbers', () => { +it("sums numbers", () => { expect(sum(1, 2)).toEqual(3); expect(sum(2, 2)).toEqual(4); }); @@ -955,12 +956,12 @@ There is a broad spectrum of component testing techniques. They range from a “ Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: ```js -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; +import React from "react"; +import ReactDOM from "react-dom"; +import App from "./App"; -it('renders without crashing', () => { - const div = document.createElement('div'); +it("renders without crashing", () => { + const div = document.createElement("div"); ReactDOM.render(<App />, div); }); ``` @@ -976,11 +977,11 @@ npm install --save-dev enzyme react-addons-test-utils ``` ```js -import React from 'react'; -import { shallow } from 'enzyme'; -import App from './App'; +import React from "react"; +import { shallow } from "enzyme"; +import App from "./App"; -it('renders without crashing', () => { +it("renders without crashing", () => { shallow(<App />); }); ``` @@ -992,11 +993,11 @@ You can read the [Enzyme documentation](http://airbnb.io/enzyme/) for more testi Here is an example from Enzyme documentation that asserts specific output, rewritten to use Jest matchers: ```js -import React from 'react'; -import { shallow } from 'enzyme'; -import App from './App'; +import React from "react"; +import { shallow } from "enzyme"; +import App from "./App"; -it('renders welcome message', () => { +it("renders welcome message", () => { const wrapper = shallow(<App />); const welcome = <h2>Welcome to React</h2>; // expect(wrapper.contains(welcome)).to.equal(true); @@ -1010,7 +1011,7 @@ Nevertheless you can use a third-party assertion library like [Chai](http://chai Additionally, you might find [jest-enzyme](https://github.com/blainekasten/enzyme-matchers) helpful to simplify your tests with readable matchers. The above `contains` code can be written simpler with jest-enzyme. ```js -expect(wrapper).toContainReact(welcome) +expect(wrapper).toContainReact(welcome); ``` To setup jest-enzyme with Create React App, follow the instructions for [initializing your test environment](#initializing-test-environment) to import `jest-enzyme`. @@ -1021,10 +1022,9 @@ npm install --save-dev jest-enzyme ```js // src/setupTests.js -import 'jest-enzyme'; +import "jest-enzyme"; ``` - ### Using Third Party Assertion Libraries We recommend that you use `expect()` for assertions and `jest.fn()` for spies. If you are having issues with them please [file those against Jest](https://github.com/facebook/jest/issues/new), and we’ll fix them. We intend to keep making them better for React, supporting, for example, [pretty-printing React elements as JSX](https://github.com/facebook/jest/pull/1566). @@ -1032,28 +1032,29 @@ We recommend that you use `expect()` for assertions and `jest.fn()` for spies. I However, if you are used to other libraries, such as [Chai](http://chaijs.com/) and [Sinon](http://sinonjs.org/), or if you have existing code using them that you’d like to port over, you can import them normally like this: ```js -import sinon from 'sinon'; -import { expect } from 'chai'; +import sinon from "sinon"; +import { expect } from "chai"; ``` and then use them in your tests like you normally do. ### Initializing Test Environment ->Note: this feature is available with `react-scripts@0.4.0` and higher. +> Note: this feature is available with `react-scripts@0.4.0` and higher. If your app uses a browser API that you need to mock in your tests or if you just need a global setup before running your tests, add a `src/setupTests.js` to your project. It will be automatically executed before running your tests. For example: #### `src/setupTests.js` + ```js const localStorageMock = { getItem: jest.fn(), setItem: jest.fn(), clear: jest.fn() }; -global.localStorage = localStorageMock +global.localStorage = localStorageMock; ``` ### Focusing and Excluding Tests @@ -1079,10 +1080,12 @@ When creating a build of your application with `npm run build` linter warnings a Popular CI servers already set the environment variable `CI` by default but you can do this yourself too: ### On CI servers + #### Travis CI -1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page. -1. Add a `.travis.yml` file to your git repository. +1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page. +1. Add a `.travis.yml` file to your git repository. + ``` language: node_js node_js: @@ -1095,10 +1098,12 @@ script: - npm test - npm run build ``` -1. Trigger your first build with a git push. -1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed. + +1. Trigger your first build with a git push. +1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed. ### On your own environment + ##### Windows (cmd.exe) ```cmd @@ -1123,7 +1128,7 @@ CI=true npm run build The test command will force Jest to run tests once instead of launching the watcher. -> If you find yourself doing this often in development, please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new) to tell us about your use case because we want to make watcher the best experience and are open to changing how it works to accommodate more workflows. +> If you find yourself doing this often in development, please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new) to tell us about your use case because we want to make watcher the best experience and are open to changing how it works to accommodate more workflows. The build command will check for linter warnings and fail if any are found. @@ -1236,14 +1241,14 @@ You don’t necessarily need a static server in order to run a Create React App Here’s a programmatic example using [Node](https://nodejs.org/) and [Express](http://expressjs.com/): ```javascript -const express = require('express'); -const path = require('path'); +const express = require("express"); +const path = require("path"); const app = express(); -app.use(express.static('./build')); +app.use(express.static("./build")); -app.get('/', function (req, res) { - res.sendFile(path.join(__dirname, './build', 'index.html')); +app.get("/", function(req, res) { + res.sendFile(path.join(__dirname, "./build", "index.html")); }); app.listen(9000); @@ -1296,7 +1301,7 @@ This will let Create React App correctly infer the root path to use in the gener #### Serving the Same Build from Different Paths ->Note: this feature is available with `react-scripts@0.9.0` and higher. +> Note: this feature is available with `react-scripts@0.9.0` and higher. If you are not using the HTML5 `pushState` history API or not using client-side routing at all, it is unnecessary to specify the URL from which your app will be served. Instead, you can put this in your `package.json`: @@ -1373,7 +1378,7 @@ For more information see [Add Firebase to your JavaScript Project](https://fireb ### GitHub Pages ->Note: this feature is available with `react-scripts@0.2.0` and higher. +> Note: this feature is available with `react-scripts@0.2.0` and higher. #### Step 1: Add `homepage` to `package.json` @@ -1493,9 +1498,9 @@ Choose `build` as the path to deploy. With this setup Netlify will build and deploy when you push to git or open a pull request: -1. [Start a new netlify project](https://app.netlify.com/signup) -2. Pick your Git hosting service and select your repository -3. Click `Build your site` +1. [Start a new netlify project](https://app.netlify.com/signup) +2. Pick your Git hosting service and select your repository +3. Click `Build your site` **Support for client-side routing:** @@ -1511,22 +1516,22 @@ When you build the project, Create React App will place the `public` folder cont [now](https://zeit.co/now) offers a zero-configuration single-command deployment. -1. Install the `now` command-line tool either via the recommended [desktop tool](https://zeit.co/download) or via node with `npm install -g now`. +1. Install the `now` command-line tool either via the recommended [desktop tool](https://zeit.co/download) or via node with `npm install -g now`. -2. Install `serve` by running `npm install --save serve`. +2. Install `serve` by running `npm install --save serve`. + +3. Add this line to `scripts` in `package.json`: -3. Add this line to `scripts` in `package.json`: - ``` "now-start": "serve build/", ``` - -4. Run `now` from your project directory. You will see a **now.sh** URL in your output like this: - + +4. Run `now` from your project directory. You will see a **now.sh** URL in your output like this: + ``` > Ready! https://your-project-dirname-tpspyhtdtk.now.sh (copied to clipboard) ``` - + Paste that URL into your browser when the build is complete, and you will see your deployed app. Details are available in [this article.](https://zeit.co/blog/now-static) @@ -1537,7 +1542,7 @@ See this [blog post](https://medium.com/@omgwtfmarc/deploying-create-react-app-t ### Surge -Install the Surge CLI if you haven’t already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the *build* folder and your custom domain, and you are done. +Install the Surge CLI if you haven’t already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the _build_ folder and your custom domain, and you are done. ```sh email: email@domain.com @@ -1560,14 +1565,14 @@ Note that in order to support routers that use HTML5 `pushState` API, you may wa You can adjust various development and production settings by setting environment variables in your shell or with [.env](#adding-development-environment-variables-in-env). -Variable | Development | Production | Usage -:--- | :---: | :---: | :--- -BROWSER | :white_check_mark: | :x: | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. -HOST | :white_check_mark: | :x: | By default, the development web server binds to `localhost`. You may use this variable to specify a different host. -PORT | :white_check_mark: | :x: | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. -HTTPS | :white_check_mark: | :x: | When set to `true`, Create React App will run the development server in `https` mode. -PUBLIC_URL | :x: | :white_check_mark: | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. -CI | :large_orange_diamond: | :white_check_mark: | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. +| Variable | Development | Production | Usage | +| :--------- | :--------------------: | :----------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| BROWSER | :white_check_mark: | :x: | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. | +| HOST | :white_check_mark: | :x: | By default, the development web server binds to `localhost`. You may use this variable to specify a different host. | +| PORT | :white_check_mark: | :x: | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. | +| HTTPS | :white_check_mark: | :x: | When set to `true`, Create React App will run the development server in `https` mode. | +| PUBLIC_URL | :x: | :white_check_mark: | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. | +| CI | :large_orange_diamond: | :white_check_mark: | When set to `true`, Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. | ## Troubleshooting @@ -1607,7 +1612,7 @@ You can find [other installation methods](https://facebook.github.io/watchman/do If this still doesn’t help, try running `launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist`. -There are also reports that *uninstalling* Watchman fixes the issue. So if nothing else helps, remove it from your system and try again. +There are also reports that _uninstalling_ Watchman fixes the issue. So if nothing else helps, remove it from your system and try again. ### `npm run build` silently fails diff --git a/docs/src/App.js b/docs/src/App.js index 55afe16..d788f8a 100644 --- a/docs/src/App.js +++ b/docs/src/App.js @@ -1,116 +1,117 @@ /* eslint-disable */ -import React from 'react' +import React from "react"; // -import ReactStory, { defaultProps } from 'react-story' -import CodeSandbox from './CodeSandbox.js' -import './stories/utils/prism.css' -import '../../react-table.css' +import ReactStory, { defaultProps } from "react-story"; +import CodeSandbox from "./CodeSandbox.js"; +import "./stories/utils/prism.css"; +import "../../react-table.css"; -import Readme from './stories/Readme.js' -import HOCReadme from './stories/HOCReadme.js' +import Readme from "./stories/Readme.js"; +import HOCReadme from "./stories/HOCReadme.js"; // import Test from './stories/test.js' // import Tester from './examples/expander'; const stories = [ - { name: 'Readme', component: Readme }, - { name: 'HOC Readme', component: HOCReadme }, - + { name: "Readme", component: Readme }, + { name: "HOC Readme", component: HOCReadme }, + // { name: 'Tester', component: Test }, - { name: 'Simple Table', component: CodeSandbox('X6npLXPRW') }, + { name: "Simple Table", component: CodeSandbox("X6npLXPRW") }, { - name: 'Cell Renderers & Custom Components', - component: CodeSandbox('OyRL04Z4Y'), + name: "Cell Renderers & Custom Components", + component: CodeSandbox("OyRL04Z4Y") }, - { name: 'Default Sorting', component: CodeSandbox('gLwmmjzA3') }, + { name: "Default Sorting", component: CodeSandbox("gLwmmjzA3") }, { - name: 'Custom Sorting', - component: CodeSandbox('VGx67J35'), + name: "Custom Sorting", + component: CodeSandbox("VGx67J35") }, - { name: 'Custom Column Widths', component: CodeSandbox('o2OORXNXN') }, - { name: 'Custom Component Props', component: CodeSandbox('nZW3L0wp4') }, - { name: 'Server-side Data', component: CodeSandbox('wjrn8wy3R') }, - { name: 'Sub Components', component: CodeSandbox('n2gqAxl7') }, - { name: 'Pivoting & Aggregation', component: CodeSandbox('oNY9z8xN') }, + { name: "Custom Column Widths", component: CodeSandbox("o2OORXNXN") }, + { name: "Custom Component Props", component: CodeSandbox("nZW3L0wp4") }, + { name: "Server-side Data", component: CodeSandbox("wjrn8wy3R") }, + { name: "Sub Components", component: CodeSandbox("n2gqAxl7") }, + { name: "Pivoting & Aggregation", component: CodeSandbox("oNY9z8xN") }, { - name: 'Pivoting & Aggregation w/ Sub Components', - component: CodeSandbox('p0kEVBgQ'), + name: "Pivoting & Aggregation w/ Sub Components", + component: CodeSandbox("p0kEVBgQ") }, { - name: '100k Rows w/ Pivoting & Sub Components', - component: CodeSandbox('DRmKj0XyK'), + name: "100k Rows w/ Pivoting & Sub Components", + component: CodeSandbox("DRmKj0XyK") }, - { name: 'Pivoting Options', component: CodeSandbox('kZKmNBK6r') }, - { name: 'Functional Rendering', component: CodeSandbox('VPZ0Bzv8X') }, + { name: "Pivoting Options", component: CodeSandbox("kZKmNBK6r") }, + { name: "Functional Rendering", component: CodeSandbox("VPZ0Bzv8X") }, { - name: 'Custom Expander Position', - component: CodeSandbox('1jj2XrPEV'), + name: "Custom Expander Position", + component: CodeSandbox("1jj2XrPEV") }, - { name: 'Custom "No Data" Text', component: CodeSandbox('RgRpRDv80') }, - { name: 'Footers', component: CodeSandbox('KOqQXn3p8') }, - { name: 'Custom Filtering', component: CodeSandbox('5Eyxxxyx') }, - { name: 'Controlled Component', component: CodeSandbox('r7XEZRK2') }, - { name: 'Editable Table', component: CodeSandbox('n5r19gzQP') }, + { name: 'Custom "No Data" Text', component: CodeSandbox("RgRpRDv80") }, + { name: "Footers", component: CodeSandbox("KOqQXn3p8") }, + { name: "Custom Filtering", component: CodeSandbox("5Eyxxxyx") }, + { name: "Controlled Component", component: CodeSandbox("r7XEZRK2") }, + { name: "Editable Table", component: CodeSandbox("n5r19gzQP") }, { - name: 'Fixed Header w/ Vertical Scroll', - component: CodeSandbox('7LY0gjA8O'), + name: "Fixed Header w/ Vertical Scroll", + component: CodeSandbox("7LY0gjA8O") }, { - name: 'Multiple Pagers (Top and Bottom)', - component: CodeSandbox('VEZ8OgvX'), + name: "Multiple Pagers (Top and Bottom)", + component: CodeSandbox("VEZ8OgvX") }, - { name: 'Tree Table (HOC)', component: CodeSandbox('lxmr4wynzq') }, - { name: 'Select Table (HOC)', component: CodeSandbox('7yq5ylw09j') }, - { name: 'Select Tree Table (HOC)', component: CodeSandbox('2p7jp4klwp') }, -] + { name: "Tree Table (HOC)", component: CodeSandbox("lxmr4wynzq") }, + { name: "Select Table (HOC)", component: CodeSandbox("7yq5ylw09j") }, + { name: "Select Tree Table (HOC)", component: CodeSandbox("2p7jp4klwp") } +]; export default class App extends React.Component { - render () { + render() { return ( <ReactStory style={{ - display: 'block', - width: '100%', - height: '100%', + display: "block", + width: "100%", + height: "100%" }} - pathPrefix='story/' - StoryWrapper={props => + pathPrefix="story/" + StoryWrapper={props => ( <defaultProps.StoryWrapper css={{ padding: 0, - display: 'flex', - flexDirection: 'column', + display: "flex", + flexDirection: "column" }} > <a - href='//github.com/react-tools/react-table' + href="//github.com/react-tools/react-table" style={{ - display: 'block', - textAlign: 'center', - borderBottom: 'solid 3px #cccccc', + display: "block", + textAlign: "center", + borderBottom: "solid 3px #cccccc" }} > <img - src='https://github.com/react-tools/media/raw/master/logo-react-table.png' - alt='React Table Logo' + src="https://github.com/react-tools/media/raw/master/logo-react-table.png" + alt="React Table Logo" style={{ - width: '150px', - padding: '10px', + width: "150px", + padding: "10px" }} /> </a> <div {...props} style={{ - flex: '1 0 auto', - position: 'relative', + flex: "1 0 auto", + position: "relative" }} /> - </defaultProps.StoryWrapper>} + </defaultProps.StoryWrapper> + )} stories={stories} /> - ) + ); } } diff --git a/docs/src/CodeSandbox.js b/docs/src/CodeSandbox.js index d540eae..63c37fb 100644 --- a/docs/src/CodeSandbox.js +++ b/docs/src/CodeSandbox.js @@ -1,22 +1,21 @@ -import React from 'react' +import React from "react"; export default id => () => { return ( <iframe - src={`https://codesandbox.io/embed/${id}?autoresize=1&hidenavigation=1&view=${global.innerWidth < - 1000 - ? 'preview' - : 'split'}`} + src={`https://codesandbox.io/embed/${id}?autoresize=1&hidenavigation=1&view=${ + global.innerWidth < 1000 ? "preview" : "split" + }`} style={{ - position: 'absolute', + position: "absolute", top: 0, left: 0, width: `100%`, height: `100%`, border: 0, - overflow: `hidden`, + overflow: `hidden` }} - sandbox='allow-modals allow-forms allow-popups allow-scripts allow-same-origin' + sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin" /> - ) -} + ); +}; diff --git a/docs/src/examples/checkbox/checkboxHOC.js b/docs/src/examples/checkbox/checkboxHOC.js index 0dd0091..a38d99f 100644 --- a/docs/src/examples/checkbox/checkboxHOC.js +++ b/docs/src/examples/checkbox/checkboxHOC.js @@ -1,88 +1,94 @@ +import React from "react"; - -import React from 'react'; - -export default (Component) => { - +export default Component => { const wrapper = class RTCheckboxTable extends React.Component { // we only need a Component so we can get the 'ref' - pure components can't get a 'ref' - rowSelector = (row) => - { - if(!row || !row.hasOwnProperty(this.props.keyField)) return null; + rowSelector = row => { + if (!row || !row.hasOwnProperty(this.props.keyField)) return null; const checked = this.props.isSelected(row[this.props.keyField]); return ( - <input - type='checkbox' - checked={checked} - onClick={(e)=>{ + <input + type="checkbox" + checked={checked} + onClick={e => { const { shiftKey } = e; e.stopPropagation(); - this.props.toggleSelection(row[this.props.keyField],shiftKey,row); - }} - onChange={()=>{}} - value='' + this.props.toggleSelection(row[this.props.keyField], shiftKey, row); + }} + onChange={() => {}} + value="" /> ); - } + }; - headSelector = (row) => - { + headSelector = row => { const checked = this.props.selectAll; return ( - <input - type='checkbox' - checked={checked} - onClick={(e)=>{ + <input + type="checkbox" + checked={checked} + onClick={e => { e.stopPropagation(); this.props.toggleAll(); - }} - onChange={()=>{}} - value='' + }} + onChange={() => {}} + value="" /> ); - } - - // this is so we can expose the underlying ReactTable to get at the sortedData for selectAll - getWrappedInstance = ()=>this.wrappedInstance + }; - render() - { - const { columns:originalCols, isSelected, toggleSelection, toggleAll, keyField, selectAll, ...rest } = this.props; - const { rowSelector, headSelector, } = this; + // this is so we can expose the underlying ReactTable to get at the sortedData for selectAll + getWrappedInstance = () => this.wrappedInstance; + + render() { + const { + columns: originalCols, + isSelected, + toggleSelection, + toggleAll, + keyField, + selectAll, + ...rest + } = this.props; + const { rowSelector, headSelector } = this; const select = { - id: '_selector', - accessor: ()=>'x', // this value is not important + id: "_selector", + accessor: () => "x", // this value is not important Header: headSelector, - Cell: (ci) => { return rowSelector(ci.original); }, + Cell: ci => { + return rowSelector(ci.original); + }, width: 30, filterable: false, sortable: false, resizable: false, - style: { textAlign: 'center' }, - } - const columns = [ - select, - ...originalCols, - ]; + style: { textAlign: "center" } + }; + const columns = [select, ...originalCols]; const extra = { - columns, + columns }; return ( - <Component {...rest} {...extra} ref={(r)=>this.wrappedInstance=r}/> - ) + <Component {...rest} {...extra} ref={r => (this.wrappedInstance = r)} /> + ); } - } + }; - wrapper.displayName = 'RTCheckboxTable'; - wrapper.defaultProps = - { - keyField: '_id', - isSelected: (key)=>{ console.log('No isSelected handler provided:',{key})}, + wrapper.displayName = "RTCheckboxTable"; + wrapper.defaultProps = { + keyField: "_id", + isSelected: key => { + console.log("No isSelected handler provided:", { key }); + }, selectAll: false, - toggleSelection: (key, shift, row)=>{ console.log('No toggleSelection handler provided:', { key, shift, row }) }, - toggleAll: () => { console.log('No toggleAll handler provided.') }, - } - + toggleSelection: (key, shift, row) => { + console.log("No toggleSelection handler provided:", { key, shift, row }); + }, + toggleAll: () => { + console.log("No toggleAll handler provided."); + } + }; + return wrapper; -} +}; diff --git a/docs/src/examples/checkbox/index.js b/docs/src/examples/checkbox/index.js index 428fd4d..cf90bbe 100644 --- a/docs/src/examples/checkbox/index.js +++ b/docs/src/examples/checkbox/index.js @@ -1,38 +1,34 @@ +import React from "react"; +import shortid from "shortid"; -import React from 'react'; -import shortid from 'shortid'; +import ReactTable from "../../../../lib/index"; +import "../../../../react-table.css"; -import ReactTable from '../../../../lib/index' -import '../../../../react-table.css' - -import checkboxTableHOC from './checkboxHOC'; +import checkboxTableHOC from "./checkboxHOC"; const CheckboxTable = checkboxTableHOC(ReactTable); -async function getData() -{ - const result = await ( await fetch('/au_500_tree.json') ).json(); +async function getData() { + const result = await (await fetch("/au_500_tree.json")).json(); // we are adding a unique ID to the data for tracking the selected records - return result.map((item)=>{ + return result.map(item => { const _id = shortid.generate(); return { _id, - ...item, - } + ...item + }; }); } -function getColumns(data) -{ +function getColumns(data) { const columns = []; const sample = data[0]; - for(let key in sample) - { - if(key==='_id') continue; + for (let key in sample) { + if (key === "_id") continue; columns.push({ accessor: key, - Header: key, - }) + Header: key + }); } return columns; } @@ -40,46 +36,42 @@ function getColumns(data) export class ComponentTest extends React.Component { constructor(props) { super(props); - this.state = - { + this.state = { data: null, columns: null, selection: [], - selectAll: false, + selectAll: false }; } - componentDidMount() - { - getData().then((data)=>{ + componentDidMount() { + getData().then(data => { const columns = getColumns(data); this.setState({ data, columns }); }); } - toggleSelection = (key,shift,row) => { + toggleSelection = (key, shift, row) => { /* Implementation of how to manage the selection state is up to the developer. This implementation uses an array stored in the component state. Other implementations could use object keys, a Javascript Set, or Redux... etc. */ // start off with the existing state - let selection = [ - ...this.state.selection - ]; + let selection = [...this.state.selection]; const keyIndex = selection.indexOf(key); // check to see if the key exists - if(keyIndex>=0) { + if (keyIndex >= 0) { // it does exist so we will remove it using destructing selection = [ - ...selection.slice(0,keyIndex), - ...selection.slice(keyIndex+1) - ] + ...selection.slice(0, keyIndex), + ...selection.slice(keyIndex + 1) + ]; } else { // it does not exist so add it selection.push(key); } // update the state - this.setState({selection}); - } + this.setState({ selection }); + }; toggleAll = () => { /* 'toggleAll' is a tricky concept with any filterable table @@ -99,58 +91,54 @@ export class ComponentTest extends React.Component { That can then be iterrated to get all the currently visible records and set the selection state. */ - const selectAll = this.state.selectAll?false:true; + const selectAll = this.state.selectAll ? false : true; const selection = []; - if(selectAll) - { + if (selectAll) { // we need to get at the internals of ReactTable const wrappedInstance = this.checkboxTable.getWrappedInstance(); // the 'sortedData' property contains the currently accessible records based on the filter and sort const currentRecords = wrappedInstance.getResolvedState().sortedData; // we just push all the IDs onto the selection array - currentRecords.forEach((item)=>{ + currentRecords.forEach(item => { selection.push(item._original._id); - }) + }); } - this.setState({selectAll,selection}) - } - isSelected = (key) => { + this.setState({ selectAll, selection }); + }; + isSelected = key => { /* Instead of passing our external selection state we provide an 'isSelected' callback and detect the selection state ourselves. This allows any implementation for selection (either an array, object keys, or even a Javascript Set object). */ return this.state.selection.includes(key); - } + }; logSelection = () => { - console.log('selection:',this.state.selection); - } - render(){ + console.log("selection:", this.state.selection); + }; + render() { const { toggleSelection, toggleAll, isSelected, logSelection } = this; const { data, columns, selectAll } = this.state; - const extraProps = - { + const extraProps = { selectAll, isSelected, toggleAll, - toggleSelection, - } + toggleSelection + }; return ( - <div style={{ padding: '10px'}}> + <div style={{ padding: "10px" }}> <h1>react-table - Checkbox Table</h1> <button onClick={logSelection}>Log Selection to Console</button> {` (${this.state.selection.length}) selected`} - { - data? + {data ? ( <CheckboxTable data={data} columns={columns} - ref={(r)=>this.checkboxTable = r} + ref={r => (this.checkboxTable = r)} className="-striped -highlight" {...extraProps} /> - :null - } + ) : null} </div> ); } diff --git a/docs/src/examples/expander/index.js b/docs/src/examples/expander/index.js index 5403e25..a70548f 100644 --- a/docs/src/examples/expander/index.js +++ b/docs/src/examples/expander/index.js @@ -1,47 +1,46 @@ - -import React from 'react' +import React from "react"; export default class ComponentTest extends React.component { - render () { - return <div>Bozo</div> + render() { + return <div>Bozo</div>; } } // import ReactTable from '../../../../lib/index' // import '../../../../react-table.css' -// +// // console.log('ReactTable:',ReactTable) -// +// // const data = [ // {one:"1.1",two:"1.2"}, // {one:"2.1",two:"2.2"}, // {one:"3.1",two:"3.2"}, // {one:"4.1",two:"4.2"}, // ] -// +// // const columns = [ // {accessor:'one', Header: 'One'}, // {accessor:'two', Header: 'Two'}, // ] -// +// // class ExpanderComponent extends React.Component { // render() // { // return ( // <div className={`rt-expander ${this.props.isExpanded ? '-open' : ''}`}> // • -// </div> +// </div> // ) // } // } -// +// // class SubComponent extends React.Component { // render() // { // return <div>Nothing</div> // } // } -// +// // export default class ComponentTest extends React.Component { // render() // { @@ -53,7 +52,7 @@ export default class ComponentTest extends React.component { // // multiSort: false, // } // return ( -// <ReactTable +// <ReactTable // {...rtProps} // /> // ) diff --git a/docs/src/examples/index.js b/docs/src/examples/index.js index dd9864d..8e50611 100644 --- a/docs/src/examples/index.js +++ b/docs/src/examples/index.js @@ -1,11 +1,7 @@ /* eslint-disable */ -import TreeTable from './treetable' -import SelectTable from './selecttable' -import SelectTreeTable from './selecttreetable' +import TreeTable from "./treetable"; +import SelectTable from "./selecttable"; +import SelectTreeTable from "./selecttreetable"; -export { - TreeTable, - SelectTable, - SelectTreeTable, -} +export { TreeTable, SelectTable, SelectTreeTable }; diff --git a/docs/src/examples/selecttable/index.js b/docs/src/examples/selecttable/index.js index 4fc0007..114ebfc 100644 --- a/docs/src/examples/selecttable/index.js +++ b/docs/src/examples/selecttable/index.js @@ -1,38 +1,34 @@ +import React from "react"; +import shortid from "shortid"; -import React from 'react'; -import shortid from 'shortid'; +import ReactTable from "../../../../lib/index"; +import "../../../../react-table.css"; -import ReactTable from '../../../../lib/index' -import '../../../../react-table.css' - -import selectTableHOC from '../../../../lib/hoc/selectTable' +import selectTableHOC from "../../../../lib/hoc/selectTable"; const SelectTable = selectTableHOC(ReactTable); -async function getData() -{ - const result = await ( await fetch('/au_500_tree.json') ).json(); +async function getData() { + const result = await (await fetch("/au_500_tree.json")).json(); // we are adding a unique ID to the data for tracking the selected records - return result.map((item)=>{ + return result.map(item => { const _id = shortid.generate(); return { _id, - ...item, - } + ...item + }; }); } -function getColumns(data) -{ +function getColumns(data) { const columns = []; const sample = data[0]; - for(let key in sample) - { - if(key==='_id') continue; + for (let key in sample) { + if (key === "_id") continue; columns.push({ accessor: key, - Header: key, - }) + Header: key + }); } return columns; } @@ -40,53 +36,49 @@ function getColumns(data) export class ComponentTest extends React.Component { constructor(props) { super(props); - this.state = - { + this.state = { data: null, columns: null, selection: [], selectAll: false, - selectType: 'checkbox', + selectType: "checkbox" }; } - componentDidMount() - { - getData().then((data)=>{ + componentDidMount() { + getData().then(data => { const columns = getColumns(data); this.setState({ data, columns }); }); } - toggleSelection = (key,shift,row) => { + toggleSelection = (key, shift, row) => { /* Implementation of how to manage the selection state is up to the developer. This implementation uses an array stored in the component state. Other implementations could use object keys, a Javascript Set, or Redux... etc. */ // start off with the existing state - if (this.state.selectType === 'radio') { + if (this.state.selectType === "radio") { let selection = []; - if (selection.indexOf(key)<0) selection.push(key); - this.setState({selection}); + if (selection.indexOf(key) < 0) selection.push(key); + this.setState({ selection }); } else { - let selection = [ - ...this.state.selection - ]; + let selection = [...this.state.selection]; const keyIndex = selection.indexOf(key); // check to see if the key exists - if(keyIndex>=0) { + if (keyIndex >= 0) { // it does exist so we will remove it using destructing selection = [ - ...selection.slice(0,keyIndex), - ...selection.slice(keyIndex+1) - ] + ...selection.slice(0, keyIndex), + ...selection.slice(keyIndex + 1) + ]; } else { // it does not exist so add it selection.push(key); } // update the state - this.setState({selection}); + this.setState({ selection }); } - } + }; toggleAll = () => { /* 'toggleAll' is a tricky concept with any filterable table @@ -106,66 +98,73 @@ export class ComponentTest extends React.Component { That can then be iterrated to get all the currently visible records and set the selection state. */ - const selectAll = this.state.selectAll?false:true; + const selectAll = this.state.selectAll ? false : true; const selection = []; - if(selectAll) - { + if (selectAll) { // we need to get at the internals of ReactTable const wrappedInstance = this.selectTable.getWrappedInstance(); // the 'sortedData' property contains the currently accessible records based on the filter and sort const currentRecords = wrappedInstance.getResolvedState().sortedData; // we just push all the IDs onto the selection array - currentRecords.forEach((item)=>{ - if(item._original) - { + currentRecords.forEach(item => { + if (item._original) { selection.push(item._original._id); } - }) + }); } - this.setState({selectAll,selection}) - } - isSelected = (key) => { + this.setState({ selectAll, selection }); + }; + isSelected = key => { /* Instead of passing our external selection state we provide an 'isSelected' callback and detect the selection state ourselves. This allows any implementation for selection (either an array, object keys, or even a Javascript Set object). */ return this.state.selection.includes(key); - } + }; logSelection = () => { - console.log('selection:',this.state.selection); - } + console.log("selection:", this.state.selection); + }; toggleType = () => { - this.setState({ selectType: this.state.selectType === 'radio' ? 'checkbox' : 'radio', selection: [], selectAll: false, }); - } - render(){ - const { toggleSelection, toggleAll, isSelected, logSelection, toggleType } = this; + this.setState({ + selectType: this.state.selectType === "radio" ? "checkbox" : "radio", + selection: [], + selectAll: false + }); + }; + render() { + const { + toggleSelection, + toggleAll, + isSelected, + logSelection, + toggleType + } = this; const { data, columns, selectAll, selectType } = this.state; - const extraProps = - { + const extraProps = { selectAll, isSelected, toggleAll, toggleSelection, - selectType, - } + selectType + }; return ( - <div style={{ padding: '10px'}}> + <div style={{ padding: "10px" }}> <h1>react-table - Select Table</h1> - <button onClick={toggleType}>Select Type: <strong>{selectType}</strong></button> + <button onClick={toggleType}> + Select Type: <strong>{selectType}</strong> + </button> <button onClick={logSelection}>Log Selection to Console</button> {` (${this.state.selection.length}) selected`} - { - data? + {data ? ( <SelectTable data={data} columns={columns} - ref={(r)=>this.selectTable = r} + ref={r => (this.selectTable = r)} className="-striped -highlight" {...extraProps} /> - :null - } + ) : null} </div> ); } diff --git a/docs/src/examples/selecttreetable/index.js b/docs/src/examples/selecttreetable/index.js index 4766777..130e4f2 100644 --- a/docs/src/examples/selecttreetable/index.js +++ b/docs/src/examples/selecttreetable/index.js @@ -1,49 +1,43 @@ +import React from "react"; +import shortid from "shortid"; -import React from 'react'; -import shortid from 'shortid'; +import ReactTable from "../../../../lib/index"; +import "../../../../react-table.css"; -import ReactTable from '../../../../lib/index' -import '../../../../react-table.css' - -import selectTableHOC from '../../../../lib/hoc/selectTable' -import treeTableHOC from '../../../../lib/hoc/treeTable' +import selectTableHOC from "../../../../lib/hoc/selectTable"; +import treeTableHOC from "../../../../lib/hoc/treeTable"; const SelectTreeTable = selectTableHOC(treeTableHOC(ReactTable)); -async function getData() -{ - const result = await ( await fetch('/au_500_tree.json') ).json(); +async function getData() { + const result = await (await fetch("/au_500_tree.json")).json(); // we are adding a unique ID to the data for tracking the selected records - return result.map((item)=>{ + return result.map(item => { const _id = shortid.generate(); return { _id, - ...item, - } + ...item + }; }); } -function getColumns(data) -{ +function getColumns(data) { const columns = []; const sample = data[0]; - for(let key in sample) - { - if(key==='_id') continue; + for (let key in sample) { + if (key === "_id") continue; columns.push({ accessor: key, - Header: key, - }) + Header: key + }); } return columns; } -function getNodes(data,node=[]) -{ - data.forEach((item)=>{ - if(item.hasOwnProperty('_subRows') && item._subRows) - { - node = getNodes(item._subRows,node); +function getNodes(data, node = []) { + data.forEach(item => { + if (item.hasOwnProperty("_subRows") && item._subRows) { + node = getNodes(item._subRows, node); } else { node.push(item._original); } @@ -54,54 +48,50 @@ function getNodes(data,node=[]) export class ComponentTest extends React.Component { constructor(props) { super(props); - this.state = - { + this.state = { data: null, columns: null, selection: [], selectAll: false, - selectType: 'checkbox', + selectType: "checkbox" }; } - componentDidMount() - { - getData().then((data)=>{ + componentDidMount() { + getData().then(data => { const columns = getColumns(data); - const pivotBy = ['state','post']; + const pivotBy = ["state", "post"]; this.setState({ data, columns, pivotBy }); }); } - toggleSelection = (key,shift,row) => { + toggleSelection = (key, shift, row) => { /* Implementation of how to manage the selection state is up to the developer. This implementation uses an array stored in the component state. Other implementations could use object keys, a Javascript Set, or Redux... etc. */ // start off with the existing state - if (this.state.selectType === 'radio') { + if (this.state.selectType === "radio") { let selection = []; - if (selection.indexOf(key)<0) selection.push(key); - this.setState({selection}); + if (selection.indexOf(key) < 0) selection.push(key); + this.setState({ selection }); } else { - let selection = [ - ...this.state.selection - ]; + let selection = [...this.state.selection]; const keyIndex = selection.indexOf(key); // check to see if the key exists - if(keyIndex>=0) { + if (keyIndex >= 0) { // it does exist so we will remove it using destructing selection = [ - ...selection.slice(0,keyIndex), - ...selection.slice(keyIndex+1) - ] + ...selection.slice(0, keyIndex), + ...selection.slice(keyIndex + 1) + ]; } else { // it does not exist so add it selection.push(key); } // update the state - this.setState({selection}); + this.setState({ selection }); } - } + }; toggleAll = () => { /* 'toggleAll' is a tricky concept with any filterable table @@ -121,10 +111,9 @@ export class ComponentTest extends React.Component { That can then be iterrated to get all the currently visible records and set the selection state. */ - const selectAll = this.state.selectAll?false:true; + const selectAll = this.state.selectAll ? false : true; const selection = []; - if(selectAll) - { + if (selectAll) { // we need to get at the internals of ReactTable const wrappedInstance = this.selectTable.getWrappedInstance(); // the 'sortedData' property contains the currently accessible records based on the filter and sort @@ -132,41 +121,59 @@ export class ComponentTest extends React.Component { // we need to get all the 'real' (original) records out to get at their IDs const nodes = getNodes(currentRecords); // we just push all the IDs onto the selection array - nodes.forEach((item)=>{ + nodes.forEach(item => { selection.push(item._id); - }) + }); } - this.setState({selectAll,selection}) - } - isSelected = (key) => { + this.setState({ selectAll, selection }); + }; + isSelected = key => { /* Instead of passing our external selection state we provide an 'isSelected' callback and detect the selection state ourselves. This allows any implementation for selection (either an array, object keys, or even a Javascript Set object). */ return this.state.selection.includes(key); - } + }; logSelection = () => { - console.log('selection:',this.state.selection); - } + console.log("selection:", this.state.selection); + }; toggleType = () => { - this.setState({ selectType: this.state.selectType === 'radio' ? 'checkbox' : 'radio', selection: [], selectAll: false, }); - } + this.setState({ + selectType: this.state.selectType === "radio" ? "checkbox" : "radio", + selection: [], + selectAll: false + }); + }; toggleTree = () => { - if(this.state.pivotBy.length) { - this.setState({pivotBy:[],expanded:{}}); + if (this.state.pivotBy.length) { + this.setState({ pivotBy: [], expanded: {} }); } else { - this.setState({pivotBy:['state','post'],expanded:{}}); + this.setState({ pivotBy: ["state", "post"], expanded: {} }); } - } - onExpandedChange = (expanded) => { - this.setState({expanded}); - } - render(){ - const { toggleSelection, toggleAll, isSelected, logSelection, toggleType, toggleTree, onExpandedChange, } = this; - const { data, columns, selectAll, selectType, pivotBy, expanded, } = this.state; - const extraProps = - { + }; + onExpandedChange = expanded => { + this.setState({ expanded }); + }; + render() { + const { + toggleSelection, + toggleAll, + isSelected, + logSelection, + toggleType, + toggleTree, + onExpandedChange + } = this; + const { + data, + columns, + selectAll, + selectType, + pivotBy, + expanded + } = this.state; + const extraProps = { selectAll, isSelected, toggleAll, @@ -175,39 +182,54 @@ export class ComponentTest extends React.Component { pivotBy, expanded, onExpandedChange, - pageSize: 5, - } + pageSize: 5 + }; return ( - <div style={{ padding: '10px'}}> + <div style={{ padding: "10px" }}> <h1>react-table - Select Tree Table</h1> - <p>This example combines two HOCs (the TreeTable and the SelectTable) to make a composite component.</p> + <p> + This example combines two HOCs (the TreeTable and the SelectTable) to + make a composite component. + </p> <p>We'll call it SelectTreeTable!</p> <p>Here is what the buttons do:</p> <ul> - <li><strong>Toggle Tree:</strong> enables or disabled the pivotBy on the table.</li> - <li><strong>Select Type:</strong> changes from 'checkbox' to 'radio' and back again.</li> - <li><strong>Log Selection to Console:</strong> open your console to see what has been selected.</li> + <li> + <strong>Toggle Tree:</strong> enables or disabled the pivotBy on the + table. + </li> + <li> + <strong>Select Type:</strong> changes from 'checkbox' to 'radio' and + back again. + </li> + <li> + <strong>Log Selection to Console:</strong> open your console to see + what has been selected. + </li> </ul> <p> - <strong>NOTE:</strong> the selection is maintained when toggling the tree on and off but is cleared - when switching between select types (radio, checkbox). + <strong>NOTE:</strong> the selection is maintained when toggling the + tree on and off but is cleared when switching between select types + (radio, checkbox). </p> - <button onClick={toggleTree}>Toggle Tree [{pivotBy && pivotBy.length ? pivotBy.join(', ') : ''}]</button> - <button onClick={toggleType}>Select Type: <strong>{selectType}</strong></button> + <button onClick={toggleTree}> + Toggle Tree [{pivotBy && pivotBy.length ? pivotBy.join(", ") : ""}] + </button> + <button onClick={toggleType}> + Select Type: <strong>{selectType}</strong> + </button> <button onClick={logSelection}>Log Selection to Console</button> {` (${this.state.selection.length}) selected`} - { - data? + {data ? ( <SelectTreeTable data={data} columns={columns} - ref={(r)=>this.selectTable = r} + ref={r => (this.selectTable = r)} className="-striped -highlight" freezeWhenExpanded={true} {...extraProps} /> - :null - } + ) : null} </div> ); } diff --git a/docs/src/examples/treetable/index.js b/docs/src/examples/treetable/index.js index dc87fa6..74b62b3 100644 --- a/docs/src/examples/treetable/index.js +++ b/docs/src/examples/treetable/index.js @@ -1,27 +1,23 @@ +import React from "react"; -import React from 'react'; +import ReactTable from "../../../../lib/index"; +import "../../../../react-table.css"; -import ReactTable from '../../../../lib/index' -import '../../../../react-table.css' +import treeTableHOC from "../../../../lib/hoc/treeTable"; -import treeTableHOC from '../../../../lib/hoc/treeTable' - -async function getData() -{ - const result = await ( await fetch('/au_500_tree.json') ).json(); +async function getData() { + const result = await (await fetch("/au_500_tree.json")).json(); return result; } -function getColumns(data,pivotBy) -{ +function getColumns(data, pivotBy) { const columns = []; const sample = data[0]; - for(let key in sample) - { + for (let key in sample) { columns.push({ accessor: key, - Header: key, - }) + Header: key + }); } return columns; } @@ -29,49 +25,43 @@ function getColumns(data,pivotBy) export class ComponentTest extends React.Component { constructor(props) { super(props); - this.state = - { + this.state = { data: null, columns: null, - pivotBy: null, // ["firstName", "lastName"], + pivotBy: null // ["firstName", "lastName"], }; } - componentDidMount() - { - getData().then((data)=>{ + componentDidMount() { + getData().then(data => { // console.log('cwm data:',data); - const pivotBy = ['state','post','city']; - const columns = getColumns(data,pivotBy); + const pivotBy = ["state", "post", "city"]; + const columns = getColumns(data, pivotBy); // console.log('cwm cols:',columns); - this.setState({data,columns,pivotBy}); + this.setState({ data, columns, pivotBy }); }); } - showState = ()=> - { - console.log('state:',this.reactTable.getResolvedState()); - } - render(){ + showState = () => { + console.log("state:", this.reactTable.getResolvedState()); + }; + render() { const { data, columns, pivotBy } = this.state; - const extraProps = - { + const extraProps = { data, columns, - pivotBy, - } + pivotBy + }; const TreeTable = treeTableHOC(ReactTable); return ( - <div style={{ padding: '10px'}}> + <div style={{ padding: "10px" }}> <h1>react-table - Tree Table</h1> - { - data? + {data ? ( <TreeTable - ref={(r)=>this.reactTable=r} - className="-striped -highlight" - defaultPageSize={5} - {...extraProps} - /> - :null - } + ref={r => (this.reactTable = r)} + className="-striped -highlight" + defaultPageSize={5} + {...extraProps} + /> + ) : null} </div> ); } diff --git a/docs/src/examples/treetable/treeTableHOC.js b/docs/src/examples/treetable/treeTableHOC.js index 078d808..6713383 100644 --- a/docs/src/examples/treetable/treeTableHOC.js +++ b/docs/src/examples/treetable/treeTableHOC.js @@ -1,58 +1,53 @@ +import React from "react"; - -import React from 'react'; - -export default (Component) => { - const wrapper = (componentProps) => { - const TrComponent = (props) => { +export default Component => { + const wrapper = componentProps => { + const TrComponent = props => { const { ri, ...rest } = props; - if(ri && ri.groupedByPivot) { + if (ri && ri.groupedByPivot) { const cell = props.children[ri.level]; - - cell.props.style.flex = 'unset'; - cell.props.style.width = '100%'; - cell.props.style.maxWidth = 'unset'; - cell.props.style.paddingLeft = `${componentProps.treeTableIndent*ri.level}px`; - cell.props.style.backgroundColor = '#DDD'; - cell.props.style.borderBottom = '1px solid rgba(128,128,128,0.2)'; - + + cell.props.style.flex = "unset"; + cell.props.style.width = "100%"; + cell.props.style.maxWidth = "unset"; + cell.props.style.paddingLeft = `${componentProps.treeTableIndent * + ri.level}px`; + cell.props.style.backgroundColor = "#DDD"; + cell.props.style.borderBottom = "1px solid rgba(128,128,128,0.2)"; + return <div {...rest}>{cell}</div>; } return <Component.defaultProps.TrComponent {...rest} />; - } + }; - const getTrProps = (state,ri,ci,instance) => { - return {ri}; - } + const getTrProps = (state, ri, ci, instance) => { + return { ri }; + }; const { columns, ...rest } = componentProps; const extra = { - columns: columns.map((col)=>{ + columns: columns.map(col => { let column = col; - if(rest.pivotBy && rest.pivotBy.includes(col.accessor)) - { + if (rest.pivotBy && rest.pivotBy.includes(col.accessor)) { column = { accessor: col.accessor, width: `${componentProps.treeTableIndent}px`, show: false, - Header: '', - } + Header: "" + }; } return column; }), TrComponent, - getTrProps, + getTrProps }; - - return ( - <Component {...rest} {...extra} /> - ) - } - wrapper.displayName = 'RTTreeTable'; - wrapper.defaultProps = - { - treeTableRowBackground: '#EEE', - treeTableIndent: 10, - } + + return <Component {...rest} {...extra} />; + }; + wrapper.displayName = "RTTreeTable"; + wrapper.defaultProps = { + treeTableRowBackground: "#EEE", + treeTableIndent: 10 + }; return wrapper; -} +}; diff --git a/docs/src/examples/utils.js b/docs/src/examples/utils.js index cd5d5c6..aee080a 100644 --- a/docs/src/examples/utils.js +++ b/docs/src/examples/utils.js @@ -1,4 +1,3 @@ - import namor from "namor"; const range = len => { @@ -20,7 +19,9 @@ const newPerson = () => { status: statusChance > 0.66 ? "relationship" - : statusChance > 0.33 ? "complicated" : "single" + : statusChance > 0.33 + ? "complicated" + : "single" }; }; diff --git a/docs/src/index.css b/docs/src/index.css index 89ebfa6..8390b98 100644 --- a/docs/src/index.css +++ b/docs/src/index.css @@ -1,5 +1,7 @@ -html, body, #root { - height: 100% +html, +body, +#root { + height: 100%; } body { margin: 0; diff --git a/docs/src/index.js b/docs/src/index.js index e423af3..23c8a43 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -1,10 +1,7 @@ -import React from 'react' -import ReactDOM from 'react-dom' +import React from "react"; +import ReactDOM from "react-dom"; // -import './index.css' -import App from './App.js' +import "./index.css"; +import App from "./App.js"; -ReactDOM.render( - <App />, - document.getElementById('root') -) +ReactDOM.render(<App />, document.getElementById("root")); diff --git a/docs/src/stories/HOCReadme.js b/docs/src/stories/HOCReadme.js index 648091d..9fdcaec 100644 --- a/docs/src/stories/HOCReadme.js +++ b/docs/src/stories/HOCReadme.js @@ -1,23 +1,23 @@ /* eslint-disable */ -import React from 'react' -import marked from 'marked' +import React from "react"; +import marked from "marked"; // -import HOCReadme from '!raw!../../../src/hoc/README.md' -import 'github-markdown-css/github-markdown.css' -import './utils/prism.js' +import HOCReadme from "!raw!../../../src/hoc/README.md"; +import "github-markdown-css/github-markdown.css"; +import "./utils/prism.js"; export default class HOCStory extends React.Component { - render () { + render() { return ( - <div style={{ padding: '10px' }}> + <div style={{ padding: "10px" }}> <span - className='markdown-body' + className="markdown-body" dangerouslySetInnerHTML={{ __html: marked(HOCReadme) }} /> </div> - ) + ); } - componentDidMount () { - global.Prism && global.Prism.highlightAll() + componentDidMount() { + global.Prism && global.Prism.highlightAll(); } } diff --git a/docs/src/stories/Readme.js b/docs/src/stories/Readme.js index 7cf1dba..5358fbe 100644 --- a/docs/src/stories/Readme.js +++ b/docs/src/stories/Readme.js @@ -1,23 +1,23 @@ /* eslint-disable import/no-webpack-loader-syntax */ -import React from 'react' -import marked from 'marked' +import React from "react"; +import marked from "marked"; // -import Readme from '!raw!../../../README.md' -import 'github-markdown-css/github-markdown.css' -import './utils/prism.js' +import Readme from "!raw!../../../README.md"; +import "github-markdown-css/github-markdown.css"; +import "./utils/prism.js"; export default class Story extends React.Component { - render () { + render() { return ( - <div style={{ padding: '10px' }}> + <div style={{ padding: "10px" }}> <span - className='markdown-body' + className="markdown-body" dangerouslySetInnerHTML={{ __html: marked(Readme) }} /> </div> - ) + ); } - componentDidMount () { - global.Prism && global.Prism.highlightAll() + componentDidMount() { + global.Prism && global.Prism.highlightAll(); } } diff --git a/docs/src/stories/test.js b/docs/src/stories/test.js index 5e98633..aaa1bee 100644 --- a/docs/src/stories/test.js +++ b/docs/src/stories/test.js @@ -1,31 +1,27 @@ +import React from "react"; -import React from 'react' - -import ReactTable from '../../../lib/index' -import '../../../react-table.css' +import ReactTable from "../../../lib/index"; +import "../../../react-table.css"; const data = [ - { one: '1.1', two: '1.2' }, - { one: '2.1', two: '2.2' }, - { one: '3.1', two: '3.2' }, - { one: '4.1', two: '4.2' }, -] + { one: "1.1", two: "1.2" }, + { one: "2.1", two: "2.2" }, + { one: "3.1", two: "3.2" }, + { one: "4.1", two: "4.2" } +]; const columns = [ - { accessor: 'one', Header: 'One' }, - { accessor: 'two', Header: 'Two' }, -] + { accessor: "one", Header: "One" }, + { accessor: "two", Header: "Two" } +]; export default class Story extends React.Component { - render () { + render() { return ( <div> Test - <ReactTable - data={data} - columns={columns} - /> + <ReactTable data={data} columns={columns} /> </div> - ) + ); } } diff --git a/src/defaultProps.js b/src/defaultProps.js index 014a9f9..82dd618 100644 --- a/src/defaultProps.js +++ b/src/defaultProps.js @@ -33,9 +33,7 @@ export default { // eslint-disable-next-line no-unused-vars defaultFilterMethod: (filter, row, column) => { const id = filter.pivotId || filter.id - return row[id] !== undefined - ? String(row[id]).startsWith(filter.value) - : true + return row[id] !== undefined ? String(row[id]).startsWith(filter.value) : true }, // eslint-disable-next-line no-unused-vars defaultSortMethod: (a, b, desc) => { @@ -188,29 +186,22 @@ export default { TheadComponent: _.makeTemplateComponent('rt-thead', 'Thead'), TbodyComponent: _.makeTemplateComponent('rt-tbody', 'Tbody'), TrGroupComponent: ({ children, className, ...rest }) => ( - <div - className={classnames('rt-tr-group', className)} - role="rowgroup" - {...rest} - > + <div className={classnames('rt-tr-group', className)} role="rowgroup" {...rest}> {children} </div> ), TrComponent: ({ children, className, ...rest }) => ( - <div - className={classnames('rt-tr', className)} - role="row" - {...rest} - > + <div className={classnames('rt-tr', className)} role="row" {...rest}> {children} </div> ), - ThComponent: ({ toggleSort, className, children, ...rest }) => ( + ThComponent: ({ + toggleSort, className, children, ...rest + }) => ( + // eslint-disable-next-line jsx-a11y/click-events-have-key-events <div className={classnames('rt-th', className)} - onClick={e => ( - toggleSort && toggleSort(e) - )} + onClick={e => toggleSort && toggleSort(e)} role="columnheader" tabIndex="-1" // Resolves eslint issues without implementing keyboard navigation incorrectly {...rest} @@ -218,12 +209,10 @@ export default { {children} </div> ), - TdComponent: ({ toggleSort, className, children, ...rest }) => ( - <div - className={classnames('rt-td', className)} - role="gridcell" - {...rest} - > + TdComponent: ({ + toggleSort, className, children, ...rest + }) => ( + <div className={classnames('rt-td', className)} role="gridcell" {...rest}> {children} </div> ), @@ -239,9 +228,7 @@ export default { /> ), ExpanderComponent: ({ isExpanded }) => ( - <div className={classnames('rt-expander', isExpanded && '-open')}> - • - </div> + <div className={classnames('rt-expander', isExpanded && '-open')}>•</div> ), PivotValueComponent: ({ subRows, value }) => ( <span> @@ -249,34 +236,25 @@ export default { </span> ), AggregatedComponent: ({ subRows, column }) => { - const previewValues = subRows - .filter(d => typeof d[column.id] !== 'undefined') - .map((row, i) => ( - // eslint-disable-next-line react/no-array-index-key - <span key={i}> - {row[column.id]} - {i < subRows.length - 1 ? ', ' : ''} - </span> - )) - return ( - <span> - {previewValues} + const previewValues = subRows.filter(d => typeof d[column.id] !== 'undefined').map((row, i) => ( + // eslint-disable-next-line react/no-array-index-key + <span key={i}> + {row[column.id]} + {i < subRows.length - 1 ? ', ' : ''} </span> - ) + )) + return <span>{previewValues}</span> }, PivotComponent: undefined, // this is a computed default generated using // the ExpanderComponent and PivotValueComponent at run-time in methods.js PaginationComponent: Pagination, PreviousComponent: undefined, NextComponent: undefined, - LoadingComponent: ({ className, loading, loadingText, ...rest }) => ( - <div - className={classnames('-loading', { '-active': loading }, className)} - {...rest} - > - <div className="-loading-inner"> - {loadingText} - </div> + LoadingComponent: ({ + className, loading, loadingText, ...rest + }) => ( + <div className={classnames('-loading', { '-active': loading }, className)} {...rest}> + <div className="-loading-inner">{loadingText}</div> </div> ), NoDataComponent: _.makeTemplateComponent('rt-noData', 'NoData'), diff --git a/src/hoc/README.md b/src/hoc/README.md index 92c86cb..1b8f85e 100644 --- a/src/hoc/README.md +++ b/src/hoc/README.md @@ -1,75 +1,82 @@ - <div style="text-align:center;"> <a href="https://github.com/react-tools/react-table" target="\_parent"><img src="https://github.com/react-tools/media/raw/master/logo-react-table.png" alt="React Table Logo" style="width:450px;"/></a> </div> # ReactTable - expanding with HOCs + This documentation is about expanding ReactTable using Higher Order Components/Functions. ## Covered in this README -- A Brief explanation of HOCs and why they are a good approach for ReactTable enhancements -- Documentation of the currently available HOCs - - TreeTable - - SelectTable -- Documentation of the standard for writing HOCs with ReactTable + +* A Brief explanation of HOCs and why they are a good approach for ReactTable enhancements +* Documentation of the currently available HOCs +* TreeTable +* SelectTable +* Documentation of the standard for writing HOCs with ReactTable ## What are HOCs and why use them with ReactTable + HOCs (or Higher Order Components/Functions) are either a React Component (or a function that returns a React Component) that are used to enhance the functionality of an existing component. How much you can enhance depends on the props that the component exposes. -Fortunately, ReactTable exposes a LOT of functionality as props to the component. In some cases there are too many +Fortunately, ReactTable exposes a LOT of functionality as props to the component. In some cases there are too many props to keep track of and that is where HOCs come in. You can write a HOC that just focusses on the additional functionality you want to enhance and keep those enhancements to -reuse over and over again when you need them. You don't have to edit the ReactSource code, just wrap ReactTable in one or +reuse over and over again when you need them. You don't have to edit the ReactSource code, just wrap ReactTable in one or more HOCs (more on some issues related to chaining HOCs later) that provide the additional functionality you want to expose. -The most obvious HOC is one that can add `checkbox` or select functionality. The HOC included provides `select` functionality +The most obvious HOC is one that can add `checkbox` or select functionality. The HOC included provides `select` functionality that allows the developer to specify if they want a `checkbox` or `radio` style of select column. The implementation of the selection is recorded (e.g. in component state, Redux, etc.) and how to manage multiple selections. The HOC really only handles the rendering pieces. But there is more documentation on the `select` HOC below. - ## Currently Available HOCs ### TreeTable + TreeTable takes over the rendering of the generated pivot rows of ReactTable so that they appear more like an expandable Tree. It accomplishes this by rendering a 100% wide div and then only rendering the cell that controls the pivot at that level. Using it is as simple as doing the following: -```javascript -import ReactTable from 'react-table' -import treeTableHOC from 'react-table/lib/hoc/treeTable' -const TreeTable = treeTableHOC(ReactTable) +```javascript +import ReactTable from "react-table"; +import treeTableHOC from "react-table/lib/hoc/treeTable"; + +const TreeTable = treeTableHOC(ReactTable); ``` + After you have done the above, you can then use `TreeTable` just as you would `ReactTable` but it will render pivots using the Tree style described above. - ### SelectTable + SelectTable is a little trickier. The HOCs attempt to avoid adding additional state and, as there is no internal ID for a row that can be relied on to be static (ReactTable just reuses indexes when rendering) the developer has to maintain the state outside of even the wrapped component. So it is largely based on callbacks. You include the HOC in the same manner as you would for the treeTableHOC but then need to provide the following overrides: -- isSelected - returns `true` if the key passed is selected otherwise it should return `false` -- selectAll - a property that indicates if the selectAll is set (`true|false`) -- toggleAll - called when the user clicks the `selectAll` checkbox/radio -- toggleSelection - called when the use clicks a specific checkbox/radio in a row -- selectType - either `checkbox|radio` to indicate what type of selection is required -**Note:** The select field defaults to the accessor `_id` property in order to render the select field for that particular row. If your objects have different -unique ID fields, make sure to tell React Table that by passing it the `keyField` property. +* isSelected - returns `true` if the key passed is selected otherwise it should return `false` +* selectAll - a property that indicates if the selectAll is set (`true|false`) +* toggleAll - called when the user clicks the `selectAll` checkbox/radio +* toggleSelection - called when the use clicks a specific checkbox/radio in a row +* selectType - either `checkbox|radio` to indicate what type of selection is required + +**Note:** The select field defaults to the accessor `_id` property in order to render the select field for that particular row. If your objects have different +unique ID fields, make sure to tell React Table that by passing it the `keyField` property. + ```Javascript <ReactTable keyField='id' /> ``` -In the case of `radio` there is no `selectAll` displayed but the developer is responsible for only making one selection in -the controlling component's state. You could select multiple but it wouldn't make sense and you should use `checkbox` instead. + +In the case of `radio` there is no `selectAll` displayed but the developer is responsible for only making one selection in +the controlling component's state. You could select multiple but it wouldn't make sense and you should use `checkbox` instead. You also have to decide what `selectAll` means. Given ReactTable is a paged solution there are other records off-page. When someone selects the `selectAll` checkbox, should it mark every possible record, only what might be visible to due a Filter or only those items @@ -79,10 +86,12 @@ The example opts for the middle approach so it gets a `ref` to the ReactTable in state (then walks through those records and pulls their ID into the `selection` state of the controlling component). You can also replace the input component that is used to render the select box and select all box: -- SelectAllInputComponent - the checkbox in the top left corner -- SelectInputComponent - the checkbox used on a row + +* SelectAllInputComponent - the checkbox in the top left corner +* SelectInputComponent - the checkbox used on a row ### SelectTreeTable + SelectTreeTable is a combination of TreeTable and SelectTable. To function correctly the chain has to be in the correct order as follows (see the comments in the guid on HOCs below). @@ -92,23 +101,25 @@ const SelectTreeTable = selectTableHOC(treeTableHOC(ReactTable)); ``` In this particular instance it is (probably) because the functions need access to the state on the wrapped component to manage -the selected items. Although that is not totally clearly the issue. +the selected items. Although that is not totally clearly the issue. ## HOC Guide for ReactTable -There are a few rules required when writing a HOC for ReactTable (other than meeting the normal lint standards - which are + +There are a few rules required when writing a HOC for ReactTable (other than meeting the normal lint standards - which are still being developed). -Firstly, there are issues with `ref` when you write a HOC. Consider a deeply nested component wrapped in multiple HOCs... +Firstly, there are issues with `ref` when you write a HOC. Consider a deeply nested component wrapped in multiple HOCs... -A HOC in the middle of the chain requires access to the instance of the component it thinks it is wrapping but there is at -least one other wrapper in the way. The challenge is: How do I get to the actual wrapped component? +A HOC in the middle of the chain requires access to the instance of the component it thinks it is wrapping but there is at +least one other wrapper in the way. The challenge is: How do I get to the actual wrapped component? Each HOC is required to be a React Class so that a `ref` can be obtained against each component: ```Javascript <Component ... ref={r => this.wrappedInstance = r} /> ``` -*NOTE:* "Component" can also be the `<ReactTable />` instance. + +_NOTE:_ "Component" can also be the `<ReactTable />` instance. Then the following method needs to be placed on the class so that it exposes the correct instance of ReactTable: @@ -120,6 +131,7 @@ getWrappedInstance() { else return this.wrappedInstance } ``` + Essentially this will walk down the chain (if there are chained HOCs) and stop when it gets to the end and return the wrapped instance. Finally, sometimes the chains need to be in a specific order to function correctly. It is not clear if this is just an architectural diff --git a/src/hoc/selectTable/index.js b/src/hoc/selectTable/index.js index 13ccdc5..bf97e45 100644 --- a/src/hoc/selectTable/index.js +++ b/src/hoc/selectTable/index.js @@ -1,111 +1,115 @@ /* eslint-disable */ -import React from 'react'; +import React from 'react' -const defaultSelectInputComponent = (props) => { +const defaultSelectInputComponent = props => { return ( - <input - type={props.selectType || 'checkbox'} - checked={props.checked} - onClick={(e)=>{ - const { shiftKey } = e; - e.stopPropagation(); - props.onClick(props.id, shiftKey, props.row); - }} - onChange={()=>{}} + <input + type={props.selectType || 'checkbox'} + checked={props.checked} + onClick={e => { + const { shiftKey } = e + e.stopPropagation() + props.onClick(props.id, shiftKey, props.row) + }} + onChange={() => {}} /> ) } -export default (Component) => { - +export default Component => { const wrapper = class RTSelectTable extends React.Component { - - constructor(props) - { - super(props); + constructor(props) { + super(props) } rowSelector(row) { - if(!row || !row.hasOwnProperty(this.props.keyField)) return null; - const { toggleSelection, selectType, keyField } = this.props; - const checked = this.props.isSelected(row[this.props.keyField]); - const inputProps = - { + if (!row || !row.hasOwnProperty(this.props.keyField)) return null + const { toggleSelection, selectType, keyField } = this.props + const checked = this.props.isSelected(row[this.props.keyField]) + const inputProps = { checked, onClick: toggleSelection, selectType, id: row[keyField], row, } - return React.createElement(this.props.SelectInputComponent,inputProps); + return React.createElement(this.props.SelectInputComponent, inputProps) } headSelector(row) { - const { selectType } = this.props; - if (selectType === 'radio') return null; - - const { toggleAll, selectAll: checked, SelectAllInputComponent, } = this.props; - const inputProps = - { + const { selectType } = this.props + if (selectType === 'radio') return null + + const { toggleAll, selectAll: checked, SelectAllInputComponent } = this.props + const inputProps = { checked, onClick: toggleAll, selectType, } - - return React.createElement(SelectAllInputComponent,inputProps); + + return React.createElement(SelectAllInputComponent, inputProps) } - + // this is so we can expose the underlying ReactTable to get at the sortedData for selectAll getWrappedInstance() { - if (!this.wrappedInstance) console.warn('RTSelectTable - No wrapped instance'); - if (this.wrappedInstance.getWrappedInstance) return this.wrappedInstance.getWrappedInstance(); + if (!this.wrappedInstance) console.warn('RTSelectTable - No wrapped instance') + if (this.wrappedInstance.getWrappedInstance) return this.wrappedInstance.getWrappedInstance() else return this.wrappedInstance } - render() - { - const { - columns:originalCols, isSelected, toggleSelection, toggleAll, keyField, selectAll, - selectType, selectWidth, SelectAllInputComponent, SelectInputComponent, - ...rest - } = this.props; + render() { + const { + columns: originalCols, + isSelected, + toggleSelection, + toggleAll, + keyField, + selectAll, + selectType, + selectWidth, + SelectAllInputComponent, + SelectInputComponent, + ...rest + } = this.props const select = { id: '_selector', - accessor: ()=>'x', // this value is not important + accessor: () => 'x', // this value is not important Header: this.headSelector.bind(this), - Cell: (ci) => { return this.rowSelector.bind(this)(ci.original); }, + Cell: ci => { + return this.rowSelector.bind(this)(ci.original) + }, width: selectWidth || 30, filterable: false, sortable: false, resizable: false, style: { textAlign: 'center' }, } - const columns = [ - select, - ...originalCols, - ]; + const columns = [select, ...originalCols] const extra = { columns, - }; - return ( - <Component {...rest} {...extra} ref={(r)=>this.wrappedInstance=r}/> - ) + } + return <Component {...rest} {...extra} ref={r => (this.wrappedInstance = r)} /> } } - wrapper.displayName = 'RTSelectTable'; - wrapper.defaultProps = - { + wrapper.displayName = 'RTSelectTable' + wrapper.defaultProps = { keyField: '_id', - isSelected: (key)=>{ console.log('No isSelected handler provided:',{key})}, + isSelected: key => { + console.log('No isSelected handler provided:', { key }) + }, selectAll: false, - toggleSelection: (key, shift, row)=>{ console.log('No toggleSelection handler provided:', { key, shift, row }) }, - toggleAll: () => { console.log('No toggleAll handler provided.') }, + toggleSelection: (key, shift, row) => { + console.log('No toggleSelection handler provided:', { key, shift, row }) + }, + toggleAll: () => { + console.log('No toggleAll handler provided.') + }, selectType: 'check', SelectInputComponent: defaultSelectInputComponent, SelectAllInputComponent: defaultSelectInputComponent, } - - return wrapper; + + return wrapper } diff --git a/src/hoc/treeTable/index.js b/src/hoc/treeTable/index.js index 6c9fa7d..671e140 100644 --- a/src/hoc/treeTable/index.js +++ b/src/hoc/treeTable/index.js @@ -2,56 +2,54 @@ import React from 'react' -export default (Component) => { +export default Component => { const wrapper = class RTTreeTable extends React.Component { - - constructor(props) - { - super(props); - this.getWrappedInstance.bind(this); - this.TrComponent.bind(this); - this.getTrProps.bind(this); + constructor(props) { + super(props) + this.getWrappedInstance.bind(this) + this.TrComponent.bind(this) + this.getTrProps.bind(this) } // this is so we can expose the underlying ReactTable to get at the sortedData for selectAll getWrappedInstance = () => { - if (!this.wrappedInstance) console.warn('RTTreeTable - No wrapped instance'); - if (this.wrappedInstance.getWrappedInstance) return this.wrappedInstance.getWrappedInstance(); + if (!this.wrappedInstance) console.warn('RTTreeTable - No wrapped instance') + if (this.wrappedInstance.getWrappedInstance) return this.wrappedInstance.getWrappedInstance() else return this.wrappedInstance } - TrComponent = (props) => { - const { - ri, - ...rest - } = props; - if(ri && ri.groupedByPivot) { - const cell = {...props.children[ri.level]}; - - cell.props.style.flex = 'unset'; - cell.props.style.width = '100%'; - cell.props.style.maxWidth = 'unset'; - cell.props.style.paddingLeft = `${this.props.treeTableIndent*ri.level}px`; + TrComponent = props => { + const { ri, ...rest } = props + if (ri && ri.groupedByPivot) { + const cell = { ...props.children[ri.level] } + + cell.props.style.flex = 'unset' + cell.props.style.width = '100%' + cell.props.style.maxWidth = 'unset' + cell.props.style.paddingLeft = `${this.props.treeTableIndent * ri.level}px` // cell.props.style.backgroundColor = '#DDD'; - cell.props.style.borderBottom = '1px solid rgba(128,128,128,0.2)'; - - return <div className={`rt-tr ${rest.className}`} style={rest.style}>{cell}</div>; + cell.props.style.borderBottom = '1px solid rgba(128,128,128,0.2)' + + return ( + <div className={`rt-tr ${rest.className}`} style={rest.style}> + {cell} + </div> + ) } - return <Component.defaultProps.TrComponent {...rest} />; + return <Component.defaultProps.TrComponent {...rest} /> } - getTrProps = (state,ri,ci,instance) => { - return {ri}; + getTrProps = (state, ri, ci, instance) => { + return { ri } } render() { - const { columns, treeTableIndent, ...rest } = this.props; - const { TrComponent, getTrProps } = this; + const { columns, treeTableIndent, ...rest } = this.props + const { TrComponent, getTrProps } = this const extra = { - columns: columns.map((col)=>{ - let column = col; - if(rest.pivotBy && rest.pivotBy.includes(col.accessor)) - { + columns: columns.map(col => { + let column = col + if (rest.pivotBy && rest.pivotBy.includes(col.accessor)) { column = { accessor: col.accessor, width: `${treeTableIndent}px`, @@ -59,22 +57,19 @@ export default (Component) => { Header: '', } } - return column; + return column }), TrComponent, getTrProps, - }; - - return ( - <Component {...rest} {...extra} ref={ r => this.wrappedInstance=r }/> - ) + } + + return <Component {...rest} {...extra} ref={r => (this.wrappedInstance = r)} /> } } - wrapper.displayName = 'RTTreeTable'; - wrapper.defaultProps = - { + wrapper.displayName = 'RTTreeTable' + wrapper.defaultProps = { treeTableIndent: 10, } - - return wrapper; + + return wrapper } diff --git a/src/index.js b/src/index.js index 3c3a3a1..d64ae72 100644 --- a/src/index.js +++ b/src/index.js @@ -142,7 +142,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const hasColumnFooter = allVisibleColumns.some(d => d.Footer) const hasFilters = filterable || allVisibleColumns.some(d => d.filterable) - const recurseRowsViewIndex = (rows, path = [], index = -1) => ([ + const recurseRowsViewIndex = (rows, path = [], index = -1) => [ rows.map((row, i) => { index += 1 const rowWithViewIndex = { @@ -154,14 +154,14 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { [rowWithViewIndex[subRowsKey], index] = recurseRowsViewIndex( rowWithViewIndex[subRowsKey], newPath, - index, + index ) } return rowWithViewIndex }), index, - ]) - ;[pageRows] = recurseRowsViewIndex(pageRows) + ]; + [pageRows] = recurseRowsViewIndex(pageRows) const canPrevious = page > 0 const canNext = page + 1 < pages @@ -170,7 +170,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { allVisibleColumns.map(d => { const resizedColumn = resized.find(x => x.id === d.id) || {} return _.getFirstDefined(resizedColumn.value, d.width, d.minWidth) - }), + }) ) let rowIndex = -1 @@ -188,44 +188,31 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { rowMinWidth, } - const rootProps = _.splitProps( - getProps(finalState, undefined, undefined, this), - ) - const tableProps = _.splitProps( - getTableProps(finalState, undefined, undefined, this), - ) - const tBodyProps = _.splitProps( - getTbodyProps(finalState, undefined, undefined, this), - ) + const rootProps = _.splitProps(getProps(finalState, undefined, undefined, this)) + const tableProps = _.splitProps(getTableProps(finalState, undefined, undefined, this)) + const tBodyProps = _.splitProps(getTbodyProps(finalState, undefined, undefined, this)) const loadingProps = getLoadingProps(finalState, undefined, undefined, this) const noDataProps = getNoDataProps(finalState, undefined, undefined, this) // Visual Components const makeHeaderGroup = (column, i) => { - const resizedValue = col => - (resized.find(x => x.id === col.id) || {}).value + const resizedValue = col => (resized.find(x => x.id === col.id) || {}).value const flex = _.sum( - column.columns.map( - col => (col.width || resizedValue(col) ? 0 : col.minWidth), - ), + column.columns.map(col => (col.width || resizedValue(col) ? 0 : col.minWidth)) ) const width = _.sum( - column.columns.map(col => - _.getFirstDefined(resizedValue(col), col.width, col.minWidth), - ), + column.columns.map(col => _.getFirstDefined(resizedValue(col), col.width, col.minWidth)) ) const maxWidth = _.sum( - column.columns.map(col => - _.getFirstDefined(resizedValue(col), col.width, col.maxWidth), - ), + column.columns.map(col => _.getFirstDefined(resizedValue(col), col.width, col.maxWidth)) ) const theadGroupThProps = _.splitProps( - getTheadGroupThProps(finalState, undefined, column, this), + getTheadGroupThProps(finalState, undefined, column, this) ) const columnHeaderProps = _.splitProps( - column.getHeaderProps(finalState, undefined, column, this), + column.getHeaderProps(finalState, undefined, column, this) ) const classes = [ @@ -271,10 +258,10 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeHeaderGroups = () => { const theadGroupProps = _.splitProps( - getTheadGroupProps(finalState, undefined, undefined, this), + getTheadGroupProps(finalState, undefined, undefined, this) ) const theadGroupTrProps = _.splitProps( - getTheadGroupTrProps(finalState, undefined, undefined, this), + getTheadGroupTrProps(finalState, undefined, undefined, this) ) return ( <TheadComponent @@ -299,30 +286,15 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeHeader = (column, i) => { const resizedCol = resized.find(x => x.id === column.id) || {} const sort = sorted.find(d => d.id === column.id) - const show = - typeof column.show === 'function' ? column.show() : column.show - const width = _.getFirstDefined( - resizedCol.value, - column.width, - column.minWidth, - ) - const maxWidth = _.getFirstDefined( - resizedCol.value, - column.width, - column.maxWidth, - ) - const theadThProps = _.splitProps( - getTheadThProps(finalState, undefined, column, this), - ) + const show = typeof column.show === 'function' ? column.show() : column.show + const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth) + const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth) + const theadThProps = _.splitProps(getTheadThProps(finalState, undefined, column, this)) const columnHeaderProps = _.splitProps( - column.getHeaderProps(finalState, undefined, column, this), + column.getHeaderProps(finalState, undefined, column, this) ) - const classes = [ - column.headerClassName, - theadThProps.className, - columnHeaderProps.className, - ] + const classes = [column.headerClassName, theadThProps.className, columnHeaderProps.className] const styles = { ...column.headerStyle, @@ -336,13 +308,13 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { } const isResizable = _.getFirstDefined(column.resizable, resizable, false) - const resizer = isResizable - ? (<ResizerComponent + const resizer = isResizable ? ( + <ResizerComponent onMouseDown={e => this.resizeColumnStart(e, column, false)} onTouchStart={e => this.resizeColumnStart(e, column, true)} {...getResizerProps('finalState', undefined, column, this)} - />) - : null + /> + ) : null const isSortable = _.getFirstDefined(column.sortable, sortable, false) @@ -355,9 +327,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { sort ? (sort.desc ? '-sort-desc' : '-sort-asc') : '', isSortable && '-cursor-pointer', !show && '-hidden', - pivotBy && - pivotBy.slice(0, -1).includes(column.id) && - 'rt-header-pivot', + pivotBy && pivotBy.slice(0, -1).includes(column.id) && 'rt-header-pivot' )} style={{ ...styles, @@ -370,24 +340,18 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { }} {...rest} > - <div className={classnames(isResizable && 'rt-resizable-header-content')}> - {_.normalizeComponent(column.Header, { - data: sortedData, - column, - })} - </div> + {_.normalizeComponent(column.Header, { + data: sortedData, + column, + })} {resizer} </ThComponent> ) } const makeHeaders = () => { - const theadProps = _.splitProps( - getTheadProps(finalState, undefined, undefined, this), - ) - const theadTrProps = _.splitProps( - getTheadTrProps(finalState, undefined, undefined, this), - ) + const theadProps = _.splitProps(getTheadProps(finalState, undefined, undefined, this)) + const theadTrProps = _.splitProps(getTheadTrProps(finalState, undefined, undefined, this)) return ( <TheadComponent className={classnames('-header', theadProps.className)} @@ -410,21 +374,13 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeFilter = (column, i) => { const resizedCol = resized.find(x => x.id === column.id) || {} - const width = _.getFirstDefined( - resizedCol.value, - column.width, - column.minWidth, - ) - const maxWidth = _.getFirstDefined( - resizedCol.value, - column.width, - column.maxWidth, - ) + const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth) + const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth) const theadFilterThProps = _.splitProps( - getTheadFilterThProps(finalState, undefined, column, this), + getTheadFilterThProps(finalState, undefined, column, this) ) const columnHeaderProps = _.splitProps( - column.getHeaderProps(finalState, undefined, column, this), + column.getHeaderProps(finalState, undefined, column, this) ) const classes = [ @@ -448,11 +404,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const ResolvedFilterComponent = column.Filter || FilterComponent - const isFilterable = _.getFirstDefined( - column.filterable, - filterable, - false, - ) + const isFilterable = _.getFirstDefined(column.filterable, filterable, false) return ( <ThComponent @@ -468,14 +420,14 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { > {isFilterable ? _.normalizeComponent( - ResolvedFilterComponent, - { - column, - filter, - onChange: value => this.filterColumn(column, value), - }, - defaultProps.column.Filter, - ) + ResolvedFilterComponent, + { + column, + filter, + onChange: value => this.filterColumn(column, value), + }, + defaultProps.column.Filter + ) : null} </ThComponent> ) @@ -483,10 +435,10 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeFilters = () => { const theadFilterProps = _.splitProps( - getTheadFilterProps(finalState, undefined, undefined, this), + getTheadFilterProps(finalState, undefined, undefined, this) ) const theadFilterTrProps = _.splitProps( - getTheadFilterTrProps(finalState, undefined, undefined, this), + getTheadFilterTrProps(finalState, undefined, undefined, this) ) return ( <TheadComponent @@ -513,7 +465,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { original: row[originalKey], row, index: row[indexKey], - viewIndex: rowIndex += 1, + viewIndex: (rowIndex += 1), pageSize, page, level: path.length, @@ -524,45 +476,23 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { } const isExpanded = _.get(expanded, rowInfo.nestingPath) const trGroupProps = getTrGroupProps(finalState, rowInfo, undefined, this) - const trProps = _.splitProps( - getTrProps(finalState, rowInfo, undefined, this), - ) + const trProps = _.splitProps(getTrProps(finalState, rowInfo, undefined, this)) return ( <TrGroupComponent key={rowInfo.nestingPath.join('_')} {...trGroupProps}> <TrComponent - className={classnames( - trProps.className, - row._viewIndex % 2 ? '-even' : '-odd', - )} + className={classnames(trProps.className, row._viewIndex % 2 ? '-even' : '-odd')} style={trProps.style} {...trProps.rest} > {allVisibleColumns.map((column, i2) => { const resizedCol = resized.find(x => x.id === column.id) || {} - const show = - typeof column.show === 'function' ? column.show() : column.show - const width = _.getFirstDefined( - resizedCol.value, - column.width, - column.minWidth, - ) - const maxWidth = _.getFirstDefined( - resizedCol.value, - column.width, - column.maxWidth, - ) - const tdProps = _.splitProps( - getTdProps(finalState, rowInfo, column, this), - ) - const columnProps = _.splitProps( - column.getProps(finalState, rowInfo, column, this), - ) + const show = typeof column.show === 'function' ? column.show() : column.show + const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth) + const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth) + const tdProps = _.splitProps(getTdProps(finalState, rowInfo, column, this)) + const columnProps = _.splitProps(column.getProps(finalState, rowInfo, column, this)) - const classes = [ - tdProps.className, - column.className, - columnProps.className, - ] + const classes = [tdProps.className, column.className, columnProps.className] const styles = { ...tdProps.style, @@ -605,28 +535,18 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { { expanded: newExpanded, }, - () => ( - onExpandedChange && - onExpandedChange(newExpanded, cellInfo.nestingPath, e) - ), + () => onExpandedChange && onExpandedChange(newExpanded, cellInfo.nestingPath, e) ) } // Default to a standard cell - let resolvedCell = _.normalizeComponent( - column.Cell, - cellInfo, - value, - ) + let resolvedCell = _.normalizeComponent(column.Cell, cellInfo, value) // Resolve Renderers const ResolvedAggregatedComponent = - column.Aggregated || - (!column.aggregate ? AggregatedComponent : column.Cell) - const ResolvedExpanderComponent = - column.Expander || ExpanderComponent - const ResolvedPivotValueComponent = - column.PivotValue || PivotValueComponent + column.Aggregated || (!column.aggregate ? AggregatedComponent : column.Cell) + const ResolvedExpanderComponent = column.Expander || ExpanderComponent + const ResolvedPivotValueComponent = column.PivotValue || PivotValueComponent const DefaultResolvedPivotComponent = PivotComponent || (props => ( @@ -635,8 +555,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { <ResolvedPivotValueComponent {...props} /> </div> )) - const ResolvedPivotComponent = - column.Pivot || DefaultResolvedPivotComponent + const ResolvedPivotComponent = column.Pivot || DefaultResolvedPivotComponent // Is this cell expandable? if (cellInfo.pivoted || cellInfo.expander) { @@ -652,12 +571,11 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { if (cellInfo.pivoted) { // Is this column a branch? - isBranch = - rowInfo.row[pivotIDKey] === column.id && cellInfo.subRows + isBranch = rowInfo.row[pivotIDKey] === column.id && cellInfo.subRows // Should this column be blank? isPreview = - pivotBy.indexOf(column.id) > - pivotBy.indexOf(rowInfo.row[pivotIDKey]) && cellInfo.subRows + pivotBy.indexOf(column.id) > pivotBy.indexOf(rowInfo.row[pivotIDKey]) && + cellInfo.subRows // Pivot Cell Render Override if (isBranch) { // isPivot @@ -667,31 +585,23 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { ...cellInfo, value: row[pivotValKey], }, - row[pivotValKey], + row[pivotValKey] ) } else if (isPreview) { // Show the pivot preview - resolvedCell = _.normalizeComponent( - ResolvedAggregatedComponent, - cellInfo, - value, - ) + resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value) } else { resolvedCell = null } } else if (cellInfo.aggregated) { - resolvedCell = _.normalizeComponent( - ResolvedAggregatedComponent, - cellInfo, - value, - ) + resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value) } if (cellInfo.expander) { resolvedCell = _.normalizeComponent( ResolvedExpanderComponent, cellInfo, - row[pivotValKey], + row[pivotValKey] ) if (pivotBy) { if (cellInfo.groupedByPivot) { @@ -703,9 +613,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { } } - const resolvedOnExpanderClick = useOnExpanderClick - ? onExpanderClick - : () => {} + const resolvedOnExpanderClick = useOnExpanderClick ? onExpanderClick : () => {} // If there are multiple onClick events, make sure they don't // override eachother. This should maybe be expanded to handle all @@ -735,7 +643,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { classes, !show && 'hidden', cellInfo.expandable && 'rt-expandable', - (isBranch || isPreview) && 'rt-pivot', + (isBranch || isPreview) && 'rt-pivot' )} style={{ ...styles, @@ -754,44 +662,22 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { </TrComponent> {rowInfo.subRows && isExpanded && - rowInfo.subRows.map((d, i) => - makePageRow(d, i, rowInfo.nestingPath), - )} - {SubComponent && - !rowInfo.subRows && - isExpanded && - SubComponent(rowInfo)} + rowInfo.subRows.map((d, i) => makePageRow(d, i, rowInfo.nestingPath))} + {SubComponent && !rowInfo.subRows && isExpanded && SubComponent(rowInfo)} </TrGroupComponent> ) } const makePadColumn = (column, i) => { const resizedCol = resized.find(x => x.id === column.id) || {} - const show = - typeof column.show === 'function' ? column.show() : column.show - const width = _.getFirstDefined( - resizedCol.value, - column.width, - column.minWidth, - ) + const show = typeof column.show === 'function' ? column.show() : column.show + const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth) const flex = width - const maxWidth = _.getFirstDefined( - resizedCol.value, - column.width, - column.maxWidth, - ) - const tdProps = _.splitProps( - getTdProps(finalState, undefined, column, this), - ) - const columnProps = _.splitProps( - column.getProps(finalState, undefined, column, this), - ) + const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth) + const tdProps = _.splitProps(getTdProps(finalState, undefined, column, this)) + const columnProps = _.splitProps(column.getProps(finalState, undefined, column, this)) - const classes = [ - tdProps.className, - column.className, - columnProps.className, - ] + const classes = [tdProps.className, column.className, columnProps.className] const styles = { ...tdProps.style, @@ -817,22 +703,15 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { } const makePadRow = (row, i) => { - const trGroupProps = getTrGroupProps( - finalState, - undefined, - undefined, - this, - ) - const trProps = _.splitProps( - getTrProps(finalState, undefined, undefined, this), - ) + const trGroupProps = getTrGroupProps(finalState, undefined, undefined, this) + const trProps = _.splitProps(getTrProps(finalState, undefined, undefined, this)) return ( <TrGroupComponent key={i} {...trGroupProps}> <TrComponent className={classnames( '-padRow', (pageRows.length + i) % 2 ? '-even' : '-odd', - trProps.className, + trProps.className )} style={trProps.style || {}} > @@ -844,26 +723,13 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeColumnFooter = (column, i) => { const resizedCol = resized.find(x => x.id === column.id) || {} - const show = - typeof column.show === 'function' ? column.show() : column.show - const width = _.getFirstDefined( - resizedCol.value, - column.width, - column.minWidth, - ) - const maxWidth = _.getFirstDefined( - resizedCol.value, - column.width, - column.maxWidth, - ) - const tFootTdProps = _.splitProps( - getTfootTdProps(finalState, undefined, undefined, this), - ) - const columnProps = _.splitProps( - column.getProps(finalState, undefined, column, this), - ) + const show = typeof column.show === 'function' ? column.show() : column.show + const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth) + const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth) + const tFootTdProps = _.splitProps(getTfootTdProps(finalState, undefined, undefined, this)) + const columnProps = _.splitProps(column.getProps(finalState, undefined, column, this)) const columnFooterProps = _.splitProps( - column.getFooterProps(finalState, undefined, column, this), + column.getFooterProps(finalState, undefined, column, this) ) const classes = [ @@ -904,9 +770,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makeColumnFooters = () => { const tFootProps = getTfootProps(finalState, undefined, undefined, this) - const tFootTrProps = _.splitProps( - getTfootTrProps(finalState, undefined, undefined, this), - ) + const tFootTrProps = _.splitProps(getTfootTrProps(finalState, undefined, undefined, this)) return ( <TfootComponent className={tFootProps.className} @@ -929,7 +793,7 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { const makePagination = () => { const paginationProps = _.splitProps( - getPaginationProps(finalState, undefined, undefined, this), + getPaginationProps(finalState, undefined, undefined, this) ) return ( <PaginationComponent @@ -957,16 +821,11 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { }} {...rootProps.rest} > - {showPagination && showPaginationTop - ? <div className="pagination-top"> - {pagination} - </div> - : null} + {showPagination && showPaginationTop ? ( + <div className="pagination-top">{pagination}</div> + ) : null} <TableComponent - className={classnames( - tableProps.className, - currentlyResizing ? 'rt-resizing' : '', - )} + className={classnames(tableProps.className, currentlyResizing ? 'rt-resizing' : '')} style={tableProps.style} {...tableProps.rest} > @@ -986,20 +845,13 @@ export default class ReactTable extends Methods(Lifecycle(Component)) { </TbodyComponent> {hasColumnFooter ? makeColumnFooters() : null} </TableComponent> - {showPagination && showPaginationBottom - ? <div className="pagination-bottom"> - {pagination} - </div> - : null} - {!pageRows.length && - <NoDataComponent {...noDataProps}> - {_.normalizeComponent(noDataText)} - </NoDataComponent>} - <LoadingComponent - loading={loading} - loadingText={loadingText} - {...loadingProps} - /> + {showPagination && showPaginationBottom ? ( + <div className="pagination-bottom">{pagination}</div> + ) : null} + {!pageRows.length && ( + <NoDataComponent {...noDataProps}>{_.normalizeComponent(noDataText)}</NoDataComponent> + )} + <LoadingComponent loading={loading} loadingText={loadingText} {...loadingProps} /> </div> ) } diff --git a/src/index.styl b/src/index.styl index ce2f398..a647fca 100644 --- a/src/index.styl +++ b/src/index.styl @@ -78,10 +78,6 @@ input-select-style() &:last-child overflow: hidden - .rt-resizable-header-content - overflow: hidden - text-overflow: ellipsis - .rt-header-pivot border-right-color: #f7f7f7 diff --git a/src/lifecycle.js b/src/lifecycle.js index 18a16e0..ba53438 100644 --- a/src/lifecycle.js +++ b/src/lifecycle.js @@ -17,10 +17,7 @@ export default Base => const defaultableOptions = ['sorted', 'filtered', 'resized', 'expanded'] defaultableOptions.forEach(x => { const defaultName = `default${x.charAt(0).toUpperCase() + x.slice(1)}` - if ( - JSON.stringify(oldState[defaultName]) !== - JSON.stringify(newState[defaultName]) - ) { + if (JSON.stringify(oldState[defaultName]) !== JSON.stringify(newState[defaultName])) { newState[x] = newState[defaultName] } }) @@ -34,8 +31,7 @@ export default Base => if (oldState[x] !== newState[x]) { const baseName = x.replace('able', '') const optionName = `${baseName}ed` - const defaultName = `default${optionName.charAt(0).toUpperCase() + - optionName.slice(1)}` + const defaultName = `default${optionName.charAt(0).toUpperCase() + optionName.slice(1)}` newState[optionName] = newState[defaultName] } }) @@ -79,13 +75,11 @@ export default Base => oldState.sorted !== newResolvedState.sorted || oldState.filtered !== newResolvedState.filtered || oldState.showFilters !== newResolvedState.showFilters || - (!newResolvedState.frozen && - oldState.resolvedData !== newResolvedState.resolvedData) + (!newResolvedState.frozen && oldState.resolvedData !== newResolvedState.resolvedData) ) { // Handle collapseOnsortedChange & collapseOnDataChange if ( - (oldState.sorted !== newResolvedState.sorted && - this.props.collapseOnSortingChange) || + (oldState.sorted !== newResolvedState.sorted && this.props.collapseOnSortingChange) || oldState.filtered !== newResolvedState.filtered || oldState.showFilters !== newResolvedState.showFilters || (oldState.sortedData && @@ -108,19 +102,19 @@ export default Base => if (newResolvedState.sortedData) { newResolvedState.pages = newResolvedState.manual ? newResolvedState.pages - : Math.ceil( - newResolvedState.sortedData.length / newResolvedState.pageSize, - ) + : Math.ceil(newResolvedState.sortedData.length / newResolvedState.pageSize) newResolvedState.page = Math.max( newResolvedState.page >= newResolvedState.pages ? newResolvedState.pages - 1 : newResolvedState.page, - 0, + 0 ) } return this.setState(newResolvedState, () => { - if (cb) { cb() } + if (cb) { + cb() + } if ( oldState.page !== newResolvedState.page || oldState.pageSize !== newResolvedState.pageSize || diff --git a/src/methods.js b/src/methods.js index c473ec1..cc567cb 100644 --- a/src/methods.js +++ b/src/methods.js @@ -40,9 +40,7 @@ export default Base => let columnsWithExpander = [...columns] let expanderColumn = columns.find( - col => - col.expander || - (col.columns && col.columns.some(col2 => col2.expander)), + col => col.expander || (col.columns && col.columns.some(col2 => col2.expander)) ) // The actual expander might be in the columns field of a group column if (expanderColumn && !expanderColumn.expander) { @@ -91,7 +89,7 @@ export default Base => if (dcol.accessor && !dcol.id) { console.warn(dcol) throw new Error( - 'A column id is required if using a non-string accessor for column above.', + 'A column id is required if using a non-string accessor for column above.' ) } @@ -128,11 +126,9 @@ export default Base => visibleColumns = visibleColumns.map(column => { if (column.columns) { - const visibleSubColumns = column.columns.filter(d => ( - pivotBy.indexOf(d.id) > -1 - ? false - : _.getFirstDefined(d.show, true) - )) + const visibleSubColumns = column.columns.filter( + d => (pivotBy.indexOf(d.id) > -1 ? false : _.getFirstDefined(d.show, true)) + ) return { ...column, columns: visibleSubColumns, @@ -141,13 +137,14 @@ export default Base => return column }) - visibleColumns = visibleColumns.filter(column => ( - column.columns - ? column.columns.length - : pivotBy.indexOf(column.id) > -1 - ? false - : _.getFirstDefined(column.show, true) - )) + visibleColumns = visibleColumns.filter( + column => + column.columns + ? column.columns.length + : pivotBy.indexOf(column.id) > -1 + ? false + : _.getFirstDefined(column.show, true) + ) // Find any custom pivot location const pivotIndex = visibleColumns.findIndex(col => col.pivot) @@ -164,9 +161,8 @@ export default Base => }) const PivotParentColumn = pivotColumns.reduce( - (prev, current) => - prev && prev === current.parentColumn && current.parentColumn, - pivotColumns[0].parentColumn, + (prev, current) => prev && prev === current.parentColumn && current.parentColumn, + pivotColumns[0].parentColumn ) let PivotGroupHeader = hasHeaderGroups && PivotParentColumn.Header @@ -237,18 +233,14 @@ export default Base => row[column.id] = column.accessor(d) }) if (row[subRowsKey]) { - row[subRowsKey] = row[subRowsKey].map((d, i) => - accessRow(d, i, level + 1), - ) + row[subRowsKey] = row[subRowsKey].map((d, i) => accessRow(d, i, level + 1)) } return row } let resolvedData = data.map((d, i) => accessRow(d, i)) // TODO: Make it possible to fabricate nested rows without pivoting - const aggregatingColumns = allVisibleColumns.filter( - d => !d.expander && d.aggregate, - ) + const aggregatingColumns = allVisibleColumns.filter(d => !d.expander && d.aggregate) // If pivoting, recursively group the data const aggregate = rows => { @@ -266,9 +258,7 @@ export default Base => return rows } // Group the rows together for this level - let groupedRows = Object.entries( - _.groupBy(rows, keys[i]), - ).map(([key, value]) => ({ + let groupedRows = Object.entries(_.groupBy(rows, keys[i])).map(([key, value]) => ({ [pivotIDKey]: keys[i], [pivotValKey]: key, [keys[i]]: key, @@ -323,14 +313,9 @@ export default Base => sortedData: manual ? resolvedData : this.sortData( - this.filterData( - resolvedData, - filtered, - defaultFilterMethod, - allVisibleColumns, - ), + this.filterData(resolvedData, filtered, defaultFilterMethod, allVisibleColumns), sorted, - sortMethodsByColumnID, + sortMethodsByColumnID ), } } @@ -365,9 +350,7 @@ export default Base => if (column.filterAll) { return filterMethod(nextFilter, filteredSoFar, column) } - return filteredSoFar.filter(row => ( - filterMethod(nextFilter, row, column) - )) + return filteredSoFar.filter(row => filterMethod(nextFilter, row, column)) }, filteredData) // Apply the filter to the subrows if we are pivoting, and then @@ -383,7 +366,7 @@ export default Base => row[this.props.subRowsKey], filtered, defaultFilterMethod, - allVisibleColumns, + allVisibleColumns ), } }) @@ -408,16 +391,12 @@ export default Base => sorted.map(sort => { // Support custom sorting methods for each column if (sortMethodsByColumnID[sort.id]) { - return (a, b) => ( - sortMethodsByColumnID[sort.id](a[sort.id], b[sort.id], sort.desc) - ) + return (a, b) => sortMethodsByColumnID[sort.id](a[sort.id], b[sort.id], sort.desc) } - return (a, b) => ( - this.props.defaultSortMethod(a[sort.id], b[sort.id], sort.desc) - ) + return (a, b) => this.props.defaultSortMethod(a[sort.id], b[sort.id], sort.desc) }), sorted.map(d => !d.desc), - this.props.indexKey, + this.props.indexKey ) sortedData.forEach(row => { @@ -427,7 +406,7 @@ export default Base => row[this.props.subRowsKey] = this.sortData( row[this.props.subRowsKey], sorted, - sortMethodsByColumnID, + sortMethodsByColumnID ) }) @@ -435,10 +414,7 @@ export default Base => } getMinRows () { - return _.getFirstDefined( - this.props.minRows, - this.getStateOrProp('pageSize'), - ) + return _.getFirstDefined(this.props.minRows, this.getStateOrProp('pageSize')) } // User actions @@ -449,9 +425,7 @@ export default Base => if (collapseOnPageChange) { newState.expanded = {} } - this.setStateWithData(newState, () => ( - onPageChange && onPageChange(page) - )) + this.setStateWithData(newState, () => onPageChange && onPageChange(page)) } onPageSizeChange (newPageSize) { @@ -467,9 +441,7 @@ export default Base => pageSize: newPageSize, page: newPage, }, - () => ( - onPageSizeChange && onPageSizeChange(newPageSize, newPage) - ), + () => onPageSizeChange && onPageSizeChange(newPageSize, newPage) ) } @@ -551,13 +523,13 @@ export default Base => if (!additive) { newSorted = newSorted.slice(existingIndex, column.length) } - // New Sort Column + // New Sort Column } else if (additive) { newSorted = newSorted.concat( column.map(d => ({ id: d.id, desc: firstSortDirection, - })), + })) ) } else { newSorted = column.map(d => ({ @@ -569,15 +541,10 @@ export default Base => this.setStateWithData( { - page: - (!sorted.length && newSorted.length) || !additive - ? 0 - : this.state.page, + page: (!sorted.length && newSorted.length) || !additive ? 0 : this.state.page, sorted: newSorted, }, - () => ( - onSortedChange && onSortedChange(newSorted, column, additive) - ), + () => onSortedChange && onSortedChange(newSorted, column, additive) ) } @@ -586,9 +553,7 @@ export default Base => const { onFilteredChange } = this.props // Remove old filter first if it exists - const newFiltering = (filtered || []).filter(x => ( - x.id !== column.id - )) + const newFiltering = (filtered || []).filter(x => x.id !== column.id) if (value !== '') { newFiltering.push({ @@ -601,16 +566,13 @@ export default Base => { filtered: newFiltering, }, - () => ( - onFilteredChange && onFilteredChange(newFiltering, column, value) - ), + () => onFilteredChange && onFilteredChange(newFiltering, column, value) ) } resizeColumnStart (event, column, isTouch) { event.stopPropagation() - const parentWidth = event.target.parentElement.getBoundingClientRect() - .width + const parentWidth = event.target.parentElement.getBoundingClientRect().width let pageX if (isTouch) { @@ -638,7 +600,7 @@ export default Base => document.addEventListener('mouseup', this.resizeColumnEnd) document.addEventListener('mouseleave', this.resizeColumnEnd) } - }, + } ) } @@ -662,7 +624,7 @@ export default Base => // group headers don't line up correctly const newWidth = Math.max( currentlyResizing.parentWidth + pageX - currentlyResizing.startX, - 11, + 11 ) newResized.push({ @@ -674,9 +636,7 @@ export default Base => { resized: newResized, }, - () => ( - onResizedChange && onResizedChange(newResized, event) - ), + () => onResizedChange && onResizedChange(newResized, event) ) } diff --git a/src/pagination.js b/src/pagination.js index 8b72813..fe64676 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -27,7 +27,7 @@ export default class ReactTablePagination extends Component { } getSafePage (page) { - if (isNaN(page)) { + if (Number.isNaN(page)) { page = this.props.page } return Math.min(Math.max(page, 0), this.props.pages - 1) @@ -42,7 +42,9 @@ export default class ReactTablePagination extends Component { } applyPage (e) { - if (e) { e.preventDefault() } + if (e) { + e.preventDefault() + } const page = this.state.page this.changePage(page === '' ? this.props.page : page) } @@ -66,10 +68,7 @@ export default class ReactTablePagination extends Component { } = this.props return ( - <div - className={classnames(className, '-pagination')} - style={this.props.style} - > + <div className={classnames(className, '-pagination')} style={this.props.style}> <div className="-previous"> <PreviousComponent onClick={() => { @@ -84,8 +83,8 @@ export default class ReactTablePagination extends Component { <div className="-center"> <span className="-pageInfo"> {this.props.pageText}{' '} - {showPageJump - ? <div className="-pageJump"> + {showPageJump ? ( + <div className="-pageJump"> <input type={this.state.page === '' ? 'text' : 'number'} onChange={e => { @@ -105,18 +104,14 @@ export default class ReactTablePagination extends Component { }} /> </div> - : <span className="-currentPage"> - {page + 1} - </span>}{' '} - {this.props.ofText}{' '} - <span className="-totalPages">{pages || 1}</span> + ) : ( + <span className="-currentPage">{page + 1}</span> + )}{' '} + {this.props.ofText} <span className="-totalPages">{pages || 1}</span> </span> - {showPageSizeOptions && + {showPageSizeOptions && ( <span className="select-wrap -pageSizeOptions"> - <select - onChange={e => onPageSizeChange(Number(e.target.value))} - value={pageSize} - > + <select onChange={e => onPageSizeChange(Number(e.target.value))} value={pageSize}> {pageSizeOptions.map((option, i) => ( // eslint-disable-next-line react/no-array-index-key <option key={i} value={option}> @@ -124,7 +119,8 @@ export default class ReactTablePagination extends Component { </option> ))} </select> - </span>} + </span> + )} </div> <div className="-next"> <NextComponent diff --git a/src/propTypes.js b/src/propTypes.js index 48b09a8..e386ff9 100644 --- a/src/propTypes.js +++ b/src/propTypes.js @@ -82,41 +82,13 @@ export default { columns: PropTypes.arrayOf( PropTypes.shape({ // Renderers - Cell: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - Header: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - Footer: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - Aggregated: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - Pivot: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - PivotValue: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), - Expander: PropTypes.oneOfType([ - PropTypes.element, - PropTypes.string, - PropTypes.func, - ]), + Cell: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + Header: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + Footer: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + Aggregated: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + Pivot: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + PivotValue: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), + Expander: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.func]), Filter: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), // All Columns @@ -146,7 +118,7 @@ export default { filterMethod: PropTypes.func, filterAll: PropTypes.bool, sortMethod: PropTypes.func, - }), + }) ), // Global Expander Column Defaults diff --git a/src/utils.js b/src/utils.js index 6a46465..eba20d4 100644 --- a/src/utils.js +++ b/src/utils.js @@ -78,9 +78,7 @@ function orderBy (arr, funcs, dirs, indexKey) { } } // Use the row index for tie breakers - return dirs[0] - ? rowA[indexKey] - rowB[indexKey] - : rowB[indexKey] - rowA[indexKey] + return dirs[0] ? rowA[indexKey] - rowB[indexKey] : rowB[indexKey] - rowA[indexKey] }) } @@ -103,7 +101,7 @@ function clone (a) { return value.toString() } return value - }), + }) ) } catch (e) { return a @@ -119,9 +117,7 @@ function getFirstDefined (...args) { } function sum (arr) { - return arr.reduce((a, b) => ( - a + b - ), 0) + return arr.reduce((a, b) => a + b, 0) } function makeTemplateComponent (compClass, displayName) { @@ -208,9 +204,13 @@ function isSortingDesc (d) { } function normalizeComponent (Comp, params = {}, fallback = Comp) { - return typeof Comp === 'function' - ? Object.getPrototypeOf(Comp).isReactComponent - ? <Comp {...params} /> - : Comp(params) - : fallback + return typeof Comp === 'function' ? ( + Object.getPrototypeOf(Comp).isReactComponent ? ( + <Comp {...params} /> + ) : ( + Comp(params) + ) + ) : ( + fallback + ) } diff --git a/yarn.lock b/yarn.lock index 7aaaf62..5eebdfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,85 @@ # yarn lockfile v1 +"@babel/code-frame@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" + dependencies: + "@babel/highlight" "7.0.0-beta.44" + +"@babel/generator@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42" + dependencies: + "@babel/types" "7.0.0-beta.44" + jsesc "^2.5.1" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.44" + "@babel/template" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-get-function-arity@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-split-export-declaration@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/highlight@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/template@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + lodash "^4.2.0" + +"@babel/traverse@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/generator" "7.0.0-beta.44" + "@babel/helper-function-name" "7.0.0-beta.44" + "@babel/helper-split-export-declaration" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + debug "^3.1.0" + globals "^11.1.0" + invariant "^2.2.0" + lodash "^4.2.0" + +"@babel/types@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" acorn-jsx@^3.0.0: version "3.0.1" @@ -16,37 +92,33 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" - -acorn@^5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" - -acorn@^5.2.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" +acorn@^5.2.1, acorn@^5.5.0: + version "5.5.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv@^4.7.0: - version "4.11.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.2.tgz#f166c3c11cbc6cb9dcc102a5bcfe5b72c95287e6" +ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.2.0: - version "5.2.3" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2" +ajv@^5.2.3, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" - json-stable-stringify "^1.0.1" amdefine@>=0.0.4: version "1.0.1" @@ -56,9 +128,9 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" -ansi-escapes@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" +ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" ansi-regex@^2.0.0: version "2.1.1" @@ -72,41 +144,48 @@ ansi-styles@^2.1.0, ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.0: +ansi-styles@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" dependencies: color-convert "^1.9.0" -anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" dependencies: - arrify "^1.0.0" micromatch "^2.1.5" + normalize-path "^2.0.0" aproba@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" are-we-there-yet@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" dependencies: delegates "^1.0.0" - readable-stream "^2.0.0 || ^1.1.13" + readable-stream "^2.0.6" argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" dependencies: sprintf-js "~1.0.2" aria-query@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" + version "0.7.1" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.1.tgz#26cbb5aff64144b0a825be1846e0b16cfa00b11e" dependencies: ast-types-flow "0.0.7" + commander "^2.11.0" arr-diff@^2.0.0: version "2.0.0" @@ -115,8 +194,8 @@ arr-diff@^2.0.0: arr-flatten "^1.0.1" arr-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" array-filter@~0.0.0: version "0.0.1" @@ -167,21 +246,21 @@ arrify@^1.0.0, arrify@~1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" asap@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - ast-types-flow@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" @@ -210,8 +289,8 @@ aws-sign2@~0.6.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" aws4@^1.2.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" axobject-query@^0.1.0: version "0.1.0" @@ -245,15 +324,7 @@ babel-cli@6.14.0: optionalDependencies: chokidar "^1.0.0" -babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -babel-code-frame@^6.26.0: +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -295,14 +366,16 @@ babel-eslint@6.1.2: lodash.assign "^4.0.0" lodash.pickby "^4.0.0" -babel-eslint@^7.2.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" +babel-eslint@^8.2.2: + version "8.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.3.tgz#1a2e6681cc9bc4473c32899e59915e19cd6733cf" dependencies: - babel-code-frame "^6.22.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.17.0" + "@babel/code-frame" "7.0.0-beta.44" + "@babel/traverse" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + eslint-scope "~3.7.1" + eslint-visitor-keys "^1.0.0" babel-generator@^6.22.0: version "6.22.0" @@ -838,14 +911,14 @@ babel-register@^6.14.0, babel-register@^6.22.0: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.6.1, babel-runtime@^6.9.0: +babel-runtime@^6.18.0, babel-runtime@^6.6.1, babel-runtime@^6.9.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-runtime@^6.26.0: +babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: @@ -886,7 +959,7 @@ babel-traverse@^6.0.20, babel-traverse@^6.22.0, babel-traverse@^6.22.1: invariant "^2.2.0" lodash "^4.2.0" -babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -909,7 +982,7 @@ babel-types@^6.0.19, babel-types@^6.19.0, babel-types@^6.22.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -918,18 +991,18 @@ babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" +babylon@7.0.0-beta.44: + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" + babylon@^6.0.18, babylon@^6.11.0, babylon@^6.15.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" -babylon@^6.17.0, babylon@^6.18.0: +babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -939,8 +1012,8 @@ base16@^1.0.0: resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" bcrypt-pbkdf@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" dependencies: tweetnacl "^0.14.3" @@ -960,8 +1033,8 @@ bin-version@^1.0.0: find-versions "^1.0.0" binary-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" block-stream@*: version "0.0.9" @@ -975,16 +1048,9 @@ boom@2.x.x: dependencies: hoek "2.x.x" -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" +brace-expansion@^1.0.0, brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1011,14 +1077,18 @@ browserslist@^2.1.2: caniuse-lite "^1.0.30000792" electron-to-chromium "^1.3.30" -buffer-shims@^1.0.0: +buffer-from@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" -builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +builtin-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -1056,6 +1126,10 @@ caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + chalk@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.1.tgz#509afb67066e7499f7eb3535c77445772ae2d019" @@ -1066,7 +1140,7 @@ chalk@1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1076,15 +1150,19 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" +chalk@^2.0.0, chalk@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" dependencies: - ansi-styles "^3.1.0" + ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" - supports-color "^4.0.0" + supports-color "^5.3.0" -chokidar@^1.0.0, chokidar@^1.5.1, chokidar@~1.6.0: +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + +chokidar@^1.0.0, chokidar@^1.5.1: version "1.6.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" dependencies: @@ -1099,9 +1177,24 @@ chokidar@^1.0.0, chokidar@^1.5.1, chokidar@~1.6.0: optionalDependencies: fsevents "^1.0.0" +chokidar@~1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" classnames@^2.2.5: version "2.2.5" @@ -1120,8 +1213,8 @@ cli-cursor@^2.1.0: restore-cursor "^2.0.0" cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" cliui@^3.2.0: version "3.2.0" @@ -1140,8 +1233,8 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" @@ -1150,12 +1243,16 @@ color-name@^1.1.1: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" dependencies: delayed-stream "~1.0.0" -commander@^2.8.1, commander@^2.9.0: +commander@^2.11.0, commander@^2.9.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +commander@^2.8.1: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -1170,9 +1267,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" concat-stream@^1.5.2, concat-stream@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" dependencies: + buffer-from "^1.0.0" inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" @@ -1194,10 +1292,10 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + version "2.5.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b" -core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1209,7 +1307,7 @@ create-react-class@^15.6.0: loose-envify "^1.3.1" object-assign "^4.1.1" -cross-spawn@^5.1.0: +cross-spawn@^5.1.0, cross-spawn@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -1217,13 +1315,6 @@ cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@~4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1240,11 +1331,11 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: - es5-ext "~0.10.2" + es5-ext "^0.10.9" damerau-levenshtein@^1.0.0: version "1.0.4" @@ -1260,25 +1351,25 @@ debug-log@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@*, debug@^2.1.1, debug@^2.2.0: +debug@*, debug@^2.2.0: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: ms "2.0.0" -debug@2.2.0, debug@~2.2.0: +debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" -debug@^2.6.8: +debug@^2.1.1, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" -debug@^3.0.1: +debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: @@ -1289,8 +1380,8 @@ decamelize@^1.1.1, decamelize@^1.1.2: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" deep-extend@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" deep-is@~0.1.3: version "0.1.3" @@ -1340,6 +1431,10 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + diacritic@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/diacritic/-/diacritic-0.0.2.tgz#fc2a887b5a5bc0a0a854fb614c7c2f209061ee04" @@ -1351,12 +1446,11 @@ doctrine@1.5.0, doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" +doctrine@^2.0.0, doctrine@^2.0.2, doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: esutils "^2.0.2" - isarray "^1.0.0" duplexer@~0.1.1: version "0.1.1" @@ -1386,19 +1480,13 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -error-ex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" - dependencies: - is-arrayish "^0.2.1" - -error-ex@^1.3.1: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" -es-abstract@^1.4.3, es-abstract@^1.7.0: +es-abstract@^1.4.3: version "1.7.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" dependencies: @@ -1407,6 +1495,16 @@ es-abstract@^1.4.3, es-abstract@^1.7.0: is-callable "^1.1.3" is-regex "^1.0.3" +es-abstract@^1.7.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" @@ -1415,57 +1513,58 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.42" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d" dependencies: - es6-iterator "2" - es6-symbol "~3.1" + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "1" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" @@ -1480,29 +1579,29 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-airbnb-base@^11.3.0: - version "11.3.2" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a" +eslint-config-airbnb-base@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz#386441e54a12ccd957b0a92564a4bafebd747944" dependencies: eslint-restricted-globals "^0.1.1" -eslint-config-airbnb@^15.1.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e" +eslint-config-airbnb@16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.1.0.tgz#2546bfb02cc9fe92284bf1723ccf2e87bc45ca46" dependencies: - eslint-config-airbnb-base "^11.3.0" + eslint-config-airbnb-base "^12.1.0" eslint-config-react-tools@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/eslint-config-react-tools/-/eslint-config-react-tools-1.0.10.tgz#7ee9e856583b6082d09fb56a42020dd90b3f5bc9" + version "1.2.5" + resolved "https://registry.yarnpkg.com/eslint-config-react-tools/-/eslint-config-react-tools-1.2.5.tgz#b5a6d80c18b8be7f5c1fcd50e0028428ea4247fe" dependencies: - babel-eslint "^7.2.3" - eslint "^4.3.0" - eslint-config-airbnb "^15.1.0" - eslint-plugin-class-property "^1.0.6" - eslint-plugin-import "^2.7.0" - eslint-plugin-jsx-a11y "^6.0.2" - eslint-plugin-react "^7.4.0" + babel-eslint "^8.2.2" + eslint "^4.19.1" + eslint-config-airbnb "16.1.0" + eslint-plugin-babel "^4.1.2" + eslint-plugin-import "^2.9.0" + eslint-plugin-jsx-a11y "^6.0.3" + eslint-plugin-react "^7.7.0" eslint-config-standard-jsx@4.0.2: version "4.0.2" @@ -1521,11 +1620,11 @@ eslint-import-resolver-node@^0.2.0: resolve "^1.1.6" eslint-import-resolver-node@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" + version "0.3.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" dependencies: - debug "^2.6.8" - resolve "^1.2.0" + debug "^2.6.9" + resolve "^1.5.0" eslint-module-utils@^2.0.0: version "2.0.0" @@ -1534,33 +1633,37 @@ eslint-module-utils@^2.0.0: debug "2.2.0" pkg-dir "^1.0.0" -eslint-module-utils@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" +eslint-module-utils@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" dependencies: debug "^2.6.8" pkg-dir "^1.0.0" +eslint-plugin-babel@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.1.2.tgz#79202a0e35757dd92780919b2336f1fa2fe53c1e" + eslint-plugin-class-property@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-class-property/-/eslint-plugin-class-property-1.0.6.tgz#c3bc3fc4207b283bf82e69e3dd1b6e2491a57623" + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-class-property/-/eslint-plugin-class-property-1.1.0.tgz#355784133d4852b8870bd1cb429a1b0403cc7aef" dependencies: eslint "^3.19.0" -eslint-plugin-import@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" +eslint-plugin-import@^2.7.0, eslint-plugin-import@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.11.0.tgz#15aeea37a67499d848e8e981806d4627b5503816" dependencies: - builtin-modules "^1.1.1" contains-path "^0.1.0" debug "^2.6.8" doctrine "1.5.0" eslint-import-resolver-node "^0.3.1" - eslint-module-utils "^2.1.1" + eslint-module-utils "^2.2.0" has "^1.0.1" - lodash.cond "^4.3.0" + lodash "^4.17.4" minimatch "^3.0.3" read-pkg-up "^2.0.0" + resolve "^1.6.0" eslint-plugin-import@~2.2.0: version "2.2.0" @@ -1577,9 +1680,9 @@ eslint-plugin-import@~2.2.0: minimatch "^3.0.3" pkg-up "^1.0.0" -eslint-plugin-jsx-a11y@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f" +eslint-plugin-jsx-a11y@^6.0.2, eslint-plugin-jsx-a11y@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.3.tgz#54583d1ae442483162e040e13cc31865465100e5" dependencies: aria-query "^0.7.0" array-includes "^3.0.3" @@ -1587,7 +1690,7 @@ eslint-plugin-jsx-a11y@^6.0.2: axobject-query "^0.1.0" damerau-levenshtein "^1.0.0" emoji-regex "^6.1.0" - jsx-ast-utils "^1.4.0" + jsx-ast-utils "^2.0.0" eslint-plugin-node@~4.2.2: version "4.2.2" @@ -1603,14 +1706,14 @@ eslint-plugin-promise@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" -eslint-plugin-react@^7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a" +eslint-plugin-react@^7.4.0, eslint-plugin-react@^7.7.0: + version "7.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160" dependencies: - doctrine "^2.0.0" + doctrine "^2.0.2" has "^1.0.1" - jsx-ast-utils "^2.0.0" - prop-types "^15.5.10" + jsx-ast-utils "^2.0.1" + prop-types "^15.6.0" eslint-plugin-react@~6.10.0: version "6.10.3" @@ -1630,13 +1733,17 @@ eslint-restricted-globals@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" -eslint-scope@^3.7.1: +eslint-scope@^3.7.1, eslint-scope@~3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + eslint@^3.19.0, eslint@~3.19.0: version "3.19.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" @@ -1677,32 +1784,32 @@ eslint@^3.19.0, eslint@~3.19.0: text-table "~0.2.0" user-home "^2.0.0" -eslint@^4.1.1: - version "4.8.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.8.0.tgz#229ef0e354e0e61d837c7a80fdfba825e199815e" +eslint@^4.1.1, eslint@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: - ajv "^5.2.0" + ajv "^5.3.0" babel-code-frame "^6.22.0" chalk "^2.1.0" concat-stream "^1.6.0" cross-spawn "^5.1.0" - debug "^3.0.1" - doctrine "^2.0.0" + debug "^3.1.0" + doctrine "^2.1.0" eslint-scope "^3.7.1" - espree "^3.5.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" esquery "^1.0.0" - estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" glob "^7.1.2" - globals "^9.17.0" + globals "^11.0.1" ignore "^3.3.3" imurmurhash "^0.1.4" inquirer "^3.0.6" is-resolvable "^1.0.0" js-yaml "^3.9.1" - json-stable-stringify "^1.0.1" + json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.4" minimatch "^3.0.2" @@ -1712,98 +1819,41 @@ eslint@^4.1.1: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" + regexpp "^1.0.1" require-uncached "^1.0.3" semver "^5.3.0" strip-ansi "^4.0.0" strip-json-comments "~2.0.1" - table "^4.0.1" + table "4.0.2" text-table "~0.2.0" -eslint@^4.3.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.10.0.tgz#f25d0d7955c81968c2309aa5c9a229e045176bb7" +espree@^3.4.0, espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" dependencies: - ajv "^5.2.0" - babel-code-frame "^6.22.0" - chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^3.0.1" - doctrine "^2.0.0" - eslint-scope "^3.7.1" - espree "^3.5.1" - esquery "^1.0.0" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^9.17.0" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" - json-stable-stringify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^7.0.0" - progress "^2.0.0" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" - -espree@^3.4.0: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" - dependencies: - acorn "^5.0.1" + acorn "^5.5.0" acorn-jsx "^3.0.0" -espree@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" - dependencies: - acorn "^5.1.1" - acorn-jsx "^3.0.0" - -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" + estraverse "^4.1.0" -estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" - estree-walker@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" @@ -1820,12 +1870,12 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" event-stream@~3.3.0: version "3.3.4" @@ -1856,16 +1906,16 @@ expand-range@^1.8.1: fill-range "^2.1.0" extend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" external-editor@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" dependencies: + chardet "^0.4.0" iconv-lite "^0.4.17" - jschardet "^1.4.2" - tmp "^0.0.31" + tmp "^0.0.33" extglob@^0.3.1: version "0.3.2" @@ -1873,13 +1923,21 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" fast-levenshtein@~2.0.4: version "2.0.6" @@ -1930,8 +1988,8 @@ file-entry-cache@^2.0.0: object-assign "^4.0.1" filename-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" fill-range@^2.1.0: version "2.2.3" @@ -1970,23 +2028,23 @@ find-versions@^1.0.0: semver-regex "^1.0.0" flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" dependencies: circular-json "^0.3.1" del "^2.0.2" graceful-fs "^4.1.2" write "^0.2.1" -for-in@^0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" for-own@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: - for-in "^0.1.5" + for-in "^1.0.1" foreach@^2.0.5: version "2.0.5" @@ -1997,8 +2055,8 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" form-data@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" @@ -2017,13 +2075,13 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" fsevents@^1.0.0: - version "1.0.17" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.17.tgz#8537f3f12272678765b4fd6528c0f1f66f8f4558" + version "1.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.29" + node-pre-gyp "^0.6.39" -fstream-ignore@~1.0.5: +fstream-ignore@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" dependencies: @@ -2031,18 +2089,18 @@ fstream-ignore@~1.0.5: inherits "2" minimatch "^3.0.0" -fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2, function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" functional-red-black-tree@^1.0.1: version "1.0.1" @@ -2052,9 +2110,9 @@ gather-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b" -gauge@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -2063,7 +2121,6 @@ gauge@~2.7.1: signal-exit "^3.0.0" string-width "^1.0.1" strip-ansi "^3.0.1" - supports-color "^0.2.0" wide-align "^1.1.0" generate-function@^2.0.0: @@ -2089,8 +2146,8 @@ get-stdin@^5.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" @@ -2153,7 +2210,11 @@ global-object@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-object/-/global-object-1.0.0.tgz#2a1b45e901d55e4773154f12f0cec1ef9aba5f9f" -globals@^9.0.0, globals@^9.14.0, globals@^9.17.0, globals@^9.18.0: +globals@^11.0.1, globals@^11.1.0: + version "11.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc" + +globals@^9.0.0, globals@^9.14.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -2187,6 +2248,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.4: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -2196,6 +2261,13 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -2206,9 +2278,9 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" has-unicode@^2.0.0: version "2.0.1" @@ -2220,7 +2292,7 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" -hawk@~3.1.3: +hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -2241,8 +2313,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + version "2.6.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" http-signature@~1.1.0: version "1.1.1" @@ -2253,13 +2325,19 @@ http-signature@~1.1.0: sshpk "^1.7.0" iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + version "0.4.21" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + dependencies: + safer-buffer "^2.1.0" -ignore@^3.0.11, ignore@^3.0.9, ignore@^3.2.0, ignore@^3.3.3: +ignore@^3.0.11, ignore@^3.0.9: version "3.3.3" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +ignore@^3.2.0, ignore@^3.3.3: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -2277,13 +2355,13 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" inquirer@^0.12.0: version "0.12.0" @@ -2304,11 +2382,11 @@ inquirer@^0.12.0: through "^2.3.6" inquirer@^3.0.6: - version "3.1.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.1.1.tgz#87621c4fba4072f48a8dd71c9f9df6f100b2d534" + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: - ansi-escapes "^2.0.0" - chalk "^1.0.0" + ansi-escapes "^3.0.0" + chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" external-editor "^2.0.4" @@ -2318,20 +2396,26 @@ inquirer@^3.0.6: run-async "^2.2.0" rx-lite "^4.0.8" rx-lite-aggregates "^4.0.8" - string-width "^2.0.0" - strip-ansi "^3.0.0" + string-width "^2.1.0" + strip-ansi "^4.0.0" through "^2.3.6" interpret@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.0, invariant@^2.2.2: +invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: loose-envify "^1.0.0" +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" @@ -2346,9 +2430,9 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-buffer@^1.0.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" is-builtin-module@^1.0.0: version "1.0.0" @@ -2365,8 +2449,8 @@ is-date-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" is-equal-shallow@^0.1.3: version "0.1.3" @@ -2408,40 +2492,51 @@ is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" +is-my-ip-valid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" + is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + version "2.17.2" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" jsonpointer "^4.0.0" xtend "^4.0.0" -is-number@^2.0.2, is-number@^2.1.0: +is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" dependencies: kind-of "^3.0.2" +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" dependencies: path-is-inside "^1.0.1" is-posix-bracket@^0.1.0: version "0.1.1" - resolved "http://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" is-primitive@^2.0.0: version "2.0.0" @@ -2455,15 +2550,15 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" -is-regex@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" +is-regex@^1.0.3, is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" is-stream@^1.0.1: version "1.1.0" @@ -2485,9 +2580,9 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isexe@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isobject@^2.0.0: version "2.1.0" @@ -2506,50 +2601,33 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" -js-tokens@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" - -js-tokens@^3.0.2: +js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.5.1: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" - -js-yaml@^3.9.1: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" +js-yaml@^3.5.1, js-yaml@^3.9.1: + version "3.11.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" - -jschardet@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a" + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -2566,6 +2644,10 @@ json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" @@ -2589,28 +2671,35 @@ jsonpointer@^4.0.0: resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" jsprim@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" dependencies: - extsprintf "1.0.2" + assert-plus "1.0.0" + extsprintf "1.3.0" json-schema "0.2.3" - verror "1.3.6" + verror "1.10.0" -jsx-ast-utils@^1.3.4, jsx-ast-utils@^1.4.0: +jsx-ast-utils@^1.3.4: version "1.4.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" -jsx-ast-utils@^2.0.0: +jsx-ast-utils@^2.0.0, jsx-ast-utils@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: array-includes "^3.0.3" kind-of@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: - is-buffer "^1.0.2" + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" lcid@^1.0.0: version "1.0.0" @@ -2680,7 +2769,11 @@ lodash.pickby@^4.0.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.17.4, lodash@^4.3.0: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + +lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2704,17 +2797,17 @@ loud-rejection@^1.0.0: signal-exit "^3.0.0" lru-cache@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + version "4.1.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" + pseudomap "^1.0.2" + yallist "^2.1.2" magic-string@^0.22.4: - version "0.22.4" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.4.tgz#31039b4e40366395618c1d6cf8193c53917475ff" + version "0.22.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" dependencies: - vlq "^0.2.1" + vlq "^0.2.2" map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" @@ -2768,27 +2861,27 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -mime-db@~1.26.0: - version "1.26.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" dependencies: - mime-db "~1.26.0" + mime-db "~1.33.0" mimic-fn@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" -"minimatch@2 || 3", minimatch@^3.0.2: +"minimatch@2 || 3": version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.0, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -2802,7 +2895,7 @@ minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2825,8 +2918,8 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" nan@^2.3.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" natural-compare@^1.4.0: version "1.4.0" @@ -2836,34 +2929,50 @@ neo-async@^1.0.0: version "1.8.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-1.8.2.tgz#31795888b79dd04357a7c52113a65183e93b6735" +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + node-fetch@^1.0.1: - version "1.6.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: encoding "^0.1.11" is-stream "^1.0.1" -node-pre-gyp@^0.6.29: - version "0.6.32" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" +node-pre-gyp@^0.6.39: + version "0.6.39" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: - mkdirp "~0.5.1" - nopt "~3.0.6" - npmlog "^4.0.1" - rc "~1.1.6" - request "^2.79.0" - rimraf "~2.5.4" - semver "~5.3.0" - tar "~2.2.1" - tar-pack "~3.3.0" + detect-libc "^1.0.2" + hawk "3.1.3" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" dependencies: abbrev "1" + osenv "^0.1.4" -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: +normalize-package-data@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-package-data@^2.3.4: version "2.3.5" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" dependencies: @@ -2872,9 +2981,11 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" normalize-range@^0.1.2: version "0.1.2" @@ -2894,13 +3005,13 @@ npm-run-all@^4.1.2: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npmlog@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" - gauge "~2.7.1" + gauge "~2.7.3" set-blocking "~2.0.0" num2fraction@^1.2.2: @@ -2938,31 +3049,25 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@^1.3.0: +once@^1.3.0, once@^1.3.3: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" -once@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - onchange@^3.0.2: - version "3.2.1" - resolved "https://registry.yarnpkg.com/onchange/-/onchange-3.2.1.tgz#7669312c8a8f94d80b4595dc8abe5d119559f7e0" + version "3.3.0" + resolved "https://registry.yarnpkg.com/onchange/-/onchange-3.3.0.tgz#da9250b1623e019f0f71dc8afd56273406472b61" dependencies: arrify "~1.0.1" - chokidar "~1.6.0" - cross-spawn "~4.0.0" + chokidar "~1.7.0" + cross-spawn "~5.1.0" minimist "~1.2.0" - tree-kill "~1.1.0" + tree-kill "~1.2.0" onetime@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" onetime@^2.0.0: version "2.0.1" @@ -2991,10 +3096,17 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + output-file-sync@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" @@ -3004,8 +3116,10 @@ output-file-sync@^1.1.0: object-assign "^4.1.0" p-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + dependencies: + p-try "^1.0.0" p-locate@^2.0.0: version "2.0.0" @@ -3013,6 +3127,10 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -3087,6 +3205,10 @@ pause-stream@0.0.11: dependencies: through "~2.3" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -3188,9 +3310,9 @@ private@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" progress@^1.1.8: version "1.1.8" @@ -3201,14 +3323,14 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" promise@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" dependencies: asap "~2.0.3" prop-types@^15.5.10, prop-types@^15.6.0: - version "15.6.0" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" + version "15.6.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" dependencies: fbjs "^0.8.16" loose-envify "^1.3.1" @@ -3227,7 +3349,7 @@ ps-tree@^1.1.0: dependencies: event-stream "~3.3.0" -pseudomap@^1.0.1: +pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -3240,24 +3362,28 @@ pure-color@^1.2.0: resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.2.0.tgz#702d2f2819dd545b1fde5116fca5f0c2dad2d18d" qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" randomatic@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" + is-number "^3.0.0" + kind-of "^4.0.0" -rc@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" +rc@^1.1.7: + version "1.2.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092" dependencies: deep-extend "~0.4.0" ini "~1.3.0" minimist "^1.2.0" - strip-json-comments "~1.0.4" + strip-json-comments "~2.0.1" react-base16-styling@^0.5.1: version "0.5.3" @@ -3339,28 +3465,16 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: - buffer-shims "^1.0.0" core-util-is "~1.0.0" - inherits "~2.0.1" + inherits "~2.0.3" isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" util-deprecate "~1.0.1" readdirp@^2.0.0: @@ -3398,12 +3512,12 @@ regenerate@^1.2.1: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" regenerator-runtime@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" regenerator-runtime@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" regenerator-transform@^0.10.0: version "0.10.1" @@ -3414,11 +3528,14 @@ regenerator-transform@^0.10.0: private "^0.1.6" regex-cache@^0.4.2: - version "0.4.3" - resolved "http://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" + +regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" regexpu-core@^2.0.0: version "2.0.0" @@ -3438,6 +3555,10 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -3452,7 +3573,34 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.65.0, request@^2.79.0: +request@2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@^2.65.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -3496,22 +3644,16 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" -resolve@^1.1.6, resolve@^1.1.7: +resolve@^1.1.6, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + +resolve@^1.1.7: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" -resolve@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" - dependencies: - path-parse "^1.0.5" - -resolve@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -3526,24 +3668,12 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" -rimraf@2, rimraf@^2.2.8: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" - dependencies: - glob "^7.0.5" - -rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" -rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" - dependencies: - glob "^7.0.5" - rollup-plugin-babel@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.3.tgz#63adedc863130327512a4a9006efc2241c5b7c15" @@ -3551,8 +3681,8 @@ rollup-plugin-babel@^3.0.3: rollup-pluginutils "^1.5.0" rollup-plugin-commonjs@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz#91b4ba18f340951e39ed7b1901f377a80ab3f9c3" + version "8.4.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz#5c9cea2b2c3de322f5fbccd147e07ed5e502d7a0" dependencies: acorn "^5.2.1" estree-walker "^0.5.0" @@ -3561,10 +3691,10 @@ rollup-plugin-commonjs@^8.3.0: rollup-pluginutils "^2.0.1" rollup-plugin-node-resolve@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.2.tgz#38babc12fd404cc2ba1ff68648fe43fa3ffee6b0" + version "3.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713" dependencies: - builtin-modules "^1.1.0" + builtin-modules "^2.0.0" is-module "^1.0.0" resolve "^1.1.6" @@ -3597,8 +3727,8 @@ rollup-pluginutils@^2.0.1: micromatch "^2.3.11" rollup@^0.55.3: - version "0.55.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.3.tgz#0af082a766d51c3058430c8372442ff5207d8736" + version "0.55.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.5.tgz#2f88c300f7cf24b5ec2dca8a6aba73b04e087e93" run-async@^0.1.0: version "0.1.0" @@ -3630,6 +3760,14 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +safer-buffer@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + sax@0.5.x: version "0.5.8" resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" @@ -3644,7 +3782,11 @@ semver-truncate@^1.0.0: dependencies: semver "^5.3.0" -"semver@2 || 3 || 4 || 5", semver@5.3.0, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + 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" @@ -3684,8 +3826,8 @@ shell-quote@^1.6.1: jsonify "~0.0.0" shelljs@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -3703,6 +3845,12 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -3729,19 +3877,27 @@ source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" dependencies: - spdx-license-ids "^1.0.2" + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" split@0.3: version "0.3.3" @@ -3754,8 +3910,8 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" + version "1.14.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -3764,7 +3920,6 @@ sshpk@^1.7.0: optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" jsbn "~0.1.0" tweetnacl "~0.14.0" @@ -3797,7 +3952,7 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -3805,12 +3960,12 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" + strip-ansi "^4.0.0" string.prototype.padend@^3.0.0: version "3.0.0" @@ -3820,9 +3975,11 @@ string.prototype.padend@^3.0.0: es-abstract "^1.4.3" function-bind "^1.0.2" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" stringstream@~0.0.4: version "0.0.5" @@ -3856,10 +4013,6 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-json-comments@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" - strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -3875,10 +4028,6 @@ stylus@^0.54.5: sax "0.5.x" source-map "0.1.x" -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -3889,11 +4038,22 @@ supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: - has-flag "^2.0.0" + has-flag "^3.0.0" + +table@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" + dependencies: + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" table@^3.7.8: version "3.8.3" @@ -3906,31 +4066,20 @@ table@^3.7.8: slice-ansi "0.0.4" string-width "^2.0.0" -table@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" +tar-pack@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" -tar-pack@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" - dependencies: - debug "~2.2.0" - fstream "~1.0.10" - fstream-ignore "~1.0.5" - once "~1.3.3" - readable-stream "~2.1.4" - rimraf "~2.5.1" - tar "~2.2.1" - uid-number "~0.0.6" - -tar@~2.2.1: +tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" dependencies: @@ -3946,11 +4095,11 @@ through@2, through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" -tmp@^0.0.31: - version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" dependencies: - os-tmpdir "~1.0.1" + os-tmpdir "~1.0.2" to-fast-properties@^1.0.1: version "1.0.2" @@ -3960,23 +4109,33 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: punycode "^1.4.1" -tree-kill@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.1.0.tgz#c963dcf03722892ec59cba569e940b71954d1729" +tree-kill@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" tunnel-agent@~0.4.1: version "0.4.3" @@ -3997,8 +4156,8 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" ua-parser-js@^0.7.9: - version "0.7.12" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" + version "0.7.17" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" uglify-es@^3.3.7: version "3.3.9" @@ -4007,7 +4166,7 @@ uglify-es@^3.3.7: commander "~2.13.0" source-map "~0.6.1" -uid-number@~0.0.6: +uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" @@ -4030,8 +4189,8 @@ util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" v8flags@^2.0.10: version "2.0.11" @@ -4040,41 +4199,43 @@ v8flags@^2.0.10: user-home "^1.1.1" validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" dependencies: - extsprintf "1.0.2" + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" -vlq@^0.2.1: +vlq@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" whatwg-fetch@>=0.10.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.2.tgz#fe294d1d89e36c5be8b3195057f2e4bc74fc980e" + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" which@^1.2.9: - version "1.2.12" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: - isexe "^1.1.1" + isexe "^2.0.0" wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" dependencies: - string-width "^1.0.1" + string-width "^1.0.2" window-size@^0.2.0: version "0.2.0" @@ -4109,9 +4270,9 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yallist@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" yargs-parser@^2.4.1: version "2.4.1"