diff --git a/.babelrc b/.babelrc index ccdf91186..191431ebc 100644 --- a/.babelrc +++ b/.babelrc @@ -1,27 +1,20 @@ -{ - "presets": [ - "env", - "react" - ], - "plugins": [ - "transform-class-properties", - "transform-object-rest-spread" - ], - "env": { - "production": { - "plugins": [ - [ - "react-remove-properties", - { - "properties": [ - "data-testid" - ] - } - ] - ], - "ignore": [ - "src/lib/__tests__/**" - ] - } - } -} +{ + "presets": ["@babel/preset-env", "@babel/preset-react"], + "plugins": [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-object-rest-spread" + ], + "env": { + "production": { + "plugins": [ + [ + "react-remove-properties", + { + "properties": ["data-testid"] + } + ] + ], + "ignore": ["src/lib/__tests__/**"] + } + } +} diff --git a/.editorconfig b/.editorconfig index d1684d045..a49e35b0c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ -[*] -indent_style = space -indent_size = 2 -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.eslintrc b/.eslintrc index ef898e76b..35589f8f1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,34 +1,34 @@ -{ - "plugins": [ - "react", - "jest", - "prettier" - ], - "env": { - "jest/globals": true, - "browser": true, - "node": true, - "es6": true - }, - "rules": { - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-unused-prop-types": 2, - "react/react-in-jsx-scope": 2, - "no-labels": 0, - "arrow-parens": 0 - }, - "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "prettier", - "prettier/react" - ], - "parser": "babel-eslint", - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "sourceType": "module" - } -} +{ + "plugins": [ + "react", + "jest", + "prettier" + ], + "env": { + "jest/globals": true, + "browser": true, + "node": true, + "es6": true + }, + "rules": { + "react/jsx-uses-react": 2, + "react/jsx-uses-vars": 2, + "react/no-unused-prop-types": 2, + "react/react-in-jsx-scope": 2, + "no-labels": 0, + "arrow-parens": 0 + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "prettier", + "prettier/react" + ], + "parser": "babel-eslint", + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "sourceType": "module" + } +} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a4c61fb41..05234037b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,23 +1,23 @@ -## Contributing - -### Create an Issue - -If you find a bug, have a suggestion, or a feature request submit an issue. - -* Check existing issues before creating one. -* Provide as much information as possible, including a minimal, reproducible example of the issue you're encountering (if possible). - -### Submit a Pull Request - -Before you submit your pull request please read and consider the following guidelines: - -* Please open an issue that describes the enhancement/bug fix before creating the PR. Doing so allows for discussion around the code change proposal. -* Search our repo for an open or closed pull request that relates to your issue. -* Fork the repository and submit a pull request back to the `master` branch. -* If your pull request fixes an issue, make sure to [reference the issue so it is closed with the pull request](https://github.com/gitbucket/gitbucket/wiki/How-to-Close-Reference-issues-&-pull-request). (eg. 'fixes #8') - -## Code Styling - -All code is linted for consistency. - -* To check for style lint run `npm run lint`. To fix linting errors, run `npm run lint:fix` +## Contributing + +### Create an Issue + +If you find a bug, have a suggestion, or a feature request submit an issue. + +* Check existing issues before creating one. +* Provide as much information as possible, including a minimal, reproducible example of the issue you're encountering (if possible). + +### Submit a Pull Request + +Before you submit your pull request please read and consider the following guidelines: + +* Please open an issue that describes the enhancement/bug fix before creating the PR. Doing so allows for discussion around the code change proposal. +* Search our repo for an open or closed pull request that relates to your issue. +* Fork the repository and submit a pull request back to the `master` branch. +* If your pull request fixes an issue, make sure to [reference the issue so it is closed with the pull request](https://github.com/gitbucket/gitbucket/wiki/How-to-Close-Reference-issues-&-pull-request). (eg. 'fixes #8') + +## Code Styling + +All code is linted for consistency. + +* To check for style lint run `npm run lint`. To fix linting errors, run `npm run lint:fix` diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 21a24e280..a15b71892 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,47 +1,47 @@ ---- -name: Bug report -about: Create a report to help us improve ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** - -_Please provide one or both of the following:_ - -Code (If you have a branch somewhere that shows your issue) or link to codesandbox example. [Here's a base template for this library](https://codesandbox.io/s/w6xvqzno4w): - -OR - -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Library Version** -Please provide version of library in which this bug is occurring. - -**Desktop (please complete the following information):** - -* OS: [e.g. iOS] -* Browser [e.g. chrome, safari] -* Version [e.g. 22] - -**Smartphone (please complete the following information):** - -* Device: [e.g. iPhone6] -* OS: [e.g. iOS8.1] -* Browser [e.g. stock browser, safari] -* Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. +--- +name: Bug report +about: Create a report to help us improve +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** + +_Please provide one or both of the following:_ + +Code (If you have a branch somewhere that shows your issue) or link to codesandbox example. [Here's a base template for this library](https://codesandbox.io/s/w6xvqzno4w): + +OR + +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Library Version** +Please provide version of library in which this bug is occurring. + +**Desktop (please complete the following information):** + +* OS: [e.g. iOS] +* Browser [e.g. chrome, safari] +* Version [e.g. 22] + +**Smartphone (please complete the following information):** + +* Device: [e.g. iPhone6] +* OS: [e.g. iOS8.1] +* Browser [e.g. stock browser, safari] +* Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 066b2d920..538429512 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,17 +1,17 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bd7adcb32..dca15d095 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,9 @@ -**Issue Number** - -Link to issue this PR addresses. If no issue exists, please provide reasoning for PR. - -**Overview of PR** - -Provide an overview of the changes in this PR. - -_Don't forget to update the CHANGELOG.md file with any changes that are in this PR_ +**Issue Number** + +Link to issue this PR addresses. If no issue exists, please provide reasoning for PR. + +**Overview of PR** + +Provide an overview of the changes in this PR. + +_Don't forget to update the CHANGELOG.md file with any changes that are in this PR_ diff --git a/.npmrc b/.npmrc index 214c29d13..538f0f031 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -registry=https://registry.npmjs.org/ +registry=https://registry.npmjs.org/ diff --git a/.prettierrc b/.prettierrc index fd496a820..2d9d58ad7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,4 @@ -{ - "singleQuote": true, - "semi": false -} +{ + "singleQuote": true, + "semi": false +} diff --git a/.travis.yml b/.travis.yml index 7940d7fb6..5243a960d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ -language: node_js -node_js: - - "8" -after_success: - - bash deploy-gh-pages.sh -env: - global: - - ENCRYPTION_LABEL: "d8c751632116" - - COMMIT_AUTHOR_EMAIL: "deploy@travis" +language: node_js +node_js: + - "8" +after_success: + - bash deploy-gh-pages.sh +env: + global: + - ENCRYPTION_LABEL: "d8c751632116" + - COMMIT_AUTHOR_EMAIL: "deploy@travis" diff --git a/CHANGELOG.md b/CHANGELOG.md index a83167594..03a23704b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,199 @@ and this project adheres (more or less) to [Semantic Versioning](http://semver.o ## Unreleased + +## 0.28.0 + +* Add unit argument to onZoom and onTimeChange callbacks @hckr #655 +* Add `className` prop to Timeline component to override `react-calendar-timeline` class #682 +* support zoom level seconds #835 @horizon-plaza +* custom buffer prop (help with controlled scrolling) @Ilaiwi +* Fix injecting custom vertical line's class names for time periods longer than day @RafikiTiki +* fix Context Menu unintentionally disabled by default @dsgipe #769 +* delete props `headerLabelFormats` and `subHeaderLabelFormats` not you can pass `formatLabel` function to `DateHeader` with label width and start and end time of intervals + + +## 0.26.7 + +* fix scrolling with trackpad @ilaiwi #679 +* remove duplicate proptype validation in `TimelineStateContext` @xat + +## 0.26.6 + +* fix `visibleTimeStart`, `visibleTimeEnd` and `onTimeChange` not working as expected in controlled mode @ilaiwi + +### examples + +two new examples + +#### Controlled scroll + +Controlled visible port of the calendar using `visibleTimeStart` and `visibleTimeEnd`. This also limits scrolling by mouse and adds two buttons to change the visible port of the calendar + +[Example Codesandbox](https://codesandbox.io/s/timeline-demo-controlled-visible-time-no-scroll-659jb) + +#### Programmatically Scrolling + +Using controlled scroll and react-spring to trigger scrolling and create an animation. + +[Example Codesandbox](https://codesandbox.io/s/confident-waterfall-3kq2503y8p) + +## 0.26.5 + +* improve performance by: + - eliminate extra call of layout on state update @ilaiwi + - eliminate unmounting and mounting of Interval Component @ilaiwi + +## 0.26.4 + +* fix `react-calendar-timeline` not working with `react-hot-loader` #607 @ilaiwi + @westn +* add documentation for `stackItems` format #661 @tyson-kubota + +## 0.26.3 + +* add documentation for `onItemDeselect` #350 @ilaiwi +* solve a bug where `onItemDeselect` is not triggered as expected for several item clicks #350 @ilaiwi +* fix row height on browser scaling #615 @gaston-niglia + +### Packages + +update to `node-sass@4.12.0` for newer versions of node. + +## 0.26.2 + +* render the items layer after columns and rows for layring @ilaiwi + +## 0.26.1 + +* fix issue where mouse down gets stuck when scrolling the timeline #526 @KhalidArdah + +you can as well solve the issue without upgrading by adding the following style + +``` +.react-calendar-timeline .rct-horizontal-lines { + -webkit-user-select: none; + -moz-user-select: -moz-none; + -ms-user-select: none; + user-select: none; +} +``` + +[as here](https://codesandbox.io/s/timeline-demo-sticky-header-w6s5f) + +## 0.26.0 + +#### Added + +* Add `onItemDrag` prop to `` #517 @bettymakes +* Upgrade to Babel 7.5.0, Jest 24.8.0, Enzyme 3.10.0 @trevdor + +#### Breaking + +* Removed `` in favour of allowing for custom component to be rendered on move or resize. Check out the demo in `demo/app/demo-custom-info-label` for an example on how to display your own custom info label or [this example](https://codesandbox.io/s/timeline-demo-info-label-neec9). + + +## 0.25.4 + +* Move `classnames` to a production dependency + +## 0.25.3 + +* Fixed the `undefined` classnames in TimelineHeaders #566 @trevdor + +## 0.25.2 + +* Fixed the auto-scroll right bug in a scaled browser. #528 @cw196 + +## 0.25.1 + +* fix error when using `week` unit causing format error in `DateHeader` #562 @dkarnutsch +* fix Wheel/Mousewheel Event errors on chrome 73 #541 @ilaiwi + +## 0.25.0 + +### Custom Headers + +This new feature gives more control to dev to create customizable headers to provide better UI. Now user have more control through a set of new components to render headers. This new feature came with a breaking change though. + +```jsx +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + + {({ + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod, + data, + }) => { + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + backgroundColor: 'Turquoise', + color: 'white' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('YYYY')} +
+
+ ) + })} +
+ ) + }} +
+
+
+``` + +Check out the new docs before please [here](https://github.com/namespace-ee/react-calendar-timeline/tree/custom-headers#timeline-headers) + +#### removed props + +* `stickyOffset` and `stickyHeader` now you can make your header sticky by following this [examples](https://github.com/namespace-ee/react-calendar-timeline/tree/master/examples#custom-item-rendering) +* `headerRef` to get the headerRef you need to pass ref callback to `TimelineHeader` component +* `headerLabelGroupHeight` and `headerLabelHeight` now you can pass a `height` prop to both `CustomHeader` and `DateHeader` +* `headerLabelFormats` and `subHeaderLabelFormats` not you can pass `formatLabel` function to `DateHeader` with label width and start and end time of intervals + +## 0.23.1 + +* fix height calculation of stacked items is off if no item is visible in a line @Felix-N +* fix Unsubscribing markers correctly when unmounted @gaston-niglia + ## 0.23.0 -- improve unit tests coverage #426 - @ilaiwi -- stack items by group #384 - @acemac -- fix bug where `canMove` prop gets ignored #484 - @acemac + @ilaiwi -- fix sidebar re-render when groupHeights do not change #478 - @SDupZ +* improve unit tests coverage #426 - @ilaiwi +* stack items by group #384 - @acemac +* fix bug where `canMove` prop gets ignored #484 - @acemac + @ilaiwi +* fix sidebar re-render when groupHeights do not change #478 - @SDupZ ### Stack per group @@ -59,15 +246,14 @@ ReactDOM.render( ) ``` - ## 0.22.0 ### Fixed * Provided a new key `groupLabelKey` to allow splitting of the key used to render the Sidebar and the InfoLabel visible during drag operations. `groupTitleKey` continues to be used to render the Sidebar. #442 @thiagosatoshi -* fix scroll left/right causes item move/edit to be at incorrect time #401 @acemac -* now `getResizeProps` take `leftClassName` and `rightClassName` and returns className for left and right props @acemac -* fix functionality of `itemTitle` and `itemDivTitle` [issue](https://github.com/namespace-ee/react-calendar-timeline/issues/429#issuecomment-426456693) @acemac +* fix scroll left/right causes item move/edit to be at incorrect time #401 @acemac +* now `getResizeProps` take `leftClassName` and `rightClassName` and returns className for left and right props @acemac +* fix functionality of `itemTitle` and `itemDivTitle` [issue](https://github.com/namespace-ee/react-calendar-timeline/issues/429#issuecomment-426456693) @acemac ### 0.21.0 @@ -84,9 +270,11 @@ ReactDOM.render( ### 0.20.0 ### improvements + * eliminate extra renders on every scroll - #357 [acemac](https://github.com/acemac) ### Fixed + * When the `date` prop on a `CustomMarker` changes the marker will now move on the timeline - #421 [kevinmanncito](https://github.com/kevinmanncito) [ilaiwi](https://github.com/ilaiwi) * Header has a bounce effect - #311 [acemac](https://github.com/acemac) @@ -95,8 +283,6 @@ ReactDOM.render( * update to `react-testing-library` version 5 * remove deprecated `toBeInDom` - - ### 0.19.0 ### Added @@ -135,7 +321,7 @@ ReactDOM.render( ### Breaking -* Removed support for React 15 and lower. This is due to the fact that 16+ supports returning arrays from render, something that the TimelineMarker feature relies on. +* Removed support for React 15 and lower. This is due to the fact that 16+ supports returning arrays from render, something that the TimelineMarker feature relies on. * removed `showCursorLine` prop in favor of using the `CursorMarker` component. See `TimelineMarkers` section of README for documentation. ```diff @@ -159,6 +345,7 @@ from 'react-calendar-timeline' ### 0.17.3 ### Added + * fix issue with single row header - #359 ### 0.17.2 diff --git a/LICENSE.md b/LICENSE.md index c03b4e9df..3fa2da1d6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,8 +1,8 @@ -# The MIT License (MIT) -Copyright (c) 2015-2017 Marius Andra ; Namespace OÜ - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# The MIT License (MIT) +Copyright (c) 2015-2017 Marius Andra ; Namespace OÜ + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 9f06b30a7..d7f5c7dbb 100644 --- a/README.md +++ b/README.md @@ -1,1464 +1,1299 @@ -# React Calendar Timeline - -A modern and responsive React timeline component. - -![calendar demo](https://raw.githubusercontent.com/namespace-ee/react-calendar-timeline/master/demo.gif) - -Checkout the [examples here](https://github.com/namespace-ee/react-calendar-timeline/tree/master/examples)! - -# Getting started - -```bash -# via yarn -yarn add react-calendar-timeline - -# via npm -npm install --save react-calendar-timeline -``` - -`react-calendar-timeline` has [react](https://reactjs.org/), [react-dom](https://reactjs.org/docs/react-dom.html), [`moment`](http://momentjs.com/) and [`interactjs`](http://interactjs.io/docs/) as peer dependencies. - -# Usage - -At the very minimum: - -```jsx -import Timeline from 'react-calendar-timeline' -// make sure you include the timeline stylesheet or the timeline will not be styled -import 'react-calendar-timeline/lib/Timeline.css' -import moment from 'moment' - -const groups = [{ id: 1, title: 'group 1' }, { id: 2, title: 'group 2' }] - -const items = [ - { - id: 1, - group: 1, - title: 'item 1', - start_time: moment(), - end_time: moment().add(1, 'hour') - }, - { - id: 2, - group: 2, - title: 'item 2', - start_time: moment().add(-0.5, 'hour'), - end_time: moment().add(0.5, 'hour') - }, - { - id: 3, - group: 1, - title: 'item 3', - start_time: moment().add(2, 'hour'), - end_time: moment().add(3, 'hour') - } -] - -ReactDOM.render( -
- Rendered by react! - -
, - document.getElementById('root') -) -``` - -# API - -_NB!_ All props need to be immutable. For example, this means if you wish to change the title of one of your items, please pass in a whole new items array instead of changing the title in the old array. [Here's more info.](http://reactkungfu.com/2015/08/pros-and-cons-of-using-immutability-with-react-js/) - -The component can take many props: - -## groups - -Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: - -```js -{ - id: 1, - title: 'group 1', - rightTitle: 'title in the right sidebar', - stackItems?: false or 'space' or 'line', - height?: 30 -} -``` - -If you use the right sidebar, you can pass optional `rightTitle` property here. -If you want to overwrite the calculated height with a custom height, you can pass a `height` property as an int in pixels here. This can be very useful for categorized groups. - -## items - -Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: - -```js -{ - id: 1, - group: 1, - title: 'Random title', - start_time: 1457902922261, - end_time: 1457902922261 + 86400000, - canMove: true, - canResize: false, - canChangeGroup: false, - className: 'weekend', - style: { - backgroundColor: 'fuchsia' - }, - itemProps: { - // these optional attributes are passed to the root
of each item as
- 'data-custom-attribute': 'Random content', - 'aria-hidden': true, - onDoubleClick: () => { console.log('You clicked double!') } - } -} -``` - -The preferred (fastest) option is to give Unix timestamps in milliseconds for `start_time` and `end_time`. Objects that convert to them (JavaScript `Date` or `moment()`) will also work, but will be a lot slower. - -## defaultTimeStart and defaultTimeEnd - -Unless overridden by `visibleTimeStart` and `visibleTimeEnd`, specify where the calendar begins and where it ends. This parameter expects a Date or moment object. - -## visibleTimeStart and visibleTimeEnd - -The exact viewport of the calendar. When these are specified, scrolling in the calendar must be orchestrated by the `onTimeChange` function. This parameter expects a Unix timestamp in milliseconds. - -**Note that you need to provide either `defaultTimeStart/End` or `visibleTimeStart/End` for the timeline to function** - -## selected - -An array with id's corresponding to id's in items (`item.id`). If this prop is set you have to manage the selected items yourself within the `onItemSelect` handler to update the property with new id's. This overwrites the default behaviour of selecting one item on click. - -## keys - -An array specifying keys in the `items` and `groups` objects. Defaults to - -```js -{ - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - groupLabelKey: 'title', // key for what to show in `InfoLabel` - itemIdKey: 'id', - itemTitleKey: 'title', // key for item div content - itemDivTitleKey: 'title', // key for item div title (
) - itemGroupKey: 'group', - itemTimeStartKey: 'start_time', - itemTimeEndKey: 'end_time', -} -``` - -## sidebarWidth - -Width of the sidebar in pixels. If set to `0`, the sidebar is not rendered. Defaults to `150`. - -## sidebarContent - -Everything passed here will be displayed above the left sidebar. Use this to display small filters or so. Defaults to `null`. - -## rightSidebarWidth - -Width of the right sidebar in pixels. If set to `0`, the right sidebar is not rendered. Defaults to `0`. - -## rightSidebarContent - -Everything passed here will be displayed above the right sidebar. Use this to display small filters or so. Defaults to `null`. - -## dragSnap - -Snapping unit when dragging items. Defaults to `15 * 60 * 1000` or 15min. When so, the items will snap to 15min intervals when dragging. - -## minResizeWidth - -The minimum width, in pixels, of a timeline entry when it's possible to resize. If not reached, you must zoom in to resize more. Default to `20`. - -## stickyOffset - -At what height from the top of the screen should we start "sticking" the header (i.e. position: sticky)? This is useful if for example you already have a sticky navbar and want to push the timeline header down further. Defaults `0`. - -## stickyHeader - -Specify whether you want the timeline header to be "sticky". Pass `false` if you want the header to fix at top of element and not fix when you scroll down the page. Defaults to `true` - -## headerRef - -Ref callback that gets a DOM reference to the header element. See [FAQ below](#the-timeline-header-doesnt-fix-to-the-top-of-the-container-when-i-scroll-down). - -## lineHeight - -Height of one line in the calendar in pixels. Default `30` - -## headerLabelGroupHeight - -Height of the top header line. Default `30` - -## headerLabelHeight - -Height of the bottom header line. Default `30` - -## itemHeightRatio - -What percentage of the height of the line is taken by the item? Default `0.65` - -## minZoom - -Smallest time the calendar can zoom to in milliseconds. Default `60 * 60 * 1000` (1 hour) - -## maxZoom - -Largest time the calendar can zoom to in milliseconds. Default `5 * 365.24 * 86400 * 1000` (5 years) - -## clickTolerance - -How many pixels we can drag the background for it to be counted as a click on the background. Default `3` - -## canMove - -Can items be dragged around? Can be overridden in the `items` array. Defaults to `true` - -## canChangeGroup - -Can items be moved between groups? Can be overridden in the `items` array. Defaults to `true` - -## canResize - -Can items be resized? Can be overridden in the `items` array. Accepted values: `false`, `"left"`, `"right"`, `"both"`. Defaults to `"right"`. If you pass `true`, it will be treated as `"right"` to not break compatibility with versions 0.9 and below. - -## useResizeHandle - -Append a special `.rct-drag-right` handle to the elements and only resize if dragged from there. Defaults to `false` - -### stackItems - -Stack items under each other, so there is no visual overlap when times collide. Can be overridden in the `groups` array. Defaults to `false`. - -can be assigned to -- false -- space (saves space in stacking) -- line (stack each item in a line) - -## traditionalZoom - -Zoom in when scrolling the mouse up/down. Defaults to `false` - -## itemTouchSendsClick - -Normally tapping (touching) an item selects it. If this is set to true, a tap will have the same effect, as selecting with the first click and then clicking again to open and send the onItemClick event. Defaults to `false`. - -## timeSteps - -With what step to display different units. E.g. `15` for `minute` means only minutes 0, 15, 30 and 45 will be shown. - -Default: - -```js -{ - second: 1, - minute: 1, - hour: 1, - day: 1, - month: 1, - year: 1 -} -``` - -## scrollRef - -Ref callback that gets a DOM reference to the scroll body element. Can be useful to programmatically scroll. - -## onItemMove(itemId, dragTime, newGroupOrder) - -Callback when an item is moved. Returns 1) the item's ID, 2) the new start time and 3) the index of the new group in the `groups` array. - -## onItemResize(itemId, time, edge) - -Callback when an item is resized. Returns 1) the item's ID, 2) the new start or end time of the item 3) The edge that was dragged (`left` or `right`) - -## onItemSelect(itemId, e, time) - -Called when an item is selected. This is sent on the first click on an item. `time` is the time that corresponds to where you click/select on the item in the timeline. - -## onItemClick(itemId, e, time) - -Called when an item is clicked. Note: the item must be selected before it's clicked... except if it's a touch event and `itemTouchSendsClick` is enabled. `time` is the time that corresponds to where you click on the item in the timeline. - -## onItemDoubleClick(itemId, e, time) - -Called when an item was double clicked. `time` is the time that corresponds to where you double click on the item in the timeline. - -## onItemContextMenu(itemId, e, time) - -Called when the item is clicked by the right button of the mouse. `time` is the time that corresponds to where you context click on the item in the timeline. Note: If this property is set the default context menu doesn't appear. - -## onCanvasClick(groupId, time, e) - -Called when an empty spot on the canvas was clicked. Get the group ID and the time as arguments. For example open a "new item" window after this. - -## onCanvasDoubleClick(group, time, e) - -Called when an empty spot on the canvas was double clicked. Get the group and the time as arguments. - -## onCanvasContextMenu(group, time, e) - -Called when the canvas is clicked by the right button of the mouse. Note: If this property is set the default context menu doesn't appear - -## onZoom(timelineContext) - -Called when the timeline is zoomed, either via mouse/pinch zoom or clicking header to change timeline units - -## moveResizeValidator(action, itemId, time, resizeEdge) - -This function is called when an item is being moved or resized. It's up to this function to return a new version of `change`, when the proposed move would violate business logic. - -The argument `action` is one of `move` or `resize`. - -The argument `resizeEdge` is when resizing one of `left` or `right`. - -The argument `time` describes the proposed new time for either the start time of the item (for move) or the start or end time (for resize). - -The function must return a new unix timestamp in milliseconds... or just `time` if the proposed new time doesn't interfere with business logic. - -For example, to prevent moving of items into the past, but to keep them at 15min intervals, use this code: - -```js -function (action, item, time, resizeEdge) { - if (time < new Date().getTime()) { - var newTime = Math.ceil(new Date().getTime() / (15*60*1000)) * (15*60*1000); - return newTime; - } - - return time -} -``` - -## onUpdateMove(itemId, time, newGroup, action,resizeEdge) - -this function is called after moveResizeValidator on every drag update - - -## headerLabelFormats and subHeaderLabelFormats - -The formats passed to moment to render times in the header and subheader. Defaults to these: - -```js -import { - defaultHeaderLabelFormats, - defaultSubHeaderLabelFormats -} from 'react-calendar-timeline' - -defaultHeaderLabelFormats == - { - yearShort: 'YY', - yearLong: 'YYYY', - monthShort: 'MM/YY', - monthMedium: 'MM/YYYY', - monthMediumLong: 'MMM YYYY', - monthLong: 'MMMM YYYY', - dayShort: 'L', - dayLong: 'dddd, LL', - hourShort: 'HH', - hourMedium: 'HH:00', - hourMediumLong: 'L, HH:00', - hourLong: 'dddd, LL, HH:00', - time: 'LLL' - } - -defaultSubHeaderLabelFormats == - { - yearShort: 'YY', - yearLong: 'YYYY', - monthShort: 'MM', - monthMedium: 'MMM', - monthLong: 'MMMM', - dayShort: 'D', - dayMedium: 'dd D', - dayMediumLong: 'ddd, Do', - dayLong: 'dddd, Do', - hourShort: 'HH', - hourLong: 'HH:00', - minuteShort: 'mm', - minuteLong: 'HH:mm' - } -``` - -For US time formats (AM/PM), use these: - -```js -import { - defaultHeaderLabelFormats, - defaultSubHeaderLabelFormats -} from 'react-calendar-timeline' - -const usHeaderLabelFormats = Object.assign({}, defaultSubHeaderLabelFormats, { - hourShort: 'h A', - hourMedium: 'h A', - hourMediumLong: 'L, h A', - hourLong: 'dddd, LL, h A' -}) - -const usSubHeaderLabelFormats = Object.assign( - {}, - defaultSubHeaderLabelFormats, - { - hourShort: 'h A', - hourLong: 'h A', - minuteLong: 'h:mm A' - } -) -``` - -... and then pass these as `headerLabelFormats` and `subHeaderLabelFormats` - -## onTimeChange(visibleTimeStart, visibleTimeEnd, updateScrollCanvas) - -A function that's called when the user tries to scroll. Call the passed `updateScrollCanvas(start, end)` with the updated visibleTimeStart and visibleTimeEnd (as unix timestamps in milliseconds) to change the scroll behavior, for example to limit scrolling. - -Here is an example that limits the timeline to only show dates starting 6 months from now and ending in 6 months. - -```js -// this limits the timeline to -6 months ... +6 months -const minTime = moment().add(-6, 'months').valueOf() -const maxTime = moment().add(6, 'months').valueOf() - -function (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) { - if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { - updateScrollCanvas(minTime, maxTime) - } else if (visibleTimeStart < minTime) { - updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) - } else if (visibleTimeEnd > maxTime) { - updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) - } else { - updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - } -} -``` - -## onBoundsChange(canvasTimeStart, canvasTimeEnd) - -Called when the bounds in the calendar's canvas change. Use it for example to load new data to display. (see "Behind the scenes" below). `canvasTimeStart` and `canvasTimeEnd` are unix timestamps in milliseconds. - -## itemRenderer - -Render prop function used to render a customized item. The function provides multiple parameters that can be used to render each item. - -Parameters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions - -#### Render props params - -##### context - -* `item` has the item we passed as a prop to the calendar. - -* `timelineContext` - -| property | type | description | -| ------------------ | -------- | ---------------------------------------------------- | -| `timelineWidth` | `number` | returns the full width of the timeline. | -| `visibleTimeStart` | `number` | returns the exact start of view port of the calender | -| `visibleTimeEnd` | `number` | returns the exact end of view port of the calender. | -| `canvasTimeStart` | `number` | denotes the start time in ms of the canvas timeline | -| `canvasTimeEnd` | `number` | denotes the end time in ms of the canvas timeline | - -* `itemContext` - -| property | type | description | -| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `dimensions` | `object` | returns the dimensions of the item which includes `collisionLeft`, `collisionWidth`, `height`, `isDragging`, `left`, `order`, `originalLeft`, `stack`, `top`, and `width` | -| `useResizeHandle` | `boolean` | returns the prop `useResizeHandle` from calendar root component | -| `title` | `string` | returns title to render in content element. | -| `canMove` | `boolean` | returns if the item is movable. | -| `canResizeLeft` | `boolean` | returns if the item can resize from the left | -| `canResizeRight` | `boolean` | returns if the item can resize from the right. | -| `selected` | `boolean` | returns if the item is selected. | -| `dragging` | `boolean` | returns if the item is being dragged | -| `dragStart` | `object` | returns `x` and `y` of the start dragging point of the item. | -| `dragTime` | `number` | current drag time. | -| `dragGroupDelta` | `number` | returns number of groups the item moved. if negative, moving was to top. If positive, moving was to down | -| `resizing` | `boolean` | returns if the item is being resized. | -| `resizeEdge` | `left`, `right` | the side from which the component is being resized form | -| `resizeStart` | `number` | returns the x value from where the component start moving | -| `resizeTime` | `number` | current resize time | -| `width` | `boolean` | returns the width of the item (same as in dimensions) | - -##### prop getters functions - -These functions are used to apply props to the elements that you render. This gives you maximum flexibility to render what, when, and wherever you like. - -Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. - -| property | type | description | -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `getItemProps` | `function(props={})` | returns the props you should apply to the root item element. | -| `getResizeProps` | `function(props={})` | returns two sets of props to apply on the `left` and `right` elements as resizing elements if you have `useResizeHandle` prop set to true | - -* `getItemProps` returns the props you should apply to the root item element. The returned props are: - - * key: item id - * ref: function to get item reference - * className: classnames to be applied to the item - * onMouseDown: event handler - * onMouseUp: event handler - * onTouchStart: event handler - * onTouchEnd: event handler - * onDoubleClick: event handler - * onContextMenu: event handler - * style: inline object style - - \*\* _the given styles will only override the styles that are not a requirement for positioning the item. Other styles like `color`, `radius` and others_ - - These properties can be override using the prop argument with properties: - - * className: class names to be added - * onMouseDown: event handler will be called after the component's event handler - * onMouseUp: event handler will be called after the component's event handler - * onTouchStart: event handler will be called after the component's event handler - * onTouchEnd: event handler will be called after the component's event handler - * onDoubleClick: event handler will be called after the component's event handler - * onContextMenu: event handler will be called after the component's event handler - * style: extra inline styles to be applied to the component - -* `getResizeProps` returns the props you should apply to the left and right resize handlers only if `useResizeHandle` set to true. The returned object has the props for the left element under property `left` and the props to be applied to the right element under `right` : - - * left - * ref: function to get element reference - * style: style to be applied to the left element - * className: class names to be applied to left className - * right - * ref: function to get element reference - * style: style to be applied to the right element - * className: class names to be applied to left className - -These properties can be override using the prop argument with properties: - -* leftStyle: style to be added to left style -* rightStyle: style to be added to right style -* leftClassName: classes to be added to left handler -* rightClassName: classes to be added to right handler - -example - -```jsx -let items = [ - { - id: 1, - group: 1, - title: 'Title', - tip: 'additional information', - color: 'rgb(158, 14, 206)', - selectedBgColor: 'rgba(225, 166, 244, 1)', - bgColor : 'rgba(225, 166, 244, 0.6)', - ... - } -] - -itemRenderer: ({ - item, - itemContext, - getItemProps, - getResizeProps -}) => { - const { left: leftResizeProps, right: rightResizeProps } = getResizeProps() - return ( -
- {itemContext.useResizeHandle ?
: ''} - -
- {itemContext.title} -
- - {itemContext.useResizeHandle ?
: ''} -
- )} - -} -``` - -## groupRenderer - -React component that will be used to render the content of groups in the -sidebar. Will be passed the `group` and `isRightSidebar` as props. - -```jsx -let groups = [ - { - id: 1, - title: 'Title', - tip: 'additional information' - } -] - -groupRenderer = ({ group }) => { - return ( -
- {group.title} -

{group.tip}

-
- ) -} -``` - -## resizeDetector - -The component automatically detects when the window has been resized. Optionally you can also detect when the component's DOM element has been resized. -To do this, pass a `resizeDetector`. Since bundling it by default would add ~18kb of minimized JS, you need to opt in to this like so: - -```jsx -import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' - - -``` - -## verticalLineClassNamesForTime(start, end) - -This function is called when the vertical line is rendered. `start` and `end` are unix timestamps in milliseconds for the current column. The function should return an array of strings containing the classNames which should be applied to the column. This makes it possible to visually highlight e.g. public holidays or office hours. -An example could look like (see: demo/vertical-classes): - -```jsx -verticalLineClassNamesForTime = (timeStart, timeEnd) => { - const currentTimeStart = moment(timeStart) - const currentTimeEnd = moment(timeEnd) - - for (let holiday of holidays) { - if ( - holiday.isSame(currentTimeStart, 'day') && - holiday.isSame(currentTimeEnd, 'day') - ) { - return ['holiday'] - } - } -} -``` - -Be aware that this function should be as optimized for performance as possible as it will be called on each render of the timeline (i.e. when the canvas is reset, when zooming, etc) - -## horizontalLineClassNamesForGroup(group) - -This function is called when the horizontal line is rendered. `group` is the group which will be rendered into the current row. The function should return an array of strings containing the classNames which should be applied to the row. This makes it possible to visually highlight categories or important items. -An example could look like: - -```jsx -horizontalLineClassNamesForGroup={(group) => group.root ? ["row-root"] : []} -``` - -# Timeline Markers - -Timeline markers are markers that are overlayed on the canvas at specific datepoints. - -## Overview - -Markers can be placed in the Timeline by declaring them as `children` of the `Timeline` component: - -```jsx -import Timeline, { - TimelineMarkers, - CustomMarker, - TodayMarker, - CursorMarker -} from 'react-calendar-timeline' - - - - - - - {/* custom renderer for this marker */} - {({ styles, date }) => { - const customStyles = { - ...styles, - backgroundColor: 'deeppink', - width: '4px' - } - return
- }} - - - - -``` - -Each marker allows for passing in a custom renderer via a [function as a child component](https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9). This allows the user to render whatever they want (event handlers, custom styling, etc). This custom renderer receives an object with two properties: - -> styles: {position: 'absolute', top: 0, bottom: 0, left: number} - -This object _must_ be passed to the root component's `style` prop in order to be rendered properly. Note that you can merge this object with any other properties. - -> date: number - -Date in unix timestamp of this marker. This can be used to change how your marker is rendered (or if its rendered at all) - -## TimelineMarkers - -Wrapper for timeline markers that you want rendered. - -## TodayMarker - -Marker that is placed on the current date/time. - -> interval: number | default: 10000 - -How often the TodayMarker refreshes. Value represents milliseconds. - -> children: function({styles: object, date: number}) => JSX.Element - -Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. - -```jsx -// custom interval -const twoSeconds = 2000 - - - -//custom renderer - - - {({ styles, date }) => - // date is value of current date. Use this to render special styles for the marker - // or any other custom logic based on date: - // e.g. styles = {...styles, backgroundColor: isDateInAfternoon(date) ? 'red' : 'limegreen'} -
- } - -``` - -## CustomMarker - -Marker that is placed on the current date/time. - -> date: number | required - -Where to place the marker on the timeline. `date` value is unix timestamp. - -> children: function({styles: object, date: number}) => JSX.Element - -Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. - -```jsx -const today = Date.now() - - -//custom renderer - - {({ styles, date }) =>
} - - -// multiple CustomMarkers -const markerDates = [ - {date: today, id: 1,}, - {date: tomorrow, id: 2,}, - {date: nextFriday, id: 3,}, -] - - - {markerDates.map(marker => )} - -``` - -## CursorMarker - -Marker that is displayed when hovering over the timeline and matches where your cursor is. - -> children: function({styles: object, date: number}) => JSX.Element - -Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. - -```jsx -// render default marker for Cursor - - -//custom renderer - - {({ styles, date }) => - // date is value of current date. Use this to render special styles for the marker - // or any other custom logic based on date: - // e.g. styles = {...styles, backgroundColor: isDateInAfternoon(date) ? 'red' : 'limegreen'} -
- } - -``` - -# Timeline Headers - -Timeline headers are the section above the timeline which consist of two main parts: First, the calender header which is a scrolable div containing the dates of the calendar called `DateHeader`. Second, is the headers for the sidebars, called `SidebarHeader`, the left one and optionally the right one. - -## Default usage - -For the default case, two `DateHeader`s are rendered above the timeline, one `primary` and `secondary`. The secondary has the same date unit as the timeline and a `primary` which has a unit larger than the timeline unit by one. - -For the `SidebarHeader`s an empty `SidebarHeader` will be render for the left and optionally an empty right sidebar header if `rightSidebarWith` exists. - -## Overview - -To provide any custom headers for `DateHeader` or `SidebarHeader`. You need to provide basic usage to provide any custom headers. These Custom headers should be always included inside `TimelineHeaders` component in the component's children. - -```jsx -import Timeline, { - TimelineHeaders, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - - - - - {({ getRootProps }) => { - return
Left
- }} -
- - -
- -``` -## Components - -Custom headers are implemented through a set of component with mostly [function as a child component](https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9) pattern, designed to give the user the most control on how to render the headers. - -### `TimelineHeader` - -Is the core component wrapper component for custom headers - -#### props - -| Prop | type | description | -| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `style`| `object`| applied to the root component of headers | -| `className` | `string`| applied to the root component of the headers| -| `calendarHeaderStyle`| `object`| applied to the root component of the calendar headers -scrolable div- `DateHeader` and `CustomHeader`)| -| `calendarHeaderClassName`| `string`| applied to the root component of the calendar headers -scrolable div- `DateHeader` and `CustomHeader`)| - - -### `SidebarHeader` - -Responsible for rendering the headers above the left and right sidebars. - -#### props - -| Prop | type | description | -| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `variant`| `left` (default), `right`| renders above the left or right sidebar | -| `children` | `Function`| function as a child component to render the header| - -#### Child function renderer - -a Function provides multiple parameters that can be used to render the sidebar headers - -##### Prop getters functions - -Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. - -| property | type | description| -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `getRootProps` | `function(props={})` | returns the props you should apply to the root div element.| - -* `getRootProps` The returned props are: - - * style: inline object style - - These properties can be override using the prop argument with properties: - - * style: extra inline styles to be applied to the component - -#### example - -```jsx -import Timeline, { - TimelineHeaders, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - - - - - {({ getRootProps }) => { - return
Left
- }} -
- - {({ getRootProps }) => { - return
Right
- }} -
- - -
- -``` - -### `DateHeader` - - -Responsible for rendering the headers above calendar part of the timeline. Consists of time intervals dividing the headers in columns. - -#### props - -| Prop | type | description| -| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `style`| `object`| applied to the root of the header | -| `className` | `string`| applied to the root of the header| -| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` | intervals between columns | -| `primaryHeader`| `boolean` | main header with interval unit larger than timeline unit by 1 | -| `secondaryHeader` | `boolean` (`true` by default) | sub header with interval equal to timeline unit | -| `labelFormat` | `Function` or `object` or `string`| controls the how to format the interval label | -| `intervalRenderer`| `Function`| render prop to render each interval in the header | - -#### Interval unit - -intervals are decided through three props: `unit`, `primaryHeader` and `secondaryHeader` (default true). `secondaryHeader` is the default if no prop are set. The unit of the intervals will be the same the timeline and a special style is matches the default style of the secondary header from when no custom headers are applied. - -If `primaryHeader` is set to true, it will override `secondaryHeader` and the unit if the timeline will be larger by 1 of the timeline unit. The default style will match the primary header from when no custom headers are applied. - -If `unit` is set, it will override both `primaryHeader` and `secondaryHeader`. The unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. The default style will match the primary header from when no custom headers are applied. - -#### Label format - -To format each interval label you can use 3 types of props to format which are: - -- `string`: if a string was passed it will be passed to `startTime` method `format` which is a `momentjs` object . - -- `object`: this will give you more flexibility to format the label with respect to `labelWidth`. Internally the `startTime` will be formated with the string corresponding to `formatObject[unit][range]` - - The object will be in the following type: - ```typescript - type unit = `second` | `minute` | `hour` | `day` | `week` | `month` | `year` - interface LabelFormat { - [unit]: { - long: string, - mediumLong: string, - medium: string, - short: string - } - } - // default format object - const format : LabelFormat = { - year: { - long: 'YYYY', - mediumLong: 'YYYY', - medium: 'YYYY', - short: 'YY' - }, - month: { - long: 'MMMM YYYY', - mediumLong: 'MMMM', - medium: 'MMMM', - short: 'MM/YY' - }, - day: { - long: 'dddd, LL', - mediumLong: 'dddd, LL', - medium: 'dd D', - short: 'D' - }, - hour: { - long: 'dddd, LL, HH:00', - mediumLong: 'L, HH:00', - medium: 'HH:00', - short: 'HH' - }, - minute: { - long: 'HH:mm', - mediumLong: 'HH:mm', - medium: 'HH:mm', - short: 'mm', - } - } - ``` - - The `long`, `mediumLong`, `medium` and `short` will be be decided through the `labelWidth` value according to where it lays upon the following scale: - - ``` - |-----`short`-----50px-----`medium`-----100px-----`mediumLong`-----150px--------`long`----- - ``` - -- `Function`: This is the more powerful method and offers the most control over what is rendered. The returned `string` will be rendered inside the interval - - ```typescript - type Unit = `second` | `minute` | `hour` | `day` | `month` | `year` - ([startTime, endTime] : [Moment, Moment], unit: Unit, labelWidth: number, formatOptions: LabelFormat = defaultFormat ) => string - ``` - -#### intervalRenderer - -Render prop function used to render a customized interval. The function provides multiple parameters that can be used to render each interval. - -Paramters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions - -##### interval context - -An object contains the following properties: - -| property | type | description | -| ------------------ | -------- | ---------------------------------------------------- | -| `interval` | `array : [Moment, Moment]` | an tuple array conating two moment object the first `startTime` and the second `endTime`| -| `intervalText` | `string` | the string returned from `labelFormat` prop | - - -##### Prop getters functions - -Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. - -| property | type | description| -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `getIntervalProps` | `function(props={})` | returns the props you should apply to the root div element.| - -* `getIntervalProps` The returned props are: - - * style: inline object style - * onClick: event handler - * key - - These properties can be extended using the prop argument with properties: - - * style: extra inline styles to be applied to the component - * onClick: extra click handler added to the normal `showPeriod callback` - -#### example - -```jsx -import Timeline, { - TimelineHeaders, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - - - - - {({ getRootProps }) => { - return
Left
- }} -
- - - { - return
- {intervalContext.intervalText} -
- }} - /> -
-
-``` - -### `ItemHeader` - - -Responsible for rendering group of items in the header. - -#### props - -| Prop | type | description| -| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `style`| `object`| applied to the root of the header | -| `className` | `string`| applied to the root of the header| -| `itemHeight`| `number` | item height | -| `stackItems` | `boolean` (`false` by default) | optionally stack items in header | -| `itemRenderer`| `Function`| render prop to render each interval in the header | -| `props` | `object` | pass extra props to itemRenderer | - -#### itemRenderer - -Render prop function used to render a customized item. The function provides multiple parameters that can be used to render each item. - -Paramters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions - -##### item - -The object of the item to render - -##### timelineContext - -timeline context - -##### itemContext - -item context - -##### Prop getters functions - -Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. - -| property | type | description| -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `getRootProps` | `function(props={})` | returns the props you should apply to the root div element.| - -* `getRootProps` The returned props are: - - * style: inline object style - - These properties can be extended using the prop argument with properties: - - * style: extra inline styles to be applied to the component - -#### example - -```jsx -import Timeline, { - TimelineHeaders, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - -const items = [ - { - id: 1, - title: 'item 1', - start_time: moment(), - end_time: moment().add(1, 'hour') - }, - { - id: 2, - title: 'item 2', - start_time: moment().add(-0.5, 'hour'), - end_time: moment().add(0.5, 'hour') - }, - { - id: 3, - title: 'item 3', - start_time: moment().add(2, 'hour'), - end_time: moment().add(3, 'hour') - } -] - - - - - {({ getRootProps }) => { - return
Left
- }} -
- { - return ( -
- {item.title} -
- ) - }} - /> - - -
-
-``` - -### `CustomHeader` - -Responsible for rendering the headers above calendar part of the timeline. This is the base component for `DateHeader` and `ItemHeader`. This offers more control with less features. - -#### props - -| Prop | type | description| -| ----------------- | --------------- | ---| -| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (default `timelineUnit`) | intervals | -| `children` | `Function`| function as a child component to render the header| - -#### unit - -The unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. The default value for unit is `timelineUnit` - -#### Children - -Function as a child component to render the header - -Paramters provided to the function has three types: context params which have the state of the item and timeline, prop getters functions and helper functions. - -``` -({ - timelineContext: { - timelineWidth, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd - }, - headerContext: { - unit, - intervals: this.state.intervals - }, - getRootProps: this.getRootProps, - getIntervalProps: this.getIntervalProps, - showPeriod -})=> React.Node -``` - -##### context - -An object contains context for `timeline` and `header`: - - -###### Timeline context - -| property | type | description | -| ------------------ | -------- | ---------------------------------------------------- | -| `timelineWidth` | `array : [Moment, Moment]` | an tuple array conating two moment object the first `startTime` and the second `endTime`| -| `visibleTimeStart` | `string` | the string returned from `labelFormat` prop | -| `visibleTimeEnd` | `array : [Moment, Moment]` | an tuple array conating two moment object the first `startTime` and the second `endTime`| -| `canvasTimeStart` | `string` | the string returned from `labelFormat` prop | -| `canvasTimeEnd` | `array : [Moment, Moment]` | an tuple array conating two moment object the first `startTime` and the second `endTime`| - -###### Header context - -| property | type | description | -| ------------------ | -------- | ---------------------------------------------------- | -| `intervals` | `array` | an array with all intervals| -| `unit` | `string` | unit passed or timelineUnit | - -** `interval`: `[startTime: Moment, endTime: Moment]` - -##### Prop getters functions - -Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. - -| property | type | description| -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `getRootProps` | `function(props={})` | returns the props you should apply to the root div element.| -| `getIntervalProps` | `function(props={})` | returns the props you should apply to the interval div element.| - -* `getIntervalProps` The returned props are: - - * style: inline object style - * onClick: event handler - * key - - These properties can be extended using the prop argument with properties: - - * style: extra inline styles to be applied to the component - * onClick: extra click handler added to the normal `showPeriod callback` - -##### helpers: - -| property | type | description| -| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `showPeriod` | `function(props={})` | returns the props you should apply to the root div element.| - - - -#### example - -```jsx -import Timeline, { - TimelineHeaders, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - - - - - {({ getRootProps }) => { - return
Left
- }} -
- - - - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }) => { - return ( -
- {intervals.map(interval => { - const intervalStyle = { - // height: 30, - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer', - backgroundColor: 'Turquoise', - color: 'white' - } - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > -
- {interval.startTime.format('YYYY')} -
-
- ) - })} -
- ) - }} -
-
-
-``` - -# FAQ - -## My timeline is unstyled - -You need to include the `Timeline.css` file, either via static file reference or webpack stylesheet bundling. The file is located at `lib/Timeline.css` - -## How can I have items with different colors? - -Now you can use item renderer for rendering items with different colors [itemRenderer](https://github.com/namespace-ee/react-calendar-timeline#itemrenderer). -Please refer to [examples](https://github.com/namespace-ee/react-calendar-timeline/tree/master/examples#custom-item-rendering) for a sandbox example - -## How can I add a sidebar on the right? - -The library supports right sidebar. -![right sidebar demo](doc/right-sidebar.png) - -To use it, you need to add two props to the `` component: - -```jsx -rightSidebarWidth={150} -rightSidebarContent={

Second filter

} -``` - -And add `rightTitle` prop to the groups objects: - -```js -{ - id: 1, - title: 'group 1', - rightTitle: 'additional info about group 1' -} -``` - -## The timeline header doesn't fix to the top of the container when I scroll down. - -There are two causes of this: - -* you are passing `stickyHeader={false}` to the timeline component. The header by default has sticky behavior unless you tell it not to using this prop. -* the browser you are viewing the timeline in doesn't support `position: sticky`. In this scenario, you will need to polyfill this behavior using the `headerRef`. - -In this example, we use [stickyfill](https://github.com/wilddeer/stickyfill) as our sticky polyfill - -```jsx -// add a handler in your parent component that accepts a DOM element -// with this element, pass the element into a polyfill library - -handleHeaderRef = (el) => { - // polyfill dom element with stickyfill - Stickyfill.addOne(el) -} - -// in render, pass this handler to the `headerRef` prop: - -render() { - -} -``` - -## I'm using Babel with Rollup or Webpack 2+ and I'm getting strange bugs with click events - -These module bundlers don't use the transpiled (ES5) code of this module. They load the original ES2015+ source. Thus your babel configuration needs to match ours. We recommend adding the [`stage-0` preset](https://babeljs.io/docs/plugins/preset-stage-0/) to your `.babelrc` to make sure everything works as intended. - -If that's too experimental, then the minimum you need is to add is the [`transform-class-properties`](https://babeljs.io/docs/plugins/transform-class-properties/) plugin that's in stage-2 and possibly the [`transform-object-rest-spread`](https://babeljs.io/docs/plugins/transform-object-rest-spread/) plugin from stage-3. However in this case it's easier to make sure you have at least [`stage-2`](https://babeljs.io/docs/plugins/preset-stage-2/) enabled. - -See [issue 51](https://github.com/namespace-ee/react-calendar-timeline/issues/51) for more details. - -Alternatively you may import the transpiled version of the timeline like this: - -```js -// import Timeline from 'react-calendar-timeline' // ESnext version -import Timeline from 'react-calendar-timeline/lib' // ES5 version -``` - -However doing so you lose on some of the features of webpack 2 and will potentially get a slightly larger bundle. - -## It doesn't work with `create-react-app` - -It's the same issue as above. See [issue 134](https://github.com/namespace-ee/react-calendar-timeline/issues/134#issuecomment-314215244) for details and options. - -## What are the zIndex values for all the elements? - -This is useful when using the plugins (that you pass as children to the component). Override the CSS to change: - -* Horizontal Lines: 30 -* Vertical Lines: 40 -* Items: 80-88 (depending on selection, dragging, etc) -* Header: 90 - -## Behind the scenes - -The timeline is built with speed, usability and extensibility in mind. - -Speed: The calendar itself is actually a 3x wide scrolling canvas of the screen. All scroll events left and right happen naturally, like scrolling any website. When the timeline has scrolled enough (50% of the invisible surface on one side), we change the "position:absolute;left:{num}px;" variables of each of the visible items and scroll the canvas back. When this happens, the `onBoundsChange` prop is called. - -This results in a visually endless scrolling canvas with optimal performance. - -Extensibility and usability: While some parameters (`onTimeChange`, `moveResizeValidator`) might be hard to configure, these are design decisions to make it as extensible as possible. If you have recipes for common tasks regarding those parameters, send a PR to add them to this doc. - -## Interaction - -To interact and navigate within the timeline there are the following options for the user: - -``` -shift + mousewheel = move timeline left/right -alt + mousewheel = zoom in/out -ctrl + mousewheel = zoom in/out 10× faster -meta + mousewheel = zoom in/out 3x faster (win or cmd + mousewheel) -``` - -Plus there is a handling for pinch-in and pinch-out zoom gestures (two touch points). -The pinch gesture on a trackpad (not a touch device) works in Chrome and Firefox (v55+) because these browsers map the gesture to `ctrl + mousewheel`. - -## Contribute - -If you like to improve React Calendar Timeline fork the repo and get started by running the following: - -```bash -$ git clone https://github.com/namespace-ee/react-calendar-timeline.git react-calendar-timeline -$ cd react-calendar-timeline -$ yarn -$ yarn start -``` - -Check http://0.0.0.0:8888/ in your browser and have fun! - -Please run `npm run lint` before you send a pull request. `npm run jest` runs the tests. - - - -## License -[MIT licensed](/LICENSE.md). +# ⚠️⚠️⚠️⚠️ HELP WANTED +please email me [ahmad.ilaiwi@gmail.com](mailto:ahmad.ilaiwi@gmail.com) and we will setup some time to speak and see if you can help maintain this library. + +# React Calendar Timeline + +A modern and responsive React timeline component. + +![calendar demo](https://raw.githubusercontent.com/namespace-ee/react-calendar-timeline/master/demo.gif) + +Checkout the [examples here](https://github.com/namespace-ee/react-calendar-timeline/tree/master/examples)! + +# Contents + +- [Getting Started](#getting-started) +- [Usage](#usage) +- [API](#api) +- [Timeline Markers](#timeline-markers) +- [Timeline Headers](#timeline-headers) +- [FAQ](#faq) +- [Contribute](#contribute) + +# Getting started + +```bash +# via yarn +yarn add react-calendar-timeline + +# via npm +npm install --save react-calendar-timeline +``` + +`react-calendar-timeline` has [react](https://reactjs.org/), [react-dom](https://reactjs.org/docs/react-dom.html), [`moment`](http://momentjs.com/) and [`interactjs`](http://interactjs.io/docs/) as peer dependencies. + +# Usage + +At the very minimum: + +```jsx +import Timeline from 'react-calendar-timeline' +// make sure you include the timeline stylesheet or the timeline will not be styled +import 'react-calendar-timeline/lib/Timeline.css' +import moment from 'moment' + +const groups = [{ id: 1, title: 'group 1' }, { id: 2, title: 'group 2' }] + +const items = [ + { + id: 1, + group: 1, + title: 'item 1', + start_time: moment(), + end_time: moment().add(1, 'hour') + }, + { + id: 2, + group: 2, + title: 'item 2', + start_time: moment().add(-0.5, 'hour'), + end_time: moment().add(0.5, 'hour') + }, + { + id: 3, + group: 1, + title: 'item 3', + start_time: moment().add(2, 'hour'), + end_time: moment().add(3, 'hour') + } +] + +ReactDOM.render( +
+ Rendered by react! + +
, + document.getElementById('root') +) +``` + +# API + +_NB!_ All props need to be immutable. For example, this means if you wish to change the title of one of your items, please pass in a whole new items array instead of changing the title in the old array. [Here's more info.](http://reactkungfu.com/2015/08/pros-and-cons-of-using-immutability-with-react-js/) + +The component can take many props: + +## groups + +Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: + +```js +{ + id: 1, + title: 'group 1', + rightTitle: 'title in the right sidebar', + stackItems?: true, + height?: 30 +} +``` + +If you use the right sidebar, you can pass optional `rightTitle` property here. +If you want to overwrite the calculated height with a custom height, you can pass a `height` property as an int in pixels here. This can be very useful for categorized groups. + +## items + +Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: + +```js +{ + id: 1, + group: 1, + title: 'Random title', + start_time: 1457902922261, + end_time: 1457902922261 + 86400000, + canMove: true, + canResize: false, + canChangeGroup: false, + itemProps: { + // these optional attributes are passed to the root
of each item as
+ 'data-custom-attribute': 'Random content', + 'aria-hidden': true, + onDoubleClick: () => { console.log('You clicked double!') }, + className: 'weekend', + style: { + background: 'fuchsia' + } + } +} +``` + +The preferred (fastest) option is to give Unix timestamps in milliseconds for `start_time` and `end_time`. Objects that convert to them (JavaScript `Date` or `moment()`) will also work, but will be a lot slower. + +## defaultTimeStart and defaultTimeEnd + +Unless overridden by `visibleTimeStart` and `visibleTimeEnd`, specify where the calendar begins and where it ends. This parameter expects a Date or moment object. + +## visibleTimeStart and visibleTimeEnd + +The exact viewport of the calendar. When these are specified, scrolling in the calendar must be orchestrated by the `onTimeChange` function. This parameter expects a Unix timestamp in milliseconds. + +**Note that you need to provide either `defaultTimeStart/End` or `visibleTimeStart/End` for the timeline to function** + +## buffer + +a number (default to 3) which represents the extra timeline rendered on right and lift of the visible area which the user will scroll through before the time rerenders. + +more explication in section [behind the scenes](#behind-the-scenes) + +Note: setting buffer to 1 will disable the scrolling on the timeline + +## selected + +An array with id's corresponding to id's in items (`item.id`). If this prop is set you have to manage the selected items yourself within the `onItemSelect` handler to update the property with new id's and use `onItemDeselect` handler to clear selection. This overwrites the default behaviour of selecting one item on click. + +## keys + +An array specifying keys in the `items` and `groups` objects. Defaults to + +```js +{ + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', // key for item div content + itemDivTitleKey: 'title', // key for item div title (
) + itemGroupKey: 'group', + itemTimeStartKey: 'start_time', + itemTimeEndKey: 'end_time', +} +``` + +## className + +Additional class names as a string for the root Timeline element. + +## sidebarWidth + +Width of the sidebar in pixels. If set to `0`, the sidebar is not rendered. Defaults to `150`. + +## sidebarContent + +Everything passed here will be displayed above the left sidebar. Use this to display small filters or so. Defaults to `null`. + +## rightSidebarWidth + +Width of the right sidebar in pixels. If set to `0`, the right sidebar is not rendered. Defaults to `0`. + +## rightSidebarContent + +Everything passed here will be displayed above the right sidebar. Use this to display small filters or so. Defaults to `null`. + +## dragSnap + +Snapping unit when dragging items. Defaults to `15 * 60 * 1000` or 15min. When so, the items will snap to 15min intervals when dragging. + +## minResizeWidth + +The minimum width, in pixels, of a timeline entry when it's possible to resize. If not reached, you must zoom in to resize more. Default to `20`. + +## lineHeight + +Height of one line in the calendar in pixels. Default `30` + +## itemHeightRatio + +What percentage of the height of the line is taken by the item? Default `0.65` + +## minZoom + +Smallest time the calendar can zoom to in milliseconds. Default `60 * 60 * 1000` (1 hour) + +__notes__: please note than second won't show up unless you change this to `60 * 1000` +## maxZoom + +Largest time the calendar can zoom to in milliseconds. Default `5 * 365.24 * 86400 * 1000` (5 years) + +## clickTolerance + +How many pixels we can drag the background for it to be counted as a click on the background. Default `3` + +## canMove + +Can items be dragged around? Can be overridden in the `items` array. Defaults to `true` + +## canChangeGroup + +Can items be moved between groups? Can be overridden in the `items` array. Defaults to `true` + +## canResize + +Can items be resized? Can be overridden in the `items` array. Accepted values: `false`, `"left"`, `"right"`, `"both"`. Defaults to `"right"`. If you pass `true`, it will be treated as `"right"` to not break compatibility with versions 0.9 and below. + +## useResizeHandle + +Append a special `.rct-drag-right` handle to the elements and only resize if dragged from there. Defaults to `false` + +### stackItems + +Stack items under each other, so there is no visual overlap when times collide. Can be overridden in the `groups` array. Defaults to `false`. Requires millisecond or `Moment` timestamps, not native JavaScript `Date` objects. + +## traditionalZoom + +Zoom in when scrolling the mouse up/down. Defaults to `false` + +## itemTouchSendsClick + +Normally tapping (touching) an item selects it. If this is set to true, a tap will have the same effect, as selecting with the first click and then clicking again to open and send the onItemClick event. Defaults to `false`. + +## timeSteps + +With what step to display different units. E.g. `15` for `minute` means only minutes 0, 15, 30 and 45 will be shown. + +Default: + +```js +{ + second: 1, + minute: 1, + hour: 1, + day: 1, + month: 1, + year: 1 +} +``` + +## scrollRef + +Ref callback that gets a DOM reference to the scroll body element. Can be useful to programmatically scroll. + +## onItemDrag(itemDragObject) + +Called when an item is moving or resizing. Returns an object with the following properties: + +| property | type | description | +| ------------------ | -------- | ---------------------------------------------------------------------- | +| `eventType` | `string` | retuns either `move` or `resize` | +| `itemId` | `number` | ID of the item being moved or resized | +| `time` | `number` | UNIX timestamp in milliseconds | +| `edge` | `string` | on `resize`, returns a value of either `left` or `right` | +| `newGroupOrder` | `number` | on `move`, index position of the new group that the item is moving to | + + +## onItemMove(itemId, dragTime, newGroupOrder) + +Callback when an item is moved. Returns 1) the item's ID, 2) the new start time and 3) the index of the new group in the `groups` array. + +## onItemResize(itemId, time, edge) + +Callback when an item is resized. Returns 1) the item's ID, 2) the new start or end time of the item 3) The edge that was dragged (`left` or `right`) + +## onItemSelect(itemId, e, time) + +Called when an item is selected. This is sent on the first click on an item. `time` is the time that corresponds to where you click/select on the item in the timeline. + +## onItemDeselect(e) + +Called when deselecting an item. Used to clear controlled selected prop. + +## onItemClick(itemId, e, time) + +Called when an item is clicked. Note: the item must be selected before it's clicked... except if it's a touch event and `itemTouchSendsClick` is enabled. `time` is the time that corresponds to where you click on the item in the timeline. + +## onItemDoubleClick(itemId, e, time) + +Called when an item was double clicked. `time` is the time that corresponds to where you double click on the item in the timeline. + +## onItemContextMenu(itemId, e, time) + +Called when the item is clicked by the right button of the mouse. `time` is the time that corresponds to where you context click on the item in the timeline. Note: If this property is set the default context menu doesn't appear. + +## onCanvasClick(groupId, time, e) + +Called when an empty spot on the canvas was clicked. Get the group ID and the time as arguments. For example open a "new item" window after this. + +## onCanvasDoubleClick(groupId, time, e) + +Called when an empty spot on the canvas was double clicked. Get the group ID and the time as arguments. + +## onCanvasContextMenu(groupId, time, e) + +Called when the canvas is clicked by the right button of the mouse. Note: If this property is set the default context menu doesn't appear + +## onZoom(timelineContext, unit) + +Called when the timeline is zoomed, either via mouse/pinch zoom or clicking header to change timeline units + +## moveResizeValidator(action, itemId, time, resizeEdge) + +This function is called when an item is being moved or resized. It's up to this function to return a new version of `change`, when the proposed move would violate business logic. + +The argument `action` is one of `move` or `resize`. + +The argument `resizeEdge` is when resizing one of `left` or `right`. + +The argument `time` describes the proposed new time for either the start time of the item (for move) or the start or end time (for resize). + +The function must return a new unix timestamp in milliseconds... or just `time` if the proposed new time doesn't interfere with business logic. + +For example, to prevent moving of items into the past, but to keep them at 15min intervals, use this code: + +```js +function (action, item, time, resizeEdge) { + if (time < new Date().getTime()) { + var newTime = Math.ceil(new Date().getTime() / (15*60*1000)) * (15*60*1000); + return newTime; + } + + return time +} +``` + + +## onTimeChange(visibleTimeStart, visibleTimeEnd, updateScrollCanvas, unit) + +A function that's called when the user tries to scroll. Call the passed `updateScrollCanvas(start, end)` with the updated visibleTimeStart and visibleTimeEnd (as unix timestamps in milliseconds) to change the scroll behavior, for example to limit scrolling. + +Here is an example that limits the timeline to only show dates starting 6 months from now and ending in 6 months. + +```js +// this limits the timeline to -6 months ... +6 months +const minTime = moment().add(-6, 'months').valueOf() +const maxTime = moment().add(6, 'months').valueOf() + +function (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } +} +``` + +## onBoundsChange(canvasTimeStart, canvasTimeEnd) + +Called when the bounds in the calendar's canvas change. Use it for example to load new data to display. (see "Behind the scenes" below). `canvasTimeStart` and `canvasTimeEnd` are unix timestamps in milliseconds. + +## itemRenderer + +Render prop function used to render a customized item. The function provides multiple parameters that can be used to render each item. + +Parameters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions + +#### Render props params + +##### context + +* `item` has the item we passed as a prop to the calendar. + +* `timelineContext` + +| property | type | description | +| ------------------ | -------- | ---------------------------------------------------- | +| `timelineWidth` | `number` | returns the full width of the timeline. | +| `visibleTimeStart` | `number` | returns the exact start of view port of the calendar | +| `visibleTimeEnd` | `number` | returns the exact end of view port of the calendar. | +| `canvasTimeStart` | `number` | denotes the start time in ms of the canvas timeline | +| `canvasTimeEnd` | `number` | denotes the end time in ms of the canvas timeline | + +* `itemContext` + +| property | type | description | +| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dimensions` | `object` | returns the dimensions of the item which includes `collisionLeft`, `collisionWidth`, `height`, `isDragging`, `left`, `order`, `originalLeft`, `stack`, `top`, and `width` | +| `useResizeHandle` | `boolean` | returns the prop `useResizeHandle` from calendar root component | +| `title` | `string` | returns title to render in content element. | +| `canMove` | `boolean` | returns if the item is movable. | +| `canResizeLeft` | `boolean` | returns if the item can resize from the left | +| `canResizeRight` | `boolean` | returns if the item can resize from the right. | +| `selected` | `boolean` | returns if the item is selected. | +| `dragging` | `boolean` | returns if the item is being dragged | +| `dragStart` | `object` | returns `x` and `y` of the start dragging point of the item. | +| `dragTime` | `number` | current drag time. | +| `dragGroupDelta` | `number` | returns number of groups the item moved. if negative, moving was to top. If positive, moving was to down | +| `resizing` | `boolean` | returns if the item is being resized. | +| `resizeEdge` | `left`, `right` | the side from which the component is being resized form | +| `resizeStart` | `number` | returns the x value from where the component start moving | +| `resizeTime` | `number` | current resize time | +| `width` | `boolean` | returns the width of the item (same as in dimensions) | + +##### prop getters functions + +These functions are used to apply props to the elements that you render. This gives you maximum flexibility to render what, when, and wherever you like. + +Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. + +| property | type | description | +| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `getItemProps` | `function(props={})` | returns the props you should apply to the root item element. | +| `getResizeProps` | `function(props={})` | returns two sets of props to apply on the `left` and `right` elements as resizing elements if you have `useResizeHandle` prop set to true | + +* `getItemProps` returns the props you should apply to the root item element. The returned props are: + + * key: item id + * ref: function to get item reference + * className: classnames to be applied to the item + * onMouseDown: event handler + * onMouseUp: event handler + * onTouchStart: event handler + * onTouchEnd: event handler + * onDoubleClick: event handler + * onContextMenu: event handler + * style: inline object + + + \*\* _the given styles will only override the styles that are not a requirement for positioning the item. Other styles like `color`, `radius` and others_ + + These properties can be overriden using the prop argument with properties: + + * className: class names to be added + * onMouseDown: event handler will be called after the component's event handler + * onMouseUp: event handler will be called after the component's event handler + * onTouchStart: event handler will be called after the component's event handler + * onTouchEnd: event handler will be called after the component's event handler + * onDoubleClick: event handler will be called after the component's event handler + * onContextMenu: event handler will be called after the component's event handler + * style: extra inline styles to be applied to the component + +* `getResizeProps` returns the props you should apply to the left and right resize handlers only if `useResizeHandle` set to true. The returned object has the props for the left element under property `left` and the props to be applied to the right element under `right` : + + * left + * ref: function to get element reference + * style: style to be applied to the left element + * className: class names to be applied to left className + * right + * ref: function to get element reference + * style: style to be applied to the right element + * className: class names to be applied to left className + +These properties can be override using the prop argument with properties: + +* leftStyle: style to be added to left style +* rightStyle: style to be added to right style +* leftClassName: classes to be added to left handler +* rightClassName: classes to be added to right handler + +example + +```jsx +let items = [ + { + id: 1, + group: 1, + title: 'Title', + tip: 'additional information', + color: 'rgb(158, 14, 206)', + selectedBgColor: 'rgba(225, 166, 244, 1)', + bgColor : 'rgba(225, 166, 244, 0.6)', + ... + } +] + +itemRenderer: ({ + item, + itemContext, + getItemProps, + getResizeProps +}) => { + const { left: leftResizeProps, right: rightResizeProps } = getResizeProps() + return ( +
+ {itemContext.useResizeHandle ?
: ''} + +
+ {itemContext.title} +
+ + {itemContext.useResizeHandle ?
: ''} +
+ )} + +} +``` + +## groupRenderer + +React component that will be used to render the content of groups in the +sidebar. Will be passed the `group` and `isRightSidebar` as props. + +```jsx +let groups = [ + { + id: 1, + title: 'Title', + tip: 'additional information' + } +] + +groupRenderer = ({ group }) => { + return ( +
+ {group.title} +

{group.tip}

+
+ ) +} +``` + +## resizeDetector + +The component automatically detects when the window has been resized. Optionally you can also detect when the component's DOM element has been resized. +To do this, pass a `resizeDetector`. Since bundling it by default would add ~18kb of minimized JS, you need to opt in to this like so: + +```jsx +import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' + + +``` + +## verticalLineClassNamesForTime(start, end) + +This function is called when the vertical line is rendered. `start` and `end` are unix timestamps in milliseconds for the current column. The function should return an array of strings containing the classNames which should be applied to the column. This makes it possible to visually highlight e.g. public holidays or office hours. +An example could look like (see: demo/vertical-classes): + +```jsx +verticalLineClassNamesForTime = (timeStart, timeEnd) => { + const currentTimeStart = moment(timeStart) + const currentTimeEnd = moment(timeEnd) + + for (let holiday of holidays) { + if ( + holiday.isSame(currentTimeStart, 'day') && + holiday.isSame(currentTimeEnd, 'day') + ) { + return ['holiday'] + } + } +} +``` + +Be aware that this function should be as optimized for performance as possible as it will be called on each render of the timeline (i.e. when the canvas is reset, when zooming, etc) + +## horizontalLineClassNamesForGroup(group) + +This function is called when the horizontal line is rendered. `group` is the group which will be rendered into the current row. The function should return an array of strings containing the classNames which should be applied to the row. This makes it possible to visually highlight categories or important items. +An example could look like: + +```jsx +horizontalLineClassNamesForGroup={(group) => group.root ? ["row-root"] : []} +``` + +# Timeline Markers + +Timeline markers are markers that are overlayed on the canvas at specific datepoints. + +## Overview + +Markers can be placed in the Timeline by declaring them as `children` of the `Timeline` component: + +```jsx +import Timeline, { + TimelineMarkers, + CustomMarker, + TodayMarker, + CursorMarker +} from 'react-calendar-timeline' + + + + + + + {/* custom renderer for this marker */} + {({ styles, date }) => { + const customStyles = { + ...styles, + backgroundColor: 'deeppink', + width: '4px' + } + return
+ }} + + + + +``` + +Each marker allows for passing in a custom renderer via a [function as a child component](https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9). This allows the user to render whatever they want (event handlers, custom styling, etc). This custom renderer receives an object with two properties: + +> styles: {position: 'absolute', top: 0, bottom: 0, left: number} + +This object _must_ be passed to the root component's `style` prop in order to be rendered properly. Note that you can merge this object with any other properties. + +> date: number + +Date in unix timestamp of this marker. This can be used to change how your marker is rendered (or if its rendered at all) + +## TimelineMarkers + +Wrapper for timeline markers that you want rendered. + +## TodayMarker + +Marker that is placed on the current date/time. + +> interval: number | default: 10000 + +How often the TodayMarker refreshes. Value represents milliseconds. + +> children: function({styles: object, date: number}) => JSX.Element + +Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. + +```jsx +// custom interval +const twoSeconds = 2000 + + + +//custom renderer + + + {({ styles, date }) => + // date is value of current date. Use this to render special styles for the marker + // or any other custom logic based on date: + // e.g. styles = {...styles, backgroundColor: isDateInAfternoon(date) ? 'red' : 'limegreen'} +
+ } + +``` + +## CustomMarker + +Marker that is placed on the current date/time. + +> date: number | required + +Where to place the marker on the timeline. `date` value is unix timestamp. + +> children: function({styles: object, date: number}) => JSX.Element + +Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. + +```jsx +const today = Date.now() + + +//custom renderer + + {({ styles, date }) =>
} + + +// multiple CustomMarkers +const markerDates = [ + {date: today, id: 1,}, + {date: tomorrow, id: 2,}, + {date: nextFriday, id: 3,}, +] + + + {markerDates.map(marker => )} + +``` + +## CursorMarker + +Marker that is displayed when hovering over the timeline and matches where your cursor is. + +> children: function({styles: object, date: number}) => JSX.Element + +Custom renderer for this marker. Ensure that you always pass `styles` to the root component's `style` prop as this object contains positioning of the marker. + +```jsx +// render default marker for Cursor + + +//custom renderer + + {({ styles, date }) => + // date is value of current date. Use this to render special styles for the marker + // or any other custom logic based on date: + // e.g. styles = {...styles, backgroundColor: isDateInAfternoon(date) ? 'red' : 'limegreen'} +
+ } + +``` + +# Timeline Headers + +Timeline headers are the section above the timeline which consist of two main parts: First, the calender header which is a scrolable div containing the dates of the calendar called `DateHeader`. Second, is the headers for the sidebars, called `SidebarHeader`, the left one and optionally the right one. + +## Default usage + +For the default case, two `DateHeader`s are rendered above the timeline, one `primary` and `secondary`. The secondary has the same date unit as the timeline and a `primary` which has a unit larger than the timeline unit by one. + +For the `SidebarHeader`s an empty `SidebarHeader` will be render for the left and optionally an empty right sidebar header if `rightSidebarWith` exists. + +## Overview + +To provide any custom headers for `DateHeader` or `SidebarHeader`. You need to provide basic usage to provide any custom headers. These Custom headers should be always included inside `TimelineHeaders` component in the component's children. + +```jsx +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + +
+ +``` +## Components + +Custom headers are implemented through a set of component with mostly [function as a child component](https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9) pattern, designed to give the user the most control on how to render the headers. + +### `TimelineHeader` + +Is the core component wrapper component for custom headers + +#### props + +| Prop | type | description | +| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `style`| `object`| applied to the root component of headers | +| `className` | `string`| applied to the root component of the headers| +| `calendarHeaderStyle`| `object`| applied to the root component of the calendar headers -scrolable div- `DateHeader` and `CustomHeader`)| +| `calendarHeaderClassName`| `string`| applied to the root component of the calendar headers -scrolable div- `DateHeader` and `CustomHeader`)| +| `headerRef` | `function` | used to get the ref of the header element + +### `SidebarHeader` + +Responsible for rendering the headers above the left and right sidebars. + +#### props + +| Prop | type | description | +| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `variant`| `left` (default), `right`| renders above the left or right sidebar | +| `children` | `Function`| function as a child component to render the header| +| `headerData` | `any`| Contextual data to be passed to the item renderer as a data prop | + +#### Child function renderer + +a Function provides multiple parameters that can be used to render the sidebar headers + +##### Prop getters functions + +Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. + +| property | type | description| +| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `getRootProps` | `function(props={})` | returns the props you should apply to the root div element.| +| `data` | `any` | Contextual data passed by `headerData` prop| + +* `getRootProps` The returned props are: + + * style: inline object style + + These properties can be override using the prop argument with properties: + + * style: extra inline styles to be applied to the component + +#### example + +```jsx +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + {({ getRootProps, data }) => { + return
Right {data.someData}
+ }} +
+ + +
+ +``` + +_Note_ : the Child function renderer can be a component or a function for convenience + +### `DateHeader` + + +Responsible for rendering the headers above calendar part of the timeline. Consists of time intervals dividing the headers in columns. + +#### props + +| Prop | type | description| +| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `style`| `object`| applied to the root of the header | +| `className` | `string`| applied to the root of the header| +| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` or `primaryHeader` | intervals between columns | +| `labelFormat` | `Function` or `string`| controls the how to format the interval label | +| `intervalRenderer`| `Function`| render prop to render each interval in the header +| `headerData` | `any`| Contextual data to be passed to the item renderer as a data prop | +| `height` | `number` default (30)| height of the header in pixels | + +_Note_: passing `primaryHeader` to unit the header will act as the main header with interval unit larger than timeline unit by 1 + +#### Interval unit + +intervals are decided through the prop: `unit`. By default, the unit of the intervals will be the same the timeline. + +If `primaryHeader` is passed to unit, it will override the unit with a unit a unit larger by 1 of the timeline unit. + +If `unit` is set, the unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. + +#### Label format + +To format each interval label you can use 2 types of props to format which are: + +- `string`: if a string was passed it will be passed to `startTime` method `format` which is a `momentjs` object . + + +- `Function`: This is the more powerful method and offers the most control over what is rendered. The returned `string` will be rendered inside the interval + + ```typescript + type Unit = `second` | `minute` | `hour` | `day` | `month` | `year` + ([startTime, endTime] : [Moment, Moment], unit: Unit, labelWidth: number, formatOptions: LabelFormat = defaultFormat ) => string + ``` +##### Default format + +by default we provide a responsive format for the dates based on the label width. it follows the following rules: + + The `long`, `mediumLong`, `medium` and `short` will be be decided through the `labelWidth` value according to where it lays upon the following scale: + + ``` + |-----`short`-----50px-----`medium`-----100px-----`mediumLong`-----150px--------`long`----- + ``` + + + ```typescript + // default format object + const format : LabelFormat = { + year: { + long: 'YYYY', + mediumLong: 'YYYY', + medium: 'YYYY', + short: 'YY' + }, + month: { + long: 'MMMM YYYY', + mediumLong: 'MMMM', + medium: 'MMMM', + short: 'MM/YY' + }, + week: { + long: 'w', + mediumLong: 'w', + medium: 'w', + short: 'w' + }, + day: { + long: 'dddd, LL', + mediumLong: 'dddd, LL', + medium: 'dd D', + short: 'D' + }, + hour: { + long: 'dddd, LL, HH:00', + mediumLong: 'L, HH:00', + medium: 'HH:00', + short: 'HH' + }, + minute: { + long: 'HH:mm', + mediumLong: 'HH:mm', + medium: 'HH:mm', + short: 'mm', + }, + second: { + "long": 'mm:ss', + mediumLong: 'mm:ss', + medium: 'mm:ss', + "short": 'ss' + } +} + ``` + +_Note_: this is only an implementation of the function param. You can do this on your own easily + + +#### intervalRenderer + +Render prop function used to render a customized interval. The function provides multiple parameters that can be used to render each interval. + +Paramters provided to the function has two types: context params which have the state of the item and timeline, and prop getters functions + +_Note_ : the renderProp can be a component or a function for convenience + +##### interval context + +An object contains the following properties: + +| property | type | description | +| ------------------ | -------- | ---------------------------------------------------- | +| `interval` | `object : {startTime, endTime, labelWidth, left}` | an object containing data related to the interval| +| `intervalText` | `string` | the string returned from `labelFormat` prop | + + +##### Prop getters functions + +Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. + +| property | type | description| +| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `getIntervalProps` | `function(props={})` | returns the props you should apply to the root div element.| + +* `getIntervalProps` The returned props are: + + * style: inline object style + * onClick: event handler + * key + + These properties can be extended using the prop argument with properties: + + * style: extra inline styles to be applied to the component + * onClick: extra click handler added to the normal `showPeriod callback` + +##### data + +data passed through headerData + +#### example + +```jsx +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + { + return
+ {intervalContext.intervalText} + {data.example} +
+ }} + /> +
+
+``` + +### `CustomHeader` + +Responsible for rendering the headers above calendar part of the timeline. This is the base component for `DateHeader` and offers more control with less features. + +#### props + +| Prop | type | description| +| ----------------- | --------------- | ---| +| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (default `timelineUnit`) | intervals | +| `children` | `Function`| function as a child component to render the header| +| `headerData` | `any`| Contextual data to be passed to the item renderer as a data prop | +| `height` | `number` default (30)| height of the header in pixels | + +#### unit + +The unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. The default value for unit is `timelineUnit` + +#### Children + +Function as a child component to render the header + +Paramters provided to the function has three types: context params which have the state of the item and timeline, prop getters functions and helper functions. + +_Note_ : the Child function renderer can be a component or a function for convenience + +``` +({ + timelineContext: { + timelineWidth, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + }, + headerContext: { + unit, + intervals: this.state.intervals + }, + getRootProps: this.getRootProps, + getIntervalProps: this.getIntervalProps, + showPeriod, + //contextual data passed through headerData + data, +})=> React.Node +``` + +##### context + +An object contains context for `timeline` and `header`: + + +###### Timeline context + +| property | type | description | +| ------------------ | -------- | ---------------------------------------------------- | +| `timelineWidth` | `number` | width of timeline| +| `visibleTimeStart` | `number` | unix milliseconds of start visible time | +| `visibleTimeEnd` | `number` | unix milliseconds of end visible time| +| `canvasTimeStart` | `number` | unix milliseconds of start buffer time | +| `canvasTimeEnd` | `number` |unix milliseconds of end buffer time| + +###### Header context + +| property | type | description | +| ------------------ | -------- | ---------------------------------------------------- | +| `intervals` | `array` | an array with all intervals| +| `unit` | `string` | unit passed or timelineUnit | + +** `interval`: `[startTime: Moment, endTime: Moment]` + +##### Prop getters functions + +Rather than applying props on the element yourself and to avoid your props being overridden (or overriding the props returned). You can pass an object to the prop getters to avoid any problems. This object will only accept some properties that our component manage so the component make sure to combine them correctly. + +| property | type | description| +| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `getRootProps` | `function(props={})` | returns the props you should apply to the root div element.| +| `getIntervalProps` | `function(props={})` | returns the props you should apply to the interval div element.| + +* `getIntervalProps` The returned props are: + + * style: inline object style + * onClick: event handler + * key + + These properties can be extended using the prop argument with properties: + + * style: extra inline styles to be applied to the component + * onClick: extra click handler added to the normal `showPeriod callback` + +##### helpers: + +| property | type | description| +| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `showPeriod` | `function(props={})` | returns the props you should apply to the root div element.| + +##### data: + +pass through the `headerData` prop content + +#### example + +```jsx +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + + {({ + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod, + data, + }) => { + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + backgroundColor: 'Turquoise', + color: 'white' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('YYYY')} +
+
+ ) + })} +
+ ) + }} +
+
+
+``` + +# FAQ + +## My timeline is unstyled + +You need to include the `Timeline.css` file, either via static file reference or webpack stylesheet bundling. The file is located at `lib/Timeline.css` + +## How can I have items with different colors? + +Now you can use item renderer for rendering items with different colors [itemRenderer](https://github.com/namespace-ee/react-calendar-timeline#itemrenderer). +Please refer to [examples](https://github.com/namespace-ee/react-calendar-timeline/tree/master/examples#custom-item-rendering) for a sandbox example + +## How can I add a sidebar on the right? + +The library supports right sidebar. +![right sidebar demo](doc/right-sidebar.png) + +To use it, you need to add a props to the `` component: + +```jsx +rightSidebarWidth={150} +``` + +And add `rightTitle` prop to the groups objects: + +```js +{ + id: 1, + title: 'group 1', + rightTitle: 'additional info about group 1' +} +``` + +If you are using Custom Headers then you need to add `SidebarHeader` component under `TimelineHeader` with variant `right` + +## The timeline header doesn't fix to the top of the container when I scroll down. + +you need to add sticky to the header like [this example](https://github.com/FoothillSolutions/react-calendar-timeline/tree/dest-build/examples#sticky-header). + +## I'm using Babel with Rollup or Webpack 2+ and I'm getting strange bugs with click events + +These module bundlers don't use the transpiled (ES5) code of this module. They load the original ES2015+ source. Thus your babel configuration needs to match ours. We recommend adding the [`stage-0` preset](https://babeljs.io/docs/plugins/preset-stage-0/) to your `.babelrc` to make sure everything works as intended. + +If that's too experimental, then the minimum you need is to add is the [`transform-class-properties`](https://babeljs.io/docs/plugins/transform-class-properties/) plugin that's in stage-2 and possibly the [`transform-object-rest-spread`](https://babeljs.io/docs/plugins/transform-object-rest-spread/) plugin from stage-3. However in this case it's easier to make sure you have at least [`stage-2`](https://babeljs.io/docs/plugins/preset-stage-2/) enabled. + +See [issue 51](https://github.com/namespace-ee/react-calendar-timeline/issues/51) for more details. + +Alternatively you may import the transpiled version of the timeline like this: + +```js +// import Timeline from 'react-calendar-timeline' // ESnext version +import Timeline from 'react-calendar-timeline/lib' // ES5 version +``` + +However doing so you lose on some of the features of webpack 2 and will potentially get a slightly larger bundle. + +## It doesn't work with `create-react-app` + +It's the same issue as above. See [issue 134](https://github.com/namespace-ee/react-calendar-timeline/issues/134#issuecomment-314215244) for details and options. + +## What are the zIndex values for all the elements? + +This is useful when using the plugins (that you pass as children to the component). Override the CSS to change: + +* Horizontal Lines: 30 +* Vertical Lines: 40 +* Items: 80-88 (depending on selection, dragging, etc) +* Header: 90 + +## Behind the scenes + +The timeline is built with speed, usability and extensibility in mind. + +Speed: The calendar itself is actually a 3x wide scrolling canvas of the screen. All scroll events left and right happen naturally, like scrolling any website. When the timeline has scrolled enough (50% of the invisible surface on one side), we change the "position:absolute;left:{num}px;" variables of each of the visible items and scroll the canvas back. When this happens, the `onBoundsChange` prop is called. + +This results in a visually endless scrolling canvas with optimal performance. + +Extensibility and usability: While some parameters (`onTimeChange`, `moveResizeValidator`) might be hard to configure, these are design decisions to make it as extensible as possible. If you have recipes for common tasks regarding those parameters, send a PR to add them to this doc. + +Note: 3x can be controlled by changing the buffer + +## Interaction + +To interact and navigate within the timeline there are the following options for the user: + +``` +shift + mousewheel = move timeline left/right +alt + mousewheel = zoom in/out +ctrl + mousewheel = zoom in/out 10× faster +meta + mousewheel = zoom in/out 3x faster (win or cmd + mousewheel) +``` + +Plus there is a handling for pinch-in and pinch-out zoom gestures (two touch points). +The pinch gesture on a trackpad (not a touch device) works in Chrome and Firefox (v55+) because these browsers map the gesture to `ctrl + mousewheel`. + +# Contribute + +If you like to improve React Calendar Timeline fork the repo and get started by running the following: + +```bash +$ git clone https://github.com/namespace-ee/react-calendar-timeline.git react-calendar-timeline +$ cd react-calendar-timeline +$ yarn +$ yarn start +``` + +Check http://0.0.0.0:8888/ in your browser and have fun! + +Please run `npm run lint` before you send a pull request. `npm run test` runs the jest tests. + + + +## License +[MIT licensed](/LICENSE.md). diff --git a/__fixtures__/groupOrderAndItemDimentions.js b/__fixtures__/groupOrderAndItemDimentions.js index 4637688eb..5db0828ec 100644 --- a/__fixtures__/groupOrderAndItemDimentions.js +++ b/__fixtures__/groupOrderAndItemDimentions.js @@ -1,131 +1,131 @@ -export const orderedGroups = { - '1': { - group: { - id: '1' - }, - index: 0 - }, - '2': { - group: { - id: '2' - }, - index: 1 - }, - '3': { - group: { - id: '3' - }, - index: 2 - } -} - -export const dimensionItems = [ - { - dimensions: { - collisionLeft: 1540540000000, - collisionWidth: 6803877, - height: 22.5, - left: 907.4074074074074, - order: { - group: { - id: '1' - }, - index: 0 - }, - stack: true, - top: 7.5, - width: 78.74857638888886 - }, - id: '0' - }, - { - dimensions: { - collisionLeft: 1540532800000, - collisionWidth: 21203877, - height: 22.5, - left: 824.074074074074, - order: { - group: { - id: '1' - }, - index: 0 - }, - stack: true, - top: 37.5, - width: 245.4152430555556 - }, - id: '5' - }, - { - dimensions: { - collisionLeft: 1540550800000, - collisionWidth: 24803877, - height: 22.5, - left: 1032.4074074074074, - order: { - group: { - id: '1' - }, - index: 0 - }, - stack: true, - top: 7.5, - width: 287.08190972222224 - }, - id: '6' - }, - { - dimensions: { - collisionLeft: 1540570000000, - collisionWidth: 14875919, - height: 22.5, - left: 1254.6296296296296, - order: { - group: { - id: '1' - }, - index: 0 - }, - stack: true, - top: 37.5, - width: 172.1749884259259 - }, - id: '1' - }, - { - dimensions: { - collisionLeft: 1540620000000, - collisionWidth: 20397548, - height: 22.5, - left: 1833.3333333333333, - order: { - group: { - id: '1' - }, - index: 0 - }, - stack: true, - top: 7.5, - width: 236.08273148148123 - }, - id: '2' - }, - { - dimensions: { - collisionLeft: 1540656000000, - collisionWidth: 20397548, - height: 22.5, - left: 2250, - order: { - group: { - id: '3' - }, - index: 2 - }, - stack: true, - top: 105, - width: 236.08273148148146 - }, - id: '3' - } -] +export const orderedGroups = { + '1': { + group: { + id: '1' + }, + index: 0 + }, + '2': { + group: { + id: '2' + }, + index: 1 + }, + '3': { + group: { + id: '3' + }, + index: 2 + } +} + +export const dimensionItems = [ + { + dimensions: { + collisionLeft: 1540540000000, + collisionWidth: 6803877, + height: 22.5, + left: 907.4074074074074, + order: { + group: { + id: '1' + }, + index: 0 + }, + stack: true, + top: 7.5, + width: 78.74857638888886 + }, + id: '0' + }, + { + dimensions: { + collisionLeft: 1540532800000, + collisionWidth: 21203877, + height: 22.5, + left: 824.074074074074, + order: { + group: { + id: '1' + }, + index: 0 + }, + stack: true, + top: 37.5, + width: 245.4152430555556 + }, + id: '5' + }, + { + dimensions: { + collisionLeft: 1540550800000, + collisionWidth: 24803877, + height: 22.5, + left: 1032.4074074074074, + order: { + group: { + id: '1' + }, + index: 0 + }, + stack: true, + top: 7.5, + width: 287.08190972222224 + }, + id: '6' + }, + { + dimensions: { + collisionLeft: 1540570000000, + collisionWidth: 14875919, + height: 22.5, + left: 1254.6296296296296, + order: { + group: { + id: '1' + }, + index: 0 + }, + stack: true, + top: 37.5, + width: 172.1749884259259 + }, + id: '1' + }, + { + dimensions: { + collisionLeft: 1540620000000, + collisionWidth: 20397548, + height: 22.5, + left: 1833.3333333333333, + order: { + group: { + id: '1' + }, + index: 0 + }, + stack: true, + top: 7.5, + width: 236.08273148148123 + }, + id: '2' + }, + { + dimensions: { + collisionLeft: 1540656000000, + collisionWidth: 20397548, + height: 22.5, + left: 2250, + order: { + group: { + id: '3' + }, + index: 2 + }, + stack: true, + top: 105, + width: 236.08273148148146 + }, + id: '3' + } +] diff --git a/__fixtures__/itemsAndGroups.js b/__fixtures__/itemsAndGroups.js index f98b3810b..e5bb313a6 100644 --- a/__fixtures__/itemsAndGroups.js +++ b/__fixtures__/itemsAndGroups.js @@ -1,57 +1,57 @@ - -export const items = [ - { - id: '0', - group: '1', - start_time: 1540540000000, - end_time: 1540546803877, - canMove: false, - canResize: false - }, - { - id: '5', - group: '1', - start_time: 1540532800000, - end_time: 1540554003877, - canMove: false, - canResize: false, - className: '' - }, - { - id: '6', - group: '1', - start_time: 1540550800000, - end_time: 1540575603877, - canMove: false, - canResize: false, - className: '' - }, - { - id: '1', - group: '1', - start_time: 1540570000000, - end_time: 1540584875919, - canMove: true, - canResize: 'both' - }, - { - id: '2', - group: '1', - start_time: 1540620000000, - end_time: 1540640397548, - canMove: false, - canResize: false, - className: '' - }, - { - id: '3', - group: '3', - start_time: 1540656000000, - end_time: 1540676397548, - canMove: false, - canResize: false, - className: '' - } -] - -export const groups = [{ id: '1' }, { id: '2' }, { id: '3' }] + +export const items = [ + { + id: '0', + group: '1', + start_time: 1540540000000, + end_time: 1540546803877, + canMove: false, + canResize: false + }, + { + id: '5', + group: '1', + start_time: 1540532800000, + end_time: 1540554003877, + canMove: false, + canResize: false, + className: '' + }, + { + id: '6', + group: '1', + start_time: 1540550800000, + end_time: 1540575603877, + canMove: false, + canResize: false, + className: '' + }, + { + id: '1', + group: '1', + start_time: 1540570000000, + end_time: 1540584875919, + canMove: true, + canResize: 'both' + }, + { + id: '2', + group: '1', + start_time: 1540620000000, + end_time: 1540640397548, + canMove: false, + canResize: false, + className: '' + }, + { + id: '3', + group: '3', + start_time: 1540656000000, + end_time: 1540676397548, + canMove: false, + canResize: false, + className: '' + } +] + +export const groups = [{ id: '1' }, { id: '2' }, { id: '3' }] diff --git a/__fixtures__/stateAndProps.js b/__fixtures__/stateAndProps.js index 6427947ec..90acef423 100644 --- a/__fixtures__/stateAndProps.js +++ b/__fixtures__/stateAndProps.js @@ -1,10 +1,17 @@ import { defaultKeys } from 'lib/default-config' import {items} from './itemsAndGroups' + +export const visibleTimeStart = 1540501200000 +export const visibleTimeEnd = 1540587600000 + export const props = { keys: defaultKeys, lineHeight: 30, - stackItems: 'space', - itemHeightRatio: 0.75 + stackItems: true, + itemHeightRatio: 0.75, + visibleTimeEnd, + visibleTimeStart, + buffer: 3, } export const propsNoStack = { @@ -12,8 +19,6 @@ export const propsNoStack = { stackItems: false, } -export const visibleTimeStart = 1540501200000 -export const visibleTimeEnd = 1540587600000 export const state = { draggingItem: undefined, diff --git a/__tests__/components/GroupRow/GroupRow.test.js b/__tests__/components/GroupRow/GroupRow.test.js index 4b5f3fdd3..3bb77c811 100644 --- a/__tests__/components/GroupRow/GroupRow.test.js +++ b/__tests__/components/GroupRow/GroupRow.test.js @@ -1,90 +1,90 @@ -import React from 'react' -import { mount, render } from 'enzyme' -import { noop } from 'test-utility' -import GroupRow from 'lib/row/GroupRow' - -const defaultProps = { - onClick: noop, - onDoubleClick: noop, - onContextMenu: noop, - isEvenRow: false, - clickTolerance: 10, - style: {}, - group: {} -} - -// using mount to be able to interact with element, render -// to assert dom level props (styles, className) -describe('GroupRow', () => { - it('calls passed in onDoubleClick', () => { - const onDoubleClickMock = jest.fn() - const props = { - ...defaultProps, - onDoubleClick: onDoubleClickMock - } - - const wrapper = mount() - - wrapper.simulate('doubleclick') - - expect(onDoubleClickMock).toHaveBeenCalledTimes(1) - }) - - it('calls passed in onClick', () => { - const onClickMock = jest.fn() - const props = { - ...defaultProps, - onClick: onClickMock - } - - const wrapper = mount() - - wrapper.simulate('click') - - expect(onClickMock).toHaveBeenCalledTimes(1) - }) - - it('calls passed in onContextMenu', () => { - const onContextMenuMock = jest.fn() - const props = { - ...defaultProps, - onContextMenu: onContextMenuMock - } - - const wrapper = mount() - - wrapper.simulate('contextmenu') - - expect(onContextMenuMock).toHaveBeenCalledTimes(1) - }) - it('assigns "rct-hl-even" class if isEvenRow is true', () => { - const props = { - ...defaultProps, - isEvenRow: true - } - - const wrapper = render() - - expect(wrapper.prop('class').trim()).toBe('rct-hl-even') - }) - it('assigns "rct-hl-odd" if isEvenRow is false', () => { - const props = { - ...defaultProps, - isEvenRow: false - } - - const wrapper = render() - - expect(wrapper.prop('class').trim()).toBe('rct-hl-odd') - }) - it('passes style prop to style', () => { - const props = { - ...defaultProps, - style: { border: '1px solid black' } - } - - const wrapper = render() - - expect(wrapper.prop('style').border).toBe(props.style.border) - }) -}) +import React from 'react' +import { mount, render } from 'enzyme' +import { noop } from 'test-utility' +import GroupRow from 'lib/row/GroupRow' + +const defaultProps = { + onClick: noop, + onDoubleClick: noop, + onContextMenu: noop, + isEvenRow: false, + clickTolerance: 10, + style: {}, + group: {} +} + +// using mount to be able to interact with element, render +// to assert dom level props (styles, className) +describe('GroupRow', () => { + it('calls passed in onDoubleClick', () => { + const onDoubleClickMock = jest.fn() + const props = { + ...defaultProps, + onDoubleClick: onDoubleClickMock + } + + const wrapper = mount() + + wrapper.simulate('doubleclick') + + expect(onDoubleClickMock).toHaveBeenCalledTimes(1) + }) + + it('calls passed in onClick', () => { + const onClickMock = jest.fn() + const props = { + ...defaultProps, + onClick: onClickMock + } + + const wrapper = mount() + + wrapper.simulate('click') + + expect(onClickMock).toHaveBeenCalledTimes(1) + }) + + it('calls passed in onContextMenu', () => { + const onContextMenuMock = jest.fn() + const props = { + ...defaultProps, + onContextMenu: onContextMenuMock + } + + const wrapper = mount() + + wrapper.simulate('contextmenu') + + expect(onContextMenuMock).toHaveBeenCalledTimes(1) + }) + it('assigns "rct-hl-even" class if isEvenRow is true', () => { + const props = { + ...defaultProps, + isEvenRow: true + } + + const wrapper = render() + + expect(wrapper.prop('class').trim()).toBe('rct-hl-even') + }) + it('assigns "rct-hl-odd" if isEvenRow is false', () => { + const props = { + ...defaultProps, + isEvenRow: false + } + + const wrapper = render() + + expect(wrapper.prop('class').trim()).toBe('rct-hl-odd') + }) + it('passes style prop to style', () => { + const props = { + ...defaultProps, + style: { border: '1px solid black' } + } + + const wrapper = render() + + expect(wrapper.prop('style').border).toBe(props.style.border) + }) +}) diff --git a/__tests__/components/GroupRow/GroupRows.test.js b/__tests__/components/GroupRow/GroupRows.test.js new file mode 100644 index 000000000..263e37ff3 --- /dev/null +++ b/__tests__/components/GroupRow/GroupRows.test.js @@ -0,0 +1,39 @@ +import React from 'react' +import { mount } from 'enzyme' +import { noop } from 'test-utility' +import GroupRows from 'lib/row/GroupRows' + +const defaultProps = { + groups: [ + { + bgColor: '#e8ccff', + id: '2998', + label: 'Label Dustin"', + rightTitle: 'Wolff', + title: 'Carlotta', + }, + { + bgColor: '#e8ccff', + id: '2999', + label: 'Label Myrtle"', + rightTitle: '"Sauer"', + title: 'Elmer', + } + ], + canvasWidth: 10, + lineCount: 2, + groupHeights: [30, 27], + onRowClick: noop, + onRowDoubleClick: noop, + clickTolerance: 0, + onRowContextClick: noop, +} + +describe('GroupRows', () => { + it('passes props and get right height for first group', () => { + const wrapper = mount(); + + const component = wrapper.find('GroupRow').first(); + expect(component.prop('style').height).toBe('30px'); + }) +}) diff --git a/__tests__/components/Headers/CustomHeader.test.js b/__tests__/components/Headers/CustomHeader.test.js index 06883ce1f..34779bb93 100644 --- a/__tests__/components/Headers/CustomHeader.test.js +++ b/__tests__/components/Headers/CustomHeader.test.js @@ -5,238 +5,367 @@ import DateHeader from 'lib/headers/DateHeader' import SidebarHeader from 'lib/headers/SidebarHeader' import TimelineHeaders from 'lib/headers/TimelineHeaders' import CustomHeader from 'lib/headers/CustomHeader' +import { RenderHeadersWrapper } from '../../test-utility/header-renderer' +import { getCustomHeadersInTimeline } from '../../test-utility/headerRenderers' +import { parsePxToNumbers } from '../../test-utility/index' import 'jest-dom/extend-expect' import moment from 'moment' -import { items, groups } from '../../../__fixtures__/itemsAndGroups' -import { visibleTimeEnd, visibleTimeStart } from '../../../__fixtures__/stateAndProps' +describe('CustomHeader Component Test', () => { + afterEach(cleanup) -const defaultProps = { - groups, - items, - defaultTimeStart: moment(visibleTimeStart, 'x'), - defaultTimeEnd: moment(visibleTimeEnd, 'x'), -} + it('Given CustomHeader When pass a unit to it Then header should render that unit', () => { + const { getAllByTestId } = render( + getCustomHeadersInTimeline({ + unit: 'month', + timelineState: { + timelineUnit: 'month', + canvasTimeStart: moment.utc('1/6/2018', 'DD/MM/YYYY').valueOf(), + canvasTimeEnd: moment.utc('1/6/2020', 'DD/MM/YYYY').valueOf(), + visibleTimeStart: moment.utc('1/1/2019', 'DD/MM/YYYY').valueOf(), + visibleTimeEnd: moment.utc('1/1/2020', 'DD/MM/YYYY').valueOf() + } + }) + ) + const intervals = getAllByTestId('customHeaderInterval') + const start = moment(intervals[0].textContent, 'DD/MM/YYYY') + const end = moment(intervals[1].textContent, 'DD/MM/YYYY') + expect(end.diff(start, 'M')).toBe(1) + }) + it('Given CustomHeader When pass a style props with (width, position) Then it should not override the default values', () => { + const { getByTestId } = render( + getCustomHeadersInTimeline({ + props: { style: { width: 0, position: 'fixed' } } + }) + ) + const { width, position } = getComputedStyle(getByTestId('customHeader')) + expect(width).not.toBe('0px') + expect(position).not.toBe('fixed') + }) -describe('CustomHeader Component Test', () => { - - afterEach(cleanup) - // Render The Example In The Docs - it('Given CustomHeader When render Then it should renderd Correctly in the timeline', () => { - const { getByTestId } = render( - - - - {({ getRootProps }) => { - return
Left
- }} -
- - - - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }) => { - return ( -
- {intervals.map(interval => { - const intervalStyle = { - // height: 30, - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer', - backgroundColor: 'Turquoise', - color: 'white' - } - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > -
- {interval.startTime.format('YYYY')} -
-
- ) - })} -
- ) - }} -
-
-
- ) + it('Given CustomHeader When pass a style props other than (width, position) Then it should rendered Correctly', () => { + const { getByTestId } = render( + getCustomHeadersInTimeline({ props: { style: { color: 'white' } } }) + ) + const { color } = getComputedStyle(getByTestId('customHeader')) + expect(color).toBe('white') + }) - expect(getByTestId('customHeader')).toBeInTheDocument() - }) - it('Given CustomHeader When pass a unit to it Then it should take it', () => { - const { getByTestId, rerender } = render(getCustomHeadersInTimeline({ unit: "year" })); - expect(getByTestId('customHeader')).toHaveTextContent('01/01/2018') + it('Given CustomHeader When pass an interval style with (width, position and left) Then it should not override the default values', () => { + const { getByTestId } = render( + getCustomHeadersInTimeline({ + intervalStyle: { + width: 0, + position: 'fixed', + left: 1222222 + } + }) + ) + const { width, position, left } = getComputedStyle( + getByTestId('customHeaderInterval') + ) + expect(width).not.toBe('0px') + expect(position).not.toBe('fixed') + expect(left).not.toBe('1222222px') + }) + it('Given CustomHeader When pass an interval style other than (width, position and left) Then it should rendered correctly', () => { + const { getByTestId } = render( + getCustomHeadersInTimeline({ + intervalStyle: { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + color: 'white' + } + }) + ) + const { + lineHeight, + textAlign, + borderLeft, + cursor, + color + } = getComputedStyle(getByTestId('customHeaderInterval')) + expect(lineHeight).toBe('30px') + expect(textAlign).toBe('center') + expect(borderLeft).toBe('1px solid black') + expect(cursor).toBe('pointer') + expect(color).toBe('white') + }) - rerender(getCustomHeadersInTimeline({ unit: "month" })); - expect(getByTestId('customHeader')).toHaveTextContent('10/01/2018') + it('Given a CustomHeader When not pass any unit prop Then it Should take the default timeline unit', () => { + const { getAllByTestId } = render( + getCustomHeadersInTimeline({ + timelineState: { + //default unit we are testing + timelineUnit: 'month', + canvasTimeStart: moment.utc('1/6/2018', 'DD/MM/YYYY').valueOf(), + canvasTimeEnd: moment.utc('1/6/2020', 'DD/MM/YYYY').valueOf(), + visibleTimeStart: moment.utc('1/1/2019', 'DD/MM/YYYY').valueOf(), + visibleTimeEnd: moment.utc('1/1/2020', 'DD/MM/YYYY').valueOf() + } + }) + ) + const intervals = getAllByTestId('customHeaderInterval') + const start = moment(intervals[0].textContent, 'DD/MM/YYYY') + const end = moment(intervals[1].textContent, 'DD/MM/YYYY') + expect(end.diff(start, 'M')).toBe(1) + }) - rerender(getCustomHeadersInTimeline({ unit: "day" })); - expect(getByTestId('customHeader')).toHaveTextContent('10/25/2018') - expect(getByTestId('customHeader')).toHaveTextContent('10/26/2018') - expect(getByTestId('customHeader')).toHaveTextContent('10/27/2018') - }) - it('Given CustomHeader When pass a style props with (width, position) Then it should not ovverride the default values', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ props: { style: { width: 0, position: 'fixed' } } })); - const { width, position } = getComputedStyle(getByTestId('customHeader')) - expect(width).not.toBe('0px') - expect(position).not.toBe('fixed') + it("Given CustomHeader When rendered Then intervals don't overlap in position", () => { + const { getAllByTestId } = render(getCustomHeadersInTimeline()) + const intervals = getAllByTestId('customHeaderInterval') + const intervalsCoordinations = intervals.map(interval => { + const { left, width } = getComputedStyle(interval) + return { + left: parsePxToNumbers(left), + right: parsePxToNumbers(left) + parsePxToNumbers(width) + } }) + for (let index = 0; index < intervalsCoordinations.length - 1; index++) { + const a = intervalsCoordinations[index] + const b = intervalsCoordinations[index + 1] + expect(Math.abs(a.right - b.left)).toBeLessThan(0.1) + } + }) - it('Given CustomHeader When pass a style props other than (width, position) Then it should renderd Correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ props: { style: { height: 150 } } })); - const { height } = getComputedStyle(getByTestId('customHeader')) - expect(height).toBe("150px") + it('Given CustomHeader When passing child renderer Then showPeriod should be passed', () => { + const showPeriod = () => {} + const renderer = jest.fn(() => { + return
header
}) + render( + + + {renderer} + + + ) + expect(renderer.mock.calls[0][0].showPeriod).toBe(showPeriod) + }) - it('Given CustomHeader When pass an interval style with (width, position, left) Then it should not ovverride the default values', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ - intervalStyle: { - width: 0, - position: 'fixed', - left: 0 - } - })); - const { width, position, left } = getComputedStyle(getByTestId('customHeaderInterval')) - expect(width).not.toBe('0px') - expect(position).not.toBe('fixed') - expect(left).not.toBe('0px') + it('Given CustomHeader When passing child renderer Then headerContext should be passed', () => { + const renderer = jest.fn(() => { + return
header
}) - it('Given CustomHeader When pass an interval style other than (width, position) Then it should rendered correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ - intervalStyle: { - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer', - color: 'white' - } - })); - const { lineHeight, textAlign, borderLeft, cursor, color } = getComputedStyle(getByTestId('customHeaderInterval')) - expect(lineHeight).toBe('30px') - expect(textAlign).toBe('center') - expect(borderLeft).toBe('1px solid black') - expect(cursor).toBe('pointer') - expect(color).toBe('white') + render( + + + {renderer} + + + ) + const headerContext = renderer.mock.calls[0][0].headerContext + expect(headerContext).toBeDefined() + }) + + it('Given CustomHeader When passing child renderer Then headerContext should be passed with intervals and unit', () => { + const renderer = jest.fn(() => { + return
header
}) - it('Given a CustomHeader When pass a jsx as a children Then it Should be rendered Correctly', () => { - const { getByText } = render(getCustomHeadersInTimeline()) - expect(getByText('Should Be Rendered')).toBeInTheDocument() + render( + + + {renderer} + + + ) + const headerContext = renderer.mock.calls[0][0].headerContext + const intervals = headerContext.intervals + const unit = headerContext.unit + expect(intervals).toBeDefined() + expect(intervals).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + startTime: expect.any(moment), + endTime: expect.any(moment), + labelWidth: expect.any(Number), + left: expect.any(Number) + }) + ]) + ) + expect(unit).toEqual(expect.any(String)) + }) + + it('Given CustomHeader When passing child renderer Then timelineContext should be passed', () => { + const renderer = jest.fn(() => { + return
header
}) - it('Given a CustomHeader When not pass any unit prop Then it Should take the default timeline unit (year)', () => { - const { getByTestId } = render(getCustomHeadersInTimeline()) - expect(getByTestId('customHeader')).toHaveTextContent('01/01/2018') + render( + + + {renderer} + + + ) + const timelineContext = renderer.mock.calls[0][0].timelineContext + expect(timelineContext).toBeDefined() + expect(timelineContext).toMatchObject({ + timelineWidth: expect.any(Number), + visibleTimeStart: expect.any(Number), + visibleTimeEnd: expect.any(Number), + canvasTimeStart: expect.any(Number), + canvasTimeEnd: expect.any(Number) }) - it('Given DateHeader When Rendered with day unit Then getIntervalStyle function shuold be act correctly', () => { - const props = getIntervalStyle({ startTime: moment("2018-10-27T21:00:00.000"), canvasTimeStart: 1540414800000, ratio: 0.5, unit: 'month', labelWidth: 150 }) - expect(props).toEqual({ - left: 124200000, - width: 150, - position: 'absolute' - }) + }) + + describe('CustomHeader Intervals', () => { + it('Given intervals Then they should have the same width', () => { + const renderer = jest.fn(() => { + return
header
+ }) + render( + + + {renderer} + + + ) + + const headerContext = renderer.mock.calls[0][0].headerContext + const intervals = headerContext.intervals + const widths = intervals.map(interval => interval.labelWidth) + for (let index = 0; index < widths.length - 1; index++) { + const a = widths[index] + const b = widths[index + 1] + + expect(Math.abs(b - a)).toBeLessThan(0.1) + } }) - it('Given CustomHeader When pass a style in props obj to props renderer Then it should not override correctly render it', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({props: {'aria-hidden': false}})) - expect(getByTestId('customHeader')).toHaveAttribute('aria-hidden') + it('Given intervals Then left property should be different', () => { + const renderer = jest.fn(() => { + return
header
+ }) + render( + + + {renderer} + + + ) + const headerContext = renderer.mock.calls[0][0].headerContext + const intervals = headerContext.intervals + const lefts = intervals.map(interval => interval.left) + for (let index = 0; index < lefts.length - 1; index++) { + const a = lefts[index] + const b = lefts[index + 1] + expect(a).toBeLessThan(b) + } }) - describe('Testing Diffrent Unit Values', () => { - it('Given CustomHeader When pass a year unit then it should render it correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ unit: 'year' })); - expect(getByTestId('customHeader')).toHaveTextContent('01/01/2018') - }) - it('Given CustomHeader When pass a month unit then it should render it correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ unit: 'month' })); - expect(getByTestId('customHeader')).toHaveTextContent('10/01/2018') - }) - it('Given CustomHeader When pass a day unit then it should render it correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ unit: 'day' })); - expect(getByTestId('customHeader')).toHaveTextContent('10/25/2018') - }) - it('Given CustomHeader When pass a hour unit then it should render it correctly', () => { - const { getByTestId } = render(getCustomHeadersInTimeline({ unit: 'hour' })); - expect(getByTestId('customHeader')).toHaveTextContent('10/25/2018') - }) + }) + + it('Given CustomHeader When passing extra props Then it will be passed to the renderProp', () => { + const renderer = jest.fn(() => { + return
header
}) - -}) + const props = { + data: 'some' + } + render( + + + {renderer} + + + ) + expect(renderer.mock.calls[0][0].data).toBe(props) + }) + // Render The Example In The Docs + it('Given CustomHeader When render Then it should render Correctly in the timeline', () => { + const { getByTestId } = render( + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + + {({ + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod + }) => { + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + // height: 30, + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + backgroundColor: 'Turquoise', + color: 'white' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('YYYY')} +
+
+ ) + })} +
+ ) + }} +
+
+
+ ) + + expect(getByTestId('customHeader')).toBeInTheDocument() + }) + it('Given Custom Header When passing react stateless component to render prop Then it should render', () => { + const Renderer = props => { + return
header
+ } -function getCustomHeadersInTimeline({ unit = "year", props, intervalStyle } = {}) { - - return ( - - - - {({ getRootProps }) => { - return
Left
- }} -
- - - - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }, extraProps) => { - return ( -
- {intervals.map(interval => { - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > -
- {interval.startTime.format('MM/DD/YYYY')} -
-
- ) - })} -
- Should Be Rendered -
-
- - ) - }} -
-
-
- ) -} - - -const getIntervalStyle = ({ startTime, canvasTimeStart, ratio, unit, labelWidth, style }) => { - const left = Math.round((startTime.valueOf() - canvasTimeStart) * ratio) - const unitValue = startTime.get(unit === 'day' ? 'date' : unit) - const firstOfType = unitValue === (unit === 'day' ? 1 : 0) - const leftCorrect = firstOfType ? 1 : 0 - return { - ...style, - left: left - leftCorrect, - width: labelWidth, - position: 'absolute' + const { getByText } = render( + + + {Renderer} + + + ) + expect(getByText('header')).toBeInTheDocument() + }) + + it('Given Custom Header When passing react component to render prop Then it should render', () => { + class Renderer extends React.Component { + render() { + return
header
+ } } -} + + const { getByText } = render( + + + {Renderer} + + + ) + expect(getByText('header')).toBeInTheDocument() + }) +}) diff --git a/__tests__/components/Headers/DateHeader.test.js b/__tests__/components/Headers/DateHeader.test.js index 857d2dbf0..5d6ecf6f7 100644 --- a/__tests__/components/Headers/DateHeader.test.js +++ b/__tests__/components/Headers/DateHeader.test.js @@ -1,309 +1,443 @@ import React from 'react' -import { render, cleanup, within } from 'react-testing-library' +import { render, cleanup, within, fireEvent } from 'react-testing-library' import Timeline from 'lib/Timeline' import DateHeader from 'lib/headers/DateHeader' import SidebarHeader from 'lib/headers/SidebarHeader' import TimelineHeaders from 'lib/headers/TimelineHeaders' import 'jest-dom/extend-expect' +import { RenderHeadersWrapper } from '../../test-utility/header-renderer' import moment from 'moment' -import { items, groups } from '../../../__fixtures__/itemsAndGroups' -import { visibleTimeEnd, visibleTimeStart } from '../../../__fixtures__/stateAndProps' -import { TimelineStateProvider } from 'lib/timeline/TimelineStateContext' -import { TimelineHeadersProvider } from 'lib/headers/HeadersContext' -const defaultProps = { - groups, - items, - defaultTimeStart: moment(visibleTimeStart, 'x'), - defaultTimeEnd: moment(visibleTimeEnd, 'x'), -} - -describe("Testing DateHeader Component", () => { - beforeEach(() => { - Element.prototype.getBoundingClientRect = jest.fn(() => { - return { - width: 1000, - height: 120, - top: 0, - left: 0, - bottom: 0, - right: 0, - } - }); - }) +describe('Testing DateHeader Component', () => { afterEach(cleanup) + const format = 'MM/DD/YYYY hh:mm a' + // Testing The Example In The Docs - it("Given DateHeader When rendered Then it should be rendered correctly in the timeLine", () => { + it('Given DateHeader When rendered Then it should be rendered correctly in the timeLine', () => { const { getAllByTestId } = render( - + {({ getRootProps }) => { return
Left
}}
- + { - return
- {intervalContext.intervalText} -
+ return ( +
+ {intervalContext.intervalText} +
+ ) }} />
-
+ ) expect(getAllByTestId('dateHeader')).toHaveLength(3) - }) - it("Given Dateheader When pass a string typed labelFormat Then it should render the intervals with hte given format", () => { - const { getAllByTestId } = render(dateHeaderComponent({ unit: "day", labelFormat: "MM/DD" })); - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/25') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/27') - expect(getAllByTestId('dateHeader')[0]).toHaveTextContent('Thursday, October 25') + describe('DateHeader labelFormat', () => { + afterEach(cleanup) - }) - - it("Given Dateheader When pass an object typed labelFormat Then it should render the intervals with hte given format", () => { - const { getAllByTestId } = render(dateHeaderComponent({ unit: "day", labelFormat: { day: { long: "MM/DD/YYYY" } } })); + it('Given Dateheader When pass a string typed labelFormat Then it should render the intervals with the given format', () => { + const { getAllByTestId } = render( + dateHeaderComponent({ unit: 'day', labelFormat: 'MM/DD' }) + ) + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/25') + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26') + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/27') + }) - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/25/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/27/2018') - expect(getAllByTestId('dateHeader')[0]).toHaveTextContent('Thursday, October 25') - }) - it("Given Dateheader When pass a function typed labelFormat Then it should render the intervals with hte given format", () => { - const formatlabel = jest.fn((interval, unit, labelWidth) => interval[0].format("MM/DD/YYYY")) - const { getAllByTestId } = render(dateHeaderComponent({ unit: "day", labelFormat: formatlabel })); + it('Given Dateheader When pass a function typed labelFormat Then it should render the intervals with the given format', () => { + const formatlabel = jest.fn(interval => interval[0].format('MM/DD/YYYY')) + const { getAllByTestId } = render( + dateHeaderComponent({ unit: 'day', labelFormat: formatlabel }) + ) - expect(formatlabel).toHaveBeenCalled() + expect(formatlabel).toHaveBeenCalled() - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/25/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/27/2018') + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/25/2018') + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26/2018') + expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/27/2018') + }) - expect(getAllByTestId('dateHeader')[0]).toHaveTextContent('Thursday, October 25') + it('Given Dateheader When pass a function typed labelFormat Then it should be called with an interval, label width and unit', () => { + const formatlabel = jest.fn(interval => interval[0].format('MM/DD/YYYY')) + render(dateHeaderComponent({ unit: 'day', labelFormat: formatlabel })) - }) + expect(formatlabel).toHaveBeenCalled() - it("Given Dateheader When pass a string typed labelFormat Then it should be called with the right params", () => { - const formatlabel = jest.fn((interval, unit, labelWidth) => interval[0].format("MM/DD/YYYY")) - render(dateHeaderComponent({ unit: "day", labelFormat: formatlabel })) - expect(formatlabel).toHaveBeenCalled() - expect(formatlabel).toHaveBeenCalledWith(expect.any(Array), "day", expect.any(Number)) + formatlabel.mock.calls.forEach(param => { + const [[start, end], unit, labelWidth] = param + expect(moment.isMoment(start)).toBeTruthy() + expect(moment.isMoment(end)).toBeTruthy() + expect(end.diff(start, 'd')).toBe(1) + expect(unit).toBe('day') + expect(labelWidth).toEqual(expect.any(Number)) + }) + }) }) - - - it("Given Dateheader When click on the primary header Then it should change the unit", async () => { - - const formatlabel = jest.fn((interval, unit, labelWidth) => interval[0].format("MM/DD/YYYY")) - const { getByTestId, getAllByTestId } = render(dateHeaderComponent({ unit: "day", labelFormat: formatlabel })); + it('Given Dateheader When click on the primary header Then it should change the unit', async () => { + const formatlabel = jest.fn(interval => interval[0].format('MM/DD/YYYY')) + const showPeriod = jest.fn() + const { getByTestId } = render( + dateHeaderComponent({ unit: 'day', labelFormat: formatlabel, showPeriod }) + ) // Arrange const primaryHeader = getByTestId('dateHeader') - const seconderyHeader = getAllByTestId('dateHeader')[2] // Act - const primaryFirstClick = within(primaryHeader).getByText('Friday, October 26, 2018').parentElement + const primaryFirstClick = within(primaryHeader).getByText('2018') + .parentElement primaryFirstClick.click() - const primarySecondClick = within(primaryHeader).getByText('October 2018').parentElement - primarySecondClick.click() - - // Assert - expect(seconderyHeader).toHaveTextContent('January') - expect(primaryHeader).toHaveTextContent('2018') - }) - - it("Given Dateheader When click on the secondary header Then it should change the unit", async () => { - - const formatlabel = jest.fn((interval, unit, labelWidth) => interval[0].format("MM/DD/YYYY")) - const { getByTestId, getAllByTestId } = render(dateHeaderComponent({ unit: "day", labelFormat: formatlabel })); - // Arrange - const primaryHeader = getByTestId('dateHeader') - const seconderyHeader = getAllByTestId('dateHeader')[2] - - const primaryFirstClick = within(primaryHeader).getByText('Friday, October 26, 2018').parentElement - primaryFirstClick.click() - const primarySecondClick = within(primaryHeader).getByText('October 2018').parentElement - - primarySecondClick.click() - - // Act - const secondaryFirstClick = within(seconderyHeader).queryByText('January') - secondaryFirstClick.click() - expect(primaryHeader).toHaveTextContent('December 2016') - const secondarySecondClick = within(seconderyHeader).queryByText('1') - secondarySecondClick.click() - expect(primaryHeader).toHaveTextContent('Wednesday, November 30, 2016') - }) - - it('Given DateHeadr When click on primary or secondary Then onTimeChange function should be called with the right params', () => { - const handleTimeChange = jest.fn((visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => - updateScrollCanvas(visibleTimeStart, visibleTimeEnd)) - const { getByTestId, getAllByTestId, debug } = render(dateHeaderComponent({ unit: "day", handleTimeChange: handleTimeChange })); - const primaryHeader = within(getByTestId('dateHeader')).getByText('Friday, October 26, 2018').parentElement - primaryHeader.click() - const secondaryHeader = within(getAllByTestId('dateHeader')[1]).getByText('1').parentElement - expect(handleTimeChange).toBeCalled() - expect(handleTimeChange).toBeCalledTimes(1) - expect(handleTimeChange).toBeCalledWith(expect.any(Number), expect.any(Number), expect.any(Function)) - expect(handleTimeChange).toReturn() - - secondaryHeader.click(); - expect(handleTimeChange).toBeCalled() - expect(handleTimeChange).toBeCalledTimes(1) - expect(handleTimeChange).toBeCalledWith(expect.any(Number), expect.any(Number), expect.any(Function)) - expect(handleTimeChange).toReturn() + expect(showPeriod).toBeCalled() + const [start, end] = showPeriod.mock.calls[0] + expect(start.format('DD/MM/YYYY hh:mm a')).toBe('01/01/2018 12:00 am') + expect(end.format('DD/MM/YYYY hh:mm a')).toBe('31/12/2018 11:59 pm') }) it('Given Dateheader When pass a className Then it should be applied to DateHeader', () => { - const { getAllByTestId } = render(dateHeaderComponent({ labelFormat: "MM/DD/YYYY", className: 'test-class-name' })); + const { getAllByTestId } = render( + dateHeaderComponent({ + labelFormat: 'MM/DD/YYYY', + className: 'test-class-name' + }) + ) expect(getAllByTestId('dateHeader')[1]).toHaveClass('test-class-name') }) - it('Given Interval When pass an ovveride values for (width, left, position) it should not ovverride the default values', () => { - const { getAllByTestId } = render(dateHeaderComponent({ labelFormat: "MM/DD/YYYY", props: { style: { width: 100, position: 'fixed' } } })); - const { width, position } = getComputedStyle(getAllByTestId('interval')[0]) + it('Given Interval When pass an override values for (width, left, position) it should not override the default values', () => { + const { getAllByTestId } = render( + dateHeaderComponent({ + labelFormat: 'MM/DD/YYYY', + props: { style: { width: 100, position: 'fixed', left: 2342 } } + }) + ) + const { width, position, left } = getComputedStyle( + getAllByTestId('interval')[0] + ) expect(width).not.toBe('100px') expect(position).not.toBe('fixed') + expect(left).not.toBe('2342px') }) - it('Given Interval When pass an override (width, position) Then it should render the default values for it', () => { - const { getAllByTestId } = render(dateHeaderComponent({ labelFormat: "MM/DD/YYYY", props: { style: { width: 100, position: 'fixed' } } })); + it('Given Interval When pass an override (width, position) Then it should ignore these values', () => { + const { getAllByTestId, debug } = render( + dateHeaderComponent({ + labelFormat: 'MM/DD/YYYY', + props: { style: { width: 100, position: 'fixed' } } + }) + ) const { width, position } = getComputedStyle(getAllByTestId('interval')[0]) - expect(width).toBe('36px') + expect(width).not.toBe('1000px') expect(position).toBe('absolute') - - }) it('Given Interval When pass any style other than (position, width, left) through the Dateheader Then it should take it', () => { - const { getAllByTestId } = render(dateHeaderComponent({ labelFormat: "MM/DD/YYYY", props: { style: { display: 'flex' } } })); + const { getAllByTestId } = render( + dateHeaderComponent({ + labelFormat: 'MM/DD/YYYY', + props: { style: { display: 'flex' } } + }) + ) const { display } = getComputedStyle(getAllByTestId('interval')[0]) expect(display).toBe('flex') - - }) - it('Given unit Dateheader When pass a style Object Then it should render the given style correctly', () => { - const { getAllByTestId } = render(dateHeaderComponent({ style: { height: 50 }, labelFormat: "MM/DD/YYYY" })); - const { height } = getComputedStyle(getAllByTestId('dateHeader')[1]) - - expect(height).toBe('50px') }) it('Given DateHeader component When pass an intervalRenderer prop then it should be called with the right params', () => { - const intervalRenderer = jest.fn(({ getIntervalProps, intervalContext }, props) =>
{intervalContext.intervalText}
) - const { getByTestId, rerender } = render(dateHeaderWithIntervalRenderer({ intervalRenderer: intervalRenderer })) + const intervalRenderer = jest.fn( + ({ getIntervalProps, intervalContext, data }) => ( +
+ {intervalContext.intervalText} +
+ ) + ) + const props = { + title: 'some title' + } + render( + dateHeaderWithIntervalRenderer({ + intervalRenderer: intervalRenderer, + props + }) + ) const bluePrint = { getIntervalProps: expect.any(Function), intervalContext: expect.any(Object) } expect(intervalRenderer).toBeCalled() expect(intervalRenderer).toReturn() - // because we did not pass a props then the function will called with undefined props - expect(intervalRenderer).toBeCalledWith(expect.objectContaining(bluePrint), undefined) - rerender(dateHeaderWithIntervalRenderer({ intervalRenderer: intervalRenderer, props: { style: { height: 50 } } })) - expect(intervalRenderer).toBeCalledWith(expect.objectContaining(bluePrint), expect.any(Object)) - expect(getByTestId('myAwesomeInterval')).toBeInTheDocument() + expect(intervalRenderer.mock.calls[0][0].data).toBe(props) + expect(intervalRenderer.mock.calls[0][0].getIntervalProps).toEqual( + expect.any(Function) + ) + expect(intervalRenderer.mock.calls[0][0].intervalContext).toEqual( + expect.any(Object) + ) }) - describe('Testing The Label Format Diffrent Cases', () => { - it('Given DateHeader When resize the width of the screen to 1000 Then it Should take the long format', () => { - Element.prototype.getBoundingClientRect = jest.fn(() => ({ width: 1000 })); - const { getAllByTestId, rerender } = render(dateHeaderComponent({ - unit: "day", labelFormat: { - day: { short: "DD", medium: "DD/MM", mediumLong: "MM/YYYY", long: "MM/DD/YYYY", } - } - })); - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/26/2018') + + describe('DateHeader Unit Values', () => { + it('Given DateHeader When not passing a unit then the date header unit should be same as timeline unit', () => { + const { getAllByTestId } = render( + + + interval[0].format(format)} /> + + + ) + const intervals = getAllByTestId('dateHeaderInterval').map( + interval => interval.textContent + ) + for (let index = 0; index < intervals.length - 1; index++) { + const a = intervals[index] + const b = intervals[index + 1] + + const timeStampA = moment(a, format) + const timeStampB = moment(b, format) + const diff = timeStampB.diff(timeStampA, 'day') + expect(diff).toBe(1) + } + }) + it('Given DateHeader When passing a unit then the date header unit should be same as unit passed', () => { + const { getAllByTestId } = render( + + + interval[0].format(format)} + /> + + + ) + const intervals = getAllByTestId('dateHeaderInterval').map( + interval => interval.textContent + ) + for (let index = 0; index < intervals.length - 1; index++) { + const a = intervals[index] + const b = intervals[index + 1] + + const timeStampA = moment(a, format) + const timeStampB = moment(b, format) + const diff = timeStampB.diff(timeStampA, 'day') + expect(diff).toBe(1) + } + }) + + it('Given DateHeader When passing primaryHeader Then the header unit should be bigger the timeline unit', () => { + const { getAllByTestId } = render( + + + interval[0].format(format)} + /> + + + ) + const intervals = getAllByTestId('dateHeaderInterval').map( + interval => interval.textContent + ) + for (let index = 0; index < intervals.length - 1; index++) { + const a = intervals[index] + const b = intervals[index + 1] + + const timeStampA = moment(a, format) + const timeStampB = moment(b, format) + const diff = timeStampB.diff(timeStampA, 'month') + expect(diff).toBe(1) + } }) - it('Given DateHeader When resize the width of the screen to 250 Then it Should take the mediumLong format', () => { - Element.prototype.getBoundingClientRect = jest.fn(() => ({ width: 250 })); - const { getAllByTestId } = render(dateHeaderComponent({ - unit: "day", labelFormat: { - day: { short: "DD", medium: "DD/MM", mediumLong: "MM/YYYY", long: "MM/DD/YYYY", } - } - })); - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/2018') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('10/2018') + it('Given DateHeader When not passing unit Then the header unit should be same as the timeline unit', () => { + const { getAllByTestId } = render( + + + interval[0].format(format)} /> + + + ) + const intervals = getAllByTestId('dateHeaderInterval').map( + interval => interval.textContent + ) + for (let index = 0; index < intervals.length - 1; index++) { + const a = intervals[index] + const b = intervals[index + 1] + + const timeStampA = moment(a, format) + const timeStampB = moment(b, format) + const diff = timeStampB.diff(timeStampA, 'day') + expect(diff).toBe(1) + } + }) + }) + + describe('DateHeader Interval', () => { + it('Given DateHeader Interval When passing on click event to the prop getter Then it should trigger', () => { + const onClick = jest.fn() + const { getAllByTestId } = render( + + + { + return ( +
+ {intervalContext.intervalText} +
+ ) + }} + /> +
+
+ ) + const intervals = getAllByTestId('interval') + fireEvent.click(intervals[0]) + expect(onClick).toHaveBeenCalled() }) - it('Given DateHeader When resize the width of the screen to 200 Then it Should take the medium format', () => { - Element.prototype.getBoundingClientRect = jest.fn(() => ({ width: 200 })); - const { getAllByTestId } = render(dateHeaderComponent({ - unit: "day", labelFormat: { - day: { short: "DD", medium: "DD/MM", mediumLong: "MM/YYYY", long: "MM/DD/YYYY", } - } - })); - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('25/10') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('26/10') - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('27/10') + it('Given DateHeader When passing interval renderer Then it should be rendered', () => { + const { getByTestId } = render( + + + { + return ( +
+ {intervalContext.intervalText} +
+ ) + }} + /> +
+
+ ) + expect(getByTestId('interval')).toBeInTheDocument() }) - it('Given DateHeader When resize the width of the screen to 100 Then it Should take the short format', () => { - Element.prototype.getBoundingClientRect = jest.fn(() => ({ width: 100 })); - const { getAllByTestId } = render(dateHeaderComponent({ - unit: "day", labelFormat: { - day: { short: "DD", medium: "DD/MM", mediumLong: "MM/YYYY", long: "MM/DD/YYYY", } - } - })); - expect(getAllByTestId('dateHeader')[1]).toHaveTextContent('26') + it("Given DateHeader When passing interval renderer Then it should called with interval's context", () => { + const renderer = jest.fn(({ getIntervalProps, intervalContext }) => { + return ( +
+ {intervalContext.intervalText} +
+ ) + }) + render( + + + + + + ) + expect(renderer.mock.calls[0][0].intervalContext).toEqual( + expect.objectContaining({ + interval: expect.objectContaining({ + startTime: expect.any(moment), + endTime: expect.any(moment), + labelWidth: expect.any(Number), + left: expect.any(Number) + }), + intervalText: expect.any(String) + }) + ) }) }) + it('Given DateHeader When passing a stateless react component to interval renderer Then it should render', () => { + const Renderer = ({ getIntervalProps, intervalContext }) => { + return ( +
+ {intervalContext.intervalText} +
+ ) + } + const { getByTestId } = render( + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + +
+
+ ) - describe('Testing Diffrent Unit Values', () => { - it('Given DateHeader When pass a year unit to the timeline then it should take it as default', () => { - const children = - const {getAllByTestId} = renderDateHeaderWithContext({unit: 'year', children: children}); - const primaryHeader = getAllByTestId('dateHeader')[0] - const secondaryHeader = getAllByTestId('dateHeader')[1] - expect(primaryHeader).toHaveTextContent('2019') - expect(secondaryHeader).toHaveTextContent('2019') - }) - it('Given DateHeader When pass a month unit to the timeline then it should take it as default', () => { - const children = - const {getAllByTestId} = renderDateHeaderWithContext({unit: 'month', children: children}); - const primaryHeader = getAllByTestId('dateHeader')[0] - const secondaryHeader = getAllByTestId('dateHeader')[1] - expect(primaryHeader).toHaveTextContent('2019') - expect(secondaryHeader).toHaveTextContent('January 2019') - }) - it('Given DateHeader When pass a day unit to the timeline then it should take it as default', () => { - const children = - const {getAllByTestId} = renderDateHeaderWithContext({unit: 'day', children: children}); - const primaryHeader = getAllByTestId('dateHeader')[0] - const secondaryHeader = getAllByTestId('dateHeader')[1] - expect(primaryHeader).toHaveTextContent('January 2019') - expect(secondaryHeader).toHaveTextContent('Monday, January 21, 2019') - }) - it('Given DateHeader When pass a hour unit to the timeline then it should take it as default', () => { - const children = - const {getAllByTestId} = renderDateHeaderWithContext({unit: 'hour', children: children}); - const primaryHeader = getAllByTestId('dateHeader')[0] - const secondaryHeader = getAllByTestId('dateHeader')[1] - expect(primaryHeader).toHaveTextContent('Monday, January 21, 2019') - expect(secondaryHeader).toHaveTextContent('30') - }) + expect(getByTestId('interval-a')).toBeInTheDocument() }) + it('Given DateHeader When passing a react component to interval renderer Then it should render', () => { + class Renderer extends React.Component { + render() { + const { getIntervalProps, intervalContext } = this.props + return ( +
+ {intervalContext.intervalText} +
+ ) + } + } + const { getByTestId } = render( + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + + +
+
+ ) + expect(getByTestId('interval-a')).toBeInTheDocument() + }) + it('#562 Given DateHeader when passing week as a unit then header should render without error', ()=>{ + render( + + + + + + ) + }) }) -function dateHeaderComponent({ labelFormat, unit, props, className, style, handleTimeChange } = {}) { - +function dateHeaderComponent({ + labelFormat, + unit, + props, + className, + style, + showPeriod +} = {}) { return ( - - @@ -311,91 +445,45 @@ function dateHeaderComponent({ labelFormat, unit, props, className, style, handl return
Left
}}
- + { - return
- {intervalContext.intervalText} - -
+ intervalRenderer={({ getIntervalProps, intervalContext, data }) => { + return ( +
+ {intervalContext.intervalText} +
+ ) }} />
-
+ ) } function dateHeaderWithIntervalRenderer({ intervalRenderer, props } = {}) { - return ( - - + {({ getRootProps }) => { return
Left
}}
- +
-
+ ) } - - -function renderDateHeaderWithContext({unit, children} = {}) -{ - const oneDay = 1000 * 60 * 60 * 24 - const now = Date.now() - const visibleTimeStart = now - oneDay - const visibleTimeEnd = now + oneDay - const defaultTimelineState = { - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart: visibleTimeStart - oneDay, - canvasTimeEnd: visibleTimeEnd + oneDay, - canvasWidth: 3000, - visibleWidth: 1000, - showPeriod:()=>{}, - timelineWidth:1000, - timelineUnit:unit - } - - return render( - - React.createRef()} - rightSidebarWidth={0} - > - {children} - - - ) - -} diff --git a/__tests__/components/Headers/SideBarHeader.test.js b/__tests__/components/Headers/SideBarHeader.test.js index b15c13a3b..953e24e7e 100644 --- a/__tests__/components/Headers/SideBarHeader.test.js +++ b/__tests__/components/Headers/SideBarHeader.test.js @@ -1,164 +1,159 @@ -import React from 'react' -import { render, cleanup, within } from 'react-testing-library' -import Timeline from 'lib/Timeline' -import DateHeader from 'lib/headers/DateHeader' -import SidebarHeader from 'lib/headers/SidebarHeader' -import TimelineHeaders from 'lib/headers/TimelineHeaders' -import 'jest-dom/extend-expect' - -import moment from 'moment' - -import { items, groups } from '../../../__fixtures__/itemsAndGroups' - - -const defaultProps = { - groups, - items, - defaultTimeStart: moment('1995-12-25').add(-12, 'hour'), - defaultTimeEnd: moment('1995-12-25').add(12, 'hour') -} - -describe("Testing SidebarHeader Component", () => { - afterEach(cleanup) - // Testing The Example In The Docs - it("Given SidebarHeader When rendered Then it should shown correctly in the timeline", () => { - const { container } = render( - - - - {({ getRootProps }) => { - return
Left
- }} -
- - {({ getRootProps }) => { - return
Right
- }} -
- - -
-
- ) - - const { getByTestId } = within(container) - - expect(getByTestId('leftSidebarHeader')).toBeInTheDocument() - expect(getByTestId('rightSidebarHeader')).toBeInTheDocument() - - expect(getByTestId('leftSidebarHeader').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - expect(getByTestId('rightSidebarHeader').previousElementSibling).toHaveAttribute('data-testid', 'headerContainer') - }) - - it("Given SidebarHeader When passing no variant prop Then it should rendered above the left sidebar", () => { - const { getByTestId, getAllByTestId } = renderSidebarHeaderWithCustomValues() - expect(getByTestId('sidebarHeader')).toBeInTheDocument() - expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - expect(getAllByTestId('sidebarHeader')).toHaveLength(1) - - - }) - it("Given SidebarHeader When passing variant prop with left value Then it should rendered above the left sidebar", () => { - const { getByTestId, getAllByTestId } = renderSidebarHeaderWithCustomValues({ variant: "left" }) - expect(getByTestId('sidebarHeader')).toBeInTheDocument() - expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - expect(getAllByTestId('sidebarHeader')).toHaveLength(1) - }) - it("Given SidebarHeader When passing variant prop with right value Then it should rendered above the right sidebar", () => { - const { getByTestId, getAllByTestId } = renderSidebarHeaderWithCustomValues({ variant: "right" }) - expect(getByTestId('sidebarHeader')).toBeInTheDocument() - expect(getByTestId('sidebarHeader').previousElementSibling).toHaveAttribute('data-testid', 'headerContainer') - expect(getAllByTestId('sidebarHeader')).toHaveLength(1) - }) - - it("Given SidebarHeader When passing variant prop with unusual value Then it should rendered above the left sidebar by default", () => { - const { getByTestId } = renderSidebarHeaderWithCustomValues({ variant: "" }) - expect(getByTestId('sidebarHeader')).toBeInTheDocument() - expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - }) - - it("Given SidebarHeader When passing props to the props getter Then it should rendered correctly", () => { - const { getByTestId } = renderSidebarHeaderWithCustomValues({ props: { style: { width: 250 } } }) - const { width } = getComputedStyle(getByTestId("sidebarHeader")) - expect(width).toBe("250px") - }) - - it("Given SidebarHeader When passing children to it Then it should rendered correctly", () => { - const { getByText } = renderSidebarHeaderWithCustomValues() - expect(getByText("Should Be Rendred")).toBeInTheDocument() - }) - - it("Given sidebarheader When pass a variant and props Then it should render both correctly", () => { - const { getByTestId } = renderSidebarHeaderWithCustomValues({ props: { style: { width: 250 }, variant: "left" } }) - const { width } = getComputedStyle(getByTestId("sidebarHeader")) - expect(width).toBe("250px") - expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - }) - - it("Given two sidebarheaders When pass a variants and props Then it should render both correctly", () => { - const { getByText } = renderTwoSidebarHeadersWithCustomValues({ props: { style: { width: 250 } } }) - const { width: leftWidth } = getComputedStyle(getByText('LeftSideBar')) - const { width: rightWidth } = getComputedStyle(getByText('RightSideBar')) - expect(leftWidth).toBe("250px") - expect(rightWidth).toBe("250px") - expect(getByText('LeftSideBar').nextElementSibling).toHaveAttribute('data-testid', 'headerContainer') - expect(getByText('RightSideBar').previousElementSibling).toHaveAttribute('data-testid', 'headerContainer') - }) - - it('Given SidebarHeader When Pass an props obj to props renderer Then it should render it correctly', () => { - const { getByTestId } = renderSidebarHeaderWithCustomValues({ props: { 'aria-hidden': false } }) - expect(getByTestId("sidebarHeader")).toHaveAttribute('aria-hidden') - }) - -}) - - -function renderSidebarHeaderWithCustomValues({ variant = undefined, props, rightSidebarWidth } = {}) { - return render( - - - {({ getRootProps }, extraProps) => { - return
SidebarHeader -
Should Be Rendred
-
- }} -
- - -
-
- ) -} - - -function renderTwoSidebarHeadersWithCustomValues({ props, rightSidebarWidth } = {}) { - return render( - - - {({ getRootProps }) => { - return
LeftSideBar -
Should Be Rendred
-
- }} -
- - {({ getRootProps }, props) => { - return
RightSideBar -
- }} -
- - -
-
- ) -} - +import React from 'react' +import { render, cleanup } from 'react-testing-library' +import DateHeader from 'lib/headers/DateHeader' +import SidebarHeader from 'lib/headers/SidebarHeader' +import TimelineHeaders from 'lib/headers/TimelineHeaders' +import 'jest-dom/extend-expect' +import { RenderHeadersWrapper } from '../../test-utility/header-renderer' +import { + renderSidebarHeaderWithCustomValues, + renderTwoSidebarHeadersWithCustomValues +} from '../../test-utility/headerRenderers' + +describe('Testing SidebarHeader Component', () => { + afterEach(cleanup) + + //TODO: rename test + it('Given sidebarHeader When pass style with overridden (width) Then it should not override the default values', () => { + const { getByTestId, debug } = renderSidebarHeaderWithCustomValues({ + props: { style: { width: 250 } } + }) + const { width } = getComputedStyle(getByTestId('sidebarHeader')) + expect(width).not.toBe('250px') + }) + + it('Given sidebarHeader When pass style Then it show on the sidebar', () => { + const { getByTestId } = renderSidebarHeaderWithCustomValues({ + props: { style: { color: 'white' } } + }) + const { color } = getComputedStyle(getByTestId('sidebarHeader')) + expect(color).toBe('white') + }) + + it('Given SidebarHeader When a render function Then it will be rendered', () => { + const renderer = jest.fn(({ getRootProps }) => { + return ( +
+ Left +
+ ) + }) + const { getByTestId } = render( + + + {renderer} + + + + + ) + expect(renderer).toHaveBeenCalled() + expect(getByTestId('leftSidebarHeader')).toBeInTheDocument() + }) + + it('Given SidebarHeader When passing props to SidebarHeader it should be passed to the renderProp', () => { + const renderer = jest.fn(({ getRootProps }) => { + return ( +
+ Left +
+ ) + }) + const extraProps = { + someData: 'data' + } + const { getByTestId } = render( + + + {renderer} + + + + + ) + expect(renderer).toHaveBeenCalled() + expect(renderer.mock.calls[0][0].data).toBe(extraProps) + }) + + // Testing The Example In The Docs + it('Given SidebarHeader When rendered Then it should shown correctly in the timeline', () => { + const { getByTestId } = render( + + + + {({ getRootProps }) => { + return ( +
+ Left +
+ ) + }} +
+ + {({ getRootProps }) => { + return ( +
+ Right +
+ ) + }} +
+ + +
+
+ ) + + expect(getByTestId('leftSidebarHeader')).toBeInTheDocument() + expect(getByTestId('rightSidebarHeader')).toBeInTheDocument() + + expect(getByTestId('leftSidebarHeader').nextElementSibling).toHaveAttribute( + 'data-testid', + 'headerContainer' + ) + expect( + getByTestId('rightSidebarHeader').previousElementSibling + ).toHaveAttribute('data-testid', 'headerContainer') + }) + it('Given SideBarHeader When passing a react stateless component as a child Then it should render', () => { + const Renderer = ({ getRootProps }) => { + return ( +
+ Left +
+ ) + } + const { getByText } = render( + + + {Renderer} + + + + + ) + expect(getByText('Left')).toBeInTheDocument() + }) + it('Given SideBarHeader When passing a react stateful component as a child Then it should render', () => { + class Renderer extends React.Component { + render() { + const { getRootProps } = this.props + return ( +
+ Left +
+ ) + } + } + const { getByText } = render( + + + {Renderer} + + + + + ) + expect(getByText('Left')).toBeInTheDocument() + }) +}) diff --git a/__tests__/components/Headers/TimelineHeader.test.js b/__tests__/components/Headers/TimelineHeader.test.js index 96ab239f0..ae4329cab 100644 --- a/__tests__/components/Headers/TimelineHeader.test.js +++ b/__tests__/components/Headers/TimelineHeader.test.js @@ -1,239 +1,195 @@ -import { render, cleanup } from 'react-testing-library' -import Timeline from 'lib/Timeline' -import SidebarHeader from 'lib/headers/SidebarHeader' -import DateHeader from 'lib/headers/DateHeader' -import TimelineHeaders from 'lib/headers/TimelineHeaders' -import 'jest-dom/extend-expect' - -import React from 'react' -import moment from 'moment' - -import { items, groups } from '../../../__fixtures__/itemsAndGroups' -import { - visibleTimeStart, - visibleTimeEnd -} from '../../../__fixtures__/stateAndProps' - -const defaultProps = { - groups, - items, - defaultTimeStart: moment('1995-12-25').add(-12, 'hour'), - defaultTimeEnd: moment('1995-12-25').add(12, 'hour') -} - -describe('TimelineHeader', () => { - beforeEach(() => { - Element.prototype.getBoundingClientRect = jest.fn(() => { - return { - width: 1000, - height: 120, - top: 0, - left: 0, - bottom: 0, - right: 0, - } - }); - }) - afterEach(cleanup) - /** - * Testing The Default Functionality - */ - describe('renders default headers correctly', () => { - it('Given TimelineHeader When rendered Then it should render tow date headers by default', () => { - const { getAllByTestId, getByTestId } = renderDefaultTimeline() - expect(getAllByTestId('dateHeader')).toHaveLength(2) - expect(getByTestId('headerContainer').children).toHaveLength(2) - }) - it('Given TimelineHeader When rendered Then it should render a left sidebar by default', () => { - const { getByTestId } = renderDefaultTimeline() - expect(getByTestId("sidebarHeader")).toBeInTheDocument() - }) - it('Given TimelineHeader When pass a rightsidebarWidth Then it should render two sidebar headers', () => { - let rightSidebarWidth = 150; - const { getAllByTestId } = renderDefaultTimeline({ rightSidebarWidth }); - const sidebarHeaders = getAllByTestId('sidebarHeader') - - expect(sidebarHeaders).toHaveLength(2) - expect(sidebarHeaders[0]).toBeInTheDocument() - expect(sidebarHeaders[1]).toBeInTheDocument() - const { width } = getComputedStyle(sidebarHeaders[1]) - expect(width).toBe("150px") - - - }) - it('Given TimelineHeader When rendered Then it should render a two dateHeadrs default', () => { - const { getAllByTestId } = renderDefaultTimeline(); - const dateHeaders = getAllByTestId("dateHeader") - - expect(dateHeaders).toHaveLength(2) - expect(dateHeaders[1].childElementCount).toBeGreaterThan(dateHeaders[0].childElementCount) - - }) - - it("Given TimelineHeader When pass a left sidebar as a child Then it should render a left sidebar", () => { - const { getByTestId, getAllByTestId } = renderTimelineWithVariantSidebar({ variant: "left" }); - expect(getByTestId('sidebarHeader')).toBeInTheDocument(); - expect(getAllByTestId('sidebarHeader')).toHaveLength(1) - }) - it("Given TimelineHeader When pass a right sidebar as a child Then it should render a right sidebar", () => { - const { getByTestId, getAllByTestId } = renderTimelineWithVariantSidebar({ variant: "right" }); - expect(getByTestId('sidebarHeader')).toBeInTheDocument(); - expect(getAllByTestId('sidebarHeader')).toHaveLength(1) - }) - it("Given TimelineHeader When pass a left and right sidebars as children Then it should render a left and right sidebars", () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar(); - expect(getByTestId('left-header')).toBeInTheDocument(); - expect(getByTestId('right-header')).toBeInTheDocument(); - }) - - it("Given TimelineHeader When pass calendarHeaderStyle with overrided (overflow, width) Then it should not override the deaful values", () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ calendarHeaderStyle: { overflow: 'unset', width: 0 } }); - const headerContainer = getByTestId('headerContainer') - const { width, overflow } = getComputedStyle(headerContainer) - - - expect(overflow).not.toBe('unset') - expect(width).not.toBe("0px") - - }) - it("Given TimelineHeader When pass rootStyle with overrided (display, width) Then it should not override the deaful values", () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ style: { display: 'none', width: 0 } }); - const rootDiv = getByTestId('headerRootDiv') - const { width, display } = getComputedStyle(rootDiv) - - expect(display).not.toBe('none') - expect(width).not.toBe("0px") - - }) - it("Given TimelineHeader When pass calendarHeaderClassName Then it should be applied to the date header container", () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ calendarHeaderClassName: "testClassName" }); - expect(getByTestId("headerContainer")).toHaveClass("testClassName") - }) - }) - - it('Given TimelineHeader When rendered Then it should render the default styles of the date header container', () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar(); - const headerContainer = getByTestId('headerContainer') - const { overflow } = getComputedStyle(headerContainer) - expect(overflow).toBe('hidden') - // The JSDOM will not fire the calc css function - }) - - it('Given TimelineHeader When rendered Then it should render the default styles of the rootStyle', () => { - const { getByTestId } = renderTimelineWithLeftAndRightSidebar(); - const rootDiv = getByTestId('headerRootDiv') - const { width, display } = getComputedStyle(rootDiv) - - expect(display).toBe('flex') - expect(width).toBe("100%") - }) - - /** - * Testing The Example Provided In The Docs - */ - it('Given TimelineHeader When pass a headers as children Then it should render them correctly', () => { - const { getByText, rerender, queryByText } = render( - - - - {({ getRootProps }) => { - return
Left
- }} -
- - {({ getRootProps }) => { - return ( -
- Right -
- ) - }} -
- -
-
- ) - expect(getByText('Left')).toBeInTheDocument() - expect(getByText('Right')).toBeInTheDocument() - rerender( - - - - {({ getRootProps }) => { - return
Left
- }} -
- -
-
- ) - expect(queryByText('Right')).toBeNull() - }) -}) - -function renderDefaultTimeline(props = {}) { - const timelineProps = { - ...defaultProps, - ...props - } - return render() -} - -function renderTimelineWithVariantSidebar({ props, variant } = {}) { - const timelineProps = { - ...defaultProps, - ...props - } - return render( - - - - {({ getRootProps }) => { - return
Header
- }} -
-
-
- ) -} - - -function renderTimelineWithLeftAndRightSidebar({ props, calendarHeaderClassName, calendarHeaderStyle, style } = {}) { - - const timelineProps = { - ...defaultProps, - ...props - } - - return render( - - - - {({ getRootProps }) => { - return
Right
- }} -
- - {({ getRootProps }) => { - return
Left
- }} -
-
-
- ) -} - - - +import { render } from 'react-testing-library' +import SidebarHeader from 'lib/headers/SidebarHeader' +import DateHeader from 'lib/headers/DateHeader' +import TimelineHeaders from 'lib/headers/TimelineHeaders' +import 'jest-dom/extend-expect' +import 'react-testing-library/cleanup-after-each' + +import React from 'react' + +import { RenderHeadersWrapper } from '../../test-utility/header-renderer' +import { + renderSidebarHeaderWithCustomValues, + renderTimelineWithVariantSidebar, + renderTimelineWithLeftAndRightSidebar +} from '../../test-utility/headerRenderers' + +describe('TimelineHeader', () => { + it('Given TimelineHeader When pass a left and right sidebars as children Then it should render a left and right sidebars', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar() + expect(getByTestId('left-header')).toBeInTheDocument() + expect(getByTestId('right-header')).toBeInTheDocument() + }) + + it('Given TimelineHeader When pass calendarHeaderStyle with overridden (overflow, width) Then it should not override the default values', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + calendarHeaderStyle: { overflow: 'unset', width: 0 } + }) + const headerContainer = getByTestId('headerContainer') + const { width, overflow } = getComputedStyle(headerContainer) + + expect(overflow).not.toBe('unset') + expect(width).not.toBe('0px') + }) + it('Given TimelineHeader When pass calendarHeaderStyle Then it be added to styles', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + calendarHeaderStyle: { color: 'white', background: 'black' } + }) + const headerContainer = getByTestId('headerContainer') + const { color, background } = getComputedStyle(headerContainer) + + expect(color).toBe('white') + expect(background).toBe('black') + }) + it('Given TimelineHeader When pass style with overridden (display, width) Then it should not override the default values', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + style: { display: 'none', width: 0 } + }) + const rootDiv = getByTestId('headerRootDiv') + const { width, display } = getComputedStyle(rootDiv) + + expect(display).not.toBe('none') + expect(width).not.toBe('0px') + }) + it('Given TimelineHeader When pass style Then it should it be added to root`s styles', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + style: { color: 'white', background: 'black' } + }) + const rootDiv = getByTestId('headerRootDiv') + const { color, background } = getComputedStyle(rootDiv) + + expect(color).toBe('white') + expect(background).toBe('black') + }) + it('Given TimelineHeader When pass calendarHeaderClassName Then it should be applied to the date header container', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + calendarHeaderClassName: 'testClassName' + }) + expect(getByTestId('headerContainer')).toHaveClass('testClassName') + }) + + it('Given TimelineHeader When no calendarHeaderClassName specified Then undefined should not be applied to the date header container', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + calendarHeaderClassName: undefined + }) + expect(getByTestId('headerContainer')).not.toHaveClass('undefined') + }) + + it('Given TimelineHeader When pass className Then it should be applied to the root header container', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + className: 'testClassName' + }) + expect(getByTestId('headerRootDiv')).toHaveClass('testClassName') + }) + + it('Given TimelineHeader When no className specified Then undefined should not be applied to the root header container', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar({ + className: undefined + }) + expect(getByTestId('headerRootDiv')).not.toHaveClass('undefined') + }) + + it('Given TimelineHeader When rendered Then it should render the default styles of the date header container', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar() + const headerContainer = getByTestId('headerContainer') + const { overflow } = getComputedStyle(headerContainer) + expect(overflow).toBe('hidden') + // The JSDOM will not fire the calc css function + }) + + it('Given TimelineHeader When rendered Then it should render the default styles of the rootStyle', () => { + const { getByTestId } = renderTimelineWithLeftAndRightSidebar() + const rootDiv = getByTestId('headerRootDiv') + const { width, display } = getComputedStyle(rootDiv) + + expect(display).toBe('flex') + expect(width).toBe('100%') + }) + + it('Given SidebarHeader When passing no variant prop Then it should rendered above the left sidebar', () => { + const { + getByTestId, + getAllByTestId + } = renderSidebarHeaderWithCustomValues() + expect(getByTestId('sidebarHeader')).toBeInTheDocument() + expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute( + 'data-testid', + 'headerContainer' + ) + expect(getAllByTestId('sidebarHeader')).toHaveLength(1) + }) + it('Given SidebarHeader When passing variant prop with left value Then it should rendered above the left sidebar', () => { + const { getByTestId, getAllByTestId } = renderSidebarHeaderWithCustomValues( + { variant: 'left' } + ) + expect(getByTestId('sidebarHeader')).toBeInTheDocument() + expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute( + 'data-testid', + 'headerContainer' + ) + expect(getAllByTestId('sidebarHeader')).toHaveLength(1) + }) + it('Given SidebarHeader When passing variant prop with right value Then it should rendered above the right sidebar', () => { + const { + getByTestId, + getAllByTestId, + debug + } = renderSidebarHeaderWithCustomValues({ variant: 'right' }) + expect(getByTestId('sidebarHeader')).toBeInTheDocument() + expect(getAllByTestId('sidebarHeader')).toHaveLength(2) + expect( + getAllByTestId('sidebarHeader')[1].previousElementSibling + ).toHaveAttribute('data-testid', 'headerContainer') + }) + + it('Given SidebarHeader When passing variant prop with unusual value Then it should rendered above the left sidebar by default', () => { + const { getByTestId } = renderSidebarHeaderWithCustomValues({ variant: '' }) + expect(getByTestId('sidebarHeader')).toBeInTheDocument() + expect(getByTestId('sidebarHeader').nextElementSibling).toHaveAttribute( + 'data-testid', + 'headerContainer' + ) + }) + + /** + * Testing The Example Provided In The Docs + */ + it('Given TimelineHeader When pass a headers as children Then it should render them correctly', () => { + const { getByText, rerender, queryByText } = render( + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ + {({ getRootProps }) => { + return ( +
+ Right +
+ ) + }} +
+ +
+
+ ) + expect(getByText('Left')).toBeInTheDocument() + expect(getByText('Right')).toBeInTheDocument() + rerender( + + + + {({ getRootProps }) => { + return
Left
+ }} +
+ +
+
+ ) + expect(queryByText('Right')).toBeNull() + }) +}) diff --git a/__tests__/components/Headers/defaultHeaders.js b/__tests__/components/Headers/defaultHeaders.js new file mode 100644 index 000000000..dbd7722fe --- /dev/null +++ b/__tests__/components/Headers/defaultHeaders.js @@ -0,0 +1,41 @@ +import React from 'react' +import { render } from 'react-testing-library' +import { items, groups } from '../../../__fixtures__/itemsAndGroups' +import { + props as defaultProps +} from '../../../__fixtures__/stateAndProps' +import 'react-testing-library/cleanup-after-each' +import Timeline from 'lib/Timeline' +import 'jest-dom/extend-expect' + +/** + * Testing The Default Functionality + */ +describe('Renders default headers correctly', () => { + it('Given Timeline When not using TimelineHeaders then it should render 2 DateHeaders and a left sidebar header by default ', () => { + const { getAllByTestId, getByTestId } = renderDefaultTimeline(); + expect(getAllByTestId('dateHeader')).toHaveLength(2); + expect(getByTestId('headerContainer').children).toHaveLength(2); + expect(getByTestId('sidebarHeader')).toBeInTheDocument(); + }); + it('Given TimelineHeader When pass a rightSidebarWidthWidth Then it should render two sidebar headers', () => { + let rightSidebarWidth = 150; + const { getAllByTestId } = renderDefaultTimeline({ rightSidebarWidth }); + const sidebarHeaders = getAllByTestId('sidebarHeader'); + expect(sidebarHeaders).toHaveLength(2); + expect(sidebarHeaders[0]).toBeInTheDocument(); + expect(sidebarHeaders[1]).toBeInTheDocument(); + const { width } = getComputedStyle(sidebarHeaders[1]); + expect(width).toBe('150px'); + }); +}); + +export function renderDefaultTimeline(props = {}) { + const timelineProps = { + ...defaultProps, + items, + groups, + ...props + } + return render() +} diff --git a/__tests__/components/Markers/CursorMarker.test.js b/__tests__/components/Markers/CursorMarker.test.js index c3fbfb226..3e036bf59 100644 --- a/__tests__/components/Markers/CursorMarker.test.js +++ b/__tests__/components/Markers/CursorMarker.test.js @@ -1,160 +1,160 @@ -import React from 'react' -import { render, fireEvent, cleanup } from 'react-testing-library' -import 'jest-dom/extend-expect' -import TimelineMarkers from 'lib/markers/public/TimelineMarkers' -import CursorMarker from 'lib/markers/public/CursorMarker' -import { RenderWrapper } from 'test-utility/marker-renderer' -import { MarkerCanvasProvider } from 'lib/markers/MarkerCanvasContext' - -/** - * CursorMarker implementation relies on MarkerCanvas to notify it when the user - * mouses over. On mouse over, CursorMarker is notified detail on the mouseover - * such as date and leftOffset which is used to position the line. These tests - * kind of stub that behavior out but are kind of dirty... - */ - -describe('CursorMarker', () => { - afterEach(cleanup) - const defaultCursorMarkerTestId = 'default-cursor-marker' - it('renders one', () => { - const subscribeToMouseOverMock = jest.fn() - - const { getByTestId } = render( - - - - - - - - ) - - subscribeToMouseOverMock.mock.calls[0][0]({ - isCursorOverCanvas: true - }) - - expect(getByTestId(defaultCursorMarkerTestId)).toBeInTheDocument() - }) - - it('renders with custom renderer', () => { - const customDataIdSelector = 'my-custom-marker-cursor' - const subscribeToMouseOverMock = jest.fn() - const { getByTestId } = render( - - - - - {() =>
} - - - - - ) - - subscribeToMouseOverMock.mock.calls[0][0]({ - isCursorOverCanvas: true - }) - - expect(getByTestId(customDataIdSelector)).toBeInTheDocument() - }) - - it('styles.left based on callback leftOffset', () => { - const subscribeToMouseOverMock = jest.fn() - const { getByTestId } = render( - - - - - - - - ) - - const leftOffset = 1000 - - subscribeToMouseOverMock.mock.calls[0][0]({ - isCursorOverCanvas: true, - leftOffset - }) - - const el = getByTestId(defaultCursorMarkerTestId) - - expect(el).toHaveStyle(`left: ${leftOffset}px`) - }) - - it('child function is passed in date from callback', () => { - const subscribeToMouseOverMock = jest.fn() - const rendererMock = jest.fn(() => null) - render( - - - - {rendererMock} - - - - ) - - const now = Date.now() - - subscribeToMouseOverMock.mock.calls[0][0]({ - isCursorOverCanvas: true, - date: now - }) - - expect(rendererMock).toHaveBeenCalledWith({ - styles: expect.any(Object), - date: now - }) - }) - - it('is removed after unmount', () => { - const subscribeToMouseOverMock = jest.fn() - class RemoveCursorMarker extends React.Component { - state = { - isShowing: true - } - handleToggleCursorMarker = () => { - this.setState({ - isShowing: false - }) - } - render() { - return ( - - - - - {this.state.isShowing && } - - - - ) - } - } - - const { queryByTestId, getByText } = render() - - subscribeToMouseOverMock.mock.calls[0][0]({ - isCursorOverCanvas: true - }) - - expect(queryByTestId(defaultCursorMarkerTestId)).toBeInTheDocument() - - fireEvent.click(getByText('Hide Cursor Marker')) - - expect(queryByTestId(defaultCursorMarkerTestId)).not.toBeInTheDocument() - }) -}) +import React from 'react' +import { render, fireEvent, cleanup } from 'react-testing-library' +import 'jest-dom/extend-expect' +import TimelineMarkers from 'lib/markers/public/TimelineMarkers' +import CursorMarker from 'lib/markers/public/CursorMarker' +import { RenderWrapper } from 'test-utility/marker-renderer' +import { MarkerCanvasProvider } from 'lib/markers/MarkerCanvasContext' + +/** + * CursorMarker implementation relies on MarkerCanvas to notify it when the user + * mouses over. On mouse over, CursorMarker is notified detail on the mouseover + * such as date and leftOffset which is used to position the line. These tests + * kind of stub that behavior out but are kind of dirty... + */ + +describe('CursorMarker', () => { + afterEach(cleanup) + const defaultCursorMarkerTestId = 'default-cursor-marker' + it('renders one', () => { + const subscribeToMouseOverMock = jest.fn() + + const { getByTestId } = render( + + + + + + + + ) + + subscribeToMouseOverMock.mock.calls[0][0]({ + isCursorOverCanvas: true + }) + + expect(getByTestId(defaultCursorMarkerTestId)).toBeInTheDocument() + }) + + it('renders with custom renderer', () => { + const customDataIdSelector = 'my-custom-marker-cursor' + const subscribeToMouseOverMock = jest.fn() + const { getByTestId } = render( + + + + + {() =>
} + + + + + ) + + subscribeToMouseOverMock.mock.calls[0][0]({ + isCursorOverCanvas: true + }) + + expect(getByTestId(customDataIdSelector)).toBeInTheDocument() + }) + + it('styles.left based on callback leftOffset', () => { + const subscribeToMouseOverMock = jest.fn() + const { getByTestId } = render( + + + + + + + + ) + + const leftOffset = 1000 + + subscribeToMouseOverMock.mock.calls[0][0]({ + isCursorOverCanvas: true, + leftOffset + }) + + const el = getByTestId(defaultCursorMarkerTestId) + + expect(el).toHaveStyle(`left: ${leftOffset}px`) + }) + + it('child function is passed in date from callback', () => { + const subscribeToMouseOverMock = jest.fn() + const rendererMock = jest.fn(() => null) + render( + + + + {rendererMock} + + + + ) + + const now = Date.now() + + subscribeToMouseOverMock.mock.calls[0][0]({ + isCursorOverCanvas: true, + date: now + }) + + expect(rendererMock).toHaveBeenCalledWith({ + styles: expect.any(Object), + date: now + }) + }) + + it('is removed after unmount', () => { + const subscribeToMouseOverMock = jest.fn() + class RemoveCursorMarker extends React.Component { + state = { + isShowing: true + } + handleToggleCursorMarker = () => { + this.setState({ + isShowing: false + }) + } + render() { + return ( + + + + + {this.state.isShowing && } + + + + ) + } + } + + const { queryByTestId, getByText } = render() + + subscribeToMouseOverMock.mock.calls[0][0]({ + isCursorOverCanvas: true + }) + + expect(queryByTestId(defaultCursorMarkerTestId)).toBeInTheDocument() + + fireEvent.click(getByText('Hide Cursor Marker')) + + expect(queryByTestId(defaultCursorMarkerTestId)).not.toBeInTheDocument() + }) +}) diff --git a/__tests__/components/Markers/CustomMarker.test.js b/__tests__/components/Markers/CustomMarker.test.js index e307780c3..aeddcc00a 100644 --- a/__tests__/components/Markers/CustomMarker.test.js +++ b/__tests__/components/Markers/CustomMarker.test.js @@ -4,7 +4,7 @@ import 'jest-dom/extend-expect' import TimelineMarkers from 'lib/markers/public/TimelineMarkers' import CustomMarker from 'lib/markers/public/CustomMarker' import { RenderWrapper } from 'test-utility/marker-renderer' -import { defaultKeys } from '../../../src/lib/default-config'; +import { TimelineStateConsumer } from 'lib/timeline/TimelineStateContext' describe('CustomMarker', () => { afterEach(cleanup) @@ -12,9 +12,16 @@ describe('CustomMarker', () => { it('renders one', () => { const { getByTestId } = render( - - - + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + + ) + }} + ) @@ -23,11 +30,18 @@ describe('CustomMarker', () => { it('render multiple', () => { const { queryAllByTestId } = render( - - - - - + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + + + + ) + }} + ) @@ -37,11 +51,18 @@ describe('CustomMarker', () => { const customDataIdSelector = 'my-custom-marker' const { getByTestId } = render( - - - {() =>
} - - + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + {() =>
} + + + ) + }} + ) @@ -69,10 +90,9 @@ describe('CustomMarker', () => { canvasTimeStart: visibleTimeStart - oneDay, canvasTimeEnd: visibleTimeEnd + oneDay, canvasWidth, - showPeriod: () => {}, + showPeriod: () => { }, timelineWidth: 1000, - timelineUnit: 'day', - keys: defaultKeys, + timelineUnit: 'day' } const markerDate = now + oneDay / 2 @@ -103,12 +123,20 @@ describe('CustomMarker', () => { render() { return ( - - - {this.state.isShowing && } - + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + + {this.state.isShowing && } + + + ) + }} ) } @@ -122,20 +150,50 @@ describe('CustomMarker', () => { expect(queryByTestId(defaultCustomMarkerTestId)).not.toBeInTheDocument() }) - it('updates marker location after passing new date', ()=>{ + it('updates marker location after passing new date', () => { const { getByTestId, rerender } = render( - - - + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + + ) + }} ) - const positionLeftBeforeChange = getByTestId(defaultCustomMarkerTestId).style.left - rerender( - - - - ) - const positionLeftAfterChange = getByTestId(defaultCustomMarkerTestId).style.left - expect(positionLeftBeforeChange).not.toEqual(positionLeftAfterChange) + const positionLeftBeforeChange = getByTestId(defaultCustomMarkerTestId).style.left + rerender( + + {({ getTimelineState }) => { + const { canvasTimeStart } = getTimelineState(); + return ( + + + + ) + }} + ) + const positionLeftAfterChange = getByTestId(defaultCustomMarkerTestId).style.left + expect(positionLeftBeforeChange).not.toEqual(positionLeftAfterChange) + }) + it('should not render marker outside canvas', () => { + const { queryByTestId } = render( + + + {({ getTimelineState }) => { + const { canvasTimeEnd } = getTimelineState(); + return ( + + + + ) + }} + + + ) + + expect(queryByTestId(defaultCustomMarkerTestId)).not.toBeInTheDocument() }) }) diff --git a/__tests__/components/Markers/TimelineMarkers.test.js b/__tests__/components/Markers/TimelineMarkers.test.js index da00906b0..8d03a5361 100644 --- a/__tests__/components/Markers/TimelineMarkers.test.js +++ b/__tests__/components/Markers/TimelineMarkers.test.js @@ -3,6 +3,7 @@ import { render } from 'react-testing-library' import 'jest-dom/extend-expect' import TimelineMarkers from 'lib/markers/public/TimelineMarkers' import TodayMarker from 'lib/markers/public/TodayMarker' +import CustomMarker from 'lib/markers/public/CustomMarker' import { RenderWrapper } from 'test-utility/marker-renderer' describe('TimelineMarkers', () => { @@ -23,4 +24,27 @@ describe('TimelineMarkers', () => { ) }) + + it('is unsubscribed on unmounting after passing new date then hide it', ()=>{ + const defaultCustomMarkerTestId = 'default-customer-marker-id' + const { queryByTestId, rerender } = render( + + + + + ) + + rerender( + + + + ) + + rerender( + + + ) + + expect(queryByTestId(defaultCustomMarkerTestId)).not.toBeInTheDocument() + }) }) diff --git a/__tests__/components/Markers/TodayMarker.test.js b/__tests__/components/Markers/TodayMarker.test.js index 22d62a084..bf52d800b 100644 --- a/__tests__/components/Markers/TodayMarker.test.js +++ b/__tests__/components/Markers/TodayMarker.test.js @@ -1,90 +1,90 @@ -import React from 'react' -import { render, fireEvent, cleanup } from 'react-testing-library' -import 'jest-dom/extend-expect' -import { RenderWrapper } from 'test-utility/marker-renderer' -import TimelineMarkers from 'lib/markers/public/TimelineMarkers' -import TodayMarker from 'lib/markers/public/TodayMarker' - -const defaultTestId = 'default-today-line' - -describe('TodayMarker', () => { - afterEach(cleanup) - it('is present', () => { - const { getByTestId } = render( - - - - - - ) - - expect(getByTestId(defaultTestId)).toBeInTheDocument() - }) - - it('is removed after initial render', () => { - class RemoveTodayMarker extends React.Component { - state = { - isShowing: true - } - handleToggleTodayMarker = () => { - this.setState({ - isShowing: false - }) - } - render() { - return ( - - - - {this.state.isShowing && } - - - ) - } - } - - const { queryByTestId, getByText } = render() - - expect(queryByTestId(defaultTestId)).toBeInTheDocument() - - fireEvent.click(getByText('Hide Today')) - - expect(queryByTestId(defaultTestId)).not.toBeInTheDocument() - }) - - it('allows for custom renderer', () => { - const dataTestId = 'custom-today-renderer' - - const { getByTestId } = render( - - - {() =>
} - - - ) - - expect(getByTestId(dataTestId)).toBeInTheDocument() - }) - - it('custom renderer is passed styles and date', () => { - const renderMock = jest.fn(() => null) - - render( - - - {renderMock} - - - ) - - // FIXME: test for date and styles as actual values - expect(renderMock).toHaveBeenCalledWith({ - date: expect.any(Number), - styles: expect.any(Object) - }) - }) - - // TODO: find good way to test these interval based functionality - // xit('sets setInterval timeout based on passed in prop') - // xit('sets setInterval timeout to 10 seconds if no interval prop passed in') -}) +import React from 'react' +import { render, fireEvent, cleanup } from 'react-testing-library' +import 'jest-dom/extend-expect' +import { RenderWrapper } from 'test-utility/marker-renderer' +import TimelineMarkers from 'lib/markers/public/TimelineMarkers' +import TodayMarker from 'lib/markers/public/TodayMarker' + +const defaultTestId = 'default-today-line' + +describe('TodayMarker', () => { + afterEach(cleanup) + it('is present', () => { + const { getByTestId } = render( + + + + + + ) + + expect(getByTestId(defaultTestId)).toBeInTheDocument() + }) + + it('is removed after initial render', () => { + class RemoveTodayMarker extends React.Component { + state = { + isShowing: true + } + handleToggleTodayMarker = () => { + this.setState({ + isShowing: false + }) + } + render() { + return ( + + + + {this.state.isShowing && } + + + ) + } + } + + const { queryByTestId, getByText } = render() + + expect(queryByTestId(defaultTestId)).toBeInTheDocument() + + fireEvent.click(getByText('Hide Today')) + + expect(queryByTestId(defaultTestId)).not.toBeInTheDocument() + }) + + it('allows for custom renderer', () => { + const dataTestId = 'custom-today-renderer' + + const { getByTestId } = render( + + + {() =>
} + + + ) + + expect(getByTestId(dataTestId)).toBeInTheDocument() + }) + + it('custom renderer is passed styles and date', () => { + const renderMock = jest.fn(() => null) + + render( + + + {renderMock} + + + ) + + // FIXME: test for date and styles as actual values + expect(renderMock).toHaveBeenCalledWith({ + date: expect.any(Number), + styles: expect.any(Object) + }) + }) + + // TODO: find good way to test these interval based functionality + // xit('sets setInterval timeout based on passed in prop') + // xit('sets setInterval timeout to 10 seconds if no interval prop passed in') +}) diff --git a/__tests__/components/ScrollElement/ScrollElement.test.js b/__tests__/components/ScrollElement/ScrollElement.test.js index 0ba786d82..032fb2f61 100644 --- a/__tests__/components/ScrollElement/ScrollElement.test.js +++ b/__tests__/components/ScrollElement/ScrollElement.test.js @@ -1,248 +1,248 @@ -import React from 'react' -import { mount } from 'enzyme' -import { sel, noop } from 'test-utility' -import ScrollElement from 'lib/scroll/ScrollElement' - -const defaultProps = { - width: 1000, - height: 800, - onZoom: noop, - onWheelZoom: noop, - onScroll: noop, - traditionalZoom: false, - scrollRef: noop, - isInteractingWithItem: false, - onMouseLeave: noop, - onMouseMove: noop, - onMouseEnter: noop, - onContextMenu: noop -} - -const createMouseEvent = pageX => ({ - button: 0, - pageX, - preventDefault: noop -}) - -const scrollElementSelector = sel('scroll-element') - -xdescribe('ScrollElement', () => { - describe('mouse event delegates', () => { - let onDoubleClickMock, - onMouseLeaveMock, - onMouseMoveMock, - onMouseEnterMock, - onContextMenuMock, - wrapper - - beforeEach(() => { - onDoubleClickMock = jest.fn() - onMouseLeaveMock = jest.fn() - onMouseMoveMock = jest.fn() - onMouseEnterMock = jest.fn() - onContextMenuMock = jest.fn() - - const props = { - ...defaultProps, - onDoubleClick: onDoubleClickMock, - onMouseLeave: onMouseLeaveMock, - onMouseMove: onMouseMoveMock, - onMouseEnter: onMouseEnterMock, - onContextMenu: onContextMenuMock - } - - wrapper = mount( - -
- - ) - }) - - it('scroll element onMouseLeave calls passed in onMouseLeave', () => { - wrapper.find(scrollElementSelector).simulate('mouseleave') - expect(onMouseLeaveMock).toHaveBeenCalledTimes(1) - }) - it('scroll element onMouseMove calls passed in onMouseMove', () => { - wrapper.find(scrollElementSelector).simulate('mousemove') - expect(onMouseMoveMock).toHaveBeenCalledTimes(1) - }) - it('scroll element onMouseEnter calls passed in onMouseEnter', () => { - wrapper.find(scrollElementSelector).simulate('mouseenter') - expect(onMouseEnterMock).toHaveBeenCalledTimes(1) - }) - it('scroll element onContextMenu calls passed in onContextMenu', () => { - wrapper.find(scrollElementSelector).simulate('contextmenu') - expect(onContextMenuMock).toHaveBeenCalledTimes(1) - }) - }) - describe('mouse drag', () => { - let wrapper - - beforeEach(() => { - wrapper = mount( - -
- - ) - }) - it('scrolls left', () => { - const originX = 100 - const destinationX = 200 - - const scrollDifference = -(destinationX - originX) - - const mouseDownEvent = createMouseEvent(originX) - const mouseOverEvent = createMouseEvent(destinationX) - - wrapper.instance().scrollComponent.scrollLeft = originX - - wrapper - .find(scrollElementSelector) - .simulate('mousedown', mouseDownEvent) - .simulate('mousemove', mouseOverEvent) - - expect(wrapper.instance().scrollComponent.scrollLeft).toBe( - originX + scrollDifference - ) - }) - - it('scrolls right', () => { - const originX = 300 - const destinationX = 100 - - const scrollDifference = -(destinationX - originX) - - const mouseDownEvent = createMouseEvent(originX) - const mouseOverEvent = createMouseEvent(destinationX) - - wrapper.instance().scrollComponent.scrollLeft = originX - - wrapper - .find(scrollElementSelector) - .simulate('mousedown', mouseDownEvent) - .simulate('mousemove', mouseOverEvent) - - expect(wrapper.instance().scrollComponent.scrollLeft).toBe( - originX + scrollDifference - ) - }) - }) - - describe('mouse leave', () => { - // guard against bug where dragging persisted after mouse leave - it('cancels dragging on mouse leave', () => { - const wrapper = mount( - -
- - ) - - const initialScrollLeft = wrapper.instance().scrollComponent.scrollLeft - const mouseDownEvent = createMouseEvent(100) - const mouseLeaveEvent = createMouseEvent(100) - const mouseMoveEvent = createMouseEvent(200) - - wrapper - .find(scrollElementSelector) - .simulate('mousedown', mouseDownEvent) - .simulate('mouseleave', mouseLeaveEvent) - .simulate('mousemove', mouseMoveEvent) - - // scrollLeft doesnt move - expect(wrapper.instance().scrollComponent.scrollLeft).toBe( - initialScrollLeft - ) - }) - }) - - describe('scroll', () => { - it('calls onScroll with current scrollLeft', () => { - const onScrollMock = jest.fn() - const props = { - ...defaultProps, - onScroll: onScrollMock - } - - const wrapper = mount( - -
- - ) - const scrollLeft = 200 - wrapper.instance().scrollComponent.scrollLeft = scrollLeft - - wrapper.find(scrollElementSelector).simulate('scroll') - - expect(onScrollMock).toHaveBeenCalledTimes(1) - }) - it('adds width to scrollLeft if scrollLeft is less than half of width', () => { - const width = 800 - const props = { - ...defaultProps, - width - } - - const wrapper = mount( - -
- - ) - - const currentScrollLeft = 300 - wrapper.instance().scrollComponent.scrollLeft = currentScrollLeft - - wrapper.simulate('scroll') - - expect(wrapper.instance().scrollComponent.scrollLeft).toBe( - currentScrollLeft + width - ) - }) - it('subtracts width from scrollLeft if scrollLeft is greater than one and a half of width', () => { - const width = 800 - const props = { - ...defaultProps, - width - } - - const wrapper = mount( - -
- - ) - - const currentScrollLeft = 1300 - wrapper.instance().scrollComponent.scrollLeft = currentScrollLeft - - wrapper.simulate('scroll') - - expect(wrapper.instance().scrollComponent.scrollLeft).toBe( - currentScrollLeft - width - ) - }) - - it('does not alter scrollLeft if scrollLeft is between 0.5 and 1.5 of width', () => { - const width = 800 - const props = { - ...defaultProps, - width - } - - const wrapper = mount( - -
- - ) - - // three samples between this range - const scrolls = [width * 0.5 + 1, width, width * 1.5 - 1] - - scrolls.forEach(scroll => { - wrapper.instance().scrollComponent.scrollLeft = scroll - - wrapper.simulate('scroll') - - expect(wrapper.instance().scrollComponent.scrollLeft).toBe(scroll) - }) - }) - }) -}) +import React from 'react' +import { mount } from 'enzyme' +import { sel, noop } from 'test-utility' +import ScrollElement from 'lib/scroll/ScrollElement' + +const defaultProps = { + width: 1000, + height: 800, + onZoom: noop, + onWheelZoom: noop, + onScroll: noop, + traditionalZoom: false, + scrollRef: noop, + isInteractingWithItem: false, + onMouseLeave: noop, + onMouseMove: noop, + onMouseEnter: noop, + onContextMenu: noop +} + +const createMouseEvent = pageX => ({ + button: 0, + pageX, + preventDefault: noop +}) + +const scrollElementSelector = sel('scroll-element') + +xdescribe('ScrollElement', () => { + describe('mouse event delegates', () => { + let onDoubleClickMock, + onMouseLeaveMock, + onMouseMoveMock, + onMouseEnterMock, + onContextMenuMock, + wrapper + + beforeEach(() => { + onDoubleClickMock = jest.fn() + onMouseLeaveMock = jest.fn() + onMouseMoveMock = jest.fn() + onMouseEnterMock = jest.fn() + onContextMenuMock = jest.fn() + + const props = { + ...defaultProps, + onDoubleClick: onDoubleClickMock, + onMouseLeave: onMouseLeaveMock, + onMouseMove: onMouseMoveMock, + onMouseEnter: onMouseEnterMock, + onContextMenu: onContextMenuMock + } + + wrapper = mount( + +
+ + ) + }) + + it('scroll element onMouseLeave calls passed in onMouseLeave', () => { + wrapper.find(scrollElementSelector).simulate('mouseleave') + expect(onMouseLeaveMock).toHaveBeenCalledTimes(1) + }) + it('scroll element onMouseMove calls passed in onMouseMove', () => { + wrapper.find(scrollElementSelector).simulate('mousemove') + expect(onMouseMoveMock).toHaveBeenCalledTimes(1) + }) + it('scroll element onMouseEnter calls passed in onMouseEnter', () => { + wrapper.find(scrollElementSelector).simulate('mouseenter') + expect(onMouseEnterMock).toHaveBeenCalledTimes(1) + }) + it('scroll element onContextMenu calls passed in onContextMenu', () => { + wrapper.find(scrollElementSelector).simulate('contextmenu') + expect(onContextMenuMock).toHaveBeenCalledTimes(1) + }) + }) + describe('mouse drag', () => { + let wrapper + + beforeEach(() => { + wrapper = mount( + +
+ + ) + }) + it('scrolls left', () => { + const originX = 100 + const destinationX = 200 + + const scrollDifference = -(destinationX - originX) + + const mouseDownEvent = createMouseEvent(originX) + const mouseOverEvent = createMouseEvent(destinationX) + + wrapper.instance().scrollComponent.scrollLeft = originX + + wrapper + .find(scrollElementSelector) + .simulate('mousedown', mouseDownEvent) + .simulate('mousemove', mouseOverEvent) + + expect(wrapper.instance().scrollComponent.scrollLeft).toBe( + originX + scrollDifference + ) + }) + + it('scrolls right', () => { + const originX = 300 + const destinationX = 100 + + const scrollDifference = -(destinationX - originX) + + const mouseDownEvent = createMouseEvent(originX) + const mouseOverEvent = createMouseEvent(destinationX) + + wrapper.instance().scrollComponent.scrollLeft = originX + + wrapper + .find(scrollElementSelector) + .simulate('mousedown', mouseDownEvent) + .simulate('mousemove', mouseOverEvent) + + expect(wrapper.instance().scrollComponent.scrollLeft).toBe( + originX + scrollDifference + ) + }) + }) + + describe('mouse leave', () => { + // guard against bug where dragging persisted after mouse leave + it('cancels dragging on mouse leave', () => { + const wrapper = mount( + +
+ + ) + + const initialScrollLeft = wrapper.instance().scrollComponent.scrollLeft + const mouseDownEvent = createMouseEvent(100) + const mouseLeaveEvent = createMouseEvent(100) + const mouseMoveEvent = createMouseEvent(200) + + wrapper + .find(scrollElementSelector) + .simulate('mousedown', mouseDownEvent) + .simulate('mouseleave', mouseLeaveEvent) + .simulate('mousemove', mouseMoveEvent) + + // scrollLeft doesnt move + expect(wrapper.instance().scrollComponent.scrollLeft).toBe( + initialScrollLeft + ) + }) + }) + + describe('scroll', () => { + it('calls onScroll with current scrollLeft', () => { + const onScrollMock = jest.fn() + const props = { + ...defaultProps, + onScroll: onScrollMock + } + + const wrapper = mount( + +
+ + ) + const scrollLeft = 200 + wrapper.instance().scrollComponent.scrollLeft = scrollLeft + + wrapper.find(scrollElementSelector).simulate('scroll') + + expect(onScrollMock).toHaveBeenCalledTimes(1) + }) + it('adds width to scrollLeft if scrollLeft is less than half of width', () => { + const width = 800 + const props = { + ...defaultProps, + width + } + + const wrapper = mount( + +
+ + ) + + const currentScrollLeft = 300 + wrapper.instance().scrollComponent.scrollLeft = currentScrollLeft + + wrapper.simulate('scroll') + + expect(wrapper.instance().scrollComponent.scrollLeft).toBe( + currentScrollLeft + width + ) + }) + it('subtracts width from scrollLeft if scrollLeft is greater than one and a half of width', () => { + const width = 800 + const props = { + ...defaultProps, + width + } + + const wrapper = mount( + +
+ + ) + + const currentScrollLeft = 1300 + wrapper.instance().scrollComponent.scrollLeft = currentScrollLeft + + wrapper.simulate('scroll') + + expect(wrapper.instance().scrollComponent.scrollLeft).toBe( + currentScrollLeft - width + ) + }) + + it('does not alter scrollLeft if scrollLeft is between 0.5 and 1.5 of width', () => { + const width = 800 + const props = { + ...defaultProps, + width + } + + const wrapper = mount( + +
+ + ) + + // three samples between this range + const scrolls = [width * 0.5 + 1, width, width * 1.5 - 1] + + scrolls.forEach(scroll => { + wrapper.instance().scrollComponent.scrollLeft = scroll + + wrapper.simulate('scroll') + + expect(wrapper.instance().scrollComponent.scrollLeft).toBe(scroll) + }) + }) + }) +}) diff --git a/__tests__/components/Sidebar/Sidebar.test.js b/__tests__/components/Sidebar/Sidebar.test.js new file mode 100644 index 000000000..217d29501 --- /dev/null +++ b/__tests__/components/Sidebar/Sidebar.test.js @@ -0,0 +1,45 @@ +import React from 'react' +import { mount } from 'enzyme' +import Sidebar from 'lib/layout/Sidebar' + +const defaultProps = { + groups: [ + { + bgColor: '#e8ccff', + id: '2998', + label: 'Label Dustin"', + rightTitle: 'Wolff', + title: 'Carlotta', + }, + { + bgColor: '#e8ccff', + id: '2999', + label: 'Label Myrtle"', + rightTitle: '"Sauer"', + title: 'Elmer', + } + ], + width: 10, + height: 10, + groupHeights: [30, 27], + keys: { + groupIdKey: 'id', + groupRightTitleKey: 'rightTitle', + groupTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemIdKey: 'id', + itemTimeEndKey: 'end', + itemTimeStartKey: 'start', + itemTitleKey: 'title' + } +} + +describe('GroupRows', () => { + it('passes props and get right height for first group', () => { + const wrapper = mount(); + + const component = wrapper.find('div.rct-sidebar-row').first(); + expect(component.prop('style').height).toBe('30px'); + }) +}) diff --git a/__tests__/components/Timeline/Timeline.test.js b/__tests__/components/Timeline/Timeline.test.js index 820e06f42..1540d0308 100644 --- a/__tests__/components/Timeline/Timeline.test.js +++ b/__tests__/components/Timeline/Timeline.test.js @@ -1,64 +1,64 @@ -import React from 'react' -import moment from 'moment' -import { mount } from 'enzyme' -import Timeline from 'lib/Timeline' -import { noop } from 'test-utility' - -const defaultProps = { - ...Timeline.defaultProps, - items: [], - groups: [] -} - -xdescribe('Timeline', () => { - describe('initialiation', () => { - it('sets the visibleTime properties to defaultTime props', () => { - const defaultTimeStart = moment('2018-01-01') - const defaultTimeEnd = moment('2018-03-01') - - const props = { - ...defaultProps, - defaultTimeStart, - defaultTimeEnd - } - - const wrapper = mount() - - expect(wrapper.state()).toMatchObject({ - visibleTimeStart: defaultTimeStart.valueOf(), - visibleTimeEnd: defaultTimeEnd.valueOf() - }) - }) - it('sets the visibleTime properties to visibleTime props', () => { - const visibleTimeStart = moment('2018-01-01').valueOf() - const visibleTimeEnd = moment('2018-03-01').valueOf() - - const props = { - ...defaultProps, - visibleTimeStart, - visibleTimeEnd - } - - const wrapper = mount() - - expect(wrapper.state()).toMatchObject({ - visibleTimeStart, - visibleTimeEnd - }) - }) - it('throws error if neither visibleTime or defaultTime props are passed', () => { - const props = { - ...defaultProps, - visibleTimeStart: undefined, - visibleTimeEnd: undefined, - defaultTimeStart: undefined, - defaultTimeEnd: undefined - } - jest.spyOn(global.console, 'error').mockImplementation(noop) - expect(() => mount()).toThrow( - 'You must provide either "defaultTimeStart" and "defaultTimeEnd" or "visibleTimeStart" and "visibleTimeEnd" to initialize the Timeline' - ) - jest.restoreAllMocks() - }) - }) -}) +import React from 'react' +import moment from 'moment' +import { mount } from 'enzyme' +import Timeline from 'lib/Timeline' +import { noop } from 'test-utility' + +const defaultProps = { + ...Timeline.defaultProps, + items: [], + groups: [] +} + +xdescribe('Timeline', () => { + describe('initialiation', () => { + it('sets the visibleTime properties to defaultTime props', () => { + const defaultTimeStart = moment('2018-01-01') + const defaultTimeEnd = moment('2018-03-01') + + const props = { + ...defaultProps, + defaultTimeStart, + defaultTimeEnd + } + + const wrapper = mount() + + expect(wrapper.state()).toMatchObject({ + visibleTimeStart: defaultTimeStart.valueOf(), + visibleTimeEnd: defaultTimeEnd.valueOf() + }) + }) + it('sets the visibleTime properties to visibleTime props', () => { + const visibleTimeStart = moment('2018-01-01').valueOf() + const visibleTimeEnd = moment('2018-03-01').valueOf() + + const props = { + ...defaultProps, + visibleTimeStart, + visibleTimeEnd + } + + const wrapper = mount() + + expect(wrapper.state()).toMatchObject({ + visibleTimeStart, + visibleTimeEnd + }) + }) + it('throws error if neither visibleTime or defaultTime props are passed', () => { + const props = { + ...defaultProps, + visibleTimeStart: undefined, + visibleTimeEnd: undefined, + defaultTimeStart: undefined, + defaultTimeEnd: undefined + } + jest.spyOn(global.console, 'error').mockImplementation(noop) + expect(() => mount()).toThrow( + 'You must provide either "defaultTimeStart" and "defaultTimeEnd" or "visibleTimeStart" and "visibleTimeEnd" to initialize the Timeline' + ) + jest.restoreAllMocks() + }) + }) +}) diff --git a/__tests__/components/interaction/PreventClickOnDrag.js b/__tests__/components/interaction/PreventClickOnDrag.js index eff60395c..07b01d717 100644 --- a/__tests__/components/interaction/PreventClickOnDrag.js +++ b/__tests__/components/interaction/PreventClickOnDrag.js @@ -1,170 +1,170 @@ -import React from 'react' -import { mount } from 'enzyme' -import { noop } from 'test-utility' -import PreventClickOnDrag from 'lib/interaction/PreventClickOnDrag' - -const defaultClickTolerance = 10 -describe('PreventClickOnDrag', () => { - it('should prevent click if element is dragged further than clickTolerance pixels forwards', () => { - const onClickMock = jest.fn() - const wrapper = mount( - -
- - ) - - const originalClientX = 100 - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - wrapper.simulate('mouseup', { - clientX: originalClientX + defaultClickTolerance + 1 - }) - wrapper.simulate('click') - - expect(onClickMock).not.toHaveBeenCalled() - }) - - it('should prevent click if element is dragged further than clickTolerance pixels backwards', () => { - const onClickMock = jest.fn() - const wrapper = mount( - -
- - ) - const originalClientX = 100 - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - wrapper.simulate('mouseup', { - clientX: originalClientX - defaultClickTolerance - 1 - }) - wrapper.simulate('click') - - expect(onClickMock).not.toHaveBeenCalled() - }) - it('should not prevent click if element is dragged less than clickTolerance pixels forwards', () => { - const onClickMock = jest.fn() - const wrapper = mount( - -
- - ) - const originalClientX = 100 - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - - wrapper.simulate('mouseup', { - clientX: originalClientX + defaultClickTolerance - 1 - }) - wrapper.simulate('click') - - expect(onClickMock).toHaveBeenCalledTimes(1) - }) - - it('should not prevent click if element is dragged less than clickTolerance pixels backwards', () => { - const onClickMock = jest.fn() - const wrapper = mount( - -
- - ) - const originalClientX = 100 - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - - wrapper.simulate('mouseup', { - clientX: originalClientX - defaultClickTolerance + 1 - }) - wrapper.simulate('click') - - expect(onClickMock).toHaveBeenCalledTimes(1) - }) - it('should not prevent click if first interaction was drag but second is click', () => { - const onClickMock = jest.fn() - const wrapper = mount( - -
- - ) - - const originalClientX = 100 - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - wrapper.simulate('mouseup', { - clientX: originalClientX + defaultClickTolerance + 1 - }) - wrapper.simulate('click') - - expect(onClickMock).not.toHaveBeenCalled() - - wrapper.simulate('mousedown', { - clientX: originalClientX - }) - wrapper.simulate('mouseup', { - clientX: originalClientX + defaultClickTolerance - 1 // less thanthreshold - }) - wrapper.simulate('click') - - expect(onClickMock).toHaveBeenCalled() - }) - it('calls all other event handlers in wrapped component', () => { - const doubleClickMock = jest.fn() - const wrapper = mount( - -
- - ) - - wrapper.simulate('doubleclick', {}) - - expect(doubleClickMock).toHaveBeenCalled() - }) - - it('only allows single children element', () => { - // dont emit propType error - jest.spyOn(global.console, 'error').mockImplementation(noop) - expect(() => - mount( - -
hey
-
hi
-
how are ya
-
- ) - ).toThrowError( - 'React.Children.only expected to receive a single React element child' - ) - - jest.restoreAllMocks() - }) -}) +import React from 'react' +import { mount } from 'enzyme' +import { noop } from 'test-utility' +import PreventClickOnDrag from 'lib/interaction/PreventClickOnDrag' + +const defaultClickTolerance = 10 +describe('PreventClickOnDrag', () => { + it('should prevent click if element is dragged further than clickTolerance pixels forwards', () => { + const onClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + + const originalClientX = 100 + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + wrapper.simulate('mouseup', { + clientX: originalClientX + defaultClickTolerance + 1 + }) + wrapper.simulate('click') + + expect(onClickMock).not.toHaveBeenCalled() + }) + + it('should prevent click if element is dragged further than clickTolerance pixels backwards', () => { + const onClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + const originalClientX = 100 + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + wrapper.simulate('mouseup', { + clientX: originalClientX - defaultClickTolerance - 1 + }) + wrapper.simulate('click') + + expect(onClickMock).not.toHaveBeenCalled() + }) + it('should not prevent click if element is dragged less than clickTolerance pixels forwards', () => { + const onClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + const originalClientX = 100 + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + + wrapper.simulate('mouseup', { + clientX: originalClientX + defaultClickTolerance - 1 + }) + wrapper.simulate('click') + + expect(onClickMock).toHaveBeenCalledTimes(1) + }) + + it('should not prevent click if element is dragged less than clickTolerance pixels backwards', () => { + const onClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + const originalClientX = 100 + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + + wrapper.simulate('mouseup', { + clientX: originalClientX - defaultClickTolerance + 1 + }) + wrapper.simulate('click') + + expect(onClickMock).toHaveBeenCalledTimes(1) + }) + it('should not prevent click if first interaction was drag but second is click', () => { + const onClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + + const originalClientX = 100 + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + wrapper.simulate('mouseup', { + clientX: originalClientX + defaultClickTolerance + 1 + }) + wrapper.simulate('click') + + expect(onClickMock).not.toHaveBeenCalled() + + wrapper.simulate('mousedown', { + clientX: originalClientX + }) + wrapper.simulate('mouseup', { + clientX: originalClientX + defaultClickTolerance - 1 // less thanthreshold + }) + wrapper.simulate('click') + + expect(onClickMock).toHaveBeenCalled() + }) + it('calls all other event handlers in wrapped component', () => { + const doubleClickMock = jest.fn() + const wrapper = mount( + +
+ + ) + + wrapper.simulate('doubleclick', {}) + + expect(doubleClickMock).toHaveBeenCalled() + }) + + it('only allows single children element', () => { + // dont emit propType error + jest.spyOn(global.console, 'error').mockImplementation(noop) + expect(() => + mount( + +
hey
+
hi
+
how are ya
+
+ ) + ).toThrowError( + 'React.Children.only expected to receive a single React element child' + ) + + jest.restoreAllMocks() + }) +}) diff --git a/__tests__/index.js b/__tests__/index.js index b93609565..25bc31db4 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -132,7 +132,7 @@ xdescribe('Timeline', () => { @@ -149,7 +149,6 @@ xdescribe('Timeline', () => { expect(typeof pluginProps.visibleTimeStart).toBe('number') expect(typeof pluginProps.visibleTimeEnd).toBe('number') expect(typeof pluginProps.height).toBe('number') - expect(typeof pluginProps.headerHeight).toBe('number') expect(typeof pluginProps.minUnit).toBe('string') diff --git a/__tests__/test-utility/header-renderer.js b/__tests__/test-utility/header-renderer.js new file mode 100644 index 000000000..645fb8ee0 --- /dev/null +++ b/__tests__/test-utility/header-renderer.js @@ -0,0 +1,53 @@ +import React from 'react' +import TimelineMarkersRenderer from 'lib/markers/TimelineMarkersRenderer' +import { TimelineMarkersProvider } from 'lib/markers/TimelineMarkersContext' +import { TimelineStateProvider } from 'lib/timeline/TimelineStateContext' +import { state } from '../../__fixtures__/stateAndProps' +import jest from 'jest' +import { defaultTimeSteps } from '../../src/lib/default-config' +import { TimelineHeadersProvider } from '../../src/lib/headers/HeadersContext' + +// eslint-disable-next-line +export const RenderHeadersWrapper = ({ + children, + timelineState = {}, + headersState = {}, + showPeriod = () => {}, + registerScroll = () => {} +}) => { + const defaultTimelineState = { + visibleTimeStart: state.visibleTimeStart, + visibleTimeEnd: state.visibleTimeEnd, + canvasTimeStart: state.canvasTimeStart, + canvasTimeEnd: state.canvasTimeEnd, + canvasWidth: 2000, + showPeriod: showPeriod, + timelineUnit: 'day', + timelineWidth: 1000 + } + + const timelineStateProps = { + ...defaultTimelineState, + ...timelineState + } + + const headersStateProps = { + registerScroll: registerScroll, + timeSteps: defaultTimeSteps, + leftSidebarWidth: 150, + rightSidebarWidth: 0, + ...headersState + } + + return ( +
+ +
+ + {children} + +
+
+
+ ) +} diff --git a/__tests__/test-utility/headerRenderers.js b/__tests__/test-utility/headerRenderers.js new file mode 100644 index 000000000..9fa305052 --- /dev/null +++ b/__tests__/test-utility/headerRenderers.js @@ -0,0 +1,164 @@ +import React from 'react'; +import { render } from 'react-testing-library'; +import DateHeader from 'lib/headers/DateHeader'; +import SidebarHeader from 'lib/headers/SidebarHeader'; +import TimelineHeaders from 'lib/headers/TimelineHeaders'; +import CustomHeader from 'lib/headers/CustomHeader' + +import { RenderHeadersWrapper } from './header-renderer'; +export function renderSidebarHeaderWithCustomValues({ variant = undefined, props, timelineState, headersState, extraProps } = {}) { + return render( + + + {({ getRootProps }) => { + return (
+ SidebarHeader +
Should Be Rendred
+
); + }} +
+ + +
+
); +} +export function renderTwoSidebarHeadersWithCustomValues({ props, timelineState, headersState } = {}) { + return render( + + + {({ getRootProps }) => { + return (
+ LeftSideBar +
Should Be Rendred
+
); + }} +
+ + {({ getRootProps, data }) => { + return
RightSideBar
; + }} +
+ + +
+
); +} + +export function renderTimelineWithLeftAndRightSidebar({ + calendarHeaderClassName, + calendarHeaderStyle, + style, + className, + timelineState, + headersState +} = {}) { + return render( + + + + {({ getRootProps }) => { + return ( +
+ Right +
+ ) + }} +
+ + {({ getRootProps }) => { + return ( +
+ Left +
+ ) + }} +
+
+
+ ) +} + +export function renderTimelineWithVariantSidebar({ + variant, + timelineState, + headersState +} = {}) { + return render( + + + + {({ getRootProps }) => { + return ( +
+ Header +
+ ) + }} +
+
+
+ ) +} + +export function getCustomHeadersInTimeline({ + unit, + props, + intervalStyle, + timelineState, + headersState +} = {}) { + return ( + + + + {( + { + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod, + data = { style: { height: 30 } } + }, + ) => { + return ( +
+ {intervals.map(interval => { + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('DD/MM/YYYY')} +
+
+ ) + })} +
+ ) + }} +
+
+
+ ) +} diff --git a/__tests__/test-utility/index.js b/__tests__/test-utility/index.js index 3cbac0bfb..e02a45670 100644 --- a/__tests__/test-utility/index.js +++ b/__tests__/test-utility/index.js @@ -9,3 +9,7 @@ export function sel(selectorString) { } export function noop() {} + +export function parsePxToNumbers(value) { + return +value.replace('px', '') +} diff --git a/__tests__/test-utility/marker-renderer.js b/__tests__/test-utility/marker-renderer.js index 7fd787b01..566792c6b 100644 --- a/__tests__/test-utility/marker-renderer.js +++ b/__tests__/test-utility/marker-renderer.js @@ -2,7 +2,6 @@ import React from 'react' import TimelineMarkersRenderer from 'lib/markers/TimelineMarkersRenderer' import { TimelineMarkersProvider } from 'lib/markers/TimelineMarkersContext' import { TimelineStateProvider } from 'lib/timeline/TimelineStateContext' -import { defaultKeys } from '../../src/lib/default-config'; const oneDay = 1000 * 60 * 60 * 24 // eslint-disable-next-line @@ -19,8 +18,7 @@ export const RenderWrapper = ({ children, timelineState }) => { visibleWidth: 1000, showPeriod:()=>{}, timelineWidth:1000, - timelineUnit:'day', - keys: defaultKeys + timelineUnit:'day' } timelineState = timelineState != null ? timelineState : defaultTimelineState diff --git a/__tests__/test-utility/parse-px-to-numbers.js b/__tests__/test-utility/parse-px-to-numbers.js new file mode 100644 index 000000000..e69de29bb diff --git a/__tests__/utils/calendar/__snapshots__/calculate-scroll-canvas.js.snap b/__tests__/utils/calendar/__snapshots__/calculate-scroll-canvas.js.snap index 757fcc868..1736a38ab 100644 --- a/__tests__/utils/calendar/__snapshots__/calculate-scroll-canvas.js.snap +++ b/__tests__/utils/calendar/__snapshots__/calculate-scroll-canvas.js.snap @@ -1,261 +1,261 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`calculateScrollCanvas should calculate new scroll state correctly 1`] = ` -Object { - "canvasTimeEnd": 1540720800000, - "canvasTimeStart": 1540461600000, - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 907.4074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 78.74857638888886, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 824.074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 245.4152430555556, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 1032.4074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 287.08190972222224, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 1254.6296296296296, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 172.1749884259259, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 1833.3333333333333, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 236.08273148148123, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 2250, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 236.08273148148146, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, - "visibleTimeEnd": 1540634400000, - "visibleTimeStart": 1540548000000, -} -`; - -exports[`calculateScrollCanvas should calculate new state if zoom changed correctly 1`] = ` -Object { - "canvasTimeEnd": 1540681200000, - "canvasTimeStart": 1540411200000, - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 1431.111111111111, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 75.59863333333351, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 1351.111111111111, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 235.5986333333335, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 1551.111111111111, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 275.5986333333335, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 1764.4444444444446, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 165.28798888888878, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 2320, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 226.6394222222225, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 2720, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 226.6394222222225, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, - "visibleTimeEnd": 1540591200000, - "visibleTimeStart": 1540501200000, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`calculateScrollCanvas should calculate new scroll state correctly 1`] = ` +Object { + "canvasTimeEnd": 1540720800000, + "canvasTimeStart": 1540461600000, + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 907.4074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 78.74857638888886, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 824.074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 245.4152430555556, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 1032.4074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 287.08190972222224, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 1254.6296296296296, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 172.1749884259259, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 1833.3333333333333, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 236.08273148148123, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 2250, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 236.08273148148146, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, + "visibleTimeEnd": 1540634400000, + "visibleTimeStart": 1540548000000, +} +`; + +exports[`calculateScrollCanvas should calculate new state if zoom changed correctly 1`] = ` +Object { + "canvasTimeEnd": 1540681200000, + "canvasTimeStart": 1540411200000, + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 1431.111111111111, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 75.59863333333351, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 1351.111111111111, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 235.5986333333335, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 1551.111111111111, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 275.5986333333335, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 1764.4444444444446, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 165.28798888888878, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 2320, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 226.6394222222225, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 2720, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 226.6394222222225, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, + "visibleTimeEnd": 1540591200000, + "visibleTimeStart": 1540501200000, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/get-group-orders.js.snap b/__tests__/utils/calendar/__snapshots__/get-group-orders.js.snap index 08e41b54f..77b37df78 100644 --- a/__tests__/utils/calendar/__snapshots__/get-group-orders.js.snap +++ b/__tests__/utils/calendar/__snapshots__/get-group-orders.js.snap @@ -1,24 +1,24 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getGroupOrders works as expected 1`] = ` -Object { - "1": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "2": Object { - "group": Object { - "id": "2", - }, - "index": 1, - }, - "3": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getGroupOrders works as expected 1`] = ` +Object { + "1": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "2": Object { + "group": Object { + "id": "2", + }, + "index": 1, + }, + "3": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/get-grouped-items.js.snap b/__tests__/utils/calendar/__snapshots__/get-grouped-items.js.snap index b4a4b264b..9a7b20d17 100644 --- a/__tests__/utils/calendar/__snapshots__/get-grouped-items.js.snap +++ b/__tests__/utils/calendar/__snapshots__/get-grouped-items.js.snap @@ -1,137 +1,137 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getGroupedItems works as expected 1`] = ` -Object { - "0": Object { - "group": Object { - "id": "1", - }, - "index": 0, - "items": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 907.4074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 7.5, - "width": 78.74857638888886, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 824.074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 37.5, - "width": 245.4152430555556, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 1032.4074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 7.5, - "width": 287.08190972222224, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 1254.6296296296296, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 37.5, - "width": 172.1749884259259, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 1833.3333333333333, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 7.5, - "width": 236.08273148148123, - }, - "id": "2", - }, - ], - }, - "1": Object { - "group": Object { - "id": "2", - }, - "index": 1, - "items": Array [], - }, - "2": Object { - "group": Object { - "id": "3", - }, - "index": 2, - "items": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 2250, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 105, - "width": 236.08273148148146, - }, - "id": "3", - }, - ], - }, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getGroupedItems works as expected 1`] = ` +Object { + "0": Object { + "group": Object { + "id": "1", + }, + "index": 0, + "items": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 907.4074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 7.5, + "width": 78.74857638888886, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 824.074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 37.5, + "width": 245.4152430555556, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 1032.4074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 7.5, + "width": 287.08190972222224, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 1254.6296296296296, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 37.5, + "width": 172.1749884259259, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 1833.3333333333333, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 7.5, + "width": 236.08273148148123, + }, + "id": "2", + }, + ], + }, + "1": Object { + "group": Object { + "id": "2", + }, + "index": 1, + "items": Array [], + }, + "2": Object { + "group": Object { + "id": "3", + }, + "index": 2, + "items": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 2250, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 105, + "width": 236.08273148148146, + }, + "id": "3", + }, + ], + }, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/get-item-dimensions.js.snap b/__tests__/utils/calendar/__snapshots__/get-item-dimensions.js.snap index 06f90cb2d..408009e07 100644 --- a/__tests__/utils/calendar/__snapshots__/get-item-dimensions.js.snap +++ b/__tests__/utils/calendar/__snapshots__/get-item-dimensions.js.snap @@ -1,22 +1,22 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getItemDimensions should evaluate dimensions for an item 1`] = ` -Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 60, - "left": 1449.074074074074, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": null, - "width": 78.74857638888898, - }, - "id": "0", -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getItemDimensions should evaluate dimensions for an item 1`] = ` +Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 60, + "left": 1449.074074074074, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": null, + "width": 78.74857638888898, + }, + "id": "0", +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/group-no-stack.js.snap b/__tests__/utils/calendar/__snapshots__/group-no-stack.js.snap index 90095e18b..870398e55 100644 --- a/__tests__/utils/calendar/__snapshots__/group-no-stack.js.snap +++ b/__tests__/utils/calendar/__snapshots__/group-no-stack.js.snap @@ -1,9 +1,9 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`groupNoStack works as expected 1`] = ` -Object { - "groupHeight": 0, - "itemTop": 7.5, - "verticalMargin": 0, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`groupNoStack works as expected 1`] = ` +Object { + "groupHeight": 0, + "itemTop": 7.5, + "verticalMargin": 0, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/group-stack.js.snap b/__tests__/utils/calendar/__snapshots__/group-stack.js.snap index bf2b6c159..8fa179a7c 100644 --- a/__tests__/utils/calendar/__snapshots__/group-stack.js.snap +++ b/__tests__/utils/calendar/__snapshots__/group-stack.js.snap @@ -1,9 +1,9 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`groupStack works as expected 1`] = ` -Object { - "groupHeight": 0, - "itemTop": 7.5, - "verticalMargin": 18.75, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`groupStack works as expected 1`] = ` +Object { + "groupHeight": 0, + "itemTop": 7.5, + "verticalMargin": 18.75, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/stack-all.js.snap b/__tests__/utils/calendar/__snapshots__/stack-all.js.snap index 7121386fb..a4f754b8d 100644 --- a/__tests__/utils/calendar/__snapshots__/stack-all.js.snap +++ b/__tests__/utils/calendar/__snapshots__/stack-all.js.snap @@ -1,33 +1,33 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`stackAll works as expected not stacked 1`] = ` -Object { - "groupHeights": Array [ - 60, - 60, - 60, - ], - "groupTops": Array [ - 0, - 60, - 120, - ], - "height": 180, -} -`; - -exports[`stackAll works as expected stacked 1`] = ` -Object { - "groupHeights": Array [ - 60, - 60, - 60, - ], - "groupTops": Array [ - 0, - 60, - 120, - ], - "height": 180, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`stackAll works as expected not stacked 1`] = ` +Object { + "groupHeights": Array [ + 60, + 60, + 60, + ], + "groupTops": Array [ + 0, + 60, + 120, + ], + "height": 180, +} +`; + +exports[`stackAll works as expected stacked 1`] = ` +Object { + "groupHeights": Array [ + 60, + 60, + 60, + ], + "groupTops": Array [ + 0, + 60, + 120, + ], + "height": 180, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/stack-group.js.snap b/__tests__/utils/calendar/__snapshots__/stack-group.js.snap index 9fe6769be..549df05b5 100644 --- a/__tests__/utils/calendar/__snapshots__/stack-group.js.snap +++ b/__tests__/utils/calendar/__snapshots__/stack-group.js.snap @@ -1,29 +1,29 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`stackGroup should not stack list of items 1`] = ` -Object { - "groupHeight": 0, - "verticalMargin": 0, -} -`; - -exports[`stackGroup should stack list of items 1`] = ` -Object { - "groupHeight": 0, - "verticalMargin": 3.75, -} -`; - -exports[`stackGroup should stack list of items lines 1`] = ` -Object { - "groupHeight": 180, - "verticalMargin": 7.5, -} -`; - -exports[`stackGroup should stack list of items space 1`] = ` -Object { - "groupHeight": 0, - "verticalMargin": 7.5, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`stackGroup should not stack list of items 1`] = ` +Object { + "groupHeight": 0, + "verticalMargin": 0, +} +`; + +exports[`stackGroup should stack list of items 1`] = ` +Object { + "groupHeight": 0, + "verticalMargin": 3.75, +} +`; + +exports[`stackGroup should stack list of items lines 1`] = ` +Object { + "groupHeight": 180, + "verticalMargin": 7.5, +} +`; + +exports[`stackGroup should stack list of items space 1`] = ` +Object { + "groupHeight": 0, + "verticalMargin": 7.5, +} +`; diff --git a/__tests__/utils/calendar/__snapshots__/stack-items.js.snap b/__tests__/utils/calendar/__snapshots__/stack-items.js.snap index 9d0000a46..4c30b9d09 100644 --- a/__tests__/utils/calendar/__snapshots__/stack-items.js.snap +++ b/__tests__/utils/calendar/__snapshots__/stack-items.js.snap @@ -1,631 +1,631 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`stackItems should stack items while moving an item 1`] = ` -Object { - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540543600000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 4472.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 236.24572916666602, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 4097.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 736.245729166666, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 4722.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 861.245729166666, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 5388.888888888889, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 516.5249652777784, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 7125, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 708.2481944444444, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 8375, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 625, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, -} -`; - -exports[`stackItems should stack items while resize item left 1`] = ` -Object { - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540543600000, - "collisionWidth": 3203877, - "height": 22.5, - "left": 4472.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 111.24572916666602, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 4097.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 736.245729166666, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 4722.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 861.245729166666, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 5388.888888888889, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 516.5249652777784, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 7125, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 708.2481944444444, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 8375, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 625, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, -} -`; - -exports[`stackItems should stack items while resize item right 1`] = ` -Object { - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 10403877, - "height": 22.5, - "left": 4347.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 361.245729166666, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 4097.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 736.245729166666, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 4722.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 861.245729166666, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 5388.888888888889, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 516.5249652777784, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 7125, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 708.2481944444444, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 8375, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 625, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, -} -`; - -exports[`stackItems work as expected 1`] = ` -Object { - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 4347.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 236.24572916666602, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 4097.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 736.245729166666, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 4722.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 861.245729166666, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 5388.888888888889, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 33.75, - "width": 516.5249652777784, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 7125, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 708.2481944444444, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 8375, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 93.75, - "width": 625, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 60, - 30, - 30, - ], - "groupTops": Array [ - 0, - 60, - 90, - ], - "height": 120, -} -`; - -exports[`stackItems work as expected no stack 1`] = ` -Object { - "dimensionItems": Array [ - Object { - "dimensions": Object { - "collisionLeft": 1540540000000, - "collisionWidth": 6803877, - "height": 22.5, - "left": 4347.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 236.24572916666602, - }, - "id": "0", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540532800000, - "collisionWidth": 21203877, - "height": 22.5, - "left": 4097.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 736.245729166666, - }, - "id": "5", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540550800000, - "collisionWidth": 24803877, - "height": 22.5, - "left": 4722.222222222223, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 861.245729166666, - }, - "id": "6", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540570000000, - "collisionWidth": 14875919, - "height": 22.5, - "left": 5388.888888888889, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 516.5249652777784, - }, - "id": "1", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540620000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 7125, - "order": Object { - "group": Object { - "id": "1", - }, - "index": 0, - }, - "stack": true, - "top": 3.75, - "width": 708.2481944444444, - }, - "id": "2", - }, - Object { - "dimensions": Object { - "collisionLeft": 1540656000000, - "collisionWidth": 20397548, - "height": 22.5, - "left": 8375, - "order": Object { - "group": Object { - "id": "3", - }, - "index": 2, - }, - "stack": true, - "top": 63.75, - "width": 625, - }, - "id": "3", - }, - ], - "groupHeights": Array [ - 30, - 30, - 30, - ], - "groupTops": Array [ - 0, - 30, - 60, - ], - "height": 90, -} -`; +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`stackItems should stack items while moving an item 1`] = ` +Object { + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540543600000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 4472.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 236.24572916666602, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 4097.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 736.245729166666, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 4722.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 861.245729166666, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 5388.888888888889, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 516.5249652777784, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 7125, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 708.2481944444444, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 8375, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 625, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, +} +`; + +exports[`stackItems should stack items while resize item left 1`] = ` +Object { + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540543600000, + "collisionWidth": 3203877, + "height": 22.5, + "left": 4472.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 111.24572916666602, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 4097.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 736.245729166666, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 4722.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 861.245729166666, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 5388.888888888889, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 516.5249652777784, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 7125, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 708.2481944444444, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 8375, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 625, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, +} +`; + +exports[`stackItems should stack items while resize item right 1`] = ` +Object { + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 10403877, + "height": 22.5, + "left": 4347.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 361.245729166666, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 4097.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 736.245729166666, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 4722.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 861.245729166666, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 5388.888888888889, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 516.5249652777784, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 7125, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 708.2481944444444, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 8375, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 625, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, +} +`; + +exports[`stackItems work as expected 1`] = ` +Object { + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 4347.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 236.24572916666602, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 4097.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 736.245729166666, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 4722.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 861.245729166666, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 5388.888888888889, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 33.75, + "width": 516.5249652777784, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 7125, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 708.2481944444444, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 8375, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 93.75, + "width": 625, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 60, + 30, + 30, + ], + "groupTops": Array [ + 0, + 60, + 90, + ], + "height": 120, +} +`; + +exports[`stackItems work as expected no stack 1`] = ` +Object { + "dimensionItems": Array [ + Object { + "dimensions": Object { + "collisionLeft": 1540540000000, + "collisionWidth": 6803877, + "height": 22.5, + "left": 4347.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 236.24572916666602, + }, + "id": "0", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540532800000, + "collisionWidth": 21203877, + "height": 22.5, + "left": 4097.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 736.245729166666, + }, + "id": "5", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540550800000, + "collisionWidth": 24803877, + "height": 22.5, + "left": 4722.222222222223, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 861.245729166666, + }, + "id": "6", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540570000000, + "collisionWidth": 14875919, + "height": 22.5, + "left": 5388.888888888889, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 516.5249652777784, + }, + "id": "1", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540620000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 7125, + "order": Object { + "group": Object { + "id": "1", + }, + "index": 0, + }, + "stack": true, + "top": 3.75, + "width": 708.2481944444444, + }, + "id": "2", + }, + Object { + "dimensions": Object { + "collisionLeft": 1540656000000, + "collisionWidth": 20397548, + "height": 22.5, + "left": 8375, + "order": Object { + "group": Object { + "id": "3", + }, + "index": 2, + }, + "stack": true, + "top": 63.75, + "width": 625, + }, + "id": "3", + }, + ], + "groupHeights": Array [ + 30, + 30, + 30, + ], + "groupTops": Array [ + 0, + 30, + 60, + ], + "height": 90, +} +`; diff --git a/__tests__/utils/calendar/calculate-dimensions.js b/__tests__/utils/calendar/calculate-dimensions.js index 5b5a18e58..c34f70928 100644 --- a/__tests__/utils/calendar/calculate-dimensions.js +++ b/__tests__/utils/calendar/calculate-dimensions.js @@ -1,85 +1,85 @@ -import { calculateDimensions } from 'lib/utility/calendar' - -describe('calculateDimensions', () => { - it('the item is full on a canvas no draging no resizing', () => { - const dimension = calculateDimensions({ - itemTimeStart: 200, - itemTimeEnd: 300, - isDragging: false, - isResizing: false, - canvasTimeStart: 0, - canvasTimeEnd: 500, - canvasWidth: 500, - dragSnap: 0, - dragTime: false, // we are not draging right now - resizingItem: false, - resizingEdge: false, - resizeTime: false, // we are not resizing right now - visibleTimeStart: 0, - visibleTimeEnd: 500 - }) - - expect(dimension).toMatchObject({ - collisionLeft: 200, - collisionWidth: 100, - left: 200, - width: 100 - }) - }) - - it('items timeStart is less than canvasTimeStart', () => { - let example = { - itemTimeStart: 0, - itemTimeEnd: 300, - canvasTimeStart: 100, - canvasTimeEnd: 500, - visibleTimeStart: 100, - visibleTimeEnd: 500, - canvasWidth: 400, - } - - expect(calculateDimensions(example)).toMatchObject({ - collisionLeft: 0, - collisionWidth: 300, - left: 0, - width: 200 - }) - }) - - it('items timeEnd is greater than canvasTimeEnd', () => { - let example = { - itemTimeStart: 400, - itemTimeEnd: 700, - canvasTimeStart: 100, - canvasTimeEnd: 500, - visibleTimeStart: 100, - visibleTimeEnd: 500, - canvasWidth: 400, - } - - expect(calculateDimensions(example)).toMatchObject({ - collisionLeft: 400, - collisionWidth: 300, - left: 300, - width: 100 - }) - }) - it('item time range completely overlaps canvas time range', () => { - let example = { - itemTimeStart: 0, // item range extends before and after canvas - itemTimeEnd: 600, - canvasTimeStart: 100, - canvasTimeEnd: 500, - canvasWidth: 400, - visibleTimeStart: 100, - visibleTimeEnd: 500, - } - - expect(calculateDimensions(example)).toMatchObject({ - collisionLeft: 0, - collisionWidth: 600, - left: 0, - width: 400 - }) - }) -}) +import { calculateDimensions } from 'lib/utility/calendar' + +describe('calculateDimensions', () => { + it('the item is full on a canvas no draging no resizing', () => { + const dimension = calculateDimensions({ + itemTimeStart: 200, + itemTimeEnd: 300, + isDragging: false, + isResizing: false, + canvasTimeStart: 0, + canvasTimeEnd: 500, + canvasWidth: 500, + dragSnap: 0, + dragTime: false, // we are not draging right now + resizingItem: false, + resizingEdge: false, + resizeTime: false, // we are not resizing right now + visibleTimeStart: 0, + visibleTimeEnd: 500 + }) + + expect(dimension).toMatchObject({ + collisionLeft: 200, + collisionWidth: 100, + left: 200, + width: 100 + }) + }) + + it('items timeStart is less than canvasTimeStart', () => { + let example = { + itemTimeStart: 0, + itemTimeEnd: 300, + canvasTimeStart: 100, + canvasTimeEnd: 500, + visibleTimeStart: 100, + visibleTimeEnd: 500, + canvasWidth: 400, + } + + expect(calculateDimensions(example)).toMatchObject({ + collisionLeft: 0, + collisionWidth: 300, + left: 0, + width: 200 + }) + }) + + it('items timeEnd is greater than canvasTimeEnd', () => { + let example = { + itemTimeStart: 400, + itemTimeEnd: 700, + canvasTimeStart: 100, + canvasTimeEnd: 500, + visibleTimeStart: 100, + visibleTimeEnd: 500, + canvasWidth: 400, + } + + expect(calculateDimensions(example)).toMatchObject({ + collisionLeft: 400, + collisionWidth: 300, + left: 300, + width: 100 + }) + }) + it('item time range completely overlaps canvas time range', () => { + let example = { + itemTimeStart: 0, // item range extends before and after canvas + itemTimeEnd: 600, + canvasTimeStart: 100, + canvasTimeEnd: 500, + canvasWidth: 400, + visibleTimeStart: 100, + visibleTimeEnd: 500, + } + + expect(calculateDimensions(example)).toMatchObject({ + collisionLeft: 0, + collisionWidth: 600, + left: 0, + width: 400 + }) + }) +}) diff --git a/__tests__/utils/calendar/calculate-interaction-new-times.js b/__tests__/utils/calendar/calculate-interaction-new-times.js index 5d7cbe804..151a21dc5 100644 --- a/__tests__/utils/calendar/calculate-interaction-new-times.js +++ b/__tests__/utils/calendar/calculate-interaction-new-times.js @@ -1,57 +1,57 @@ -import { calculateInteractionNewTimes } from 'lib/utility/calendar' - -describe('calculateInteractionNewTimes', () => { - it('should return the original time start and end if no interaction', () => { - expect( - calculateInteractionNewTimes({ - itemTimeStart: 200, - itemTimeEnd: 300, - dragTime: false, - isDragging: false, - isResizing: false, - resizingEdge: false, - resizeTime: false - }) - ).toMatchObject([200, 300]) - }) - it('should calculate new time start and end if being moved', () => { - expect( - calculateInteractionNewTimes({ - itemTimeStart: 200, - itemTimeEnd: 300, - dragTime: 192, - isDragging: true, - isResizing: false, - resizingEdge: false, - resizeTime: false - }) - ).toMatchObject([192, 292]) - }) - it('should calculate new time start and end if being resized right', () => { - expect( - calculateInteractionNewTimes({ - itemTimeStart: 200, - itemTimeEnd: 300, - dragTime: false, - isDragging: false, - isResizing: true, - resizingEdge: 'right', - resizeTime: 250 - }) - ).toMatchObject([200, 250]) - }) - it('should calculate new time start and end if being resized left', () => { - expect( - calculateInteractionNewTimes({ - itemTimeStart: 200, - itemTimeEnd: 300, - dragTime: false, - isDragging: false, - isResizing: true, - resizingEdge: 'left', - resizeTime: 210 - }) - ).toMatchObject([210, 300]) - }) - xit('the item is moved and snapped to the grid', () => {}) -}) +import { calculateInteractionNewTimes } from 'lib/utility/calendar' + +describe('calculateInteractionNewTimes', () => { + it('should return the original time start and end if no interaction', () => { + expect( + calculateInteractionNewTimes({ + itemTimeStart: 200, + itemTimeEnd: 300, + dragTime: false, + isDragging: false, + isResizing: false, + resizingEdge: false, + resizeTime: false + }) + ).toMatchObject([200, 300]) + }) + it('should calculate new time start and end if being moved', () => { + expect( + calculateInteractionNewTimes({ + itemTimeStart: 200, + itemTimeEnd: 300, + dragTime: 192, + isDragging: true, + isResizing: false, + resizingEdge: false, + resizeTime: false + }) + ).toMatchObject([192, 292]) + }) + it('should calculate new time start and end if being resized right', () => { + expect( + calculateInteractionNewTimes({ + itemTimeStart: 200, + itemTimeEnd: 300, + dragTime: false, + isDragging: false, + isResizing: true, + resizingEdge: 'right', + resizeTime: 250 + }) + ).toMatchObject([200, 250]) + }) + it('should calculate new time start and end if being resized left', () => { + expect( + calculateInteractionNewTimes({ + itemTimeStart: 200, + itemTimeEnd: 300, + dragTime: false, + isDragging: false, + isResizing: true, + resizingEdge: 'left', + resizeTime: 210 + }) + ).toMatchObject([210, 300]) + }) + xit('the item is moved and snapped to the grid', () => {}) +}) diff --git a/__tests__/utils/calendar/calculate-scroll-canvas.js b/__tests__/utils/calendar/calculate-scroll-canvas.js index 71f37a27f..d2e803fd0 100644 --- a/__tests__/utils/calendar/calculate-scroll-canvas.js +++ b/__tests__/utils/calendar/calculate-scroll-canvas.js @@ -1,99 +1,99 @@ -import { calculateScrollCanvas } from 'lib/utility/calendar' -import {items, groups} from '../../../__fixtures__/itemsAndGroups' -import {props, state, visibleTimeStart, visibleTimeEnd} from '../../../__fixtures__/stateAndProps' - - -describe('calculateScrollCanvas', () => { - it('should calculate new scroll state', () => { - const newStartTime = visibleTimeStart + 13 * 60 * 60 * 1000 - const newEndTime = visibleTimeEnd + visibleTimeStart + 13 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime, - newEndTime, - false, - items, - groups, - props, - state - ) - expect(result).toHaveProperty('visibleTimeStart') - expect(result).toHaveProperty('visibleTimeEnd') - expect(result).toHaveProperty('dimensionItems') - }) - it('should calculate new scroll state correctly', () => { - const newStartTime = visibleTimeStart + 13 * 60 * 60 * 1000 - const newEndTime = visibleTimeEnd + 13 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime, - newEndTime, - false, - items, - groups, - props, - state - ) - expect(result).toMatchSnapshot() - }) - it('should skip new calculation if new visible start and visible end in canvas', () => { - const newStartTime = visibleTimeStart + 1 * 60 * 60 * 1000 - const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime, - newEndTime, - false, - items, - groups, - props, - state - ) - expect(result).toHaveProperty('visibleTimeStart') - expect(result).toHaveProperty('visibleTimeEnd') - expect(result).not.toHaveProperty('dimensionItems') - }) - it('should force new calculation', () => { - const newStartTime = visibleTimeStart + 1 * 60 * 60 * 1000 - const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime.valueOf(), - newEndTime.valueOf(), - true, - items, - groups, - props, - state - ) - expect(result).toHaveProperty('visibleTimeStart') - expect(result).toHaveProperty('visibleTimeEnd') - expect(result).toHaveProperty('dimensionItems') - }) - it('should calculate new state if zoom changed ', () => { - const newStartTime = visibleTimeStart - const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime, - newEndTime, - false, - items, - groups, - props, - state - ) - expect(result).toHaveProperty('visibleTimeStart') - expect(result).toHaveProperty('visibleTimeEnd') - expect(result).toHaveProperty('dimensionItems') - }) - it('should calculate new state if zoom changed correctly', () => { - const newStartTime = visibleTimeStart - const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 - const result = calculateScrollCanvas( - newStartTime, - newEndTime, - false, - items, - groups, - props, - state - ) - expect(result).toMatchSnapshot() - }) -}) +import { calculateScrollCanvas } from 'lib/utility/calendar' +import {items, groups} from '../../../__fixtures__/itemsAndGroups' +import {props, state, visibleTimeStart, visibleTimeEnd} from '../../../__fixtures__/stateAndProps' + + +describe('calculateScrollCanvas', () => { + it('should calculate new scroll state', () => { + const newStartTime = visibleTimeStart + 13 * 60 * 60 * 1000 + const newEndTime = visibleTimeEnd + visibleTimeStart + 13 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime, + newEndTime, + false, + items, + groups, + props, + state + ) + expect(result).toHaveProperty('visibleTimeStart') + expect(result).toHaveProperty('visibleTimeEnd') + expect(result).toHaveProperty('dimensionItems') + }) + it('should calculate new scroll state correctly', () => { + const newStartTime = visibleTimeStart + 13 * 60 * 60 * 1000 + const newEndTime = visibleTimeEnd + 13 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime, + newEndTime, + false, + items, + groups, + props, + state + ) + expect(result).toMatchSnapshot() + }) + it('should skip new calculation if new visible start and visible end in canvas', () => { + const newStartTime = visibleTimeStart + 1 * 60 * 60 * 1000 + const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime, + newEndTime, + false, + items, + groups, + props, + state + ) + expect(result).toHaveProperty('visibleTimeStart') + expect(result).toHaveProperty('visibleTimeEnd') + expect(result).not.toHaveProperty('dimensionItems') + }) + it('should force new calculation', () => { + const newStartTime = visibleTimeStart + 1 * 60 * 60 * 1000 + const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime.valueOf(), + newEndTime.valueOf(), + true, + items, + groups, + props, + state + ) + expect(result).toHaveProperty('visibleTimeStart') + expect(result).toHaveProperty('visibleTimeEnd') + expect(result).toHaveProperty('dimensionItems') + }) + it('should calculate new state if zoom changed ', () => { + const newStartTime = visibleTimeStart + const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime, + newEndTime, + false, + items, + groups, + props, + state + ) + expect(result).toHaveProperty('visibleTimeStart') + expect(result).toHaveProperty('visibleTimeEnd') + expect(result).toHaveProperty('dimensionItems') + }) + it('should calculate new state if zoom changed correctly', () => { + const newStartTime = visibleTimeStart + const newEndTime = visibleTimeEnd + 1 * 60 * 60 * 1000 + const result = calculateScrollCanvas( + newStartTime, + newEndTime, + false, + items, + groups, + props, + state + ) + expect(result).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/calculate-time-for-x-position.js b/__tests__/utils/calendar/calculate-time-for-x-position.js index 7c2541989..a9c1d9e82 100644 --- a/__tests__/utils/calendar/calculate-time-for-x-position.js +++ b/__tests__/utils/calendar/calculate-time-for-x-position.js @@ -1,65 +1,65 @@ -import moment from 'moment' -import { calculateTimeForXPosition } from 'lib/utility/calendar' - -describe('calculate time for x position', () => { - it('calculates point in middle of timeline', () => { - const canvasStart = moment('2018-01-01').valueOf() - const canvasEnd = moment('2018-01-03').valueOf() - const canvasWidthInPixels = 3000 - - const currentXPositionInPixels = canvasWidthInPixels / 2 - - const actual = calculateTimeForXPosition( - canvasStart, - canvasEnd, - canvasWidthInPixels, - currentXPositionInPixels - ) - - const expected = moment('2018-01-02').valueOf() - - expect(actual).toBe(expected) - }) - - it('calculates point in first quarter of timeline', () => { - const canvasStart = moment('2018-01-01').valueOf() - const canvasEnd = moment('2018-01-02').valueOf() - const canvasWidthInPixels = 3000 - - const currentXPositionInPixels = canvasWidthInPixels / 4 - - const actual = calculateTimeForXPosition( - canvasStart, - canvasEnd, - canvasWidthInPixels, - currentXPositionInPixels - ) - - const expected = moment('2018-01-01') - .add(6, 'hour') - .valueOf() - - expect(actual).toBe(expected) - }) - - it('calculates point in latter quarter of timeline', () => { - const canvasStart = moment('2018-01-01').valueOf() - const canvasEnd = moment('2018-01-02').valueOf() - const canvasWidthInPixels = 3000 - - const currentXPositionInPixels = canvasWidthInPixels * 0.75 - - const actual = calculateTimeForXPosition( - canvasStart, - canvasEnd, - canvasWidthInPixels, - currentXPositionInPixels - ) - - const expected = moment('2018-01-01') - .add(18, 'hour') - .valueOf() - - expect(actual).toBe(expected) - }) -}) +import moment from 'moment' +import { calculateTimeForXPosition } from 'lib/utility/calendar' + +describe('calculate time for x position', () => { + it('calculates point in middle of timeline', () => { + const canvasStart = moment('2018-01-01').valueOf() + const canvasEnd = moment('2018-01-03').valueOf() + const canvasWidthInPixels = 3000 + + const currentXPositionInPixels = canvasWidthInPixels / 2 + + const actual = calculateTimeForXPosition( + canvasStart, + canvasEnd, + canvasWidthInPixels, + currentXPositionInPixels + ) + + const expected = moment('2018-01-02').valueOf() + + expect(actual).toBe(expected) + }) + + it('calculates point in first quarter of timeline', () => { + const canvasStart = moment('2018-01-01').valueOf() + const canvasEnd = moment('2018-01-02').valueOf() + const canvasWidthInPixels = 3000 + + const currentXPositionInPixels = canvasWidthInPixels / 4 + + const actual = calculateTimeForXPosition( + canvasStart, + canvasEnd, + canvasWidthInPixels, + currentXPositionInPixels + ) + + const expected = moment('2018-01-01') + .add(6, 'hour') + .valueOf() + + expect(actual).toBe(expected) + }) + + it('calculates point in latter quarter of timeline', () => { + const canvasStart = moment('2018-01-01').valueOf() + const canvasEnd = moment('2018-01-02').valueOf() + const canvasWidthInPixels = 3000 + + const currentXPositionInPixels = canvasWidthInPixels * 0.75 + + const actual = calculateTimeForXPosition( + canvasStart, + canvasEnd, + canvasWidthInPixels, + currentXPositionInPixels + ) + + const expected = moment('2018-01-01') + .add(18, 'hour') + .valueOf() + + expect(actual).toBe(expected) + }) +}) diff --git a/__tests__/utils/calendar/calculate-x-position-for-time.js b/__tests__/utils/calendar/calculate-x-position-for-time.js index 4a3860dbf..4a021588c 100644 --- a/__tests__/utils/calendar/calculate-x-position-for-time.js +++ b/__tests__/utils/calendar/calculate-x-position-for-time.js @@ -1,35 +1,35 @@ -import { calculateXPositionForTime } from 'lib/utility/calendar' -import moment from 'moment' - -describe('calculateXPositionForTime', () => { - const width = 1000 - const startTime = 100000 - const endTime = 200000 - - it('returns time in middle of timeline', () => { - const time = startTime + (endTime - startTime) * 0.5 - const result = calculateXPositionForTime(startTime, endTime, width, time, 0) - - expect(result).toBe(500) - }) - - it('returns time in the first quarter of timeline', () => { - const time = startTime + (endTime - startTime) * 0.25 - const result = calculateXPositionForTime(startTime, endTime, width, time) - - expect(result).toBe(250) - }) - - it('returns time in the middle of timeline with actual date', () => { - const today = moment().startOf('day') - const startTime = today.valueOf() - const endTime = today - .clone() - .add(1, 'day') - .valueOf() - const time = startTime + (endTime - startTime) * 0.5 - const result = calculateXPositionForTime(startTime, endTime, width, time) - - expect(result).toBe(500) - }) -}) +import { calculateXPositionForTime } from 'lib/utility/calendar' +import moment from 'moment' + +describe('calculateXPositionForTime', () => { + const width = 1000 + const startTime = 100000 + const endTime = 200000 + + it('returns time in middle of timeline', () => { + const time = startTime + (endTime - startTime) * 0.5 + const result = calculateXPositionForTime(startTime, endTime, width, time, 0) + + expect(result).toBe(500) + }) + + it('returns time in the first quarter of timeline', () => { + const time = startTime + (endTime - startTime) * 0.25 + const result = calculateXPositionForTime(startTime, endTime, width, time) + + expect(result).toBe(250) + }) + + it('returns time in the middle of timeline with actual date', () => { + const today = moment().startOf('day') + const startTime = today.valueOf() + const endTime = today + .clone() + .add(1, 'day') + .valueOf() + const time = startTime + (endTime - startTime) * 0.5 + const result = calculateXPositionForTime(startTime, endTime, width, time) + + expect(result).toBe(500) + }) +}) diff --git a/__tests__/utils/calendar/collision.js b/__tests__/utils/calendar/collision.js index 8f71f92e2..4ee20f0c1 100644 --- a/__tests__/utils/calendar/collision.js +++ b/__tests__/utils/calendar/collision.js @@ -1,91 +1,91 @@ -/* eslint-disable */ -import { collision } from 'lib/utility/calendar' - -const buildObject = (x, y, width, height) => ({ - collisionLeft: x, - top: y, - collisionWidth: width, - height -}) - -describe('collision', () => { - describe('left collision', () => { - it('overlaps', () => { - const subject = buildObject(45, 0, 50, 50) - const collidingObject = buildObject(0, 0, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(true) - }) - - it('does not overlap', () => { - const subject = buildObject(50, 0, 50, 50) - const collidingObject = buildObject(0, 0, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(false) - }) - }) - - describe('right collision', () => { - it('overlaps', () => { - const subject = buildObject(0, 0, 50, 50) - const collidingObject = buildObject(45, 0, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(true) - }) - - it('does not overlap', () => { - const subject = buildObject(0, 0, 50, 50) - const collidingObject = buildObject(50, 0, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(false) - }) - }) - - describe('top collision', () => { - it('overlaps', () => { - const subject = buildObject(0, 40, 50, 50) - const collidingObject = buildObject(0, 30, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(true) - }) - - it('does not overlap', () => { - const subject = buildObject(0, 50, 50, 50) - const collidingObject = buildObject(0, 0, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(false) - }) - }) - - describe('bottom collision', () => { - it('overlaps', () => { - const subject = buildObject(0, 30, 50, 50) - const collidingObject = buildObject(0, 50, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(true) - }) - - it('does not overlap', () => { - const subject = buildObject(0, 0, 50, 50) - const collidingObject = buildObject(0, 50, 50, 50) - - const result = collision(subject, collidingObject) - - expect(result).toBe(false) - }) - }) -}) +/* eslint-disable */ +import { collision } from 'lib/utility/calendar' + +const buildObject = (x, y, width, height) => ({ + collisionLeft: x, + top: y, + collisionWidth: width, + height +}) + +describe('collision', () => { + describe('left collision', () => { + it('overlaps', () => { + const subject = buildObject(45, 0, 50, 50) + const collidingObject = buildObject(0, 0, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(true) + }) + + it('does not overlap', () => { + const subject = buildObject(50, 0, 50, 50) + const collidingObject = buildObject(0, 0, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(false) + }) + }) + + describe('right collision', () => { + it('overlaps', () => { + const subject = buildObject(0, 0, 50, 50) + const collidingObject = buildObject(45, 0, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(true) + }) + + it('does not overlap', () => { + const subject = buildObject(0, 0, 50, 50) + const collidingObject = buildObject(50, 0, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(false) + }) + }) + + describe('top collision', () => { + it('overlaps', () => { + const subject = buildObject(0, 40, 50, 50) + const collidingObject = buildObject(0, 30, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(true) + }) + + it('does not overlap', () => { + const subject = buildObject(0, 50, 50, 50) + const collidingObject = buildObject(0, 0, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(false) + }) + }) + + describe('bottom collision', () => { + it('overlaps', () => { + const subject = buildObject(0, 30, 50, 50) + const collidingObject = buildObject(0, 50, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(true) + }) + + it('does not overlap', () => { + const subject = buildObject(0, 0, 50, 50) + const collidingObject = buildObject(0, 50, 50, 50) + + const result = collision(subject, collidingObject) + + expect(result).toBe(false) + }) + }) +}) diff --git a/__tests__/utils/calendar/coordinate-to-time-ratio.js b/__tests__/utils/calendar/coordinate-to-time-ratio.js index 5685ff343..645192e3b 100644 --- a/__tests__/utils/calendar/coordinate-to-time-ratio.js +++ b/__tests__/utils/calendar/coordinate-to-time-ratio.js @@ -1,15 +1,15 @@ -import { coordinateToTimeRatio } from 'lib/utility/calendar' - -describe('coordinateToTimeRatio', () => { - it('calculates ratio', () => { - const width = 1000 // in pixels; - - const canvasTimeEnd = 20000 - const canvasTimeStart = 10000 - - const expected = 10 // 10 units for every pixel; - expect(coordinateToTimeRatio(canvasTimeStart, canvasTimeEnd, width)).toBe( - expected - ) - }) -}) +import { coordinateToTimeRatio } from 'lib/utility/calendar' + +describe('coordinateToTimeRatio', () => { + it('calculates ratio', () => { + const width = 1000 // in pixels; + + const canvasTimeEnd = 20000 + const canvasTimeStart = 10000 + + const expected = 10 // 10 units for every pixel; + expect(coordinateToTimeRatio(canvasTimeStart, canvasTimeEnd, width)).toBe( + expected + ) + }) +}) diff --git a/__tests__/utils/calendar/get-group-orders.js b/__tests__/utils/calendar/get-group-orders.js index 6a2d4a459..23ebe5d2d 100644 --- a/__tests__/utils/calendar/get-group-orders.js +++ b/__tests__/utils/calendar/get-group-orders.js @@ -1,8 +1,8 @@ -import { getGroupOrders } from 'lib/utility/calendar' -import { groups} from '../../../__fixtures__/itemsAndGroups' -import {defaultKeys} from 'lib/default-config' -describe('getGroupOrders', () => { - it('works as expected', () => { - expect(getGroupOrders(groups, defaultKeys)).toMatchSnapshot() - }) -}) +import { getGroupOrders } from 'lib/utility/calendar' +import { groups} from '../../../__fixtures__/itemsAndGroups' +import {defaultKeys} from 'lib/default-config' +describe('getGroupOrders', () => { + it('works as expected', () => { + expect(getGroupOrders(groups, defaultKeys)).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/get-grouped-items.js b/__tests__/utils/calendar/get-grouped-items.js index e9bf0957f..815b50238 100644 --- a/__tests__/utils/calendar/get-grouped-items.js +++ b/__tests__/utils/calendar/get-grouped-items.js @@ -1,8 +1,8 @@ -import { getGroupedItems } from 'lib/utility/calendar' -import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' - -describe('getGroupedItems', () => { - it('works as expected', () => { - expect(getGroupedItems(dimensionItems,orderedGroups)).toMatchSnapshot() - }) -}) +import { getGroupedItems } from 'lib/utility/calendar' +import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' + +describe('getGroupedItems', () => { + it('works as expected', () => { + expect(getGroupedItems(dimensionItems,orderedGroups)).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/get-item-dimensions.js b/__tests__/utils/calendar/get-item-dimensions.js index 4a47aa021..65e963b50 100644 --- a/__tests__/utils/calendar/get-item-dimensions.js +++ b/__tests__/utils/calendar/get-item-dimensions.js @@ -1,22 +1,22 @@ -import { getItemDimensions } from 'lib/utility/calendar' -import {items} from '../../../__fixtures__/itemsAndGroups' -import {state} from '../../../__fixtures__/stateAndProps' -import { defaultKeys } from 'lib/default-config' -import {orderedGroups} from '../../../__fixtures__/groupOrderAndItemDimentions' - -describe('getItemDimensions', () => { - it("should evaluate dimensions for an item", ()=>{ - const item = items[0] - const {canvasTimeStart, canvasTimeEnd} = state - expect(getItemDimensions({ - item, - keys: defaultKeys, - canvasTimeStart, - canvasTimeEnd, - canvasWidth: 3000, - groupOrders: orderedGroups, - lineHeight: 60, - itemHeightRatio: 1, - })).toMatchSnapshot() - }) -}) +import { getItemDimensions } from 'lib/utility/calendar' +import {items} from '../../../__fixtures__/itemsAndGroups' +import {state} from '../../../__fixtures__/stateAndProps' +import { defaultKeys } from 'lib/default-config' +import {orderedGroups} from '../../../__fixtures__/groupOrderAndItemDimentions' + +describe('getItemDimensions', () => { + it("should evaluate dimensions for an item", ()=>{ + const item = items[0] + const {canvasTimeStart, canvasTimeEnd} = state + expect(getItemDimensions({ + item, + keys: defaultKeys, + canvasTimeStart, + canvasTimeEnd, + canvasWidth: 3000, + groupOrders: orderedGroups, + lineHeight: 60, + itemHeightRatio: 1, + })).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/get-item-with-interactions.js b/__tests__/utils/calendar/get-item-with-interactions.js index f0c17067d..41c3d2ddd 100644 --- a/__tests__/utils/calendar/get-item-with-interactions.js +++ b/__tests__/utils/calendar/get-item-with-interactions.js @@ -1,110 +1,110 @@ -import { getItemWithInteractions } from 'lib/utility/calendar' -import { items, groups } from '../../../__fixtures__/itemsAndGroups' -import { defaultKeys } from 'lib/default-config' - -describe('getItemWithInteractions', () => { - it('should return the same item if no interaction occurred', () => { - const item = items[0] - expect( - getItemWithInteractions({ - item, - keys: defaultKeys, - draggingItem: undefined, - resizingItem: undefined, - dragTime: false, - resizingEdge: false, - resizeTime: false, - groups, - newGroupOrder: 0 - }) - ).toBe(item) - }) - it('should return new item with new start and end time if dragged with no changed group', () => { - const item = items[0] - //moved 1 hour - const dragOffset = 60 * 60 * 1000 - expect( - getItemWithInteractions({ - item, - keys: defaultKeys, - draggingItem: item.id, - resizingItem: undefined, - dragTime: item.start_time + dragOffset, - resizingEdge: false, - resizeTime: false, - groups, - newGroupOrder: 0 - }) - ).toMatchObject({ - ...item, - start_time: item.start_time + dragOffset, - end_time: item.end_time + dragOffset, - group: item.group - }) - }) - it('should return new item with new start and end time if dragged with changed group', () => { - const item = items[0] - //moved 1 hour - const dragOffset = 60 * 60 * 1000 - expect( - getItemWithInteractions({ - item, - keys: defaultKeys, - draggingItem: item.id, - resizingItem: undefined, - dragTime: item.start_time + dragOffset, - resizingEdge: false, - resizeTime: false, - groups, - newGroupOrder: 1 - }) - ).toMatchObject({ - ...item, - start_time: item.start_time + dragOffset, - end_time: item.end_time + dragOffset, - group: groups[1].id - }) - }) - it('should return new item with new start time if resized left', () => { - const item = items[0] - //moved 1 hour - const dragOffset = 60 * 60 * 1000 - expect( - getItemWithInteractions({ - item, - keys: defaultKeys, - draggingItem: undefined, - resizingItem: item.id, - dragTime: undefined, - resizingEdge: 'left', - resizeTime: item.start_time + dragOffset, - groups, - newGroupOrder: 0 - }) - ).toMatchObject({ - ...item, - start_time: item.start_time + dragOffset, - }) - }) - it('should return new item with end start time if resized right', () => { - const item = items[0] - //moved 1 hour - const dragOffset = 60 * 60 * 1000 - expect( - getItemWithInteractions({ - item, - keys: defaultKeys, - draggingItem: undefined, - resizingItem: item.id, - dragTime: undefined, - resizingEdge: 'right', - resizeTime: item.end_time + dragOffset, - groups, - newGroupOrder: 0 - }) - ).toMatchObject({ - ...item, - end_time: item.end_time + dragOffset, - }) - }) -}) +import { getItemWithInteractions } from 'lib/utility/calendar' +import { items, groups } from '../../../__fixtures__/itemsAndGroups' +import { defaultKeys } from 'lib/default-config' + +describe('getItemWithInteractions', () => { + it('should return the same item if no interaction occurred', () => { + const item = items[0] + expect( + getItemWithInteractions({ + item, + keys: defaultKeys, + draggingItem: undefined, + resizingItem: undefined, + dragTime: false, + resizingEdge: false, + resizeTime: false, + groups, + newGroupOrder: 0 + }) + ).toBe(item) + }) + it('should return new item with new start and end time if dragged with no changed group', () => { + const item = items[0] + //moved 1 hour + const dragOffset = 60 * 60 * 1000 + expect( + getItemWithInteractions({ + item, + keys: defaultKeys, + draggingItem: item.id, + resizingItem: undefined, + dragTime: item.start_time + dragOffset, + resizingEdge: false, + resizeTime: false, + groups, + newGroupOrder: 0 + }) + ).toMatchObject({ + ...item, + start_time: item.start_time + dragOffset, + end_time: item.end_time + dragOffset, + group: item.group + }) + }) + it('should return new item with new start and end time if dragged with changed group', () => { + const item = items[0] + //moved 1 hour + const dragOffset = 60 * 60 * 1000 + expect( + getItemWithInteractions({ + item, + keys: defaultKeys, + draggingItem: item.id, + resizingItem: undefined, + dragTime: item.start_time + dragOffset, + resizingEdge: false, + resizeTime: false, + groups, + newGroupOrder: 1 + }) + ).toMatchObject({ + ...item, + start_time: item.start_time + dragOffset, + end_time: item.end_time + dragOffset, + group: groups[1].id + }) + }) + it('should return new item with new start time if resized left', () => { + const item = items[0] + //moved 1 hour + const dragOffset = 60 * 60 * 1000 + expect( + getItemWithInteractions({ + item, + keys: defaultKeys, + draggingItem: undefined, + resizingItem: item.id, + dragTime: undefined, + resizingEdge: 'left', + resizeTime: item.start_time + dragOffset, + groups, + newGroupOrder: 0 + }) + ).toMatchObject({ + ...item, + start_time: item.start_time + dragOffset, + }) + }) + it('should return new item with end start time if resized right', () => { + const item = items[0] + //moved 1 hour + const dragOffset = 60 * 60 * 1000 + expect( + getItemWithInteractions({ + item, + keys: defaultKeys, + draggingItem: undefined, + resizingItem: item.id, + dragTime: undefined, + resizingEdge: 'right', + resizeTime: item.end_time + dragOffset, + groups, + newGroupOrder: 0 + }) + ).toMatchObject({ + ...item, + end_time: item.end_time + dragOffset, + }) + }) +}) diff --git a/__tests__/utils/calendar/get-min-unit.js b/__tests__/utils/calendar/get-min-unit.js index 8ade4faab..b35adabd6 100644 --- a/__tests__/utils/calendar/get-min-unit.js +++ b/__tests__/utils/calendar/get-min-unit.js @@ -1,48 +1,48 @@ -/* eslint-disable */ -import { getMinUnit, minCellWidth } from 'lib/utility/calendar' -import moment from 'moment' -import { defaultTimeSteps } from 'lib/default-config' - -describe('getMinUnit', () => { - // this is the happy path and used as safety net if we make any refactorings - // to this function. There seem to be a ton of edge cases here... - describe('standard width of 1200', () => { - const standardWidth = 1200 - it('should be second for one minute duration', () => { - const oneMinute = moment.duration(1, 'minute').asMilliseconds() - const result = getMinUnit(oneMinute, standardWidth, defaultTimeSteps) - - expect(result).toBe('second') - }) - it('should be minute for one hour duration', () => { - const oneHour = moment.duration(1, 'hour').asMilliseconds() - const result = getMinUnit(oneHour, standardWidth, defaultTimeSteps) - - expect(result).toBe('minute') - }) - it('should be hour for one day duration', () => { - const oneDay = moment.duration(1, 'day').asMilliseconds() - const result = getMinUnit(oneDay, standardWidth, defaultTimeSteps) - - expect(result).toBe('hour') - }) - it('should be day for one week duration', () => { - const oneWeek = moment.duration(1, 'week').asMilliseconds() - const result = getMinUnit(oneWeek, standardWidth, defaultTimeSteps) - - expect(result).toBe('day') - }) - it('should be day for one month duration', () => { - const oneMonth = moment.duration(1, 'month').asMilliseconds() - const result = getMinUnit(oneMonth, standardWidth, defaultTimeSteps) - - expect(result).toBe('day') - }) - it('should be month for one year duration', () => { - const oneYear = moment.duration(1, 'year').asMilliseconds() - const result = getMinUnit(oneYear, standardWidth, defaultTimeSteps) - - expect(result).toBe('month') - }) - }) -}) +/* eslint-disable */ +import { getMinUnit, minCellWidth } from 'lib/utility/calendar' +import moment from 'moment' +import { defaultTimeSteps } from 'lib/default-config' + +describe('getMinUnit', () => { + // this is the happy path and used as safety net if we make any refactorings + // to this function. There seem to be a ton of edge cases here... + describe('standard width of 1200', () => { + const standardWidth = 1200 + it('should be second for one minute duration', () => { + const oneMinute = moment.duration(1, 'minute').asMilliseconds() + const result = getMinUnit(oneMinute, standardWidth, defaultTimeSteps) + + expect(result).toBe('second') + }) + it('should be minute for one hour duration', () => { + const oneHour = moment.duration(1, 'hour').asMilliseconds() + const result = getMinUnit(oneHour, standardWidth, defaultTimeSteps) + + expect(result).toBe('minute') + }) + it('should be hour for one day duration', () => { + const oneDay = moment.duration(1, 'day').asMilliseconds() + const result = getMinUnit(oneDay, standardWidth, defaultTimeSteps) + + expect(result).toBe('hour') + }) + it('should be day for one week duration', () => { + const oneWeek = moment.duration(1, 'week').asMilliseconds() + const result = getMinUnit(oneWeek, standardWidth, defaultTimeSteps) + + expect(result).toBe('day') + }) + it('should be day for one month duration', () => { + const oneMonth = moment.duration(1, 'month').asMilliseconds() + const result = getMinUnit(oneMonth, standardWidth, defaultTimeSteps) + + expect(result).toBe('day') + }) + it('should be month for one year duration', () => { + const oneYear = moment.duration(1, 'year').asMilliseconds() + const result = getMinUnit(oneYear, standardWidth, defaultTimeSteps) + + expect(result).toBe('month') + }) + }) +}) diff --git a/__tests__/utils/calendar/get-visible-items.js b/__tests__/utils/calendar/get-visible-items.js index 27acc87bd..cfcb37907 100644 --- a/__tests__/utils/calendar/get-visible-items.js +++ b/__tests__/utils/calendar/get-visible-items.js @@ -1,122 +1,122 @@ -import { getVisibleItems } from 'lib/utility/calendar' -import moment from 'moment' - -const itemTimeStartKey = 'start' -const itemTimeEndKey = 'end' - -const keys = { - itemTimeStartKey, - itemTimeEndKey -} - -describe('getVisibleItems', () => { - it('returns items within date range - both dates', () => { - const startRange = moment() - .add(-1, 'day') - .valueOf() - const endRange = moment(startRange).add(1, 'day') - const items = [ - { - [itemTimeStartKey]: moment(startRange) - .add(10, 'minute') - .valueOf(), - [itemTimeEndKey]: moment(startRange) - .add(20, 'minute') - .valueOf(), - id: 1 - } - ] - - const result = getVisibleItems(items, startRange, endRange, keys) - - expect(result).toMatchObject(items) - }) - - it('returns items within date range - start date', () => { - const startRange = moment() - .add(-1, 'day') - .valueOf() - const endRange = moment(startRange).add(1, 'day') - const items = [ - { - [itemTimeStartKey]: moment(endRange) - .add(-10, 'minute') - .valueOf(), - [itemTimeEndKey]: moment(endRange) - .add(20, 'minute') - .valueOf(), - id: 1 - } - ] - - const result = getVisibleItems(items, startRange, endRange, keys) - - expect(result).toMatchObject(items) - }) - - it('returns items within date range - end date', () => { - const startRange = moment() - .add(-1, 'day') - .valueOf() - const endRange = moment(startRange).add(1, 'day') - const items = [ - { - [itemTimeStartKey]: moment(startRange) - .add(-10, 'minute') - .valueOf(), - [itemTimeEndKey]: moment(startRange) - .add(10, 'minute') - .valueOf(), - id: 1 - } - ] - - const result = getVisibleItems(items, startRange, endRange, keys) - - expect(result).toMatchObject(items) - }) - - it('does not return items outside of date range - before start date', () => { - const startRange = moment() - .add(-1, 'day') - .valueOf() - const endRange = moment(startRange).add(1, 'day') - const items = [ - { - [itemTimeStartKey]: moment(startRange) - .add(-2, 'day') - .valueOf(), - [itemTimeEndKey]: moment(startRange) - .add(-1, 'day') - .valueOf(), - id: 1 - } - ] - - const result = getVisibleItems(items, startRange, endRange, keys) - - expect(result).toMatchObject([]) - }) - - it('does not return items outside of date range - after end date', () => { - const startRange = moment() - .add(-1, 'day') - .valueOf() - const endRange = moment(startRange).add(1, 'day') - const items = [ - { - [itemTimeStartKey]: moment(endRange) - .add(1, 'day') - .valueOf(), - [itemTimeEndKey]: moment(endRange) - .add(2, 'day') - .valueOf(), - id: 1 - } - ] - - const result = getVisibleItems(items, startRange, endRange, keys) - - expect(result).toMatchObject([]) - }) -}) +import { getVisibleItems } from 'lib/utility/calendar' +import moment from 'moment' + +const itemTimeStartKey = 'start' +const itemTimeEndKey = 'end' + +const keys = { + itemTimeStartKey, + itemTimeEndKey +} + +describe('getVisibleItems', () => { + it('returns items within date range - both dates', () => { + const startRange = moment() + .add(-1, 'day') + .valueOf() + const endRange = moment(startRange).add(1, 'day') + const items = [ + { + [itemTimeStartKey]: moment(startRange) + .add(10, 'minute') + .valueOf(), + [itemTimeEndKey]: moment(startRange) + .add(20, 'minute') + .valueOf(), + id: 1 + } + ] + + const result = getVisibleItems(items, startRange, endRange, keys) + + expect(result).toMatchObject(items) + }) + + it('returns items within date range - start date', () => { + const startRange = moment() + .add(-1, 'day') + .valueOf() + const endRange = moment(startRange).add(1, 'day') + const items = [ + { + [itemTimeStartKey]: moment(endRange) + .add(-10, 'minute') + .valueOf(), + [itemTimeEndKey]: moment(endRange) + .add(20, 'minute') + .valueOf(), + id: 1 + } + ] + + const result = getVisibleItems(items, startRange, endRange, keys) + + expect(result).toMatchObject(items) + }) + + it('returns items within date range - end date', () => { + const startRange = moment() + .add(-1, 'day') + .valueOf() + const endRange = moment(startRange).add(1, 'day') + const items = [ + { + [itemTimeStartKey]: moment(startRange) + .add(-10, 'minute') + .valueOf(), + [itemTimeEndKey]: moment(startRange) + .add(10, 'minute') + .valueOf(), + id: 1 + } + ] + + const result = getVisibleItems(items, startRange, endRange, keys) + + expect(result).toMatchObject(items) + }) + + it('does not return items outside of date range - before start date', () => { + const startRange = moment() + .add(-1, 'day') + .valueOf() + const endRange = moment(startRange).add(1, 'day') + const items = [ + { + [itemTimeStartKey]: moment(startRange) + .add(-2, 'day') + .valueOf(), + [itemTimeEndKey]: moment(startRange) + .add(-1, 'day') + .valueOf(), + id: 1 + } + ] + + const result = getVisibleItems(items, startRange, endRange, keys) + + expect(result).toMatchObject([]) + }) + + it('does not return items outside of date range - after end date', () => { + const startRange = moment() + .add(-1, 'day') + .valueOf() + const endRange = moment(startRange).add(1, 'day') + const items = [ + { + [itemTimeStartKey]: moment(endRange) + .add(1, 'day') + .valueOf(), + [itemTimeEndKey]: moment(endRange) + .add(2, 'day') + .valueOf(), + id: 1 + } + ] + + const result = getVisibleItems(items, startRange, endRange, keys) + + expect(result).toMatchObject([]) + }) +}) diff --git a/__tests__/utils/calendar/group-no-stack.js b/__tests__/utils/calendar/group-no-stack.js index 758927266..28cd5ca08 100644 --- a/__tests__/utils/calendar/group-no-stack.js +++ b/__tests__/utils/calendar/group-no-stack.js @@ -1,11 +1,11 @@ -import {groupNoStack} from 'lib/utility/calendar' -import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' - -describe('groupNoStack', ()=>{ - it('works as expected', ()=>{ - const groupHeight = 0; - const totalHeight = 0; - const index = 0; - expect(groupNoStack(60, dimensionItems[index], groupHeight, totalHeight, index)).toMatchSnapshot() - }) -}) +import {groupNoStack} from 'lib/utility/calendar' +import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' + +describe('groupNoStack', ()=>{ + it('works as expected', ()=>{ + const groupHeight = 0; + const totalHeight = 0; + const index = 0; + expect(groupNoStack(60, dimensionItems[index], groupHeight, totalHeight, index)).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/group-stack.js b/__tests__/utils/calendar/group-stack.js index 2abd4eea6..29ab492b0 100644 --- a/__tests__/utils/calendar/group-stack.js +++ b/__tests__/utils/calendar/group-stack.js @@ -1,11 +1,11 @@ -import {groupStack} from 'lib/utility/calendar' -import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' - -describe('groupStack', ()=>{ - it('works as expected', ()=>{ - const groupHeight = 0; - const totalHeight = 0; - const index = 0; - expect(groupStack(60, dimensionItems[index], dimensionItems, groupHeight, totalHeight, index)).toMatchSnapshot() - }) -}) +import {groupStack} from 'lib/utility/calendar' +import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' + +describe('groupStack', ()=>{ + it('works as expected', ()=>{ + const groupHeight = 0; + const totalHeight = 0; + const index = 0; + expect(groupStack(60, dimensionItems[index], dimensionItems, groupHeight, totalHeight, index)).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/iterate-times.js b/__tests__/utils/calendar/iterate-times.js index 56ca36ef4..cfd5a4fdf 100644 --- a/__tests__/utils/calendar/iterate-times.js +++ b/__tests__/utils/calendar/iterate-times.js @@ -1,7 +1,7 @@ -/* eslint-disable */ - -import { iterateTimes } from 'lib/utility/calendar' - -describe('iterateTimes', () => { - xit('WRITE TEST HERE :)', () => {}) -}) +/* eslint-disable */ + +import { iterateTimes } from 'lib/utility/calendar' + +describe('iterateTimes', () => { + xit('WRITE TEST HERE :)', () => {}) +}) diff --git a/__tests__/utils/calendar/stack-all.js b/__tests__/utils/calendar/stack-all.js index 7d2ba07d1..6bdbf6305 100644 --- a/__tests__/utils/calendar/stack-all.js +++ b/__tests__/utils/calendar/stack-all.js @@ -1,13 +1,13 @@ -import { stackAll } from 'lib/utility/calendar' -import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' - -const lineHeight = 60 - -describe('stackAll', () => { - it('works as expected stacked', () => { - expect(stackAll(dimensionItems, orderedGroups, lineHeight, true)).toMatchSnapshot() - }) - it('works as expected not stacked', () => { - expect(stackAll(dimensionItems, orderedGroups, lineHeight, false)).toMatchSnapshot() - }) -}) +import { stackAll } from 'lib/utility/calendar' +import {orderedGroups, dimensionItems} from '../../../__fixtures__/groupOrderAndItemDimentions' + +const lineHeight = 60 + +describe('stackAll', () => { + it('works as expected stacked', () => { + expect(stackAll(dimensionItems, orderedGroups, lineHeight, true)).toMatchSnapshot() + }) + it('works as expected not stacked', () => { + expect(stackAll(dimensionItems, orderedGroups, lineHeight, false)).toMatchSnapshot() + }) +}) diff --git a/__tests__/utils/calendar/stack-group.js b/__tests__/utils/calendar/stack-group.js index 678cf455d..d50b11ebc 100644 --- a/__tests__/utils/calendar/stack-group.js +++ b/__tests__/utils/calendar/stack-group.js @@ -1,14 +1,14 @@ -import { stackGroup } from 'lib/utility/calendar' -import { dimensionItems } from '../../../__fixtures__/groupOrderAndItemDimentions' - -describe('stackGroup', ()=>{ - it('should stack list of items space', ()=>{ - expect(stackGroup(dimensionItems, 'space', 30, 0)).toMatchSnapshot() - }) - it('should stack list of items lines', ()=>{ - expect(stackGroup(dimensionItems, 'lines', 30, 0)).toMatchSnapshot() - }) - it('should not stack list of items', ()=>{ - expect(stackGroup(dimensionItems, false, 30, 0)).toMatchSnapshot() - }) +import { stackGroup } from 'lib/utility/calendar' +import { dimensionItems } from '../../../__fixtures__/groupOrderAndItemDimentions' + +describe('stackGroup', ()=>{ + it('should stack list of items space', ()=>{ + expect(stackGroup(dimensionItems, 'space', 30, 0)).toMatchSnapshot() + }) + it('should stack list of items lines', ()=>{ + expect(stackGroup(dimensionItems, 'lines', 30, 0)).toMatchSnapshot() + }) + it('should not stack list of items', ()=>{ + expect(stackGroup(dimensionItems, false, 30, 0)).toMatchSnapshot() + }) }) \ No newline at end of file diff --git a/__tests__/utils/calendar/stack-items.js b/__tests__/utils/calendar/stack-items.js index fb3f07ff5..3bd42871c 100644 --- a/__tests__/utils/calendar/stack-items.js +++ b/__tests__/utils/calendar/stack-items.js @@ -1,143 +1,143 @@ -import { stackTimelineItems } from 'lib/utility/calendar' -import { items, groups } from '../../../__fixtures__/itemsAndGroups' -import { - props, - state, - stateMoveItem, - stateResizeItemLeft, - stateResizeItemRight, - propsNoStack, -} from '../../../__fixtures__/stateAndProps' -describe('stackItems', () => { - it('work as expected', () => { - expect( - stackTimelineItems( - items, - groups, - 9000, - state.canvasTimeStart, - state.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - state.draggingItem, - state.resizingItem, - state.dragTime, - state.resizingEdge, - state.resizeTime, - state.newGroupOrder - ) - ).toMatchSnapshot() - }) - it('work as expected no stack', () => { - expect( - stackTimelineItems( - items, - groups, - 9000, - state.canvasTimeStart, - state.canvasTimeEnd, - propsNoStack.keys, - propsNoStack.lineHeight, - propsNoStack.itemHeightRatio, - propsNoStack.stackItems, - state.draggingItem, - state.resizingItem, - state.dragTime, - state.resizingEdge, - state.resizeTime, - state.newGroupOrder - ) - ).toMatchSnapshot() - }) - it('should stack items while moving an item', () => { - expect( - stackTimelineItems( - items, - groups, - 9000, - stateMoveItem.canvasTimeStart, - stateMoveItem.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - stateMoveItem.draggingItem, - stateMoveItem.resizingItem, - stateMoveItem.dragTime, - stateMoveItem.resizingEdge, - stateMoveItem.resizeTime, - stateMoveItem.newGroupOrder - ) - ).toMatchSnapshot() - }) - it('should stack items while resize item left', () => { - expect( - stackTimelineItems( - items, - groups, - 9000, - stateResizeItemLeft.canvasTimeStart, - stateResizeItemLeft.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - stateResizeItemLeft.draggingItem, - stateResizeItemLeft.resizingItem, - stateResizeItemLeft.dragTime, - stateResizeItemLeft.resizingEdge, - stateResizeItemLeft.resizeTime, - stateResizeItemLeft.newGroupOrder - ) - ).toMatchSnapshot() - }) - it('should stack items while resize item right', () => { - expect( - stackTimelineItems( - items, - groups, - 9000, - stateResizeItemRight.canvasTimeStart, - stateResizeItemRight.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - stateResizeItemRight.draggingItem, - stateResizeItemRight.resizingItem, - stateResizeItemRight.dragTime, - stateResizeItemRight.resizingEdge, - stateResizeItemRight.resizeTime, - stateResizeItemRight.newGroupOrder - ) - ).toMatchSnapshot() - }) - it('should return empty dimensions if groups are empty', () => { - expect( - stackTimelineItems( - items, - [], - 9000, - state.canvasTimeStart, - state.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - state.draggingItem, - state.resizingItem, - state.dragTime, - state.resizingEdge, - state.resizeTime, - state.newGroupOrder - ) - ).toMatchObject({ - dimensionItems: [], - height: 0, - groupHeights: [], - groupTops: [] - }) - }) -}) +import { stackTimelineItems } from 'lib/utility/calendar' +import { items, groups } from '../../../__fixtures__/itemsAndGroups' +import { + props, + state, + stateMoveItem, + stateResizeItemLeft, + stateResizeItemRight, + propsNoStack, +} from '../../../__fixtures__/stateAndProps' +describe('stackItems', () => { + it('work as expected', () => { + expect( + stackTimelineItems( + items, + groups, + 9000, + state.canvasTimeStart, + state.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + state.draggingItem, + state.resizingItem, + state.dragTime, + state.resizingEdge, + state.resizeTime, + state.newGroupOrder + ) + ).toMatchSnapshot() + }) + it('work as expected no stack', () => { + expect( + stackTimelineItems( + items, + groups, + 9000, + state.canvasTimeStart, + state.canvasTimeEnd, + propsNoStack.keys, + propsNoStack.lineHeight, + propsNoStack.itemHeightRatio, + propsNoStack.stackItems, + state.draggingItem, + state.resizingItem, + state.dragTime, + state.resizingEdge, + state.resizeTime, + state.newGroupOrder + ) + ).toMatchSnapshot() + }) + it('should stack items while moving an item', () => { + expect( + stackTimelineItems( + items, + groups, + 9000, + stateMoveItem.canvasTimeStart, + stateMoveItem.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + stateMoveItem.draggingItem, + stateMoveItem.resizingItem, + stateMoveItem.dragTime, + stateMoveItem.resizingEdge, + stateMoveItem.resizeTime, + stateMoveItem.newGroupOrder + ) + ).toMatchSnapshot() + }) + it('should stack items while resize item left', () => { + expect( + stackTimelineItems( + items, + groups, + 9000, + stateResizeItemLeft.canvasTimeStart, + stateResizeItemLeft.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + stateResizeItemLeft.draggingItem, + stateResizeItemLeft.resizingItem, + stateResizeItemLeft.dragTime, + stateResizeItemLeft.resizingEdge, + stateResizeItemLeft.resizeTime, + stateResizeItemLeft.newGroupOrder + ) + ).toMatchSnapshot() + }) + it('should stack items while resize item right', () => { + expect( + stackTimelineItems( + items, + groups, + 9000, + stateResizeItemRight.canvasTimeStart, + stateResizeItemRight.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + stateResizeItemRight.draggingItem, + stateResizeItemRight.resizingItem, + stateResizeItemRight.dragTime, + stateResizeItemRight.resizingEdge, + stateResizeItemRight.resizeTime, + stateResizeItemRight.newGroupOrder + ) + ).toMatchSnapshot() + }) + it('should return empty dimensions if groups are empty', () => { + expect( + stackTimelineItems( + items, + [], + 9000, + state.canvasTimeStart, + state.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + state.draggingItem, + state.resizingItem, + state.dragTime, + state.resizingEdge, + state.resizeTime, + state.newGroupOrder + ) + ).toMatchObject({ + dimensionItems: [], + height: 0, + groupHeights: [], + groupTops: [] + }) + }) +}) diff --git a/__tests__/utils/dom-helpers/get-parent-position.js b/__tests__/utils/dom-helpers/get-parent-position.js index 915b25283..1d546405b 100644 --- a/__tests__/utils/dom-helpers/get-parent-position.js +++ b/__tests__/utils/dom-helpers/get-parent-position.js @@ -1,6 +1,6 @@ -/* eslint-disable */ -import { getParentPosition } from 'lib/utility/dom-helpers' - -describe('getParentPosition', () => { - xit('WRITE TEST HERE', () => {}) -}) +/* eslint-disable */ +import { getParentPosition } from 'lib/utility/dom-helpers' + +describe('getParentPosition', () => { + xit('WRITE TEST HERE', () => {}) +}) diff --git a/config/jest-setup.js b/config/jest-setup.js index f96d81f84..d24f5a62a 100644 --- a/config/jest-setup.js +++ b/config/jest-setup.js @@ -1,3 +1,4 @@ +import 'regenerator-runtime/runtime' const Enzyme = require('enzyme') const Adapter = require('enzyme-adapter-react-16') diff --git a/demo/app/demo-controlled-scrolling/index.js b/demo/app/demo-controlled-scrolling/index.js new file mode 100644 index 000000000..fb41f3bc9 --- /dev/null +++ b/demo/app/demo-controlled-scrolling/index.js @@ -0,0 +1,233 @@ +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline, { + TimelineMarkers, + TimelineHeaders, + TodayMarker, + CustomMarker, + CursorMarker, + CustomHeader, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData() + const visibleTimeStart = moment() + .startOf('day') + .valueOf() + const visibleTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .valueOf() + + this.state = { + groups, + items, + visibleTimeStart, + visibleTimeEnd + } + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasDoubleClick = (groupId, time) => { + console.log('Canvas double clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + onPrevClick = () => { + this.setState(state => { + const zoom = state.visibleTimeEnd - state.visibleTimeStart; + return({ + visibleTimeStart: state.visibleTimeStart - zoom, + visibleTimeEnd: state.visibleTimeEnd - zoom + }) + }); + }; + + onNextClick = () => { + this.setState(state => { + const zoom = state.visibleTimeEnd - state.visibleTimeStart; + console.log(({ + visibleTimeStart: state.visibleTimeStart + zoom, + visibleTimeEnd: state.visibleTimeEnd + zoom + })); + return ({ + visibleTimeStart: state.visibleTimeStart + zoom, + visibleTimeEnd: state.visibleTimeEnd + zoom + }) + }); + }; + + render() { + const { groups, items, visibleTimeStart, visibleTimeEnd } = this.state + + return ( +
+ + + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems + itemHeightRatio={0.75} + visibleTimeStart={visibleTimeStart} + visibleTimeEnd={visibleTimeEnd} + onCanvasClick={this.handleCanvasClick} + onCanvasDoubleClick={this.handleCanvasDoubleClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + buffer={1} + onTimeChange={this.handleTimeChange} + // moveResizeValidator={this.moveResizeValidator} + > + + + + + {({ styles }) => { + const newStyles = { ...styles, backgroundColor: 'blue' } + return
+ }} + + + + +
+ ) + } +} diff --git a/demo/app/demo-controlled-select/index.js b/demo/app/demo-controlled-select/index.js new file mode 100644 index 000000000..5202868b6 --- /dev/null +++ b/demo/app/demo-controlled-select/index.js @@ -0,0 +1,214 @@ +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline, { + TimelineMarkers, + TimelineHeaders, + TodayMarker, + CustomMarker, + CursorMarker, + CustomHeader, + SidebarHeader, + DateHeader +} from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData() + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + selected: undefined, + } + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasDoubleClick = (groupId, time) => { + console.log('Canvas double clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + this.setState({ + selected: [itemId] + }) + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDeselect = () => { + this.setState({selected: undefined}) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + render() { + const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state + + return ( + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems + itemHeightRatio={0.75} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + onCanvasClick={this.handleCanvasClick} + onCanvasDoubleClick={this.handleCanvasDoubleClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + onTimeChange={this.handleTimeChange} + moveResizeValidator={this.moveResizeValidator} + selected={this.state.selected} + onItemDeselect={this.handleItemDeselect} + > + + + + + {({ styles }) => { + const newStyles = { ...styles, backgroundColor: 'blue' } + return
+ }} + + + + + ) + } +} diff --git a/demo/app/demo-custom-info-label/CustomInfoLabel.js b/demo/app/demo-custom-info-label/CustomInfoLabel.js new file mode 100644 index 000000000..f6df077f8 --- /dev/null +++ b/demo/app/demo-custom-info-label/CustomInfoLabel.js @@ -0,0 +1,43 @@ +import React from 'react' +import PropTypes from 'prop-types' + +export default function CustomInfoLabel(props) { + const { time, groupTitle, heading } = props + + return ( +
+
+ + {heading} {groupTitle} + +
+ {time} +
+ ) +} + +CustomInfoLabel.propTypes = { + time: PropTypes.string, + groupTitle: PropTypes.string, + heading: PropTypes.string +} diff --git a/demo/app/demo-custom-info-label/index.js b/demo/app/demo-custom-info-label/index.js new file mode 100644 index 000000000..a2f3b9012 --- /dev/null +++ b/demo/app/demo-custom-info-label/index.js @@ -0,0 +1,155 @@ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' +import CustomInfoLabel from './CustomInfoLabel' + +import generateFakeData from '../generate-fake-data' + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end', + groupLabelKey: 'title' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData(5, 20) + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + showInfoLabel: false, + infoLabelTime: '', + infoLabelGroupTitle: '', + infoLabelHeading: '' + } + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ), + showInfoLabel: false, + infoLabelTime: '' + }) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ), + showInfoLabel: false, + infoLabelTime: '' + }) + } + + handleItemDrag = ({ eventType, itemId, time, edge, newGroupOrder }) => { + const group = this.state.groups[newGroupOrder] + const infoLabelGroupTitle = group ? group.title : '' + const infoLabelTime = moment(time).format('dddd, MMMM Do YYYY') + let heading = '' + switch (eventType) { + case 'move': + heading = '🚚 Moving' + break + case 'resize': + heading = '📅 Resizing' + break + } + + if ( + this.state.infoLabelTime !== infoLabelTime || + this.state.infoLabelGroupTitle !== infoLabelGroupTitle + ) { + this.setState({ + showInfoLabel: true, + infoLabelTime, + infoLabelGroupTitle, + infoLabelHeading: heading + }) + } + } + + render() { + const { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + showInfoLabel, + infoLabelTime, + infoLabelGroupTitle, + infoLabelHeading + } = this.state + + const customInfoLabelMarkup = showInfoLabel ? ( + + ) : null + + return ( +
+ {customInfoLabelMarkup} + +
+ ) + } +} diff --git a/demo/app/demo-element-resize/index.js b/demo/app/demo-element-resize/index.js index ca74a17d2..fbbf4eeea 100644 --- a/demo/app/demo-element-resize/index.js +++ b/demo/app/demo-element-resize/index.js @@ -1,104 +1,104 @@ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' -import containerResizeDetector from '../../../src/resize-detector/container' - -// you would use this in real life: -// import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' - -import generateFakeData from '../generate-fake-data' - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData(10, 200) - const defaultTimeStart = moment() - .startOf('day') - .toDate() - const defaultTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .toDate() - const width = 80 - - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd, - width - } - } - - render() { - const { - groups, - items, - defaultTimeStart, - defaultTimeEnd, - width - } = this.state - - return ( -
-
- Above The Left er aew rawe rwea rwae
} - rightSidebarWidth={150} - rightSidebarContent={
Above The Right
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - resizeDetector={containerResizeDetector} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - /> -
-
-
- The timeline is {width}% wide. -
-
- Set containers width: -
- {[20, 40, 60, 80].map(p => ( - this.setState({ width: p })} - style={{ - cursor: 'pointer', - marginLeft: 10, - textDecoration: p === width ? 'underline' : 'none' - }} - > - {p}% - - ))} -
-
-
- ) - } -} +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' +import containerResizeDetector from '../../../src/resize-detector/container' + +// you would use this in real life: +// import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' + +import generateFakeData from '../generate-fake-data' + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData(10, 200) + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + const width = 80 + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + width + } + } + + render() { + const { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + width + } = this.state + + return ( +
+
+ Above The Left er aew rawe rwea rwae
} + rightSidebarWidth={150} + rightSidebarContent={
Above The Right
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + resizeDetector={containerResizeDetector} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + /> +
+
+
+ The timeline is {width}% wide. +
+
+ Set containers width: +
+ {[20, 40, 60, 80].map(p => ( + this.setState({ width: p })} + style={{ + cursor: 'pointer', + marginLeft: 10, + textDecoration: p === width ? 'underline' : 'none' + }} + > + {p}% + + ))} +
+
+
+ ) + } +} diff --git a/demo/app/demo-headers/index.js b/demo/app/demo-headers/index.js index 9f8fc2498..fb0198290 100644 --- a/demo/app/demo-headers/index.js +++ b/demo/app/demo-headers/index.js @@ -1,411 +1,371 @@ -/* eslint-disable no-console */ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline, { - TimelineMarkers, - TodayMarker, - CustomMarker, - CursorMarker, - SidebarHeader, - CustomHeader, - TimelineHeaders, - DateHeader, - ItemHeader -} from 'react-calendar-timeline' - -import generateFakeData from '../generate-fake-data' - -var minTime = moment() - .add(-6, 'months') - .valueOf() -var maxTime = moment() - .add(6, 'months') - .valueOf() - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData() - const {items: headerItems } = generateFakeData(2, 5, 1) - const defaultTimeStart = moment() - .startOf('day') - .toDate() - const defaultTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .toDate() - - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd, - format: false, - showHeaders: false, - headerItems, - } - } - - handleClick = () => { - this.setState({ format: true }) - } - - handleCanvasClick = (groupId, time) => { - this.setState(state => ({ - groups: state.groups - })) - console.log('Canvas clicked', groupId, moment(time).format()) - } - - handleCanvasDoubleClick = (groupId, time) => { - console.log('Canvas double clicked', groupId, moment(time).format()) - } - - handleCanvasContextMenu = (group, time) => { - console.log('Canvas context menu', group, moment(time).format()) - } - - handleItemClick = (itemId, _, time) => { - console.log('Clicked: ' + itemId, moment(time).format()) - } - - handleItemSelect = (itemId, _, time) => { - console.log('Selected: ' + itemId, moment(time).format()) - this.setState((state)=>({ - groups: state.groups.filter(_ => Math.random() > 0.5 ) - })) - } - - handleItemDoubleClick = (itemId, _, time) => { - console.log('Double Click: ' + itemId, moment(time).format()) - } - - handleItemContextMenu = (itemId, _, time) => { - console.log('Context Menu: ' + itemId, moment(time).format()) - } - - handleItemMove = (itemId, dragTime, newGroupOrder) => { - const { items, groups } = this.state - - const group = groups[newGroupOrder] - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: dragTime, - end: dragTime + (item.end - item.start), - group: group.id - }) - : item - ) - }) - - console.log('Moved', itemId, dragTime, newGroupOrder) - } - - handleItemResize = (itemId, time, edge) => { - const { items } = this.state - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: edge === 'left' ? time : item.start, - end: edge === 'left' ? item.end : time - }) - : item - ) - }) - - console.log('Resized', itemId, time, edge) - } - - // this limits the timeline to -6 months ... +6 months - handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { - if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { - updateScrollCanvas(minTime, maxTime) - } else if (visibleTimeStart < minTime) { - updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) - } else if (visibleTimeEnd > maxTime) { - updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) - } else { - updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - } - } - - moveResizeValidator = (action, item, time) => { - if (time < new Date().getTime()) { - var newTime = - Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) - return newTime - } - - return time - } - - handleClickChangeHeaders = () => { - this.setState(state => ({ - showHeaders: !state.showHeaders - })) - } - - render() { - const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state - - return ( -
- - - Above The Left
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - itemHeightRatio={0.75} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - onCanvasClick={this.handleCanvasClick} - onCanvasDoubleClick={this.handleCanvasDoubleClick} - onCanvasContextMenu={this.handleCanvasContextMenu} - onItemClick={this.handleItemClick} - onItemSelect={this.handleItemSelect} - onItemContextMenu={this.handleItemContextMenu} - onItemMove={this.handleItemMove} - onItemResize={this.handleItemResize} - onItemDoubleClick={this.handleItemDoubleClick} - onTimeChange={this.handleTimeChange} - // moveResizeValidator={this.moveResizeValidator} - rightSidebarWidth={150} - rightSidebarContent={
Above The Right
} - stackItems="space" - > - - - {({ getRootProps }) => { - return
Left
- }} -
- - {({ getRootProps }) => { - return
Right
- }} -
- { - return ( -
- {item.title} -
- ) - }} - /> - - - - - - {( - { - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }, - props - ) => { - return ( -
- {intervals.map(interval => { - const intervalStyle = { - // height: 30, - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer', - backgroundColor: 'Turquoise', - color: 'white' - } - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > -
- {interval.startTime.format('YYYY')} -
-
- ) - })} -
- ) - }} -
- - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }) => { - return ( -
- {intervals.map(interval => { - const intervalStyle = { - // height: 30, - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer', - backgroundColor: 'indianred', - color: 'white' - } - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > -
- {interval.startTime.format('MM/DD')} -
-
- ) - })} -
- ) - }} -
- - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }) => { - return ( -
- {intervals.map(interval => { - const intervalStyle = { - lineHeight: '30px', - textAlign: 'center', - borderLeft: '1px solid black', - cursor: 'pointer' - } - return ( -
{ - showPeriod(interval.startTime, interval.endTime) - }} - {...getIntervalProps({ - interval, - style: intervalStyle - })} - > - {interval.startTime.format('HH')} -
- ) - })} -
- ) - }} -
- { - return ( -
- {intervalContext.intervalText} -
- ) - }} - /> - {this.state.showHeaders - ? [ - , - - ] - : null} -
- - - - - {({ styles }) => { - const newStyles = { ...styles, backgroundColor: 'blue' } - return
- }} - - - - -
- ) - } -} +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline, { + TimelineMarkers, + TodayMarker, + CustomMarker, + CursorMarker, + SidebarHeader, + CustomHeader, + TimelineHeaders, + DateHeader +} from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData() + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + format: false, + showHeaders: false + } + } + + handleClick = () => { + this.setState({ format: true }) + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasDoubleClick = (groupId, time) => { + console.log('Canvas double clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + handleClickChangeHeaders = () => { + this.setState(state => ({ + showHeaders: !state.showHeaders + })) + } + + render() { + const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state + + return ( +
+ + + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems + itemHeightRatio={0.75} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + onCanvasClick={this.handleCanvasClick} + onCanvasDoubleClick={this.handleCanvasDoubleClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + onTimeChange={this.handleTimeChange} + // moveResizeValidator={this.moveResizeValidator} + rightSidebarWidth={150} + rightSidebarContent={
Above The Right
} + > + + + + + + {( + { + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod, + data, + }, + + ) => { + console.log('props', data) + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + backgroundColor: 'Turquoise', + color: 'white' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('YYYY')} +
+
+ ) + })} +
+ ) + }} +
+ + {({ + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod + }) => { + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer', + backgroundColor: 'indianred', + color: 'white' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > +
+ {interval.startTime.format('MM/DD')} +
+
+ ) + })} +
+ ) + }} +
+ + {({ + headerContext: { intervals }, + getRootProps, + getIntervalProps, + showPeriod + }) => { + return ( +
+ {intervals.map(interval => { + const intervalStyle = { + lineHeight: '30px', + textAlign: 'center', + borderLeft: '1px solid black', + cursor: 'pointer' + } + return ( +
{ + showPeriod(interval.startTime, interval.endTime) + }} + {...getIntervalProps({ + interval, + style: intervalStyle + })} + > + {interval.startTime.format('HH')} +
+ ) + })} +
+ ) + }} +
+ { + console.log('intervalRenderer props', data) + return ( +
+ {intervalContext.intervalText} +
+ ) + }} + /> + {this.state.showHeaders + ? [ + , + + ] + : null} +
+ + + + + {({ styles }) => { + const newStyles = { ...styles, backgroundColor: 'blue' } + return
+ }} + + + + +
+ ) + } +} diff --git a/demo/app/demo-linked-timelines/index.js b/demo/app/demo-linked-timelines/index.js index b68a3a5d6..cfc470f74 100644 --- a/demo/app/demo-linked-timelines/index.js +++ b/demo/app/demo-linked-timelines/index.js @@ -1,114 +1,114 @@ -/* eslint-disable no-console */ -/* eslint-disable no-console */ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' -// import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' - -import generateFakeData from '../generate-fake-data' - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups: groups1, items: items1 } = generateFakeData(5, 400) - const { groups: groups2, items: items2 } = generateFakeData(5, 400) - - const visibleTimeStart = moment() - .startOf('day') - .valueOf() - const visibleTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .valueOf() - - this.state = { - groups1, - items1, - groups2, - items2, - visibleTimeStart, - visibleTimeEnd - } - } - - handleTimeChangeFirst = (visibleTimeStart, visibleTimeEnd) => { - console.log('first', visibleTimeStart, visibleTimeEnd) - this.setState({ visibleTimeStart, visibleTimeEnd }) - } - - handleTimeChangeSecond = (visibleTimeStart, visibleTimeEnd) => { - console.log('second', visibleTimeStart, visibleTimeEnd) - this.setState({ visibleTimeStart, visibleTimeEnd }) - } - - renderFirst() { - const { groups1, items1, visibleTimeStart, visibleTimeEnd } = this.state - - return ( - Above The Left
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - visibleTimeStart={visibleTimeStart} - visibleTimeEnd={visibleTimeEnd} - onTimeChange={this.handleTimeChangeFirst} - /> - ) - } - - renderSecond() { - const { groups2, items2, visibleTimeStart, visibleTimeEnd } = this.state - - return ( - Above The Left
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - visibleTimeStart={visibleTimeStart} - visibleTimeEnd={visibleTimeEnd} - onTimeChange={this.handleTimeChangeSecond} - /> - ) - } - - render() { - return ( -
- {this.renderFirst()} - {this.renderSecond()} -
- ) - } -} +/* eslint-disable no-console */ +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' +// import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' + +import generateFakeData from '../generate-fake-data' + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups: groups1, items: items1 } = generateFakeData(5, 400) + const { groups: groups2, items: items2 } = generateFakeData(5, 400) + + const visibleTimeStart = moment() + .startOf('day') + .valueOf() + const visibleTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .valueOf() + + this.state = { + groups1, + items1, + groups2, + items2, + visibleTimeStart, + visibleTimeEnd + } + } + + handleTimeChangeFirst = (visibleTimeStart, visibleTimeEnd) => { + console.log('first', visibleTimeStart, visibleTimeEnd) + this.setState({ visibleTimeStart, visibleTimeEnd }) + } + + handleTimeChangeSecond = (visibleTimeStart, visibleTimeEnd) => { + console.log('second', visibleTimeStart, visibleTimeEnd) + this.setState({ visibleTimeStart, visibleTimeEnd }) + } + + renderFirst() { + const { groups1, items1, visibleTimeStart, visibleTimeEnd } = this.state + + return ( + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + visibleTimeStart={visibleTimeStart} + visibleTimeEnd={visibleTimeEnd} + onTimeChange={this.handleTimeChangeFirst} + /> + ) + } + + renderSecond() { + const { groups2, items2, visibleTimeStart, visibleTimeEnd } = this.state + + return ( + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + visibleTimeStart={visibleTimeStart} + visibleTimeEnd={visibleTimeEnd} + onTimeChange={this.handleTimeChangeSecond} + /> + ) + } + + render() { + return ( +
+ {this.renderFirst()} + {this.renderSecond()} +
+ ) + } +} diff --git a/demo/app/demo-main/index.js b/demo/app/demo-main/index.js index c72697609..9134a2ae4 100644 --- a/demo/app/demo-main/index.js +++ b/demo/app/demo-main/index.js @@ -1,346 +1,206 @@ -/* eslint-disable no-console */ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline, { - TimelineMarkers, - TimelineHeaders, - TodayMarker, - CustomMarker, - CursorMarker, - CustomHeader, - SidebarHeader, - DateHeader -} from 'react-calendar-timeline' - -import generateFakeData from '../generate-fake-data' - -var minTime = moment() - .add(-6, 'months') - .valueOf() -var maxTime = moment() - .add(6, 'months') - .valueOf() - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const items = [ - // { - // id: '4', - // group: '1', - // title: - // '4', - // start: 1550538000000, - // end: 1550560702870, - // canResize: false, - // className: '', - // bgColor: 'rgba(209, 154, 237, 0.6)', - // selectedBgColor: 'rgba(209, 154, 237, 1)', - // color: '#55077c', - // itemProps: { - // 'data-tip': - // 'The AGP bus is down, calculate the multi-byte alarm so we can generate the THX driver!' - // } - // }, - // { - // id: '5', - // group: '1', - // title: - // '5', - // start: 1550549700000, - // end: 1550569678295, - // canMove: true, - // canResize: 'both', - // className: '', - // bgColor: 'rgba(235, 171, 242, 0.6)', - // selectedBgColor: 'rgba(235, 171, 242, 1)', - // color: '#ad0fbf', - // itemProps: { - // 'data-tip': - // "I'll parse the virtual AI monitor, that should microchip the SDD circuit!" - // } - // }, - { - id: '1', - group: '1', - title: - '1', - start: 1550562300000, - end: 1550566800000, - canMove: true, - canResize: 'both', - className: '', - bgColor: 'rgba(119, 126, 249, 0.6)', - selectedBgColor: 'rgba(119, 126, 249, 1)', - color: '#010887', - itemProps: { - 'data-tip': - 'The IB alarm is down, parse the virtual driver so we can copy the COM bus!' - } - }, - { - id: '3', - group: '2', - title: '3', - start: 1550538000000, - end: 1550557157371, - canResize: false, - className: '', - bgColor: 'rgba(184, 141, 239, 0.6)', - selectedBgColor: 'rgba(184, 141, 239, 1)', - color: '#3c0584', - itemProps: { - 'data-tip': - 'Try to synthesize the AI circuit, maybe it will calculate the cross-platform interface!' - } - }, - - - { - id: '6', - group: '2', - title: '6', - start: 1550551500000, - end: 1550571478295, - canResize: false, - className: '', - bgColor: 'rgba(252, 191, 243, 0.6)', - selectedBgColor: 'rgba(252, 191, 243, 1)', - color: '#ea15ca', - itemProps: { - 'data-tip': 'We need to input the haptic USB panel!' - } - }, - { - id: '7', - group: '2', - title: - "7", - start: 1550539800000, - end: 1550559571292, - canResize: false, - className: '', - bgColor: 'rgba(247, 116, 197, 0.6)', - selectedBgColor: 'rgba(247, 116, 197, 1)', - color: '#db0288', - itemProps: { - 'data-tip': - "bypassing the driver won't do anything, we need to compress the haptic XML monitor!" - } - }, - { - id: '8', - group: '2', - title: '8', - start: 1550535300000, - end: 1550550380987, - canResize: false, - className: '', - bgColor: 'rgba(244, 129, 173, 0.6)', - selectedBgColor: 'rgba(244, 129, 173, 1)', - color: '#99043d', - itemProps: { - 'data-tip': - "copying the system won't do anything, we need to quantify the neural SCSI protocol!" - } - } - ] - - const groups = [ - { - id: '1', - title: 'Dee', - rightTitle: 'Kuhn', - label: 'Label Amari', - bgColor: '#c0d0f9' - }, - { - id: '2', - title: 'Brennon', - rightTitle: 'Cronin', - label: 'Label Maude', - bgColor: '#777ef9' - } - ] - - const defaultTimeStart = moment('19/2/2019', 'dd/mm/yyyy') - .startOf('day') - .toDate() - const defaultTimeEnd = moment('19/2/2019', 'dd/mm/yyyy') - .endOf('day') - .toDate() - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd - } - } - - handleCanvasClick = (groupId, time) => { - console.log('Canvas clicked', groupId, moment(time).format()) - } - - handleCanvasDoubleClick = (groupId, time) => { - console.log('Canvas double clicked', groupId, moment(time).format()) - } - - handleCanvasContextMenu = (group, time) => { - console.log('Canvas context menu', group, moment(time).format()) - } - - handleItemClick = (itemId, _, time) => { - console.log('Clicked: ' + itemId, moment(time).format()) - } - - handleItemSelect = (itemId, _, time) => { - console.log('Selected: ' + itemId, moment(time).format()) - } - - handleItemDoubleClick = (itemId, _, time) => { - console.log('Double Click: ' + itemId, moment(time).format()) - } - - handleItemContextMenu = (itemId, _, time) => { - console.log('Context Menu: ' + itemId, moment(time).format()) - } - - handleItemMove = (itemId, dragTime, newGroupOrder) => { - const { items, groups } = this.state - - const group = groups[newGroupOrder] - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: dragTime, - end: dragTime + (item.end - item.start), - group: group.id - }) - : item - ) - }) - - console.log('Moved', itemId, dragTime, newGroupOrder) - } - - handleItemResize = (itemId, time, edge) => { - const { items } = this.state - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: edge === 'left' ? time : item.start, - end: edge === 'left' ? item.end : time - }) - : item - ) - }) - - console.log('Resized', itemId, time, edge) - } - - // this limits the timeline to -6 months ... +6 months - handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { - if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { - updateScrollCanvas(minTime, maxTime) - } else if (visibleTimeStart < minTime) { - updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) - } else if (visibleTimeEnd > maxTime) { - updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) - } else { - updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - } - } - - moveResizeValidator = (action, item, time) => { - if (time < new Date().getTime()) { - var newTime = - Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) - return newTime - } - - return time - } - - handleMoveUpdate= (...args)=> { - console.log(args) - } - - render() { - const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state - - return ( - Above The Left
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems='lines' - itemHeightRatio={0.75} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - onCanvasClick={this.handleCanvasClick} - onCanvasDoubleClick={this.handleCanvasDoubleClick} - onCanvasContextMenu={this.handleCanvasContextMenu} - onItemClick={this.handleItemClick} - onItemSelect={this.handleItemSelect} - onItemContextMenu={this.handleItemContextMenu} - onItemMove={this.handleItemMove} - onItemResize={this.handleItemResize} - onItemDoubleClick={this.handleItemDoubleClick} - onTimeChange={this.handleTimeChange} - moveResizeValidator={this.moveResizeValidator} - width={1000} - onUpdateMove={this.handleMoveUpdate} - > - - - - - {({ styles }) => { - const newStyles = { ...styles, backgroundColor: 'blue' } - return
- }} - - - - - ) - } -} +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline, { + TimelineMarkers, + TodayMarker, + CustomMarker, + CursorMarker, +} from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData() + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd + } + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasDoubleClick = (groupId, time) => { + console.log('Canvas double clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + handleZoom = (timelineContext, unit) => { + console.log('Zoomed', timelineContext, unit) + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + render() { + const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state + + return ( + Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems + itemHeightRatio={0.75} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + onCanvasClick={this.handleCanvasClick} + onCanvasDoubleClick={this.handleCanvasDoubleClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + onTimeChange={this.handleTimeChange} + onZoom={this.handleZoom} + moveResizeValidator={this.moveResizeValidator} + buffer={3} + > + + + + + {({ styles }) => { + const newStyles = { ...styles, backgroundColor: 'blue' } + return
+ }} + + + + + ) + } +} diff --git a/demo/app/demo-performance/index.js b/demo/app/demo-performance/index.js index 147db94a9..177461ea0 100644 --- a/demo/app/demo-performance/index.js +++ b/demo/app/demo-performance/index.js @@ -1,193 +1,193 @@ -/* eslint-disable no-console */ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' - -import generateFakeData from '../generate-fake-data' - -var minTime = moment() - .add(-6, 'months') - .valueOf() -var maxTime = moment() - .add(6, 'months') - .valueOf() - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData(100, 10000) - const defaultTimeStart = moment() - .startOf('month') - .toDate() - const defaultTimeEnd = moment() - .endOf('month') - .toDate() - - groups[0].stackItems = false; - groups[0].height = 300; - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd - } - } - - handleCanvasClick = (groupId, time) => { - console.log('Canvas clicked', groupId, moment(time).format()) - } - - handleCanvasContextMenu = (group, time) => { - console.log('Canvas context menu', group, moment(time).format()) - } - - handleItemClick = (itemId, _, time) => { - console.log('Clicked: ' + itemId, moment(time).format()) - } - - handleItemSelect = (itemId, _, time) => { - console.log('Selected: ' + itemId, moment(time).format()) - } - - handleItemDoubleClick = (itemId, _, time) => { - console.log('Double Click: ' + itemId, moment(time).format()) - } - - handleItemContextMenu = (itemId, _, time) => { - console.log('Context Menu: ' + itemId, moment(time).format()) - } - - handleItemMove = (itemId, dragTime, newGroupOrder) => { - const { items, groups } = this.state - - const group = groups[newGroupOrder] - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: dragTime, - end: dragTime + (item.end - item.start), - group: group.id - }) - : item - ) - }) - - console.log('Moved', itemId, dragTime, newGroupOrder) - } - - handleItemResize = (itemId, time, edge) => { - const { items } = this.state - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: edge === 'left' ? time : item.start, - end: edge === 'left' ? item.end : time - }) - : item - ) - }) - - console.log('Resized', itemId, time, edge) - } - - // this limits the timeline to -6 months ... +6 months - handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { - if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { - updateScrollCanvas(minTime, maxTime) - } else if (visibleTimeStart < minTime) { - updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) - } else if (visibleTimeEnd > maxTime) { - updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) - } else { - updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - } - } - - moveResizeValidator = (action, item, time) => { - if (time < new Date().getTime()) { - var newTime = - Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) - return newTime - } - - return time - } - - // itemRenderer = ({ item }) => { - // return ( - //
- // {item.title} - //

{item.itemProps['data-tip']}

- //
- // ) - // } - - // groupRenderer = ({ group }) => { - // return ( - //
- // {group.title} - //
- // ) - // } - - render() { - const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state - - return ( - Above The Left
} - // rightSidebarWidth={150} - // rightSidebarContent={
Above The Right
} - - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - // resizeDetector={containerResizeDetector} - - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - // itemRenderer={this.itemRenderer} - // groupRenderer={this.groupRenderer} - - onCanvasClick={this.handleCanvasClick} - onCanvasContextMenu={this.handleCanvasContextMenu} - onItemClick={this.handleItemClick} - onItemSelect={this.handleItemSelect} - onItemContextMenu={this.handleItemContextMenu} - onItemMove={this.handleItemMove} - onItemResize={this.handleItemResize} - onItemDoubleClick={this.handleItemDoubleClick} - onTimeChange={this.handleTimeChange} - moveResizeValidator={this.moveResizeValidator} - /> - ) - } -} +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData(100, 10000) + const defaultTimeStart = moment() + .startOf('month') + .toDate() + const defaultTimeEnd = moment() + .endOf('month') + .toDate() + + groups[0].stackItems = false; + groups[0].height = 300; + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd + } + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + // itemRenderer = ({ item }) => { + // return ( + //
+ // {item.title} + //

{item.itemProps['data-tip']}

+ //
+ // ) + // } + + // groupRenderer = ({ group }) => { + // return ( + //
+ // {group.title} + //
+ // ) + // } + + render() { + const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state + + return ( + Above The Left
} + // rightSidebarWidth={150} + // rightSidebarContent={
Above The Right
} + + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + // resizeDetector={containerResizeDetector} + + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + // itemRenderer={this.itemRenderer} + // groupRenderer={this.groupRenderer} + + onCanvasClick={this.handleCanvasClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + onTimeChange={this.handleTimeChange} + moveResizeValidator={this.moveResizeValidator} + /> + ) + } +} diff --git a/demo/app/demo-renderers/index.js b/demo/app/demo-renderers/index.js index 7a3229647..c61806894 100644 --- a/demo/app/demo-renderers/index.js +++ b/demo/app/demo-renderers/index.js @@ -1,212 +1,212 @@ -/* eslint-disable no-console */ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' - -import generateFakeData from '../generate-fake-data' - -var minTime = moment() - .add(-6, 'months') - .valueOf() -var maxTime = moment() - .add(6, 'months') - .valueOf() - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -class GroupRenderer extends Component { - render() { - // console.log("heading rendering"); - return
NameMetadata
; - } -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData(100, 5000) - const visibleTimeStart = moment() - .startOf('month') - .toDate().valueOf() - const visibleTimeEnd = moment() - .endOf('month') - .toDate().valueOf() - - this.state = { - groups, - items, - visibleTimeStart, - visibleTimeEnd - } - } - - handleCanvasClick = (groupId, time) => { - console.log('Canvas clicked', groupId, moment(time).format()) - } - - handleCanvasContextMenu = (group, time) => { - console.log('Canvas context menu', group, moment(time).format()) - } - - handleItemClick = (itemId, _, time) => { - console.log('Clicked: ' + itemId, moment(time).format()) - } - - handleItemSelect = (itemId, _, time) => { - console.log('Selected: ' + itemId, moment(time).format()) - } - - handleItemDoubleClick = (itemId, _, time) => { - console.log('Double Click: ' + itemId, moment(time).format()) - } - - handleItemContextMenu = (itemId, _, time) => { - console.log('Context Menu: ' + itemId, moment(time).format()) - } - - handleItemMove = (itemId, dragTime, newGroupOrder) => { - const { items, groups } = this.state - - const group = groups[newGroupOrder] - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: dragTime, - end: dragTime + (item.end - item.start), - group: group.id - }) - : item - ) - }) - - console.log('Moved', itemId, dragTime, newGroupOrder) - } - - handleItemResize = (itemId, time, edge) => { - const { items } = this.state - - this.setState({ - items: items.map( - item => - item.id === itemId - ? Object.assign({}, item, { - start: edge === 'left' ? time : item.start, - end: edge === 'left' ? item.end : time - }) - : item - ) - }) - - console.log('Resized', itemId, time, edge) - } - - // this limits the timeline to -6 months ... +6 months - handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { - - if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { - this.setState({ - visibleTimeStart: minTime, - visibleTimeEnd: maxTime - }) - //updateScrollCanvas(minTime, maxTime) - } else if (visibleTimeStart < minTime) { - //updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) - } else if (visibleTimeEnd > maxTime) { - //updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) - } else { - this.setState({ - visibleTimeStart, - visibleTimeEnd - }); - //updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - } - } - - moveResizeValidator = (action, item, time) => { - if (time < new Date().getTime()) { - var newTime = - Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) - return newTime - } - - return time - } - - // itemRenderer = ({ item }) => { - // return ( - //
- // {item.title} - //

{item.itemProps['data-tip']}

- //
- // ) - // } - - groupRenderer = ({ group }) => { - return ( - - - - - - - -
{group.title}Another Cell
- ) - } - - render() { - const { groups, items, visibleTimeStart, visibleTimeEnd } = this.state - - return ( - } - // rightSidebarWidth={150} - // rightSidebarContent={
Above The Right
} - - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - // resizeDetector={containerResizeDetector} - - visibleTimeStart={visibleTimeStart} - visibleTimeEnd={visibleTimeEnd} - // itemRenderer={this.itemRenderer} - groupRenderer={this.groupRenderer} - - onCanvasClick={this.handleCanvasClick} - onCanvasContextMenu={this.handleCanvasContextMenu} - onItemClick={this.handleItemClick} - onItemSelect={this.handleItemSelect} - onItemContextMenu={this.handleItemContextMenu} - onItemMove={this.handleItemMove} - onItemResize={this.handleItemResize} - onItemDoubleClick={this.handleItemDoubleClick} - onTimeChange={this.handleTimeChange} - moveResizeValidator={this.moveResizeValidator} - /> - ) - } -} +/* eslint-disable no-console */ +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var minTime = moment() + .add(-6, 'months') + .valueOf() +var maxTime = moment() + .add(6, 'months') + .valueOf() + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +class GroupRenderer extends Component { + render() { + // console.log("heading rendering"); + return
NameMetadata
; + } +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData(100, 5000) + const visibleTimeStart = moment() + .startOf('month') + .toDate().valueOf() + const visibleTimeEnd = moment() + .endOf('month') + .toDate().valueOf() + + this.state = { + groups, + items, + visibleTimeStart, + visibleTimeEnd + } + } + + handleCanvasClick = (groupId, time) => { + console.log('Canvas clicked', groupId, moment(time).format()) + } + + handleCanvasContextMenu = (group, time) => { + console.log('Canvas context menu', group, moment(time).format()) + } + + handleItemClick = (itemId, _, time) => { + console.log('Clicked: ' + itemId, moment(time).format()) + } + + handleItemSelect = (itemId, _, time) => { + console.log('Selected: ' + itemId, moment(time).format()) + } + + handleItemDoubleClick = (itemId, _, time) => { + console.log('Double Click: ' + itemId, moment(time).format()) + } + + handleItemContextMenu = (itemId, _, time) => { + console.log('Context Menu: ' + itemId, moment(time).format()) + } + + handleItemMove = (itemId, dragTime, newGroupOrder) => { + const { items, groups } = this.state + + const group = groups[newGroupOrder] + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: dragTime, + end: dragTime + (item.end - item.start), + group: group.id + }) + : item + ) + }) + + console.log('Moved', itemId, dragTime, newGroupOrder) + } + + handleItemResize = (itemId, time, edge) => { + const { items } = this.state + + this.setState({ + items: items.map( + item => + item.id === itemId + ? Object.assign({}, item, { + start: edge === 'left' ? time : item.start, + end: edge === 'left' ? item.end : time + }) + : item + ) + }) + + console.log('Resized', itemId, time, edge) + } + + // this limits the timeline to -6 months ... +6 months + handleTimeChange = (visibleTimeStart, visibleTimeEnd, updateScrollCanvas) => { + + if (visibleTimeStart < minTime && visibleTimeEnd > maxTime) { + this.setState({ + visibleTimeStart: minTime, + visibleTimeEnd: maxTime + }) + //updateScrollCanvas(minTime, maxTime) + } else if (visibleTimeStart < minTime) { + //updateScrollCanvas(minTime, minTime + (visibleTimeEnd - visibleTimeStart)) + } else if (visibleTimeEnd > maxTime) { + //updateScrollCanvas(maxTime - (visibleTimeEnd - visibleTimeStart), maxTime) + } else { + this.setState({ + visibleTimeStart, + visibleTimeEnd + }); + //updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + } + } + + moveResizeValidator = (action, item, time) => { + if (time < new Date().getTime()) { + var newTime = + Math.ceil(new Date().getTime() / (15 * 60 * 1000)) * (15 * 60 * 1000) + return newTime + } + + return time + } + + // itemRenderer = ({ item }) => { + // return ( + //
+ // {item.title} + //

{item.itemProps['data-tip']}

+ //
+ // ) + // } + + groupRenderer = ({ group }) => { + return ( + + + + + + + +
{group.title}Another Cell
+ ) + } + + render() { + const { groups, items, visibleTimeStart, visibleTimeEnd } = this.state + + return ( + } + // rightSidebarWidth={150} + // rightSidebarContent={
Above The Right
} + + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + // resizeDetector={containerResizeDetector} + + visibleTimeStart={visibleTimeStart} + visibleTimeEnd={visibleTimeEnd} + // itemRenderer={this.itemRenderer} + groupRenderer={this.groupRenderer} + + onCanvasClick={this.handleCanvasClick} + onCanvasContextMenu={this.handleCanvasContextMenu} + onItemClick={this.handleItemClick} + onItemSelect={this.handleItemSelect} + onItemContextMenu={this.handleItemContextMenu} + onItemMove={this.handleItemMove} + onItemResize={this.handleItemResize} + onItemDoubleClick={this.handleItemDoubleClick} + onTimeChange={this.handleTimeChange} + moveResizeValidator={this.moveResizeValidator} + /> + ) + } +} diff --git a/demo/app/demo-sticky-header/index.js b/demo/app/demo-sticky-header/index.js deleted file mode 100644 index d0685849e..000000000 --- a/demo/app/demo-sticky-header/index.js +++ /dev/null @@ -1,126 +0,0 @@ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' -import containerResizeDetector from '../../../src/resize-detector/container' - -// you would use this in real life: -// import containerResizeDetector from 'react-calendar-timeline/lib/resize-detector/container' - -import generateFakeData from '../generate-fake-data' - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData() - const defaultTimeStart = moment() - .startOf('day') - .toDate() - const defaultTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .toDate() - const width = 80 - - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd, - width - } - } - - render() { - const { groups, items, defaultTimeStart, defaultTimeEnd } = this.state - - return ( -
- In this example we have a lot of random content above the timeline.
- Try scrolling and see how the timeline header sticks to the screen.
-
- Above The Left
} - rightSidebarWidth={150} - rightSidebarContent={
Above The Right
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - resizeDetector={containerResizeDetector} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - /> -
- There is also a lot of stuff below the timeline. Watch the header fix - itself to the bottom of the component. -
-
- bla bla bla -
-
- Here are random pictures of Tom Selleck: -
-
- -
-
- -
-
- Here is another calendar, but this one has stickyOffset set - to 100, meaning that the header will stick 100px from the - top. This is useful for example if you already have a sticky navbar. -
-
- Above The Left
} - rightSidebarWidth={150} - rightSidebarContent={
Above The Right
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - resizeDetector={containerResizeDetector} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - /> -
-
- ) - } -} diff --git a/demo/app/demo-tree-groups/index.js b/demo/app/demo-tree-groups/index.js index 41dafbcea..5232f1a38 100644 --- a/demo/app/demo-tree-groups/index.js +++ b/demo/app/demo-tree-groups/index.js @@ -1,122 +1,122 @@ -import React, { Component } from 'react' -import moment from 'moment' - -import Timeline from 'react-calendar-timeline' - -import generateFakeData from '../generate-fake-data' - -var keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - groupLabelKey: 'label', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - constructor(props) { - super(props) - - const { groups, items } = generateFakeData() - const defaultTimeStart = moment() - .startOf('day') - .toDate() - const defaultTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .toDate() - - // convert every 2 groups out of 3 to nodes, leaving the first as the root - const newGroups = groups.map(group => { - const isRoot = (parseInt(group.id) - 1) % 3 === 0 - const parent = isRoot - ? null - : Math.floor((parseInt(group.id) - 1) / 3) * 3 + 1 - const height = isRoot ? 15 : null; - - return Object.assign({}, group, { - root: isRoot, - parent: parent, - height: height - }) - }) - - const newItems = items.filter(item => { - const group = newGroups.find(group => group.id === item.group); - return !group.root; - }); - - this.state = { - groups: newGroups, - items: newItems, - defaultTimeStart, - defaultTimeEnd, - openGroups: {} - } - } - - toggleGroup = id => { - const { openGroups } = this.state - this.setState({ - openGroups: { - ...openGroups, - [id]: !openGroups[id] - } - }) - } - - render() { - const { - groups, - items, - defaultTimeStart, - defaultTimeEnd, - openGroups - } = this.state - - // hide (filter) the groups that are closed, for the rest, patch their "title" and add some callbacks or padding - const newGroups = groups - .filter(g => g.root || openGroups[g.parent]) - .map(group => { - return Object.assign({}, group, { - title: group.root ? ( -
this.toggleGroup(parseInt(group.id))} - style={{ cursor: 'pointer' }} - > - {openGroups[parseInt(group.id)] ? '[-]' : '[+]'} {group.title} -
- ) : ( -
{group.title}
- ) - }) - }) - - return ( - Above The Left
} - rightSidebarWidth={150} - rightSidebarContent={
Above The Right
} - canMove={true} - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - horizontalLineClassNamesForGroup={(group) => group.root ? ["row-root"] : []} - /> - ) - } -} +import React, { Component } from 'react' +import moment from 'moment' + +import Timeline from 'react-calendar-timeline' + +import generateFakeData from '../generate-fake-data' + +var keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + groupLabelKey: 'label', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + constructor(props) { + super(props) + + const { groups, items } = generateFakeData() + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + // convert every 2 groups out of 3 to nodes, leaving the first as the root + const newGroups = groups.map(group => { + const isRoot = (parseInt(group.id) - 1) % 3 === 0 + const parent = isRoot + ? null + : Math.floor((parseInt(group.id) - 1) / 3) * 3 + 1 + const height = isRoot ? 15 : null; + + return Object.assign({}, group, { + root: isRoot, + parent: parent, + height: height + }) + }) + + const newItems = items.filter(item => { + const group = newGroups.find(group => group.id === item.group); + return !group.root; + }); + + this.state = { + groups: newGroups, + items: newItems, + defaultTimeStart, + defaultTimeEnd, + openGroups: {} + } + } + + toggleGroup = id => { + const { openGroups } = this.state + this.setState({ + openGroups: { + ...openGroups, + [id]: !openGroups[id] + } + }) + } + + render() { + const { + groups, + items, + defaultTimeStart, + defaultTimeEnd, + openGroups + } = this.state + + // hide (filter) the groups that are closed, for the rest, patch their "title" and add some callbacks or padding + const newGroups = groups + .filter(g => g.root || openGroups[g.parent]) + .map(group => { + return Object.assign({}, group, { + title: group.root ? ( +
this.toggleGroup(parseInt(group.id))} + style={{ cursor: 'pointer' }} + > + {openGroups[parseInt(group.id)] ? '[-]' : '[+]'} {group.title} +
+ ) : ( +
{group.title}
+ ) + }) + }) + + return ( + Above The Left
} + rightSidebarWidth={150} + rightSidebarContent={
Above The Right
} + canMove={true} + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + horizontalLineClassNamesForGroup={(group) => group.root ? ["row-root"] : []} + /> + ) + } +} diff --git a/demo/app/demo-vertical-classes/index.js b/demo/app/demo-vertical-classes/index.js index 8d023e3b5..d0761fa2d 100644 --- a/demo/app/demo-vertical-classes/index.js +++ b/demo/app/demo-vertical-classes/index.js @@ -1,106 +1,106 @@ -import moment from "moment"; -import React, {Component} from "react"; - -import generateFakeData from '../generate-fake-data' -import Timeline from "react-calendar-timeline"; - -const format = "DD.MM.YYYY" -const holidays = [moment("01.01.2018", format), moment("06.01.2018", format), moment("30.03.2018", format), - moment("01.04.2018", format), moment("02.04.2018", format), moment("01.05.2018", format), - moment("10.05.2018", format), moment("20.05.2018", format), moment("21.05.2018", format), - moment("31.05.2018", format), moment("15.08.2018", format), moment("26.10.2018", format), - moment("01.11.2018", format), moment("08.12.2018", format), moment("24.12.2018", format), - moment("25.12.2018", format), moment("26.12.2018", format), moment("31.12.2018", format)] - -const keys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start', - itemTimeEndKey: 'end' -} - -export default class App extends Component { - - constructor(props) { - super(props) - - const {groups, items} = generateFakeData() - const defaultTimeStart = moment() - .startOf('day') - .toDate() - const defaultTimeEnd = moment() - .startOf('day') - .add(1, 'day') - .toDate() - - this.state = { - groups, - items, - defaultTimeStart, - defaultTimeEnd - } - } - - getMinutesOfDay = (date) => { - return date.hours() * 60 + date.minutes() - } - - verticalLineClassNamesForTime = (timeStart, timeEnd) => { - const currentTimeStart = moment(timeStart) - const currentTimeEnd = moment(timeEnd) - - let classes = []; - - // check for public holidays - for (let holiday of holidays) { - if (holiday.isSame(currentTimeStart, "day") && holiday.isSame(currentTimeEnd, "day")) { - classes.push("holiday") - } - } - - // highlight lunch break (12:00-13:00) - const lunchStart = moment().hours(12).minutes(0).seconds(0); - const lunchEnd = moment().hours(13).minutes(0).seconds(0); - if (this.getMinutesOfDay(currentTimeStart) >= this.getMinutesOfDay(lunchStart) && - this.getMinutesOfDay(currentTimeEnd) <= this.getMinutesOfDay(lunchEnd)) { - classes.push("lunch"); - } - - return classes; - } - - render() { - const {groups, items, defaultTimeStart, defaultTimeEnd} = this.state - - return ( -
- In this example we have public holidays we want to highlight.
- Also we want to visually highlight a blocking range (e.g. lunch break).
-
- Above The Left
} - canMove - canResize="right" - canSelect - itemsSorted - itemTouchSendsClick={false} - stackItems="space" - itemHeightRatio={0.75} - defaultTimeStart={defaultTimeStart} - defaultTimeEnd={defaultTimeEnd} - verticalLineClassNamesForTime={this.verticalLineClassNamesForTime} - /> -
- ) - } - -} +import moment from "moment"; +import React, {Component} from "react"; + +import generateFakeData from '../generate-fake-data' +import Timeline from "react-calendar-timeline"; + +const format = "DD.MM.YYYY" +const holidays = [moment("01.01.2018", format), moment("06.01.2018", format), moment("30.03.2018", format), + moment("01.04.2018", format), moment("02.04.2018", format), moment("01.05.2018", format), + moment("10.05.2018", format), moment("20.05.2018", format), moment("21.05.2018", format), + moment("31.05.2018", format), moment("15.08.2018", format), moment("26.10.2018", format), + moment("01.11.2018", format), moment("08.12.2018", format), moment("24.12.2018", format), + moment("25.12.2018", format), moment("26.12.2018", format), moment("31.12.2018", format)] + +const keys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start', + itemTimeEndKey: 'end' +} + +export default class App extends Component { + + constructor(props) { + super(props) + + const {groups, items} = generateFakeData() + const defaultTimeStart = moment() + .startOf('day') + .toDate() + const defaultTimeEnd = moment() + .startOf('day') + .add(1, 'day') + .toDate() + + this.state = { + groups, + items, + defaultTimeStart, + defaultTimeEnd + } + } + + getMinutesOfDay = (date) => { + return date.hours() * 60 + date.minutes() + } + + verticalLineClassNamesForTime = (timeStart, timeEnd) => { + const currentTimeStart = moment(timeStart) + const currentTimeEnd = moment(timeEnd) + + let classes = []; + + // check for public holidays + for (let holiday of holidays) { + if (holiday.isSame(currentTimeStart, "day") && holiday.isSame(currentTimeEnd, "day")) { + classes.push("holiday") + } + } + + // highlight lunch break (12:00-13:00) + const lunchStart = moment().hours(12).minutes(0).seconds(0); + const lunchEnd = moment().hours(13).minutes(0).seconds(0); + if (this.getMinutesOfDay(currentTimeStart) >= this.getMinutesOfDay(lunchStart) && + this.getMinutesOfDay(currentTimeEnd) <= this.getMinutesOfDay(lunchEnd)) { + classes.push("lunch"); + } + + return classes; + } + + render() { + const {groups, items, defaultTimeStart, defaultTimeEnd} = this.state + + return ( +
+ In this example we have public holidays we want to highlight.
+ Also we want to visually highlight a blocking range (e.g. lunch break).
+
+ Above The Left
} + canMove + canResize="right" + canSelect + itemsSorted + itemTouchSendsClick={false} + stackItems="space" + itemHeightRatio={0.75} + defaultTimeStart={defaultTimeStart} + defaultTimeEnd={defaultTimeEnd} + verticalLineClassNamesForTime={this.verticalLineClassNamesForTime} + /> +
+ ) + } + +} diff --git a/demo/app/index.js b/demo/app/index.js index fbe44aeab..30c7cc437 100644 --- a/demo/app/index.js +++ b/demo/app/index.js @@ -11,11 +11,13 @@ const demos = { treeGroups: require('./demo-tree-groups').default, linkedTimelines: require('./demo-linked-timelines').default, elementResize: require('./demo-element-resize').default, - stickyHeader: require('./demo-sticky-header').default, renderers: require('./demo-renderers').default, verticalClasses: require('./demo-vertical-classes').default, customItems: require('./demo-custom-items').default, customHeaders: require('./demo-headers').default, + customInfoLabel: require('./demo-custom-info-label').default, + controledSelect: require('./demo-controlled-select').default, + controlledScrolling: require('./demo-controlled-scrolling').default, } // A simple component that shows the pathname of the current location diff --git a/demo/index.html b/demo/index.html index 20b7b4d50..fef826ed4 100644 --- a/demo/index.html +++ b/demo/index.html @@ -1,17 +1,17 @@ - - - - - - - - react-calendar-timeline - - - -
- - - - - + + + + + + + + react-calendar-timeline + + + +
+ + + + + diff --git a/demo/index.js b/demo/index.js index 6cc990bef..09a243382 100644 --- a/demo/index.js +++ b/demo/index.js @@ -1,18 +1,18 @@ -import React from 'react' -import ReactDOM from 'react-dom' -import 'react-calendar-timeline-css' -import App from './app' - -const render = AppToRender => { - ReactDOM.render(, document.getElementById('root')) -} - -render(App) - -if (module.hot) { - module.hot.accept('./app', () => { - const NextApp = require('./app').default - - render(NextApp) - }) -} +import React from 'react' +import ReactDOM from 'react-dom' +import 'react-calendar-timeline-css' +import App from './app' + +const render = AppToRender => { + ReactDOM.render(, document.getElementById('root')) +} + +render(App) + +if (module.hot) { + module.hot.accept('./app', () => { + const NextApp = require('./app').default + + render(NextApp) + }) +} diff --git a/deploy-gh-pages.sh b/deploy-gh-pages.sh index 9a5622b03..6f54c0546 100644 --- a/deploy-gh-pages.sh +++ b/deploy-gh-pages.sh @@ -1,80 +1,80 @@ -#!/bin/bash - -# https://github.com/signalwerk/colorlab/blob/master/deploy_doc.sh -# https://gist.github.com/domenic/ec8b0fc8ab45f39403dd -# https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example - -set -e # Exit with nonzero exit code if anything fails - -echo "-- start" -ls -las - -SOURCE_BRANCH="master" -TARGET_BRANCH="master" -SSH_REPO="git@github.com:namespace-ee/react-calendar-timeline-docs" -DEPLOY_DIR="gh-pages" - -function doCompile { - # npm test - # npm run build - echo "-- doCompile" - yarn - yarn run build:demo - - mkdir -p $DEPLOY_DIR/ - cp ./build/* ./$DEPLOY_DIR/ -} - -# Pull requests and commits to other branches shouldn't try to deploy, just build to verify -if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then - echo "Skipping deploy;" - exit 0 -fi - -# Get the deploy key by using Travis's stored variables to decrypt deploy-travis-key.enc -ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" -ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" -ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} -ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} -eval `ssh-agent -s` -openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ./deploy-travis-key.enc -d | ssh-add - - -# Save some useful information -# REPO=`git config remote.origin.url` -# SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} -SHA=`git rev-parse --verify HEAD` - -# Clone the existing gh-pages for this repo into $DEPLOY_DIR/ -# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply) -rm -rf $DEPLOY_DIR -git clone $SSH_REPO $DEPLOY_DIR -cd $DEPLOY_DIR -git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH -cd .. - -# Clean out existing contents -echo "-- kill" -echo $DEPLOY_DIR -rm -rf $DEPLOY_DIR/* || exit 0 - -# Run our compile script -doCompile - -# Now let's go have some fun with the cloned repo -cd $DEPLOY_DIR -git config user.name "Travis CI" -git config user.email "$COMMIT_AUTHOR_EMAIL" - -# If there are no changes to the compiled out (e.g. this is a README update) then just bail. -if git diff --quiet; then - echo "No changes to the output on this push; exiting." - exit 0 -fi - -# Commit the "changes", i.e. the new version. -# The delta will show diffs between new and old versions. -git add -A . -git commit -m "Deploy to GitHub Pages: ${SHA}" - -# Push to the remote repository -git push $SSH_REPO $TARGET_BRANCH +#!/bin/bash + +# https://github.com/signalwerk/colorlab/blob/master/deploy_doc.sh +# https://gist.github.com/domenic/ec8b0fc8ab45f39403dd +# https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example + +set -e # Exit with nonzero exit code if anything fails + +echo "-- start" +ls -las + +SOURCE_BRANCH="master" +TARGET_BRANCH="master" +SSH_REPO="git@github.com:namespace-ee/react-calendar-timeline-docs" +DEPLOY_DIR="gh-pages" + +function doCompile { + # npm test + # npm run build + echo "-- doCompile" + yarn + yarn run build:demo + + mkdir -p $DEPLOY_DIR/ + cp ./build/* ./$DEPLOY_DIR/ +} + +# Pull requests and commits to other branches shouldn't try to deploy, just build to verify +if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then + echo "Skipping deploy;" + exit 0 +fi + +# Get the deploy key by using Travis's stored variables to decrypt deploy-travis-key.enc +ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" +ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" +ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} +ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} +eval `ssh-agent -s` +openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ./deploy-travis-key.enc -d | ssh-add - + +# Save some useful information +# REPO=`git config remote.origin.url` +# SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} +SHA=`git rev-parse --verify HEAD` + +# Clone the existing gh-pages for this repo into $DEPLOY_DIR/ +# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply) +rm -rf $DEPLOY_DIR +git clone $SSH_REPO $DEPLOY_DIR +cd $DEPLOY_DIR +git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH +cd .. + +# Clean out existing contents +echo "-- kill" +echo $DEPLOY_DIR +rm -rf $DEPLOY_DIR/* || exit 0 + +# Run our compile script +doCompile + +# Now let's go have some fun with the cloned repo +cd $DEPLOY_DIR +git config user.name "Travis CI" +git config user.email "$COMMIT_AUTHOR_EMAIL" + +# If there are no changes to the compiled out (e.g. this is a README update) then just bail. +if git diff --quiet; then + echo "No changes to the output on this push; exiting." + exit 0 +fi + +# Commit the "changes", i.e. the new version. +# The delta will show diffs between new and old versions. +git add -A . +git commit -m "Deploy to GitHub Pages: ${SHA}" + +# Push to the remote repository +git push $SSH_REPO $TARGET_BRANCH diff --git a/examples/README.md b/examples/README.md index 13bdcad66..6fcf88eb7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -40,7 +40,9 @@ You can restrict the moving and resizing of items at the item level by providing ## Right Sidebar -Adding a right sidebar is as easy as passing in a couple of props `rightSidebarWidth` and `rightSidebarContent`. Content in the right column is populated from the `rightTitle` property on the group. +Adding a right sidebar is as easy as passing `rightSidebarWidth`. Content in the right column is populated from the `rightTitle` property on the group. + +Note: If you are using Custom Headers then you need to add them with `SidebarHeader` with variant "right" [Example Codesandbox](https://codesandbox.io/s/j3wrw6rl4v) @@ -58,8 +60,27 @@ Through group manipulation, you can achieve tree group views. Note that this is the user code manipulating groups to achieve tree group functionality. This example is an illustration of how you can achieve this functionality. This is not a feature that is directly supported by the library. +## Controlled scroll + +Controlled visible port of the calendar using `visibleTimeStart` and `visibleTimeEnd`. This also limits scrolling by mouse and adds two buttons to change the visible port of the calendar + +[Example Codesandbox](https://codesandbox.io/s/timeline-demo-controlled-visible-time-no-scroll-659jb) + ## Programmatically Scrolling -Using `scrollRef` you can trigger scrolling and create an animation. This is an alternative to setting `visibleStartTime` and `visibleEndTime`. +Using controlled scroll and react-spring to trigger scrolling and create an animation. + +[Example Codesandbox](https://codesandbox.io/s/timeline-demo-programmatic-scroll-3kq2503y8p) + +## Sticky header + +Using `Timeline Header` you can make the header stick to the top of the page while scrolling down + +[Example Codesandbox](https://codesandbox.io/s/w6xvqzno4w) + +## InfoLabel + +Native info label was removed with 0.26.0 and now the responsibility to render to render the Info Label is on the user. The example bellow has InfoLabel that matches exactly the removed label + +[Example Codesandbox](https://codesandbox.io/s/timeline-demo-info-label-neec9) -[Example Codesandbox](https://codesandbox.io/s/3kq2503y8p) diff --git a/index.js b/index.js index 6e92639c6..8b04cf558 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ -import Timeline from './lib/lib/Timeline' - -export default Timeline +import Timeline from './lib/lib/Timeline' + +export default Timeline diff --git a/package.json b/package.json index 7242ece7f..df8449bed 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint": "eslint --ext .js --ext .jsx ./src", "lint:fix": "prettier-eslint --parser babylon --write \"src/**/*.js\"", "prepublish": "npm run build:lib", - "start": "webpack-dev-server --hot --host 0.0.0.0 --display-modules", + "start": "webpack-dev-server --hot --host 0.0.0.0", "test": "jest", "test:watch": "jest --watch" }, @@ -72,7 +72,9 @@ "testMatch": [ "**/__tests__/**/*.js" ], - "setupTestFrameworkScriptFile": "/config/jest-setup.js", + "setupFilesAfterEnv": [ + "/config/jest-setup.js" + ], "collectCoverageFrom": [ "src/**/*.{js,jsx}" ], @@ -90,10 +92,11 @@ ] }, "dependencies": { - "create-react-context": "^0.2.2", + "classnames": "^2.2.6", + "create-react-context": "^0.3.0", "element-resize-detector": "^1.1.12", "lodash.isequal": "^4.5.0", - "memoize-one": "^4.0.3" + "memoize-one": "^5.1.1" }, "peerDependencies": { "interactjs": "^1.3.4", @@ -103,20 +106,20 @@ "react-dom": ">=16.3" }, "devDependencies": { - "babel-cli": "^6.7.5", - "babel-core": "6.26.3", + "@babel/cli": "^7.5.0", + "@babel/core": "^7.5.0", + "@babel/plugin-proposal-class-properties": "^7.5.0", + "@babel/plugin-proposal-object-rest-spread": "^7.5.2", + "@babel/preset-env": "^7.5.2", + "@babel/preset-react": "^7.0.0", "babel-eslint": "^7.1.1", - "babel-jest": "^22.0.6", - "babel-loader": "^7.1.5", - "babel-plugin-react-remove-properties": "^0.2.5", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-preset-env": "1.7.0", - "babel-preset-react": "^6.5.0", + "babel-jest": "^24.8.0", + "babel-loader": "^8.0.6", + "babel-plugin-react-remove-properties": "^0.3.0", "cross-env": "^5.1.4", - "css-loader": "~0.26.0", - "enzyme": "^3.3.0", - "enzyme-adapter-react-16": "^1.1.1", + "css-loader": "^6.7.1", + "enzyme": "^3.10.0", + "enzyme-adapter-react-16": "^1.14.0", "eslint": "^4.16.0", "eslint-config-prettier": "^2.9.0", "eslint-config-standard": "^6.2.1", @@ -127,12 +130,12 @@ "eslint-plugin-standard": "^2.0.1", "faker": "^4.1.0", "interactjs": "^1.3.4", - "jest": "^23.6.0", - "jest-dom": "^1.12.1", - "jest-watch-typeahead": "^0.1.0", + "jest": "^24.8.0", + "jest-dom": "^3.5.0", + "jest-watch-typeahead": "^0.3.1", "jsdom": "^11.5.1", "moment": "^2.11.1", - "node-sass": "^4.9.2", + "node-sass": "^7.0.1", "prettier": "^1.10.2", "prettier-eslint-cli": "^4.7.0", "prop-types": "^15.6.2", @@ -140,12 +143,13 @@ "react": "^16.2.0", "react-dom": "^16.2.0", "react-router-dom": "^4.1.1", - "react-testing-library": "^5.1.0", + "react-testing-library": "^6.0.3", + "regenerator-runtime": "^0.13.2", "rimraf": "^2.6.2", - "sass-loader": "^7.0.3", - "style-loader": "~0.13.0", - "webpack": "^4.16.3", - "webpack-cli": "^3.1.0", - "webpack-dev-server": "^3.1.5" + "sass-loader": "^13.0.0", + "style-loader": "^3.3.1", + "webpack": "^5.72.1", + "webpack-cli": "^4.9.2", + "webpack-dev-server": "^4.9.0" } } diff --git a/src/index.js b/src/index.js index 62f4c62e4..1c1233da9 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,4 @@ export { default as TimelineHeaders } from './lib/headers/TimelineHeaders' export {default as SidebarHeader} from './lib/headers/SidebarHeader' export {default as CustomHeader} from './lib/headers/CustomHeader' export {default as DateHeader} from './lib/headers/DateHeader' -export {TimelineStateConsumer} from './lib/timeline/TimelineStateContext' -export {default as ItemHeader} from './lib/headers/ItemHeader' -export * from './lib/utility/calendar' export default Timeline diff --git a/src/lib/Timeline.js b/src/lib/Timeline.js index e059451e4..eb70de119 100644 --- a/src/lib/Timeline.js +++ b/src/lib/Timeline.js @@ -1,1128 +1,1088 @@ -import PropTypes from 'prop-types' -import React, { Component } from 'react' -import moment from 'moment' - -import Items from './items/Items' -import InfoLabel from './layout/InfoLabel' -import Sidebar from './layout/Sidebar' -import Columns from './columns/Columns' -import GroupRows from './row/GroupRows' -import ScrollElement from './scroll/ScrollElement' -import MarkerCanvas from './markers/MarkerCanvas' - -import windowResizeDetector from '../resize-detector/window' - -import { - getMinUnit, - getNextUnit, - calculateTimeForXPosition, - calculateScrollCanvas, - getCanvasBoundariesFromVisibleTime, - getCanvasWidth, - stackTimelineItems, -} from './utility/calendar' -import { _get, _length } from './utility/generic' -import { - defaultKeys, - defaultTimeSteps, - defaultHeaderLabelFormats, - defaultSubHeaderLabelFormats -} from './default-config' -import { TimelineStateProvider } from './timeline/TimelineStateContext' -import { TimelineMarkersProvider } from './markers/TimelineMarkersContext' -import { TimelineHeadersProvider } from './headers/HeadersContext' -import TimelineHeaders from './headers/TimelineHeaders' -import DateHeader from './headers/DateHeader' -import SidebarHeader from './headers/SidebarHeader' - -export default class ReactCalendarTimeline extends Component { - static propTypes = { - groups: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, - items: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, - sidebarWidth: PropTypes.number, - rightSidebarWidth: PropTypes.number, - dragSnap: PropTypes.number, - minResizeWidth: PropTypes.number, - stickyOffset: PropTypes.number, - stickyHeader: PropTypes.bool, - lineHeight: PropTypes.number, - headerLabelGroupHeight: PropTypes.number, - headerLabelHeight: PropTypes.number, - itemHeightRatio: PropTypes.number, - - minZoom: PropTypes.number, - maxZoom: PropTypes.number, - - clickTolerance: PropTypes.number, - - canChangeGroup: PropTypes.bool, - canMove: PropTypes.bool, - canResize: PropTypes.oneOf([true, false, 'left', 'right', 'both']), - useResizeHandle: PropTypes.bool, - canSelect: PropTypes.bool, - - stackItems: PropTypes.oneOf([false,'space', 'lines']), - - traditionalZoom: PropTypes.bool, - - itemTouchSendsClick: PropTypes.bool, - - horizontalLineClassNamesForGroup: PropTypes.func, - - onItemMove: PropTypes.func, - onItemResize: PropTypes.func, - onItemClick: PropTypes.func, - onItemSelect: PropTypes.func, - onItemDeselect: PropTypes.func, - onCanvasClick: PropTypes.func, - onItemDoubleClick: PropTypes.func, - onItemContextMenu: PropTypes.func, - onCanvasDoubleClick: PropTypes.func, - onCanvasContextMenu: PropTypes.func, - onZoom: PropTypes.func, - - moveResizeValidator: PropTypes.func, - - itemRenderer: PropTypes.func, - groupRenderer: PropTypes.func, - - style: PropTypes.object, - - keys: PropTypes.shape({ - groupIdKey: PropTypes.string, - groupTitleKey: PropTypes.string, - groupLabelKey: PropTypes.string, - groupRightTitleKey: PropTypes.string, - itemIdKey: PropTypes.string, - itemTitleKey: PropTypes.string, - itemDivTitleKey: PropTypes.string, - itemGroupKey: PropTypes.string, - itemTimeStartKey: PropTypes.string, - itemTimeEndKey: PropTypes.string - }), - headerRef: PropTypes.func, - scrollRef: PropTypes.func, - - timeSteps: PropTypes.shape({ - second: PropTypes.number, - minute: PropTypes.number, - hour: PropTypes.number, - day: PropTypes.number, - month: PropTypes.number, - year: PropTypes.number - }), - - defaultTimeStart: PropTypes.object, - defaultTimeEnd: PropTypes.object, - - visibleTimeStart: PropTypes.number, - visibleTimeEnd: PropTypes.number, - onTimeChange: PropTypes.func, - onBoundsChange: PropTypes.func, - - selected: PropTypes.array, - - headerLabelFormats: PropTypes.shape({ - yearShort: PropTypes.string, - yearLong: PropTypes.string, - monthShort: PropTypes.string, - monthMedium: PropTypes.string, - monthMediumLong: PropTypes.string, - monthLong: PropTypes.string, - dayShort: PropTypes.string, - dayLong: PropTypes.string, - hourShort: PropTypes.string, - hourMedium: PropTypes.string, - hourMediumLong: PropTypes.string, - hourLong: PropTypes.string - }), - - subHeaderLabelFormats: PropTypes.shape({ - yearShort: PropTypes.string, - yearLong: PropTypes.string, - monthShort: PropTypes.string, - monthMedium: PropTypes.string, - monthLong: PropTypes.string, - dayShort: PropTypes.string, - dayMedium: PropTypes.string, - dayMediumLong: PropTypes.string, - dayLong: PropTypes.string, - hourShort: PropTypes.string, - hourLong: PropTypes.string, - minuteShort: PropTypes.string, - minuteLong: PropTypes.string - }), - - resizeDetector: PropTypes.shape({ - addListener: PropTypes.func, - removeListener: PropTypes.func - }), - - verticalLineClassNamesForTime: PropTypes.func, - - children: PropTypes.node, - width: PropTypes.number, - onUpdateMove: PropTypes.func, - } - - static defaultProps = { - sidebarWidth: 150, - rightSidebarWidth: 0, - dragSnap: 1000 * 60 * 15, // 15min - minResizeWidth: 20, - stickyOffset: 0, - stickyHeader: true, - lineHeight: 30, - headerLabelGroupHeight: 30, - headerLabelHeight: 30, - itemHeightRatio: 0.65, - - minZoom: 60 * 60 * 1000, // 1 hour - maxZoom: 5 * 365.24 * 86400 * 1000, // 5 years - - clickTolerance: 3, // how many pixels can we drag for it to be still considered a click? - - canChangeGroup: true, - canMove: true, - canResize: 'right', - useResizeHandle: false, - canSelect: true, - - stackItems: false, - - traditionalZoom: false, - - horizontalLineClassNamesForGroup: null, - - onItemMove: null, - onItemResize: null, - onItemClick: null, - onItemSelect: null, - onItemDeselect: null, - onCanvasClick: null, - onItemDoubleClick: null, - onItemContextMenu: null, - onZoom: null, - - verticalLineClassNamesForTime: null, - - moveResizeValidator: null, - - dayBackground: null, - - defaultTimeStart: null, - defaultTimeEnd: null, - - itemTouchSendsClick: false, - - style: {}, - keys: defaultKeys, - timeSteps: defaultTimeSteps, - headerRef: () => {}, - scrollRef: () => {}, - - // if you pass in visibleTimeStart and visibleTimeEnd, you must also pass onTimeChange(visibleTimeStart, visibleTimeEnd), - // which needs to update the props visibleTimeStart and visibleTimeEnd to the ones passed - visibleTimeStart: null, - visibleTimeEnd: null, - onTimeChange: function( - visibleTimeStart, - visibleTimeEnd, - updateScrollCanvas - ) { - updateScrollCanvas(visibleTimeStart, visibleTimeEnd) - }, - // called when the canvas area of the calendar changes - onBoundsChange: null, - children: null, - - headerLabelFormats: defaultHeaderLabelFormats, - subHeaderLabelFormats: defaultSubHeaderLabelFormats, - - selected: null, - onUpdateMove: null, - } - - static childContextTypes = { - getTimelineContext: PropTypes.func - } - - getChildContext() { - return { - getTimelineContext: () => { - return this.getTimelineContext() - } - } - } - - getTimelineContext = () => { - const { - width, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd, - } = this.state - - return { - timelineWidth: width, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd - } - } - - constructor(props) { - super(props) - - this.getSelected = this.getSelected.bind(this) - this.hasSelectedItem = this.hasSelectedItem.bind(this) - this.isItemSelected= this.isItemSelected.bind(this) - - let visibleTimeStart = null - let visibleTimeEnd = null - - if (this.props.defaultTimeStart && this.props.defaultTimeEnd) { - visibleTimeStart = this.props.defaultTimeStart.valueOf() - visibleTimeEnd = this.props.defaultTimeEnd.valueOf() - } else if (this.props.visibleTimeStart && this.props.visibleTimeEnd) { - visibleTimeStart = this.props.visibleTimeStart - visibleTimeEnd = this.props.visibleTimeEnd - } else { - //throwing an error because neither default or visible time props provided - throw new Error( - 'You must provide either "defaultTimeStart" and "defaultTimeEnd" or "visibleTimeStart" and "visibleTimeEnd" to initialize the Timeline' - ) - } - - const [canvasTimeStart, canvasTimeEnd] = getCanvasBoundariesFromVisibleTime(visibleTimeStart, visibleTimeEnd) - - this.state = { - width: this.props.width? this.props.width: 1000, - visibleTimeStart: visibleTimeStart, - visibleTimeEnd: visibleTimeEnd, - canvasTimeStart: canvasTimeStart, - canvasTimeEnd: canvasTimeEnd, - selectedItem: null, - dragTime: null, - dragGroupTitle: null, - resizeTime: null, - resizingItem: null, - resizingEdge: null - } - - const canvasWidth= getCanvasWidth(this.state.width) - - const { dimensionItems, height, groupHeights, groupTops } = stackTimelineItems( - props.items, - props.groups, - canvasWidth, - this.state.canvasTimeStart, - this.state.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - this.state.draggingItem, - this.state.resizingItem, - this.state.dragTime, - this.state.resizingEdge, - this.state.resizeTime, - this.state.newGroupOrder - ) - - /* eslint-disable react/no-direct-mutation-state */ - this.state.dimensionItems = dimensionItems - this.state.height = height - this.state.groupHeights = groupHeights - this.state.groupTops = groupTops - - /* eslint-enable */ - } - - componentDidMount() { - if(!this.props.width) {this.resize(this.props)} - else { - this.scrollComponent.scrollLeft = this.props.width - this.scrollHeaderRef.scrollLeft = this.props.width - } - - if (this.props.resizeDetector && this.props.resizeDetector.addListener) { - this.props.resizeDetector.addListener(this) - } - - windowResizeDetector.addListener(this) - - this.lastTouchDistance = null - } - - componentWillUnmount() { - if (this.props.resizeDetector && this.props.resizeDetector.addListener) { - this.props.resizeDetector.removeListener(this) - } - - windowResizeDetector.removeListener(this) - } - - static getDerivedStateFromProps(nextProps, prevState) { - const { - visibleTimeStart, - visibleTimeEnd, - items, - groups, - } = nextProps - - - // if the items or groups have changed we must re-render - const forceUpdate = items !== prevState.items || groups !== prevState.groups || nextProps.width!==prevState.width - - //get width from prop is passed or from state if not passed by user - const width = nextProps.width? nextProps.width : prevState.width - - // This is a gross hack pushing items and groups in to state only to allow - // For the forceUpdate check - let derivedState = {items, groups, width} - - - // We are a controlled component - if (visibleTimeStart && visibleTimeEnd) { - // Get the new canvas position - Object.assign( - derivedState, - calculateScrollCanvas( - visibleTimeStart, - visibleTimeEnd, - forceUpdate, - items, - groups, - nextProps, - prevState - ) - ) - } else if (forceUpdate) { - // Calculate new item stack position as canvas may have changed - const canvasWidth = getCanvasWidth(width) - Object.assign(derivedState, - stackTimelineItems( - items, - groups, - canvasWidth, - prevState.canvasTimeStart, - prevState.canvasTimeEnd, - nextProps.keys, - nextProps.lineHeight, - nextProps.itemHeightRatio, - nextProps.stackItems, - prevState.draggingItem, - prevState.resizingItem, - prevState.dragTime, - prevState.resizingEdge, - prevState.resizeTime, - prevState.newGroupOrder, - )) - } - - return derivedState - } - - componentDidUpdate(prevProps, prevState) { - const newZoom = this.state.visibleTimeEnd - this.state.visibleTimeStart - const oldZoom = prevState.visibleTimeEnd - prevState.visibleTimeStart - - // are we changing zoom? Report it! - if (this.props.onZoom && newZoom !== oldZoom) { - this.props.onZoom(this.getTimelineContext()) - } - - // The bounds have changed? Report it! - if ( - this.props.onBoundsChange && - this.state.canvasTimeStart !== prevState.canvasTimeStart - ) { - this.props.onBoundsChange( - this.state.canvasTimeStart, - this.state.canvasTimeStart + newZoom * 3 - ) - } - - // Check the scroll is correct - const scrollLeft = Math.round( - (this.state.width * - (this.state.visibleTimeStart - this.state.canvasTimeStart)) / - newZoom - ) - if (this.scrollComponent.scrollLeft !== scrollLeft) { - this.scrollComponent.scrollLeft = scrollLeft - } - - if (this.scrollHeaderRef.scrollLeft !== scrollLeft) { - this.scrollHeaderRef.scrollLeft = scrollLeft - } - } - - resize = (props = this.props) => { - const { - width: containerWidth, - } = this.container.getBoundingClientRect() - - let width = props.width? props.width : containerWidth - props.sidebarWidth - props.rightSidebarWidth - const canvasWidth = getCanvasWidth(width) - const { dimensionItems, height, groupHeights, groupTops } = stackTimelineItems( - props.items, - props.groups, - canvasWidth, - this.state.canvasTimeStart, - this.state.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - this.state.draggingItem, - this.state.resizingItem, - this.state.dragTime, - this.state.resizingEdge, - this.state.resizeTime, - this.state.newGroupOrder - ) - - // this is needed by dragItem since it uses pageY from the drag events - // if this was in the context of the scrollElement, this would not be necessary - - this.setState({ - width, - dimensionItems, - height, - groupHeights, - groupTops, - }) - - this.scrollComponent.scrollLeft = width - this.scrollHeaderRef.scrollLeft = width - } - - onScroll = scrollX => { - const width = this.state.width - let newScrollX = scrollX - // move the virtual canvas if needed - // if scrollX is less...i dont know how to explain the logic here - if (newScrollX < width * 0.5) { - newScrollX += width - } - if (newScrollX > width * 1.5) { - newScrollX -= width - } - - this.scrollHeaderRef.scrollLeft = newScrollX - this.scrollComponent.scrollLeft = newScrollX - - const canvasTimeStart = this.state.canvasTimeStart - - const zoom = this.state.visibleTimeEnd - this.state.visibleTimeStart - - const visibleTimeStart = canvasTimeStart + (zoom * scrollX) / width - - if ( - this.state.visibleTimeStart !== visibleTimeStart || - this.state.visibleTimeEnd !== visibleTimeStart + zoom - ) { - this.props.onTimeChange( - visibleTimeStart, - visibleTimeStart + zoom, - this.updateScrollCanvas - ) - } - } - - // called when the visible time changes - updateScrollCanvas = ( - visibleTimeStart, - visibleTimeEnd, - forceUpdateDimensions, - items = this.props.items, - groups = this.props.groups - ) => { - this.setState( - calculateScrollCanvas( - visibleTimeStart, - visibleTimeEnd, - forceUpdateDimensions, - items, - groups, - this.props, - this.state - ) - ) - } - - handleWheelZoom = (speed, xPosition, deltaY) => { - this.changeZoom(1.0 + (speed * deltaY) / 500, xPosition / this.state.width) - } - - changeZoom = (scale, offset = 0.5) => { - const { minZoom, maxZoom } = this.props - const oldZoom = this.state.visibleTimeEnd - this.state.visibleTimeStart - const newZoom = Math.min( - Math.max(Math.round(oldZoom * scale), minZoom), - maxZoom - ) // min 1 min, max 20 years - const newVisibleTimeStart = Math.round( - this.state.visibleTimeStart + (oldZoom - newZoom) * offset - ) - - this.props.onTimeChange( - newVisibleTimeStart, - newVisibleTimeStart + newZoom, - this.updateScrollCanvas - ) - } - - showPeriod = (from, to) => { - let visibleTimeStart = from.valueOf() - let visibleTimeEnd = to.valueOf() - - let zoom = visibleTimeEnd - visibleTimeStart - // can't zoom in more than to show one hour - if (zoom < 360000) { - return - } - - this.props.onTimeChange( - visibleTimeStart, - visibleTimeStart + zoom, - this.updateScrollCanvas - ) - } - - selectItem = (item, clickType, e) => { - if ( - this.isItemSelected(item) || - (this.props.itemTouchSendsClick && clickType === 'touch') - ) { - if (item && this.props.onItemClick) { - const time = this.timeFromItemEvent(e) - this.props.onItemClick(item, e, time) - } - } else { - this.setState({ selectedItem: item }) - if (item && this.props.onItemSelect) { - const time = this.timeFromItemEvent(e) - this.props.onItemSelect(item, e, time) - } else if (item === null && this.props.onItemDeselect) { - this.props.onItemDeselect(e) // this isnt in the docs. Is this function even used? - } - } - } - - doubleClickItem = (item, e) => { - if (this.props.onItemDoubleClick) { - const time = this.timeFromItemEvent(e) - this.props.onItemDoubleClick(item, e, time) - } - } - - contextMenuClickItem = (item, e) => { - if (this.props.onItemContextMenu) { - const time = this.timeFromItemEvent(e) - this.props.onItemContextMenu(item, e, time) - } - } - - // TODO: this is very similar to timeFromItemEvent, aside from which element to get offsets - // from. Look to consolidate the logic for determining coordinate to time - // as well as generalizing how we get time from click on the canvas - getTimeFromRowClickEvent = e => { - const { dragSnap } = this.props - const { - width, - canvasTimeStart, - canvasTimeEnd, - } = this.state - // this gives us distance from left of row element, so event is in - // context of the row element, not client or page - const { offsetX } = e.nativeEvent - - let time = calculateTimeForXPosition( - canvasTimeStart, - canvasTimeEnd, - getCanvasWidth(width), - offsetX - ) - time = Math.floor(time / dragSnap) * dragSnap - - return time - } - - timeFromItemEvent = e => { - const { width, visibleTimeStart, visibleTimeEnd } = this.state - const { dragSnap } = this.props - - const scrollComponent = this.scrollComponent - const { left: scrollX } = scrollComponent.getBoundingClientRect() - - const xRelativeToTimeline = e.clientX - scrollX - - const relativeItemPosition = xRelativeToTimeline / width - const zoom = visibleTimeEnd - visibleTimeStart - const timeOffset = relativeItemPosition * zoom - - let time = Math.round(visibleTimeStart + timeOffset) - time = Math.floor(time / dragSnap) * dragSnap - - return time - } - - dragItem = (item, dragTime, newGroupOrder) => { - let newGroup = this.props.groups[newGroupOrder] - const keys = this.props.keys - if(this.props.onUpdateMove){ - this.props.onUpdateMove(item, dragTime, newGroupOrder, 'move') - } - this.setState({ - draggingItem: item, - dragTime: dragTime, - newGroupOrder: newGroupOrder, - dragGroupTitle: newGroup ? _get(newGroup, keys.groupLabelKey) : '' - }) - } - - dropItem = (item, dragTime, newGroupOrder) => { - this.setState({ draggingItem: null, dragTime: null, dragGroupTitle: null }) - if (this.props.onItemMove) { - this.props.onItemMove(item, dragTime, newGroupOrder) - } - } - - resizingItem = (item, resizeTime, edge) => { - if(this.props.onUpdateMove){ - this.props.onUpdateMove(item, resizeTime, undefined, 'resize', edge) - } - this.setState({ - resizingItem: item, - resizingEdge: edge, - resizeTime: resizeTime - }) - } - - resizedItem = (item, resizeTime, edge, timeDelta) => { - this.setState({ resizingItem: null, resizingEdge: null, resizeTime: null }) - if (this.props.onItemResize && timeDelta !== 0) { - this.props.onItemResize(item, resizeTime, edge) - } - } - - columns( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - minUnit, - timeSteps, - height - ) { - return ( - - ) - } - - handleRowClick = (e, rowIndex) => { - // shouldnt this be handled by the user, as far as when to deselect an item? - if (this.hasSelectedItem()) { - this.selectItem(null) - } - - if (this.props.onCanvasClick == null) return - - const time = this.getTimeFromRowClickEvent(e) - const groupId = _get( - this.props.groups[rowIndex], - this.props.keys.groupIdKey - ) - this.props.onCanvasClick(groupId, time, e) - } - - handleRowDoubleClick = (e, rowIndex) => { - if (this.props.onCanvasDoubleClick == null) return - - const time = this.getTimeFromRowClickEvent(e) - const groupId = _get( - this.props.groups[rowIndex], - this.props.keys.groupIdKey - ) - this.props.onCanvasDoubleClick(groupId, time, e) - } - - handleScrollContextMenu = (e, rowIndex) => { - if (this.props.onCanvasContextMenu == null) return - - const timePosition = this.getTimeFromRowClickEvent(e) - - const groupId = _get( - this.props.groups[rowIndex], - this.props.keys.groupIdKey - ) - - if (this.props.onCanvasContextMenu) { - e.preventDefault() - this.props.onCanvasContextMenu(groupId, timePosition, e) - } - } - - rows(canvasWidth, groupHeights, groups) { - return ( - - ) - } - - items( - canvasTimeStart, - zoom, - canvasTimeEnd, - canvasWidth, - minUnit, - dimensionItems, - groupHeights, - groupTops - ) { - return ( - - ) - } - - infoLabel() { - let label = null - - if (this.state.dragTime) { - label = `${moment(this.state.dragTime).format('LLL')}, - ${this.state.dragGroupTitle}` - } else if (this.state.resizeTime) { - label = moment(this.state.resizeTime).format('LLL') - } - - return label ? : undefined - } - - handleHeaderRef = el => { - this.scrollHeaderRef = el - this.props.headerRef(el) - } - - sidebar(height, groupHeights) { - const { sidebarWidth } = this.props - return ( - sidebarWidth && - - ) - } - - rightSidebar(height, groupHeights) { - const { rightSidebarWidth } = this.props - return ( - rightSidebarWidth && - - ) - } - - groups - childrenWithProps( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - dimensionItems, - groupHeights, - groupTops, - height, - headerHeight, - visibleTimeStart, - visibleTimeEnd, - minUnit, - timeSteps - ) { - if (!this.props.children) { - return null - } - - // convert to an array and remove the nulls - const childArray = Array.isArray(this.props.children) - ? this.props.children.filter(c => c) - : [this.props.children] - - const childProps = { - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - visibleTimeStart: visibleTimeStart, - visibleTimeEnd: visibleTimeEnd, - dimensionItems, - items: this.props.items, - groups: this.props.groups, - keys: this.props.keys, - groupHeights: groupHeights, - groupTops: groupTops, - selected: this.getSelected(), - height: height, - headerHeight: headerHeight, - minUnit: minUnit, - timeSteps: timeSteps - } - - return React.Children.map(childArray, child => { - if (child.type !== TimelineHeaders) { - return React.cloneElement(child, childProps) - } else { - return null - } - }) - } - - renderHeaders = () => { - if (this.props.children) { - let headerRenderer - React.Children.map(this.props.children, child => { - if (child.type === TimelineHeaders) { - headerRenderer = child - } - }) - if (headerRenderer) { - return headerRenderer - } - } - return ( - - - - - {this.props.rightSidebarWidth ? : null} - - ) - } - - getScrollElementRef = el => { - this.props.scrollRef(el) - this.scrollComponent = el - } - getSelected() { - return this.state.selectedItem && !this.props.selected - ? [this.state.selectedItem] - : this.props.selected || []; - } - - hasSelectedItem(){ - if(!Array.isArray(this.props.selected)) return !!this.state.selectedItem - return this.props.selected.length > 0 - } - - isItemSelected(itemId){ - const selectedItems = this.getSelected() - return selectedItems.some(i => i === itemId) - } - - render() { - const { - items, - groups, - headerLabelGroupHeight, - headerLabelHeight, - sidebarWidth, - rightSidebarWidth, - timeSteps, - traditionalZoom - } = this.props - const { - draggingItem, - resizingItem, - width, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd, - } = this.state - let { dimensionItems, height, groupHeights, groupTops } = this.state - - const zoom = visibleTimeEnd - visibleTimeStart - const canvasWidth = getCanvasWidth(width) - const minUnit = getMinUnit(zoom, width, timeSteps) - const headerHeight = headerLabelGroupHeight + headerLabelHeight - - const isInteractingWithItem = !!draggingItem || !!resizingItem - - if (isInteractingWithItem) { - const stackResults = stackTimelineItems( - items, - groups, - canvasWidth, - this.state.canvasTimeStart, - this.state.canvasTimeEnd, - this.props.keys, - this.props.lineHeight, - this.props.itemHeightRatio, - this.props.stackItems, - this.state.draggingItem, - this.state.resizingItem, - this.state.dragTime, - this.state.resizingEdge, - this.state.resizeTime, - this.state.newGroupOrder - ) - dimensionItems = stackResults.dimensionItems - height = stackResults.height - groupHeights = stackResults.groupHeights - groupTops = stackResults.groupTops - } - - const outerComponentStyle = { - height: `${height}px` - } - - return ( - - - -
(this.container = el)} - className="react-calendar-timeline" - > - {this.renderHeaders()} -
- {sidebarWidth > 0 ? this.sidebar(height, groupHeights) : null} - - - {this.items( - canvasTimeStart, - zoom, - canvasTimeEnd, - canvasWidth, - minUnit, - dimensionItems, - groupHeights, - groupTops - )} - {this.columns( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - minUnit, - timeSteps, - height, - headerHeight - )} - {this.rows(canvasWidth, groupHeights, groups)} - {this.infoLabel()} - {this.childrenWithProps( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - dimensionItems, - groupHeights, - groupTops, - height, - headerHeight, - visibleTimeStart, - visibleTimeEnd, - minUnit, - timeSteps - )} - - - {rightSidebarWidth > 0 - ? this.rightSidebar(height, groupHeights) - : null} -
-
-
-
-
- ) - } -} \ No newline at end of file +import PropTypes from 'prop-types' +import React, { Component } from 'react' + +import Items from './items/Items' +import Sidebar from './layout/Sidebar' +import Columns from './columns/Columns' +import GroupRows from './row/GroupRows' +import ScrollElement from './scroll/ScrollElement' +import MarkerCanvas from './markers/MarkerCanvas' +import windowResizeDetector from '../resize-detector/window' + +import { + getMinUnit, + calculateTimeForXPosition, + calculateScrollCanvas, + getCanvasBoundariesFromVisibleTime, + getCanvasWidth, + stackTimelineItems +} from './utility/calendar' +import { _get, _length } from './utility/generic' +import { + defaultKeys, + defaultTimeSteps, +} from './default-config' +import { TimelineStateProvider } from './timeline/TimelineStateContext' +import { TimelineMarkersProvider } from './markers/TimelineMarkersContext' +import { TimelineHeadersProvider } from './headers/HeadersContext' +import TimelineHeaders from './headers/TimelineHeaders' +import DateHeader from './headers/DateHeader' + +export default class ReactCalendarTimeline extends Component { + static propTypes = { + groups: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, + items: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, + sidebarWidth: PropTypes.number, + rightSidebarWidth: PropTypes.number, + dragSnap: PropTypes.number, + minResizeWidth: PropTypes.number, + lineHeight: PropTypes.number, + itemHeightRatio: PropTypes.number, + + minZoom: PropTypes.number, + maxZoom: PropTypes.number, + buffer: PropTypes.number, + + clickTolerance: PropTypes.number, + + canChangeGroup: PropTypes.bool, + canMove: PropTypes.bool, + canResize: PropTypes.oneOf([true, false, 'left', 'right', 'both']), + useResizeHandle: PropTypes.bool, + canSelect: PropTypes.bool, + + stackItems: PropTypes.bool, + + traditionalZoom: PropTypes.bool, + + itemTouchSendsClick: PropTypes.bool, + + horizontalLineClassNamesForGroup: PropTypes.func, + + onItemMove: PropTypes.func, + onItemResize: PropTypes.func, + onItemClick: PropTypes.func, + onItemSelect: PropTypes.func, + onItemDeselect: PropTypes.func, + onCanvasClick: PropTypes.func, + onItemDoubleClick: PropTypes.func, + onItemContextMenu: PropTypes.func, + onCanvasDoubleClick: PropTypes.func, + onCanvasContextMenu: PropTypes.func, + onZoom: PropTypes.func, + onItemDrag: PropTypes.func, + + moveResizeValidator: PropTypes.func, + + itemRenderer: PropTypes.func, + groupRenderer: PropTypes.func, + + className: PropTypes.string, + style: PropTypes.object, + + keys: PropTypes.shape({ + groupIdKey: PropTypes.string, + groupTitleKey: PropTypes.string, + groupLabelKey: PropTypes.string, + groupRightTitleKey: PropTypes.string, + itemIdKey: PropTypes.string, + itemTitleKey: PropTypes.string, + itemDivTitleKey: PropTypes.string, + itemGroupKey: PropTypes.string, + itemTimeStartKey: PropTypes.string, + itemTimeEndKey: PropTypes.string + }), + headerRef: PropTypes.func, + scrollRef: PropTypes.func, + + timeSteps: PropTypes.shape({ + second: PropTypes.number, + minute: PropTypes.number, + hour: PropTypes.number, + day: PropTypes.number, + month: PropTypes.number, + year: PropTypes.number + }), + + defaultTimeStart: PropTypes.object, + defaultTimeEnd: PropTypes.object, + + visibleTimeStart: PropTypes.number, + visibleTimeEnd: PropTypes.number, + onTimeChange: PropTypes.func, + onBoundsChange: PropTypes.func, + + selected: PropTypes.array, + + resizeDetector: PropTypes.shape({ + addListener: PropTypes.func, + removeListener: PropTypes.func + }), + + verticalLineClassNamesForTime: PropTypes.func, + + children: PropTypes.node + } + + static defaultProps = { + sidebarWidth: 150, + rightSidebarWidth: 0, + dragSnap: 1000 * 60 * 15, // 15min + minResizeWidth: 20, + lineHeight: 30, + itemHeightRatio: 0.65, + buffer: 3, + + minZoom: 60 * 60 * 1000, // 1 hour + maxZoom: 5 * 365.24 * 86400 * 1000, // 5 years + + clickTolerance: 3, // how many pixels can we drag for it to be still considered a click? + + canChangeGroup: true, + canMove: true, + canResize: 'right', + useResizeHandle: false, + canSelect: true, + + stackItems: false, + + traditionalZoom: false, + + horizontalLineClassNamesForGroup: null, + + onItemMove: null, + onItemResize: null, + onItemClick: null, + onItemSelect: null, + onItemDeselect: null, + onItemDrag: null, + onCanvasClick: null, + onItemDoubleClick: null, + onItemContextMenu: null, + onZoom: null, + + verticalLineClassNamesForTime: null, + + moveResizeValidator: null, + + dayBackground: null, + + defaultTimeStart: null, + defaultTimeEnd: null, + + itemTouchSendsClick: false, + + style: {}, + className: '', + keys: defaultKeys, + timeSteps: defaultTimeSteps, + headerRef: () => {}, + scrollRef: () => {}, + + // if you pass in visibleTimeStart and visibleTimeEnd, you must also pass onTimeChange(visibleTimeStart, visibleTimeEnd), + // which needs to update the props visibleTimeStart and visibleTimeEnd to the ones passed + visibleTimeStart: null, + visibleTimeEnd: null, + onTimeChange: function( + visibleTimeStart, + visibleTimeEnd, + updateScrollCanvas + ) { + updateScrollCanvas(visibleTimeStart, visibleTimeEnd) + }, + // called when the canvas area of the calendar changes + onBoundsChange: null, + children: null, + + selected: null + } + + static childContextTypes = { + getTimelineContext: PropTypes.func + } + + getChildContext() { + return { + getTimelineContext: () => { + return this.getTimelineContext() + } + } + } + + getTimelineContext = () => { + const { + width, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + } = this.state + + return { + timelineWidth: width, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + } + } + + getTimelineUnit = () => { + const { + width, + visibleTimeStart, + visibleTimeEnd + } = this.state + + const { timeSteps } = this.props + + const zoom = visibleTimeEnd - visibleTimeStart + const minUnit = getMinUnit(zoom, width, timeSteps) + + return minUnit + } + + constructor(props) { + super(props) + + this.getSelected = this.getSelected.bind(this) + this.hasSelectedItem = this.hasSelectedItem.bind(this) + this.isItemSelected= this.isItemSelected.bind(this) + + let visibleTimeStart = null + let visibleTimeEnd = null + + if (this.props.defaultTimeStart && this.props.defaultTimeEnd) { + visibleTimeStart = this.props.defaultTimeStart.valueOf() + visibleTimeEnd = this.props.defaultTimeEnd.valueOf() + } else if (this.props.visibleTimeStart && this.props.visibleTimeEnd) { + visibleTimeStart = this.props.visibleTimeStart + visibleTimeEnd = this.props.visibleTimeEnd + } else { + //throwing an error because neither default or visible time props provided + throw new Error( + 'You must provide either "defaultTimeStart" and "defaultTimeEnd" or "visibleTimeStart" and "visibleTimeEnd" to initialize the Timeline' + ) + } + + const [canvasTimeStart, canvasTimeEnd] = getCanvasBoundariesFromVisibleTime( + visibleTimeStart, + visibleTimeEnd, + props.buffer, + ) + + this.state = { + width: 1000, + visibleTimeStart: visibleTimeStart, + visibleTimeEnd: visibleTimeEnd, + canvasTimeStart: canvasTimeStart, + canvasTimeEnd: canvasTimeEnd, + selectedItem: null, + dragTime: null, + dragGroupTitle: null, + resizeTime: null, + resizingItem: null, + resizingEdge: null + } + + const canvasWidth = getCanvasWidth(this.state.width, props.buffer); + + const { + dimensionItems, + height, + groupHeights, + groupTops + } = stackTimelineItems( + props.items, + props.groups, + canvasWidth, + this.state.canvasTimeStart, + this.state.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + this.state.draggingItem, + this.state.resizingItem, + this.state.dragTime, + this.state.resizingEdge, + this.state.resizeTime, + this.state.newGroupOrder + ) + + /* eslint-disable react/no-direct-mutation-state */ + this.state.dimensionItems = dimensionItems + this.state.height = height + this.state.groupHeights = groupHeights + this.state.groupTops = groupTops + + /* eslint-enable */ + } + + componentDidMount() { + this.resize(this.props) + + if (this.props.resizeDetector && this.props.resizeDetector.addListener) { + this.props.resizeDetector.addListener(this) + } + + windowResizeDetector.addListener(this) + + this.lastTouchDistance = null + } + + componentWillUnmount() { + if (this.props.resizeDetector && this.props.resizeDetector.addListener) { + this.props.resizeDetector.removeListener(this) + } + + windowResizeDetector.removeListener(this) + } + + static getDerivedStateFromProps(nextProps, prevState) { + const { visibleTimeStart, visibleTimeEnd, items, groups } = nextProps + + // This is a gross hack pushing items and groups in to state only to allow + // For the forceUpdate check + let derivedState = { items, groups } + + // if the items or groups have changed we must re-render + const forceUpdate = items !== prevState.items || groups !== prevState.groups + + // We are a controlled component + if (visibleTimeStart && visibleTimeEnd) { + // Get the new canvas position + Object.assign( + derivedState, + calculateScrollCanvas( + visibleTimeStart, + visibleTimeEnd, + forceUpdate, + items, + groups, + nextProps, + prevState + ) + ) + } else if (forceUpdate) { + // Calculate new item stack position as canvas may have changed + const canvasWidth = getCanvasWidth(prevState.width, nextProps.buffer) + Object.assign( + derivedState, + stackTimelineItems( + items, + groups, + canvasWidth, + prevState.canvasTimeStart, + prevState.canvasTimeEnd, + nextProps.keys, + nextProps.lineHeight, + nextProps.itemHeightRatio, + nextProps.stackItems, + prevState.draggingItem, + prevState.resizingItem, + prevState.dragTime, + prevState.resizingEdge, + prevState.resizeTime, + prevState.newGroupOrder + ) + ) + } + + return derivedState + } + + componentDidUpdate(prevProps, prevState) { + const newZoom = this.state.visibleTimeEnd - this.state.visibleTimeStart + const oldZoom = prevState.visibleTimeEnd - prevState.visibleTimeStart + + // are we changing zoom? Report it! + if (this.props.onZoom && newZoom !== oldZoom) { + this.props.onZoom(this.getTimelineContext(), this.getTimelineUnit()) + } + + // The bounds have changed? Report it! + if ( + this.props.onBoundsChange && + this.state.canvasTimeStart !== prevState.canvasTimeStart + ) { + this.props.onBoundsChange( + this.state.canvasTimeStart, + this.state.canvasTimeStart + newZoom * 3 + ) + } + + // Check the scroll is correct + const scrollLeft = Math.round( + this.state.width * + (this.state.visibleTimeStart - this.state.canvasTimeStart) / + newZoom + ) + const componentScrollLeft = Math.round( + prevState.width * + (prevState.visibleTimeStart - prevState.canvasTimeStart) / + oldZoom + ) + + if (componentScrollLeft !== scrollLeft) { + this.scrollComponent.scrollLeft = scrollLeft + this.scrollHeaderRef.scrollLeft = scrollLeft + } + } + + resize = (props = this.props) => { + const { width: containerWidth } = this.container.getBoundingClientRect() + + let width = containerWidth - props.sidebarWidth - props.rightSidebarWidth + const canvasWidth = getCanvasWidth(width, props.buffer) + const { + dimensionItems, + height, + groupHeights, + groupTops + } = stackTimelineItems( + props.items, + props.groups, + canvasWidth, + this.state.canvasTimeStart, + this.state.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + this.state.draggingItem, + this.state.resizingItem, + this.state.dragTime, + this.state.resizingEdge, + this.state.resizeTime, + this.state.newGroupOrder + ) + + // this is needed by dragItem since it uses pageY from the drag events + // if this was in the context of the scrollElement, this would not be necessary + + this.setState({ + width, + dimensionItems, + height, + groupHeights, + groupTops + }) + //initial scroll left is the buffer - 1 (1 is visible area) divided by 2 (2 is the buffer split on the right and left of the timeline) + const scrollLeft = width * ((props.buffer - 1) / 2) + this.scrollComponent.scrollLeft = scrollLeft; + this.scrollHeaderRef.scrollLeft = scrollLeft; + } + + onScroll = scrollX => { + const width = this.state.width + + const canvasTimeStart = this.state.canvasTimeStart + + const zoom = this.state.visibleTimeEnd - this.state.visibleTimeStart + + const visibleTimeStart = canvasTimeStart + zoom * scrollX / width + + if ( + this.state.visibleTimeStart !== visibleTimeStart || + this.state.visibleTimeEnd !== visibleTimeStart + zoom + ) { + this.props.onTimeChange( + visibleTimeStart, + visibleTimeStart + zoom, + this.updateScrollCanvas, + this.getTimelineUnit() + ) + } + } + + // called when the visible time changes + updateScrollCanvas = ( + visibleTimeStart, + visibleTimeEnd, + forceUpdateDimensions, + items = this.props.items, + groups = this.props.groups + ) => { + this.setState( + calculateScrollCanvas( + visibleTimeStart, + visibleTimeEnd, + forceUpdateDimensions, + items, + groups, + this.props, + this.state + ) + ) + } + + handleWheelZoom = (speed, xPosition, deltaY) => { + this.changeZoom(1.0 + speed * deltaY / 500, xPosition / this.state.width) + } + + changeZoom = (scale, offset = 0.5) => { + const { minZoom, maxZoom } = this.props + const oldZoom = this.state.visibleTimeEnd - this.state.visibleTimeStart + const newZoom = Math.min( + Math.max(Math.round(oldZoom * scale), minZoom), + maxZoom + ) // min 1 min, max 20 years + const newVisibleTimeStart = Math.round( + this.state.visibleTimeStart + (oldZoom - newZoom) * offset + ) + + this.props.onTimeChange( + newVisibleTimeStart, + newVisibleTimeStart + newZoom, + this.updateScrollCanvas, + this.getTimelineUnit() + ) + } + + showPeriod = (from, to) => { + let visibleTimeStart = from.valueOf() + let visibleTimeEnd = to.valueOf() + + let zoom = visibleTimeEnd - visibleTimeStart + // can't zoom in more than to show one hour + if (zoom < this.props.minZoom) { + return + } + + this.props.onTimeChange( + visibleTimeStart, + visibleTimeStart + zoom, + this.updateScrollCanvas, + this.getTimelineUnit() + ) + } + + selectItem = (item, clickType, e) => { + if ( + this.isItemSelected(item) || + (this.props.itemTouchSendsClick && clickType === 'touch') + ) { + if (item && this.props.onItemClick) { + const time = this.timeFromItemEvent(e) + this.props.onItemClick(item, e, time) + } + } else { + this.setState({ selectedItem: item }) + if (item && this.props.onItemSelect) { + const time = this.timeFromItemEvent(e) + this.props.onItemSelect(item, e, time) + } else if (item === null && this.props.onItemDeselect) { + this.props.onItemDeselect(e) // this isnt in the docs. Is this function even used? + } + } + } + + doubleClickItem = (item, e) => { + if (this.props.onItemDoubleClick) { + const time = this.timeFromItemEvent(e) + this.props.onItemDoubleClick(item, e, time) + } + } + + contextMenuClickItem = (item, e) => { + if (this.props.onItemContextMenu) { + const time = this.timeFromItemEvent(e) + this.props.onItemContextMenu(item, e, time) + } + } + + // TODO: this is very similar to timeFromItemEvent, aside from which element to get offsets + // from. Look to consolidate the logic for determining coordinate to time + // as well as generalizing how we get time from click on the canvas + getTimeFromRowClickEvent = e => { + const { dragSnap, buffer } = this.props + const { width, canvasTimeStart, canvasTimeEnd } = this.state + // this gives us distance from left of row element, so event is in + // context of the row element, not client or page + const { offsetX } = e.nativeEvent + + let time = calculateTimeForXPosition( + canvasTimeStart, + + canvasTimeEnd, + getCanvasWidth(width, buffer), + offsetX + ) + time = Math.floor(time / dragSnap) * dragSnap + + return time + } + + timeFromItemEvent = e => { + const { width, visibleTimeStart, visibleTimeEnd } = this.state + const { dragSnap } = this.props + + const scrollComponent = this.scrollComponent + const { left: scrollX } = scrollComponent.getBoundingClientRect() + + const xRelativeToTimeline = e.clientX - scrollX + + const relativeItemPosition = xRelativeToTimeline / width + const zoom = visibleTimeEnd - visibleTimeStart + const timeOffset = relativeItemPosition * zoom + + let time = Math.round(visibleTimeStart + timeOffset) + time = Math.floor(time / dragSnap) * dragSnap + + return time + } + + dragItem = (item, dragTime, newGroupOrder) => { + let newGroup = this.props.groups[newGroupOrder] + const keys = this.props.keys + + this.setState({ + draggingItem: item, + dragTime: dragTime, + newGroupOrder: newGroupOrder, + dragGroupTitle: newGroup ? _get(newGroup, keys.groupLabelKey) : '' + }) + + this.updatingItem({ + eventType: 'move', + itemId: item, + time: dragTime, + newGroupOrder + }) + } + + dropItem = (item, dragTime, newGroupOrder) => { + this.setState({ draggingItem: null, dragTime: null, dragGroupTitle: null }) + if (this.props.onItemMove) { + this.props.onItemMove(item, dragTime, newGroupOrder) + } + } + + resizingItem = (item, resizeTime, edge) => { + this.setState({ + resizingItem: item, + resizingEdge: edge, + resizeTime: resizeTime + }) + + this.updatingItem({ + eventType: 'resize', + itemId: item, + time: resizeTime, + edge + }) + } + + resizedItem = (item, resizeTime, edge, timeDelta) => { + this.setState({ resizingItem: null, resizingEdge: null, resizeTime: null }) + if (this.props.onItemResize && timeDelta !== 0) { + this.props.onItemResize(item, resizeTime, edge) + } + } + + updatingItem = ({ eventType, itemId, time, edge, newGroupOrder }) => { + if (this.props.onItemDrag) { + this.props.onItemDrag({ eventType, itemId, time, edge, newGroupOrder }) + } + } + + columns( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + minUnit, + timeSteps, + height + ) { + return ( + + ) + } + + handleRowClick = (e, rowIndex) => { + // shouldnt this be handled by the user, as far as when to deselect an item? + if (this.hasSelectedItem()) { + this.selectItem(null) + } + + if (this.props.onCanvasClick == null) return + + const time = this.getTimeFromRowClickEvent(e) + const groupId = _get( + this.props.groups[rowIndex], + this.props.keys.groupIdKey + ) + this.props.onCanvasClick(groupId, time, e) + } + + handleRowDoubleClick = (e, rowIndex) => { + if (this.props.onCanvasDoubleClick == null) return + + const time = this.getTimeFromRowClickEvent(e) + const groupId = _get( + this.props.groups[rowIndex], + this.props.keys.groupIdKey + ) + this.props.onCanvasDoubleClick(groupId, time, e) + } + + handleScrollContextMenu = (e, rowIndex) => { + if (this.props.onCanvasContextMenu == null) return + + const timePosition = this.getTimeFromRowClickEvent(e) + + const groupId = _get( + this.props.groups[rowIndex], + this.props.keys.groupIdKey + ) + + if (this.props.onCanvasContextMenu) { + e.preventDefault() + this.props.onCanvasContextMenu(groupId, timePosition, e) + } + } + + rows(canvasWidth, groupHeights, groups) { + return ( + + ) + } + + items( + canvasTimeStart, + zoom, + canvasTimeEnd, + canvasWidth, + minUnit, + dimensionItems, + groupHeights, + groupTops + ) { + return ( + + ) + } + + handleHeaderRef = el => { + this.scrollHeaderRef = el + this.props.headerRef(el) + } + + sidebar(height, groupHeights) { + const { sidebarWidth } = this.props + return ( + sidebarWidth && ( + + ) + ) + } + + rightSidebar(height, groupHeights) { + const { rightSidebarWidth } = this.props + return ( + rightSidebarWidth && ( + + ) + ) + } + + /** + * check if child of type TimelineHeader + * refer to for explanation https://github.com/gaearon/react-hot-loader#checking-element-types + */ + isTimelineHeader = (child) => { + if(child.type === undefined) return false + return child.type.secretKey ===TimelineHeaders.secretKey + } + + childrenWithProps( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + dimensionItems, + groupHeights, + groupTops, + height, + visibleTimeStart, + visibleTimeEnd, + minUnit, + timeSteps + ) { + if (!this.props.children) { + return null + } + + // convert to an array and remove the nulls + const childArray = Array.isArray(this.props.children) + ? this.props.children.filter(c => c) + : [this.props.children] + + const childProps = { + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + visibleTimeStart: visibleTimeStart, + visibleTimeEnd: visibleTimeEnd, + dimensionItems, + items: this.props.items, + groups: this.props.groups, + keys: this.props.keys, + groupHeights: groupHeights, + groupTops: groupTops, + selected: this.getSelected(), + height: height, + minUnit: minUnit, + timeSteps: timeSteps + } + + return React.Children.map(childArray, child => { + if (!this.isTimelineHeader(child)) { + return React.cloneElement(child, childProps) + } else { + return null + } + }) + } + + renderHeaders = () => { + if (this.props.children) { + let headerRenderer + React.Children.map(this.props.children, child => { + if (this.isTimelineHeader(child)) { + headerRenderer = child + } + }) + if (headerRenderer) { + return headerRenderer + } + } + return ( + + + + + ) + } + + getSelected() { + return this.state.selectedItem && !this.props.selected + ? [this.state.selectedItem] + : this.props.selected || []; + } + + hasSelectedItem(){ + if(!Array.isArray(this.props.selected)) return !!this.state.selectedItem + return this.props.selected.length > 0 + } + + isItemSelected(itemId){ + const selectedItems = this.getSelected() + return selectedItems.some(i => i === itemId) + } + getScrollElementRef = el => { + this.props.scrollRef(el) + this.scrollComponent = el + } + + render() { + const { + items, + groups, + sidebarWidth, + rightSidebarWidth, + timeSteps, + traditionalZoom, + buffer, + } = this.props + const { + draggingItem, + resizingItem, + width, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + } = this.state + let { dimensionItems, height, groupHeights, groupTops } = this.state + + const zoom = visibleTimeEnd - visibleTimeStart + const canvasWidth = getCanvasWidth(width, buffer) + const minUnit = getMinUnit(zoom, width, timeSteps) + + const isInteractingWithItem = !!draggingItem || !!resizingItem + + if (isInteractingWithItem) { + const stackResults = stackTimelineItems( + items, + groups, + canvasWidth, + this.state.canvasTimeStart, + this.state.canvasTimeEnd, + this.props.keys, + this.props.lineHeight, + this.props.itemHeightRatio, + this.props.stackItems, + this.state.draggingItem, + this.state.resizingItem, + this.state.dragTime, + this.state.resizingEdge, + this.state.resizeTime, + this.state.newGroupOrder + ) + dimensionItems = stackResults.dimensionItems + height = stackResults.height + groupHeights = stackResults.groupHeights + groupTops = stackResults.groupTops + } + + const outerComponentStyle = { + height: `${height}px` + } + + return ( + + + +
(this.container = el)} + className={`react-calendar-timeline ${this.props.className}`} + > + {this.renderHeaders()} +
+ {sidebarWidth > 0 ? this.sidebar(height, groupHeights) : null} + + + {this.columns( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + minUnit, + timeSteps, + height + )} + {this.rows(canvasWidth, groupHeights, groups)} + {this.items( + canvasTimeStart, + zoom, + canvasTimeEnd, + canvasWidth, + minUnit, + dimensionItems, + groupHeights, + groupTops + )} + {this.childrenWithProps( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + dimensionItems, + groupHeights, + groupTops, + height, + visibleTimeStart, + visibleTimeEnd, + minUnit, + timeSteps + )} + + + {rightSidebarWidth > 0 + ? this.rightSidebar(height, groupHeights) + : null} +
+
+
+
+
+ ) + } +} diff --git a/src/lib/Timeline.scss b/src/lib/Timeline.scss index 7fd88e0f5..586b3edf3 100644 --- a/src/lib/Timeline.scss +++ b/src/lib/Timeline.scss @@ -13,10 +13,6 @@ $border-width: 1px; $thick-border-width: 2px; $sidebar-color: #ffffff; $sidebar-background-color: #c52020; -$header-color: #ffffff; -$header-background-color: #c52020; -$lower-header-color: #333333; -$lower-header-background-color: #f0f0f0; $list-item-padding: 0 4px; $weekend: rgba(250, 246, 225, 0.5); @@ -60,17 +56,6 @@ $weekend: rgba(250, 246, 225, 0.5); } } - .rct-header-container { - z-index: 90; - display: flex; - overflow: hidden; - - &.header-sticky { - position: sticky; - position: -webkit-sticky; - } - } - .rct-sidebar { overflow: hidden; white-space: normal; // was set to nowrap in .rct-outer @@ -90,7 +75,7 @@ $weekend: rgba(250, 246, 225, 0.5); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - box-sizing: content-box; + box-sizing: border-box; margin: 0; border-bottom: $border-width solid $border-color; @@ -108,7 +93,7 @@ $weekend: rgba(250, 246, 225, 0.5); .rct-vertical-lines { .rct-vl { position: absolute; - border-right: 1px solid $border-color; + border-left: 1px solid $border-color; z-index: 30; &.rct-vl-first { border-left-width: 2px; @@ -121,10 +106,15 @@ $weekend: rgba(250, 246, 225, 0.5); } .rct-horizontal-lines { + -webkit-user-select: none; + -moz-user-select: -moz-none; + -ms-user-select: none; + user-select: none; + .rct-hl-even, .rct-hl-odd { border-bottom: $border-width solid $border-color; - box-sizing: content-box; + box-sizing: border-box; z-index: 40; } .rct-hl-odd { @@ -142,15 +132,34 @@ $weekend: rgba(250, 246, 225, 0.5); z-index: 51; } - .rct-infolabel { - position: fixed; - left: 100px; - bottom: 50px; - background: rgba(0, 0, 0, 0.5); - color: white; - padding: 10px; - font-size: 20px; - border-radius: 5px; - z-index: 85; + + .rct-dateHeader { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + border-bottom: 1px solid #bbb; + cursor: pointer; + font-size: 14px; + background-color: rgb(240, 240, 240); + border-left: 2px solid #bbb; + } + + .rct-dateHeader-primary { + background-color: initial; + border-left: 1px solid #bbb; + border-right: 1px solid #bbb; + color: #fff + } + + .rct-header-root { + background: #c52020; + border-bottom: 1px solid #bbb; } + + .rct-calendar-header { + border: 1px solid #bbb, + + } + } diff --git a/src/lib/columns/Columns.js b/src/lib/columns/Columns.js index 86bcb82d0..0942984c4 100644 --- a/src/lib/columns/Columns.js +++ b/src/lib/columns/Columns.js @@ -73,7 +73,7 @@ class Columns extends Component { (firstOfType ? ' rct-vl-first' : '') + (minUnit === 'day' || minUnit === 'hour' || minUnit === 'minute' ? ` rct-day-${time.day()} ` - : '') + + : ' ') + classNamesForTime.join(' ') const left = getLeftOffsetFromDate(time.valueOf()) diff --git a/src/lib/default-config.js b/src/lib/default-config.js index d3d6cbc7a..427f229be 100644 --- a/src/lib/default-config.js +++ b/src/lib/default-config.js @@ -1,88 +1,66 @@ -export const defaultKeys = { - groupIdKey: 'id', - groupTitleKey: 'title', - groupRightTitleKey: 'rightTitle', - groupLabelKey: 'title', - itemIdKey: 'id', - itemTitleKey: 'title', - itemDivTitleKey: 'title', - itemGroupKey: 'group', - itemTimeStartKey: 'start_time', - itemTimeEndKey: 'end_time' -} - -export const defaultTimeSteps = { - second: 1, - minute: 1, - hour: 1, - day: 1, - month: 1, - year: 1 -} - -export const defaultHeaderFormats = { - year: { - long: 'YYYY', - mediumLong: 'YYYY', - medium: 'YYYY', - short: 'YY' - }, - month: { - long: 'MMMM YYYY', - mediumLong: 'MMMM', - medium: 'MMMM', - short: 'MM/YY' - }, - day: { - long: 'dddd, LL', - mediumLong: 'dddd, LL', - medium: 'dd D', - short: 'D' - }, - hour: { - long: 'dddd, LL, HH:00', - mediumLong: 'L, HH:00', - medium: 'HH:00', - short: 'HH' - }, - minute: { - long: 'HH:mm', - mediumLong: 'HH:mm', - medium: 'HH:mm', - short: 'mm', - } -} - -//TODO: delete this -export const defaultHeaderLabelFormats = { - yearShort: 'YY', - yearLong: 'YYYY', - monthShort: 'MM/YY', - monthMedium: 'MM/YYYY', - monthMediumLong: 'MMM YYYY', - monthLong: 'MMMM YYYY', - dayShort: 'L', - dayLong: 'dddd, LL', - hourShort: 'HH', - hourMedium: 'HH:00', - hourMediumLong: 'L, HH:00', - hourLong: 'dddd, LL, HH:00', - time: 'LLL' -} - -//TODO: delete this -export const defaultSubHeaderLabelFormats = { - yearShort: 'YY', - yearLong: 'YYYY', - monthShort: 'MM', - monthMedium: 'MMM', - monthLong: 'MMMM', - dayShort: 'D', - dayMedium: 'dd D', - dayMediumLong: 'ddd, Do', - dayLong: 'dddd, Do', - hourShort: 'HH', - hourLong: 'HH:00', - minuteShort: 'mm', - minuteLong: 'HH:mm' -} +export const defaultKeys = { + groupIdKey: 'id', + groupTitleKey: 'title', + groupRightTitleKey: 'rightTitle', + groupLabelKey: 'title', + itemIdKey: 'id', + itemTitleKey: 'title', + itemDivTitleKey: 'title', + itemGroupKey: 'group', + itemTimeStartKey: 'start_time', + itemTimeEndKey: 'end_time' +} + +export const defaultTimeSteps = { + second: 1, + minute: 1, + hour: 1, + day: 1, + month: 1, + year: 1 +} + +export const defaultHeaderFormats = { + year: { + long: 'YYYY', + mediumLong: 'YYYY', + medium: 'YYYY', + short: 'YY' + }, + month: { + long: 'MMMM YYYY', + mediumLong: 'MMMM', + medium: 'MMMM', + short: 'MM/YY' + }, + week: { + long: 'w', + mediumLong: 'w', + medium: 'w', + short: 'w' + }, + day: { + long: 'dddd, LL', + mediumLong: 'dddd, LL', + medium: 'dd D', + short: 'D' + }, + hour: { + long: 'dddd, LL, HH:00', + mediumLong: 'L, HH:00', + medium: 'HH:00', + short: 'HH' + }, + minute: { + long: 'HH:mm', + mediumLong: 'HH:mm', + medium: 'HH:mm', + short: 'mm', + }, + second: { + "long": 'mm:ss', + mediumLong: 'mm:ss', + medium: 'mm:ss', + "short": 'ss' + } +} diff --git a/src/lib/headers/CustomDateHeader.js b/src/lib/headers/CustomDateHeader.js new file mode 100644 index 000000000..860f4d411 --- /dev/null +++ b/src/lib/headers/CustomDateHeader.js @@ -0,0 +1,45 @@ +import React from 'react' +import Interval from './Interval' +export function CustomDateHeader({ + headerContext: { intervals, unit }, + getRootProps, + getIntervalProps, + showPeriod, + data: { + style, + intervalRenderer, + className, + getLabelFormat, + unitProp, + headerData + } +}) { + return ( +
+ {intervals.map(interval => { + const intervalText = getLabelFormat( + [interval.startTime, interval.endTime], + unit, + interval.labelWidth + ) + return ( + + ) + })} +
+ ) +} diff --git a/src/lib/headers/CustomHeader.js b/src/lib/headers/CustomHeader.js index b1cc46103..2d87e524f 100644 --- a/src/lib/headers/CustomHeader.js +++ b/src/lib/headers/CustomHeader.js @@ -1,247 +1,239 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { TimelineHeadersConsumer } from './HeadersContext' -import { TimelineStateConsumer } from '../timeline/TimelineStateContext' -import { iterateTimes, calculateXPositionForTime } from '../utility/calendar' - -export class CustomHeader extends React.Component { - static propTypes = { - //component props - children: PropTypes.func.isRequired, - unit: PropTypes.string.isRequired, - timeSteps: PropTypes.object.isRequired, - //Timeline context - visibleTimeStart: PropTypes.number.isRequired, - visibleTimeEnd: PropTypes.number.isRequired, - canvasTimeStart: PropTypes.number.isRequired, - canvasTimeEnd: PropTypes.number.isRequired, - canvasWidth: PropTypes.number.isRequired, - showPeriod: PropTypes.func.isRequired, - props: PropTypes.object, - getLeftOffsetFromDate: PropTypes.func.isRequired, - } - constructor(props) { - super(props) - const { - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - unit, - timeSteps, - showPeriod, - getLeftOffsetFromDate, - } = props - const ratio = this.calculateRatio( - canvasWidth, - canvasTimeEnd, - canvasTimeStart - ) - const intervals = this.getHeaderIntervals({ - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - unit, - timeSteps, - showPeriod, - getLeftOffsetFromDate, - }) - - this.state = { - intervals, - ratio - } - } - - shouldComponentUpdate(nextProps) { - if ( - nextProps.canvasTimeStart !== this.props.canvasTimeStart || - nextProps.canvasTimeEnd !== this.props.canvasTimeEnd || - nextProps.canvasWidth !== this.props.canvasWidth || - nextProps.unit !== this.props.unit || - nextProps.timeSteps !== this.props.timeSteps || - nextProps.showPeriod !== this.props.showPeriod || - nextProps.children !== this.props.children - ) { - return true - } - return false - } - - componentWillReceiveProps(nextProps) { - if ( - nextProps.canvasTimeStart !== this.props.canvasTimeStart || - nextProps.canvasTimeEnd !== this.props.canvasTimeEnd || - nextProps.canvasWidth !== this.props.canvasWidth || - nextProps.unit !== this.props.unit || - nextProps.timeSteps !== this.props.timeSteps || - nextProps.showPeriod !== this.props.showPeriod - ) { - const { - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - unit, - timeSteps, - showPeriod, - getLeftOffsetFromDate, - } = nextProps - const ratio = this.calculateRatio( - canvasWidth, - canvasTimeEnd, - canvasTimeStart - ) - const intervals = this.getHeaderIntervals({ - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - unit, - timeSteps, - showPeriod, - getLeftOffsetFromDate, - }) - - this.setState({ intervals, ratio }) - } - } - - getHeaderIntervals = ({ - canvasTimeStart, - canvasTimeEnd, - unit, - timeSteps, - getLeftOffsetFromDate, - }) => { - const intervals = [] - iterateTimes( - canvasTimeStart, - canvasTimeEnd, - unit, - timeSteps, - (startTime, endTime) => { - const left = getLeftOffsetFromDate(startTime.valueOf()) - const right = getLeftOffsetFromDate(endTime.valueOf()) - const width = right-left - intervals.push({ - startTime, - endTime, - labelWidth: width, - left, - }) - } - ) - return intervals - } - - rootProps = { - style: { - position: 'relative' - } - } - - getRootProps = (props = {}) => { - const { style } = props - return { - style: Object.assign({}, style ? style : {}, { - position: 'relative', - width: this.props.canvasWidth - }) - } - } - - getIntervalProps = (props = {}) => { - const { interval, style } = props - if (!interval) throw new Error("you should provide interval to the prop getter") - const { startTime, labelWidth, left } = interval - return { - style: this.getIntervalStyle({ - style, - startTime, - labelWidth, - canvasTimeStart: this.props.canvasTimeStart, - unit: this.props.unit, - ratio: this.state.ratio, - left, - }), - key: `label-${startTime.valueOf()}` - } - } - - calculateRatio(canvasWidth, canvasTimeEnd, canvasTimeStart) { - return canvasWidth / (canvasTimeEnd - canvasTimeStart) - } - - getIntervalStyle = ({ startTime, canvasTimeStart, ratio, unit, left,labelWidth, style, }) => { - - return { - ...style, - left, - width: labelWidth, - position: 'absolute' - } - } - - getStateAndHelpers = () => { - const { - canvasTimeStart, - canvasTimeEnd, - unit, - showPeriod, - timelineWidth, - visibleTimeStart, - visibleTimeEnd - } = this.props - //TODO: only evaluate on changing params - return { - timelineContext: { - timelineWidth, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd - }, - headerContext: { - unit, - intervals: this.state.intervals - }, - getRootProps: this.getRootProps, - getIntervalProps: this.getIntervalProps, - showPeriod - } - } - - render() { - const props = this.getStateAndHelpers() - return this.props.children(props, this.props.props) - } -} - -const CustomHeaderWrapper = ({ children, unit, props }) => ( - - {({ getTimelineState, showPeriod, getLeftOffsetFromDate }) => { - const timelineState = getTimelineState() - return ( - - {({ timeSteps }) => ( - - )} - - ) - }} - -) - -CustomHeaderWrapper.propTypes = { - children: PropTypes.func.isRequired, - unit: PropTypes.string, - props: PropTypes.object, -} - -export default CustomHeaderWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { TimelineHeadersConsumer } from './HeadersContext' +import { TimelineStateConsumer } from '../timeline/TimelineStateContext' +import { iterateTimes, calculateXPositionForTime } from '../utility/calendar' + +export class CustomHeader extends React.Component { + static propTypes = { + //component props + children: PropTypes.func.isRequired, + unit: PropTypes.string.isRequired, + //Timeline context + timeSteps: PropTypes.object.isRequired, + visibleTimeStart: PropTypes.number.isRequired, + visibleTimeEnd: PropTypes.number.isRequired, + canvasTimeStart: PropTypes.number.isRequired, + canvasTimeEnd: PropTypes.number.isRequired, + canvasWidth: PropTypes.number.isRequired, + showPeriod: PropTypes.func.isRequired, + headerData: PropTypes.object, + getLeftOffsetFromDate: PropTypes.func.isRequired, + height: PropTypes.number.isRequired, + } + constructor(props) { + super(props) + const { + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + unit, + timeSteps, + showPeriod, + getLeftOffsetFromDate + } = props + + const intervals = this.getHeaderIntervals({ + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + unit, + timeSteps, + showPeriod, + getLeftOffsetFromDate + }) + + this.state = { + intervals + } + } + + shouldComponentUpdate(nextProps) { + if ( + nextProps.canvasTimeStart !== this.props.canvasTimeStart || + nextProps.canvasTimeEnd !== this.props.canvasTimeEnd || + nextProps.canvasWidth !== this.props.canvasWidth || + nextProps.unit !== this.props.unit || + nextProps.timeSteps !== this.props.timeSteps || + nextProps.showPeriod !== this.props.showPeriod || + nextProps.children !== this.props.children || + nextProps.headerData !== this.props.headerData + ) { + return true + } + return false + } + + componentWillReceiveProps(nextProps) { + if ( + nextProps.canvasTimeStart !== this.props.canvasTimeStart || + nextProps.canvasTimeEnd !== this.props.canvasTimeEnd || + nextProps.canvasWidth !== this.props.canvasWidth || + nextProps.unit !== this.props.unit || + nextProps.timeSteps !== this.props.timeSteps || + nextProps.showPeriod !== this.props.showPeriod + ) { + const { + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + unit, + timeSteps, + showPeriod, + getLeftOffsetFromDate + } = nextProps + + const intervals = this.getHeaderIntervals({ + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + unit, + timeSteps, + showPeriod, + getLeftOffsetFromDate + }) + + this.setState({ intervals }) + } + } + + getHeaderIntervals = ({ + canvasTimeStart, + canvasTimeEnd, + unit, + timeSteps, + getLeftOffsetFromDate + }) => { + const intervals = [] + iterateTimes( + canvasTimeStart, + canvasTimeEnd, + unit, + timeSteps, + (startTime, endTime) => { + const left = getLeftOffsetFromDate(startTime.valueOf()) + const right = getLeftOffsetFromDate(endTime.valueOf()) + const width = right - left + intervals.push({ + startTime, + endTime, + labelWidth: width, + left + }) + } + ) + return intervals + } + + getRootProps = (props = {}) => { + const { style } = props + return { + style: Object.assign({}, style ? style : {}, { + position: 'relative', + width: this.props.canvasWidth, + height: this.props.height, + }) + } + } + + getIntervalProps = (props = {}) => { + const { interval, style } = props + if (!interval) + throw new Error('you should provide interval to the prop getter') + const { startTime, labelWidth, left } = interval + return { + style: this.getIntervalStyle({ + style, + startTime, + labelWidth, + canvasTimeStart: this.props.canvasTimeStart, + unit: this.props.unit, + left + }), + key: `label-${startTime.valueOf()}` + } + } + + getIntervalStyle = ({ left, labelWidth, style }) => { + return { + ...style, + left, + width: labelWidth, + position: 'absolute' + } + } + + getStateAndHelpers = () => { + const { + canvasTimeStart, + canvasTimeEnd, + unit, + showPeriod, + timelineWidth, + visibleTimeStart, + visibleTimeEnd, + headerData, + } = this.props + //TODO: only evaluate on changing params + return { + timelineContext: { + timelineWidth, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + }, + headerContext: { + unit, + intervals: this.state.intervals + }, + getRootProps: this.getRootProps, + getIntervalProps: this.getIntervalProps, + showPeriod, + data: headerData, + } + } + + render() { + const props = this.getStateAndHelpers() + const Renderer = this.props.children + return + } +} + +const CustomHeaderWrapper = ({ children, unit, headerData, height }) => ( + + {({ getTimelineState, showPeriod, getLeftOffsetFromDate }) => { + const timelineState = getTimelineState() + return ( + + {({ timeSteps }) => ( + + )} + + ) + }} + +) + +CustomHeaderWrapper.propTypes = { + children: PropTypes.func.isRequired, + unit: PropTypes.string, + headerData: PropTypes.object, + height: PropTypes.number, +} + +CustomHeaderWrapper.defaultProps = { + height: 30, +} + +export default CustomHeaderWrapper diff --git a/src/lib/headers/DateHeader.js b/src/lib/headers/DateHeader.js index d5a1d3962..aecdeeece 100644 --- a/src/lib/headers/DateHeader.js +++ b/src/lib/headers/DateHeader.js @@ -1,173 +1,160 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { TimelineStateConsumer } from '../timeline/TimelineStateContext' -import CustomHeader from './CustomHeader' -import { getNextUnit } from '../utility/calendar' -import { defaultHeaderFormats } from '../default-config' -import Interval from './Interval' - -class DateHeader extends React.PureComponent { - static propTypes = { - primaryHeader: PropTypes.bool, - secondaryHeader: PropTypes.bool, - unit: PropTypes.string, - style: PropTypes.object, - className: PropTypes.string, - timelineUnit: PropTypes.string, - labelFormat: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)), - PropTypes.string - ]).isRequired, - intervalRenderer: PropTypes.func, - props: PropTypes.object, - } - - getHeaderUnit = () => { - if (this.props.unit) { - return this.props.unit - } else if (this.props.primaryHeader) { - return getNextUnit(this.props.timelineUnit) - } - return this.props.timelineUnit - } - - render() { - const unit = this.getHeaderUnit() - const {props} = this.props; - return ( - - {({ - headerContext: { intervals }, - getRootProps, - getIntervalProps, - showPeriod - }, props) => { - const unit = this.getHeaderUnit() - - return ( -
- {intervals.map(interval => { - const intervalText = this.getLabelFormat( - [interval.startTime, interval.endTime], - unit, - interval.labelWidth - ) - return ( - - ) - })} -
- ) - }} -
- ) - } - - getRootStyle = () => { - return { - height: 30, - ...this.props.style - } - } - - getLabelFormat(interval, unit, labelWidth) { - const { labelFormat } = this.props - if (typeof labelFormat === 'string') { - const startTime = interval[0] - return startTime.format(labelFormat) - } else if (typeof labelFormat === 'object') { - return formatLabel(interval, unit, labelWidth, labelFormat) - } else if (typeof labelFormat === 'function') { - return labelFormat(interval, unit, labelWidth) - } else { - throw new Error('labelFormat should be function, object or string') - } - } -} - -const DateHeaderWrapper = ({ - primaryHeader, - secondaryHeader, - unit, - labelFormat, - style, - className, - intervalRenderer, - props, -}) => ( - - {({ getTimelineState }) => { - const timelineState = getTimelineState() - return ( - - ) - }} - -) - -DateHeaderWrapper.propTypes = { - style: PropTypes.object, - className: PropTypes.string, - primaryHeader: PropTypes.bool, - secondaryHeader: PropTypes.bool, - unit: PropTypes.string, - labelFormat: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)), - PropTypes.string - ]), - intervalRenderer: PropTypes.func, - props: PropTypes.object, -} - -DateHeaderWrapper.defaultProps = { - secondaryHeader: true, - labelFormat: formatLabel -} - -function formatLabel( - [timeStart, timeEnd], - unit, - labelWidth, - formatOptions = defaultHeaderFormats -) { - let format - if (labelWidth >= 150) { - format = formatOptions[unit]['long'] - } else if (labelWidth >= 100) { - format = formatOptions[unit]['mediumLong'] - } else if (labelWidth >= 50) { - format = formatOptions[unit]['medium'] - } else { - format = formatOptions[unit]['short'] - } - return timeStart.format(format) -} - -export default DateHeaderWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { TimelineStateConsumer } from '../timeline/TimelineStateContext' +import CustomHeader from './CustomHeader' +import { getNextUnit } from '../utility/calendar' +import { defaultHeaderFormats } from '../default-config' +import memoize from 'memoize-one' +import { CustomDateHeader } from './CustomDateHeader' + +class DateHeader extends React.Component { + static propTypes = { + unit: PropTypes.string, + style: PropTypes.object, + className: PropTypes.string, + timelineUnit: PropTypes.string, + labelFormat: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)), + PropTypes.string + ]).isRequired, + intervalRenderer: PropTypes.func, + headerData: PropTypes.object, + height: PropTypes.number + } + + getHeaderUnit = () => { + if (this.props.unit === 'primaryHeader') { + return getNextUnit(this.props.timelineUnit) + } else if (this.props.unit) { + return this.props.unit + } + return this.props.timelineUnit + } + + getRootStyle = memoize(style => { + return { + height: 30, + ...style + } + }) + + getLabelFormat = (interval, unit, labelWidth) => { + const { labelFormat } = this.props + if (typeof labelFormat === 'string') { + const startTime = interval[0] + return startTime.format(labelFormat) + } else if (typeof labelFormat === 'function') { + return labelFormat(interval, unit, labelWidth) + } else { + throw new Error('labelFormat should be function or string') + } + } + + getHeaderData = memoize( + ( + intervalRenderer, + style, + className, + getLabelFormat, + unitProp, + headerData + ) => { + return { + intervalRenderer, + style, + className, + getLabelFormat, + unitProp, + headerData + } + } + ) + + render() { + const unit = this.getHeaderUnit() + const { headerData, height } = this.props + return ( + + ) + } +} + +const DateHeaderWrapper = ({ + unit, + labelFormat, + style, + className, + intervalRenderer, + headerData, + height +}) => ( + + {({ getTimelineState }) => { + const timelineState = getTimelineState() + return ( + + ) + }} + +) + +DateHeaderWrapper.propTypes = { + style: PropTypes.object, + className: PropTypes.string, + unit: PropTypes.string, + labelFormat: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)), + PropTypes.string + ]), + intervalRenderer: PropTypes.func, + headerData: PropTypes.object, + height: PropTypes.number +} + +DateHeaderWrapper.defaultProps = { + labelFormat: formatLabel +} + +function formatLabel( + [timeStart, timeEnd], + unit, + labelWidth, + formatOptions = defaultHeaderFormats +) { + let format + if (labelWidth >= 150) { + format = formatOptions[unit]['long'] + } else if (labelWidth >= 100) { + format = formatOptions[unit]['mediumLong'] + } else if (labelWidth >= 50) { + format = formatOptions[unit]['medium'] + } else { + format = formatOptions[unit]['short'] + } + return timeStart.format(format) +} + +export default DateHeaderWrapper diff --git a/src/lib/headers/Interval.js b/src/lib/headers/Interval.js index 7da76f3a7..4af4d83cf 100644 --- a/src/lib/headers/Interval.js +++ b/src/lib/headers/Interval.js @@ -1,84 +1,69 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { getNextUnit } from '../utility/calendar' -import { composeEvents } from '../utility/events' - -class Interval extends React.PureComponent { - static propTypes = { - intervalRenderer: PropTypes.func, - unit: PropTypes.string.isRequired, - interval: PropTypes.object.isRequired, - showPeriod: PropTypes.func.isRequired, - intervalText: PropTypes.string.isRequired, - primaryHeader: PropTypes.bool.isRequired, - secondaryHeader: PropTypes.bool.isRequired, - getIntervalProps: PropTypes.func.isRequired, - props: PropTypes.object - } - - getIntervalStyle = () => { - return { - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - backgroundColor: - this.props.secondaryHeader && !this.props.primaryHeader - ? 'rgb(240, 240, 240)' - : 'initial', - height: '100%', - borderLeft: this.props.primaryHeader - ? '1px solid #bbb' - : '2px solid #bbb', - borderRight: this.props.primaryHeader ? '1px solid #bbb' : 'none', - borderBottom: '1px solid #bbb', - color: this.props.primaryHeader ? '#fff' : 'initial', - cursor: 'pointer', - fontSize: '14px' - } - } - - onIntervalClick = () => { - const { primaryHeader, interval, unit, showPeriod } = this.props - if (primaryHeader) { - const nextUnit = getNextUnit(unit) - const newStartTime = interval.startTime.clone().startOf(nextUnit) - const newEndTime = interval.startTime.clone().endOf(nextUnit) - showPeriod(newStartTime, newEndTime) - } else { - showPeriod(interval.startTime, interval.endTime) - } - } - - getIntervalProps = (props={}) => { - return { - ...this.props.getIntervalProps({ - interval: this.props.interval, - ...props - }), - onClick: composeEvents(this.onIntervalClick, props.onClick) - } - } - - render() { - const { intervalText, interval, intervalRenderer, props } = this.props - if (intervalRenderer) - return intervalRenderer({ - getIntervalProps: this.getIntervalProps, - intervalContext: { - interval, - intervalText - } - }, props) - return ( -
- {intervalText} -
- ) - } -} - -export default Interval +import React from 'react' +import PropTypes from 'prop-types' +import { getNextUnit } from '../utility/calendar' +import { composeEvents } from '../utility/events' + +class Interval extends React.PureComponent { + static propTypes = { + intervalRenderer: PropTypes.func, + unit: PropTypes.string.isRequired, + interval: PropTypes.object.isRequired, + showPeriod: PropTypes.func.isRequired, + intervalText: PropTypes.string.isRequired, + primaryHeader: PropTypes.bool.isRequired, + getIntervalProps: PropTypes.func.isRequired, + headerData: PropTypes.object + } + + onIntervalClick = () => { + const { primaryHeader, interval, unit, showPeriod } = this.props + if (primaryHeader) { + const nextUnit = getNextUnit(unit) + const newStartTime = interval.startTime.clone().startOf(nextUnit) + const newEndTime = interval.startTime.clone().endOf(nextUnit) + showPeriod(newStartTime, newEndTime) + } else { + showPeriod(interval.startTime, interval.endTime) + } + } + + getIntervalProps = (props = {}) => { + return { + ...this.props.getIntervalProps({ + interval: this.props.interval, + ...props + }), + onClick: composeEvents(this.onIntervalClick, props.onClick) + } + } + + render() { + const { intervalText, interval, intervalRenderer, headerData } = this.props + const Renderer = intervalRenderer + if (Renderer) { + return ( + + ) + } + + return ( +
+ {intervalText} +
+ ) + } +} + +export default Interval diff --git a/src/lib/headers/ItemHeader.js b/src/lib/headers/ItemHeader.js index e97137db0..95ea4958b 100644 --- a/src/lib/headers/ItemHeader.js +++ b/src/lib/headers/ItemHeader.js @@ -1,238 +1,238 @@ -import React from 'react' -import { TimelineStateConsumer } from '../timeline/TimelineStateContext' -import CustomHeader from './CustomHeader' -import PropTypes from 'prop-types' -import { - getItemDimensions, - stackGroup -} from '../utility/calendar' -import { _get } from '../utility/generic' - -const passThroughPropTypes = { - style: PropTypes.object, - className: PropTypes.string, - props: PropTypes.object, - items: PropTypes.arrayOf(PropTypes.object).isRequired, - itemHeight: PropTypes.number, - stackItems: PropTypes.bool, - itemRenderer: PropTypes.func, -} - -class ItemHeader extends React.PureComponent { - static propTypes = { - visibleTimeStart: PropTypes.number.isRequired, - visibleTimeEnd: PropTypes.number.isRequired, - canvasTimeStart: PropTypes.number.isRequired, - canvasTimeEnd: PropTypes.number.isRequired, - canvasWidth: PropTypes.number.isRequired, - keys: PropTypes.object.isRequired, - ...passThroughPropTypes - } - - static defaultProps = { - itemHeight: 30, - stackItems: false, - itemRenderer: ({ item, getRootProps }) => { - return ( -
- {item.title} -
- ) - } - } - - getStateAndHelpers = (props, item, itemDimensions) => { - const { - canvasWidth: timelineWidth, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd, - itemHeight - } = props - return { - timelineContext: { - timelineWidth, - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd - }, - item, - itemContext: { - dimensions: itemDimensions, - width: itemDimensions.width - }, - itemHeight - } - } - - render() { - const { - keys, - items, - itemHeight, - itemRenderer, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - stackItems - } = this.props - const itemDimensions = items.map(item => { - return getItemDimensions({ - item, - keys, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - groupOrders: {}, - lineHeight: itemHeight, - itemHeightRatio: 1 - }) - }) - - const { groupHeight } = stackGroup( - itemDimensions, - stackItems, - itemHeight, - 0 - ) - const height = Math.max(itemHeight, groupHeight) - - return ( - - {({ getRootProps }) => { - return ( -
- {items.map(item => { - const itemId = _get(item, keys.itemIdKey) - const dimensions = itemDimensions.find( - itemDimension => itemDimension.id === itemId - ).dimensions - return ( - - ) - })} -
- ) - }} -
- ) - } - - getRootStyles(height) { - return { - ...this.props.style, - height - } - } -} - -class Item extends React.PureComponent { - static propTypes = { - item: PropTypes.object.isRequired, - timelineContext: PropTypes.shape({ - timelineWidth: PropTypes.number, - visibleTimeStart: PropTypes.number, - visibleTimeEnd: PropTypes.number, - canvasTimeStart: PropTypes.number, - canvasTimeEnd: PropTypes.number - }).isRequired, - itemContext: PropTypes.shape({ - dimensions: PropTypes.object, - width: PropTypes.number - }).isRequired, - itemRenderer: passThroughPropTypes['itemRenderer'], - itemHeight: passThroughPropTypes['itemHeight'], - props: PropTypes.object, - } - - getStyles = (style = {}, dimensions, itemHeight) => { - return { - position: 'absolute', - left: dimensions.left, - top: dimensions.top, - width: dimensions.width, - height: itemHeight, - ...style - } - } - - getRootProps = (props = {}) => { - const { style, ...rest } = props - return { - style: this.getStyles( - style, - this.props.itemContext.dimensions, - this.props.itemHeight - ), - rest - } - } - - render() { - const { item, timelineContext, itemContext, props } = this.props - return this.props.itemRenderer({ - item, - timelineContext, - itemContext, - getRootProps: this.getRootProps, - props, - }) - } -} - -const ItemHeaderWrapper = ({ - style, - className, - props, - items, - stackItems, - itemHeight, - itemRenderer -}) => ( - - {({ getTimelineState }) => { - const timelineState = getTimelineState() - return ( - - ) - }} - -) - -ItemHeaderWrapper.propTypes = { - ...passThroughPropTypes -} - -export default ItemHeaderWrapper +import React from 'react' +import { TimelineStateConsumer } from '../timeline/TimelineStateContext' +import CustomHeader from './CustomHeader' +import PropTypes from 'prop-types' +import { + getItemDimensions, + stackGroup +} from '../utility/calendar' +import { _get } from '../utility/generic' + +const passThroughPropTypes = { + style: PropTypes.object, + className: PropTypes.string, + props: PropTypes.object, + items: PropTypes.arrayOf(PropTypes.object).isRequired, + itemHeight: PropTypes.number, + stackItems: PropTypes.bool, + itemRenderer: PropTypes.func, +} + +class ItemHeader extends React.PureComponent { + static propTypes = { + visibleTimeStart: PropTypes.number.isRequired, + visibleTimeEnd: PropTypes.number.isRequired, + canvasTimeStart: PropTypes.number.isRequired, + canvasTimeEnd: PropTypes.number.isRequired, + canvasWidth: PropTypes.number.isRequired, + keys: PropTypes.object.isRequired, + ...passThroughPropTypes + } + + static defaultProps = { + itemHeight: 30, + stackItems: false, + itemRenderer: ({ item, getRootProps }) => { + return ( +
+ {item.title} +
+ ) + } + } + + getStateAndHelpers = (props, item, itemDimensions) => { + const { + canvasWidth: timelineWidth, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd, + itemHeight + } = props + return { + timelineContext: { + timelineWidth, + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd + }, + item, + itemContext: { + dimensions: itemDimensions, + width: itemDimensions.width + }, + itemHeight + } + } + + render() { + const { + keys, + items, + itemHeight, + itemRenderer, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + stackItems + } = this.props + const itemDimensions = items.map(item => { + return getItemDimensions({ + item, + keys, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + groupOrders: {}, + lineHeight: itemHeight, + itemHeightRatio: 1 + }) + }) + + const { groupHeight } = stackGroup( + itemDimensions, + stackItems, + itemHeight, + 0 + ) + const height = Math.max(itemHeight, groupHeight) + + return ( + + {({ getRootProps }) => { + return ( +
+ {items.map(item => { + const itemId = _get(item, keys.itemIdKey) + const dimensions = itemDimensions.find( + itemDimension => itemDimension.id === itemId + ).dimensions + return ( + + ) + })} +
+ ) + }} +
+ ) + } + + getRootStyles(height) { + return { + ...this.props.style, + height + } + } +} + +class Item extends React.PureComponent { + static propTypes = { + item: PropTypes.object.isRequired, + timelineContext: PropTypes.shape({ + timelineWidth: PropTypes.number, + visibleTimeStart: PropTypes.number, + visibleTimeEnd: PropTypes.number, + canvasTimeStart: PropTypes.number, + canvasTimeEnd: PropTypes.number + }).isRequired, + itemContext: PropTypes.shape({ + dimensions: PropTypes.object, + width: PropTypes.number + }).isRequired, + itemRenderer: passThroughPropTypes['itemRenderer'], + itemHeight: passThroughPropTypes['itemHeight'], + props: PropTypes.object, + } + + getStyles = (style = {}, dimensions, itemHeight) => { + return { + position: 'absolute', + left: dimensions.left, + top: dimensions.top, + width: dimensions.width, + height: itemHeight, + ...style + } + } + + getRootProps = (props = {}) => { + const { style, ...rest } = props + return { + style: this.getStyles( + style, + this.props.itemContext.dimensions, + this.props.itemHeight + ), + rest + } + } + + render() { + const { item, timelineContext, itemContext, props } = this.props + return this.props.itemRenderer({ + item, + timelineContext, + itemContext, + getRootProps: this.getRootProps, + props, + }) + } +} + +const ItemHeaderWrapper = ({ + style, + className, + props, + items, + stackItems, + itemHeight, + itemRenderer +}) => ( + + {({ getTimelineState }) => { + const timelineState = getTimelineState() + return ( + + ) + }} + +) + +ItemHeaderWrapper.propTypes = { + ...passThroughPropTypes +} + +export default ItemHeaderWrapper diff --git a/src/lib/headers/SidebarHeader.js b/src/lib/headers/SidebarHeader.js index 3ad4aa603..5087e538c 100644 --- a/src/lib/headers/SidebarHeader.js +++ b/src/lib/headers/SidebarHeader.js @@ -9,7 +9,7 @@ class SidebarHeader extends React.PureComponent { rightSidebarWidth: PropTypes.number, leftSidebarWidth: PropTypes.number.isRequired, variant: PropTypes.string, - props: PropTypes.object + headerData: PropTypes.object } getRootProps = (props = {}) => { @@ -20,25 +20,27 @@ class SidebarHeader extends React.PureComponent { : this.props.leftSidebarWidth return { style: { + ...style, width, - ...style } } } getStateAndHelpers = () => { return { - getRootProps: this.getRootProps + getRootProps: this.getRootProps, + data: this.props.headerData, } } render() { const props = this.getStateAndHelpers() - return this.props.children(props, this.props.props) + const Renderer = this.props.children + return } } -const SidebarWrapper = ({ children, variant, props }) => ( +const SidebarWrapper = ({ children, variant, headerData }) => ( {({ leftSidebarWidth, rightSidebarWidth }) => { return ( @@ -47,7 +49,7 @@ const SidebarWrapper = ({ children, variant, props }) => ( rightSidebarWidth={rightSidebarWidth} children={children} variant={variant} - props={props} + headerData={headerData} /> ) }} @@ -57,7 +59,7 @@ const SidebarWrapper = ({ children, variant, props }) => ( SidebarWrapper.propTypes = { children: PropTypes.func.isRequired, variant: PropTypes.string, - props: PropTypes.object + headerData: PropTypes.object } SidebarWrapper.defaultProps = { @@ -65,4 +67,6 @@ SidebarWrapper.defaultProps = { children: ({ getRootProps }) =>
} +SidebarWrapper.secretKey = "SidebarHeader" + export default SidebarWrapper diff --git a/src/lib/headers/TimelineHeaders.js b/src/lib/headers/TimelineHeaders.js index 080513253..882780efa 100644 --- a/src/lib/headers/TimelineHeaders.js +++ b/src/lib/headers/TimelineHeaders.js @@ -1,19 +1,20 @@ import React from 'react' +import classNames from 'classnames' import { TimelineHeadersConsumer } from './HeadersContext' import PropTypes from 'prop-types' import SidebarHeader from './SidebarHeader' -import { RIGHT_VARIANT, LEFT_VARIANT } from './constants' -import { TimelineStateConsumer } from '../timeline/TimelineStateContext'; -class TimelineHeaders extends React.PureComponent { +import { RIGHT_VARIANT } from './constants' +class TimelineHeaders extends React.Component { static propTypes = { registerScroll: PropTypes.func.isRequired, leftSidebarWidth: PropTypes.number.isRequired, rightSidebarWidth: PropTypes.number.isRequired, style: PropTypes.object, + children: PropTypes.node, className: PropTypes.string, calendarHeaderStyle: PropTypes.object, calendarHeaderClassName: PropTypes.string, - width: PropTypes.number.isRequired + headerRef: PropTypes.func } constructor(props) { @@ -22,11 +23,9 @@ class TimelineHeaders extends React.PureComponent { getRootStyle = () => { return { - background: '#c52020', - borderBottom: '1px solid #bbb', ...this.props.style, display: 'flex', - width: 'max-content' + width: '100%' } } @@ -37,13 +36,27 @@ class TimelineHeaders extends React.PureComponent { calendarHeaderStyle } = this.props return { - border: '1px solid #bbb', ...calendarHeaderStyle, overflow: 'hidden', - width: this.props.width + width: `calc(100% - ${leftSidebarWidth + rightSidebarWidth}px)` } } + handleRootRef = element => { + if (this.props.headerRef) { + this.props.headerRef(element) + } + } + + /** + * check if child of type SidebarHeader + * refer to for explanation https://github.com/gaearon/react-hot-loader#checking-element-types + */ + isSidebarHeader = (child) => { + if(child.type === undefined) return false + return child.type.secretKey ===SidebarHeader.secretKey + } + render() { let rightSidebarHeader let leftSidebarHeader @@ -52,27 +65,37 @@ class TimelineHeaders extends React.PureComponent { ? this.props.children.filter(c => c) : [this.props.children] React.Children.map(children, child => { - if ( - child.type === SidebarHeader && - child.props.variant === RIGHT_VARIANT - ) { - rightSidebarHeader = child - } else if ( - child.type === SidebarHeader && - child.props.variant === LEFT_VARIANT - ) { - leftSidebarHeader = child + if (this.isSidebarHeader(child)) { + if (child.props.variant === RIGHT_VARIANT) { + rightSidebarHeader = child + } else { + leftSidebarHeader = child + } } else { calendarHeaders.push(child) } }) + if (!leftSidebarHeader) { + leftSidebarHeader = + } + if (!rightSidebarHeader && this.props.rightSidebarWidth) { + rightSidebarHeader = + } return ( -
+
{leftSidebarHeader}
{calendarHeaders} @@ -90,37 +113,33 @@ const TimelineHeadersWrapper = ({ calendarHeaderStyle, calendarHeaderClassName }) => ( - - {({ getTimelineState, showPeriod }) => { - const state = getTimelineState() + + {({ leftSidebarWidth, rightSidebarWidth, registerScroll }) => { return ( - - {({ leftSidebarWidth, rightSidebarWidth, registerScroll }) => { - return ( - - ) - }} - + + {children} + ) }} - + ) TimelineHeadersWrapper.propTypes = { style: PropTypes.object, + children: PropTypes.node, className: PropTypes.string, calendarHeaderStyle: PropTypes.object, calendarHeaderClassName: PropTypes.string } +TimelineHeadersWrapper.secretKey = "TimelineHeaders" + export default TimelineHeadersWrapper diff --git a/src/lib/interaction/PreventClickOnDrag.js b/src/lib/interaction/PreventClickOnDrag.js index 50d260698..a219358c0 100644 --- a/src/lib/interaction/PreventClickOnDrag.js +++ b/src/lib/interaction/PreventClickOnDrag.js @@ -1,40 +1,40 @@ -import React, { Component } from 'react' -import PropTypes from 'prop-types' - -class PreventClickOnDrag extends Component { - static propTypes = { - children: PropTypes.element.isRequired, - onClick: PropTypes.func.isRequired, - clickTolerance: PropTypes.number.isRequired - } - - handleMouseDown = evt => { - this.originClickX = evt.clientX - } - - handleMouseUp = evt => { - if (Math.abs(this.originClickX - evt.clientX) > this.props.clickTolerance) { - this.cancelClick = true - } - } - - handleClick = evt => { - if (!this.cancelClick) { - this.props.onClick(evt) - } - - this.cancelClick = false - this.originClickX = null - } - - render() { - const childElement = React.Children.only(this.props.children) - return React.cloneElement(childElement, { - onMouseDown: this.handleMouseDown, - onMouseUp: this.handleMouseUp, - onClick: this.handleClick - }) - } -} - -export default PreventClickOnDrag +import React, { Component } from 'react' +import PropTypes from 'prop-types' + +class PreventClickOnDrag extends Component { + static propTypes = { + children: PropTypes.element.isRequired, + onClick: PropTypes.func.isRequired, + clickTolerance: PropTypes.number.isRequired + } + + handleMouseDown = evt => { + this.originClickX = evt.clientX + } + + handleMouseUp = evt => { + if (Math.abs(this.originClickX - evt.clientX) > this.props.clickTolerance) { + this.cancelClick = true + } + } + + handleClick = evt => { + if (!this.cancelClick) { + this.props.onClick(evt) + } + + this.cancelClick = false + this.originClickX = null + } + + render() { + const childElement = React.Children.only(this.props.children) + return React.cloneElement(childElement, { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onClick: this.handleClick + }) + } +} + +export default PreventClickOnDrag diff --git a/src/lib/items/Items.js b/src/lib/items/Items.js index 87173f895..798736ec7 100644 --- a/src/lib/items/Items.js +++ b/src/lib/items/Items.js @@ -1,170 +1,170 @@ -import PropTypes from 'prop-types' -import React, { Component } from 'react' -import Item from './Item' -// import ItemGroup from './ItemGroup' - -import { _get, arraysEqual, keyBy } from '../utility/generic' -import { getGroupOrders, getVisibleItems } from '../utility/calendar' - -const canResizeLeft = (item, canResize) => { - const value = - _get(item, 'canResize') !== undefined ? _get(item, 'canResize') : canResize - return value === 'left' || value === 'both' -} - -const canResizeRight = (item, canResize) => { - const value = - _get(item, 'canResize') !== undefined ? _get(item, 'canResize') : canResize - return value === 'right' || value === 'both' || value === true -} - -export default class Items extends Component { - static propTypes = { - groups: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, - items: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, - - canvasTimeStart: PropTypes.number.isRequired, - canvasTimeEnd: PropTypes.number.isRequired, - canvasWidth: PropTypes.number.isRequired, - - dragSnap: PropTypes.number, - minResizeWidth: PropTypes.number, - selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - - canChangeGroup: PropTypes.bool.isRequired, - canMove: PropTypes.bool.isRequired, - canResize: PropTypes.oneOf([true, false, 'left', 'right', 'both']), - canSelect: PropTypes.bool, - - keys: PropTypes.object.isRequired, - - moveResizeValidator: PropTypes.func, - itemSelect: PropTypes.func, - itemDrag: PropTypes.func, - itemDrop: PropTypes.func, - itemResizing: PropTypes.func, - itemResized: PropTypes.func, - - onItemDoubleClick: PropTypes.func, - onItemContextMenu: PropTypes.func, - - itemRenderer: PropTypes.func, - selected: PropTypes.array, - - dimensionItems: PropTypes.array, - groupTops: PropTypes.array, - useResizeHandle: PropTypes.bool, - scrollRef: PropTypes.object - } - - static defaultProps = { - selected: [] - } - - shouldComponentUpdate(nextProps) { - return !( - arraysEqual(nextProps.groups, this.props.groups) && - arraysEqual(nextProps.items, this.props.items) && - arraysEqual(nextProps.dimensionItems, this.props.dimensionItems) && - nextProps.keys === this.props.keys && - nextProps.canvasTimeStart === this.props.canvasTimeStart && - nextProps.canvasTimeEnd === this.props.canvasTimeEnd && - nextProps.canvasWidth === this.props.canvasWidth && - nextProps.selectedItem === this.props.selectedItem && - nextProps.selected === this.props.selected && - nextProps.dragSnap === this.props.dragSnap && - nextProps.minResizeWidth === this.props.minResizeWidth && - nextProps.canChangeGroup === this.props.canChangeGroup && - nextProps.canMove === this.props.canMove && - nextProps.canResize === this.props.canResize && - nextProps.canSelect === this.props.canSelect - ) - } - - isSelected(item, itemIdKey) { - if (!this.props.selected) { - return this.props.selectedItem === _get(item, itemIdKey) - } else { - let target = _get(item, itemIdKey) - return this.props.selected.includes(target) - } - } - - getVisibleItems(canvasTimeStart, canvasTimeEnd) { - const { keys, items } = this.props - - return getVisibleItems(items, canvasTimeStart, canvasTimeEnd, keys) - } - - render() { - const { - canvasTimeStart, - canvasTimeEnd, - dimensionItems, - keys, - groups - } = this.props - const { itemIdKey, itemGroupKey } = keys - - const groupOrders = getGroupOrders(groups, keys) - const visibleItems = this.getVisibleItems( - canvasTimeStart, - canvasTimeEnd, - groupOrders - ) - const sortedDimensionItems = keyBy(dimensionItems, 'id') - - return ( -
- {visibleItems - .filter(item => sortedDimensionItems[_get(item, itemIdKey)]) - .map(item => ( - - ))} -
- ) - } -} +import PropTypes from 'prop-types' +import React, { Component } from 'react' +import Item from './Item' +// import ItemGroup from './ItemGroup' + +import { _get, arraysEqual, keyBy } from '../utility/generic' +import { getGroupOrders, getVisibleItems } from '../utility/calendar' + +const canResizeLeft = (item, canResize) => { + const value = + _get(item, 'canResize') !== undefined ? _get(item, 'canResize') : canResize + return value === 'left' || value === 'both' +} + +const canResizeRight = (item, canResize) => { + const value = + _get(item, 'canResize') !== undefined ? _get(item, 'canResize') : canResize + return value === 'right' || value === 'both' || value === true +} + +export default class Items extends Component { + static propTypes = { + groups: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, + items: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, + + canvasTimeStart: PropTypes.number.isRequired, + canvasTimeEnd: PropTypes.number.isRequired, + canvasWidth: PropTypes.number.isRequired, + + dragSnap: PropTypes.number, + minResizeWidth: PropTypes.number, + selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + + canChangeGroup: PropTypes.bool.isRequired, + canMove: PropTypes.bool.isRequired, + canResize: PropTypes.oneOf([true, false, 'left', 'right', 'both']), + canSelect: PropTypes.bool, + + keys: PropTypes.object.isRequired, + + moveResizeValidator: PropTypes.func, + itemSelect: PropTypes.func, + itemDrag: PropTypes.func, + itemDrop: PropTypes.func, + itemResizing: PropTypes.func, + itemResized: PropTypes.func, + + onItemDoubleClick: PropTypes.func, + onItemContextMenu: PropTypes.func, + + itemRenderer: PropTypes.func, + selected: PropTypes.array, + + dimensionItems: PropTypes.array, + groupTops: PropTypes.array, + useResizeHandle: PropTypes.bool, + scrollRef: PropTypes.object + } + + static defaultProps = { + selected: [] + } + + shouldComponentUpdate(nextProps) { + return !( + arraysEqual(nextProps.groups, this.props.groups) && + arraysEqual(nextProps.items, this.props.items) && + arraysEqual(nextProps.dimensionItems, this.props.dimensionItems) && + nextProps.keys === this.props.keys && + nextProps.canvasTimeStart === this.props.canvasTimeStart && + nextProps.canvasTimeEnd === this.props.canvasTimeEnd && + nextProps.canvasWidth === this.props.canvasWidth && + nextProps.selectedItem === this.props.selectedItem && + nextProps.selected === this.props.selected && + nextProps.dragSnap === this.props.dragSnap && + nextProps.minResizeWidth === this.props.minResizeWidth && + nextProps.canChangeGroup === this.props.canChangeGroup && + nextProps.canMove === this.props.canMove && + nextProps.canResize === this.props.canResize && + nextProps.canSelect === this.props.canSelect + ) + } + + isSelected(item, itemIdKey) { + if (!this.props.selected) { + return this.props.selectedItem === _get(item, itemIdKey) + } else { + let target = _get(item, itemIdKey) + return this.props.selected.includes(target) + } + } + + getVisibleItems(canvasTimeStart, canvasTimeEnd) { + const { keys, items } = this.props + + return getVisibleItems(items, canvasTimeStart, canvasTimeEnd, keys) + } + + render() { + const { + canvasTimeStart, + canvasTimeEnd, + dimensionItems, + keys, + groups + } = this.props + const { itemIdKey, itemGroupKey } = keys + + const groupOrders = getGroupOrders(groups, keys) + const visibleItems = this.getVisibleItems( + canvasTimeStart, + canvasTimeEnd, + groupOrders + ) + const sortedDimensionItems = keyBy(dimensionItems, 'id') + + return ( +
+ {visibleItems + .filter(item => sortedDimensionItems[_get(item, itemIdKey)]) + .map(item => ( + + ))} +
+ ) + } +} diff --git a/src/lib/items/defaultItemRenderer.js b/src/lib/items/defaultItemRenderer.js index b8e49eeed..1194ab7f1 100644 --- a/src/lib/items/defaultItemRenderer.js +++ b/src/lib/items/defaultItemRenderer.js @@ -1,34 +1,34 @@ -import React from 'react' -import PropTypes from 'prop-types' - -export const defaultItemRenderer = ({ - item, - itemContext, - getItemProps, - getResizeProps -}) => { - const { left: leftResizeProps, right: rightResizeProps } = getResizeProps() - return ( -
- {itemContext.useResizeHandle ?
: ''} - -
- {itemContext.title} -
- - {itemContext.useResizeHandle ?
: ''} -
- ) -} - -// TODO: update this to actual prop types. Too much to change before release -// future me, forgive me. -defaultItemRenderer.propTypes = { - item: PropTypes.any, - itemContext: PropTypes.any, - getItemProps: PropTypes.any, - getResizeProps: PropTypes.any -} +import React from 'react' +import PropTypes from 'prop-types' + +export const defaultItemRenderer = ({ + item, + itemContext, + getItemProps, + getResizeProps +}) => { + const { left: leftResizeProps, right: rightResizeProps } = getResizeProps() + return ( +
+ {itemContext.useResizeHandle ?
: ''} + +
+ {itemContext.title} +
+ + {itemContext.useResizeHandle ?
: ''} +
+ ) +} + +// TODO: update this to actual prop types. Too much to change before release +// future me, forgive me. +defaultItemRenderer.propTypes = { + item: PropTypes.any, + itemContext: PropTypes.any, + getItemProps: PropTypes.any, + getResizeProps: PropTypes.any +} diff --git a/src/lib/items/styles.js b/src/lib/items/styles.js index 7c247e882..07b7a68d4 100644 --- a/src/lib/items/styles.js +++ b/src/lib/items/styles.js @@ -1,53 +1,53 @@ - export const overridableStyles = { - fontSize: 12, - color: 'white', - cursor: 'pointer', - background: '#2196f3', - border: '1px solid #1a6fb3', - zIndex: 80 -} -export const selectedStyle = { - background: '#ffc107', - border: '1px solid #ff9800', - zIndex: 82 -} -export const selectedAndCanMove = { - cursor: 'move' -} -export const selectedAndCanResizeLeft = { - borderLeftWidth: 3 -} -export const selectedAndCanResizeLeftAndDragLeft = { - cursor: 'w-resize' -} -export const selectedAndCanResizeRight = { - borderRightWidth: 3 -} -export const selectedAndCanResizeRightAndDragRight = { - cursor: 'e-resize' -} - -export const leftResizeStyle = { - position: "absolute", - width: 24, - maxWidth: "20%", - minWidth: 2, - height: "100%", - top: 0, - left: 0, - cursor: "pointer", - zIndex: 88, - } - - - export const rightResizeStyle = { - position: "absolute", - width: 24, - maxWidth: "20%", - minWidth: 2, - height: "100%", - top: 0, - right: 0, - cursor: "pointer", - zIndex: 88, - } + export const overridableStyles = { + fontSize: 12, + color: 'white', + cursor: 'pointer', + background: '#2196f3', + border: '1px solid #1a6fb3', + zIndex: 80 +} +export const selectedStyle = { + background: '#ffc107', + border: '1px solid #ff9800', + zIndex: 82 +} +export const selectedAndCanMove = { + cursor: 'move' +} +export const selectedAndCanResizeLeft = { + borderLeftWidth: 3 +} +export const selectedAndCanResizeLeftAndDragLeft = { + cursor: 'w-resize' +} +export const selectedAndCanResizeRight = { + borderRightWidth: 3 +} +export const selectedAndCanResizeRightAndDragRight = { + cursor: 'e-resize' +} + +export const leftResizeStyle = { + position: "absolute", + width: 24, + maxWidth: "20%", + minWidth: 2, + height: "100%", + top: 0, + left: 0, + cursor: "pointer", + zIndex: 88, + } + + + export const rightResizeStyle = { + position: "absolute", + width: 24, + maxWidth: "20%", + minWidth: 2, + height: "100%", + top: 0, + right: 0, + cursor: "pointer", + zIndex: 88, + } diff --git a/src/lib/layout/InfoLabel.js b/src/lib/layout/InfoLabel.js deleted file mode 100644 index a420918e2..000000000 --- a/src/lib/layout/InfoLabel.js +++ /dev/null @@ -1,22 +0,0 @@ -import PropTypes from 'prop-types' -import React, { Component } from 'react' - -export default class InfoLabel extends Component { - static propTypes = { - label: PropTypes.string.isRequired - } - - static defaultProps = { - label: '' - } - - shouldComponentUpdate(nextProps) { - const { label: nextLabel } = nextProps - - return nextLabel !== this.props.label - } - - render() { - return
{this.props.label}
- } -} diff --git a/src/lib/layout/Sidebar.js b/src/lib/layout/Sidebar.js index 0ab09bcb6..399e9316f 100644 --- a/src/lib/layout/Sidebar.js +++ b/src/lib/layout/Sidebar.js @@ -51,8 +51,8 @@ export default class Sidebar extends Component { let groupLines = this.props.groups.map((group, index) => { const elementStyle = { - height: `${groupHeights[index] - 1}px`, - lineHeight: `${groupHeights[index] - 1}px` + height: `${groupHeights[index]}px`, + lineHeight: `${groupHeights[index]}px` } return ( diff --git a/src/lib/markers/MarkerCanvas.js b/src/lib/markers/MarkerCanvas.js index 21d1697c6..04e25e994 100644 --- a/src/lib/markers/MarkerCanvas.js +++ b/src/lib/markers/MarkerCanvas.js @@ -1,93 +1,93 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { MarkerCanvasProvider } from './MarkerCanvasContext' -import TimelineMarkersRenderer from './TimelineMarkersRenderer' -import { TimelineStateConsumer } from '../timeline/TimelineStateContext' - -// expand to fill entire parent container (ScrollElement) -const staticStyles = { - position: 'absolute', - left: 0, - right: 0, - top: 0, - bottom: 0 -} - -/** - * Renders registered markers and exposes a mouse over listener for - * CursorMarkers to subscribe to - */ -class MarkerCanvas extends React.PureComponent { - static propTypes = { - getDateFromLeftOffsetPosition: PropTypes.func.isRequired, - children: PropTypes.node - } - - handleMouseMove = evt => { - if (this.subscription != null) { - const { pageX } = evt - // FIXME: dont use getBoundingClientRect. Use passed in scroll amount - const { left: containerLeft } = this.containerEl.getBoundingClientRect() - - // number of pixels from left we are on canvas - // we do this calculation as pageX is based on x from viewport whereas - // our canvas can be scrolled left and right and is generally outside - // of the viewport. This calculation is to get how many pixels the cursor - // is from left of this element - const canvasX = pageX - containerLeft - const date = this.props.getDateFromLeftOffsetPosition(canvasX) - this.subscription({ - leftOffset: canvasX, - date, - isCursorOverCanvas: true - }) - } - } - - handleMouseLeave = () => { - if (this.subscription != null) { - // tell subscriber that we're not on canvas - this.subscription({ leftOffset: 0, date: 0, isCursorOverCanvas: false }) - } - } - - handleMouseMoveSubscribe = sub => { - this.subscription = sub - return () => { - this.subscription = null - } - } - - state = { - subscribeToMouseOver: this.handleMouseMoveSubscribe - } - - render() { - return ( - -
(this.containerEl = el)} - > - - {this.props.children} -
-
- ) - } -} - -const MarkerCanvasWrapper = props => ( - - {({ getDateFromLeftOffsetPosition }) => ( - - )} - -) - -export default MarkerCanvasWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { MarkerCanvasProvider } from './MarkerCanvasContext' +import TimelineMarkersRenderer from './TimelineMarkersRenderer' +import { TimelineStateConsumer } from '../timeline/TimelineStateContext' + +// expand to fill entire parent container (ScrollElement) +const staticStyles = { + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0 +} + +/** + * Renders registered markers and exposes a mouse over listener for + * CursorMarkers to subscribe to + */ +class MarkerCanvas extends React.PureComponent { + static propTypes = { + getDateFromLeftOffsetPosition: PropTypes.func.isRequired, + children: PropTypes.node + } + + handleMouseMove = evt => { + if (this.subscription != null) { + const { pageX } = evt + // FIXME: dont use getBoundingClientRect. Use passed in scroll amount + const { left: containerLeft } = this.containerEl.getBoundingClientRect() + + // number of pixels from left we are on canvas + // we do this calculation as pageX is based on x from viewport whereas + // our canvas can be scrolled left and right and is generally outside + // of the viewport. This calculation is to get how many pixels the cursor + // is from left of this element + const canvasX = pageX - containerLeft + const date = this.props.getDateFromLeftOffsetPosition(canvasX) + this.subscription({ + leftOffset: canvasX, + date, + isCursorOverCanvas: true + }) + } + } + + handleMouseLeave = () => { + if (this.subscription != null) { + // tell subscriber that we're not on canvas + this.subscription({ leftOffset: 0, date: 0, isCursorOverCanvas: false }) + } + } + + handleMouseMoveSubscribe = sub => { + this.subscription = sub + return () => { + this.subscription = null + } + } + + state = { + subscribeToMouseOver: this.handleMouseMoveSubscribe + } + + render() { + return ( + +
(this.containerEl = el)} + > + + {this.props.children} +
+
+ ) + } +} + +const MarkerCanvasWrapper = props => ( + + {({ getDateFromLeftOffsetPosition }) => ( + + )} + +) + +export default MarkerCanvasWrapper diff --git a/src/lib/markers/MarkerCanvasContext.js b/src/lib/markers/MarkerCanvasContext.js index 7e4cb0448..9aff1effd 100644 --- a/src/lib/markers/MarkerCanvasContext.js +++ b/src/lib/markers/MarkerCanvasContext.js @@ -1,14 +1,14 @@ -import createReactContext from 'create-react-context' - -/* eslint-disable no-console */ -const defaultContextState = { - subscribeToMouseOver: () => { - console.warn('"subscribeToMouseOver" default func is being used') - } -} -/* eslint-enable */ - -const { Consumer, Provider } = createReactContext(defaultContextState) - -export const MarkerCanvasProvider = Provider -export const MarkerCanvasConsumer = Consumer +import createReactContext from 'create-react-context' + +/* eslint-disable no-console */ +const defaultContextState = { + subscribeToMouseOver: () => { + console.warn('"subscribeToMouseOver" default func is being used') + } +} +/* eslint-enable */ + +const { Consumer, Provider } = createReactContext(defaultContextState) + +export const MarkerCanvasProvider = Provider +export const MarkerCanvasConsumer = Consumer diff --git a/src/lib/markers/TimelineMarkersContext.js b/src/lib/markers/TimelineMarkersContext.js index f71e5bd1c..474a36e28 100644 --- a/src/lib/markers/TimelineMarkersContext.js +++ b/src/lib/markers/TimelineMarkersContext.js @@ -42,7 +42,7 @@ export class TimelineMarkersProvider extends React.Component { unsubscribe: () => { this.setState(state => { return { - markers: state.markers.filter(marker => marker !== newMarker) + markers: state.markers.filter(marker => marker.id !== newMarker.id) } }) }, diff --git a/src/lib/markers/TimelineMarkersRenderer.js b/src/lib/markers/TimelineMarkersRenderer.js index db96f6496..4a7686974 100644 --- a/src/lib/markers/TimelineMarkersRenderer.js +++ b/src/lib/markers/TimelineMarkersRenderer.js @@ -10,41 +10,46 @@ import CursorMarker from './implementations/CursorMarker' const TimelineMarkersRenderer = () => { return ( - {({ getLeftOffsetFromDate }) => ( + {({ getLeftOffsetFromDate, getTimelineState }) => ( {({ markers }) => { - return markers.map(marker => { - switch (marker.type) { - case TimelineMarkerType.Today: - return ( - - ) - case TimelineMarkerType.Custom: - return ( - - ) - case TimelineMarkerType.Cursor: - return ( - - ) - default: - return null - } - }) + const timelineState = getTimelineState(); + return markers + .map(marker => { + switch (marker.type) { + case TimelineMarkerType.Today: + if(!( (new Date()).valueOf() >= timelineState.canvasTimeStart && (new Date()).valueOf() <= timelineState.canvasTimeEnd)) return null; + return ( + + ) + case TimelineMarkerType.Custom: + //filter out cursors outside canvas start/end + if(!(marker.date >= timelineState.canvasTimeStart && marker.date <= timelineState.canvasTimeEnd)) return null; + return ( + + ) + case TimelineMarkerType.Cursor: + return ( + + ) + default: + return null + } + }) }} )} diff --git a/src/lib/markers/implementations/CursorMarker.js b/src/lib/markers/implementations/CursorMarker.js index cc628090e..67b3a0b1b 100644 --- a/src/lib/markers/implementations/CursorMarker.js +++ b/src/lib/markers/implementations/CursorMarker.js @@ -1,91 +1,91 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { - createMarkerStylesWithLeftOffset, - createDefaultRenderer -} from './shared' -import { MarkerCanvasConsumer } from '../MarkerCanvasContext' - -const defaultRenderer = createDefaultRenderer('default-cursor-marker') - -/** - * CursorMarker implementation subscribes to 'subscribeToCanvasMouseOver' on mount. - * This subscription is passed in via MarkerCanvasConsumer, which is wired up to - * MarkerCanvasProvider in the MarkerCanvas component. When the user mouses over MarkerCanvas, - * the callback registered in CursorMarker (this component) is passed: - * leftOffset - pixels from left edge of canvas, used to position this element - * date - the date the cursor pertains to - * isCursorOverCanvas - whether the user cursor is over the canvas. This is set to 'false' - * when the user mouseleaves the element - */ -class CursorMarker extends React.Component { - static propTypes = { - subscribeToCanvasMouseOver: PropTypes.func.isRequired, - renderer: PropTypes.func - } - - static defaultProps = { - renderer: defaultRenderer - } - - constructor() { - super() - - this.state = { - leftOffset: 0, - date: 0, - isShowingCursor: false - } - } - - handleCanvasMouseOver = ({ leftOffset, date, isCursorOverCanvas }) => { - this.setState({ - leftOffset, - date, - isShowingCursor: isCursorOverCanvas - }) - } - - componentDidMount() { - this.unsubscribe = this.props.subscribeToCanvasMouseOver( - this.handleCanvasMouseOver - ) - } - - componentWillUnmount() { - if (this.unsubscribe != null) { - this.unsubscribe() - this.unsubscribe = null - } - } - - render() { - const { isShowingCursor, leftOffset, date } = this.state - - if (!isShowingCursor) return null - - const styles = createMarkerStylesWithLeftOffset(leftOffset) - - return this.props.renderer({ styles, date }) - } -} - -// TODO: turn into HOC? -const CursorMarkerWrapper = props => { - return ( - - {({ subscribeToMouseOver }) => { - return ( - - ) - }} - - ) -} - -CursorMarkerWrapper.displayName = 'CursorMarkerWrapper' - -export default CursorMarkerWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { + createMarkerStylesWithLeftOffset, + createDefaultRenderer +} from './shared' +import { MarkerCanvasConsumer } from '../MarkerCanvasContext' + +const defaultRenderer = createDefaultRenderer('default-cursor-marker') + +/** + * CursorMarker implementation subscribes to 'subscribeToCanvasMouseOver' on mount. + * This subscription is passed in via MarkerCanvasConsumer, which is wired up to + * MarkerCanvasProvider in the MarkerCanvas component. When the user mouses over MarkerCanvas, + * the callback registered in CursorMarker (this component) is passed: + * leftOffset - pixels from left edge of canvas, used to position this element + * date - the date the cursor pertains to + * isCursorOverCanvas - whether the user cursor is over the canvas. This is set to 'false' + * when the user mouseleaves the element + */ +class CursorMarker extends React.Component { + static propTypes = { + subscribeToCanvasMouseOver: PropTypes.func.isRequired, + renderer: PropTypes.func + } + + static defaultProps = { + renderer: defaultRenderer + } + + constructor() { + super() + + this.state = { + leftOffset: 0, + date: 0, + isShowingCursor: false + } + } + + handleCanvasMouseOver = ({ leftOffset, date, isCursorOverCanvas }) => { + this.setState({ + leftOffset, + date, + isShowingCursor: isCursorOverCanvas + }) + } + + componentDidMount() { + this.unsubscribe = this.props.subscribeToCanvasMouseOver( + this.handleCanvasMouseOver + ) + } + + componentWillUnmount() { + if (this.unsubscribe != null) { + this.unsubscribe() + this.unsubscribe = null + } + } + + render() { + const { isShowingCursor, leftOffset, date } = this.state + + if (!isShowingCursor) return null + + const styles = createMarkerStylesWithLeftOffset(leftOffset) + + return this.props.renderer({ styles, date }) + } +} + +// TODO: turn into HOC? +const CursorMarkerWrapper = props => { + return ( + + {({ subscribeToMouseOver }) => { + return ( + + ) + }} + + ) +} + +CursorMarkerWrapper.displayName = 'CursorMarkerWrapper' + +export default CursorMarkerWrapper diff --git a/src/lib/markers/implementations/CustomMarker.js b/src/lib/markers/implementations/CustomMarker.js index a72f750be..d65c9b414 100644 --- a/src/lib/markers/implementations/CustomMarker.js +++ b/src/lib/markers/implementations/CustomMarker.js @@ -1,33 +1,33 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { - createMarkerStylesWithLeftOffset, - createDefaultRenderer -} from './shared' - -const defaultCustomMarkerRenderer = createDefaultRenderer( - 'default-customer-marker-id' -) -/** - * CustomMarker that is placed based on passed in date prop - */ -class CustomMarker extends React.Component { - static propTypes = { - getLeftOffsetFromDate: PropTypes.func.isRequired, - renderer: PropTypes.func, - date: PropTypes.number.isRequired - } - - static defaultProps = { - renderer: defaultCustomMarkerRenderer - } - render() { - const { date } = this.props - const leftOffset = this.props.getLeftOffsetFromDate(date) - - const styles = createMarkerStylesWithLeftOffset(leftOffset) - return this.props.renderer({ styles, date }) - } -} - -export default CustomMarker +import React from 'react' +import PropTypes from 'prop-types' +import { + createMarkerStylesWithLeftOffset, + createDefaultRenderer +} from './shared' + +const defaultCustomMarkerRenderer = createDefaultRenderer( + 'default-customer-marker-id' +) +/** + * CustomMarker that is placed based on passed in date prop + */ +class CustomMarker extends React.Component { + static propTypes = { + getLeftOffsetFromDate: PropTypes.func.isRequired, + renderer: PropTypes.func, + date: PropTypes.number.isRequired + } + + static defaultProps = { + renderer: defaultCustomMarkerRenderer + } + render() { + const { date } = this.props + const leftOffset = this.props.getLeftOffsetFromDate(date) + + const styles = createMarkerStylesWithLeftOffset(leftOffset) + return this.props.renderer({ styles, date }) + } +} + +export default CustomMarker diff --git a/src/lib/markers/implementations/TodayMarker.js b/src/lib/markers/implementations/TodayMarker.js index 5f243fe51..2e83a21be 100644 --- a/src/lib/markers/implementations/TodayMarker.js +++ b/src/lib/markers/implementations/TodayMarker.js @@ -1,59 +1,59 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { - createMarkerStylesWithLeftOffset, - createDefaultRenderer -} from './shared' - -const defaultRenderer = createDefaultRenderer('default-today-line') - -/** Marker that is placed based on current date. This component updates itself on - * a set interval, dictated by the 'interval' prop. - */ -class TodayMarker extends React.Component { - static propTypes = { - getLeftOffsetFromDate: PropTypes.func.isRequired, - renderer: PropTypes.func, - interval: PropTypes.number.isRequired - } - - static defaultProps = { - renderer: defaultRenderer - } - - state = { - date: Date.now() - } - - componentDidMount() { - this.intervalToken = this.createIntervalUpdater(this.props.interval) - } - - componentDidUpdate(prevProps) { - if (prevProps.interval !== this.props.interval) { - clearInterval(this.intervalToken) - this.intervalToken = this.createIntervalUpdater(this.props.interval) - } - } - - createIntervalUpdater(interval) { - return setInterval(() => { - this.setState({ - date: Date.now() // FIXME: use date utils pass in as props - }); - }, interval); - } - - componentWillUnmount() { - clearInterval(this.intervalToken) - } - - render() { - const { date } = this.state - const leftOffset = this.props.getLeftOffsetFromDate(date) - const styles = createMarkerStylesWithLeftOffset(leftOffset) - return this.props.renderer({ styles, date }) - } -} - -export default TodayMarker +import React from 'react' +import PropTypes from 'prop-types' +import { + createMarkerStylesWithLeftOffset, + createDefaultRenderer +} from './shared' + +const defaultRenderer = createDefaultRenderer('default-today-line') + +/** Marker that is placed based on current date. This component updates itself on + * a set interval, dictated by the 'interval' prop. + */ +class TodayMarker extends React.Component { + static propTypes = { + getLeftOffsetFromDate: PropTypes.func.isRequired, + renderer: PropTypes.func, + interval: PropTypes.number.isRequired + } + + static defaultProps = { + renderer: defaultRenderer + } + + state = { + date: Date.now() + } + + componentDidMount() { + this.intervalToken = this.createIntervalUpdater(this.props.interval) + } + + componentDidUpdate(prevProps) { + if (prevProps.interval !== this.props.interval) { + clearInterval(this.intervalToken) + this.intervalToken = this.createIntervalUpdater(this.props.interval) + } + } + + createIntervalUpdater(interval) { + return setInterval(() => { + this.setState({ + date: Date.now() // FIXME: use date utils pass in as props + }); + }, interval); + } + + componentWillUnmount() { + clearInterval(this.intervalToken) + } + + render() { + const { date } = this.state + const leftOffset = this.props.getLeftOffsetFromDate(date) + const styles = createMarkerStylesWithLeftOffset(leftOffset) + return this.props.renderer({ styles, date }) + } +} + +export default TodayMarker diff --git a/src/lib/markers/implementations/shared.js b/src/lib/markers/implementations/shared.js index 17855e791..6ad1cc2cf 100644 --- a/src/lib/markers/implementations/shared.js +++ b/src/lib/markers/implementations/shared.js @@ -1,30 +1,30 @@ -import React from 'react' - -/** - * Baseline styles to get the marker to render correctly - */ -const criticalStyles = { - position: 'absolute', - top: 0, - bottom: 0, - width: '2px', - backgroundColor: 'black', - // by default, pointer events (specifically click) will - // "pass through". This is added so that CursorMarker - // will not get in the way of canvas click - pointerEvents: 'none' -} - -// FIXME: this creates a new object each time in render -// might want to memoize this? -export const createMarkerStylesWithLeftOffset = leftOffset => ({ - ...criticalStyles, - left: leftOffset -}) - -export const createDefaultRenderer = dataTestidValue => { - // eslint-disable-next-line - return function DefaultMarkerRenderer({ styles }) { - return
- } -} +import React from 'react' + +/** + * Baseline styles to get the marker to render correctly + */ +const criticalStyles = { + position: 'absolute', + top: 0, + bottom: 0, + width: '2px', + backgroundColor: 'black', + // by default, pointer events (specifically click) will + // "pass through". This is added so that CursorMarker + // will not get in the way of canvas click + pointerEvents: 'none' +} + +// FIXME: this creates a new object each time in render +// might want to memoize this? +export const createMarkerStylesWithLeftOffset = leftOffset => ({ + ...criticalStyles, + left: leftOffset +}) + +export const createDefaultRenderer = dataTestidValue => { + // eslint-disable-next-line + return function DefaultMarkerRenderer({ styles }) { + return
+ } +} diff --git a/src/lib/markers/markerType.js b/src/lib/markers/markerType.js index d85af0439..f8e28de10 100644 --- a/src/lib/markers/markerType.js +++ b/src/lib/markers/markerType.js @@ -1,5 +1,5 @@ -export const TimelineMarkerType = { - Today: 'Today', - Custom: 'Custom', - Cursor: 'Cursor' -} +export const TimelineMarkerType = { + Today: 'Today', + Custom: 'Custom', + Cursor: 'Cursor' +} diff --git a/src/lib/markers/public/CursorMarker.js b/src/lib/markers/public/CursorMarker.js index ef4318272..a51bc53cf 100644 --- a/src/lib/markers/public/CursorMarker.js +++ b/src/lib/markers/public/CursorMarker.js @@ -1,44 +1,44 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { TimelineMarkersConsumer } from '../TimelineMarkersContext' -import { TimelineMarkerType } from '../markerType' - -class CursorMarker extends React.Component { - static propTypes = { - subscribeMarker: PropTypes.func.isRequired, - children: PropTypes.func - } - - componentDidMount() { - const { unsubscribe } = this.props.subscribeMarker({ - type: TimelineMarkerType.Cursor, - renderer: this.props.children - }) - this.unsubscribe = unsubscribe - } - - componentWillUnmount() { - if (this.unsubscribe != null) { - this.unsubscribe() - this.unsubscribe = null - } - } - render() { - return null - } -} - -// TODO: turn into HOC? -const CursorMarkerWrapper = props => { - return ( - - {({ subscribeMarker }) => ( - - )} - - ) -} - -CursorMarkerWrapper.displayName = 'CursorMarkerWrapper' - -export default CursorMarkerWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { TimelineMarkersConsumer } from '../TimelineMarkersContext' +import { TimelineMarkerType } from '../markerType' + +class CursorMarker extends React.Component { + static propTypes = { + subscribeMarker: PropTypes.func.isRequired, + children: PropTypes.func + } + + componentDidMount() { + const { unsubscribe } = this.props.subscribeMarker({ + type: TimelineMarkerType.Cursor, + renderer: this.props.children + }) + this.unsubscribe = unsubscribe + } + + componentWillUnmount() { + if (this.unsubscribe != null) { + this.unsubscribe() + this.unsubscribe = null + } + } + render() { + return null + } +} + +// TODO: turn into HOC? +const CursorMarkerWrapper = props => { + return ( + + {({ subscribeMarker }) => ( + + )} + + ) +} + +CursorMarkerWrapper.displayName = 'CursorMarkerWrapper' + +export default CursorMarkerWrapper diff --git a/src/lib/markers/public/CustomMarker.js b/src/lib/markers/public/CustomMarker.js index bf2b0fcf3..b08fe1073 100644 --- a/src/lib/markers/public/CustomMarker.js +++ b/src/lib/markers/public/CustomMarker.js @@ -1,60 +1,60 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { TimelineMarkersConsumer } from '../TimelineMarkersContext' -import { TimelineMarkerType } from '../markerType' - -class CustomMarker extends React.Component { - static propTypes = { - subscribeMarker: PropTypes.func.isRequired, - updateMarker: PropTypes.func.isRequired, - children: PropTypes.func, - date: PropTypes.number.isRequired - } - - componentDidUpdate(prevProps) { - if (prevProps.date !== this.props.date && this.getMarker) { - const marker = this.getMarker() - this.props.updateMarker({ ...marker, date: this.props.date }) - } - } - - componentDidMount() { - const { unsubscribe, getMarker } = this.props.subscribeMarker({ - type: TimelineMarkerType.Custom, - renderer: this.props.children, - date: this.props.date - }) - this.unsubscribe = unsubscribe - this.getMarker = getMarker - } - - componentWillUnmount() { - if (this.unsubscribe != null) { - this.unsubscribe() - this.unsubscribe = null - } - } - - render() { - return null - } -} - -// TODO: turn into HOC? -const CustomMarkerWrapper = props => { - return ( - - {({ subscribeMarker, updateMarker }) => ( - - )} - - ) -} - -CustomMarkerWrapper.displayName = 'CustomMarkerWrapper' - -export default CustomMarkerWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { TimelineMarkersConsumer } from '../TimelineMarkersContext' +import { TimelineMarkerType } from '../markerType' + +class CustomMarker extends React.Component { + static propTypes = { + subscribeMarker: PropTypes.func.isRequired, + updateMarker: PropTypes.func.isRequired, + children: PropTypes.func, + date: PropTypes.number.isRequired + } + + componentDidUpdate(prevProps) { + if (prevProps.date !== this.props.date && this.getMarker) { + const marker = this.getMarker() + this.props.updateMarker({ ...marker, date: this.props.date }) + } + } + + componentDidMount() { + const { unsubscribe, getMarker } = this.props.subscribeMarker({ + type: TimelineMarkerType.Custom, + renderer: this.props.children, + date: this.props.date + }) + this.unsubscribe = unsubscribe + this.getMarker = getMarker + } + + componentWillUnmount() { + if (this.unsubscribe != null) { + this.unsubscribe() + this.unsubscribe = null + } + } + + render() { + return null + } +} + +// TODO: turn into HOC? +const CustomMarkerWrapper = props => { + return ( + + {({ subscribeMarker, updateMarker }) => ( + + )} + + ) +} + +CustomMarkerWrapper.displayName = 'CustomMarkerWrapper' + +export default CustomMarkerWrapper diff --git a/src/lib/markers/public/TimelineMarkers.js b/src/lib/markers/public/TimelineMarkers.js index bbc6377b6..fbcb9030a 100644 --- a/src/lib/markers/public/TimelineMarkers.js +++ b/src/lib/markers/public/TimelineMarkers.js @@ -1,20 +1,20 @@ -// Is this necessary? The initial reason for including this is for organization sake in the -// user code e.g. - -/* - - // would there be props passed in here? - - - - - - -*/ - -// If we decide to pass in props to TimelineMarkers, then yes, this is necessary. -const TimelineMarkers = props => { - return props.children || null -} - -export default TimelineMarkers +// Is this necessary? The initial reason for including this is for organization sake in the +// user code e.g. + +/* + + // would there be props passed in here? + + + + + + +*/ + +// If we decide to pass in props to TimelineMarkers, then yes, this is necessary. +const TimelineMarkers = props => { + return props.children || null +} + +export default TimelineMarkers diff --git a/src/lib/markers/public/TodayMarker.js b/src/lib/markers/public/TodayMarker.js index b58c24e95..99b9bd2d6 100644 --- a/src/lib/markers/public/TodayMarker.js +++ b/src/lib/markers/public/TodayMarker.js @@ -1,63 +1,63 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { TimelineMarkersConsumer } from '../TimelineMarkersContext' -import { TimelineMarkerType } from '../markerType' - -class TodayMarker extends React.Component { - static propTypes = { - subscribeMarker: PropTypes.func.isRequired, - updateMarker: PropTypes.func.isRequired, - interval: PropTypes.number, - children: PropTypes.func - } - - static defaultProps = { - interval: 1000 * 10 // default to ten seconds - } - - componentDidMount() { - const { unsubscribe, getMarker } = this.props.subscribeMarker({ - type: TimelineMarkerType.Today, - renderer: this.props.children, - interval: this.props.interval - }) - this.unsubscribe = unsubscribe - this.getMarker = getMarker - } - - componentWillUnmount() { - if (this.unsubscribe != null) { - this.unsubscribe() - this.unsubscribe = null - } - } - - componentDidUpdate(prevProps) { - if (prevProps.interval !== this.props.interval && this.getMarker) { - const marker = this.getMarker() - this.props.updateMarker({ - ...marker, - interval: this.props.interval, - }) - } - } - - render() { - return null - } -} - -// TODO: turn into HOC? -const TodayMarkerWrapper = props => { - return ( - - {({ subscribeMarker, updateMarker }) => ( - - )} - - ) -} - -TodayMarkerWrapper.displayName = 'TodayMarkerWrapper' - -export default TodayMarkerWrapper +import React from 'react' +import PropTypes from 'prop-types' +import { TimelineMarkersConsumer } from '../TimelineMarkersContext' +import { TimelineMarkerType } from '../markerType' + +class TodayMarker extends React.Component { + static propTypes = { + subscribeMarker: PropTypes.func.isRequired, + updateMarker: PropTypes.func.isRequired, + interval: PropTypes.number, + children: PropTypes.func + } + + static defaultProps = { + interval: 1000 * 10 // default to ten seconds + } + + componentDidMount() { + const { unsubscribe, getMarker } = this.props.subscribeMarker({ + type: TimelineMarkerType.Today, + renderer: this.props.children, + interval: this.props.interval + }) + this.unsubscribe = unsubscribe + this.getMarker = getMarker + } + + componentWillUnmount() { + if (this.unsubscribe != null) { + this.unsubscribe() + this.unsubscribe = null + } + } + + componentDidUpdate(prevProps) { + if (prevProps.interval !== this.props.interval && this.getMarker) { + const marker = this.getMarker() + this.props.updateMarker({ + ...marker, + interval: this.props.interval, + }) + } + } + + render() { + return null + } +} + +// TODO: turn into HOC? +const TodayMarkerWrapper = props => { + return ( + + {({ subscribeMarker, updateMarker }) => ( + + )} + + ) +} + +TodayMarkerWrapper.displayName = 'TodayMarkerWrapper' + +export default TodayMarkerWrapper diff --git a/src/lib/row/GroupRow.js b/src/lib/row/GroupRow.js index 2b0c333bd..129473302 100644 --- a/src/lib/row/GroupRow.js +++ b/src/lib/row/GroupRow.js @@ -1,57 +1,52 @@ -import React, { PureComponent } from 'react' -import PropTypes from 'prop-types' -import PreventClickOnDrag from '../interaction/PreventClickOnDrag' - -class GroupRow extends PureComponent { - static propTypes = { - onClick: PropTypes.func.isRequired, - onDoubleClick: PropTypes.func.isRequired, - onContextMenu: PropTypes.func.isRequired, - isEvenRow: PropTypes.bool.isRequired, - clickTolerance: PropTypes.number.isRequired, - group: PropTypes.object.isRequired, - horizontalLineClassNamesForGroup: PropTypes.func, - order: PropTypes.number.isRequired, - canvasWidth: PropTypes.number.isRequired, - height: PropTypes.number.isRequired, - - } - - onGroupRowContextMenuClick = evt => this.props.onContextMenu(evt, this.props.order); - - onGroupRowClick = evt => this.props.onClick(evt, this.props.order) - - onGroupRowDoubleClick =evt => this.props.onDoubleClick(evt, this.props.order) - - render() { - const { - isEvenRow, - clickTolerance, - horizontalLineClassNamesForGroup, - group, - canvasWidth, - height, - } = this.props - - let classNamesForGroup = []; - if (horizontalLineClassNamesForGroup) { - classNamesForGroup = horizontalLineClassNamesForGroup(group); - } - - return ( - -
- - ) - } -} - +import React, { PureComponent } from 'react' +import PropTypes from 'prop-types' +import PreventClickOnDrag from '../interaction/PreventClickOnDrag' + +class GroupRow extends PureComponent { + static propTypes = { + onClick: PropTypes.func.isRequired, + onDoubleClick: PropTypes.func.isRequired, + onContextMenu: PropTypes.func.isRequired, + isEvenRow: PropTypes.bool.isRequired, + clickTolerance: PropTypes.number.isRequired, + group: PropTypes.object.isRequired, + horizontalLineClassNamesForGroup: PropTypes.func, + order: PropTypes.number.isRequired, + style: PropTypes.number.isRequired, + + } + + onGroupRowContextMenuClick = evt => this.props.onContextMenu(evt, this.props.order); + + onGroupRowClick = evt => this.props.onClick(evt, this.props.order) + + onGroupRowDoubleClick =evt => this.props.onDoubleClick(evt, this.props.order) + + render() { + const { + isEvenRow, + clickTolerance, + horizontalLineClassNamesForGroup, + group, + style, + } = this.props + + let classNamesForGroup = []; + if (horizontalLineClassNamesForGroup) { + classNamesForGroup = horizontalLineClassNamesForGroup(group); + } + + return ( + +
+ + ) + } +} + export default GroupRow \ No newline at end of file diff --git a/src/lib/row/GroupRows.js b/src/lib/row/GroupRows.js index 4ea498177..b7b1ae1d4 100644 --- a/src/lib/row/GroupRows.js +++ b/src/lib/row/GroupRows.js @@ -12,7 +12,7 @@ export default class GroupRows extends Component { clickTolerance: PropTypes.number.isRequired, groups: PropTypes.array.isRequired, horizontalLineClassNamesForGroup: PropTypes.func, - onRowContextClick: PropTypes.func.isRequired + onRowContextClick: PropTypes.func.isRequired, } shouldComponentUpdate(nextProps) { @@ -34,23 +34,25 @@ export default class GroupRows extends Component { clickTolerance, groups, horizontalLineClassNamesForGroup, - onRowContextClick + onRowContextClick, } = this.props let lines = [] + for (let i = 0; i < lineCount; i++) { lines.push( onRowContextClick(evt, i)} + onClick={evt => onRowClick(evt, i)} + onDoubleClick={evt => onRowDoubleClick(evt, i)} key={`horizontal-line-${i}`} isEvenRow={i % 2 === 0} group={groups[i]} horizontalLineClassNamesForGroup={horizontalLineClassNamesForGroup} - canvasWidth={canvasWidth} - height={groupHeights[i]} + style={{ + width: `${canvasWidth}px`, + height: `${groupHeights[i]}px` + }} /> ) } diff --git a/src/lib/scroll/ScrollElement.js b/src/lib/scroll/ScrollElement.js index 70dc1e8e0..5f79ae6cd 100644 --- a/src/lib/scroll/ScrollElement.js +++ b/src/lib/scroll/ScrollElement.js @@ -1,8 +1,8 @@ -import React, { PureComponent } from 'react' +import React, { Component } from 'react' import PropTypes from 'prop-types' import { getParentPosition } from '../utility/dom-helpers' -class ScrollElement extends PureComponent { +class ScrollElement extends Component { static propTypes = { children: PropTypes.element.isRequired, width: PropTypes.number.isRequired, @@ -22,16 +22,23 @@ class ScrollElement extends PureComponent { } } - refHandler = el => { - this.scrollComponent = el - this.props.scrollRef(el) - } - + /** + * needed to handle scrolling with trackpad + */ handleScroll = () => { const scrollX = this.scrollComponent.scrollLeft this.props.onScroll(scrollX) } + refHandler = el => { + this.scrollComponent = el + this.props.scrollRef(el) + if(el){ + el.addEventListener('wheel', this.handleWheel, {passive: false}); + } + } + + handleWheel = e => { const { traditionalZoom } = this.props @@ -50,8 +57,7 @@ class ScrollElement extends PureComponent { } else if (e.shiftKey) { e.preventDefault() // shift+scroll event from a touchpad has deltaY property populated; shift+scroll event from a mouse has deltaX - this.scrollComponent.scrollLeft += e.deltaY || e.deltaX - + this.props.onScroll(this.scrollComponent.scrollLeft + (e.deltaY || e.deltaX)) // no modifier pressed? we prevented the default event, so scroll or zoom as needed } } @@ -70,7 +76,7 @@ class ScrollElement extends PureComponent { // this.props.onMouseMove(e) //why is interacting with item important? if (this.state.isDragging && !this.props.isInteractingWithItem) { - this.scrollComponent.scrollLeft += this.dragLastPosition - e.pageX + this.props.onScroll(this.scrollComponent.scrollLeft + this.dragLastPosition - e.pageX) this.dragLastPosition = e.pageX } } @@ -141,7 +147,7 @@ class ScrollElement extends PureComponent { let moveX = Math.abs(deltaX0) * 3 > Math.abs(deltaY0) let moveY = Math.abs(deltaY0) * 3 > Math.abs(deltaX0) if (deltaX !== 0 && moveX) { - this.scrollComponent.scrollLeft -= deltaX + this.props.onScroll(this.scrollComponent.scrollLeft - deltaX) } if (moveY) { window.scrollTo( @@ -162,6 +168,12 @@ class ScrollElement extends PureComponent { } } + componentWillUnmount(){ + if(this.scrollComponent){ + this.scrollComponent.removeEventListener('wheel', this.handleWheel); + } + } + render() { const { width, height, children } = this.props const { isDragging } = this.state @@ -179,8 +191,6 @@ class ScrollElement extends PureComponent { data-testid="scroll-element" className="rct-scroll" style={scrollComponentStyle} - onScroll={this.handleScroll} - onWheel={this.handleWheel} onMouseDown={this.handleMouseDown} onMouseMove={this.handleMouseMove} onMouseUp={this.handleMouseUp} @@ -188,6 +198,7 @@ class ScrollElement extends PureComponent { onTouchStart={this.handleTouchStart} onTouchMove={this.handleTouchMove} onTouchEnd={this.handleTouchEnd} + onScroll={this.handleScroll} > {children}
diff --git a/src/lib/timeline/TimelineStateContext.js b/src/lib/timeline/TimelineStateContext.js index 15cd24369..a2c06ccfe 100644 --- a/src/lib/timeline/TimelineStateContext.js +++ b/src/lib/timeline/TimelineStateContext.js @@ -1,118 +1,112 @@ -import React from 'react' -import PropTypes from 'prop-types' -import createReactContext from 'create-react-context' -import { - calculateXPositionForTime, - calculateTimeForXPosition -} from '../utility/calendar' - -/* this context will hold all information regarding timeline state: - 1. timeline width - 2. visible time start and end - 3. canvas time start and end - 4. helpers for calculating left offset of items (and really...anything) -*/ - -/* eslint-disable no-console */ -const defaultContextState = { - getTimelineState: () => { - console.warn('"getTimelineState" default func is being used') - }, - getLeftOffsetFromDate: () => { - console.warn('"getLeftOffsetFromDate" default func is being used') - }, - getDateFromLeftOffsetPosition: () => { - console.warn('"getDateFromLeftOffsetPosition" default func is being used') - }, - showPeriod: () => { - console.warn('"showPeriod" default func is being used') - } -} -/* eslint-enable */ - -const { Consumer, Provider } = createReactContext(defaultContextState) - -export class TimelineStateProvider extends React.Component { - /* eslint-disable react/no-unused-prop-types */ - static propTypes = { - children: PropTypes.element.isRequired, - visibleTimeStart: PropTypes.number.isRequired, - visibleTimeEnd: PropTypes.number.isRequired, - canvasTimeStart: PropTypes.number.isRequired, - canvasTimeEnd: PropTypes.number.isRequired, - canvasWidth: PropTypes.number.isRequired, - showPeriod: PropTypes.func.isRequired, - timelineUnit: PropTypes.string.isRequired, - timelineWidth: PropTypes.number.isRequired, - keys:PropTypes.object.isRequired, - width: PropTypes.number.isRequired - } - - constructor(props) { - super(props) - - this.state = { - timelineContext: { - getTimelineState: this.getTimelineState, - getLeftOffsetFromDate: this.getLeftOffsetFromDate, - getDateFromLeftOffsetPosition: this.getDateFromLeftOffsetPosition, - showPeriod: this.props.showPeriod, - } - } - } - - getTimelineState = () => { - const { - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - timelineUnit, - timelineWidth, - keys, - width, - } = this.props - return { - visibleTimeStart, - visibleTimeEnd, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - timelineUnit, - timelineWidth, - keys, - width, - } // REVIEW, - } - - getLeftOffsetFromDate = date => { - const { canvasTimeStart, canvasTimeEnd, canvasWidth } = this.props - return calculateXPositionForTime( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - date - ) - } - - getDateFromLeftOffsetPosition = leftOffset => { - const { canvasTimeStart, canvasTimeEnd, canvasWidth } = this.props - return calculateTimeForXPosition( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - leftOffset - ) - } - - render() { - return ( - - {this.props.children} - - ) - } -} - -export const TimelineStateConsumer = Consumer +import React from 'react' +import PropTypes from 'prop-types' +import createReactContext from 'create-react-context' +import { + calculateXPositionForTime, + calculateTimeForXPosition +} from '../utility/calendar' + +/* this context will hold all information regarding timeline state: + 1. timeline width + 2. visible time start and end + 3. canvas time start and end + 4. helpers for calculating left offset of items (and really...anything) +*/ + +/* eslint-disable no-console */ +const defaultContextState = { + getTimelineState: () => { + console.warn('"getTimelineState" default func is being used') + }, + getLeftOffsetFromDate: () => { + console.warn('"getLeftOffsetFromDate" default func is being used') + }, + getDateFromLeftOffsetPosition: () => { + console.warn('"getDateFromLeftOffsetPosition" default func is being used') + }, + showPeriod: () => { + console.warn('"showPeriod" default func is being used') + } +} +/* eslint-enable */ + +const { Consumer, Provider } = createReactContext(defaultContextState) + +export class TimelineStateProvider extends React.Component { + /* eslint-disable react/no-unused-prop-types */ + static propTypes = { + children: PropTypes.element.isRequired, + visibleTimeStart: PropTypes.number.isRequired, + visibleTimeEnd: PropTypes.number.isRequired, + canvasTimeStart: PropTypes.number.isRequired, + canvasTimeEnd: PropTypes.number.isRequired, + canvasWidth: PropTypes.number.isRequired, + showPeriod: PropTypes.func.isRequired, + timelineUnit: PropTypes.string.isRequired, + timelineWidth: PropTypes.number.isRequired, + } + + constructor(props) { + super(props) + + this.state = { + timelineContext: { + getTimelineState: this.getTimelineState, + getLeftOffsetFromDate: this.getLeftOffsetFromDate, + getDateFromLeftOffsetPosition: this.getDateFromLeftOffsetPosition, + showPeriod: this.props.showPeriod, + } + } + } + + getTimelineState = () => { + const { + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + timelineUnit, + timelineWidth, + } = this.props + return { + visibleTimeStart, + visibleTimeEnd, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + timelineUnit, + timelineWidth, + } // REVIEW, + } + + getLeftOffsetFromDate = date => { + const { canvasTimeStart, canvasTimeEnd, canvasWidth } = this.props + return calculateXPositionForTime( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + date + ) + } + + getDateFromLeftOffsetPosition = leftOffset => { + const { canvasTimeStart, canvasTimeEnd, canvasWidth } = this.props + return calculateTimeForXPosition( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + leftOffset + ) + } + + render() { + return ( + + {this.props.children} + + ) + } +} + +export const TimelineStateConsumer = Consumer diff --git a/src/lib/utility/calendar.js b/src/lib/utility/calendar.js index 12d8a68cb..10113fe21 100644 --- a/src/lib/utility/calendar.js +++ b/src/lib/utility/calendar.js @@ -1,762 +1,726 @@ -import moment from 'moment' -import { _get } from './generic' - -/** - * Calculate the ms / pixel ratio of the timeline state - * @param {number} canvasTimeStart - * @param {number} canvasTimeEnd - * @param {number} canvasWidth - * @returns {number} - */ -export function coordinateToTimeRatio( - canvasTimeStart, - canvasTimeEnd, - canvasWidth -) { - return (canvasTimeEnd - canvasTimeStart) / canvasWidth -} - -/** - * For a given time, calculate the pixel position given timeline state - * (timeline width in px, canvas time range) - * @param {number} canvasTimeStart - * @param {number} canvasTimeEnd - * @param {number} canvasWidth - * @param {number} time - * @returns {number} - */ -export function calculateXPositionForTime( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - time -) { - const widthToZoomRatio = canvasWidth / (canvasTimeEnd - canvasTimeStart) - const timeOffset = time - canvasTimeStart - - return timeOffset * widthToZoomRatio -} - -/** - * For a given x position (leftOffset) in pixels, calculate time based on - * timeline state (timeline width in px, canvas time range) - * @param {number} canvasTimeStart - * @param {number} canvasTimeEnd - * @param {number} canvasWidth - * @param {number} leftOffset - * @returns {number} - */ -export function calculateTimeForXPosition( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - leftOffset -) { - const timeToPxRatio = (canvasTimeEnd - canvasTimeStart) / canvasWidth - - const timeFromCanvasTimeStart = timeToPxRatio * leftOffset - - return timeFromCanvasTimeStart + canvasTimeStart -} - -export function iterateTimes(start, end, unit, timeSteps, callback) { - let time = moment(start).startOf(unit) - - if (timeSteps[unit] && timeSteps[unit] > 1) { - let value = time.get(unit) - time.set(unit, value - value % timeSteps[unit]) - } - - while (time.valueOf() < end) { - let nextTime = moment(time).add(timeSteps[unit] || 1, `${unit}s`).startOf(`${unit}s`); - let endTime = moment(time).endOf(`${unit}s`) - callback(time, endTime) - time = nextTime - } -} - -// this function is VERY HOT as its used in Timeline.js render function -// TODO: check if there are performance implications here -// when "weeks" feature is implemented, this function will be modified heavily - -/** determine the current rendered time unit based on timeline time span - * - * zoom: (in milliseconds) difference between time start and time end of timeline canvas - * width: (in pixels) pixel width of timeline canvas - * timeSteps: map of timeDividers with number to indicate step of each divider - */ - -// the smallest cell we want to render is 17px -// this can be manipulated to make the breakpoints change more/less -// i.e. on zoom how often do we switch to the next unit of time -// i think this is the distance between cell lines -export const minCellWidth = 17 - -export function getMinUnit(zoom, width, timeSteps) { - // for supporting weeks, its important to remember that each of these - // units has a natural progression to the other. i.e. a year is 12 months - // a month is 24 days, a day is 24 hours. - // with weeks this isnt the case so weeks needs to be handled specially - let timeDividers = { - second: 1000, - minute: 60, - hour: 60, - day: 24, - month: 30, - year: 12 - } - - let minUnit = 'year' - - // this timespan is in ms initially - let nextTimeSpanInUnitContext = zoom - - Object.keys(timeDividers).some(unit => { - // converts previous time span to current unit - // (e.g. milliseconds to seconds, seconds to minutes, etc) - nextTimeSpanInUnitContext = nextTimeSpanInUnitContext / timeDividers[unit] - - // timeSteps is " - // With what step to display different units. E.g. 15 for minute means only minutes 0, 15, 30 and 45 will be shown." - // how many cells would be rendered given this time span, for this unit? - // e.g. for time span of 60 minutes, and time step of 1, we would render 60 cells - const cellsToBeRenderedForCurrentUnit = - nextTimeSpanInUnitContext / timeSteps[unit] - - // what is happening here? why 3 if time steps are greater than 1?? - const cellWidthToUse = - timeSteps[unit] && timeSteps[unit] > 1 ? 3 * minCellWidth : minCellWidth - - // for the minWidth of a cell, how many cells would be rendered given - // the current pixel width - // i.e. f - const minimumCellsToRenderUnit = width / cellWidthToUse - - if (cellsToBeRenderedForCurrentUnit < minimumCellsToRenderUnit) { - // for the current zoom, the number of cells we'd need to render all parts of this unit - // is less than the minimum number of cells needed at minimum cell width - minUnit = unit - return true - } - }) - - return minUnit -} - -export function getNextUnit(unit) { - let nextUnits = { - second: 'minute', - minute: 'hour', - hour: 'day', - day: 'month', - month: 'year', - year: 'year' - } - if (!nextUnits[unit]) { - throw new Error(`unit ${unit} in not acceptable`) - } - return nextUnits[unit] -} - -/** - * get the new start and new end time of item that is being - * dragged or resized - * @param {*} itemTimeStart original item time in milliseconds - * @param {*} itemTimeEnd original item time in milliseconds - * @param {*} dragTime new start time if item is dragged in milliseconds - * @param {*} isDragging is item being dragged - * @param {*} isResizing is item being resized - * @param {`right` or `left`} resizingEdge resize edge - * @param {*} resizeTime new resize time in milliseconds - */ -export function calculateInteractionNewTimes({ - itemTimeStart, - itemTimeEnd, - dragTime, - isDragging, - isResizing, - resizingEdge, - resizeTime, -}) { - const originalItemRange = itemTimeEnd - itemTimeStart - const itemStart = - isResizing && resizingEdge === 'left' ? resizeTime : itemTimeStart - const itemEnd = - isResizing && resizingEdge === 'right' ? resizeTime : itemTimeEnd - return [ - isDragging ? dragTime : itemStart, - isDragging ? dragTime + originalItemRange : itemEnd - ] -} - -export function calculateDimensions({ - itemTimeStart, - itemTimeEnd, - canvasTimeStart, - canvasTimeEnd, - canvasWidth -}) { - const itemTimeRange = itemTimeEnd - itemTimeStart - - // restrict startTime and endTime to be bounded by canvasTimeStart and canvasTimeEnd - const effectiveStartTime = Math.max(itemTimeStart, canvasTimeStart) - const effectiveEndTime = Math.min(itemTimeEnd, canvasTimeEnd) - - const left = calculateXPositionForTime( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - effectiveStartTime - ) - const right = calculateXPositionForTime( - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - effectiveEndTime - ) - const itemWidth = right - left - - const dimensions = { - left: left, - width: Math.max(itemWidth, 3), - collisionLeft: itemTimeStart, - collisionWidth: itemTimeRange - } - - return dimensions -} - -/** - * Get the order of groups based on their keys - * @param {*} groups array of groups - * @param {*} keys the keys object - * @returns Ordered hash of objects with their array index and group - */ -export function getGroupOrders(groups, keys) { - const { groupIdKey } = keys - - let groupOrders = {} - - for (let i = 0; i < groups.length; i++) { - groupOrders[_get(groups[i], groupIdKey)] = { index: i, group: groups[i] } - } - - return groupOrders -} - -/** - * Adds items relevant to each group to the result of getGroupOrders - * @param {*} items list of all items - * @param {*} groupOrders the result of getGroupOrders - */ -export function getGroupedItems(items, groupOrders) { - var groupedItems = {} - var keys = Object.keys(groupOrders) - // Initialize with result object for each group - for (let i = 0; i < keys.length; i++) { - const groupOrder = groupOrders[keys[i]] - groupedItems[i] = { - index: groupOrder.index, - group: groupOrder.group, - items: [] - } - } - - // Populate groups - for (let i = 0; i < items.length; i++) { - if (items[i].dimensions.order !== undefined) { - const groupItem = groupedItems[items[i].dimensions.order.index] - if (groupItem) { - groupItem.items.push(items[i]) - } - } - } - - return groupedItems -} - -export function getVisibleItems(items, canvasTimeStart, canvasTimeEnd, keys) { - const { itemTimeStartKey, itemTimeEndKey } = keys - - return items.filter(item => { - return ( - _get(item, itemTimeStartKey) <= canvasTimeEnd && - _get(item, itemTimeEndKey) >= canvasTimeStart - ) - }) -} - -const EPSILON = 0.001 - -export function collision(a, b, lineHeight, collisionPadding = EPSILON) { - // 2d collisions detection - https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection - var verticalMargin = 0 - - return ( - a.collisionLeft + collisionPadding < b.collisionLeft + b.collisionWidth && - a.collisionLeft + a.collisionWidth - collisionPadding > b.collisionLeft && - a.top - verticalMargin + collisionPadding < b.top + b.height && - a.top + a.height + verticalMargin - collisionPadding > b.top - ) -} - -/** - * Calculate the position of a given item for a group that each in a line - * is being stacked - */ -export function groupStackInLines( - lineHeight, - item, - items, - groupHeight, - groupTop, - itemIndex -) { - // calculate non-overlapping positions - let verticalMargin = lineHeight - item.dimensions.height - if (item.dimensions.stack && item.dimensions.top === null) { - item.dimensions.top = groupTop + verticalMargin + itemIndex * lineHeight - } - return { - groupHeight: lineHeight * items.length, - verticalMargin, - itemTop: item.dimensions.top - } -} - -/** - * Calculate the position of a given item for a group that - * is being stacked - */ -export function groupStack( - lineHeight, - item, - group, - groupHeight, - groupTop, - itemIndex -) { - // calculate non-overlapping positions - let curHeight = groupHeight - let verticalMargin = (lineHeight - item.dimensions.height) / 2 - if (item.dimensions.stack && item.dimensions.top === null) { - item.dimensions.top = groupTop + verticalMargin - curHeight = Math.max(curHeight, lineHeight) - do { - var collidingItem = null - //Items are placed from i=0 onwards, only check items with index < i - for (var j = itemIndex - 1, jj = 0; j >= jj; j--) { - var other = group[j] - if ( - other.dimensions.top !== null && - other.dimensions.stack && - collision(item.dimensions, other.dimensions, lineHeight) - ) { - collidingItem = other - break - } else { - // console.log('dont test', other.top !== null, other !== item, other.stack); - } - } - - if (collidingItem != null) { - // There is a collision. Reposition the items above the colliding element - item.dimensions.top = collidingItem.dimensions.top + lineHeight - curHeight = Math.max( - curHeight, - item.dimensions.top + item.dimensions.height + verticalMargin - groupTop - ) - } - } while (collidingItem) - } - return { - groupHeight: curHeight, - verticalMargin, - itemTop: item.dimensions.top - } -} - -// Calculate the position of this item for a group that is not being stacked -export function groupNoStack(lineHeight, item, groupHeight, groupTop) { - let verticalMargin = (lineHeight - item.dimensions.height) / 2 - if (item.dimensions.top === null) { - item.dimensions.top = groupTop + verticalMargin - groupHeight = Math.max(groupHeight, lineHeight) - } - return { groupHeight, verticalMargin: 0, itemTop: item.dimensions.top } -} - -function sum(arr = []) { - return arr.reduce((acc, i) => acc + i, 0) -} - -/** - * Stack all groups - * @param {*} items items to be stacked - * @param {*} groupOrders the groupOrders object - * @param {*} lineHeight - * @param {*} stackItems should items be stacked? - */ -export function stackAll(itemsDimensions, groupOrders, lineHeight, stackItems) { - var groupHeights = [] - var groupTops = [] - - var groupedItems = getGroupedItems(itemsDimensions, groupOrders) - - for (var index in groupedItems) { - const groupItems = groupedItems[index] - const { items: itemsDimensions, group } = groupItems - const groupTop = sum(groupHeights) - - // Is group being stacked? - const isGroupStacked = - group.stackItems !== undefined ? group.stackItems : stackItems - const { groupHeight, verticalMargin } = stackGroup( - itemsDimensions, - isGroupStacked, - lineHeight, - groupTop - ) - // If group height is overridden, push new height - // Do this late as item position still needs to be calculated - groupTops.push(groupTop) - if (group.height) { - groupHeights.push(group.height) - } else { - groupHeights.push(Math.max(groupHeight, lineHeight)) - } - } - return { - height: sum(groupHeights), - groupHeights, - groupTops - } -} - -/** - * - * @param {*} itemsDimensions - * @param {*} isGroupStacked - * @param {*} lineHeight - * @param {*} groupTop - */ -export function stackGroup( - itemsDimensions, - isGroupStacked, - lineHeight, - groupTop -) { - var groupHeight = 0 - var verticalMargin = 0 - // Find positions for each item in group - for (let itemIndex = 0; itemIndex < itemsDimensions.length; itemIndex++) { - let r = {} - if (isGroupStacked === 'space') { - r = groupStack( - lineHeight, - itemsDimensions[itemIndex], - itemsDimensions, - groupHeight, - groupTop, - itemIndex - ) - } else if (isGroupStacked === 'lines') { - r = groupStackInLines( - lineHeight, - itemsDimensions[itemIndex], - itemsDimensions, - groupHeight, - groupTop, - itemIndex - ) - } else { - r = groupNoStack( - lineHeight, - itemsDimensions[itemIndex], - groupHeight, - groupTop - ) - } - groupHeight = r.groupHeight - verticalMargin = r.verticalMargin - } - return { groupHeight, verticalMargin } -} - -/** - * Stack the items that will be visible - * within the canvas area - * @param {item[]} items - * @param {group[]} groups - * @param {number} canvasWidth - * @param {number} canvasTimeStart - * @param {number} canvasTimeEnd - * @param {*} keys - * @param {number} lineHeight - * @param {number} itemHeightRatio - * @param {boolean} stackItems - * @param {*} draggingItem - * @param {*} resizingItem - * @param {number} dragTime - * @param {left or right} resizingEdge - * @param {number} resizeTime - * @param {number} newGroupOrder - */ -export function stackTimelineItems( - items, - groups, - canvasWidth, - canvasTimeStart, - canvasTimeEnd, - keys, - lineHeight, - itemHeightRatio, - stackItems, - draggingItem, - resizingItem, - dragTime, - resizingEdge, - resizeTime, - newGroupOrder -) { - const visibleItems = getVisibleItems( - items, - canvasTimeStart, - canvasTimeEnd, - keys - ) - const visibleItemsWithInteraction = visibleItems.map(item => - getItemWithInteractions({ - item, - keys, - draggingItem, - resizingItem, - dragTime, - resizingEdge, - resizeTime, - groups, - newGroupOrder - }) - ) - - // if there are no groups return an empty array of dimensions - if (groups.length === 0) { - return { - dimensionItems: [], - height: 0, - groupHeights: [], - groupTops: [] - } - } - - // Get the order of groups based on their id key - const groupOrders = getGroupOrders(groups, keys) - let dimensionItems = visibleItemsWithInteraction - .map(item => - getItemDimensions({ - item, - keys, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - groupOrders, - lineHeight, - itemHeightRatio - }) - ) - .filter(item => !!item) - // Get a new array of groupOrders holding the stacked items - const { height, groupHeights, groupTops } = stackAll( - dimensionItems, - groupOrders, - lineHeight, - stackItems - ) - return { dimensionItems, height, groupHeights, groupTops } -} - -/** - * get canvas width from visible width - * @param {*} width - * @param {*} buffer - */ -export function getCanvasWidth(width, buffer = 3) { - return width * buffer -} - -/** - * get item's position, dimensions and collisions - * @param {*} item - * @param {*} keys - * @param {*} canvasTimeStart - * @param {*} canvasTimeEnd - * @param {*} canvasWidth - * @param {*} groupOrders - * @param {*} lineHeight - * @param {*} itemHeightRatio - */ -export function getItemDimensions({ - item, - keys, - canvasTimeStart, - canvasTimeEnd, - canvasWidth, - groupOrders, - lineHeight, - itemHeightRatio -}) { - const itemId = _get(item, keys.itemIdKey) - let dimension = calculateDimensions({ - itemTimeStart: _get(item, keys.itemTimeStartKey), - itemTimeEnd: _get(item, keys.itemTimeEndKey), - canvasTimeStart, - canvasTimeEnd, - canvasWidth - }) - if (dimension) { - dimension.top = null - dimension.order = groupOrders[_get(item, keys.itemGroupKey)] - dimension.stack = !item.isOverlay - dimension.height = lineHeight * itemHeightRatio - return { - id: itemId, - dimensions: dimension - } - } -} - -/** - * get new item with changed `itemTimeStart` , `itemTimeEnd` and `itemGroupKey` according to user interaction - * user interaction is dragging an item and resize left and right - * @param {*} item - * @param {*} keys - * @param {*} draggingItem - * @param {*} resizingItem - * @param {*} dragTime - * @param {*} resizingEdge - * @param {*} resizeTime - * @param {*} groups - * @param {*} newGroupOrder - */ -export function getItemWithInteractions({ - item, - keys, - draggingItem, - resizingItem, - dragTime, - resizingEdge, - resizeTime, - groups, - newGroupOrder -}) { - if (!resizingItem && !draggingItem) return item - const itemId = _get(item, keys.itemIdKey) - const isDragging = itemId === draggingItem - const isResizing = itemId === resizingItem - const [itemTimeStart, itemTimeEnd] = calculateInteractionNewTimes({ - itemTimeStart: _get(item, keys.itemTimeStartKey), - itemTimeEnd: _get(item, keys.itemTimeEndKey), - isDragging, - isResizing, - dragTime, - resizingEdge, - resizeTime - }) - const newItem = { - ...item, - [keys.itemTimeStartKey]: itemTimeStart, - [keys.itemTimeEndKey]: itemTimeEnd, - [keys.itemGroupKey]: isDragging - ? _get(groups[newGroupOrder], keys.groupIdKey) - : _get(item, keys.itemGroupKey) - } - return newItem -} - -/** - * get canvas start and end time from visible start and end time - * @param {number} visibleTimeStart - * @param {number} visibleTimeEnd - */ -export function getCanvasBoundariesFromVisibleTime( - visibleTimeStart, - visibleTimeEnd -) { - const zoom = visibleTimeEnd - visibleTimeStart - const canvasTimeStart = visibleTimeStart - (visibleTimeEnd - visibleTimeStart) - const canvasTimeEnd = canvasTimeStart + zoom * 3 - return [canvasTimeStart, canvasTimeEnd] -} - -/** - * Get the the canvas area for a given visible time - * Will shift the start/end of the canvas if the visible time - * does not fit within the existing - * @param {number} visibleTimeStart - * @param {number} visibleTimeEnd - * @param {boolean} forceUpdateDimensions - * @param {*} items - * @param {*} groups - * @param {*} props - * @param {*} state - */ -export function calculateScrollCanvas( - visibleTimeStart, - visibleTimeEnd, - forceUpdateDimensions, - items, - groups, - props, - state -) { - const oldCanvasTimeStart = state.canvasTimeStart - const oldZoom = state.visibleTimeEnd - state.visibleTimeStart - const newZoom = visibleTimeEnd - visibleTimeStart - const newState = { visibleTimeStart, visibleTimeEnd } - - // Check if the current canvas covers the new times - const canKeepCanvas = - newZoom === oldZoom && - visibleTimeStart >= oldCanvasTimeStart + oldZoom * 0.5 && - visibleTimeStart <= oldCanvasTimeStart + oldZoom * 1.5 && - visibleTimeEnd >= oldCanvasTimeStart + oldZoom * 1.5 && - visibleTimeEnd <= oldCanvasTimeStart + oldZoom * 2.5 - - if (!canKeepCanvas || forceUpdateDimensions) { - const [canvasTimeStart, canvasTimeEnd] = getCanvasBoundariesFromVisibleTime( - visibleTimeStart, - visibleTimeEnd - ) - newState.canvasTimeStart = canvasTimeStart - newState.canvasTimeEnd = canvasTimeEnd - const mergedState = { - ...state, - ...newState - } - - const canvasWidth = getCanvasWidth(mergedState.width) - - // The canvas cannot be kept, so calculate the new items position - Object.assign( - newState, - stackTimelineItems( - items, - groups, - canvasWidth, - mergedState.canvasTimeStart, - mergedState.canvasTimeEnd, - props.keys, - props.lineHeight, - props.itemHeightRatio, - props.stackItems, - mergedState.draggingItem, - mergedState.resizingItem, - mergedState.dragTime, - mergedState.resizingEdge, - mergedState.resizeTime, - mergedState.newGroupOrder - ) - ) - } - return newState -} +import moment from 'moment' +import { _get } from './generic' + +/** + * Calculate the ms / pixel ratio of the timeline state + * @param {number} canvasTimeStart + * @param {number} canvasTimeEnd + * @param {number} canvasWidth + * @returns {number} + */ +export function coordinateToTimeRatio( + canvasTimeStart, + canvasTimeEnd, + canvasWidth +) { + return (canvasTimeEnd - canvasTimeStart) / canvasWidth +} + +/** + * For a given time, calculate the pixel position given timeline state + * (timeline width in px, canvas time range) + * @param {number} canvasTimeStart + * @param {number} canvasTimeEnd + * @param {number} canvasWidth + * @param {number} time + * @returns {number} + */ +export function calculateXPositionForTime( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + time +) { + const widthToZoomRatio = canvasWidth / (canvasTimeEnd - canvasTimeStart) + const timeOffset = time - canvasTimeStart + + return timeOffset * widthToZoomRatio +} + +/** + * For a given x position (leftOffset) in pixels, calculate time based on + * timeline state (timeline width in px, canvas time range) + * @param {number} canvasTimeStart + * @param {number} canvasTimeEnd + * @param {number} canvasWidth + * @param {number} leftOffset + * @returns {number} + */ +export function calculateTimeForXPosition( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + leftOffset +) { + const timeToPxRatio = (canvasTimeEnd - canvasTimeStart) / canvasWidth + + const timeFromCanvasTimeStart = timeToPxRatio * leftOffset + + return timeFromCanvasTimeStart + canvasTimeStart +} + +export function iterateTimes(start, end, unit, timeSteps, callback) { + let time = moment(start).startOf(unit) + + if (timeSteps[unit] && timeSteps[unit] > 1) { + let value = time.get(unit) + time.set(unit, value - value % timeSteps[unit]) + } + + while (time.valueOf() < end) { + let nextTime = moment(time).add(timeSteps[unit] || 1, `${unit}s`).startOf(`${unit}s`); + let endTime = moment(time).endOf(`${unit}s`) + callback(time, endTime) + time = nextTime + } +} + +// this function is VERY HOT as its used in Timeline.js render function +// TODO: check if there are performance implications here +// when "weeks" feature is implemented, this function will be modified heavily + +/** determine the current rendered time unit based on timeline time span + * + * zoom: (in milliseconds) difference between time start and time end of timeline canvas + * width: (in pixels) pixel width of timeline canvas + * timeSteps: map of timeDividers with number to indicate step of each divider + */ + +// the smallest cell we want to render is 17px +// this can be manipulated to make the breakpoints change more/less +// i.e. on zoom how often do we switch to the next unit of time +// i think this is the distance between cell lines +export const minCellWidth = 17 + +export function getMinUnit(zoom, width, timeSteps) { + // for supporting weeks, its important to remember that each of these + // units has a natural progression to the other. i.e. a year is 12 months + // a month is 24 days, a day is 24 hours. + // with weeks this isnt the case so weeks needs to be handled specially + let timeDividers = { + second: 1000, + minute: 60, + hour: 60, + day: 24, + month: 30, + year: 12 + } + + let minUnit = 'year' + + // this timespan is in ms initially + let nextTimeSpanInUnitContext = zoom + + Object.keys(timeDividers).some(unit => { + // converts previous time span to current unit + // (e.g. milliseconds to seconds, seconds to minutes, etc) + nextTimeSpanInUnitContext = nextTimeSpanInUnitContext / timeDividers[unit] + + // timeSteps is " + // With what step to display different units. E.g. 15 for minute means only minutes 0, 15, 30 and 45 will be shown." + // how many cells would be rendered given this time span, for this unit? + // e.g. for time span of 60 minutes, and time step of 1, we would render 60 cells + const cellsToBeRenderedForCurrentUnit = + nextTimeSpanInUnitContext / timeSteps[unit] + + // what is happening here? why 3 if time steps are greater than 1?? + const cellWidthToUse = + timeSteps[unit] && timeSteps[unit] > 1 ? 3 * minCellWidth : minCellWidth + + // for the minWidth of a cell, how many cells would be rendered given + // the current pixel width + // i.e. f + const minimumCellsToRenderUnit = width / cellWidthToUse + + if (cellsToBeRenderedForCurrentUnit < minimumCellsToRenderUnit) { + // for the current zoom, the number of cells we'd need to render all parts of this unit + // is less than the minimum number of cells needed at minimum cell width + minUnit = unit + return true + } + }) + + return minUnit +} + +export function getNextUnit(unit) { + let nextUnits = { + second: 'minute', + minute: 'hour', + hour: 'day', + day: 'month', + month: 'year', + year: 'year' + } + if (!nextUnits[unit]) { + throw new Error(`unit ${unit} in not acceptable`) + } + return nextUnits[unit] +} + +/** + * get the new start and new end time of item that is being + * dragged or resized + * @param {*} itemTimeStart original item time in milliseconds + * @param {*} itemTimeEnd original item time in milliseconds + * @param {*} dragTime new start time if item is dragged in milliseconds + * @param {*} isDragging is item being dragged + * @param {*} isResizing is item being resized + * @param {`right` or `left`} resizingEdge resize edge + * @param {*} resizeTime new resize time in milliseconds + */ +export function calculateInteractionNewTimes({ + itemTimeStart, + itemTimeEnd, + dragTime, + isDragging, + isResizing, + resizingEdge, + resizeTime +}) { + const originalItemRange = itemTimeEnd - itemTimeStart + const itemStart = + isResizing && resizingEdge === 'left' ? resizeTime : itemTimeStart + const itemEnd = + isResizing && resizingEdge === 'right' ? resizeTime : itemTimeEnd + return [ + isDragging ? dragTime : itemStart, + isDragging ? dragTime + originalItemRange : itemEnd + ] +} + +export function calculateDimensions({ + itemTimeStart, + itemTimeEnd, + canvasTimeStart, + canvasTimeEnd, + canvasWidth +}) { + const itemTimeRange = itemTimeEnd - itemTimeStart + + // restrict startTime and endTime to be bounded by canvasTimeStart and canvasTimeEnd + const effectiveStartTime = Math.max(itemTimeStart, canvasTimeStart) + const effectiveEndTime = Math.min(itemTimeEnd, canvasTimeEnd) + + const left = calculateXPositionForTime( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + effectiveStartTime + ) + const right = calculateXPositionForTime( + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + effectiveEndTime + ) + const itemWidth = right - left + + const dimensions = { + left: left, + width: Math.max(itemWidth, 3), + collisionLeft: itemTimeStart, + collisionWidth: itemTimeRange + } + + return dimensions +} + +/** + * Get the order of groups based on their keys + * @param {*} groups array of groups + * @param {*} keys the keys object + * @returns Ordered hash of objects with their array index and group + */ +export function getGroupOrders(groups, keys) { + const { groupIdKey } = keys + + let groupOrders = {} + + for (let i = 0; i < groups.length; i++) { + groupOrders[_get(groups[i], groupIdKey)] = { index: i, group: groups[i] } + } + + return groupOrders +} + +/** + * Adds items relevant to each group to the result of getGroupOrders + * @param {*} items list of all items + * @param {*} groupOrders the result of getGroupOrders + */ +export function getGroupedItems(items, groupOrders) { + var groupedItems = {} + var keys = Object.keys(groupOrders) + // Initialize with result object for each group + for (let i = 0; i < keys.length; i++) { + const groupOrder = groupOrders[keys[i]] + groupedItems[i] = { + index: groupOrder.index, + group: groupOrder.group, + items: [] + } + } + + // Populate groups + for (let i = 0; i < items.length; i++) { + if (items[i].dimensions.order !== undefined) { + const groupItem = groupedItems[items[i].dimensions.order.index] + if (groupItem) { + groupItem.items.push(items[i]) + } + } + } + + return groupedItems +} + +export function getVisibleItems(items, canvasTimeStart, canvasTimeEnd, keys) { + const { itemTimeStartKey, itemTimeEndKey } = keys + + return items.filter(item => { + return ( + _get(item, itemTimeStartKey) <= canvasTimeEnd && + _get(item, itemTimeEndKey) >= canvasTimeStart + ) + }) +} + +const EPSILON = 0.001 + +export function collision(a, b, lineHeight, collisionPadding = EPSILON) { + // 2d collisions detection - https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection + var verticalMargin = 0 + + return ( + a.collisionLeft + collisionPadding < b.collisionLeft + b.collisionWidth && + a.collisionLeft + a.collisionWidth - collisionPadding > b.collisionLeft && + a.top - verticalMargin + collisionPadding < b.top + b.height && + a.top + a.height + verticalMargin - collisionPadding > b.top + ) +} + +/** + * Calculate the position of a given item for a group that + * is being stacked + */ +export function groupStack( + lineHeight, + item, + group, + groupHeight, + groupTop, + itemIndex +) { + // calculate non-overlapping positions + let curHeight = groupHeight + let verticalMargin = (lineHeight - item.dimensions.height) / 2 + if (item.dimensions.stack && item.dimensions.top === null) { + item.dimensions.top = groupTop + verticalMargin + curHeight = Math.max(curHeight, lineHeight) + do { + var collidingItem = null + //Items are placed from i=0 onwards, only check items with index < i + for (var j = itemIndex - 1, jj = 0; j >= jj; j--) { + var other = group[j] + if ( + other.dimensions.top !== null && + other.dimensions.stack && + collision(item.dimensions, other.dimensions, lineHeight) + ) { + collidingItem = other + break + } else { + // console.log('dont test', other.top !== null, other !== item, other.stack); + } + } + + if (collidingItem != null) { + // There is a collision. Reposition the items above the colliding element + item.dimensions.top = collidingItem.dimensions.top + lineHeight + curHeight = Math.max( + curHeight, + item.dimensions.top + item.dimensions.height + verticalMargin - groupTop + ) + } + } while (collidingItem) + } + return { + groupHeight: curHeight, + verticalMargin, + itemTop: item.dimensions.top + } + +} + +// Calculate the position of this item for a group that is not being stacked +export function groupNoStack(lineHeight, item, groupHeight, groupTop) { + let verticalMargin = (lineHeight - item.dimensions.height) / 2 + if (item.dimensions.top === null) { + item.dimensions.top = groupTop + verticalMargin + groupHeight = Math.max(groupHeight, lineHeight) + } + return { groupHeight, verticalMargin: 0, itemTop: item.dimensions.top } +} + +function sum(arr = []) { + return arr.reduce((acc, i) => acc + i, 0) +} + +/** + * Stack all groups + * @param {*} items items to be stacked + * @param {*} groupOrders the groupOrders object + * @param {*} lineHeight + * @param {*} stackItems should items be stacked? + */ +export function stackAll(itemsDimensions, groupOrders, lineHeight, stackItems) { + var groupHeights = [] + var groupTops = [] + + var groupedItems = getGroupedItems(itemsDimensions, groupOrders) + + for (var index in groupedItems) { + const groupItems = groupedItems[index] + const { items: itemsDimensions, group } = groupItems + const groupTop = sum(groupHeights) + + // Is group being stacked? + const isGroupStacked = + group.stackItems !== undefined ? group.stackItems : stackItems + const { groupHeight } = stackGroup( + itemsDimensions, + isGroupStacked, + lineHeight, + groupTop + ) + // If group height is overridden, push new height + // Do this late as item position still needs to be calculated + groupTops.push(groupTop) + if (group.height) { + groupHeights.push(group.height) + } else { + groupHeights.push(Math.max(groupHeight, lineHeight)) + } + } + + return { + height: sum(groupHeights), + groupHeights, + groupTops + } +} + +/** + * + * @param {*} itemsDimensions + * @param {*} isGroupStacked + * @param {*} lineHeight + * @param {*} groupTop + */ +export function stackGroup(itemsDimensions, isGroupStacked, lineHeight, groupTop) { + var groupHeight = 0 + var verticalMargin = 0 + // Find positions for each item in group + for (let itemIndex = 0; itemIndex < itemsDimensions.length; itemIndex++) { + let r = {} + if (isGroupStacked) { + r = groupStack( + lineHeight, + itemsDimensions[itemIndex], + itemsDimensions, + groupHeight, + groupTop, + itemIndex + ) + } else { + r = groupNoStack(lineHeight, itemsDimensions[itemIndex], groupHeight, groupTop) + } + groupHeight = r.groupHeight + verticalMargin = r.verticalMargin + } + return { groupHeight, verticalMargin } +} + +/** + * Stack the items that will be visible + * within the canvas area + * @param {item[]} items + * @param {group[]} groups + * @param {number} canvasWidth + * @param {number} canvasTimeStart + * @param {number} canvasTimeEnd + * @param {*} keys + * @param {number} lineHeight + * @param {number} itemHeightRatio + * @param {boolean} stackItems + * @param {*} draggingItem + * @param {*} resizingItem + * @param {number} dragTime + * @param {left or right} resizingEdge + * @param {number} resizeTime + * @param {number} newGroupOrder + */ +export function stackTimelineItems( + items, + groups, + canvasWidth, + canvasTimeStart, + canvasTimeEnd, + keys, + lineHeight, + itemHeightRatio, + stackItems, + draggingItem, + resizingItem, + dragTime, + resizingEdge, + resizeTime, + newGroupOrder +) { + const visibleItems = getVisibleItems( + items, + canvasTimeStart, + canvasTimeEnd, + keys + ) + const visibleItemsWithInteraction = visibleItems.map(item => + getItemWithInteractions({ + item, + keys, + draggingItem, + resizingItem, + dragTime, + resizingEdge, + resizeTime, + groups, + newGroupOrder + }) + ) + + // if there are no groups return an empty array of dimensions + if (groups.length === 0) { + return { + dimensionItems: [], + height: 0, + groupHeights: [], + groupTops: [] + } + } + + // Get the order of groups based on their id key + const groupOrders = getGroupOrders(groups, keys) + let dimensionItems = visibleItemsWithInteraction + .map(item => + getItemDimensions({ + item, + keys, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + groupOrders, + lineHeight, + itemHeightRatio + }) + ) + .filter(item => !!item) + // Get a new array of groupOrders holding the stacked items + const { height, groupHeights, groupTops } = stackAll( + dimensionItems, + groupOrders, + lineHeight, + stackItems + ) + return { dimensionItems, height, groupHeights, groupTops } +} + +/** + * get canvas width from visible width + * @param {*} width + * @param {*} buffer + */ +export function getCanvasWidth(width, buffer) { + return width * buffer +} + +/** + * get item's position, dimensions and collisions + * @param {*} item + * @param {*} keys + * @param {*} canvasTimeStart + * @param {*} canvasTimeEnd + * @param {*} canvasWidth + * @param {*} groupOrders + * @param {*} lineHeight + * @param {*} itemHeightRatio + */ +export function getItemDimensions({ + item, + keys, + canvasTimeStart, + canvasTimeEnd, + canvasWidth, + groupOrders, + lineHeight, + itemHeightRatio +}) { + const itemId = _get(item, keys.itemIdKey) + let dimension = calculateDimensions({ + itemTimeStart: _get(item, keys.itemTimeStartKey), + itemTimeEnd: _get(item, keys.itemTimeEndKey), + canvasTimeStart, + canvasTimeEnd, + canvasWidth + }) + if (dimension) { + dimension.top = null + dimension.order = groupOrders[_get(item, keys.itemGroupKey)] + dimension.stack = !item.isOverlay + dimension.height = lineHeight * itemHeightRatio + return { + id: itemId, + dimensions: dimension + } + } +} + +/** + * get new item with changed `itemTimeStart` , `itemTimeEnd` and `itemGroupKey` according to user interaction + * user interaction is dragging an item and resize left and right + * @param {*} item + * @param {*} keys + * @param {*} draggingItem + * @param {*} resizingItem + * @param {*} dragTime + * @param {*} resizingEdge + * @param {*} resizeTime + * @param {*} groups + * @param {*} newGroupOrder + */ +export function getItemWithInteractions({ + item, + keys, + draggingItem, + resizingItem, + dragTime, + resizingEdge, + resizeTime, + groups, + newGroupOrder +}) { + if (!resizingItem && !draggingItem) return item + const itemId = _get(item, keys.itemIdKey) + const isDragging = itemId === draggingItem + const isResizing = itemId === resizingItem + const [itemTimeStart, itemTimeEnd] = calculateInteractionNewTimes({ + itemTimeStart: _get(item, keys.itemTimeStartKey), + itemTimeEnd: _get(item, keys.itemTimeEndKey), + isDragging, + isResizing, + dragTime, + resizingEdge, + resizeTime + }) + const newItem = { + ...item, + [keys.itemTimeStartKey]: itemTimeStart, + [keys.itemTimeEndKey]: itemTimeEnd, + [keys.itemGroupKey]: isDragging + ? _get(groups[newGroupOrder], keys.groupIdKey) + : _get(item, keys.itemGroupKey) + } + return newItem +} + +/** + * get canvas start and end time from visible start and end time + * @param {number} visibleTimeStart + * @param {number} visibleTimeEnd + */ +export function getCanvasBoundariesFromVisibleTime( + visibleTimeStart, + visibleTimeEnd, + buffer, +) { + const zoom = visibleTimeEnd - visibleTimeStart + // buffer - 1 (1 is visible area) divided by 2 (2 is the buffer split on the right and left of the timeline) + const canvasTimeStart = visibleTimeStart - (zoom * (buffer - 1 )/2) + const canvasTimeEnd = canvasTimeStart + zoom * buffer + return [canvasTimeStart, canvasTimeEnd] +} + +/** + * Get the the canvas area for a given visible time + * Will shift the start/end of the canvas if the visible time + * does not fit within the existing + * @param {number} visibleTimeStart + * @param {number} visibleTimeEnd + * @param {boolean} forceUpdateDimensions + * @param {*} items + * @param {*} groups + * @param {*} props + * @param {*} state + */ +export function calculateScrollCanvas( + visibleTimeStart, + visibleTimeEnd, + forceUpdateDimensions, + items, + groups, + props, + state +) { + const buffer = props.buffer; + const oldCanvasTimeStart = state.canvasTimeStart + const oldCanvasTimeEnd = state.canvasTimeEnd + const oldZoom = state.visibleTimeEnd - state.visibleTimeStart + const newZoom = visibleTimeEnd - visibleTimeStart + const newState = { visibleTimeStart, visibleTimeEnd } + + // Check if the current canvas covers the new times + const canKeepCanvas = + newZoom === oldZoom && + visibleTimeStart >= oldCanvasTimeStart + oldZoom * 0.5 && + visibleTimeStart <= oldCanvasTimeEnd - oldZoom * 1.5 && + visibleTimeEnd >= oldCanvasTimeStart + oldZoom * 1.5 && + visibleTimeEnd <= oldCanvasTimeEnd - oldZoom * 0.5 + + if (!canKeepCanvas || forceUpdateDimensions) { + const [canvasTimeStart, canvasTimeEnd] = getCanvasBoundariesFromVisibleTime( + visibleTimeStart, + visibleTimeEnd, + buffer + ) + newState.canvasTimeStart = canvasTimeStart + newState.canvasTimeEnd = canvasTimeEnd + const mergedState = { + ...state, + ...newState + } + + const canvasWidth = getCanvasWidth(mergedState.width, props.buffer) + + // The canvas cannot be kept, so calculate the new items position + Object.assign( + newState, + stackTimelineItems( + items, + groups, + canvasWidth, + mergedState.canvasTimeStart, + mergedState.canvasTimeEnd, + props.keys, + props.lineHeight, + props.itemHeightRatio, + props.stackItems, + mergedState.draggingItem, + mergedState.resizingItem, + mergedState.dragTime, + mergedState.resizingEdge, + mergedState.resizeTime, + mergedState.newGroupOrder + ) + ) + } + return newState +} diff --git a/src/lib/utility/dom-helpers.js b/src/lib/utility/dom-helpers.js index 36a85c652..127355f6c 100644 --- a/src/lib/utility/dom-helpers.js +++ b/src/lib/utility/dom-helpers.js @@ -37,7 +37,7 @@ export function getSumScroll(node) { } export function getSumOffset(node) { - if (node === document.body) { + if (node === document.body || !node.offsetParent) { return {offsetLeft: 0, offsetTop: 0} } else { const parent = getSumOffset(node.offsetParent) diff --git a/src/lib/utility/generic.js b/src/lib/utility/generic.js index 3e4ae1527..244aee917 100644 --- a/src/lib/utility/generic.js +++ b/src/lib/utility/generic.js @@ -1,36 +1,36 @@ -import isEqual from 'lodash.isequal' - -// so we could use both immutable.js objects and regular objects - -export function _get(object, key) { - return typeof object.get === 'function' ? object.get(key) : object[key] -} - -export function _length(object) { - return typeof object.count === 'function' ? object.count() : object.length -} - -export function arraysEqual(array1, array2) { - return ( - _length(array1) === _length(array2) && - array1.every((element, index) => { - return element === _get(array2, index) - }) - ) -} - -export function deepObjectCompare(obj1, obj2) { - return isEqual(obj1, obj2) -} - -export function keyBy(value, key) { - let obj = {} - - value.forEach(function(element) { - obj[element[key]] = element - }) - - return obj -} - -export function noop() {} +import isEqual from 'lodash.isequal' + +// so we could use both immutable.js objects and regular objects + +export function _get(object, key) { + return typeof object.get === 'function' ? object.get(key) : object[key] +} + +export function _length(object) { + return typeof object.count === 'function' ? object.count() : object.length +} + +export function arraysEqual(array1, array2) { + return ( + _length(array1) === _length(array2) && + array1.every((element, index) => { + return element === _get(array2, index) + }) + ) +} + +export function deepObjectCompare(obj1, obj2) { + return isEqual(obj1, obj2) +} + +export function keyBy(value, key) { + let obj = {} + + value.forEach(function(element) { + obj[element[key]] = element + }) + + return obj +} + +export function noop() {} diff --git a/src/resize-detector/container.js b/src/resize-detector/container.js index 0adfc67cf..f1f1c4905 100644 --- a/src/resize-detector/container.js +++ b/src/resize-detector/container.js @@ -1,24 +1,24 @@ -import elementResizeDetectorMaker from 'element-resize-detector' - -function addListener(component) { - component._erd = elementResizeDetectorMaker({ - strategy: 'scroll' - }) - - component._erdWidth = component.container.offsetWidth - - component._erd.listenTo(component.container, element => { - var width = element.offsetWidth - - if (component._erdWidth !== width) { - component.resize(component.props) - component._erdWidth = width - } - }) -} - -function removeListener(component) { - component._erd.removeAllListeners(component.container) -} - -export default { addListener, removeListener } +import elementResizeDetectorMaker from 'element-resize-detector' + +function addListener(component) { + component._erd = elementResizeDetectorMaker({ + strategy: 'scroll' + }) + + component._erdWidth = component.container.offsetWidth + + component._erd.listenTo(component.container, element => { + var width = element.offsetWidth + + if (component._erdWidth !== width) { + component.resize(component.props) + component._erdWidth = width + } + }) +} + +function removeListener(component) { + component._erd.removeAllListeners(component.container) +} + +export default { addListener, removeListener } diff --git a/src/resize-detector/window.js b/src/resize-detector/window.js index 078769ca8..903600656 100644 --- a/src/resize-detector/window.js +++ b/src/resize-detector/window.js @@ -1,15 +1,15 @@ -function addListener(component) { - component._resizeEventListener = { - handleEvent: () => { - component.resize() - } - } - - window.addEventListener('resize', component._resizeEventListener) -} - -function removeListener(component) { - window.removeEventListener('resize', component._resizeEventListener) -} - -export default { addListener, removeListener } +function addListener(component) { + component._resizeEventListener = { + handleEvent: () => { + component.resize() + } + } + + window.addEventListener('resize', component._resizeEventListener) +} + +function removeListener(component) { + window.removeEventListener('resize', component._resizeEventListener) +} + +export default { addListener, removeListener } diff --git a/webpack.config.js b/webpack.config.js index 439be1be9..e170b2073 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,9 +1,8 @@ const path = require('path') -const port = process.env.PORT || 8888 +const port = process.env.PORT || 4000 const config = { - devtool: 'source-map', context: path.join(__dirname, './demo'), entry: { // vendor: ['react', 'react-dom', 'faker', 'interactjs', 'moment'], @@ -24,12 +23,12 @@ const config = { rules: [ { test: /\.scss$/, - loader: 'style-loader!css-loader!sass-loader' + use: ['style-loader','css-loader','sass-loader'] }, { test: /\.(js|jsx)$/, exclude: /node_modules/, - loaders: ['babel-loader'] + loader: 'babel-loader' } ] }, @@ -46,7 +45,9 @@ const config = { } }, devServer: { - contentBase: './demo', + static: { + directory: './demo' + }, port } } diff --git a/yarn.lock b/yarn.lock index 2ce970fe8..287128de2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,1125 +2,1677 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.37" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.37.tgz#2da1dd3b1b57bfdea777ddc378df7cd12fe40171" +"@babel/cli@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.0.tgz#f403c930692e28ecfa3bf02a9e7562b474f38271" dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + lodash "^4.17.11" + mkdirp "^0.5.1" + output-file-sync "^2.0.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + chokidar "^2.0.4" -"@types/node@*": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.3.0.tgz#3a129cda7c4e5df2409702626892cb4b96546dd5" +"@babel/code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0", "@babel/core@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.0.tgz#6ed6a2881ad48a732c5433096d96d1b0ee5eb734" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/helpers" "^7.5.0" + "@babel/parser" "^7.5.0" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.0" + "@babel/types" "^7.5.0" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.11" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" -"@webassemblyjs/ast@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25" +"@babel/generator@^7.4.0", "@babel/generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.0.tgz#f20e4b7a91750ee8b63656073d843d2a736dca4a" dependencies: - "@webassemblyjs/helper-module-context" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/wast-parser" "1.5.13" - debug "^3.1.0" - mamacro "^0.0.3" - -"@webassemblyjs/floating-point-hex-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz#29ce0baa97411f70e8cce68ce9c0f9d819a4e298" - -"@webassemblyjs/helper-api-error@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz#e49b051d67ee19a56e29b9aa8bd949b5b4442a59" + "@babel/types" "^7.5.0" + jsesc "^2.5.1" + lodash "^4.17.11" + source-map "^0.5.0" + trim-right "^1.0.1" -"@webassemblyjs/helper-buffer@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz#873bb0a1b46449231137c1262ddfd05695195a1e" +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" dependencies: - debug "^3.1.0" + "@babel/types" "^7.0.0" -"@webassemblyjs/helper-code-frame@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz#1bd2181b6a0be14e004f0fe9f5a660d265362b58" +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" dependencies: - "@webassemblyjs/wast-printer" "1.5.13" + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" -"@webassemblyjs/helper-fsm@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz#cdf3d9d33005d543a5c5e5adaabf679ffa8db924" +"@babel/helper-builder-react-jsx@^7.3.0": + version "7.3.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz#a1ac95a5d2b3e88ae5e54846bf462eeb81b318a4" + dependencies: + "@babel/types" "^7.3.0" + esutils "^2.0.0" -"@webassemblyjs/helper-module-context@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz#dc29ddfb51ed657655286f94a5d72d8a489147c5" +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" dependencies: - debug "^3.1.0" - mamacro "^0.0.3" + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" -"@webassemblyjs/helper-wasm-bytecode@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz#03245817f0a762382e61733146f5773def15a747" +"@babel/helper-create-class-features-plugin@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz#02edb97f512d44ba23b3227f1bf2ed43454edac5" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" -"@webassemblyjs/helper-wasm-section@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz#efc76f44a10d3073b584b43c38a179df173d5c7d" +"@babel/helper-define-map@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" - debug "^3.1.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.4.4" + lodash "^4.17.11" -"@webassemblyjs/ieee754@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz#573e97c8c12e4eebb316ca5fde0203ddd90b0364" +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" dependencies: - ieee754 "^1.1.11" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -"@webassemblyjs/leb128@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.13.tgz#ab52ebab9cec283c1c1897ac1da833a04a3f4cee" +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" dependencies: - long "4.0.0" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -"@webassemblyjs/utf8@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.13.tgz#6b53d2cd861cf94fa99c1f12779dde692fbc2469" +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + dependencies: + "@babel/types" "^7.0.0" -"@webassemblyjs/wasm-edit@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz#c9cef5664c245cf11b3b3a73110c9155831724a8" +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/helper-wasm-section" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" - "@webassemblyjs/wasm-opt" "1.5.13" - "@webassemblyjs/wasm-parser" "1.5.13" - "@webassemblyjs/wast-printer" "1.5.13" - debug "^3.1.0" + "@babel/types" "^7.4.4" -"@webassemblyjs/wasm-gen@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz#8e6ea113c4b432fa66540189e79b16d7a140700e" +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/ieee754" "1.5.13" - "@webassemblyjs/leb128" "1.5.13" - "@webassemblyjs/utf8" "1.5.13" + "@babel/types" "^7.0.0" -"@webassemblyjs/wasm-opt@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz#147aad7717a7ee4211c36b21a5f4c30dddf33138" +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" - "@webassemblyjs/wasm-parser" "1.5.13" - debug "^3.1.0" + "@babel/types" "^7.0.0" -"@webassemblyjs/wasm-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz#6f46516c5bb23904fbdf58009233c2dd8a54c72f" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-api-error" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/ieee754" "1.5.13" - "@webassemblyjs/leb128" "1.5.13" - "@webassemblyjs/utf8" "1.5.13" - -"@webassemblyjs/wast-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz#5727a705d397ae6a3ae99d7f5460acf2ec646eea" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/floating-point-hex-parser" "1.5.13" - "@webassemblyjs/helper-api-error" "1.5.13" - "@webassemblyjs/helper-code-frame" "1.5.13" - "@webassemblyjs/helper-fsm" "1.5.13" - long "^3.2.0" - mamacro "^0.0.3" - -"@webassemblyjs/wast-printer@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz#bb34d528c14b4f579e7ec11e793ec50ad7cd7c95" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/wast-parser" "1.5.13" - long "^3.2.0" +"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.4.4" + lodash "^4.17.11" -abab@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + dependencies: + "@babel/types" "^7.0.0" -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" -accepts@~1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" +"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" dependencies: - mime-types "~2.1.16" - negotiator "0.6.1" + lodash "^4.17.11" -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" -acorn-dynamic-import@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" +"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" dependencies: - acorn "^5.0.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" -acorn-globals@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" dependencies: - acorn "^5.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" dependencies: - acorn "^3.0.4" + "@babel/types" "^7.4.4" -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +"@babel/helper-wrap-function@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.2.0" -acorn@^5.0.0, acorn@^5.1.2, acorn@^5.2.1: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" +"@babel/helpers@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.0.tgz#7f0c17666e7ed8355ed6eff643dde12fb681ddb4" + dependencies: + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.0" + "@babel/types" "^7.5.0" -acorn@^5.6.2: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +"@babel/highlight@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" -ajv-keywords@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" +"@babel/plugin-proposal-class-properties@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz#5bc6a0537d286fcb4fd4e89975adbca334987007" dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" + "@babel/helper-create-class-features-plugin" "^7.5.0" + "@babel/helper-plugin-utils" "^7.0.0" -ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" +"@babel/plugin-proposal-dynamic-import@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" -ajv@^6.1.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" +"@babel/plugin-proposal-object-rest-spread@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.2.tgz#ec92b0c6419074ea7af77c78b7c5d42041f2f5a9" dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz#501ffd9826c0b91da22690720722ac7cb1ca9c78" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" -ansi-escapes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" +"@babel/plugin-syntax-dynamic-import@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" +"@babel/plugin-syntax-jsx@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz#0b85a3b4bc7cdf4cc4b8bf236335b907ca22e7c7" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -ansi-styles@^3.1.0, ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" dependencies: - color-convert "^1.9.0" + "@babel/helper-plugin-utils" "^7.0.0" -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" +"@babel/plugin-transform-arrow-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" dependencies: - color-convert "^1.9.0" + "@babel/helper-plugin-utils" "^7.0.0" -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" +"@babel/plugin-transform-async-to-generator@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz#89a3848a0166623b5bc481164b5936ab947e887e" dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" + "@babel/helper-plugin-utils" "^7.0.0" -append-transform@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" +"@babel/plugin-transform-block-scoping@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" dependencies: - default-require-extensions "^2.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.11" -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" +"@babel/plugin-transform-classes@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.4.4" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" + globals "^11.1.0" -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" + "@babel/helper-plugin-utils" "^7.0.0" -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" +"@babel/plugin-transform-destructuring@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz#f6c09fdfe3f94516ff074fe877db7bc9ef05855a" dependencies: - sprintf-js "~1.0.2" + "@babel/helper-plugin-utils" "^7.0.0" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" +"@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" dependencies: - arr-flatten "^1.0.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" +"@babel/plugin-transform-duplicate-keys@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz#c5dbf5106bf84cdf691222c0974c12b1df931853" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +"@babel/plugin-transform-member-expression-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" +"@babel/plugin-transform-modules-amd@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" -array-includes@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" +"@babel/plugin-transform-modules-commonjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz#425127e6045231360858eeaa47a71d75eded7a74" dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" + "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + babel-plugin-dynamic-import-node "^2.3.0" -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" +"@babel/plugin-transform-modules-systemjs@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz#e75266a13ef94202db2a0620977756f51d52d249" dependencies: - array-uniq "^1.0.1" + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + babel-plugin-dynamic-import-node "^2.3.0" -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +"@babel/plugin-transform-named-capturing-groups-regex@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz#9d269fd28a370258199b4294736813a60bbdd106" + dependencies: + regexp-tree "^0.1.6" -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -arrify@^1.0.0, arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + dependencies: + "@babel/helper-call-delegate" "^7.4.4" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" + "@babel/helper-plugin-utils" "^7.0.0" -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +"@babel/plugin-transform-react-display-name@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" -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" +"@babel/plugin-transform-react-jsx-self@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.2.0.tgz#461e21ad9478f1031dd5e276108d027f1b5240ba" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +"@babel/plugin-transform-react-jsx-source@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.5.0.tgz#583b10c49cf057e237085bcbd8cc960bd83bd96b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" + +"@babel/plugin-transform-react-jsx@^7.0.0": + version "7.3.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz#f2cab99026631c767e2745a5368b331cfe8f5290" + dependencies: + "@babel/helper-builder-react-jsx" "^7.3.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" + +"@babel/plugin-transform-regenerator@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" + dependencies: + regenerator-transform "^0.14.0" + +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-unicode-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz#ab4634bb4f14d36728bf5978322b35587787970f" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/preset-env@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.2.tgz#34a46f01aed617b174b8dbaf8fed9239300343d0" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-dynamic-import" "^7.5.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.5.2" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.5.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.4.4" + "@babel/plugin-transform-classes" "^7.4.4" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.5.0" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-duplicate-keys" "^7.5.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.5.0" + "@babel/plugin-transform-modules-systemjs" "^7.5.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.5.0" + browserslist "^4.6.0" + core-js-compat "^3.1.1" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.5.0" -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" +"@babel/preset-react@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.0.0.tgz#e86b4b3d99433c7b3e9e91747e2653958bc6b3c0" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + +"@babel/runtime@^7.3.4", "@babel/runtime@^7.4.2": + version "7.4.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.2.tgz#f5ab6897320f16decd855eed70b705908a313fe8" + dependencies: + regenerator-runtime "^0.13.2" + +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.0.tgz#4216d6586854ef5c3c4592dab56ec7eb78485485" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.5.0" + "@babel/types" "^7.5.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.11" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" dependencies: - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + esutils "^2.0.2" + lodash "^4.17.11" + to-fast-properties "^2.0.0" -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" +"@cnakazawa/watch@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -async-foreach@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" +"@gar/promisify@^1.0.1": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -async@^1.4.0, async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +"@jest/console@^24.7.1": + version "24.7.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545" + dependencies: + "@jest/source-map" "^24.3.0" + chalk "^2.0.1" + slash "^2.0.0" -async@^2.1.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" +"@jest/core@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.8.0.tgz#fbbdcd42a41d0d39cddbc9f520c8bab0c33eed5b" dependencies: - lodash "^4.14.0" + "@jest/console" "^24.7.1" + "@jest/reporters" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-changed-files "^24.8.0" + jest-config "^24.8.0" + jest-haste-map "^24.8.0" + jest-message-util "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve-dependencies "^24.8.0" + jest-runner "^24.8.0" + jest-runtime "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + jest-watcher "^24.8.0" + micromatch "^3.1.10" + p-each-series "^1.0.0" + pirates "^4.0.1" + realpath-native "^1.1.0" + rimraf "^2.5.4" + strip-ansi "^5.0.0" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +"@jest/environment@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.8.0.tgz#0342261383c776bdd652168f68065ef144af0eac" + dependencies: + "@jest/fake-timers" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" -atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" +"@jest/fake-timers@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.8.0.tgz#2e5b80a4f78f284bcb4bd5714b8e10dd36a8d3d1" + dependencies: + "@jest/types" "^24.8.0" + jest-message-util "^24.8.0" + jest-mock "^24.8.0" -autoprefixer@^6.3.1: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" +"@jest/reporters@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.8.0.tgz#075169cd029bddec54b8f2c0fc489fd0b9e05729" dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + istanbul-lib-coverage "^2.0.2" + istanbul-lib-instrument "^3.0.1" + istanbul-lib-report "^2.0.4" + istanbul-lib-source-maps "^3.0.1" + istanbul-reports "^2.1.1" + jest-haste-map "^24.8.0" + jest-resolve "^24.8.0" + jest-runtime "^24.8.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" + node-notifier "^5.2.1" + slash "^2.0.0" + source-map "^0.6.0" + string-length "^2.0.0" -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" +"@jest/source-map@^24.3.0": + version "24.3.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.3.0.tgz#563be3aa4d224caf65ff77edc95cd1ca4da67f28" + dependencies: + callsites "^3.0.0" + graceful-fs "^4.1.15" + source-map "^0.6.0" -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" +"@jest/test-result@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.8.0.tgz#7675d0aaf9d2484caa65e048d9b467d160f8e9d3" + dependencies: + "@jest/console" "^24.7.1" + "@jest/types" "^24.8.0" + "@types/istanbul-lib-coverage" "^2.0.0" -aws4@^1.2.1, aws4@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" +"@jest/test-sequencer@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.8.0.tgz#2f993bcf6ef5eb4e65e8233a95a3320248cf994b" + dependencies: + "@jest/test-result" "^24.8.0" + jest-haste-map "^24.8.0" + jest-runner "^24.8.0" + jest-runtime "^24.8.0" -babel-cli@^6.7.5: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" +"@jest/transform@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.8.0.tgz#628fb99dce4f9d254c6fd9341e3eea262e06fef5" dependencies: - babel-core "^6.26.0" - babel-polyfill "^6.26.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - commander "^2.11.0" - convert-source-map "^1.5.0" - fs-readdir-recursive "^1.0.0" - glob "^7.1.2" - lodash "^4.17.4" - output-file-sync "^1.1.2" - path-is-absolute "^1.0.1" - slash "^1.0.0" - source-map "^0.5.6" - v8flags "^2.1.1" - optionalDependencies: - chokidar "^1.6.1" + "@babel/core" "^7.1.0" + "@jest/types" "^24.8.0" + babel-plugin-istanbul "^5.1.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.15" + jest-haste-map "^24.8.0" + jest-regex-util "^24.3.0" + jest-util "^24.8.0" + micromatch "^3.1.10" + realpath-native "^1.1.0" + slash "^2.0.0" + source-map "^0.6.1" + write-file-atomic "2.4.1" -babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" +"@jest/types@^24.5.0": + version "24.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.5.0.tgz#feee214a4d0167b0ca447284e95a57aa10b3ee95" dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" + "@types/istanbul-lib-coverage" "^1.1.0" + "@types/yargs" "^12.0.9" -babel-core@6.26.3, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" +"@jest/types@^24.8.0": + version "24.8.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.8.0.tgz#f31e25948c58f0abd8c845ae26fcea1491dea7ad" dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^12.0.9" -babel-core@^6.0.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" + integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== + +"@npmcli/fs@^1.0.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" + integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" + "@gar/promisify" "^1.0.1" + semver "^7.3.5" -babel-eslint@^7.1.1: - version "7.2.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== dependencies: - babel-code-frame "^6.22.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.17.0" + mkdirp "^1.0.4" + rimraf "^3.0.2" -babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" +"@sheerun/mutationobserver-shim@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@types/babel__core@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.2.tgz#608c74f55928033fce18b99b213c16be4b3d114f" dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" +"@types/babel__generator@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@babel/types" "^7.0.0" -babel-helper-builder-react-jsx@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - esutils "^2.0.2" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.7.tgz#2496e9ff56196cc1429c72034e07eab6121b6f3f" dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@babel/types" "^7.3.0" -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + "@types/connect" "*" + "@types/node" "*" -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" +"@types/bonjour@^3.5.9": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" + integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@types/node" "*" -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" +"@types/connect-history-api-fallback@^1.3.5": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" + integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@types/express-serve-static-core" "*" + "@types/node" "*" -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" +"@types/connect@*": + version "3.4.35" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@types/node" "*" -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" +"@types/eslint-scope@^3.7.3": + version "3.7.3" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" + integrity sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g== dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@types/eslint" "*" + "@types/estree" "*" -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" +"@types/eslint@*": + version "8.4.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.2.tgz#48f2ac58ab9c631cb68845c3d956b28f79fad575" + integrity sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA== dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + "@types/estree" "*" + "@types/json-schema" "*" -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" +"@types/estree@*", "@types/estree@^0.0.51": + version "0.0.51" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": + version "4.17.28" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" + integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" +"@types/express@*", "@types/express@^4.17.13": + version "4.17.13" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.13.tgz#a76e2995728999bab51a33fabce1d705a3709034" + integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.18" + "@types/qs" "*" + "@types/serve-static" "*" -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" +"@types/http-proxy@^1.17.8": + version "1.17.9" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.9.tgz#7f0e7931343761efde1e2bf48c40f02f3f75705a" + integrity sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw== dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" + +"@types/istanbul-lib-coverage@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#2cc2ca41051498382b43157c8227fea60363f94a" -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" +"@types/istanbul-lib-report@*": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" + "@types/istanbul-lib-coverage" "*" -babel-jest@^22.0.6: - version "22.0.6" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.0.6.tgz#807a2a5f5fad7789c57174a955cd14b11045299f" +"@types/istanbul-reports@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" dependencies: - babel-plugin-istanbul "^4.1.5" - babel-preset-jest "^22.0.6" + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-report" "*" + +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + +"@types/minimist@^1.2.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + +"@types/node@*": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.3.0.tgz#3a129cda7c4e5df2409702626892cb4b96546dd5" + +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -babel-jest@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.1.tgz#bbad3bf523fb202da05ed0a6540b48c84eed13a6" +"@types/qs@*": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + +"@types/serve-index@^1.9.1": + version "1.9.1" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" + integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== dependencies: - babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.0.1" + "@types/express" "*" -babel-loader@^7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.5.tgz#e3ee0cd7394aa557e013b02d3e492bfd07aa6d68" +"@types/serve-static@*": + version "1.13.10" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" + integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== dependencies: - find-cache-dir "^1.0.0" - loader-utils "^1.0.2" - mkdirp "^0.5.1" + "@types/mime" "^1" + "@types/node" "*" -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" +"@types/sockjs@^0.3.33": + version "0.3.33" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" + integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== dependencies: - babel-runtime "^6.22.0" + "@types/node" "*" + +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" +"@types/ws@^8.5.1": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== dependencies: - babel-runtime "^6.22.0" + "@types/node" "*" + +"@types/yargs@^12.0.2": + version "12.0.12" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" + +"@types/yargs@^12.0.9": + version "12.0.10" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.10.tgz#17a8ec65cd8e88f51b418ceb271af18d3137df67" + +"@webassemblyjs/ast@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" + integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + +"@webassemblyjs/floating-point-hex-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" + integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== + +"@webassemblyjs/helper-api-error@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" + integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== + +"@webassemblyjs/helper-buffer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" + integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== + +"@webassemblyjs/helper-numbers@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" + integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" + integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== + +"@webassemblyjs/helper-wasm-section@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" + integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + +"@webassemblyjs/ieee754@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" + integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" + integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" + integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== + +"@webassemblyjs/wasm-edit@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" + integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/helper-wasm-section" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-opt" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + "@webassemblyjs/wast-printer" "1.11.1" + +"@webassemblyjs/wasm-gen@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" + integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wasm-opt@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" + integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + +"@webassemblyjs/wasm-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" + integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wast-printer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" + integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.1.1.tgz#9f53b1b7946a6efc2a749095a4f450e2932e8356" + integrity sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg== -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" +"@webpack-cli/info@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.4.1.tgz#2360ea1710cbbb97ff156a3f0f24556e0fc1ebea" + integrity sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA== dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" + envinfo "^7.7.3" + +"@webpack-cli/serve@^1.6.1": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.6.1.tgz#0de2875ac31b46b6c5bb1ae0a7d7f0ba5678dffe" + integrity sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" -babel-plugin-istanbul@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" +accepts@~1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" dependencies: - babel-plugin-syntax-object-rest-spread "^6.13.0" - find-up "^2.1.0" - istanbul-lib-instrument "^1.10.1" - test-exclude "^4.2.1" + mime-types "~2.1.16" + negotiator "0.6.1" -babel-plugin-jest-hoist@^22.0.6: - version "22.0.6" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.0.6.tgz#551269ded350a15d6585da35d16d449df30d66c4" +accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" -babel-plugin-jest-hoist@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz#eaa11c964563aea9c21becef2bdf7853f7f3c148" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" -babel-plugin-react-remove-properties@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/babel-plugin-react-remove-properties/-/babel-plugin-react-remove-properties-0.2.5.tgz#c076e1291940c730f4fb7dfb670691fc41787cf8" +acorn-globals@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" + dependencies: + acorn "^5.0.0" -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" +acorn-import-assertions@^1.7.6: + version "1.8.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" + integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" +acorn@^5.0.0, acorn@^5.1.2, acorn@^5.2.1: + version "5.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" +acorn@^5.5.0: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" -babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" +acorn@^8.4.1, acorn@^8.5.0: + version "8.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" +agent-base@6, agent-base@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" +agentkeepalive@^4.1.3: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" + integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" + debug "^4.1.0" + depd "^1.1.2" + humanize-ms "^1.2.1" -babel-plugin-transform-class-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: - babel-helper-function-name "^6.24.1" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + clean-stack "^2.0.0" + indent-string "^4.0.0" -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" +airbnb-prop-types@^2.13.2: + version "2.13.2" + resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.13.2.tgz#43147a5062dd2a4a5600e748a47b64004cc5f7fc" dependencies: - babel-runtime "^6.22.0" + array.prototype.find "^2.0.4" + function.prototype.name "^1.1.0" + has "^1.0.3" + is-regex "^1.0.4" + object-is "^1.0.1" + object.assign "^4.1.0" + object.entries "^1.1.0" + prop-types "^15.7.2" + prop-types-exact "^1.2.0" + react-is "^16.8.6" + +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + +ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv-keywords@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + +ajv@^5.1.0, 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" + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^6.5.5: + version "6.10.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.0, ajv@^8.8.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + +ansi-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-regex@^4.0.0, ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +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: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +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" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== dependencies: - babel-runtime "^6.22.0" + delegates "^1.0.0" + readable-stream "^3.6.0" -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" +are-we-there-yet@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz#ba20bd6b553e31d62fc8c31bd23d22b95734390d" + integrity sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw== dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" + delegates "^1.0.0" + readable-stream "^3.6.0" -babel-plugin-transform-es2015-classes@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" + delegates "^1.0.0" + readable-stream "^2.0.6" -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" + sprintf-js "~1.0.2" -babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" -babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" +array-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" +array-flatten@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + define-properties "^1.1.2" + es-abstract "^1.7.0" -babel-plugin-transform-es2015-modules-umd@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" + array-uniq "^1.0.1" -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" -babel-plugin-transform-es2015-parameters@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" +array.prototype.find@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.1.0.tgz#630f2eaf70a39e608ac3573e45cf8ccd0ede9ad7" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + define-properties "^1.1.3" + es-abstract "^1.13.0" -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" +array.prototype.flat@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.1.tgz#812db8f02cad24d3fab65dd67eabe3b8903494a4" dependencies: - babel-runtime "^6.22.0" + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" +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" -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" -babel-plugin-transform-flow-strip-types@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" - dependencies: - babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.22.0" +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" -babel-plugin-transform-object-rest-spread@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" -babel-plugin-transform-react-display-name@^6.23.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" - dependencies: - babel-runtime "^6.22.0" +async-foreach@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" -babel-plugin-transform-react-jsx-self@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -babel-plugin-transform-react-jsx-source@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" - dependencies: - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" -babel-plugin-transform-react-jsx@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" - dependencies: - babel-helper-builder-react-jsx "^6.24.1" - babel-plugin-syntax-jsx "^6.8.0" - babel-runtime "^6.22.0" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" -babel-plugin-transform-regenerator@^6.22.0: +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: - regenerator-transform "^0.10.0" + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" +babel-eslint@^7.1.1: + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.17.0" -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" +babel-jest@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589" dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^5.1.0" + babel-preset-jest "^24.6.0" + chalk "^2.4.2" + slash "^2.0.0" -babel-preset-env@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^3.2.6" - invariant "^2.2.2" - semver "^5.3.0" +babel-loader@^8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" + dependencies: + find-cache-dir "^2.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + pify "^4.0.1" -babel-preset-flow@^6.23.0: +babel-messages@^6.23.0: version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: - babel-plugin-transform-flow-strip-types "^6.22.0" + babel-runtime "^6.22.0" -babel-preset-jest@^22.0.6: - version "22.0.6" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.0.6.tgz#d13202533db9495c98663044d9f51b273d3984c8" +babel-plugin-dynamic-import-node@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" dependencies: - babel-plugin-jest-hoist "^22.0.6" - babel-plugin-syntax-object-rest-spread "^6.13.0" + object.assign "^4.1.0" -babel-preset-jest@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz#631cc545c6cf021943013bcaf22f45d87fe62198" +babel-plugin-istanbul@^5.1.0: + version "5.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.4.tgz#841d16b9a58eeb407a0ddce622ba02fe87a752ba" dependencies: - babel-plugin-jest-hoist "^23.0.1" - babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^3.0.0" + istanbul-lib-instrument "^3.3.0" + test-exclude "^5.2.3" -babel-preset-react@^6.5.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" +babel-plugin-jest-hoist@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz#f7f7f7ad150ee96d7a5e8e2c5da8319579e78019" dependencies: - babel-plugin-syntax-jsx "^6.3.13" - babel-plugin-transform-react-display-name "^6.23.0" - babel-plugin-transform-react-jsx "^6.24.1" - babel-plugin-transform-react-jsx-self "^6.22.0" - babel-plugin-transform-react-jsx-source "^6.22.0" - babel-preset-flow "^6.23.0" + "@types/babel__traverse" "^7.0.6" -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" +babel-plugin-react-remove-properties@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-react-remove-properties/-/babel-plugin-react-remove-properties-0.3.0.tgz#7b623fb3c424b6efb4edc9b1ae4cc50e7154b87f" + +babel-preset-jest@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz#66f06136eefce87797539c0d63f1769cc3915984" dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^24.6.0" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: +babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.23.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -1134,7 +1686,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-tr invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.23.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -1147,18 +1699,10 @@ babylon@^6.17.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.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -base64-js@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1193,45 +1737,38 @@ binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -bluebird@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -body-parser@1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" +body-parser@1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== dependencies: - bytes "3.0.0" + bytes "3.1.2" content-type "~1.0.4" debug "2.6.9" - depd "~1.1.1" - http-errors "~1.6.2" - iconv-lite "0.4.19" - on-finished "~2.3.0" - qs "6.5.1" - raw-body "2.3.2" - type-is "~1.6.15" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.10.3" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" +bonjour-service@^1.0.11: + version "1.0.12" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.0.12.tgz#28fbd4683f5f2e36feedb833e24ba661cac960c3" + integrity sha512-pMmguXYCu63Ug37DluMKEHdxc+aaIf/ay4YbF8Gxtba+9d3u+rmEWy61VK3Z3hp8Rskok3BunHYnG0dUHAsblw== dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" + array-flatten "^2.1.2" dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.4" boolbase@~1.0.0: version "1.0.0" @@ -1241,12 +1778,6 @@ boolify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/boolify/-/boolify-1.0.1.tgz#b5c09e17cacd113d11b7bb3ed384cc012994d86b" -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - boom@4.x.x: version "4.3.1" resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" @@ -1266,15 +1797,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" dependencies: @@ -1289,86 +1812,41 @@ braces@^2.3.0, braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" dependencies: resolve "1.1.7" -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - dependencies: - pako "~1.0.5" - -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" +browserslist@^4.14.5: + version "4.20.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" + integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" + caniuse-lite "^1.0.30001332" + electron-to-chromium "^1.4.118" + escalade "^3.1.1" + node-releases "^2.0.3" + picocolors "^1.0.0" -browserslist@^3.2.6: - version "3.2.8" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" +browserslist@^4.6.0, browserslist@^4.6.2: + version "4.6.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.3.tgz#0530cbc6ab0c1f3fc8c819c72377ba55cf647f05" dependencies: - caniuse-lite "^1.0.30000844" - electron-to-chromium "^1.3.47" + caniuse-lite "^1.0.30000975" + electron-to-chromium "^1.3.164" + node-releases "^1.1.23" bser@^2.0.0: version "2.0.0" @@ -1380,51 +1858,42 @@ buffer-from@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" -cacache@^10.0.4: - version "10.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^2.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cacache@^15.2.0: + version "15.3.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^5.2.4" - unique-filename "^1.1.0" - y18n "^4.0.0" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" + unique-filename "^1.1.1" cache-base@^1.0.1: version "1.0.1" @@ -1440,6 +1909,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -1450,16 +1927,9 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" camelcase-keys@^4.1.0: version "4.2.0" @@ -1469,51 +1939,43 @@ camelcase-keys@^4.1.0: map-obj "^2.0.0" quick-lru "^1.0.0" -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + +caniuse-lite@^1.0.30000975: + version "1.0.30000979" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000979.tgz#92f16d00186a6cf20d6c5711bb6e042a3d667029" -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000791" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000791.tgz#06787f56caef4300a17e35d137447123bdf536f9" +caniuse-lite@^1.0.30001332: + version "1.0.30001344" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz#8a1e7fdc4db9c2ec79a05e9fd68eb93a761888bb" + integrity sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g== -caniuse-lite@^1.0.30000844: - version "1.0.30000865" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz#70026616e8afe6e1442f8bb4e1092987d81a2f25" +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + dependencies: + rsvp "^4.8.4" caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@2.3.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: +chalk@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -1521,7 +1983,7 @@ chalk@2.3.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1531,7 +1993,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.3.1, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -1539,14 +2001,26 @@ chalk@^2.3.1, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" -chardet@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.5.0.tgz#fe3ac73c00c3d865ffcc02a0682e2c20b6a06029" - cheerio@^1.0.0-rc.2: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" @@ -1558,71 +2032,61 @@ cheerio@^1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@^1.6.1: - 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" - -chokidar@^2.0.0, chokidar@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" +chokidar@^2.0.4: + version "2.1.6" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" dependencies: anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" + async-each "^1.0.1" + braces "^2.3.2" glob-parent "^3.1.0" - inherits "^2.0.1" + inherits "^2.0.3" is-binary-path "^1.0.0" is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" + normalize-path "^3.0.0" path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chokidar@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" optionalDependencies: - fsevents "^1.2.2" + fsevents "~2.3.2" chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" -chrome-trace-event@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48" - dependencies: - tslib "^1.9.0" +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" -clap@^1.0.9: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" - dependencies: - chalk "^1.1.3" - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1632,6 +2096,15 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +classnames@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -1642,14 +2115,6 @@ cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -1666,29 +2131,28 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -clone-deep@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: - for-own "^1.0.0" - is-plain-object "^2.0.4" - kind-of "^6.0.0" - shallow-clone "^1.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" -clone@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -1700,55 +2164,67 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" -color-name@^1.0.0, color-name@^1.1.1: +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" +color-support@^1.1.2, color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" +colorette@^2.0.10, colorette@^2.0.14: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== colors@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" -colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: +combined-stream@1.0.6, combined-stream@~1.0.5: 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.11.0, commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^2.8.1, commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + +commander@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== common-tags@^1.4.0: version "1.7.2" @@ -1760,45 +2236,34 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" -compare-versions@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" - component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" -compressible@~2.0.11: - version "2.0.12" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.12.tgz#c59a5c99db76767e9876500e271ef63b3493bd66" +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: - mime-db ">= 1.30.0 < 2" + mime-db ">= 1.43.0 < 2" -compression@^1.5.2: - version "1.7.1" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.1.tgz#eff2603efc2e22cf86f35d2eb93589f9875373db" +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== dependencies: - accepts "~1.3.4" + accepts "~1.3.5" bytes "3.0.0" - compressible "~2.0.11" + compressible "~2.0.16" debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" + on-headers "~1.0.2" + safe-buffer "5.1.2" vary "~1.1.2" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.0: - 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" - concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" @@ -1807,27 +2272,21 @@ concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -connect-history-api-fallback@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" +connect-history-api-fallback@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" content-type-parser@^1.0.1: version "1.0.2" @@ -1837,7 +2296,13 @@ content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: +convert-source-map@^1.1.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + dependencies: + safe-buffer "~5.1.1" + +convert-source-map@^1.4.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" @@ -1845,30 +2310,32 @@ cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" +core-js-compat@^3.1.1: + version "3.1.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.1.4.tgz#e4d0c40fbd01e65b1d457980fe4112d4358a7408" + dependencies: + browserslist "^4.6.2" + core-js-pure "3.1.4" + semver "^6.1.1" + +core-js-pure@3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.4.tgz#5fa17dc77002a169a3566cc48dc774d2e13e3769" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.4.0: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" @@ -1876,40 +2343,13 @@ 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" -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-react-context@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" +create-react-context@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.3.0.tgz#546dede9dc422def0d3fc2fe03afe0bc0f4f7d8c" + integrity sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw== dependencies: - fbjs "^0.8.0" gud "^1.0.0" + warning "^4.0.3" cross-env@^5.1.4: version "5.1.4" @@ -1918,13 +2358,6 @@ cross-env@^5.1.4: cross-spawn "^5.1.0" is-windows "^1.0.0" -cross-spawn@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -1933,7 +2366,7 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.5: +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -1943,11 +2376,14 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: - boom "2.x.x" + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" cryptiles@3.x.x: version "3.1.2" @@ -1955,42 +2391,19 @@ cryptiles@3.x.x: dependencies: boom "5.x.x" -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" +css-loader@^6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.1.tgz#e98106f154f6e1baf3fc3bc455cb9981c1d5fd2e" + integrity sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw== dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-loader@~0.26.0: - version "0.26.4" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.26.4.tgz#b61e9e30db94303e6ffc892f10ecd09ad025a1fd" - dependencies: - babel-code-frame "^6.11.0" - css-selector-tokenizer "^0.7.0" - cssnano ">=2.6.1 <4" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.0.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.0.0" - postcss-modules-local-by-default "^1.0.1" - postcss-modules-scope "^1.0.0" - postcss-modules-values "^1.1.0" - source-list-map "^0.1.7" + icss-utils "^5.1.0" + postcss "^8.4.7" + postcss-modules-extract-imports "^3.0.0" + postcss-modules-local-by-default "^4.0.0" + postcss-modules-scope "^3.0.0" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.2.0" + semver "^7.3.5" css-select@~1.2.0: version "1.2.0" @@ -2001,18 +2414,14 @@ css-select@~1.2.0: domutils "1.5.1" nth-check "~1.0.1" -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" +css.escape@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" + css@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/css/-/css-2.2.3.tgz#f861f4ba61e79bedc962aa548e5780fd95cbc6be" @@ -2022,53 +2431,10 @@ css@^2.2.3: source-map-resolve "^0.5.1" urix "^0.1.0" -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - -"cssnano@>=2.6.1 <4": - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" @@ -2080,79 +2446,72 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - dependencies: - array-find-index "^1.0.1" - -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" +debug@4, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: ms "2.0.0" -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + dependencies: + ms "^2.1.1" -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" +decamelize-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg== dependencies: - xregexp "4.0.0" + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" -default-require-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== dependencies: - strip-bom "^3.0.0" + execa "^5.0.0" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== define-properties@^1.1.2: version "1.1.2" @@ -2161,6 +2520,12 @@ define-properties@^1.1.2: foreach "^2.0.5" object-keys "^1.0.8" +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + dependencies: + object-keys "^1.0.12" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -2180,10 +2545,6 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -2196,17 +2557,6 @@ del@^2.0.2: pinkie-promise "^2.0.0" rimraf "^2.2.8" -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - dependencies: - globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -2219,26 +2569,19 @@ depd@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" -depd@~1.1.1, depd@~1.1.2: +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - dependencies: - repeating "^2.0.0" +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-libc@^1.0.2: version "1.0.3" @@ -2248,21 +2591,14 @@ detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" -detect-node@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - -diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" +detect-node@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" +diff-sequences@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.3.0.tgz#0f20e8a1df1abddaf4d9c226680952e64118b975" discontinuous-range@1.0.0: version "1.0.0" @@ -2276,20 +2612,14 @@ dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" -dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" +dns-packet@^5.2.2: + version "5.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.1.tgz#eb94413789daec0f0ebe2fcc230bdc9d7c91b43d" + integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw== dependencies: - buffer-indexof "^1.0.0" + "@leichtgewicht/ip-codec" "^2.0.1" -doctrine@^2.0.0, doctrine@^2.1.0: +doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: @@ -2302,17 +2632,14 @@ dom-serializer@0, dom-serializer@~0.1.0: domelementtype "~1.1.1" entities "~1.1.1" -dom-testing-library@^3.1.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/dom-testing-library/-/dom-testing-library-3.6.0.tgz#e5598fae9477f3918e22aee44f2262727203b5bd" +dom-testing-library@^3.18.2: + version "3.18.2" + resolved "https://registry.yarnpkg.com/dom-testing-library/-/dom-testing-library-3.18.2.tgz#07d65166743ad3299b7bee5b488e9622c31241bc" dependencies: - mutationobserver-shim "^0.3.2" - pretty-format "^22.4.3" - wait-for-expect "^1.0.0" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + "@babel/runtime" "^7.3.4" + "@sheerun/mutationobserver-shim" "^0.3.2" + pretty-format "^24.5.0" + wait-for-expect "^1.1.0" domelementtype@1, domelementtype@^1.3.0: version "1.3.0" @@ -2346,15 +2673,6 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2366,19 +2684,14 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" -electron-releases@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/electron-releases/-/electron-releases-2.1.0.tgz#c5614bf811f176ce3c836e368a0625782341fd4e" - -electron-to-chromium@^1.2.7: - version "1.3.30" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.30.tgz#9666f532a64586651fc56a72513692e820d06a80" - dependencies: - electron-releases "^2.1.0" +electron-to-chromium@^1.3.164: + version "1.3.187" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.187.tgz#fea64435f370892c0f27aded1bbdcb6f235c592b" -electron-to-chromium@^1.3.47: - version "1.3.52" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz#d2d9f1270ba4a3b967b831c40ef71fb4d9ab5ce0" +electron-to-chromium@^1.4.118: + version "1.4.141" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.141.tgz#4dd9119e8a99f1c83c51dfcf1bed79ea541f08d6" + integrity sha512-mfBcbqc0qc6RlxrsIgLG2wCqkiPAjEezHxGTu7p3dHHFOurH4EjS9rFZndX5axC8264rI1Pcbw8uQP39oZckeA== element-resize-detector@^1.1.12: version "1.1.12" @@ -2386,17 +2699,10 @@ element-resize-detector@^1.1.12: dependencies: batch-processor "^1.0.0" -elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== emojis-list@^2.0.0: version "2.1.0" @@ -2412,83 +2718,113 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -end-of-stream@^1.0.0, end-of-stream@^1.1.0: +encoding@^0.1.12: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" dependencies: once "^1.4.0" -enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" +enhanced-resolve@^5.9.3: + version "5.9.3" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" + integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" + graceful-fs "^4.2.4" + tapable "^2.2.0" entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -enzyme-adapter-react-16@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.1.1.tgz#a8f4278b47e082fbca14f5bfb1ee50ee650717b4" +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +enzyme-adapter-react-16@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.14.0.tgz#204722b769172bcf096cb250d33e6795c1f1858f" dependencies: - enzyme-adapter-utils "^1.3.0" - lodash "^4.17.4" - object.assign "^4.0.4" - object.values "^1.0.4" - prop-types "^15.6.0" - react-reconciler "^0.7.0" + enzyme-adapter-utils "^1.12.0" + has "^1.0.3" + object.assign "^4.1.0" + object.values "^1.1.0" + prop-types "^15.7.2" + react-is "^16.8.6" react-test-renderer "^16.0.0-0" + semver "^5.7.0" -enzyme-adapter-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.3.0.tgz#d6c85756826c257a8544d362cc7a67e97ea698c7" +enzyme-adapter-utils@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.12.0.tgz#96e3730d76b872f593e54ce1c51fa3a451422d93" dependencies: - lodash "^4.17.4" - object.assign "^4.0.4" - prop-types "^15.6.0" + airbnb-prop-types "^2.13.2" + function.prototype.name "^1.1.0" + object.assign "^4.1.0" + object.fromentries "^2.0.0" + prop-types "^15.7.2" + semver "^5.6.0" -enzyme@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.3.0.tgz#0971abd167f2d4bf3f5bd508229e1c4b6dc50479" +enzyme@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.10.0.tgz#7218e347c4a7746e133f8e964aada4a3523452f6" dependencies: + array.prototype.flat "^1.2.1" cheerio "^1.0.0-rc.2" - function.prototype.name "^1.0.3" - has "^1.0.1" + function.prototype.name "^1.1.0" + has "^1.0.3" + html-element-map "^1.0.0" is-boolean-object "^1.0.0" - is-callable "^1.1.3" + is-callable "^1.1.4" is-number-object "^1.0.3" + is-regex "^1.0.4" is-string "^1.0.4" is-subset "^0.1.1" - lodash "^4.17.4" - object-inspect "^1.5.0" + lodash.escape "^4.0.1" + lodash.isequal "^4.5.0" + object-inspect "^1.6.0" object-is "^1.0.1" object.assign "^4.1.0" object.entries "^1.0.4" object.values "^1.0.4" raf "^3.4.0" rst-selector-parser "^2.2.3" + string.prototype.trim "^1.1.2" -errno@^0.1.3: - version "0.1.6" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.6.tgz#c386ce8a6283f14fc09563b71560908c9bf53026" - dependencies: - prr "~1.0.1" - -errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - dependencies: - prr "~1.0.1" +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -error-ex@^1.2.0: +error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" dependencies: is-arrayish "^0.2.1" +es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.13.0, es-abstract@^1.5.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + dependencies: + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-keys "^1.0.12" + es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.10.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" @@ -2499,6 +2835,11 @@ es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: is-callable "^1.1.3" is-regex "^1.0.4" +es-module-lexer@^0.9.0: + version "0.9.3" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" + integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== + 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" @@ -2507,28 +2848,18 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.45" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.45.tgz#0bfdf7b473da5919d5adf3bd25ceb754fccc3653" - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.1" - next-tick "1" - -es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" -es6-symbol@^3.1.1, es6-symbol@~3.1.1: +escalade@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-html@~1.0.3: version "1.0.3" @@ -2550,8 +2881,8 @@ escodegen@^1.9.0: source-map "~0.5.6" eslint-config-prettier@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3" + version "2.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.10.0.tgz#ec07bc1d01f87d09f61d3840d112dc8a9791e30b" dependencies: get-stdin "^5.0.1" @@ -2560,43 +2891,49 @@ eslint-config-standard@^6.2.1: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-6.2.1.tgz#d3a68aafc7191639e7ee441e7348739026354292" eslint-plugin-jest@^21.6.1: - version "21.6.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.6.1.tgz#adca015bbdb8d23b210438ff9e1cee1dd9ec35df" + version "21.27.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.27.2.tgz#2a795b7c3b5e707df48a953d651042bd01d7b0a8" eslint-plugin-prettier@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.5.0.tgz#39a91dd7528eaf19cd42c0ee3f2c1f684606a05f" + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz#b4312dcf2c1d965379d7f9d5b5f8aaadc6a45904" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" eslint-plugin-promise@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75" + version "3.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.8.0.tgz#65ebf27a845e3c1e9d6f6a5622ddd3801694b621" eslint-plugin-react@^7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b" + version "7.14.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz#94c193cc77a899ac0ecbb2766fbef88685b7ecc1" dependencies: - doctrine "^2.0.0" - has "^1.0.1" - jsx-ast-utils "^2.0.0" - prop-types "^15.6.0" + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.1.0" + object.entries "^1.1.0" + object.fromentries "^2.0.0" + object.values "^1.1.0" + prop-types "^15.7.2" + resolve "^1.10.1" eslint-plugin-standard@^2.0.1: version "2.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.3.1.tgz#6765bd2a6d9ecdc7bdf1b145ae4bb30e2b7b86f8" -eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: - esrecurse "^4.1.0" + esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" +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" @@ -2605,7 +2942,7 @@ 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@^4.0.0, eslint@^4.16.0, eslint@^4.5.0: +eslint@^4.0.0, eslint@^4.5.0: version "4.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.16.0.tgz#934ada9e98715e1d7bbfd6f6f0519ed2fab35cc1" dependencies: @@ -2647,6 +2984,49 @@ eslint@^4.0.0, eslint@^4.16.0, eslint@^4.5.0: table "^4.0.1" text-table "~0.2.0" +eslint@^4.16.0: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" + dependencies: + 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.1.0" + doctrine "^2.1.0" + eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" + esquery "^1.0.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + 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-without-jsonify "^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" + 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.2" + text-table "~0.2.0" + espree@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" @@ -2654,9 +3034,12 @@ espree@^3.5.2: acorn "^5.2.1" acorn-jsx "^3.0.0" -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" esprima@^3.1.3: version "3.1.3" @@ -2679,11 +3062,23 @@ esrecurse@^4.1.0: estraverse "^4.1.0" object-assign "^4.0.1" +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.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" -esutils@^2.0.2: +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -2691,32 +3086,19 @@ etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" -eventemitter3@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - dependencies: - original ">=0.0.5" +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -exec-sh@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" - dependencies: - merge "^1.1.3" +exec-sh@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" execa@^0.7.0: version "0.7.0" @@ -2730,16 +3112,37 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -2752,55 +3155,51 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -expect@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.1.0.tgz#bfdfd57a2a20170d875999ee9787cc71f01c205f" +expect@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.8.0.tgz#471f8ec256b7b6129ca2524b2a62f030df38718d" dependencies: + "@jest/types" "^24.8.0" ansi-styles "^3.2.0" - jest-diff "^23.0.1" - jest-get-type "^22.1.0" - jest-matcher-utils "^23.0.1" - jest-message-util "^23.1.0" - jest-regex-util "^23.0.0" + jest-get-type "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-regex-util "^24.3.0" -express@^4.16.2: - version "4.16.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" +express@^4.17.3: + version "4.18.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" + integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== dependencies: - accepts "~1.3.5" + accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.18.2" - content-disposition "0.5.2" + body-parser "1.20.0" + content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.3.1" + cookie "0.5.0" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" + depd "2.0.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.1.1" + finalhandler "1.2.0" fresh "0.5.2" + http-errors "2.0.0" merge-descriptors "1.0.1" methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" + on-finished "2.4.1" + parseurl "~1.3.3" path-to-regexp "0.1.7" - proxy-addr "~2.0.3" - qs "6.5.1" - range-parser "~1.2.0" - safe-buffer "5.1.1" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" + proxy-addr "~2.0.7" + qs "6.10.3" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -2817,7 +3216,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.0, extend@~3.0.1: +extend@~3.0.1, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -2829,20 +3228,6 @@ external-editor@^2.0.4: iconv-lite "^0.4.17" tmp "^0.0.33" -external-editor@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.0.tgz#dc35c48c6f98a30ca27a20e9687d7f3c77704bb6" - dependencies: - chardet "^0.5.0" - iconv-lite "^0.4.22" - tmp "^0.0.33" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -2876,9 +3261,14 @@ fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + fast-diff@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" fast-json-stable-stringify@^2.0.0: version "2.0.0" @@ -2888,19 +3278,15 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" -fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - -faye-websocket@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - dependencies: - websocket-driver ">=0.5.1" +fastest-levenshtein@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" + integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" +faye-websocket@^0.11.3: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== dependencies: websocket-driver ">=0.5.1" @@ -2910,18 +3296,6 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.0: - version "0.8.17" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - fbjs@^0.8.16: version "0.8.16" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" @@ -2947,27 +3321,6 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fileset@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" - dependencies: - glob "^7.0.3" - minimatch "^3.0.3" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -2977,32 +3330,33 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" unpipe "~1.0.0" -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" dependencies: commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" + make-dir "^2.0.0" + pkg-dir "^3.0.0" find-up@^2.1.0: version "2.1.0" @@ -3016,6 +3370,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + flat-cache@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" @@ -3025,37 +3387,15 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -flush-write-stream@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" - -for-in@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" +follow-redirects@^1.0.0: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -for-own@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" - dependencies: - for-in "^1.0.1" - foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" @@ -3064,14 +3404,6 @@ forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - form-data@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" @@ -3080,9 +3412,18 @@ form-data@~2.3.1: combined-stream "1.0.6" mime-types "^2.1.12" -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== fragment-cache@^0.2.1: version "0.2.1" @@ -3094,72 +3435,49 @@ fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" dependencies: minipass "^2.2.1" -fs-readdir-recursive@^1.0.0: +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs-monkey@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" + integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== + +fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0, fsevents@^1.1.1: - 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.39" - -fsevents@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" + nan "^2.12.1" + node-pre-gyp "^0.12.0" -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" -function.prototype.name@^1.0.3: +function.prototype.name@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.0.tgz#8bd763cc0af860a859cc5d49384d74b932cd2327" dependencies: @@ -3171,6 +3489,35 @@ functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + +gauge@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" + integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.3" + console-control-strings "^1.1.0" + has-unicode "^2.0.1" + signal-exit "^3.0.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.5" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3194,6 +3541,20 @@ get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -3206,6 +3567,17 @@ get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + dependencies: + pump "^3.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3216,19 +3588,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -3236,6 +3595,18 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + glob@^6.0.4: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" @@ -3257,6 +3628,29 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@~7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" @@ -3268,14 +3662,14 @@ glob@~7.0.6: once "^1.3.0" path-is-absolute "^1.0.0" -global-modules-path@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.3.0.tgz#b0e2bac6beac39745f7db5c59d26a36a0b94f7dc" - globals@^11.0.1: version "11.1.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4" +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -3291,16 +3685,6 @@ globby@^5.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - globule@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" @@ -3309,9 +3693,18 @@ globule@^1.0.0: lodash "~4.17.10" minimatch "~3.0.2" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + +graceful-fs@^4.1.15: + version "4.2.0" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" + +graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== growly@^1.3.0: version "1.3.0" @@ -3321,35 +3714,25 @@ gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" -handle-thing@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" +handlebars@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" dependencies: - async "^1.4.0" + neo-async "^2.6.0" optimist "^0.6.1" - source-map "^0.4.4" + source-map "^0.6.1" optionalDependencies: - uglify-js "^2.6" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" -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" - har-validator@~5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" @@ -3357,16 +3740,24 @@ har-validator@~5.0.3: ajv "^5.1.0" har-schema "^2.0.0" +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" @@ -3375,11 +3766,21 @@ has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" -has-unicode@^2.0.0: +has-symbols@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3416,28 +3817,11 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hawk@3.1.3, hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" + function-bind "^1.1.1" hawk@~6.0.2: version "6.0.2" @@ -3458,18 +3842,6 @@ history@^4.7.2: value-equal "^0.4.0" warning "^3.0.0" -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - hoek@4.x.x: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" @@ -3478,17 +3850,17 @@ hoist-non-react-statics@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - hosted-git-info@^2.1.4: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" +hosted-git-info@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" + integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== + dependencies: + lru-cache "^6.0.0" + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -3498,9 +3870,11 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" +html-element-map@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-element-map/-/html-element-map-1.0.1.tgz#3c4fcb4874ebddfe4283b51c8994e7713782b592" + dependencies: + array-filter "^1.0.0" html-encoding-sniffer@^1.0.1: version "1.0.2" @@ -3508,9 +3882,10 @@ html-encoding-sniffer@^1.0.1: dependencies: whatwg-encoding "^1.0.1" -html-entities@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" +html-entities@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" + integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== htmlparser2@^3.9.1: version "3.9.2" @@ -3523,11 +3898,27 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^2.0.2" +http-cache-semantics@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" -http-errors@1.6.2, http-errors@~1.6.2: +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-errors@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" dependencies: @@ -3540,29 +3931,39 @@ http-parser-js@>=0.4.0: version "0.4.9" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.9.tgz#ea1a04fb64adff0242e9974f297dd4c3cad271e1" -http-proxy-middleware@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" +http-parser-js@>=0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.6.tgz#2e02406ab2df8af8a7abfba62e0da01c62b95afd" + integrity sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA== + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== dependencies: - http-proxy "^1.16.2" - is-glob "^4.0.0" - lodash "^4.17.5" - micromatch "^3.1.9" + "@tootallnate/once" "1" + agent-base "6" + debug "4" -http-proxy@^1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742" +http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== dependencies: - eventemitter3 "1.x.x" - requires-port "1.x.x" + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" http-signature@~1.2.0: version "1.2.0" @@ -3572,35 +3973,54 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.22, iconv-lite@^0.4.4: +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.4.4: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: safer-buffer ">= 2.1.2 < 3" -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - -ieee754@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" +icss-utils@^5.0.0, icss-utils@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" + integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== ignore-walk@^3.0.1: version "3.0.1" @@ -3612,38 +4032,38 @@ ignore@^3.2.7, ignore@^3.3.3: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" -import-local@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" dependencies: - pkg-dir "^2.0.0" + pkg-dir "^3.0.0" resolve-cwd "^2.0.0" +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" -in-publish@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - dependencies: - repeating "^2.0.0" - indent-string@^3.0.0, indent-string@^3.1.0, indent-string@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== inflight@^1.0.4: version "1.0.6" @@ -3652,13 +4072,14 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@~1.3.0: version "1.3.5" @@ -3683,37 +4104,14 @@ inquirer@^3.0.6: strip-ansi "^4.0.0" through "^2.3.6" -inquirer@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.0.0.tgz#e8c20303ddc15bbfc2c12a6213710ccd9e1413d8" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.1.0" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - interactjs@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/interactjs/-/interactjs-1.3.4.tgz#9d5aa886f8fa03ea2f6c711e688792e3d3bde1ff" -internal-ip@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" - dependencies: - meow "^3.3.0" - -interpret@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" +interpret@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" + integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== invariant@^2.2.1: version "2.2.2" @@ -3721,7 +4119,7 @@ invariant@^2.2.1: dependencies: loose-envify "^1.0.0" -invariant@^2.2.2: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -3731,17 +4129,23 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -ip@^1.1.0, ip@^1.1.5: +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + +ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" +ipaddr.js@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" + integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== is-accessor-descriptor@^0.1.6: version "0.1.6" @@ -3765,6 +4169,13 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-boolean-object@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93" @@ -3783,11 +4194,22 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" -is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + dependencies: + ci-info "^2.0.0" + +is-core-module@^2.5.0, is-core-module@^2.8.1: + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: - ci-info "^1.0.0" + has "^1.0.3" is-data-descriptor@^0.1.4: version "0.1.4" @@ -3821,15 +4243,10 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" @@ -3841,20 +4258,10 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -3865,15 +4272,14 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" -is-generator-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" is-glob@^3.1.0: version "3.1.0" @@ -3887,16 +4293,22 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-number-object@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.3.tgz#f265ab89a9f445034ef6aff15a8f00b00f551799" -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" @@ -3907,6 +4319,11 @@ is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-odd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" @@ -3929,24 +4346,21 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-plain-obj@^1.0.0: +is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" dependencies: isobject "^3.0.1" -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -3965,6 +4379,11 @@ is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.4.tgz#cc3a9b69857d621e963725a24caeec873b826e64" @@ -3973,37 +4392,36 @@ is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - dependencies: - html-comment-regex "^1.1.0" - is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + dependencies: + has-symbols "^1.0.0" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4032,441 +4450,431 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" - dependencies: - async "^2.1.4" - compare-versions "^3.1.0" - fileset "^2.0.2" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-hook "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-report "^1.1.4" - istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.3.0" - js-yaml "^3.7.0" - mkdirp "^0.5.1" - once "^1.4.0" - -istanbul-lib-coverage@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" - -istanbul-lib-coverage@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - -istanbul-lib-hook@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" - dependencies: - append-transform "^1.0.0" - -istanbul-lib-instrument@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.0" - semver "^5.3.0" +istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" -istanbul-lib-instrument@^1.7.5: - version "1.9.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" +istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.1" - semver "^5.3.0" + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" -istanbul-lib-report@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" +istanbul-lib-report@^2.0.4: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" dependencies: - istanbul-lib-coverage "^1.2.0" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" -istanbul-lib-source-maps@^1.2.4: - version "1.2.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" +istanbul-lib-source-maps@^3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.0" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" + debug "^4.1.1" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + rimraf "^2.6.3" + source-map "^0.6.1" -istanbul-reports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" +istanbul-reports@^2.1.1: + version "2.2.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" dependencies: - handlebars "^4.0.3" + handlebars "^4.1.2" -jest-changed-files@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.0.1.tgz#f79572d0720844ea5df84c2a448e862c2254f60c" +jest-changed-files@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.8.0.tgz#7e7eb21cf687587a85e50f3d249d1327e15b157b" dependencies: + "@jest/types" "^24.8.0" + execa "^1.0.0" throat "^4.0.0" -jest-cli@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.1.0.tgz#eb8bdd4ce0d15250892e31ad9b69bc99d2a8f6bf" +jest-cli@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.8.0.tgz#b075ac914492ed114fa338ade7362a301693e989" dependencies: - ansi-escapes "^3.0.0" + "@jest/core" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.1.11" - import-local "^1.0.0" - is-ci "^1.0.10" - istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.0.1" - jest-config "^23.1.0" - jest-environment-jsdom "^23.1.0" - jest-get-type "^22.1.0" - jest-haste-map "^23.1.0" - jest-message-util "^23.1.0" - jest-regex-util "^23.0.0" - jest-resolve-dependencies "^23.0.1" - jest-runner "^23.1.0" - jest-runtime "^23.1.0" - jest-snapshot "^23.0.1" - jest-util "^23.1.0" - jest-validate "^23.0.1" - jest-watcher "^23.1.0" - jest-worker "^23.0.1" - micromatch "^2.3.11" - node-notifier "^5.2.1" - realpath-native "^1.0.0" - rimraf "^2.5.4" - slash "^1.0.0" - string-length "^2.0.0" - strip-ansi "^4.0.0" - which "^1.2.12" - yargs "^11.0.0" - -jest-config@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.1.0.tgz#708ca0f431d356ee424fb4895d3308006bdd8241" - dependencies: - babel-core "^6.0.0" - babel-jest "^23.0.1" + import-local "^2.0.0" + is-ci "^2.0.0" + jest-config "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^12.0.2" + +jest-config@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.8.0.tgz#77db3d265a6f726294687cbbccc36f8a76ee0f4f" + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^24.8.0" + "@jest/types" "^24.8.0" + babel-jest "^24.8.0" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.1.0" - jest-environment-node "^23.1.0" - jest-get-type "^22.1.0" - jest-jasmine2 "^23.1.0" - jest-regex-util "^23.0.0" - jest-resolve "^23.1.0" - jest-util "^23.1.0" - jest-validate "^23.0.1" - pretty-format "^23.0.1" - -jest-diff@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.4.3" - pretty-format "^22.4.3" - -jest-diff@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.1.tgz#3d49137cee12c320a4b4d2b4a6fa6e82d491a16a" + jest-environment-jsdom "^24.8.0" + jest-environment-node "^24.8.0" + jest-get-type "^24.8.0" + jest-jasmine2 "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + micromatch "^3.1.10" + pretty-format "^24.8.0" + realpath-native "^1.1.0" + +jest-diff@^24.0.0, jest-diff@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.8.0.tgz#146435e7d1e3ffdf293d53ff97e193f1d1546172" dependencies: chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.1.0" - pretty-format "^23.0.1" + diff-sequences "^24.3.0" + jest-get-type "^24.8.0" + pretty-format "^24.8.0" jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" -jest-docblock@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.0.1.tgz#deddd18333be5dc2415260a04ef3fce9276b5725" +jest-docblock@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.3.0.tgz#b9c32dac70f72e4464520d2ba4aec02ab14db5dd" dependencies: detect-newline "^2.1.0" -jest-dom@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/jest-dom/-/jest-dom-1.12.1.tgz#4880c91e39e9c737188b5c952740df8912635248" +jest-dom@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/jest-dom/-/jest-dom-3.5.0.tgz#715908b545c0d66a0eba9d21fc59357fac024f43" dependencies: chalk "^2.4.1" css "^2.2.3" - jest-diff "^22.4.3" - jest-matcher-utils "^22.4.3" - pretty-format "^23.0.1" + css.escape "^1.5.1" + jest-diff "^24.0.0" + jest-matcher-utils "^24.0.0" + lodash "^4.17.11" + pretty-format "^24.0.0" redent "^2.0.0" -jest-each@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.1.0.tgz#16146b592c354867a5ae5e13cdf15c6c65b696c6" +jest-each@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.8.0.tgz#a05fd2bf94ddc0b1da66c6d13ec2457f35e52775" dependencies: + "@jest/types" "^24.8.0" chalk "^2.0.1" - pretty-format "^23.0.1" - -jest-environment-jsdom@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz#85929914e23bed3577dac9755f4106d0697c479c" - dependencies: - jest-mock "^23.1.0" - jest-util "^23.1.0" + jest-get-type "^24.8.0" + jest-util "^24.8.0" + pretty-format "^24.8.0" + +jest-environment-jsdom@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.8.0.tgz#300f6949a146cabe1c9357ad9e9ecf9f43f38857" + dependencies: + "@jest/environment" "^24.8.0" + "@jest/fake-timers" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" + jest-util "^24.8.0" jsdom "^11.5.1" -jest-environment-node@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.1.0.tgz#452c0bf949cfcbbacda1e1762eeed70bc784c7d5" +jest-environment-node@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.8.0.tgz#d3f726ba8bc53087a60e7a84ca08883a4c892231" dependencies: - jest-mock "^23.1.0" - jest-util "^23.1.0" + "@jest/environment" "^24.8.0" + "@jest/fake-timers" "^24.8.0" + "@jest/types" "^24.8.0" + jest-mock "^24.8.0" + jest-util "^24.8.0" -jest-get-type@^22.1.0, jest-get-type@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" +jest-get-type@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.8.0.tgz#a7440de30b651f5a70ea3ed7ff073a32dfe646fc" -jest-haste-map@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.1.0.tgz#18e6c7d5a8d27136f91b7d9852f85de0c7074c49" +jest-haste-map@^24.8.0: + version "24.8.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.8.1.tgz#f39cc1d2b1d907e014165b4bd5a957afcb992982" dependencies: + "@jest/types" "^24.8.0" + anymatch "^2.0.0" fb-watchman "^2.0.0" - graceful-fs "^4.1.11" - jest-docblock "^23.0.1" - jest-serializer "^23.0.1" - jest-worker "^23.0.1" - micromatch "^2.3.11" - sane "^2.0.0" + graceful-fs "^4.1.15" + invariant "^2.2.4" + jest-serializer "^24.4.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" + micromatch "^3.1.10" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^1.2.7" -jest-jasmine2@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz#4afab31729b654ddcd2b074add849396f13b30b8" +jest-jasmine2@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.8.0.tgz#a9c7e14c83dd77d8b15e820549ce8987cc8cd898" dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.1.0" - is-generator-fn "^1.0.0" - jest-diff "^23.0.1" - jest-each "^23.1.0" - jest-matcher-utils "^23.0.1" - jest-message-util "^23.1.0" - jest-snapshot "^23.0.1" - jest-util "^23.1.0" - pretty-format "^23.0.1" - -jest-leak-detector@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz#9dba07505ac3495c39d3ec09ac1e564599e861a0" - dependencies: - pretty-format "^23.0.1" - -jest-matcher-utils@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.4.3" - pretty-format "^22.4.3" + expect "^24.8.0" + is-generator-fn "^2.0.0" + jest-each "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-runtime "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + pretty-format "^24.8.0" + throat "^4.0.0" -jest-matcher-utils@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz#0c6c0daedf9833c2a7f36236069efecb4c3f6e5f" +jest-leak-detector@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.8.0.tgz#c0086384e1f650c2d8348095df769f29b48e6980" dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - pretty-format "^23.0.1" + pretty-format "^24.8.0" -jest-message-util@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.1.0.tgz#9a809ba487ecac5ce511d4e698ee3b5ee2461ea9" +jest-matcher-utils@^24.0.0, jest-matcher-utils@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.8.0.tgz#2bce42204c9af12bde46f83dc839efe8be832495" dependencies: - "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" + jest-diff "^24.8.0" + jest-get-type "^24.8.0" + pretty-format "^24.8.0" + +jest-message-util@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.8.0.tgz#0d6891e72a4beacc0292b638685df42e28d6218b" + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/stack-utils" "^1.0.1" + chalk "^2.0.1" + micromatch "^3.1.10" + slash "^2.0.0" stack-utils "^1.0.1" -jest-mock@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.1.0.tgz#a381c31b121ab1f60c462a2dadb7b86dcccac487" +jest-mock@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.8.0.tgz#2f9d14d37699e863f1febf4e4d5a33b7fdbbde56" + dependencies: + "@jest/types" "^24.8.0" -jest-regex-util@^23.0.0: - version "23.0.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76" +jest-pnp-resolver@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" -jest-resolve-dependencies@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz#d01a10ddad9152c4cecdf5eac2b88571c4b6a64d" - dependencies: - jest-regex-util "^23.0.0" - jest-snapshot "^23.0.1" +jest-regex-util@^24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.3.0.tgz#d5a65f60be1ae3e310d5214a0307581995227b36" -jest-resolve@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.1.0.tgz#b9e316eecebd6f00bc50a3960d1527bae65792d2" +jest-resolve-dependencies@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.8.0.tgz#19eec3241f2045d3f990dba331d0d7526acff8e0" dependencies: - browser-resolve "^1.11.2" - chalk "^2.0.1" - realpath-native "^1.0.0" + "@jest/types" "^24.8.0" + jest-regex-util "^24.3.0" + jest-snapshot "^24.8.0" -jest-runner@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5" +jest-resolve@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.8.0.tgz#84b8e5408c1f6a11539793e2b5feb1b6e722439f" dependencies: + "@jest/types" "^24.8.0" + browser-resolve "^1.11.3" + chalk "^2.0.1" + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-runner@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.8.0.tgz#4f9ae07b767db27b740d7deffad0cf67ccb4c5bb" + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.8.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + chalk "^2.4.2" exit "^0.1.2" - graceful-fs "^4.1.11" - jest-config "^23.1.0" - jest-docblock "^23.0.1" - jest-haste-map "^23.1.0" - jest-jasmine2 "^23.1.0" - jest-leak-detector "^23.0.1" - jest-message-util "^23.1.0" - jest-runtime "^23.1.0" - jest-util "^23.1.0" - jest-worker "^23.0.1" + graceful-fs "^4.1.15" + jest-config "^24.8.0" + jest-docblock "^24.3.0" + jest-haste-map "^24.8.0" + jest-jasmine2 "^24.8.0" + jest-leak-detector "^24.8.0" + jest-message-util "^24.8.0" + jest-resolve "^24.8.0" + jest-runtime "^24.8.0" + jest-util "^24.8.0" + jest-worker "^24.6.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.1.0.tgz#b4ae0e87259ecacfd4a884b639db07cf4dd620af" +jest-runtime@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.8.0.tgz#05f94d5b05c21f6dc54e427cd2e4980923350620" dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.6" + "@jest/console" "^24.7.1" + "@jest/environment" "^24.8.0" + "@jest/source-map" "^24.3.0" + "@jest/transform" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/yargs" "^12.0.2" chalk "^2.0.1" - convert-source-map "^1.4.0" exit "^0.1.2" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.11" - jest-config "^23.1.0" - jest-haste-map "^23.1.0" - jest-message-util "^23.1.0" - jest-regex-util "^23.0.0" - jest-resolve "^23.1.0" - jest-snapshot "^23.0.1" - jest-util "^23.1.0" - jest-validate "^23.0.1" - micromatch "^2.3.11" - realpath-native "^1.0.0" - slash "^1.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.1.0" - yargs "^11.0.0" - -jest-serializer@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" - -jest-snapshot@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.1.tgz#6674fa19b9eb69a99cabecd415bddc42d6af3e7e" + glob "^7.1.3" + graceful-fs "^4.1.15" + jest-config "^24.8.0" + jest-haste-map "^24.8.0" + jest-message-util "^24.8.0" + jest-mock "^24.8.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.8.0" + jest-snapshot "^24.8.0" + jest-util "^24.8.0" + jest-validate "^24.8.0" + realpath-native "^1.1.0" + slash "^2.0.0" + strip-bom "^3.0.0" + yargs "^12.0.2" + +jest-serializer@^24.4.0: + version "24.4.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.4.0.tgz#f70c5918c8ea9235ccb1276d232e459080588db3" + +jest-snapshot@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.8.0.tgz#3bec6a59da2ff7bc7d097a853fb67f9d415cb7c6" dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^24.8.0" chalk "^2.0.1" - jest-diff "^23.0.1" - jest-matcher-utils "^23.0.1" + expect "^24.8.0" + jest-diff "^24.8.0" + jest-matcher-utils "^24.8.0" + jest-message-util "^24.8.0" + jest-resolve "^24.8.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.0.1" + pretty-format "^24.8.0" + semver "^5.5.0" -jest-util@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.1.0.tgz#c0251baf34644c6dd2fea78a962f4263ac55772d" +jest-util@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.8.0.tgz#41f0e945da11df44cc76d64ffb915d0716f46cd1" dependencies: - callsites "^2.0.0" + "@jest/console" "^24.7.1" + "@jest/fake-timers" "^24.8.0" + "@jest/source-map" "^24.3.0" + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + callsites "^3.0.0" chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^23.1.0" + graceful-fs "^4.1.15" + is-ci "^2.0.0" mkdirp "^0.5.1" - slash "^1.0.0" + slash "^2.0.0" source-map "^0.6.0" -jest-validate@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.1.tgz#cd9f01a89d26bb885f12a8667715e9c865a5754f" +jest-validate@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.8.0.tgz#624c41533e6dfe356ffadc6e2423a35c2d3b4849" dependencies: + "@jest/types" "^24.8.0" + camelcase "^5.0.0" chalk "^2.0.1" - jest-get-type "^22.1.0" + jest-get-type "^24.8.0" leven "^2.1.0" - pretty-format "^23.0.1" + pretty-format "^24.8.0" -jest-watch-typeahead@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.1.0.tgz#16b6cfe087fc7f181daadea5abeb68a0fcc70eac" +jest-watch-typeahead@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.3.1.tgz#47701024b64b444aa325d801b4b3a6d61ed70701" dependencies: ansi-escapes "^3.0.0" - chalk "^2.3.1" - lodash "4.17.5" - slash "^1.0.0" + chalk "^2.4.1" + jest-watcher "^24.3.0" + slash "^2.0.0" string-length "^2.0.0" - strip-ansi "^4.0.0" + strip-ansi "^5.0.0" -jest-watcher@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.1.0.tgz#a8d5842e38d9fb4afff823df6abb42a58ae6cdbd" +jest-watcher@^24.3.0, jest-watcher@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.8.0.tgz#58d49915ceddd2de85e238f6213cef1c93715de4" dependencies: + "@jest/test-result" "^24.8.0" + "@jest/types" "^24.8.0" + "@types/yargs" "^12.0.9" ansi-escapes "^3.0.0" chalk "^2.0.1" + jest-util "^24.8.0" string-length "^2.0.0" -jest-worker@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc" +jest-worker@^24.6.0: + version "24.6.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3" dependencies: merge-stream "^1.0.1" + supports-color "^6.1.0" + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" -jest@^23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a" +jest@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.8.0.tgz#d5dff1984d0d1002196e9b7f12f75af1b2809081" dependencies: - import-local "^1.0.0" - jest-cli "^23.1.0" + import-local "^2.0.0" + jest-cli "^24.8.0" -js-base64@^2.1.8: - version "2.4.8" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.8.tgz#57a9b130888f956834aa40c5b165ba59c758f033" +js-base64@^2.4.3: + version "2.6.4" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" + integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== -js-base64@^2.1.9: - version "2.4.0" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.0.tgz#9e566fee624751a1d720c966cd6226d29d4025aa" +js-levenshtein@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" 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-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -4500,18 +4908,23 @@ jsdom@^11.5.1: whatwg-url "^6.3.0" xml-name-validator "^2.0.1" -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" -json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" @@ -4520,6 +4933,11 @@ json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -4528,27 +4946,19 @@ 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.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json3@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + dependencies: + minimist "^1.2.0" jsprim@^1.2.2: version "1.4.1" @@ -4559,15 +4969,12 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsx-ast-utils@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" +jsx-ast-utils@^2.1.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz#4d4973ebf8b9d2837ee91a8208cc66f3a2776cfb" dependencies: array-includes "^3.0.3" - -killable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + object.assign "^4.1.0" kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" @@ -4589,9 +4996,19 @@ kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +kind-of@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +kleur@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + +klona@^2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc" + integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== lcid@^1.0.0: version "1.0.0" @@ -4599,6 +5016,12 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + dependencies: + invert-kv "^2.0.0" + left-pad@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" @@ -4614,21 +5037,26 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" dependencies: graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" -loader-runner@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: +loader-utils@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" dependencies: @@ -4650,21 +5078,16 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - -lodash.clonedeep@^4.3.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" +lodash.escape@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" lodash.flattendeep@^4.4.0: version "4.4.0" @@ -4682,44 +5105,31 @@ lodash.merge@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" -lodash.mergewith@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -lodash.tail@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" - lodash.unescape@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash@^4.13.1, lodash@^4.15.0, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -lodash@4.17.5: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" +lodash@^4.17.11: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" -lodash@^4.0.0, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.10: +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lodash@^4.17.4, lodash@~4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -log-symbols@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - dependencies: - chalk "^2.0.1" - loglevel-colored-level-prefix@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz#6a40218fdc7ae15fc76c3d0f3e676c465388603e" @@ -4731,26 +5141,7 @@ loglevel@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" -loglevelnext@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.5.tgz#36fc4f5996d6640f539ff203ba819641680d75a2" - dependencies: - es6-symbol "^3.1.1" - object.assign "^4.1.0" - -long@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - -long@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: +loose-envify@^1.0.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" dependencies: @@ -4762,29 +5153,48 @@ loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" -loud-rejection@^1.0.0, loud-rejection@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lru-cache@^4.0.1, lru-cache@^4.1.1: +lru-cache@^4.0.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" -macaddress@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: - pify "^3.0.0" + yallist "^4.0.0" + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-fetch-happen@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" + integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.2" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" make-plural@^4.1.1: version "4.1.1" @@ -4798,15 +5208,17 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -mamacro@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + dependencies: + p-defer "^1.0.0" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" -map-obj@^1.0.0, map-obj@^1.0.1: +map-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" @@ -4814,23 +5226,17 @@ map-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" +map-obj@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== + map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" dependencies: object-visit "^1.0.0" -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -md5.js@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4841,31 +5247,43 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -memoize-one@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.0.3.tgz#cdfdd942853f1a1b4c71c5336b8c49da0bf0273c" - -memory-fs@^0.4.0, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" -meow@^3.3.0, meow@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" +memfs@^3.4.3: + version "3.4.4" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.4.tgz#e8973cd8060548916adcca58a248e7805c715e89" + integrity sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA== dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" + fs-monkey "1.0.3" + +memoize-one@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== + +meow@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-9.0.0.tgz#cd9510bc5cac9dee7d03c73ee1f9ad959f4ea364" + integrity sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize "^1.2.0" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" merge-descriptors@1.0.1: version "1.0.1" @@ -4877,9 +5295,10 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" -merge@^1.1.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== messageformat-parser@^1.1.0: version "1.1.0" @@ -4899,25 +5318,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.4, micromatch@^3.1.8, micromatch@^3.1.9: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" dependencies: @@ -4935,16 +5336,22 @@ micromatch@^3.1.4, micromatch@^3.1.8, micromatch@^3.1.9: snapdragon "^0.8.1" to-regex "^3.0.2" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" +micromatch@^4.0.2: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" -"mime-db@>= 1.30.0 < 2": - version "1.32.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-db@~1.30.0: version "1.30.0" @@ -4954,49 +5361,80 @@ mime-db@~1.35.0: version "1.35.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18: version "2.1.19" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" dependencies: mime-db "~1.35.0" -mime-types@~2.1.15, mime-types@~2.1.16: +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime-types@~2.1.16: version "2.1.17" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" dependencies: mime-db "~1.30.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" +mime-types@~2.1.19: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + dependencies: + mime-db "1.40.0" -mime@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + +min-indent@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist-options@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + kind-of "^6.0.3" + minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: +minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -5004,6 +5442,45 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" + integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== + dependencies: + minipass "^3.1.0" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + minipass@^2.2.1, minipass@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" @@ -5011,26 +5488,26 @@ minipass@^2.2.1, minipass@^2.3.3: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + minizlib@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" dependencies: minipass "^2.2.1" -mississippi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" +minizlib@^2.0.0, minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^2.0.1" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" + minipass "^3.0.0" + yallist "^4.0.0" mixin-deep@^1.2.0: version "1.3.1" @@ -5039,64 +5516,54 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mixin-object@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" - dependencies: - for-in "^0.1.3" - is-extendable "^0.1.1" - -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + moment@^2.11.1: version "2.20.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.20.1.tgz#d6eb1a46cbcc14a2b2f9434112c1ff8907f313fd" -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" +ms@2.1.3, ms@^2.0.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multicast-dns@^7.2.4: + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== dependencies: - dns-packet "^1.3.1" + dns-packet "^5.2.2" thunky "^1.0.2" -mutationobserver-shim@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#f4d5dae7a4971a2207914fb5a90ebd514b65acca" - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.10.0, nan@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" +nan@^2.12.1, nan@^2.13.2: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" -nan@^2.3.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== nanomatch@^1.2.9: version "1.2.9" @@ -5139,13 +5606,19 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -neo-async@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" +negotiator@0.6.3, negotiator@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -next-tick@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nice-try@^1.0.4: version "1.0.4" @@ -5158,58 +5631,34 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-forge@0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" - -node-gyp@^3.3.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.7.0.tgz#789478e8f6c45e277aa014f3e28f958f286f9203" - dependencies: - fstream "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - osenv "0" - request ">=2.9.0 <2.82.0" - rimraf "2" - semver "~5.3.0" - tar "^2.0.0" - which "1" +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-gyp@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-libs-browser@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.0" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" node-notifier@^5.2.1: version "5.2.1" @@ -5220,9 +5669,9 @@ node-notifier@^5.2.1: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -5235,43 +5684,35 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -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" +node-releases@^1.1.23: + version "1.1.25" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.25.tgz#0c2d7dbc7fed30fbe02a9ee3007b8c90bf0133d3" dependencies: - 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" -node-sass@^4.9.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.2.tgz#5e63fe6bd0f2ae3ac9d6c14ede8620e2b8bdb437" +node-releases@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" + integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== + +node-sass@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-7.0.1.tgz#ad4f6bc663de8acc0a9360db39165a1e2620aa72" + integrity sha512-uMy+Xt29NlqKCFdFRZyXKOTqGt+QaKHexv9STj2WeLottnlqZEEWx6Bj0MXNthmFRRdM/YwyNo/8Tr46TOM0jQ== dependencies: async-foreach "^0.1.3" - chalk "^1.1.1" - cross-spawn "^3.0.0" + chalk "^4.1.2" + cross-spawn "^7.0.3" gaze "^1.0.0" get-stdin "^4.0.1" glob "^7.0.3" - in-publish "^2.0.0" - lodash.assign "^4.2.0" - lodash.clonedeep "^4.3.2" - lodash.mergewith "^4.6.0" - meow "^3.7.0" - mkdirp "^0.5.1" - nan "^2.10.0" - node-gyp "^3.3.1" - npmlog "^4.0.0" - request "2.87.0" - sass-graph "^2.2.4" + lodash "^4.17.15" + meow "^9.0.0" + nan "^2.13.2" + node-gyp "^8.4.1" + npmlog "^5.0.0" + request "^2.88.0" + sass-graph "4.0.0" stdout-stream "^1.4.0" "true-case-path" "^1.0.2" @@ -5282,12 +5723,6 @@ nomnom@~1.6.2: colors "0.5.x" underscore "~1.4.4" -"nopt@2 || 3", nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -5295,7 +5730,20 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +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: @@ -5304,24 +5752,35 @@ 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.0, normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-package-data@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== + dependencies: + hosted-git-info "^4.0.1" + is-core-module "^2.5.0" + semver "^7.3.4" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" npm-bundled@^1.0.1: version "1.0.3" @@ -5340,7 +5799,14 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: @@ -5349,16 +5815,32 @@ npm-run-path@^2.0.0: gauge "~2.7.3" set-blocking "~2.0.0" +npmlog@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + +npmlog@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" + integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== + dependencies: + are-we-there-yet "^3.0.0" + console-control-strings "^1.1.0" + gauge "^4.0.3" + set-blocking "^2.0.0" + nth-check@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" dependencies: boolbase "~1.0.0" -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -5367,10 +5849,14 @@ nwmatcher@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" -oauth-sign@~0.8.1, oauth-sign@~0.8.2: +oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5383,9 +5869,14 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3" +object-inspect@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" + +object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== object-is@^1.0.1: version "1.0.1" @@ -5395,13 +5886,17 @@ object-keys@^1.0.11, object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" +object-keys@^1.0.12: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" dependencies: isobject "^3.0.0" -object.assign@^4.0.4, object.assign@^4.1.0: +object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" dependencies: @@ -5419,6 +5914,24 @@ object.entries@^1.0.4: function-bind "^1.1.0" has "^1.0.1" +object.entries@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" + dependencies: + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" + +object.fromentries@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.11.0" + function-bind "^1.1.1" + has "^1.0.1" + object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" @@ -5426,13 +5939,6 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.2" es-abstract "^1.5.1" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -5448,21 +5954,32 @@ object.values@^1.0.4: function-bind "^1.1.0" has "^1.0.1" -obuf@^1.0.0, obuf@^1.1.1: +object.values@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9" + dependencies: + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" + +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -5474,11 +5991,21 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opn@^5.1.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.0.9: + version "8.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== dependencies: - is-wsl "^1.1.0" + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" optimist@^0.6.1: version "0.6.1" @@ -5498,26 +6025,10 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -original@>=0.0.5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b" - dependencies: - url-parse "1.0.x" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" @@ -5526,17 +6037,18 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: +os-locale@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.0, 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: - 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" - osenv@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" @@ -5544,18 +6056,32 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -output-file-sync@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" +output-file-sync@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" dependencies: - graceful-fs "^4.1.4" + graceful-fs "^4.1.11" + is-plain-obj "^1.1.0" mkdirp "^0.5.1" - object-assign "^4.1.0" + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + +p-each-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" + dependencies: + p-reduce "^1.0.0" p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + p-limit@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" @@ -5568,6 +6094,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -5580,9 +6113,31 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + +p-retry@^4.5.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== + dependencies: + "@types/retry" "0.12.0" + retry "^0.13.1" p-try@^1.0.0: version "1.0.0" @@ -5592,42 +6147,22 @@ p-try@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" -pako@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - -parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - dependencies: - cyclist "~0.2.2" - inherits "^2.0.3" - readable-stream "^2.1.5" - -parse-asn1@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: - error-ex "^1.2.0" + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" parse5@^3.0.1, parse5@^3.0.2: version "3.0.3" @@ -5639,29 +6174,29 @@ parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -5673,9 +6208,19 @@ path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@0.1.7: version "0.1.7" @@ -5687,32 +6232,26 @@ path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.16" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + pify "^3.0.0" performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5721,6 +6260,10 @@ pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -5731,11 +6274,24 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" dependencies: - find-up "^2.1.0" + node-modules-regexp "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" pluralize@^7.0.0: version "7.0.0" @@ -5745,276 +6301,64 @@ pn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" -portfinder@^1.0.9: - version "1.0.13" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" - dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - dependencies: - postcss "^5.0.14" - -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - dependencies: - postcss "^5.0.4" - -postcss-discard-empty@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - dependencies: - postcss "^5.0.4" - uniqid "^4.0.0" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" - -postcss-message-helpers@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" - -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" +postcss-modules-extract-imports@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" + integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" +postcss-modules-local-by-default@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" + integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" + icss-utils "^5.0.0" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.1.0" -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" +postcss-modules-scope@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" + integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" + postcss-selector-parser "^6.0.4" -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" +postcss-modules-values@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" + integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + icss-utils "^5.0.0" -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" +postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" + cssesc "^3.0.0" + util-deprecate "^1.0.2" -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" +postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^6.0.1: - version "6.0.16" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.16.tgz#112e2fe2a6d2109be0957687243170ea5589e146" +postcss@^8.4.7: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== dependencies: - chalk "^2.3.0" - source-map "^0.6.1" - supports-color "^5.1.0" + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - prettier-eslint-cli@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/prettier-eslint-cli/-/prettier-eslint-cli-4.7.0.tgz#66421dd8e03ea67d6ba28d9e16b0de01559bc8ad" @@ -6066,21 +6410,25 @@ pretty-format@^22.0.3: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" +pretty-format@^24.0.0, pretty-format@^24.8.0: + version "24.8.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.8.0.tgz#8dae7044f58db7cb8be245383b565a963e3c27f2" dependencies: - ansi-regex "^3.0.0" + "@jest/types" "^24.8.0" + ansi-regex "^4.0.0" ansi-styles "^3.2.0" + react-is "^16.8.4" -pretty-format@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.1.tgz#d61d065268e4c759083bccbca27a01ad7c7601f4" +pretty-format@^24.5.0: + version "24.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.5.0.tgz#cc69a0281a62cd7242633fc135d6930cd889822d" dependencies: - ansi-regex "^3.0.0" + "@jest/types" "^24.5.0" + ansi-regex "^4.0.0" ansi-styles "^3.2.0" + react-is "^16.8.4" -private@^0.1.6, private@^0.1.7, private@^0.1.8: +private@^0.1.6: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -6092,10 +6440,6 @@ 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" -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" @@ -6104,12 +6448,35 @@ promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" dependencies: asap "~2.0.3" +prompts@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.1.0.tgz#bf90bc71f6065d255ea2bdc0fe6520485c1b45db" + dependencies: + kleur "^3.0.2" + sisteransi "^1.0.0" + +prop-types-exact@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" + dependencies: + has "^1.0.3" + object.assign "^4.1.0" + reflect.ownkeys "^0.2.0" + prop-types@^15.5.4, prop-types@^15.6.0: version "15.6.0" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" @@ -6125,101 +6492,65 @@ prop-types@^15.6.2: loose-envify "^1.3.1" object-assign "^4.1.1" -proxy-addr@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" +prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -public-encrypt@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" +psl@^1.1.24: + version "1.4.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" -pump@^2.0.0, pump@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" dependencies: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: +punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" punycode@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - -q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - -qs@6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -qs@~6.5.1: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" -querystringify@0.0.x: - version "0.0.4" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" -querystringify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" +qs@~6.5.1, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + raf@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" @@ -6237,16 +6568,10 @@ randexp@^0.4.2: discontinuous-range "1.0.0" ret "~0.1.10" -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" @@ -6254,35 +6579,21 @@ randomcolor@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/randomcolor/-/randomcolor-0.5.3.tgz#7f90f2f2a7f6d5a52232161eeaeeaea9ac3b5815" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.0.3, range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.1.7: - version "1.2.3" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.3.tgz#51575a900f8dd68381c710b4712c2154c3e2035b" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -6305,14 +6616,9 @@ react-is@^16.4.1: version "16.4.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.4.1.tgz#d624c4650d2c65dbd52c72622bbf389435d9776e" -react-reconciler@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.7.0.tgz#9614894103e5f138deeeb5eabaf3ee80eb1d026d" - dependencies: - fbjs "^0.8.16" - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.0" +react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" react-router-dom@^4.1.1: version "4.2.2" @@ -6346,12 +6652,12 @@ react-test-renderer@^16.0.0-0: prop-types "^15.6.0" react-is "^16.4.1" -react-testing-library@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-5.1.0.tgz#ae208d9e3b7faae233409d205e287b304ec8ffdc" +react-testing-library@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-6.0.3.tgz#8b5d276a353c17ce4f7486015bb7a1c8827c442c" dependencies: - dom-testing-library "^3.1.0" - wait-for-expect "^1.0.0" + "@babel/runtime" "^7.4.2" + dom-testing-library "^3.18.2" react@^16.2.0: version "16.4.1" @@ -6362,22 +6668,41 @@ react@^16.2.0: object-assign "^4.1.1" prop-types "^15.6.0" -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" + find-up "^3.0.0" + read-pkg "^3.0.0" -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== dependencies: - load-json-file "^1.0.0" + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + dependencies: + load-json-file "^4.0.0" normalize-package-data "^2.3.2" - path-type "^1.0.0" + path-type "^3.0.0" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: +readable-stream@^2.0.1, readable-stream@^2.0.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -6389,7 +6714,7 @@ read-pkg@^1.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.2.2: +readable-stream@^2.0.2, readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -6401,27 +6726,42 @@ readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.2.2: string_decoder "~1.0.3" util-deprecate "~1.0.1" -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" +readable-stream@^3.0.6, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" -realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +realpath-native@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" dependencies: util.promisify "^1.0.0" -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" +rechoir@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" + integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" + resolve "^1.9.0" redent@^2.0.0: version "2.0.0" @@ -6430,45 +6770,41 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" + indent-string "^4.0.0" + strip-indent "^3.0.0" -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - dependencies: - balanced-match "^0.4.2" +reflect.ownkeys@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" -regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" +regenerate-unicode-properties@^8.0.2: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + dependencies: + regenerate "^1.4.0" -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" regenerator-runtime@^0.11.0: 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" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" +regenerator-runtime@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" +regenerator-transform@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.0.tgz#2ca9aaf7a2c239dd32e4761218425b8c7a86ecaf" dependencies: - is-equal-shallow "^0.1.3" + private "^0.1.6" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -6477,29 +6813,32 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" +regexp-tree@^0.1.6: + version "0.1.10" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.10.tgz#d837816a039c7af8a8d64d7a7c3cf6a1d93450bc" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" +regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" + +regexpu-core@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" + regenerate "^1.4.0" + regenerate-unicode-properties "^8.0.2" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" dependencies: jsesc "~0.5.0" @@ -6511,16 +6850,10 @@ repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" -repeat-string@^1.5.2, repeat-string@^1.6.1: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - dependencies: - is-finite "^1.0.0" - request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" @@ -6535,36 +6868,9 @@ request-promise-native@^1.0.3: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@2.81.0, "request@>=2.9.0 <2.82.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.87.0: - version "2.87.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" +request@^2.83.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -6574,6 +6880,7 @@ request@2.87.0: forever-agent "~0.6.1" form-data "~2.3.1" har-validator "~5.0.3" + hawk "~6.0.2" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -6583,45 +6890,53 @@ request@2.87.0: performance-now "^2.1.0" qs "~6.5.1" safe-buffer "^5.1.1" + stringstream "~0.0.5" tough-cookie "~2.3.3" tunnel-agent "^0.6.0" uuid "^3.1.0" -request@^2.83.0: - version "2.83.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" +request@^2.88.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" dependencies: aws-sign2 "~0.7.0" - aws4 "^1.6.0" + aws4 "^1.8.0" caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" + combined-stream "~1.0.6" + extend "~3.0.2" forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" + form-data "~2.3.2" + har-validator "~5.1.0" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" + mime-types "~2.1.19" + oauth-sign "~0.9.0" performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" tunnel-agent "^0.6.0" - uuid "^3.1.0" + uuid "^3.3.2" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + require-relative@^0.8.7: version "0.8.7" resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" @@ -6633,9 +6948,10 @@ require-uncached@^1.0.3: caller-path "^0.1.0" resolve-from "^1.0.0" -requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: +requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= reserved-words@^0.1.2: version "0.1.2" @@ -6647,6 +6963,13 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" @@ -6655,6 +6978,11 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + resolve-pathname@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" @@ -6667,6 +6995,21 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" +resolve@^1.10.0, resolve@^1.9.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^1.10.1, resolve@^1.3.2: + version "1.11.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" + dependencies: + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -6678,24 +7021,34 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" +rimraf@^2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" rst-selector-parser@^2.2.3: version "2.2.3" @@ -6704,18 +7057,16 @@ rst-selector-parser@^2.2.3: lodash.flattendeep "^4.4.0" nearley "^2.7.10" +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" dependencies: is-promise "^2.1.0" -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - dependencies: - aproba "^1.1.1" - rx-lite-aggregates@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" @@ -6732,90 +7083,98 @@ rxjs@^5.3.0: dependencies: symbol-observable "1.0.1" -rxjs@^6.1.0: - version "6.2.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.2.tgz#eb75fa3c186ff5289907d06483a77884586e1cf9" - dependencies: - tslib "^1.9.0" - -safe-buffer@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" -sane@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.2.0.tgz#d6d2e2fcab00e3d283c93b912b7c3a20846f1d56" +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" dependencies: - anymatch "^1.3.0" - exec-sh "^0.2.0" + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" fb-watchman "^2.0.0" - minimatch "^3.0.2" + micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" - watch "~0.18.0" - optionalDependencies: - fsevents "^1.1.1" -sass-graph@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" +sass-graph@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-4.0.0.tgz#fff8359efc77b31213056dfd251d05dadc74c613" + integrity sha512-WSO/MfXqKH7/TS8RdkCX3lVkPFQzCgbqdGsmSKq6tlPU+GpGEsa/5aW18JqItnqh+lPtcjifqdZ/VmiILkKckQ== dependencies: glob "^7.0.0" - lodash "^4.0.0" - scss-tokenizer "^0.2.3" - yargs "^7.0.0" + lodash "^4.17.11" + scss-tokenizer "^0.3.0" + yargs "^17.2.1" -sass-loader@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.0.3.tgz#6ca10871a1cc7549f8143db5a9958242c4e4ca2a" +sass-loader@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.0.0.tgz#0b4bff0289951ed21240bca54453eca3dbda1713" + integrity sha512-IHCFecI+rbPvXE2zO/mqdVFe8MU7ElGrwga9hh2H65Ru4iaBJAMRteum1c4Gsxi9Cq1FOtTEDd6+/AEYuQDM4Q== dependencies: - clone-deep "^2.0.1" - loader-utils "^1.0.1" - lodash.tail "^4.1.1" - neo-async "^2.5.0" - pify "^3.0.0" + klona "^2.0.4" + neo-async "^2.6.2" -sax@^1.2.1, sax@^1.2.4, sax@~1.2.1: +sax@^1.2.1, sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -schema-utils@^0.4.4, schema-utils@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.5.tgz#21836f0608aac17b78f9e3e24daff14a5ca13a3e" +schema-utils@^3.1.0, schema-utils@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" -scss-tokenizer@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" +schema-utils@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" + integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.8.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.0.0" + +scss-tokenizer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.3.0.tgz#ef7edc3bc438b25cd6ffacf1aa5b9ad5813bf260" + integrity sha512-14Zl9GcbBvOT9057ZKjpz5yPOyUWG2ojd9D5io28wHRYsOrs7U95Q+KNL87+32p8rc+LvDpbu/i9ZYjM9Q+FsQ== dependencies: - js-base64 "^2.1.8" - source-map "^0.4.2" + js-base64 "^2.4.3" + source-map "^0.7.1" select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" -selfsigned@^1.9.1: - version "1.10.3" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.3.tgz#d628ecf9e3735f84e8bafba936b3cf85bea43823" +selfsigned@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" + integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== dependencies: - node-forge "0.7.5" + node-forge "^1" "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0: version "5.5.0" @@ -6825,35 +7184,51 @@ semver@5.4.1, semver@^5.3.0: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" +semver@^5.6.0, semver@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" +semver@^6.0.0, semver@^6.1.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + +semver@^7.3.4, semver@^7.3.5: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serialize-javascript@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" -serve-index@^1.7.2: +serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= dependencies: accepts "~1.3.4" batch "0.6.1" @@ -6863,23 +7238,20 @@ serve-index@^1.7.2: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" + parseurl "~1.3.3" + send "0.18.0" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -6898,7 +7270,7 @@ set-value@^2.0.0: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4, setimmediate@^1.0.5: +setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -6906,24 +7278,17 @@ setprototypeof@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -shallow-clone@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-1.0.0.tgz#4480cd06e882ef68b2ad88a3ea54832e2c48b571" +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== dependencies: - is-extendable "^0.1.1" - kind-of "^5.0.0" - mixin-object "^2.0.1" + kind-of "^6.0.2" shebang-command@^1.2.0: version "1.2.0" @@ -6931,21 +7296,51 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.2.tgz#ec57d64b6f25c4f26c0e2c7dd23f2d7f12f7e418" + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" slice-ansi@1.0.0: version "1.0.0" @@ -6953,6 +7348,11 @@ slice-ansi@1.0.0: dependencies: is-fullwidth-code-point "^2.0.0" +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -6980,49 +7380,42 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - sntp@2.x.x: version "2.1.0" resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" dependencies: hoek "4.x.x" -sockjs-client@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83" +sockjs@^0.3.21: + version "0.3.24" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" + integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" - json3 "^3.3.2" - url-parse "^1.1.8" + faye-websocket "^0.11.3" + uuid "^8.3.2" + websocket-driver "^0.7.4" -sockjs@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" +socks-proxy-agent@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz#f6b5229cc0cbd6f2f202d9695f09d871e951c85e" + integrity sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ== dependencies: - faye-websocket "^0.10.0" - uuid "^3.0.1" + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" +socks@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" + integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + ip "^1.1.5" + smart-buffer "^4.2.0" -source-list-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== source-map-resolve@^0.5.0, source-map-resolve@^0.5.1: version "0.5.2" @@ -7034,12 +7427,6 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.1: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - source-map-support@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" @@ -7047,6 +7434,14 @@ source-map-support@^0.5.6: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -7057,13 +7452,7 @@ source-map@^0.1.38: dependencies: amdefine ">=0.0.4" -source-map@^0.4.2, source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.6: +source-map@^0.5.0, source-map@^0.5.6, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -7071,6 +7460,18 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +source-map@^0.7.1: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + +source-map@~0.8.0-beta.0: + version "0.8.0-beta.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" + integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== + dependencies: + whatwg-url "^7.0.0" + spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" @@ -7093,28 +7494,28 @@ 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" -spdy-transport@^2.0.18: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== dependencies: - debug "^2.6.8" - detect-node "^2.0.3" + debug "^4.1.0" + detect-node "^2.0.4" hpack.js "^2.1.6" - obuf "^1.1.1" - readable-stream "^2.2.9" - safe-buffer "^5.0.1" - wbuf "^1.7.2" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" -spdy@^3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== dependencies: - debug "^2.6.8" - handle-thing "^1.2.5" + debug "^4.1.0" + handle-thing "^2.0.0" http-deceiver "^1.2.7" - safe-buffer "^5.0.1" select-hose "^2.0.0" - spdy-transport "^2.0.18" + spdy-transport "^3.0.0" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -7141,11 +7542,12 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" -ssri@^5.2.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" +ssri@^8.0.0, ssri@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== dependencies: - safe-buffer "^5.1.1" + minipass "^3.1.1" stack-utils@^1.0.1: version "1.0.1" @@ -7158,7 +7560,12 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.3.1 < 2", statuses@~1.4.0: +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.3.1 < 2": version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -7166,43 +7573,11 @@ stdout-stream@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" dependencies: - readable-stream "^2.0.1" - -stealthy-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + readable-stream "^2.0.1" -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" +stealthy-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" string-length@^2.0.0: version "2.0.0" @@ -7211,7 +7586,7 @@ string-length@^2.0.0: astral-regex "^1.0.0" strip-ansi "^4.0.0" -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -7226,11 +7601,29 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@^1.0.0, string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: - safe-buffer "~5.1.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trim@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.0" + function-bind "^1.0.2" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" string_decoder@~1.0.3: version "1.0.3" @@ -7238,7 +7631,13 @@ string_decoder@~1.0.3: dependencies: safe-buffer "~5.1.0" -stringstream@~0.0.4, stringstream@~0.0.5: +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.5: version "0.0.6" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" @@ -7254,79 +7653,92 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-ansi@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + dependencies: + ansi-regex "^4.1.0" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - is-utf8 "^0.2.0" + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - dependencies: - get-stdin "^4.0.1" +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -style-loader@~0.13.0: - version "0.13.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb" - dependencies: - loader-utils "^1.0.2" +style-loader@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" + integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.2, supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - supports-color@^4.0.0: version "4.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" dependencies: has-flag "^2.0.0" -supports-color@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5" - dependencies: - has-flag "^2.0.0" - -supports-color@^5.3.0, supports-color@^5.4.0: +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 "^3.0.0" -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== symbol-observable@1.0.1: version "1.0.1" @@ -7336,7 +7748,7 @@ symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^4.0.1: +table@4.0.2, table@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: @@ -7347,30 +7759,10 @@ table@^4.0.1: slice-ansi "1.0.0" string-width "^2.1.1" -tapable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" - -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - 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.0.0, tar@^2.2.1: +tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar@^4: version "4.4.4" @@ -7384,25 +7776,47 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -test-exclude@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" +tar@^6.0.2, tar@^6.1.2: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" -test-exclude@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" +terser-webpack-plugin@^5.1.3: + version "5.3.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54" + integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== dependencies: - arrify "^1.0.1" - micromatch "^3.1.8" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.0" + source-map "^0.6.1" + terser "^5.7.2" + +terser@^5.7.2: + version "5.13.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.13.1.tgz#66332cdc5a01b04a224c9fad449fc1a18eaa1799" + integrity sha512-hn4WKOfwnwbYfe48NgrQjqNOH9jzLqRcIfbYytOXCOv46LBfWr9bDS17MQqOi+BWGD0sJK3Sj5NC/gJjiojaoA== + dependencies: + acorn "^8.5.0" + commander "^2.20.0" + source-map "~0.8.0-beta.0" + source-map-support "~0.5.20" + +test-exclude@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" text-table@~0.2.0: version "0.2.0" @@ -7412,13 +7826,6 @@ throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" -through2@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" - through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -7427,12 +7834,6 @@ thunky@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" -timers-browserify@^2.0.4: - version "2.0.10" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" - dependencies: - setimmediate "^1.0.4" - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7443,14 +7844,14 @@ tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +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" + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -7464,6 +7865,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" @@ -7473,27 +7881,40 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + tough-cookie@>=2.3.3, tough-cookie@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" -tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: punycode "^1.4.1" -tr46@^1.0.0: +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tr46@^1.0.0, tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" dependencies: punycode "^2.1.0" -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-newlines@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" + integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== trim-right@^1.0.1: version "1.0.1" @@ -7505,14 +7926,6 @@ trim-right@^1.0.1: dependencies: glob "^6.0.4" -tslib@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7529,19 +7942,28 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-is@~1.6.15: - version "1.6.15" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" - dependencies: - media-typer "0.3.0" - mime-types "~2.1.15" +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== dependencies: media-typer "0.3.0" - mime-types "~2.1.18" + mime-types "~2.1.24" typedarray@^0.0.6: version "0.0.6" @@ -7558,54 +7980,39 @@ typescript@^2.5.1: version "2.6.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" -ua-parser-js@^0.7.18: - version "0.7.18" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" - ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" -uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" dependencies: - commander "~2.13.0" + commander "~2.20.0" source-map "~0.6.1" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" +underscore@~1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" -uglifyjs-webpack-plugin@^1.2.4: - version "1.2.7" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz#57638dd99c853a1ebfe9d97b42160a8a507f9d00" +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" dependencies: - cacache "^10.0.4" - find-cache-dir "^1.0.0" - schema-utils "^0.4.5" - serialize-javascript "^1.4.0" - source-map "^0.6.1" - uglify-es "^3.3.4" - webpack-sources "^1.1.0" - worker-farm "^1.5.2" + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" -underscore@~1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" union-value@^1.0.0: version "1.0.0" @@ -7616,23 +8023,10 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - -uniqid@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - dependencies: - macaddress "^0.2.8" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -unique-filename@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== dependencies: unique-slug "^2.0.0" @@ -7653,11 +8047,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" +upath@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" -uri-js@^4.2.1: +uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" dependencies: @@ -7667,42 +8061,13 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" -url-join@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" - -url-parse@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" - dependencies: - querystringify "0.0.x" - requires-port "1.0.x" - -url-parse@^1.1.8: - version "1.2.0" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986" - dependencies: - querystringify "~1.0.0" - requires-port "~1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" dependencies: kind-of "^6.0.2" -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -7713,39 +8078,22 @@ util.promisify@^1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - dependencies: - inherits "2.0.3" - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" -uuid@^3.0.0, uuid@^3.1.0: +uuid@^3.1.0: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" -uuid@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - -v8-compile-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz#526492e35fc616864284700b7043e01baee09f0a" +uuid@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" -v8flags@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" - dependencies: - user-home "^1.1.1" +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== validate-npm-package-license@^3.0.1: version "3.0.3" @@ -7762,10 +8110,6 @@ vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" -vendors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -7774,17 +8118,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -wait-for-expect@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.0.1.tgz#73ab346ed56ed2ef66c380a59fd623755ceac0ce" +wait-for-expect@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.1.1.tgz#9cd10e07d52810af9e0aaf509872e38f3c3d81ae" -walker@~1.0.5: +walker@^1.0.7, walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" dependencies: @@ -7796,22 +8134,22 @@ warning@^3.0.0: dependencies: loose-envify "^1.0.0" -watch@~0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" +warning@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== dependencies: - exec-sh "^0.2.0" - minimist "^1.2.0" + loose-envify "^1.0.0" -watchpack@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" +watchpack@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" + integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== dependencies: - chokidar "^2.0.2" + glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" - neo-async "^2.5.0" -wbuf@^1.1.0, wbuf@^1.7.2: +wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" dependencies: @@ -7821,112 +8159,111 @@ webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-cli@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.1.0.tgz#d71a83687dcfeb758fdceeb0fe042f96bcf62994" - dependencies: - chalk "^2.4.1" - cross-spawn "^6.0.5" - enhanced-resolve "^4.0.0" - global-modules-path "^2.1.0" - import-local "^1.0.0" - inquirer "^6.0.0" - interpret "^1.1.0" - loader-utils "^1.1.0" - supports-color "^5.4.0" - v8-compile-cache "^2.0.0" - yargs "^12.0.1" - -webpack-dev-middleware@3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz#8b32aa43da9ae79368c1bf1183f2b6cf5e1f39ed" - dependencies: - loud-rejection "^1.6.0" - memory-fs "~0.4.1" - mime "^2.1.0" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - url-join "^4.0.0" - webpack-log "^1.0.1" - -webpack-dev-server@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz#87477252e1ac6789303fb8cd3e585fa5d508a401" - dependencies: - ansi-html "0.0.7" - array-includes "^3.0.3" - bonjour "^3.5.0" - chokidar "^2.0.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" - debug "^3.1.0" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" - http-proxy-middleware "~0.18.0" - import-local "^1.0.0" - internal-ip "1.2.0" - ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" - selfsigned "^1.9.1" - serve-index "^1.7.2" - sockjs "0.3.19" - sockjs-client "1.1.5" - spdy "^3.4.1" - strip-ansi "^3.0.0" - supports-color "^5.1.0" - webpack-dev-middleware "3.1.3" - webpack-log "^1.1.2" - yargs "11.0.0" - -webpack-log@^1.0.1, webpack-log@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d" - dependencies: - chalk "^2.1.0" - log-symbols "^2.1.0" - loglevelnext "^1.0.1" - uuid "^3.1.0" - -webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.16.3: - version "4.16.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.16.3.tgz#861be3176d81e7e3d71c66c8acc9bba35588b525" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-module-context" "1.5.13" - "@webassemblyjs/wasm-edit" "1.5.13" - "@webassemblyjs/wasm-opt" "1.5.13" - "@webassemblyjs/wasm-parser" "1.5.13" - acorn "^5.6.2" - acorn-dynamic-import "^3.0.0" - ajv "^6.1.0" - ajv-keywords "^3.1.0" - chrome-trace-event "^1.0.0" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.0" - json-parse-better-errors "^1.0.2" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - micromatch "^3.1.8" - mkdirp "~0.5.0" - neo-async "^2.5.0" - node-libs-browser "^2.0.0" - schema-utils "^0.4.4" - tapable "^1.0.0" - uglifyjs-webpack-plugin "^1.2.4" - watchpack "^1.5.0" - webpack-sources "^1.0.1" +webpack-cli@^4.9.2: + version "4.9.2" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.2.tgz#77c1adaea020c3f9e2db8aad8ea78d235c83659d" + integrity sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^1.1.1" + "@webpack-cli/info" "^1.4.1" + "@webpack-cli/serve" "^1.6.1" + colorette "^2.0.14" + commander "^7.0.0" + execa "^5.0.0" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^2.2.0" + rechoir "^0.7.0" + webpack-merge "^5.7.3" + +webpack-dev-middleware@^5.3.1: + version "5.3.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" + integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== + dependencies: + colorette "^2.0.10" + memfs "^3.4.3" + mime-types "^2.1.31" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-server@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.0.tgz#737dbf44335bb8bde68f8f39127fc401c97a1557" + integrity sha512-+Nlb39iQSOSsFv0lWUuUTim3jDQO8nhK3E68f//J2r5rIcp4lULHXz2oZ0UVdEeWXEh5lSzYUlzarZhDAeAVQw== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.1" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.0.1" + serve-index "^1.9.1" + sockjs "^0.3.21" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.1" + ws "^8.4.2" + +webpack-merge@^5.7.3: + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@^5.72.1: + version "5.72.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.72.1.tgz#3500fc834b4e9ba573b9f430b2c0a61e1bb57d13" + integrity sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.4.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.9.3" + es-module-lexer "^0.9.0" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.3" + watchpack "^2.3.1" + webpack-sources "^3.2.3" websocket-driver@>=0.5.1: version "0.7.0" @@ -7935,6 +8272,15 @@ websocket-driver@>=0.5.1: http-parser-js ">=0.4.0" websocket-extensions ">=0.1.1" +websocket-driver@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + websocket-extensions@>=0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" @@ -7957,27 +8303,29 @@ whatwg-url@^6.3.0: tr46 "^1.0.0" webidl-conversions "^4.0.1" -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@1, which@^1.2.9, which@^1.3.0: +which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: isexe "^2.0.0" -which@^1.2.12: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" @@ -7987,13 +8335,17 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +wide-align@^1.1.2, wide-align@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== wordwrap@~0.0.2: version "0.0.3" @@ -8003,12 +8355,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -worker-farm@^1.5.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" - dependencies: - errno "~0.1.7" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -8016,13 +8362,22 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write-file-atomic@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -8034,26 +8389,28 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" +ws@^8.4.2: + version "8.7.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.7.0.tgz#eaf9d874b433aa00c0e0d8752532444875db3957" + integrity sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg== + xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" - -xtend@^4.0.0, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +"y18n@^3.2.1 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -8062,17 +8419,27 @@ yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" -yargs-parser@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - dependencies: - camelcase "^4.1.0" +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" dependencies: - camelcase "^3.0.0" + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.0.0: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== yargs-parser@^8.0.0: version "8.1.0" @@ -8080,12 +8447,6 @@ yargs-parser@^8.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - dependencies: - camelcase "^4.1.0" - yargs@10.0.3: version "10.0.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae" @@ -8103,63 +8464,32 @@ yargs@10.0.3: y18n "^3.2.1" yargs-parser "^8.0.0" -yargs@11.0.0, yargs@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@^12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2" +yargs@^12.0.2: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" dependencies: cliui "^4.0.0" - decamelize "^2.0.0" + decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^1.0.1" - os-locale "^2.0.0" + os-locale "^3.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" + yargs-parser "^11.1.1" -yargs@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" +yargs@^17.2.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0"