From 1140a6c9761b36a8a4932197431a463686abd575 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 12 Sep 2019 17:25:19 +0400 Subject: [PATCH 01/35] Sidebar component wip --- src/components/Root/index.js | 2 ++ src/components/Sidebar/index.jsx | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/components/Sidebar/index.jsx diff --git a/src/components/Root/index.js b/src/components/Root/index.js index 8cfba635..4ea68572 100644 --- a/src/components/Root/index.js +++ b/src/components/Root/index.js @@ -6,6 +6,7 @@ import React, { Suspense } from 'react' import { Provider } from 'react-redux' import { ConnectedRouter } from 'connected-react-router' import { hot } from 'react-hot-loader/root' +import Sidebar from '~/components/Sidebar' import PageFrame from '../layout/PageFrame' import Loader from '../Loader' import { history, store } from '~/store' @@ -21,6 +22,7 @@ const Root = () => ( }> + diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx new file mode 100644 index 00000000..a9bbbcf7 --- /dev/null +++ b/src/components/Sidebar/index.jsx @@ -0,0 +1,16 @@ +// @flow +import React, { useState } from 'react' +import { makeStyles } from '@material-ui/core/styles' +import Drawer from '@material-ui/core/Drawer' + +const Sidebar = () => { + const [isOpen, setIsOpen] = useState(true) + + const toggleSidebar = () => { + setIsOpen((prevIsOpen) => !prevIsOpen) + } + + return Wop +} + +export default Sidebar From 6ea743da25fc38668e17af532d89254f60834cf3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 16 Sep 2019 17:09:30 +0400 Subject: [PATCH 02/35] dep bump --- package.json | 26 +- yarn.lock | 926 +++++++++++++++++++++++++++++---------------------- 2 files changed, 543 insertions(+), 409 deletions(-) diff --git a/package.json b/package.json index 4708563d..1b59022b 100644 --- a/package.json +++ b/package.json @@ -31,17 +31,17 @@ "dependencies": { "@gnosis.pm/safe-contracts": "^1.0.0", "@gnosis.pm/util-contracts": "2.0.1", - "@material-ui/core": "4.4.1", + "@material-ui/core": "4.4.2", "@material-ui/icons": "4.4.1", "@testing-library/jest-dom": "4.1.0", - "@welldone-software/why-did-you-render": "3.3.3", + "@welldone-software/why-did-you-render": "3.3.4", "axios": "0.19.0", "bignumber.js": "9.0.0", "connected-react-router": "6.5.2", - "date-fns": "2.1.0", + "date-fns": "2.2.1", "ethereum-ens": "0.7.8", "final-form": "4.18.5", - "history": "^4.7.2", + "history": "4.10.1", "immortal-db": "^1.0.2", "immutable": "^4.0.0-rc.9", "material-ui-search-bar": "^1.0.0-beta.13", @@ -51,7 +51,7 @@ "react-dom": "16.9.0", "react-final-form": "6.3.0", "react-final-form-listeners": "^1.0.2", - "react-hot-loader": "4.12.12", + "react-hot-loader": "4.12.13", "react-infinite-scroll-component": "4.5.3", "react-qr-reader": "^2.2.1", "react-redux": "7.1.1", @@ -89,10 +89,10 @@ "@babel/preset-flow": "^7.0.0-beta.40", "@babel/preset-react": "^7.0.0-beta.40", "@sambego/storybook-state": "^1.0.7", - "@storybook/addon-actions": "5.1.11", - "@storybook/addon-knobs": "5.1.11", - "@storybook/addon-links": "5.1.11", - "@storybook/react": "5.1.11", + "@storybook/addon-actions": "5.2.0", + "@storybook/addon-knobs": "5.2.0", + "@storybook/addon-links": "5.2.0", + "@storybook/react": "5.2.0", "@testing-library/react": "9.1.4", "autoprefixer": "9.6.1", "babel-core": "^7.0.0-bridge.0", @@ -105,7 +105,7 @@ "classnames": "^2.2.5", "css-loader": "3.2.0", "detect-port": "^1.2.2", - "eslint": "5.16.0", + "eslint": "6.4.0", "eslint-config-airbnb": "18.0.1", "eslint-plugin-flowtype": "4.3.0", "eslint-plugin-import": "2.18.2", @@ -132,13 +132,13 @@ "storybook-host": "5.1.0", "storybook-router": "^0.3.3", "style-loader": "1.0.0", - "truffle": "5.0.35", + "truffle": "5.0.36", "truffle-contract": "4.0.31", "truffle-solidity-loader": "0.1.32", "uglifyjs-webpack-plugin": "2.2.0", "url-loader": "^2.1.0", - "webpack": "4.39.3", - "webpack-bundle-analyzer": "3.4.1", + "webpack": "4.40.2", + "webpack-bundle-analyzer": "3.5.0", "webpack-cli": "3.3.8", "webpack-dev-server": "3.8.0", "webpack-manifest-plugin": "^2.0.0-rc.2" diff --git a/yarn.lock b/yarn.lock index 4de46b63..42f53c0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1279,6 +1279,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.5.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205" + integrity sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ== + 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" @@ -1353,18 +1360,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@emotion/babel-utils@^0.6.4": - version "0.6.10" - resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.10.tgz#83dbf3dfa933fae9fc566e54fbb45f14674c6ccc" - integrity sha512-/fnkM/LTEp3jKe++T0KyTszVGWNKPNOUJfjNKLO17BzQ6QPxgbg3whayom1Qr2oLFH3V92tDymU+dT5q676uow== - dependencies: - "@emotion/hash" "^0.6.6" - "@emotion/memoize" "^0.6.6" - "@emotion/serialize" "^0.9.1" - convert-source-map "^1.5.1" - find-root "^1.1.0" - source-map "^0.7.2" - "@emotion/cache@^10.0.14": version "10.0.14" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.14.tgz#56093cff025c04b0330bdd92afe8335ed326dd18" @@ -1375,6 +1370,28 @@ "@emotion/utils" "0.11.2" "@emotion/weak-memoize" "0.2.3" +"@emotion/cache@^10.0.17", "@emotion/cache@^10.0.9": + version "10.0.17" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.17.tgz#3491a035f62f276620d586677bfc3d4fad0b8472" + integrity sha512-442/miwbuwIDfSzfMqZNxuzxSEbskcz/bZ86QBYzEjFrr/oq9w+y5kJY1BHbGhDtr91GO232PZ5NN9XYMwr/Qg== + dependencies: + "@emotion/sheet" "0.9.3" + "@emotion/stylis" "0.8.4" + "@emotion/utils" "0.11.2" + "@emotion/weak-memoize" "0.2.3" + +"@emotion/core@^10.0.14": + version "10.0.17" + resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.17.tgz#3367376709721f4ee2068cff54ba581d362789d8" + integrity sha512-gykyjjr0sxzVuZBVTVK4dUmYsorc2qLhdYgSiOVK+m7WXgcYTKZevGWZ7TLAgTZvMelCTvhNq8xnf8FR1IdTbg== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/cache" "^10.0.17" + "@emotion/css" "^10.0.14" + "@emotion/serialize" "^0.11.10" + "@emotion/sheet" "0.9.3" + "@emotion/utils" "0.11.2" + "@emotion/core@^10.0.9": version "10.0.14" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.14.tgz#cac5c334b278d5b7688cfff39e460a5b50abb71c" @@ -1387,7 +1404,7 @@ "@emotion/sheet" "0.9.3" "@emotion/utils" "0.11.2" -"@emotion/css@^10.0.14": +"@emotion/css@^10.0.14", "@emotion/css@^10.0.9": version "10.0.14" resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.14.tgz#95dacabdd0e22845d1a1b0b5968d9afa34011139" integrity sha512-MozgPkBEWvorcdpqHZE5x1D/PLEHUitALQCQYt2wayf4UNhpgQs2tN0UwHYS4FMy5ROBH+0ALyCFVYJ/ywmwlg== @@ -1401,11 +1418,6 @@ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.2.tgz#53211e564604beb9befa7a4400ebf8147473eeef" integrity sha512-RMtr1i6E8MXaBWwhXL3yeOU8JXRnz8GNxHvaUfVvwxokvayUY0zoBeWbKw1S9XkufmGEEdQd228pSZXFkAln8Q== -"@emotion/hash@^0.6.2", "@emotion/hash@^0.6.6": - version "0.6.6" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44" - integrity sha512-ojhgxzUHZ7am3D2jHkMzPpsBAiB005GF5YU4ea+8DNPybMk01JJUM9V9YRlF/GE95tcOm8DxQvWA2jq19bGalQ== - "@emotion/is-prop-valid@0.8.2": version "0.8.2" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.2.tgz#b9692080da79041683021fcc32f96b40c54c59dc" @@ -1418,10 +1430,16 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.2.tgz#7f4c71b7654068dfcccad29553520f984cc66b30" integrity sha512-hnHhwQzvPCW1QjBWFyBtsETdllOM92BfrKWbUTmh9aeOlcVOiXvlPsK4104xH8NsaKfg86PTFsWkueQeUfMA/w== -"@emotion/memoize@^0.6.1", "@emotion/memoize@^0.6.6": - version "0.6.6" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b" - integrity sha512-h4t4jFjtm1YV7UirAFuSuFGyLa+NNxjdkq6DpFLANNQY5rHueFZHVY+8Cu1HYVP6DrheB0kv4m5xPjo7eKT7yQ== +"@emotion/serialize@^0.11.10": + version "0.11.10" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.10.tgz#53207dba7e28bd96928fc2a37e20b31b712bf9a2" + integrity sha512-04AB+wU00vv9jLgkWn13c/GJg2yXp3w7ZR3Q1O6mBSE6mbUmYeNX3OpBhfp//6r47lFyY0hBJJue+bA30iokHQ== + dependencies: + "@emotion/hash" "0.7.2" + "@emotion/memoize" "0.7.2" + "@emotion/unitless" "0.7.4" + "@emotion/utils" "0.11.2" + csstype "^2.5.7" "@emotion/serialize@^0.11.8": version "0.11.8" @@ -1434,16 +1452,6 @@ "@emotion/utils" "0.11.2" csstype "^2.5.7" -"@emotion/serialize@^0.9.1": - version "0.9.1" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.1.tgz#a494982a6920730dba6303eb018220a2b629c145" - integrity sha512-zTuAFtyPvCctHBEL8KZ5lJuwBanGSutFEncqLn/m9T1a6a93smBStK+bZzcNPgj4QS8Rkw9VTwJGhRIUVO8zsQ== - dependencies: - "@emotion/hash" "^0.6.6" - "@emotion/memoize" "^0.6.6" - "@emotion/unitless" "^0.6.7" - "@emotion/utils" "^0.8.2" - "@emotion/sheet@0.9.3": version "0.9.3" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.3.tgz#689f135ecf87d3c650ed0c4f5ddcbe579883564a" @@ -1459,6 +1467,24 @@ "@emotion/serialize" "^0.11.8" "@emotion/utils" "0.11.2" +"@emotion/styled-base@^10.0.17": + version "10.0.17" + resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.17.tgz#701af0cd256be2977db8d67c33630f542e460b85" + integrity sha512-vqQvxluZZKPByAB4zYZys0Qo/kVDP/03hAeg1K+TYpnZRwTi7WteOodc+/5669RPVNcfb93fphQpM5BYJnI1/g== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/is-prop-valid" "0.8.2" + "@emotion/serialize" "^0.11.10" + "@emotion/utils" "0.11.2" + +"@emotion/styled@^10.0.14": + version "10.0.17" + resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-10.0.17.tgz#0cd38b8b36259541f2c6717fc22607a120623654" + integrity sha512-zHMgWjHDMNjD+ux64POtDnjLAObniu3znxFBLSdV/RiEhSLjHIowfvSbbd/C33/3uwtI6Uzs2KXnRZtka/PpAQ== + dependencies: + "@emotion/styled-base" "^10.0.17" + babel-plugin-emotion "^10.0.17" + "@emotion/styled@^10.0.7": version "10.0.14" resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-10.0.14.tgz#538bcf0d67bf8f6de946bcfbee53dc7d0187b346" @@ -1472,31 +1498,16 @@ resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.4.tgz#6c51afdf1dd0d73666ba09d2eb6c25c220d6fe4c" integrity sha512-TLmkCVm8f8gH0oLv+HWKiu7e8xmBIaokhxcEKPh1m8pXiV/akCiq50FvYgOwY42rjejck8nsdQxZlXZ7pmyBUQ== -"@emotion/stylis@^0.7.0": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.1.tgz#50f63225e712d99e2b2b39c19c70fff023793ca5" - integrity sha512-/SLmSIkN13M//53TtNxgxo57mcJk/UJIDFRKwOiLIBEyBHEcipgR6hNMQ/59Sl4VjCJ0Z/3zeAZyvnSLPG/1HQ== - "@emotion/unitless@0.7.4": version "0.7.4" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.4.tgz#a87b4b04e5ae14a88d48ebef15015f6b7d1f5677" integrity sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ== -"@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.7": - version "0.6.7" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397" - integrity sha512-Arj1hncvEVqQ2p7Ega08uHLr1JuRYBuO5cIvcA+WWEQ5+VmkOE3ZXzl04NbQxeQpWX78G7u6MqxKuNX3wvYZxg== - "@emotion/utils@0.11.2": version "0.11.2" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.2.tgz#713056bfdffb396b0a14f1c8f18e7b4d0d200183" integrity sha512-UHX2XklLl3sIaP6oiMmlVzT0J+2ATTVpf0dHQVyPJHTkOITvXfaSqnRk6mdDhV9pR8T/tHc3cex78IKXssmzrA== -"@emotion/utils@^0.8.2": - version "0.8.2" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc" - integrity sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw== - "@emotion/weak-memoize@0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.3.tgz#dfa0c92efe44a1d1a7974fb49ffeb40ef2da5a27" @@ -1696,10 +1707,10 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@material-ui/core@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.4.1.tgz#cc9b8e417ced1ab3145fdeda41a6aee657d3524b" - integrity sha512-LotIIGv8EDMj6mwXobsMF4WlCe+PtMjrXa34U2B0xFMdZLrNYwdOHFgkAIaE0m/ibMXTobNKWqhc5bhXLxvXoQ== +"@material-ui/core@4.4.2": + version "4.4.2" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.4.2.tgz#66a9423e533833d2867827e6fdf526adbdceb7c0" + integrity sha512-hnZ4SP/hWJ9sUoNMkStz/y/CL2c7j4JpVIB2py3+vpBFU9TgHL3noBk3Fr0gltRvvlYA9ekpiGsGZ2ukk1R7Eg== dependencies: "@babel/runtime" "^7.4.4" "@material-ui/styles" "^4.4.1" @@ -1869,20 +1880,20 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@storybook/addon-actions@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.1.11.tgz#ebc299b9dfe476b5c65eb5d148c4b064f682ca08" - integrity sha512-Fp4b8cBYrl9zudvamVYTxE1XK2tzg91hgBDoVxIbDvSMZ2aQXSq8B5OFS4eSdvg+ldEOBbvIgUNS1NIw+FGntQ== +"@storybook/addon-actions@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.2.0.tgz#ef06ccab8ef3de5ffcae848ad2c1da40fbc2a464" + integrity sha512-FBpUhrOh4bINnpsVRTXrOCWM6J9GwN54jjiMKWZtAUrbjX6HLpdLH8/ETHjQGqGs7v8OPEQPRpLiNICyKMw1Dg== dependencies: - "@storybook/addons" "5.1.11" - "@storybook/api" "5.1.11" - "@storybook/components" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/theming" "5.1.11" + "@storybook/addons" "5.2.0" + "@storybook/api" "5.2.0" + "@storybook/client-api" "5.2.0" + "@storybook/components" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/theming" "5.2.0" core-js "^3.0.1" fast-deep-equal "^2.0.1" global "^4.3.2" - lodash "^4.17.11" polished "^3.3.1" prop-types "^15.7.2" react "^16.8.3" @@ -1905,16 +1916,17 @@ react-inspector "^2.2.2" uuid "^3.2.1" -"@storybook/addon-knobs@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-5.1.11.tgz#a7e7d986b45e8addb25151b81008af1648ef1f2a" - integrity sha512-16GY8IPxVBcmq5TqPtP6254Qw5FvdefDZjIQd+ByJJliQjXZMQKxEl6JhRq98iUfSxEB+6JCPnpKPa666jmCMA== +"@storybook/addon-knobs@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-5.2.0.tgz#976d3ede32b81548444aa3cc0adc7265ebefae94" + integrity sha512-FYU7geG9xZptW4qWRO9Tzzl8OZIh6/m+TZSy6FpFQCJDKY/bKA6Lww5FH1rFE9nyZwFpIO+cBs2kZTqVC/XxRA== dependencies: - "@storybook/addons" "5.1.11" - "@storybook/client-api" "5.1.11" - "@storybook/components" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/theming" "5.1.11" + "@storybook/addons" "5.2.0" + "@storybook/api" "5.2.0" + "@storybook/client-api" "5.2.0" + "@storybook/components" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/theming" "5.2.0" copy-to-clipboard "^3.0.8" core-js "^3.0.1" escape-html "^1.0.3" @@ -1925,30 +1937,31 @@ qs "^6.6.0" react-color "^2.17.0" react-lifecycles-compat "^3.0.4" - react-select "^2.2.0" + react-select "^3.0.0" -"@storybook/addon-links@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.1.11.tgz#3a245f30480d586094bdda8f4658c5d328ac39b9" - integrity sha512-NV4gRduMNm0dchKCWAZ4YQSYOdj5acoztGIz3w+xs9e+MAXOHXs7iL8sBbqAFlfz4elPGHWW+8NGn9UYxQFK+Q== +"@storybook/addon-links@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.2.0.tgz#0e747319e0e48f1082cbd7ccee32d4c7ad4aa02a" + integrity sha512-eWq9XLmu4Nssd6Lkb1gndOo2frGf6bRK1RGRL8SP7RRced9jARY9UvkipRA9/UTWFttraDMHeDIzxt4eqK7qEQ== dependencies: - "@storybook/addons" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/router" "5.1.11" + "@storybook/addons" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/router" "5.2.0" common-tags "^1.8.0" core-js "^3.0.1" global "^4.3.2" prop-types "^15.7.2" qs "^6.6.0" -"@storybook/addons@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.1.11.tgz#27f9cfed8d7f7c8a3fc341cdba3b0bdf608f02aa" - integrity sha512-714Xg6pX4rjDY1urL94w4oOxIiK6jCFSp4oKvqLj7dli5CG7d34Yt9joyTgOb2pkbrgmbMWAZJq0L0iOjHzpzw== +"@storybook/addons@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.2.0.tgz#a4ba7f85774e426f384e8aa3eddb48b31234d5e2" + integrity sha512-hwcY6xE0tbCxR1KjOgG72JCD7yBTx8AIuVf/V8dctGqUZE2bUyLYX+41UqgnyfABo+r5e/HBb0qkGZXbmzGt3g== dependencies: - "@storybook/api" "5.1.11" - "@storybook/channels" "5.1.11" - "@storybook/client-logger" "5.1.11" + "@storybook/api" "5.2.0" + "@storybook/channels" "5.2.0" + "@storybook/client-logger" "5.2.0" + "@storybook/core-events" "5.2.0" core-js "^3.0.1" global "^4.3.2" util-deprecate "^1.0.2" @@ -1965,29 +1978,6 @@ global "^4.3.2" util-deprecate "^1.0.2" -"@storybook/api@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.1.11.tgz#71ef00285cd8602aad24cdb26c60c5d3c76631e5" - integrity sha512-zzPZM6W67D4YKCbUN4RhC/w+/CtnH/hFbSh/QUBdwXFB1aLh2qA1UTyB8i6m6OA6JgVHBqEkl10KhmeILLv/eA== - dependencies: - "@storybook/channels" "5.1.11" - "@storybook/client-logger" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/router" "5.1.11" - "@storybook/theming" "5.1.11" - core-js "^3.0.1" - fast-deep-equal "^2.0.1" - global "^4.3.2" - lodash "^4.17.11" - memoizerific "^1.11.3" - prop-types "^15.6.2" - react "^16.8.3" - semver "^6.0.0" - shallow-equal "^1.1.0" - store2 "^2.7.1" - telejson "^2.2.1" - util-deprecate "^1.0.2" - "@storybook/api@5.1.9": version "5.1.9" resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.1.9.tgz#eec5b2f775392ce0803930104c6ce14fa4931e8b" @@ -2011,23 +2001,39 @@ telejson "^2.2.1" util-deprecate "^1.0.2" -"@storybook/channel-postmessage@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.1.11.tgz#e75ab7d59ba19476eb631cdb69ee713c3b956c2b" - integrity sha512-S7Uq7+c9kOJ9BB4H9Uro2+dVhqoMchYCipQzAkD4jIIwK99RNzGdAaRipDC1k0k/C+v2SOa+D5xBbb3XVYPSrg== +"@storybook/api@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.2.0.tgz#38d6d3fdb3b82fe52c4e6458d586b3e16c60265a" + integrity sha512-YrVZdvCkx1EAqYIbBQ5o51j5+U5vUiJ6iKh8+tUp0wWvFQhqm5vS43i37YL80mReKkLrrNegF6Ltlyv/CjvYTg== dependencies: - "@storybook/channels" "5.1.11" - "@storybook/client-logger" "5.1.11" + "@storybook/channels" "5.2.0" + "@storybook/client-logger" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/router" "5.2.0" + "@storybook/theming" "5.2.0" + core-js "^3.0.1" + fast-deep-equal "^2.0.1" + global "^4.3.2" + lodash "^4.17.11" + memoizerific "^1.11.3" + prop-types "^15.6.2" + react "^16.8.3" + semver "^6.0.0" + shallow-equal "^1.1.0" + store2 "^2.7.1" + telejson "^2.2.2" + util-deprecate "^1.0.2" + +"@storybook/channel-postmessage@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.2.0.tgz#5e9e099c0f4f180c5099424a2686258e2c60a086" + integrity sha512-2D2ZMKKe4JocYMZgedkZdO5T2+NQLUn+47EEeKhAI1ikjy1lBHFzks1YtQQJ/sRt2ATZu/FO7+3YSUA+xSrTRA== + dependencies: + "@storybook/channels" "5.2.0" + "@storybook/client-logger" "5.2.0" core-js "^3.0.1" global "^4.3.2" - telejson "^2.2.1" - -"@storybook/channels@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.1.11.tgz#77ddf9d777891f975ac10095772c840fed4c4620" - integrity sha512-MlrjVGNvYOnDvv2JDRhr4wikbnZ8HCFCpVsFqKPFxj7I3OYBR417RvFkydX3Rtx4kwB9rmZEgLhfAfsSytkALg== - dependencies: - core-js "^3.0.1" + telejson "^2.2.2" "@storybook/channels@5.1.9": version "5.1.9" @@ -2036,30 +2042,33 @@ dependencies: core-js "^3.0.1" -"@storybook/client-api@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.1.11.tgz#30d82c09c6c40aa70d932e77b1d1e65526bddc0c" - integrity sha512-znzSxZ1ZCqtEKrFoW7xT8iBbdiAXaQ8RNxQFKHuYPqWX+RLol6S3duEOxu491X2SzUg0StUmrX5qL9Rnth8dRQ== +"@storybook/channels@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.2.0.tgz#114bb69193a05ee225959e9f6d15dc6212ef900d" + integrity sha512-1xEBgGdr1mC1AEBFozG6VLUO78JXxyxlDpcJYfw/B8TzO+Ln8ztTjJgvCY+lsBrWiWvgoT9aGJCeotQ4k28oaA== dependencies: - "@storybook/addons" "5.1.11" - "@storybook/client-logger" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/router" "5.1.11" + core-js "^3.0.1" + +"@storybook/client-api@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.2.0.tgz#3f21fa5a260e50b11d115745d65ef11d7ff0f7bf" + integrity sha512-s9hTV9vHYeF6Fg3R4zTNNYcGEjX4iPSBtFjse/Bk1HaH6WbjsA6bY1NPO1i2CBzRngHzX+4yXFx3hGLVt/X1rg== + dependencies: + "@storybook/addons" "5.2.0" + "@storybook/channel-postmessage" "5.2.0" + "@storybook/channels" "5.2.0" + "@storybook/client-logger" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/router" "5.2.0" common-tags "^1.8.0" core-js "^3.0.1" - eventemitter3 "^3.1.0" + eventemitter3 "^4.0.0" global "^4.3.2" is-plain-object "^3.0.0" lodash "^4.17.11" memoizerific "^1.11.3" qs "^6.6.0" - -"@storybook/client-logger@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.1.11.tgz#9509af3021b7a9977f9dba1f2ff038fd3c994437" - integrity sha512-je4To+9zD3SEJsKe9R4u15N4bdXFBR7pdBToaRIur+XSvvShLFehZGseQi+4uPAj8vyG34quGTCeUC/BKY0LwQ== - dependencies: - core-js "^3.0.1" + util-deprecate "^1.0.2" "@storybook/client-logger@5.1.9": version "5.1.9" @@ -2068,6 +2077,13 @@ dependencies: core-js "^3.0.1" +"@storybook/client-logger@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.0.tgz#68325c3abd7465c9a30e70dc8128e0c666889482" + integrity sha512-rjDiIT8awjLcOtf7n7Il2KPpYDrmGnP6iGRtVPRDBWghtaDNUVbwNNTRzbJDFGlDY41eUBiQkeemJZP6v9PCEA== + dependencies: + core-js "^3.0.1" + "@storybook/components@3.4.12": version "3.4.12" resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.4.12.tgz#07499c43aca1f8543211202f3d142764bdd4c807" @@ -2077,13 +2093,14 @@ glamorous "^4.12.1" prop-types "^15.6.1" -"@storybook/components@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.1.11.tgz#da253af0a8cb1b063c5c2e8016c4540c983f717d" - integrity sha512-EQgD7HL2CWnnY968KrwUSU2dtKFGTGRJVc4vwphYEeZwAI0lX6qbTMuwEP22hDZ2OSRBxcvcXT8cvduDlZlFng== +"@storybook/components@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.2.0.tgz#87dfc795630db008bcd3f6ee87a0301ac326c1a5" + integrity sha512-JxynjvNEIuyOdIBLsLsslGHifx4BmdPqqjhCdejnzSNBUT+9MUAcXOCFiQ7L3UsSLruZVy7EjZRV7nM7XQHP2A== dependencies: - "@storybook/client-logger" "5.1.11" - "@storybook/theming" "5.1.11" + "@storybook/client-logger" "5.2.0" + "@storybook/theming" "5.2.0" + "@types/react-syntax-highlighter" "10.1.0" core-js "^3.0.1" global "^4.3.2" markdown-to-jsx "^6.9.1" @@ -2098,16 +2115,8 @@ react-popper-tooltip "^2.8.3" react-syntax-highlighter "^8.0.1" react-textarea-autosize "^7.1.0" - recompose "^0.30.0" simplebar-react "^1.0.0-alpha.6" -"@storybook/core-events@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.1.11.tgz#9d00503a936d30398f7a64336eb956303d053765" - integrity sha512-m+yIFRdB47+IPBFBGS2OUXrSLkoz5iAXvb3c0lGAePf5wSR+o/Ni/9VD5l6xBf+InxHLSc9gcDEJehrT0fJAaQ== - dependencies: - core-js "^3.0.1" - "@storybook/core-events@5.1.9": version "5.1.9" resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.1.9.tgz#441a6297e2ccfa743e15d1db1f4ac445b91f40d8" @@ -2115,29 +2124,37 @@ dependencies: core-js "^3.0.1" -"@storybook/core@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.1.11.tgz#d7c4b14b02f74c183ab5baffe9b3e5ec8289b320" - integrity sha512-LkSoAJlLEtrzFcoINX3dz4oT6xUPEHEp2/WAXLqUFeCnzJHAxIsRvbVxB49Kh/2TrgDFZpL9Or8XXMzZtE6KYw== +"@storybook/core-events@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.2.0.tgz#3a8dba0c70e935bc4ad9ceca86365a8930497d95" + integrity sha512-OQ2TwvHYab2Lojdh/Z3tiytyPDsDo9bKfyGh3V/jQLKg3jqKXdeRWdmJn9U4o18t/8Fm58bBqT8Ehp7UskBa/g== + dependencies: + core-js "^3.0.1" + +"@storybook/core@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.2.0.tgz#fe3b375eee2775618a3672294960555fa3eb51ca" + integrity sha512-koAa9F3Xc/cbyFSVKRc1C77JC7pAscyhxe1cqbIuLMzmG1JV6aCHYltuXEzKAHuXF2YjF5o91cQ/1fUGrCxnZA== dependencies: "@babel/plugin-proposal-class-properties" "^7.3.3" "@babel/plugin-proposal-object-rest-spread" "^7.3.2" "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/plugin-transform-react-constant-elements" "^7.2.0" "@babel/preset-env" "^7.4.5" - "@storybook/addons" "5.1.11" - "@storybook/channel-postmessage" "5.1.11" - "@storybook/client-api" "5.1.11" - "@storybook/client-logger" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/node-logger" "5.1.11" - "@storybook/router" "5.1.11" - "@storybook/theming" "5.1.11" - "@storybook/ui" "5.1.11" + "@storybook/addons" "5.2.0" + "@storybook/channel-postmessage" "5.2.0" + "@storybook/client-api" "5.2.0" + "@storybook/client-logger" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/node-logger" "5.2.0" + "@storybook/router" "5.2.0" + "@storybook/theming" "5.2.0" + "@storybook/ui" "5.2.0" airbnb-js-shims "^1 || ^2" + ansi-to-html "^0.6.11" autoprefixer "^9.4.9" babel-plugin-add-react-displayname "^0.0.5" - babel-plugin-emotion "^10.0.9" + babel-plugin-emotion "^10.0.14" babel-plugin-macros "^2.4.5" babel-preset-minify "^0.5.0 || 0.6.0-alpha.5" boxen "^3.0.0" @@ -2147,8 +2164,8 @@ commander "^2.19.0" common-tags "^1.8.0" core-js "^3.0.1" - corejs-upgrade-webpack-plugin "^2.0.0" - css-loader "^2.1.1" + corejs-upgrade-webpack-plugin "^2.2.0" + css-loader "^3.0.0" detect-port "^1.3.0" dotenv-webpack "^1.7.0" ejs "^2.6.1" @@ -2163,7 +2180,7 @@ interpret "^1.2.0" ip "^1.1.5" json5 "^2.1.0" - lazy-universal-dotenv "^3.0.0" + lazy-universal-dotenv "^3.0.1" node-fetch "^2.6.0" open "^6.1.0" pnp-webpack-plugin "1.4.3" @@ -2182,16 +2199,16 @@ style-loader "^0.23.1" terser-webpack-plugin "^1.2.4" unfetch "^4.1.0" - url-loader "^1.1.2" + url-loader "^2.0.1" util-deprecate "^1.0.2" webpack "^4.33.0" webpack-dev-middleware "^3.7.0" webpack-hot-middleware "^2.25.0" -"@storybook/node-logger@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.1.11.tgz#bbf5ad0d148e6c9a9b7cf6f62ad4df4e9fa19e5d" - integrity sha512-LG0KM4lzb9LEffcO3Ps9FcHHsVgQUc/oG+kz3p0u9fljFoL3cJHF1Mb4o+HrSydtdWZs/spwZ/BLEo5n/AByDw== +"@storybook/node-logger@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.0.tgz#68a39a271dd442563206a7f07249f66947094b2f" + integrity sha512-IuR6oa+oayEdqdl01Sh+Tsf+KV4wsfSHYa3OazYnMnmXJvBVwUP4RTywVapj+ylugltRVPlDEHQw0d1TFRbQrQ== dependencies: chalk "^2.4.2" core-js "^3.0.1" @@ -2199,16 +2216,17 @@ pretty-hrtime "^1.0.3" regenerator-runtime "^0.12.1" -"@storybook/react@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.1.11.tgz#227e13670098e52d1537daf9dc349755cea17e0c" - integrity sha512-y8/L2OWvev3fGREhAmToLVDPf8YEZMs5+vzSdzXlVlPkqHyAmWPtLY4sRB6K+TsEF0gwaC5F2BvMnKxbNYwd/Q== +"@storybook/react@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.2.0.tgz#5e6a7cb7a4f41bedec03aa65fda8c97759efac9f" + integrity sha512-fkCQGUABo4C3DBcGe9mwpOV0V8h2ZbnuCgbEMuHTxw9jds/B2/FQ4ax4N9bw1PiiB7z7c9lnMo8pfhK06RzmqA== dependencies: "@babel/plugin-transform-react-constant-elements" "^7.2.0" "@babel/preset-flow" "^7.0.0" "@babel/preset-react" "^7.0.0" - "@storybook/core" "5.1.11" - "@storybook/node-logger" "5.1.11" + "@storybook/addons" "5.2.0" + "@storybook/core" "5.2.0" + "@storybook/node-logger" "5.2.0" "@svgr/webpack" "^4.0.3" babel-plugin-add-react-displayname "^0.0.5" babel-plugin-named-asset-import "^0.3.1" @@ -2225,17 +2243,6 @@ semver "^6.0.0" webpack "^4.33.0" -"@storybook/router@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.1.11.tgz#75089e9e623482e52ed894c3f0cb0fc6a5372da9" - integrity sha512-Xt7R1IOWLlIxis6VKV9G8F+e/G4G8ng1zXCqoDq+/RlWzlQJ5ccO4bUm2/XGS1rEgY4agMzmzjum18HoATpLGA== - dependencies: - "@reach/router" "^1.2.1" - core-js "^3.0.1" - global "^4.3.2" - memoizerific "^1.11.3" - qs "^6.6.0" - "@storybook/router@5.1.9": version "5.1.9" resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.1.9.tgz#8cd97bea4f2acf8ec5f6694d06fb0633dde33417" @@ -2247,23 +2254,18 @@ memoizerific "^1.11.3" qs "^6.6.0" -"@storybook/theming@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.1.11.tgz#0d1af46535f2e601293c999a314905069a93ec3b" - integrity sha512-PtRPfiAWx5pQbTm45yyPB+CuW/vyDmcmNOt+xnDzK52omeWaSD7XK2RfadN3u4QXCgha7zs35Ppx1htJio2NRA== +"@storybook/router@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.2.0.tgz#4ce023d9525f2c3dbe7a5eef02e89cf0ec366319" + integrity sha512-OQkdELpoKOUDz5HDqu09w2x3QohIgpGtMExIMGoELXOvPDaHWz2/OQ03E/3u8VoJhEeU+YC0f2v9dalDL0A2ug== dependencies: - "@emotion/core" "^10.0.9" - "@emotion/styled" "^10.0.7" - "@storybook/client-logger" "5.1.11" - common-tags "^1.8.0" + "@reach/router" "^1.2.1" + "@types/reach__router" "^1.2.3" core-js "^3.0.1" - deep-object-diff "^1.1.0" - emotion-theming "^10.0.9" global "^4.3.2" + lodash "^4.17.11" memoizerific "^1.11.3" - polished "^3.3.1" - prop-types "^15.7.2" - resolve-from "^5.0.0" + qs "^6.6.0" "@storybook/theming@5.1.9": version "5.1.9" @@ -2283,23 +2285,43 @@ prop-types "^15.7.2" resolve-from "^5.0.0" -"@storybook/ui@5.1.11": - version "5.1.11" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.1.11.tgz#02246f7656f644a36908430de12abbdf4e2a8a72" - integrity sha512-mopuFSwtodvH4HRdaSBlgYxzYca1qyvzZ0BxOPocXhiFfFR+V9NyNJqKKRA3vinWuuZWpYcnPTu3h8skmjMirg== +"@storybook/theming@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.0.tgz#39122c86eaa17d5bac0f1f814dbb430e74b836aa" + integrity sha512-DPqexBMlrlCr4/kYEYRUzYx3T1Tm5wBPamO2upU8txO4dY33Co1Niiv0P7e2gv4iSH3sdUVLtFrlHxzjzkkSPg== dependencies: - "@storybook/addons" "5.1.11" - "@storybook/api" "5.1.11" - "@storybook/channels" "5.1.11" - "@storybook/client-logger" "5.1.11" - "@storybook/components" "5.1.11" - "@storybook/core-events" "5.1.11" - "@storybook/router" "5.1.11" - "@storybook/theming" "5.1.11" + "@emotion/core" "^10.0.14" + "@emotion/styled" "^10.0.14" + "@storybook/client-logger" "5.2.0" + common-tags "^1.8.0" + core-js "^3.0.1" + deep-object-diff "^1.1.0" + emotion-theming "^10.0.14" + global "^4.3.2" + memoizerific "^1.11.3" + polished "^3.3.1" + prop-types "^15.7.2" + resolve-from "^5.0.0" + +"@storybook/ui@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.2.0.tgz#6443edbd973fed4d6ec10f45c0a4b49631394983" + integrity sha512-4xMpe8OTBDbwtYy7nEKsuMdrOpXTf3toQm+OXhYJKl6N5kUu0AHt60WtPG0WuhAOHHE1922pZHh2EQJYcIzv+g== + dependencies: + "@storybook/addon-actions" "5.2.0" + "@storybook/addon-knobs" "5.2.0" + "@storybook/addons" "5.2.0" + "@storybook/api" "5.2.0" + "@storybook/channels" "5.2.0" + "@storybook/client-logger" "5.2.0" + "@storybook/components" "5.2.0" + "@storybook/core-events" "5.2.0" + "@storybook/router" "5.2.0" + "@storybook/theming" "5.2.0" copy-to-clipboard "^3.0.8" core-js "^3.0.1" core-js-pure "^3.0.1" - emotion-theming "^10.0.10" + emotion-theming "^10.0.14" fast-deep-equal "^2.0.1" fuse.js "^3.4.4" global "^4.3.2" @@ -2311,16 +2333,15 @@ qs "^6.6.0" react "^16.8.3" react-dom "^16.8.3" - react-draggable "^3.1.1" + react-draggable "^3.3.2" react-helmet-async "^1.0.2" react-hotkeys "2.0.0-pre4" - react-resize-detector "^4.0.5" - recompose "^0.30.0" + react-sizeme "^2.6.7" regenerator-runtime "^0.13.2" resolve-from "^5.0.0" semver "^6.0.0" store2 "^2.7.1" - telejson "^2.2.1" + telejson "^2.2.2" util-deprecate "^1.0.2" "@svgr/babel-plugin-add-jsx-attribute@^4.2.0": @@ -2552,6 +2573,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/history@*": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.3.tgz#856c99cdc1551d22c22b18b5402719affec9839a" + integrity sha512-cS5owqtwzLN5kY+l+KgKdRJ/Cee8tlmQoGQuIE9tWnSmS3JMKzmxo2HIAk2wODMifGwO20d62xZQLYz+RLfXmw== + "@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" @@ -2607,6 +2633,14 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== +"@types/reach__router@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.2.4.tgz#44a701fdf15934880f6dfdef38ca49bc30e2d372" + integrity sha512-a+MFhebeSGi0LwHZ0UhH/ke77rWtNQnt8YmaHnquSaY3HmyEi+BPQi3GhPcUPnC9X5BLw/qORw3BPxGb1mCtEw== + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react-dom@*": version "16.9.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.0.tgz#ba6ddb00bf5de700b0eb91daa452081ffccbfdea" @@ -2614,6 +2648,13 @@ dependencies: "@types/react" "*" +"@types/react-syntax-highlighter@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-10.1.0.tgz#9c534e29bbe05dba9beae1234f3ae944836685d4" + integrity sha512-dF49hC4FZp1dIKyzacOrHvqMUe8U2IXyQCQXOcT1e6n64gLBp+xM6qGtPsThIT9XjiIHSg2W5Jc2V5IqekBfnA== + dependencies: + "@types/react" "*" + "@types/react-transition-group@^4.2.0": version "4.2.0" resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.2.0.tgz#86ddb509ce3de27341c7cb7797abb99b1c4676bf" @@ -2851,10 +2892,10 @@ "@webassemblyjs/wast-parser" "1.8.5" "@xtuc/long" "4.2.2" -"@welldone-software/why-did-you-render@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-3.3.3.tgz#3fe6653a102fa0f886b4cee4800c4ab6edd24cd3" - integrity sha512-aA6uhUO7TdQ92xb3SizKJ3A4DyInDdb1x+WwvqrP/U9qlcJjQ+edXHTuq8WJTEh23ov8w4n2y9fnc0jN5NLs6w== +"@welldone-software/why-did-you-render@3.3.4": + version "3.3.4" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-3.3.4.tgz#fb7282c59625d52d5c4d84fbd560dc36a8881ca9" + integrity sha512-x/0bNE4BTKo5bEdnsU/0SwCI/geoRi7N4FLJeKDu8m3a86ciXUqKT4CJDPy036A9JFvx5mpzNDB9znBedWdfiQ== dependencies: lodash "^4" @@ -2953,6 +2994,11 @@ acorn-jsx@^5.0.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== +acorn-jsx@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f" + integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw== + acorn-walk@^6.0.1, acorn-walk@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -2978,6 +3024,11 @@ acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.0, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== +acorn@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.0.0.tgz#26b8d1cd9a9b700350b71c0905546f64d1284e7a" + integrity sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ== + address@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" @@ -3129,6 +3180,13 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-to-html@^0.6.11: + version "0.6.11" + resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.11.tgz#5093fc4962186c0e9343dec572a4f71abdc93439" + integrity sha512-88XZtrcwrfkyn6fGstHnkaF1kl7hGtNCYh4vSmItgEV+6JnQHryDBf7udF4f2RhTRQmYvJvPcTtqgaqrxzc9oA== + dependencies: + entities "^1.1.1" + ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -3831,7 +3889,7 @@ babel-plugin-dynamic-import-node@^2.2.0, babel-plugin-dynamic-import-node@^2.3.0 dependencies: object.assign "^4.1.0" -babel-plugin-emotion@^10.0.14, babel-plugin-emotion@^10.0.9: +babel-plugin-emotion@^10.0.14: version "10.0.14" resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.14.tgz#c1d0e4621e303507ea7da57daa3cd771939d6df4" integrity sha512-T7hdxJ4xXkKW3OXcizK0pnUJlBeNj/emjQZPDIZvGOuwl2adIgicQWRNkz6BuwKdDTrqaXQn1vayaL6aL8QW5A== @@ -3847,23 +3905,21 @@ babel-plugin-emotion@^10.0.14, babel-plugin-emotion@^10.0.9: find-root "^1.1.0" source-map "^0.5.7" -babel-plugin-emotion@^9.2.11: - version "9.2.11" - resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728" - integrity sha512-dgCImifnOPPSeXod2znAmgc64NhaaOjGEHROR/M+lmStb3841yK1sgaDYAYMnlvWNz8GnpwIPN0VmNpbWYZ+VQ== +babel-plugin-emotion@^10.0.17: + version "10.0.17" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.17.tgz#5673fbed7b1ed61b4b98d5530f33c8a4d1b08484" + integrity sha512-KNuBadotqYWpQexHhHOu7M9EV1j2c+Oh/JJqBfEQDusD6mnORsCZKHkl+xYwK82CPQ/23wRrsBIEYnKjtbMQJw== dependencies: "@babel/helper-module-imports" "^7.0.0" - "@emotion/babel-utils" "^0.6.4" - "@emotion/hash" "^0.6.2" - "@emotion/memoize" "^0.6.1" - "@emotion/stylis" "^0.7.0" + "@emotion/hash" "0.7.2" + "@emotion/memoize" "0.7.2" + "@emotion/serialize" "^0.11.10" babel-plugin-macros "^2.0.0" babel-plugin-syntax-jsx "^6.18.0" convert-source-map "^1.5.0" + escape-string-regexp "^1.0.5" find-root "^1.1.0" - mkdirp "^0.5.1" source-map "^0.5.7" - touch "^2.0.1" babel-plugin-istanbul@^5.1.0: version "5.2.0" @@ -4572,6 +4628,11 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +batch-processor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/batch-processor/-/batch-processor-1.0.0.tgz#75c95c32b748e0850d10c2b168f6bdbe9891ace8" + integrity sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg= + batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" @@ -5188,7 +5249,7 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0, camelcase@^5.2.0, camelcase@^5.3.1: +camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== @@ -5914,13 +5975,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -corejs-upgrade-webpack-plugin@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/corejs-upgrade-webpack-plugin/-/corejs-upgrade-webpack-plugin-2.1.0.tgz#6afa44672486353ae639c297548c0686b64fb325" - integrity sha512-gc+S4t8VT9YFSgOPrhZlD6kDoGZtUq71QwXxS2neGNPhli0veKhbzzilODIpy73TjXGUrCHCpevK8vBnzUPuhw== +corejs-upgrade-webpack-plugin@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/corejs-upgrade-webpack-plugin/-/corejs-upgrade-webpack-plugin-2.2.0.tgz#503293bf1fdcb104918eb40d0294e4776ad6923a" + integrity sha512-J0QMp9GNoiw91Kj/dkIQFZeiCXgXoja/Wlht1SPybxerBWh4NCmb0pOgCv61lrlQZETwvVVfAFAA3IqoEO9aqQ== dependencies: resolve-from "^5.0.0" - webpack "^4.33.0" + webpack "^4.38.0" cors@^2.8.1: version "2.8.5" @@ -5958,19 +6019,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-emotion@^9.2.12: - version "9.2.12" - resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.12.tgz#0fc8e7f92c4f8bb924b0fef6781f66b1d07cb26f" - integrity sha512-P57uOF9NL2y98Xrbl2OuiDQUZ30GVmASsv5fbsjF4Hlraip2kyAvMm+2PoYUvFFw03Fhgtxk3RqZSm2/qHL9hA== - dependencies: - "@emotion/hash" "^0.6.2" - "@emotion/memoize" "^0.6.1" - "@emotion/stylis" "^0.7.0" - "@emotion/unitless" "^0.6.2" - csstype "^2.5.2" - stylis "^3.5.0" - stylis-rule-sheet "^0.0.10" - create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -6100,7 +6148,7 @@ css-in-js-utils@^2.0.0: hyphenate-style-name "^1.0.2" isobject "^3.0.1" -css-loader@3.2.0: +css-loader@3.2.0, css-loader@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.2.0.tgz#bb570d89c194f763627fcf1f80059c6832d009b2" integrity sha512-QTF3Ud5H7DaZotgdcJjGMvyDj5F3Pn1j/sC6VBEOVp94cbwqyIBdcs/quzj4MC1BKQSrTpQznegH/5giYbhnCQ== @@ -6118,23 +6166,6 @@ css-loader@3.2.0: postcss-value-parser "^4.0.0" schema-utils "^2.0.0" -css-loader@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" - integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== - dependencies: - camelcase "^5.2.0" - icss-utils "^4.1.0" - loader-utils "^1.2.3" - normalize-path "^3.0.0" - postcss "^7.0.14" - postcss-modules-extract-imports "^2.0.0" - postcss-modules-local-by-default "^2.0.6" - postcss-modules-scope "^2.1.0" - postcss-modules-values "^2.0.0" - postcss-value-parser "^3.3.0" - schema-utils "^1.0.0" - css-select-base-adapter@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" @@ -6352,10 +6383,10 @@ data-urls@^1.0.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -date-fns@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.1.0.tgz#0d7e806c3cefe14a943532dbf968995ccfd46bd9" - integrity sha512-eKeLk3sLCnxB/0PN4t1+zqDtSs4jb4mXRSTZ2okmx/myfWyDqeO4r5nnmA5LClJiCwpuTMeK2v5UQPuE4uMaxA== +date-fns@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.2.1.tgz#b3f79cf56760af106050c686f4c72586a3383ee9" + integrity sha512-4V1i5CnTinjBvJpXTq7sDHD4NY6JPcl15112IeSNNLUWQOQ+kIuCvRGOFZMQZNvkadw8F9QTyZxz59rIRU6K+w== date-now@^0.1.4: version "0.1.4" @@ -6936,6 +6967,13 @@ electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.191, electron-to-chromi resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz#f9a62a74cda77854310a2abffde8b75591ea09a1" integrity sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA== +element-resize-detector@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/element-resize-detector/-/element-resize-detector-1.1.15.tgz#48eba1a2eaa26969a4c998d972171128c971d8d2" + integrity sha512-16/5avDegXlUxytGgaumhjyQoM6hpp5j3+L79sYq5hlXfTNRy5WMMuTVWkZU3egp/CokCmTmvf18P3KeB57Iog== + dependencies: + batch-processor "^1.0.0" + elliptic@6.3.3: version "6.3.3" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" @@ -6974,7 +7012,16 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= -emotion-theming@^10.0.10, emotion-theming@^10.0.9: +emotion-theming@^10.0.14: + version "10.0.18" + resolved "https://registry.yarnpkg.com/emotion-theming/-/emotion-theming-10.0.18.tgz#7d636eb465cb190590e17d815b8d318be512ef7d" + integrity sha512-zFAax4setUIKDj+cmbl3nxXDBRIMsPmiRNpg+qDmX9wTHW2TPWpETMGaDWB67LwK63rfSIkeTH7stFFnyKd2pQ== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/weak-memoize" "0.2.3" + hoist-non-react-statics "^3.3.0" + +emotion-theming@^10.0.9: version "10.0.14" resolved "https://registry.yarnpkg.com/emotion-theming/-/emotion-theming-10.0.14.tgz#e548d388493d07bedbb0d9d3bbe221766174b1f4" integrity sha512-zMGhPSYz48AAR6DYjQVaZHeO42cYKPq4VyB1XjxzgR62/NmO99679fx8qDDB1QZVYGkRWZtsOe+zJE/e30XdbA== @@ -6983,14 +7030,6 @@ emotion-theming@^10.0.10, emotion-theming@^10.0.9: "@emotion/weak-memoize" "0.2.3" hoist-non-react-statics "^3.3.0" -emotion@^9.1.2: - version "9.2.12" - resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9" - integrity sha512-hcx7jppaI8VoXxIWEhxpDW7I+B4kq9RNzQLmsrF6LY8BGKqe2N+gFAQr0EfuFucFlPs2A9HM4+xNj4NeqEWIOQ== - dependencies: - babel-plugin-emotion "^9.2.11" - create-emotion "^9.2.12" - encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -7279,6 +7318,14 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-utils@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c" @@ -7286,12 +7333,67 @@ eslint-utils@^1.3.1: dependencies: eslint-visitor-keys "^1.0.0" +eslint-utils@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" + 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" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@5.16.0, eslint@^5.0.0, eslint@^5.5.0: +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.4.0.tgz#5aa9227c3fbe921982b2eda94ba0d7fae858611a" + integrity sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.2" + eslint-visitor-keys "^1.1.0" + espree "^6.1.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.4.1" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +eslint@^5.0.0, eslint@^5.5.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== @@ -7350,6 +7452,15 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" +espree@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de" + integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ== + dependencies: + acorn "^7.0.0" + acorn-jsx "^5.0.2" + eslint-visitor-keys "^1.1.0" + esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -7881,6 +7992,11 @@ eventemitter3@3.1.2, eventemitter3@^3.0.0, eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + events@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" @@ -8919,6 +9035,13 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-parent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" + integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== + dependencies: + is-glob "^4.0.1" + glob-stream@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" @@ -9398,6 +9521,18 @@ highlight.js@~9.12.0: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4= +history@4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^3.0.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^1.0.1" + history@^4.7.2, history@^4.9.0: version "4.9.0" resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" @@ -9693,12 +9828,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: 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" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - -icss-utils@^4.0.0, icss-utils@^4.1.0, icss-utils@^4.1.1: +icss-utils@^4.0.0, icss-utils@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== @@ -9909,6 +10039,25 @@ inquirer@^6.2.0, inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^6.4.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -10199,7 +10348,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -11377,12 +11526,12 @@ lazy-cache@^1.0.3: resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= -lazy-universal-dotenv@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-3.0.0.tgz#e71f07f89d8de6bbf491478e4503df3c96729b8d" - integrity sha512-Mbf5AeGOs74lE5BdQXHFJ7Rt383jxnWKNfW2EWL0Pibnhea5JRStRIiUpdTenyMxCGuCjlMpYQhhay1XZBSSQA== +lazy-universal-dotenv@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-3.0.1.tgz#a6c8938414bca426ab8c9463940da451a911db38" + integrity sha512-prXSYk799h3GY3iOWnC6ZigYzMPjxN2svgjJ9shk7oMadSNX3wXy0B6F32PMJv7qtMnrIbUxoEHzbutvxR2LBQ== dependencies: - "@babel/runtime" "^7.0.0" + "@babel/runtime" "^7.5.0" app-root-dir "^1.0.2" core-js "^3.0.4" dotenv "^8.0.0" @@ -11660,7 +11809,7 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash-es@^4.17.11, lodash-es@^4.2.1: +lodash-es@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== @@ -12191,7 +12340,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.0.3, mime@^2.4.2, mime@^2.4.4: +mime@^2.4.2, mime@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== @@ -12636,13 +12785,6 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4= - dependencies: - abbrev "1" - normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -13732,15 +13874,6 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" -postcss-modules-local-by-default@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" - integrity sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA== - dependencies: - postcss "^7.0.6" - postcss-selector-parser "^6.0.0" - postcss-value-parser "^3.3.1" - postcss-modules-local-by-default@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz#e8a6561be914aaf3c052876377524ca90dbb7915" @@ -13759,14 +13892,6 @@ postcss-modules-scope@^2.1.0: postcss "^7.0.6" postcss-selector-parser "^6.0.0" -postcss-modules-values@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" - integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w== - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^7.0.6" - postcss-modules-values@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" @@ -13938,7 +14063,7 @@ postcss-unique-selectors@^4.0.1: postcss "^7.0.0" uniqs "^2.0.0" -postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: +postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== @@ -14373,11 +14498,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -raf-schd@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0" - integrity sha512-VhlMZmGy6A6hrkJWHLNTGl5gtgMUm+xfGza6wbwnE914yeQ5Ybm18vgM734RZhMgfw4tacUrWseGZlpUrrakEQ== - raf@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -14540,10 +14660,10 @@ react-dom@^16.8.3: prop-types "^15.6.2" scheduler "^0.13.6" -react-draggable@^3.1.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-3.3.0.tgz#2ed7ea3f92e7d742d747f9e6324860606cd4d997" - integrity sha512-U7/jD0tAW4T0S7DCPK0kkKLyL0z61sC/eqU+NUfDjnq+JtBKaYKDHpsK2wazctiA4alEzCXUnzkREoxppOySVw== +react-draggable@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-3.3.2.tgz#966ef1d90f2387af3c2d8bd3516f601ea42ca359" + integrity sha512-oaz8a6enjbPtx5qb0oDWxtDNuybOylvto1QLydsXgKmwT7e3GXC2eMVDwEMIUYJIFqVG72XpOv673UuuAq6LhA== dependencies: classnames "^2.2.5" prop-types "^15.6.0" @@ -14594,10 +14714,10 @@ react-helmet-async@^1.0.2: react-fast-compare "2.0.4" shallowequal "1.1.0" -react-hot-loader@4.12.12: - version "4.12.12" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.12.tgz#8b33f59efef8a34f64e01f0d9393230d4b4bc6d4" - integrity sha512-Tkd412j5yPKHoTRsJzZb+5UJNFKkPszm7QGKGYvt+jnzTkDS+qK0u3AYPlB0MmBlwzUKVHICqq5KH9Srzda7XA== +react-hot-loader@4.12.13: + version "4.12.13" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.13.tgz#78dcb55f49f88ce3d4316c7c86a8c01fdd196cd2" + integrity sha512-4Byk3aVQhcmTnVCBvDHOEOUnMFMj81r2yRKZQSfLOG2yd/4hm/A3oK15AnCZilQExqSFSsHcK64lIIU+dU2zQQ== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" @@ -14708,17 +14828,6 @@ react-redux@7.1.1: prop-types "^15.7.2" react-is "^16.9.0" -react-resize-detector@^4.0.5: - version "4.2.0" - resolved "https://registry.yarnpkg.com/react-resize-detector/-/react-resize-detector-4.2.0.tgz#b87aee6b37c9e8a52daca8736b3230cf6a2a8647" - integrity sha512-AtOaNIxs0ydua7tEoglXR3902/EdlIj9PXDu1Zj0ug2VAUnkSQjguLGzaG/N6CXLOhJSccTsUCZxjLayQ1mE9Q== - dependencies: - lodash "^4.17.11" - lodash-es "^4.17.11" - prop-types "^15.7.2" - raf-schd "^4.0.0" - resize-observer-polyfill "^1.5.1" - react-router-dom@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.0.1.tgz#ee66f4a5d18b6089c361958e443489d6bab714be" @@ -14761,19 +14870,32 @@ react-router@5.0.1: prop-types "^15.6.1" warning "^4.0.1" -react-select@^2.2.0: - version "2.4.4" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.4.4.tgz#ba72468ef1060c7d46fbb862b0748f96491f1f73" - integrity sha512-C4QPLgy9h42J/KkdrpVxNmkY6p4lb49fsrbDk/hRcZpX7JvZPNb6mGj+c5SzyEtBv1DmQ9oPH4NmhAFvCrg8Jw== +react-select@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.0.4.tgz#16bde37c24fd4f6444914d4681e78f15ffbc86d3" + integrity sha512-fbVISKa/lSUlLsltuatfUiKcWCNvdLXxFFyrzVQCBUsjxJZH/m7UMPdw/ywmRixAmwXAP++MdbNNZypOsiDEfA== dependencies: + "@babel/runtime" "^7.4.4" + "@emotion/cache" "^10.0.9" + "@emotion/core" "^10.0.9" + "@emotion/css" "^10.0.9" classnames "^2.2.5" - emotion "^9.1.2" memoize-one "^5.0.0" prop-types "^15.6.0" raf "^3.4.0" react-input-autosize "^2.2.1" react-transition-group "^2.2.1" +react-sizeme@^2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.7.tgz#231339ce8821ac2c26424c791e0027f89dae3e90" + integrity sha512-xCjPoBP5jmeW58TxIkcviMZqabZis7tTvDFWf0/Wa5XCgVWQTIe74NQBes2N1Kmp64GRLkpm60BaP0kk+v8aCQ== + dependencies: + element-resize-detector "^1.1.15" + invariant "^2.2.4" + shallowequal "^1.1.0" + throttle-debounce "^2.1.0" + react-syntax-highlighter@^8.0.1: version "8.1.0" resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-8.1.0.tgz#59103ff17a828a27ed7c8f035ae2558f09b6b78c" @@ -15477,6 +15599,11 @@ resolve-pathname@^2.2.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" integrity sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg== +resolve-pathname@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -15881,7 +16008,7 @@ semver@6.2.0, semver@^6.0.0, semver@^6.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^6.2.0, semver@^6.3.0: +semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -16293,7 +16420,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.2, source-map@^0.7.3: +source-map@^0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -16670,6 +16797,11 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + style-loader@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82" @@ -16695,16 +16827,6 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -stylis-rule-sheet@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== - -stylis@^3.5.0: - version "3.5.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" - integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== - sugarss@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-2.0.0.tgz#ddd76e0124b297d40bf3cca31c8b22ecb43bc61d" @@ -16927,6 +17049,19 @@ telejson@^2.2.1: lodash.get "^4.4.2" memoizerific "^1.11.3" +telejson@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/telejson/-/telejson-2.2.2.tgz#d61d721d21849a6e4070d547aab302a9bd22c720" + integrity sha512-YyNwnKY0ilabOwYgC/J754En1xOe5PBIUIw+C9e0+5HjVVcnQE5/gdu2yET2pmSbp5bxIDqYNjvndj2PUkIiYA== + dependencies: + global "^4.3.2" + is-function "^1.0.1" + is-regex "^1.0.4" + is-symbol "^1.0.2" + isobject "^3.0.1" + lodash "^4.17.11" + memoizerific "^1.11.3" + temp@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" @@ -17016,6 +17151,11 @@ throat@^4.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= +throttle-debounce@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.1.0.tgz#257e648f0a56bd9e54fe0f132c4ab8611df4e1d5" + integrity sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg== + through2-filter@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" @@ -17202,13 +17342,6 @@ toposort@^1.0.0: resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= -touch@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/touch/-/touch-2.0.2.tgz#ca0b2a3ae3211246a61b16ba9e6cbf1596287164" - integrity sha512-qjNtvsFXTRq7IuMLweVgFxmEuQ6gLbRs2jQxL80TtZ31dEKWYIxRXquij6w6VimyDek5hD3PytljHmEtAs2u0A== - dependencies: - nopt "~1.0.10" - tough-cookie@^2.2.0, tough-cookie@^2.3.3, tough-cookie@^2.3.4: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -17741,10 +17874,10 @@ truffle-workflow-compile@^2.1.3: truffle-external-compile "^1.0.15" truffle-resolver "^5.0.15" -truffle@5.0.35: - version "5.0.35" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.35.tgz#5c93522c3a0915567b2e5c7811934e0ee6e8a2bd" - integrity sha512-ewJPaeHyYgRpuVSvlzhlnalJkeLN0sz7c/P/8WLWpXC966M2o4vL5ov6MNdSHQFYiYQsDrCetrothzsYsg4HWQ== +truffle@5.0.36: + version "5.0.36" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.36.tgz#ca8361be8e62cc351c42867d7e25fd66a1541f96" + integrity sha512-lcEFJYf+HzdGsIp+YS9g5mSW1wpKlkBfqu/DHFUmbzvTPV5nxKXkKCYlwWjo20lNAOBTErFtwNpw4+EOaBJVRA== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -18118,16 +18251,7 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-loader@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8" - integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg== - dependencies: - loader-utils "^1.1.0" - mime "^2.0.3" - schema-utils "^1.0.0" - -url-loader@^2.1.0: +url-loader@^2.0.1, url-loader@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-2.1.0.tgz#bcc1ecabbd197e913eca23f5e0378e24b4412961" integrity sha512-kVrp/8VfEm5fUt+fl2E0FQyrpmOYgMEkBsv8+UDP1wFhszECq5JyGF33I7cajlVY90zRZ6MyfgKXngLvHYZX8A== @@ -18271,6 +18395,11 @@ v8-compile-cache@2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + v8flags@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" @@ -18298,6 +18427,11 @@ value-equal@^0.4.0: resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" integrity sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw== +value-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== + value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" @@ -19457,10 +19591,10 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-bundle-analyzer@3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.4.1.tgz#430544c7ba1631baccf673475ca8300cb74a3c47" - integrity sha512-Bs8D/1zF+17lhqj2OYmzi7HEVYqEVxu7lCO9Ff8BwajenOU0vAwEoV8e4ICCPNZAcqR1PCR/7o2SkW+cnCmF0A== +webpack-bundle-analyzer@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.5.0.tgz#c82130a490a05f9267aa5956871aef574dff5074" + integrity sha512-NzueflueLSJxWGzDlMq5oUV+P8Qoq6yiaQlXGCbDYUpHEKlmzWdPLBJ4k/B6HTdAP/vHM8ply1Fx08mDnY+S8Q== dependencies: acorn "^6.0.7" acorn-walk "^6.1.1" @@ -19585,10 +19719,10 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.39.3: - version "4.39.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.39.3.tgz#a02179d1032156b713b6ec2da7e0df9d037def50" - integrity sha512-BXSI9M211JyCVc3JxHWDpze85CvjC842EvpRsVTc/d15YJGlox7GIDd38kJgWrb3ZluyvIjgenbLDMBQPDcxYQ== +webpack@4.40.2, webpack@^4.38.0: + version "4.40.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.40.2.tgz#d21433d250f900bf0facbabe8f50d585b2dc30a7" + integrity sha512-5nIvteTDCUws2DVvP9Qe+JPla7kWPPIDFZv55To7IycHWZ+Z5qBdaBYPyuXWdhggTufZkQwfIK+5rKQTVovm2A== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" From 21ccc5058bf1f46f92e493c43b82f953f875f052 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 16 Sep 2019 18:09:51 +0400 Subject: [PATCH 03/35] Change zIndex for header row so it's displayed over the drawer --- package.json | 2 +- src/components/Header/component/Layout.jsx | 1 + yarn.lock | 124 +-------------------- 3 files changed, 5 insertions(+), 122 deletions(-) diff --git a/package.json b/package.json index 1b59022b..0e164dc7 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "classnames": "^2.2.5", "css-loader": "3.2.0", "detect-port": "^1.2.2", - "eslint": "6.4.0", + "eslint": "5.16.0", "eslint-config-airbnb": "18.0.1", "eslint-plugin-flowtype": "4.3.0", "eslint-plugin-import": "2.18.2", diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index fdbc92d1..72bb12f2 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -36,6 +36,7 @@ const styles = () => ({ alignItems: 'center', height: '53px', backgroundColor: 'white', + zIndex: 1301, }, logo: { padding: `${sm} ${md}`, diff --git a/yarn.lock b/yarn.lock index 42f53c0c..c404cfac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2994,11 +2994,6 @@ acorn-jsx@^5.0.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== -acorn-jsx@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.2.tgz#84b68ea44b373c4f8686023a551f61a21b7c4a4f" - integrity sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw== - acorn-walk@^6.0.1, acorn-walk@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -3024,11 +3019,6 @@ acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.0, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== -acorn@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.0.0.tgz#26b8d1cd9a9b700350b71c0905546f64d1284e7a" - integrity sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ== - address@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" @@ -7318,14 +7308,6 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-utils@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c" @@ -7333,67 +7315,12 @@ eslint-utils@^1.3.1: dependencies: eslint-visitor-keys "^1.0.0" -eslint-utils@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== - dependencies: - eslint-visitor-keys "^1.0.0" - 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" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint-visitor-keys@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" - integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== - -eslint@6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.4.0.tgz#5aa9227c3fbe921982b2eda94ba0d7fae858611a" - integrity sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA== - dependencies: - "@babel/code-frame" "^7.0.0" - ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^4.0.1" - doctrine "^3.0.0" - eslint-scope "^5.0.0" - eslint-utils "^1.4.2" - eslint-visitor-keys "^1.1.0" - espree "^6.1.1" - esquery "^1.0.1" - esutils "^2.0.2" - file-entry-cache "^5.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^11.7.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - inquirer "^6.4.1" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.14" - minimatch "^3.0.4" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - progress "^2.0.0" - regexpp "^2.0.1" - semver "^6.1.2" - strip-ansi "^5.2.0" - strip-json-comments "^3.0.1" - table "^5.2.3" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -eslint@^5.0.0, eslint@^5.5.0: +eslint@5.16.0, eslint@^5.0.0, eslint@^5.5.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== @@ -7452,15 +7379,6 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" -espree@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de" - integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ== - dependencies: - acorn "^7.0.0" - acorn-jsx "^5.0.2" - eslint-visitor-keys "^1.1.0" - esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -9035,13 +8953,6 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" - integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== - dependencies: - is-glob "^4.0.1" - glob-stream@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" @@ -10039,25 +9950,6 @@ inquirer@^6.2.0, inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" -inquirer@^6.4.1: - version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== - dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" - through "^2.3.6" - internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -10348,7 +10240,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -16008,7 +15900,7 @@ semver@6.2.0, semver@^6.0.0, semver@^6.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -16797,11 +16689,6 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strip-json-comments@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== - style-loader@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82" @@ -18395,11 +18282,6 @@ v8-compile-cache@2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== -v8-compile-cache@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" - integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== - v8flags@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" From 49ba6d3bd3ea4b00c86f64e479dd4393e0960b0d Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 16 Sep 2019 18:28:08 +0400 Subject: [PATCH 04/35] add sidebar styles --- src/components/Header/component/Layout.jsx | 4 +++- src/components/Sidebar/index.jsx | 15 +++++++++++++-- src/components/Sidebar/style.js | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 src/components/Sidebar/style.js diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index 72bb12f2..732170a8 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -17,6 +17,8 @@ import Provider from './Provider' const logo = require('../assets/gnosis-safe-logo.svg') +export const headerHeight = '53px' + type Props = Open & { classes: Object, providerDetails: React.Node, @@ -34,7 +36,7 @@ const styles = () => ({ summary: { borderBottom: `solid 1px ${border}`, alignItems: 'center', - height: '53px', + height: headerHeight, backgroundColor: 'white', zIndex: 1301, }, diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index a9bbbcf7..b63c0c04 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -1,16 +1,27 @@ // @flow import React, { useState } from 'react' -import { makeStyles } from '@material-ui/core/styles' import Drawer from '@material-ui/core/Drawer' +import useSidebarStyles from './style' const Sidebar = () => { const [isOpen, setIsOpen] = useState(true) + const classes = useSidebarStyles() const toggleSidebar = () => { setIsOpen((prevIsOpen) => !prevIsOpen) } - return Wop + return ( + +
+ Wop + + ) } export default Sidebar diff --git a/src/components/Sidebar/style.js b/src/components/Sidebar/style.js new file mode 100644 index 00000000..fd5fa0c5 --- /dev/null +++ b/src/components/Sidebar/style.js @@ -0,0 +1,19 @@ +// @flow +import { makeStyles } from '@material-ui/core/styles' +import { headerHeight } from '~/components/Header/component/Layout' + +const sidebarWidth = '400px' + +const useSidebarStyles = makeStyles({ + sidebar: { + width: sidebarWidth, + }, + sidebarPaper: { + width: sidebarWidth, + }, + headerPlaceholder: { + height: headerHeight, + }, +}) + +export default useSidebarStyles From ceb44ab206d3d86308f17f999695570df849cdc9 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 15:19:39 +0400 Subject: [PATCH 05/35] make sidebar toggleable --- src/components/EtherscanLink/index.jsx | 2 +- src/components/Header/component/Layout.jsx | 4 +- .../Header/component/SafeListHeader/index.jsx | 60 +++++++++++++++++++ src/components/Root/index.js | 2 - src/components/Sidebar/index.jsx | 28 +++++---- src/components/layout/Divider/index.js | 2 +- src/components/layout/PageFrame/index.jsx | 11 ++-- src/routes/safeList/store/selectors/index.js | 5 ++ src/theme/mui.js | 5 ++ 9 files changed, 100 insertions(+), 19 deletions(-) create mode 100644 src/components/Header/component/SafeListHeader/index.jsx diff --git a/src/components/EtherscanLink/index.jsx b/src/components/EtherscanLink/index.jsx index 1e1e743e..f824f6e9 100644 --- a/src/components/EtherscanLink/index.jsx +++ b/src/components/EtherscanLink/index.jsx @@ -26,6 +26,6 @@ const EtherscanLink = ({ type, value, currentNetwork }: EtherscanLinkProps) => ( ) export default connect( - state => ({ currentNetwork: networkSelector(state) }), + (state) => ({ currentNetwork: networkSelector(state) }), null, )(EtherscanLink) diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index 732170a8..6973b105 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -14,6 +14,7 @@ import Row from '~/components/layout/Row' import Spacer from '~/components/Spacer' import { border, sm, md } from '~/theme/variables' import Provider from './Provider' +import SafeListHeader from './SafeListHeader' const logo = require('../assets/gnosis-safe-logo.svg') @@ -58,8 +59,9 @@ const Layout = openHoc(({ - + + {(providerRef) => ( diff --git a/src/components/Header/component/SafeListHeader/index.jsx b/src/components/Header/component/SafeListHeader/index.jsx new file mode 100644 index 00000000..3e673471 --- /dev/null +++ b/src/components/Header/component/SafeListHeader/index.jsx @@ -0,0 +1,60 @@ +// @flow +import * as React from 'react' +import { connect } from 'react-redux' +import { makeStyles } from '@material-ui/core/styles' +import IconButton from '@material-ui/core/IconButton' +import ExpandMoreIcon from '@material-ui/icons/ExpandMore' +import Paragraph from '~/components/layout/Paragraph' +import Col from '~/components/layout/Col' +import { + xs, sm, md, border, +} from '~/theme/variables' +import { safesCountSelector } from '~/routes/safeList/store/selectors' +import { SidebarContext } from '~/components/Sidebar' + +const useStyles = makeStyles({ + container: { + flexGrow: 0, + padding: `0 ${md}`, + }, + counter: { + background: border, + padding: xs, + borderRadius: '3px', + marginLeft: sm, + lineHeight: 'normal', + }, + icon: { + marginLeft: sm, + }, +}) + +type Props = { + safesCount: number, +} + +const { useContext } = React + +const SafeListHeader = ({ safesCount }: Props) => { + const classes = useStyles() + const { toggleSidebar } = useContext(SidebarContext) + + return ( + + Safes + {' '} + + {safesCount} + + + + + + ) +} + +export default connect( + // $FlowFixMe + (state) => ({ safesCount: safesCountSelector(state) }), + null, +)(SafeListHeader) diff --git a/src/components/Root/index.js b/src/components/Root/index.js index 4ea68572..8cfba635 100644 --- a/src/components/Root/index.js +++ b/src/components/Root/index.js @@ -6,7 +6,6 @@ import React, { Suspense } from 'react' import { Provider } from 'react-redux' import { ConnectedRouter } from 'connected-react-router' import { hot } from 'react-hot-loader/root' -import Sidebar from '~/components/Sidebar' import PageFrame from '../layout/PageFrame' import Loader from '../Loader' import { history, store } from '~/store' @@ -22,7 +21,6 @@ const Root = () => ( }> - diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index b63c0c04..2204344b 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -3,7 +3,12 @@ import React, { useState } from 'react' import Drawer from '@material-ui/core/Drawer' import useSidebarStyles from './style' -const Sidebar = () => { +export const SidebarContext = React.createContext({ + isOpen: false, + toggleSidebar: () => {}, +}) + +const Sidebar = ({ children }) => { const [isOpen, setIsOpen] = useState(true) const classes = useSidebarStyles() @@ -12,15 +17,18 @@ const Sidebar = () => { } return ( - -
- Wop - + + +
+ Wop + + {children} + ) } diff --git a/src/components/layout/Divider/index.js b/src/components/layout/Divider/index.js index 0d81c3f7..3dca7fde 100644 --- a/src/components/layout/Divider/index.js +++ b/src/components/layout/Divider/index.js @@ -4,7 +4,7 @@ import { border } from '~/theme/variables' const style = { height: '100%', - borderRight: `solid 1px ${border}`, + borderRight: `solid 2px ${border}`, } const Divider = () =>
diff --git a/src/components/layout/PageFrame/index.jsx b/src/components/layout/PageFrame/index.jsx index 4b260890..7ae223ec 100644 --- a/src/components/layout/PageFrame/index.jsx +++ b/src/components/layout/PageFrame/index.jsx @@ -1,7 +1,8 @@ // @flow -import React from 'react' +import * as React from 'react' import Footer from '~/components/Footer' import Header from '~/components/Header' +import SidebarProvider from '~/components/Sidebar' import { SharedSnackbarProvider } from '~/components/SharedSnackBar' import styles from './index.scss' @@ -12,9 +13,11 @@ type Props = { const PageFrame = ({ children }: Props) => (
-
- {children} -
+ +
+ {children} +
+
) diff --git a/src/routes/safeList/store/selectors/index.js b/src/routes/safeList/store/selectors/index.js index b9247ec0..623e76a1 100644 --- a/src/routes/safeList/store/selectors/index.js +++ b/src/routes/safeList/store/selectors/index.js @@ -11,3 +11,8 @@ export const safesListSelector: Selector> = createSe safesMapSelector, (safes: Map): List => safes.toList(), ) + +export const safesCountSelector: Selector = createSelector( + safesMapSelector, + (safes: Map): number => safes.size, +) \ No newline at end of file diff --git a/src/theme/mui.js b/src/theme/mui.js index 1cf13754..96dba5ad 100644 --- a/src/theme/mui.js +++ b/src/theme/mui.js @@ -206,6 +206,11 @@ export default createMuiTheme({ color: primary, }, }, + MuiSvgIcon: { + colorSecondary: { + color: secondaryText, + } + }, MuiTab: { root: { fontFamily: 'Averta, monospace', From 226d7fc6736f749b13ad42cd201bb8af57887c71 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 15:19:47 +0400 Subject: [PATCH 06/35] eslint fixes --- src/routes/safeList/store/selectors/index.js | 2 +- src/theme/mui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/safeList/store/selectors/index.js b/src/routes/safeList/store/selectors/index.js index 623e76a1..1f2978fe 100644 --- a/src/routes/safeList/store/selectors/index.js +++ b/src/routes/safeList/store/selectors/index.js @@ -15,4 +15,4 @@ export const safesListSelector: Selector> = createSe export const safesCountSelector: Selector = createSelector( safesMapSelector, (safes: Map): number => safes.size, -) \ No newline at end of file +) diff --git a/src/theme/mui.js b/src/theme/mui.js index 96dba5ad..01d96c8a 100644 --- a/src/theme/mui.js +++ b/src/theme/mui.js @@ -209,7 +209,7 @@ export default createMuiTheme({ MuiSvgIcon: { colorSecondary: { color: secondaryText, - } + }, }, MuiTab: { root: { From b6b8311250ccde9210de8c7374bfd109f3cc3601 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 15:49:13 +0400 Subject: [PATCH 07/35] Add types for sidebar context --- src/components/Header/component/Layout.jsx | 1 + .../Header/component/SafeListHeader/index.jsx | 5 +++-- src/components/Sidebar/index.jsx | 19 +++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index 6973b105..00007aa2 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -62,6 +62,7 @@ const Layout = openHoc(({ + {(providerRef) => ( diff --git a/src/components/Header/component/SafeListHeader/index.jsx b/src/components/Header/component/SafeListHeader/index.jsx index 3e673471..d7d5f5cf 100644 --- a/src/components/Header/component/SafeListHeader/index.jsx +++ b/src/components/Header/component/SafeListHeader/index.jsx @@ -4,6 +4,7 @@ import { connect } from 'react-redux' import { makeStyles } from '@material-ui/core/styles' import IconButton from '@material-ui/core/IconButton' import ExpandMoreIcon from '@material-ui/icons/ExpandMore' +import ExpandLessIcon from '@material-ui/icons/ExpandLess' import Paragraph from '~/components/layout/Paragraph' import Col from '~/components/layout/Col' import { @@ -37,7 +38,7 @@ const { useContext } = React const SafeListHeader = ({ safesCount }: Props) => { const classes = useStyles() - const { toggleSidebar } = useContext(SidebarContext) + const { toggleSidebar, isOpen } = useContext(SidebarContext) return ( @@ -47,7 +48,7 @@ const SafeListHeader = ({ safesCount }: Props) => { {safesCount} - + {isOpen ? : } ) diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 2204344b..6ae6086a 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -1,15 +1,26 @@ // @flow -import React, { useState } from 'react' +import * as React from 'react' import Drawer from '@material-ui/core/Drawer' import useSidebarStyles from './style' -export const SidebarContext = React.createContext({ +const { useState } = React + +type TSidebarContext = { + isOpen: boolean, + toggleSidebar: Function, +} + +export const SidebarContext = React.createContext({ isOpen: false, toggleSidebar: () => {}, }) -const Sidebar = ({ children }) => { - const [isOpen, setIsOpen] = useState(true) +type SidebarProps = { + children: React.Node, +} + +const Sidebar = ({ children }: SidebarProps) => { + const [isOpen, setIsOpen] = useState(false) const classes = useSidebarStyles() const toggleSidebar = () => { From f22c044aa67646dee3537375eec40b36e6c192b3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 17:49:29 +0400 Subject: [PATCH 08/35] Fix safe list colors --- src/components/Header/component/Layout.jsx | 6 +-- src/components/Sidebar/SafeList.jsx | 63 ++++++++++++++++++++++ src/components/Sidebar/index.jsx | 17 ++++-- src/components/Sidebar/style.js | 4 +- src/theme/variables.js | 2 + 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 src/components/Sidebar/SafeList.jsx diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index 00007aa2..17d8edc0 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -12,14 +12,14 @@ import Col from '~/components/layout/Col' import Img from '~/components/layout/Img' import Row from '~/components/layout/Row' import Spacer from '~/components/Spacer' -import { border, sm, md } from '~/theme/variables' +import { + border, sm, md, headerHeight, +} from '~/theme/variables' import Provider from './Provider' import SafeListHeader from './SafeListHeader' const logo = require('../assets/gnosis-safe-logo.svg') -export const headerHeight = '53px' - type Props = Open & { classes: Object, providerDetails: React.Node, diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx new file mode 100644 index 00000000..d2522d42 --- /dev/null +++ b/src/components/Sidebar/SafeList.jsx @@ -0,0 +1,63 @@ +// @flow +import * as React from 'react' +import { makeStyles } from '@material-ui/core/styles' +import { List } from 'immutable' +import MuiList from '@material-ui/core/List' +import ListItem from '@material-ui/core/ListItem' +import ListItemIcon from '@material-ui/core/ListItemIcon' +import ListItemText from '@material-ui/core/ListItemText' +import Link from '~/components/layout/Link' +import Hairline from '~/components/layout/Hairline' +import Identicon from '~/components/Identicon' +import { sm, secondary, primary } from '~/theme/variables' +import { shortVersionOf } from '~/logic/wallets/ethAddresses' +import { type Safe } from '~/routes/safe/store/models/safe' +import { SAFELIST_ADDRESS } from '~/routes/routes' + +type SafeListProps = { + safes: List, +} + +const useStyles = makeStyles({ + icon: { + marginRight: sm, + }, + listItemRoot: { + paddingTop: 0, + paddingBottom: 0, + }, + safeName: { + color: secondary, + }, + safeAddress: { + color: primary, + }, +}) + +const SafeList = ({ safes }: SafeListProps) => { + const classes = useStyles() + + return ( + + {safes.map((safe) => ( + + + + + + + + + + + + ))} + + ) +} + +export default SafeList diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 6ae6086a..d8432158 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -1,7 +1,12 @@ // @flow import * as React from 'react' +import { List } from 'immutable' +import { connect } from 'react-redux' import Drawer from '@material-ui/core/Drawer' +import { type Safe } from '~/routes/safe/store/models/safe' +import { safesListSelector } from '~/routes/safeList/store/selectors' import useSidebarStyles from './style' +import SafeList from './SafeList' const { useState } = React @@ -17,9 +22,10 @@ export const SidebarContext = React.createContext({ type SidebarProps = { children: React.Node, + safes: List, } -const Sidebar = ({ children }: SidebarProps) => { +const Sidebar = ({ children, safes }: SidebarProps) => { const [isOpen, setIsOpen] = useState(false) const classes = useSidebarStyles() @@ -33,14 +39,19 @@ const Sidebar = ({ children }: SidebarProps) => { className={classes.sidebar} open={isOpen} onKeyDown={toggleSidebar} + onClick={toggleSidebar} classes={{ paper: classes.sidebarPaper }} >
- Wop + {children} ) } -export default Sidebar +export default connect( + // $FlowFixMe + (state) => ({ safes: safesListSelector(state) }), + null, +)(Sidebar) diff --git a/src/components/Sidebar/style.js b/src/components/Sidebar/style.js index fd5fa0c5..73945689 100644 --- a/src/components/Sidebar/style.js +++ b/src/components/Sidebar/style.js @@ -1,6 +1,6 @@ // @flow import { makeStyles } from '@material-ui/core/styles' -import { headerHeight } from '~/components/Header/component/Layout' +import { headerHeight } from '~/theme/variables' const sidebarWidth = '400px' @@ -12,7 +12,7 @@ const useSidebarStyles = makeStyles({ width: sidebarWidth, }, headerPlaceholder: { - height: headerHeight, + height: headerHeight, // for some reason it didn't want to work with an imported variable 🤔 }, }) diff --git a/src/theme/variables.js b/src/theme/variables.js index e7143318..84d9f9ea 100644 --- a/src/theme/variables.js +++ b/src/theme/variables.js @@ -17,6 +17,7 @@ const lg = '24px' const xl = '32px' const xxl = '40px' const marginButtonImg = '12px' +const headerHeight = '53px' module.exports = { primary, @@ -29,6 +30,7 @@ module.exports = { warning: warningColor, error: errorColor, connected: connectedColor, + headerHeight, xs, sm, md, From b1702594102fafe4a3f9fc33f997b0a72d737bbf Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 18:24:12 +0400 Subject: [PATCH 09/35] display eth balance --- src/components/Sidebar/SafeList.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index d2522d42..a278c628 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -8,8 +8,9 @@ import ListItemIcon from '@material-ui/core/ListItemIcon' import ListItemText from '@material-ui/core/ListItemText' import Link from '~/components/layout/Link' import Hairline from '~/components/layout/Hairline' +import Paragraph from '~/components/layout/Paragraph' import Identicon from '~/components/Identicon' -import { sm, secondary, primary } from '~/theme/variables' +import { mediumFontSize, sm, secondary, primary } from '~/theme/variables' import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { type Safe } from '~/routes/safe/store/models/safe' import { SAFELIST_ADDRESS } from '~/routes/routes' @@ -31,6 +32,7 @@ const useStyles = makeStyles({ }, safeAddress: { color: primary, + fontSize: mediumFontSize, }, }) @@ -51,6 +53,11 @@ const SafeList = ({ safes }: SafeListProps) => { secondary={shortVersionOf(safe.address, 4)} classes={{ primary: classes.safeName, secondary: classes.safeAddress }} /> + + {safe.ethBalance} + {' '} + ETH + From 3fa4f5ce643d77023ec180dfe5dd02ab333246de Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 17 Sep 2019 19:27:41 +0400 Subject: [PATCH 10/35] Add search row --- .../Header/component/SafeListHeader/index.jsx | 2 +- src/components/Sidebar/SafeList.jsx | 4 +- src/components/Sidebar/index.jsx | 55 +++++++++++++++---- src/components/Sidebar/style.js | 42 +++++++++++++- .../safe/components/Balances/Tokens/index.jsx | 4 +- .../Tokens/screens/TokenList/index.jsx | 4 +- 6 files changed, 94 insertions(+), 17 deletions(-) diff --git a/src/components/Header/component/SafeListHeader/index.jsx b/src/components/Header/component/SafeListHeader/index.jsx index d7d5f5cf..c7df187b 100644 --- a/src/components/Header/component/SafeListHeader/index.jsx +++ b/src/components/Header/component/SafeListHeader/index.jsx @@ -48,7 +48,7 @@ const SafeListHeader = ({ safesCount }: Props) => { {safesCount} - {isOpen ? : } + {isOpen ? : } ) diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index a278c628..9527aa87 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -10,7 +10,9 @@ import Link from '~/components/layout/Link' import Hairline from '~/components/layout/Hairline' import Paragraph from '~/components/layout/Paragraph' import Identicon from '~/components/Identicon' -import { mediumFontSize, sm, secondary, primary } from '~/theme/variables' +import { + mediumFontSize, sm, secondary, primary, +} from '~/theme/variables' import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { type Safe } from '~/routes/safe/store/models/safe' import { SAFELIST_ADDRESS } from '~/routes/routes' diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index d8432158..3901e29e 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -1,8 +1,16 @@ // @flow import * as React from 'react' import { List } from 'immutable' +import SearchBar from 'material-ui-search-bar' import { connect } from 'react-redux' +import ClickAwayListener from '@material-ui/core/ClickAwayListener' import Drawer from '@material-ui/core/Drawer' +import SearchIcon from '@material-ui/icons/Search' +import Divider from '~/components/layout/Divider' +import Button from '~/components/layout/Button' +import Spacer from '~/components/Spacer' +import Hairline from '~/components/layout/Hairline' +import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' import { safesListSelector } from '~/routes/safeList/store/selectors' import useSidebarStyles from './style' @@ -29,22 +37,49 @@ const Sidebar = ({ children, safes }: SidebarProps) => { const [isOpen, setIsOpen] = useState(false) const classes = useSidebarStyles() + const searchClasses = { + input: classes.searchInput, + root: classes.searchRoot, + iconButton: classes.searchIconInput, + searchContainer: classes.searchContainer, + } + const toggleSidebar = () => { setIsOpen((prevIsOpen) => !prevIsOpen) } + const handleEsc = (e: React.KeyboardEvent) => { + if (e.keyCode === 27) { + toggleSidebar() + } + } + return ( - -
- - + + +
+ + + } /> + + + + + + + + + + {children} ) diff --git a/src/components/Sidebar/style.js b/src/components/Sidebar/style.js index 73945689..010086d5 100644 --- a/src/components/Sidebar/style.js +++ b/src/components/Sidebar/style.js @@ -1,6 +1,8 @@ // @flow import { makeStyles } from '@material-ui/core/styles' -import { headerHeight } from '~/theme/variables' +import { + xs, mediumFontSize, secondaryText, md, headerHeight, +} from '~/theme/variables' const sidebarWidth = '400px' @@ -14,6 +16,44 @@ const useSidebarStyles = makeStyles({ headerPlaceholder: { height: headerHeight, // for some reason it didn't want to work with an imported variable 🤔 }, + addSafeBtn: { + fontSize: mediumFontSize, + }, + searchIcon: { + color: secondaryText, + paddingLeft: md, + }, + searchInput: { + backgroundColor: 'transparent', + lineHeight: 'initial', + padding: 0, + '& > input::placeholder': { + letterSpacing: '-0.5px', + fontSize: mediumFontSize, + color: 'black', + }, + '& > input': { + letterSpacing: '-0.5px', + }, + }, + searchContainer: { + width: '180px', + marginLeft: xs, + marginRight: xs, + }, + searchRoot: { + letterSpacing: '-0.5px', + border: 'none', + boxShadow: 'none', + '& > button': { + display: 'none', + }, + }, + searchIconInput: { + '&:hover': { + backgroundColor: 'transparent !important', + }, + }, }) export default useSidebarStyles diff --git a/src/routes/safe/components/Balances/Tokens/index.jsx b/src/routes/safe/components/Balances/Tokens/index.jsx index b5ac8569..70f80291 100644 --- a/src/routes/safe/components/Balances/Tokens/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/index.jsx @@ -40,7 +40,7 @@ const Tokens = (props: Props) => { } = props return ( - + <> Manage Tokens @@ -72,7 +72,7 @@ const Tokens = (props: Props) => { tokens={tokens} /> )} - + ) } diff --git a/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx index dd68c257..ad39c8cc 100644 --- a/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx +++ b/src/routes/safe/components/Balances/Tokens/screens/TokenList/index.jsx @@ -124,7 +124,7 @@ class Tokens extends React.Component { const filteredTokens = filterBy(filter, tokens) return ( - + <> @@ -179,7 +179,7 @@ class Tokens extends React.Component { ) })} - + ) } } From 64e5e5519918ee8d69dbeeca780305e2f9ec47ff Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 13:36:21 +0400 Subject: [PATCH 11/35] handle search in sidebar --- src/components/Sidebar/SafeList.jsx | 5 +++-- src/components/Sidebar/index.jsx | 29 ++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index 9527aa87..94fb5bc8 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -19,6 +19,7 @@ import { SAFELIST_ADDRESS } from '~/routes/routes' type SafeListProps = { safes: List, + onSafeClick: Function, } const useStyles = makeStyles({ @@ -38,14 +39,14 @@ const useStyles = makeStyles({ }, }) -const SafeList = ({ safes }: SafeListProps) => { +const SafeList = ({ safes, onSafeClick }: SafeListProps) => { const classes = useStyles() return ( {safes.map((safe) => ( - + diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 3901e29e..0d5c1d1b 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -33,8 +33,15 @@ type SidebarProps = { safes: List, } +const filterBy = (filter: string, safes: List): List => safes.filter( + (safe: Safe) => !filter + || safe.address.toLowerCase().includes(filter.toLowerCase()) + || safe.name.toLowerCase().includes(filter.toLowerCase()), +) + const Sidebar = ({ children, safes }: SidebarProps) => { const [isOpen, setIsOpen] = useState(false) + const [filter, setFilter] = useState('') const classes = useSidebarStyles() const searchClasses = { @@ -48,12 +55,22 @@ const Sidebar = ({ children, safes }: SidebarProps) => { setIsOpen((prevIsOpen) => !prevIsOpen) } - const handleEsc = (e: React.KeyboardEvent) => { + const handleFilterChange = (value: string) => { + setFilter(value) + } + + const handleFilterCancel = () => { + setFilter('') + } + + const handleEsc = (e: SyntheticKeyboardEvent<*>) => { if (e.keyCode === 27) { toggleSidebar() } } + const filteredSafes = filterBy(filter, safes) + return ( @@ -67,7 +84,13 @@ const Sidebar = ({ children, safes }: SidebarProps) => {
- } /> + } + onChange={handleFilterChange} + onCancelSearch={handleFilterCancel} + /> @@ -77,7 +100,7 @@ const Sidebar = ({ children, safes }: SidebarProps) => { - + {children} From a2bb2c2b5ca9185ba0291ac0f737f9e513e421fd Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 13:50:39 +0400 Subject: [PATCH 12/35] Add safe button handler in sidebar --- src/components/Sidebar/index.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 0d5c1d1b..004f6677 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -8,6 +8,7 @@ import Drawer from '@material-ui/core/Drawer' import SearchIcon from '@material-ui/icons/Search' import Divider from '~/components/layout/Divider' import Button from '~/components/layout/Button' +import Link from '~/components/layout/Link' import Spacer from '~/components/Spacer' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' @@ -15,6 +16,7 @@ import { type Safe } from '~/routes/safe/store/models/safe' import { safesListSelector } from '~/routes/safeList/store/selectors' import useSidebarStyles from './style' import SafeList from './SafeList' +import { WELCOME_ADDRESS } from '~/routes/routes' const { useState } = React @@ -94,7 +96,15 @@ const Sidebar = ({ children, safes }: SidebarProps) => { - From 699f1f8663897c3932fc55f8bf1afb1383a57c94 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 14:18:22 +0400 Subject: [PATCH 13/35] Default safe WIP --- src/components/Sidebar/SafeList.jsx | 1 + src/logic/wallets/store/reducer/provider.js | 2 +- src/routes/safe/store/reducer/safe.js | 22 ++++++++++----------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index 94fb5bc8..0f8d14bd 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -61,6 +61,7 @@ const SafeList = ({ safes, onSafeClick }: SafeListProps) => { {' '} ETH + PIZDOS)) diff --git a/src/logic/wallets/store/reducer/provider.js b/src/logic/wallets/store/reducer/provider.js index 23f719e5..9b494ba3 100644 --- a/src/logic/wallets/store/reducer/provider.js +++ b/src/logic/wallets/store/reducer/provider.js @@ -7,7 +7,7 @@ export const PROVIDER_REDUCER_ID = 'providers' export type State = Provider -export default handleActions( +export default handleActions( { [ADD_PROVIDER]: (state: State, { payload }: ActionType) => makeProvider(payload), }, diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index 088ff9a6..bc942637 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -24,7 +24,7 @@ export const buildSafe = (storedSafe: SafeProps) => { const addresses = storedSafe.owners.map((owner: OwnerProps) => owner.address) const owners = buildOwnersFrom(Array.from(names), Array.from(addresses)) const activeTokens = List(storedSafe.activeTokens) - const balances = storedSafe.balances.map(balance => TokenBalance(balance)) + const balances = storedSafe.balances.map((balance) => TokenBalance(balance)) const safe: SafeProps = { ...storedSafe, @@ -67,7 +67,7 @@ export default handleActions( const safe = action.payload const safeAddress = safe.address - return state.update(safeAddress, prevSafe => prevSafe.merge(safe)) + return state.update(safeAddress, (prevSafe) => prevSafe.merge(safe)) }, [ACTIVATE_TOKEN_FOR_ALL_SAFES]: (state: State, action: ActionType): State => { const tokenAddress = action.payload @@ -77,7 +77,7 @@ export default handleActions( const safeActiveTokens = map.getIn([safeAddress, 'activeTokens']) const activeTokens = safeActiveTokens.push(tokenAddress) - map.update(safeAddress, prevSafe => prevSafe.merge({ activeTokens })) + map.update(safeAddress, (prevSafe) => prevSafe.merge({ activeTokens })) }) }) @@ -91,7 +91,7 @@ export default handleActions( // with initial props and it would overwrite existing ones if (state.has(safe.address)) { - return state.update(safe.address, prevSafe => prevSafe.merge(safe)) + return state.update(safe.address, (prevSafe) => prevSafe.merge(safe)) } return state.set(safe.address, SafeRecord(safe)) @@ -104,15 +104,15 @@ export default handleActions( [ADD_SAFE_OWNER]: (state: State, action: ActionType): State => { const { safeAddress, ownerName, ownerAddress } = action.payload - return state.update(safeAddress, prevSafe => prevSafe.merge({ + return state.update(safeAddress, (prevSafe) => prevSafe.merge({ owners: prevSafe.owners.push(makeOwner({ address: ownerAddress, name: ownerName })), })) }, [REMOVE_SAFE_OWNER]: (state: State, action: ActionType): State => { const { safeAddress, ownerAddress } = action.payload - return state.update(safeAddress, prevSafe => prevSafe.merge({ - owners: prevSafe.owners.filter(o => o.address.toLowerCase() !== ownerAddress.toLowerCase()), + return state.update(safeAddress, (prevSafe) => prevSafe.merge({ + owners: prevSafe.owners.filter((o) => o.address.toLowerCase() !== ownerAddress.toLowerCase()), })) }, [REPLACE_SAFE_OWNER]: (state: State, action: ActionType): State => { @@ -120,9 +120,9 @@ export default handleActions( safeAddress, oldOwnerAddress, ownerName, ownerAddress, } = action.payload - return state.update(safeAddress, prevSafe => prevSafe.merge({ + return state.update(safeAddress, (prevSafe) => prevSafe.merge({ owners: prevSafe.owners - .filter(o => o.address.toLowerCase() !== oldOwnerAddress.toLowerCase()) + .filter((o) => o.address.toLowerCase() !== oldOwnerAddress.toLowerCase()) .push(makeOwner({ address: ownerAddress, name: ownerName })), })) }, @@ -131,9 +131,9 @@ export default handleActions( return state.update(safeAddress, (prevSafe) => { const ownerToUpdateIndex = prevSafe.owners.findIndex( - o => o.address.toLowerCase() === ownerAddress.toLowerCase(), + (o) => o.address.toLowerCase() === ownerAddress.toLowerCase(), ) - const updatedOwners = prevSafe.owners.update(ownerToUpdateIndex, owner => owner.set('name', ownerName)) + const updatedOwners = prevSafe.owners.update(ownerToUpdateIndex, (owner) => owner.set('name', ownerName)) return prevSafe.merge({ owners: updatedOwners }) }) }, From 138f4620217673e7077450c6c8a3d6b848384afb Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 17:08:16 +0400 Subject: [PATCH 14/35] Add setDefaultSafe action --- src/components/Sidebar/SafeList.jsx | 2 +- .../safe/store/actions/setDefaultSafe.js | 8 ++++ src/routes/safe/store/reducer/safe.js | 46 +++++++++++-------- src/routes/safeList/store/selectors/index.js | 2 +- 4 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/routes/safe/store/actions/setDefaultSafe.js diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index 0f8d14bd..74dafe98 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -61,7 +61,7 @@ const SafeList = ({ safes, onSafeClick }: SafeListProps) => { {' '} ETH - PIZDOS)) + Make default diff --git a/src/routes/safe/store/actions/setDefaultSafe.js b/src/routes/safe/store/actions/setDefaultSafe.js new file mode 100644 index 00000000..6987a0eb --- /dev/null +++ b/src/routes/safe/store/actions/setDefaultSafe.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const SET_DEFAULT_SAFE = 'SET_DEFAULT_SAFE' + +const setDefaultSafe = createAction(SET_DEFAULT_SAFE) + +export default setDefaultSafe diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index bc942637..e0a355b6 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -14,10 +14,11 @@ import { ADD_SAFE_OWNER } from '~/routes/safe/store/actions/addSafeOwner' import { REMOVE_SAFE_OWNER } from '~/routes/safe/store/actions/removeSafeOwner' import { REPLACE_SAFE_OWNER } from '~/routes/safe/store/actions/replaceSafeOwner' import { EDIT_SAFE_OWNER } from '~/routes/safe/store/actions/editSafeOwner' +import { SET_DEFAULT_SAFE } from '~/routes/safe/store/actions/setDefaultSafe' export const SAFE_REDUCER_ID = 'safes' -export type State = Map +type SafeReducerState = Map export const buildSafe = (storedSafe: SafeProps) => { const names = storedSafe.owners.map((owner: OwnerProps) => owner.name) @@ -61,15 +62,15 @@ export const safesInitialState = async (): Promise => { return safes } -export default handleActions( +export default handleActions( { - [UPDATE_SAFE]: (state: State, action: ActionType): State => { + [UPDATE_SAFE]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const safe = action.payload const safeAddress = safe.address - return state.update(safeAddress, (prevSafe) => prevSafe.merge(safe)) + return state.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge(safe)) }, - [ACTIVATE_TOKEN_FOR_ALL_SAFES]: (state: State, action: ActionType): State => { + [ACTIVATE_TOKEN_FOR_ALL_SAFES]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const tokenAddress = action.payload const newState = state.withMutations((map) => { @@ -77,13 +78,13 @@ export default handleActions( const safeActiveTokens = map.getIn([safeAddress, 'activeTokens']) const activeTokens = safeActiveTokens.push(tokenAddress) - map.update(safeAddress, (prevSafe) => prevSafe.merge({ activeTokens })) + map.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ activeTokens })) }) }) return newState }, - [ADD_SAFE]: (state: State, action: ActionType): State => { + [ADD_SAFE]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const { safe }: { safe: SafeProps } = action.payload // if you add a new safe it needs to be set as a record @@ -91,45 +92,45 @@ export default handleActions( // with initial props and it would overwrite existing ones if (state.has(safe.address)) { - return state.update(safe.address, (prevSafe) => prevSafe.merge(safe)) + return state.updateIn(['safes', safe.address], (prevSafe) => prevSafe.merge(safe)) } - return state.set(safe.address, SafeRecord(safe)) + return state.setIn(['safes', safe.address], SafeRecord(safe)) }, - [REMOVE_SAFE]: (state: State, action: ActionType): State => { + [REMOVE_SAFE]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const safeAddress = action.payload - return state.delete(safeAddress) + return state.deleteIn(['safes', safeAddress]) }, - [ADD_SAFE_OWNER]: (state: State, action: ActionType): State => { + [ADD_SAFE_OWNER]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const { safeAddress, ownerName, ownerAddress } = action.payload - return state.update(safeAddress, (prevSafe) => prevSafe.merge({ + return state.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ owners: prevSafe.owners.push(makeOwner({ address: ownerAddress, name: ownerName })), })) }, - [REMOVE_SAFE_OWNER]: (state: State, action: ActionType): State => { + [REMOVE_SAFE_OWNER]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const { safeAddress, ownerAddress } = action.payload - return state.update(safeAddress, (prevSafe) => prevSafe.merge({ + return state.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ owners: prevSafe.owners.filter((o) => o.address.toLowerCase() !== ownerAddress.toLowerCase()), })) }, - [REPLACE_SAFE_OWNER]: (state: State, action: ActionType): State => { + [REPLACE_SAFE_OWNER]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const { safeAddress, oldOwnerAddress, ownerName, ownerAddress, } = action.payload - return state.update(safeAddress, (prevSafe) => prevSafe.merge({ + return state.updateIn(['safes', safeAddress], (prevSafe) => prevSafe.merge({ owners: prevSafe.owners .filter((o) => o.address.toLowerCase() !== oldOwnerAddress.toLowerCase()) .push(makeOwner({ address: ownerAddress, name: ownerName })), })) }, - [EDIT_SAFE_OWNER]: (state: State, action: ActionType): State => { + [EDIT_SAFE_OWNER]: (state: SafeReducerState, action: ActionType): SafeReducerState => { const { safeAddress, ownerAddress, ownerName } = action.payload - return state.update(safeAddress, (prevSafe) => { + return state.updateIn(['safes', safeAddress], (prevSafe) => { const ownerToUpdateIndex = prevSafe.owners.findIndex( (o) => o.address.toLowerCase() === ownerAddress.toLowerCase(), ) @@ -137,6 +138,11 @@ export default handleActions( return prevSafe.merge({ owners: updatedOwners }) }) }, + [SET_DEFAULT_SAFE]: (state: SafeReducerState, action: ActionType): SafeReducerState => state.set('defaultSafe', action.payload), }, - Map(), + Map({ + // $FlowFixMe + defaultSafe: '', + safes: Map(), + }), ) diff --git a/src/routes/safeList/store/selectors/index.js b/src/routes/safeList/store/selectors/index.js index 1f2978fe..4b7960d3 100644 --- a/src/routes/safeList/store/selectors/index.js +++ b/src/routes/safeList/store/selectors/index.js @@ -5,7 +5,7 @@ import { type GlobalState } from '~/store/index' import { type Safe } from '~/routes/safe/store/models/safe' import { SAFE_REDUCER_ID } from '~/routes/safe/store/reducer/safe' -export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID] +export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID].get('safes') export const safesListSelector: Selector> = createSelector( safesMapSelector, From a699012a52dc9e09d721067468fed2fa087ef42b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 17:51:38 +0400 Subject: [PATCH 15/35] setDefaultSafe action --- src/components/Sidebar/SafeList.jsx | 15 ++++++++++++--- src/components/Sidebar/index.jsx | 8 +++++--- src/routes/safeList/store/selectors/index.js | 7 +++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList.jsx index 74dafe98..8d78e650 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList.jsx @@ -9,6 +9,7 @@ import ListItemText from '@material-ui/core/ListItemText' import Link from '~/components/layout/Link' import Hairline from '~/components/layout/Hairline' import Paragraph from '~/components/layout/Paragraph' +import ButtonLink from '~/components/layout/ButtonLink' import Identicon from '~/components/Identicon' import { mediumFontSize, sm, secondary, primary, @@ -20,6 +21,7 @@ import { SAFELIST_ADDRESS } from '~/routes/routes' type SafeListProps = { safes: List, onSafeClick: Function, + setDefaultSafe: Function, } const useStyles = makeStyles({ @@ -39,7 +41,7 @@ const useStyles = makeStyles({ }, }) -const SafeList = ({ safes, onSafeClick }: SafeListProps) => { +const SafeList = ({ safes, onSafeClick, setDefaultSafe }: SafeListProps) => { const classes = useStyles() return ( @@ -59,9 +61,16 @@ const SafeList = ({ safes, onSafeClick }: SafeListProps) => { {safe.ethBalance} {' '} - ETH +ETH - Make default + { + setDefaultSafe(safe.address) + }} + > + Make default + diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 004f6677..c70a7de0 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -14,6 +14,7 @@ import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' import { safesListSelector } from '~/routes/safeList/store/selectors' +import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' import useSidebarStyles from './style' import SafeList from './SafeList' import { WELCOME_ADDRESS } from '~/routes/routes' @@ -33,6 +34,7 @@ export const SidebarContext = React.createContext({ type SidebarProps = { children: React.Node, safes: List, + setDefaultSafeAction: Function, } const filterBy = (filter: string, safes: List): List => safes.filter( @@ -41,7 +43,7 @@ const filterBy = (filter: string, safes: List): List => safes.filter || safe.name.toLowerCase().includes(filter.toLowerCase()), ) -const Sidebar = ({ children, safes }: SidebarProps) => { +const Sidebar = ({ children, safes, setDefaultSafeAction }: SidebarProps) => { const [isOpen, setIsOpen] = useState(false) const [filter, setFilter] = useState('') const classes = useSidebarStyles() @@ -110,7 +112,7 @@ const Sidebar = ({ children, safes }: SidebarProps) => { - + {children} @@ -121,5 +123,5 @@ const Sidebar = ({ children, safes }: SidebarProps) => { export default connect( // $FlowFixMe (state) => ({ safes: safesListSelector(state) }), - null, + { setDefaultSafeAction: setDefaultSafe }, )(Sidebar) diff --git a/src/routes/safeList/store/selectors/index.js b/src/routes/safeList/store/selectors/index.js index 4b7960d3..f37f0afa 100644 --- a/src/routes/safeList/store/selectors/index.js +++ b/src/routes/safeList/store/selectors/index.js @@ -5,6 +5,8 @@ import { type GlobalState } from '~/store/index' import { type Safe } from '~/routes/safe/store/models/safe' import { SAFE_REDUCER_ID } from '~/routes/safe/store/reducer/safe' +const safesStateSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID] + export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID].get('safes') export const safesListSelector: Selector> = createSelector( @@ -16,3 +18,8 @@ export const safesCountSelector: Selector = createSelec safesMapSelector, (safes: Map): number => safes.size, ) + +export const defaultSafeSelector: Selector = createSelector( + safesStateSelector, + (safeState: Map): string => safeState.get('defaultSafe'), +) From 579e9dca6cbf3d8c770eabef0740ba21261fe4a3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 18 Sep 2019 18:40:53 +0400 Subject: [PATCH 16/35] default badges --- .../Sidebar/SafeList/DefaultBadge.jsx | 36 +++++++++++++++++++ .../Sidebar/SafeList/assets/star.svg | 3 ++ .../{SafeList.jsx => SafeList/index.jsx} | 36 +++++++++++++------ src/components/Sidebar/index.jsx | 16 ++++++--- 4 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 src/components/Sidebar/SafeList/DefaultBadge.jsx create mode 100644 src/components/Sidebar/SafeList/assets/star.svg rename src/components/Sidebar/{SafeList.jsx => SafeList/index.jsx} (72%) diff --git a/src/components/Sidebar/SafeList/DefaultBadge.jsx b/src/components/Sidebar/SafeList/DefaultBadge.jsx new file mode 100644 index 00000000..467b605d --- /dev/null +++ b/src/components/Sidebar/SafeList/DefaultBadge.jsx @@ -0,0 +1,36 @@ +// @flow +import * as React from 'react' +import { makeStyles } from '@material-ui/core/styles' +import Img from '~/components/layout/Img' +import Block from '~/components/layout/Block' +import Paragraph from '~/components/layout/Paragraph' +import { primary, sm } from '~/theme/variables' +import StarIcon from './assets/star.svg' + +const useStyles = makeStyles({ + container: { + background: primary, + padding: '5px', + boxSizing: 'border-box', + width: '73px', + justifyContent: 'space-around', + marginLeft: sm, + color: '#fff', + borderRadius: '3px', + }, +}) + +const DefaultBadge = () => { + const classes = useStyles() + + return ( + + Star Icon + + default + + + ) +} + +export default DefaultBadge diff --git a/src/components/Sidebar/SafeList/assets/star.svg b/src/components/Sidebar/SafeList/assets/star.svg new file mode 100644 index 00000000..3cf6bbd0 --- /dev/null +++ b/src/components/Sidebar/SafeList/assets/star.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Sidebar/SafeList.jsx b/src/components/Sidebar/SafeList/index.jsx similarity index 72% rename from src/components/Sidebar/SafeList.jsx rename to src/components/Sidebar/SafeList/index.jsx index 8d78e650..147c0330 100644 --- a/src/components/Sidebar/SafeList.jsx +++ b/src/components/Sidebar/SafeList/index.jsx @@ -14,14 +14,16 @@ import Identicon from '~/components/Identicon' import { mediumFontSize, sm, secondary, primary, } from '~/theme/variables' -import { shortVersionOf } from '~/logic/wallets/ethAddresses' +import { shortVersionOf, sameAddress } from '~/logic/wallets/ethAddresses' import { type Safe } from '~/routes/safe/store/models/safe' import { SAFELIST_ADDRESS } from '~/routes/routes' +import DefaultBadge from './DefaultBadge' type SafeListProps = { safes: List, onSafeClick: Function, setDefaultSafe: Function, + defaultSafe: string, } const useStyles = makeStyles({ @@ -39,9 +41,15 @@ const useStyles = makeStyles({ color: primary, fontSize: mediumFontSize, }, + makeDefaultBtn: { + padding: 0, + marginLeft: sm, + }, }) -const SafeList = ({ safes, onSafeClick, setDefaultSafe }: SafeListProps) => { +const SafeList = ({ + safes, onSafeClick, setDefaultSafe, defaultSafe, +}: SafeListProps) => { const classes = useStyles() return ( @@ -63,14 +71,22 @@ const SafeList = ({ safes, onSafeClick, setDefaultSafe }: SafeListProps) => { {' '} ETH - { - setDefaultSafe(safe.address) - }} - > - Make default - + {sameAddress(defaultSafe, safe.address) ? ( + + ) : ( + { + e.preventDefault() + e.stopPropagation() + + setDefaultSafe(safe.address) + }} + > + Make default + + )} diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index c70a7de0..61d617ce 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -13,7 +13,7 @@ import Spacer from '~/components/Spacer' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' -import { safesListSelector } from '~/routes/safeList/store/selectors' +import { safesListSelector, defaultSafeSelector } from '~/routes/safeList/store/selectors' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' import useSidebarStyles from './style' import SafeList from './SafeList' @@ -35,6 +35,7 @@ type SidebarProps = { children: React.Node, safes: List, setDefaultSafeAction: Function, + defaultSafe: string, } const filterBy = (filter: string, safes: List): List => safes.filter( @@ -43,7 +44,9 @@ const filterBy = (filter: string, safes: List): List => safes.filter || safe.name.toLowerCase().includes(filter.toLowerCase()), ) -const Sidebar = ({ children, safes, setDefaultSafeAction }: SidebarProps) => { +const Sidebar = ({ + children, safes, setDefaultSafeAction, defaultSafe, +}: SidebarProps) => { const [isOpen, setIsOpen] = useState(false) const [filter, setFilter] = useState('') const classes = useSidebarStyles() @@ -112,7 +115,12 @@ const Sidebar = ({ children, safes, setDefaultSafeAction }: SidebarProps) => { - + {children} @@ -122,6 +130,6 @@ const Sidebar = ({ children, safes, setDefaultSafeAction }: SidebarProps) => { export default connect( // $FlowFixMe - (state) => ({ safes: safesListSelector(state) }), + (state) => ({ safes: safesListSelector(state), defaultSafe: defaultSafeSelector(state) }), { setDefaultSafeAction: setDefaultSafe }, )(Sidebar) From b3840b17b2ecabdcaef9ed6d5ab02a2e0d2ba3b3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 11:22:09 +0400 Subject: [PATCH 17/35] show 'make default' button on safe hover in safe list sidebar, dep bump --- package.json | 16 +- src/components/Sidebar/SafeList/index.jsx | 7 + yarn.lock | 362 ++++++++++++---------- 3 files changed, 210 insertions(+), 175 deletions(-) diff --git a/package.json b/package.json index 0e164dc7..02ce4d01 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ ], "dependencies": { "@gnosis.pm/safe-contracts": "^1.0.0", - "@gnosis.pm/util-contracts": "2.0.1", + "@gnosis.pm/util-contracts": "2.0.2", "@material-ui/core": "4.4.2", "@material-ui/icons": "4.4.1", "@testing-library/jest-dom": "4.1.0", - "@welldone-software/why-did-you-render": "3.3.4", + "@welldone-software/why-did-you-render": "3.3.5", "axios": "0.19.0", "bignumber.js": "9.0.0", "connected-react-router": "6.5.2", @@ -89,10 +89,10 @@ "@babel/preset-flow": "^7.0.0-beta.40", "@babel/preset-react": "^7.0.0-beta.40", "@sambego/storybook-state": "^1.0.7", - "@storybook/addon-actions": "5.2.0", - "@storybook/addon-knobs": "5.2.0", - "@storybook/addon-links": "5.2.0", - "@storybook/react": "5.2.0", + "@storybook/addon-actions": "5.2.1", + "@storybook/addon-knobs": "5.2.1", + "@storybook/addon-links": "5.2.1", + "@storybook/react": "5.2.1", "@testing-library/react": "9.1.4", "autoprefixer": "9.6.1", "babel-core": "^7.0.0-bridge.0", @@ -139,8 +139,8 @@ "url-loader": "^2.1.0", "webpack": "4.40.2", "webpack-bundle-analyzer": "3.5.0", - "webpack-cli": "3.3.8", - "webpack-dev-server": "3.8.0", + "webpack-cli": "3.3.9", + "webpack-dev-server": "3.8.1", "webpack-manifest-plugin": "^2.0.0-rc.2" } } diff --git a/src/components/Sidebar/SafeList/index.jsx b/src/components/Sidebar/SafeList/index.jsx index 147c0330..81816ccc 100644 --- a/src/components/Sidebar/SafeList/index.jsx +++ b/src/components/Sidebar/SafeList/index.jsx @@ -33,6 +33,12 @@ const useStyles = makeStyles({ listItemRoot: { paddingTop: 0, paddingBottom: 0, + '&:hover $makeDefaultBtn': { + visibility: 'initial' + }, + '&:focus $makeDefaultBtn': { + visibility: 'initial' + } }, safeName: { color: secondary, @@ -44,6 +50,7 @@ const useStyles = makeStyles({ makeDefaultBtn: { padding: 0, marginLeft: sm, + visibility: 'hidden', }, }) diff --git a/yarn.lock b/yarn.lock index c404cfac..eaade6fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1522,10 +1522,10 @@ solc "^0.5.0" truffle-hdwallet-provider "0.0.7-beta.1" -"@gnosis.pm/util-contracts@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@gnosis.pm/util-contracts/-/util-contracts-2.0.1.tgz#20ba5dcfaf4a7456ad22c720f8c9b464b85e8b59" - integrity sha512-Z1R15atpbTr/+ac4o9qW3kbNHSPnCaWsPxn62xsr9aRAjif1qbGkT8jFghBYtEN14lmJXOw0vfMsNj2UDOHrTA== +"@gnosis.pm/util-contracts@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@gnosis.pm/util-contracts/-/util-contracts-2.0.2.tgz#a85c0f673b03666cc81ea3e85ba66550799bae7b" + integrity sha512-DlKWeOEJbYNkZQBtliqoIxY4DcrtUrfB1/JiZV15vUXsYTnPatGwOG+V3K3J5kqnebpOmIPvRp2AkLSlTaKOhQ== "@icons/material@^0.2.4": version "0.2.4" @@ -1880,17 +1880,17 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@storybook/addon-actions@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.2.0.tgz#ef06ccab8ef3de5ffcae848ad2c1da40fbc2a464" - integrity sha512-FBpUhrOh4bINnpsVRTXrOCWM6J9GwN54jjiMKWZtAUrbjX6HLpdLH8/ETHjQGqGs7v8OPEQPRpLiNICyKMw1Dg== +"@storybook/addon-actions@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.2.1.tgz#2096e7f938b289be48af6f0adfd620997e7a420c" + integrity sha512-tu4LGeRGAq+sLlsRPE1PzGyYU9JyM3HMLXnOCh5dvRSS8wnoDw1zQ55LPOXH6aoJGdsrvktiw+uTVf4OyN7ryg== dependencies: - "@storybook/addons" "5.2.0" - "@storybook/api" "5.2.0" - "@storybook/client-api" "5.2.0" - "@storybook/components" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/theming" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/api" "5.2.1" + "@storybook/client-api" "5.2.1" + "@storybook/components" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/theming" "5.2.1" core-js "^3.0.1" fast-deep-equal "^2.0.1" global "^4.3.2" @@ -1916,17 +1916,17 @@ react-inspector "^2.2.2" uuid "^3.2.1" -"@storybook/addon-knobs@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-5.2.0.tgz#976d3ede32b81548444aa3cc0adc7265ebefae94" - integrity sha512-FYU7geG9xZptW4qWRO9Tzzl8OZIh6/m+TZSy6FpFQCJDKY/bKA6Lww5FH1rFE9nyZwFpIO+cBs2kZTqVC/XxRA== +"@storybook/addon-knobs@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-5.2.1.tgz#6bc2f7e254ccce09d6f5136e9cce63cd808c9853" + integrity sha512-JCSqrGYyVVBNkudhvla7qc9m0/Mn1UMaMzIxH5kewEE1KWZcCkdXD5hDASN39pkn3mX1yyqveP8jiyIL9vVBLg== dependencies: - "@storybook/addons" "5.2.0" - "@storybook/api" "5.2.0" - "@storybook/client-api" "5.2.0" - "@storybook/components" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/theming" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/api" "5.2.1" + "@storybook/client-api" "5.2.1" + "@storybook/components" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/theming" "5.2.1" copy-to-clipboard "^3.0.8" core-js "^3.0.1" escape-html "^1.0.3" @@ -1939,29 +1939,29 @@ react-lifecycles-compat "^3.0.4" react-select "^3.0.0" -"@storybook/addon-links@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.2.0.tgz#0e747319e0e48f1082cbd7ccee32d4c7ad4aa02a" - integrity sha512-eWq9XLmu4Nssd6Lkb1gndOo2frGf6bRK1RGRL8SP7RRced9jARY9UvkipRA9/UTWFttraDMHeDIzxt4eqK7qEQ== +"@storybook/addon-links@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-5.2.1.tgz#ec1fc92ed4d840ba758f40167c752f48562a906f" + integrity sha512-N5f+lzai+ctHfzHoYWECYsg3lKGJuqhkVctro46fHSW7s/GB8+l78nDcV7hDjNEXDES8QN5C1fPYihatdgpSJA== dependencies: - "@storybook/addons" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/router" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/router" "5.2.1" common-tags "^1.8.0" core-js "^3.0.1" global "^4.3.2" prop-types "^15.7.2" qs "^6.6.0" -"@storybook/addons@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.2.0.tgz#a4ba7f85774e426f384e8aa3eddb48b31234d5e2" - integrity sha512-hwcY6xE0tbCxR1KjOgG72JCD7yBTx8AIuVf/V8dctGqUZE2bUyLYX+41UqgnyfABo+r5e/HBb0qkGZXbmzGt3g== +"@storybook/addons@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.2.1.tgz#6e52aa1fa2737e170fb675eb1fcceebd0a915a0b" + integrity sha512-kdx97tTKsMf/lBlT40uLYsHMF1J71mn2j41RNaCXmWw/PrKCDmiNfinemN2wtbwRSvGqb3q/BAqjKLvUtWynGg== dependencies: - "@storybook/api" "5.2.0" - "@storybook/channels" "5.2.0" - "@storybook/client-logger" "5.2.0" - "@storybook/core-events" "5.2.0" + "@storybook/api" "5.2.1" + "@storybook/channels" "5.2.1" + "@storybook/client-logger" "5.2.1" + "@storybook/core-events" "5.2.1" core-js "^3.0.1" global "^4.3.2" util-deprecate "^1.0.2" @@ -2001,16 +2001,16 @@ telejson "^2.2.1" util-deprecate "^1.0.2" -"@storybook/api@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.2.0.tgz#38d6d3fdb3b82fe52c4e6458d586b3e16c60265a" - integrity sha512-YrVZdvCkx1EAqYIbBQ5o51j5+U5vUiJ6iKh8+tUp0wWvFQhqm5vS43i37YL80mReKkLrrNegF6Ltlyv/CjvYTg== +"@storybook/api@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.2.1.tgz#b9cd6639019e044a8ade6fb358cade79c0e3b5d3" + integrity sha512-EXN6sqkGHRuNq0W6BZXOlxe2I2dmN0yUdQLiUOpzH2I3mXnVHpad/0v76dRc9fZbC4LaYUSxR8lBTr0rqIb4mA== dependencies: - "@storybook/channels" "5.2.0" - "@storybook/client-logger" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/router" "5.2.0" - "@storybook/theming" "5.2.0" + "@storybook/channels" "5.2.1" + "@storybook/client-logger" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/router" "5.2.1" + "@storybook/theming" "5.2.1" core-js "^3.0.1" fast-deep-equal "^2.0.1" global "^4.3.2" @@ -2024,13 +2024,13 @@ telejson "^2.2.2" util-deprecate "^1.0.2" -"@storybook/channel-postmessage@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.2.0.tgz#5e9e099c0f4f180c5099424a2686258e2c60a086" - integrity sha512-2D2ZMKKe4JocYMZgedkZdO5T2+NQLUn+47EEeKhAI1ikjy1lBHFzks1YtQQJ/sRt2ATZu/FO7+3YSUA+xSrTRA== +"@storybook/channel-postmessage@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-5.2.1.tgz#85541f926d61eedbe2a687bb394d37fc06252751" + integrity sha512-gmnn9qU1iLCpfF6bZuEM3QQOZsAviWeIpiezjrd/qkxatgr3qtbXd4EoZpcVuQw314etarWtNxVpcX6PXcASjQ== dependencies: - "@storybook/channels" "5.2.0" - "@storybook/client-logger" "5.2.0" + "@storybook/channels" "5.2.1" + "@storybook/client-logger" "5.2.1" core-js "^3.0.1" global "^4.3.2" telejson "^2.2.2" @@ -2042,24 +2042,24 @@ dependencies: core-js "^3.0.1" -"@storybook/channels@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.2.0.tgz#114bb69193a05ee225959e9f6d15dc6212ef900d" - integrity sha512-1xEBgGdr1mC1AEBFozG6VLUO78JXxyxlDpcJYfw/B8TzO+Ln8ztTjJgvCY+lsBrWiWvgoT9aGJCeotQ4k28oaA== +"@storybook/channels@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.2.1.tgz#e5e35f6d9fb1b1fba4f18b171f31d5f6540f3bef" + integrity sha512-AsF/Hwx91SDOgiOGOBSWS8EJAgqVm939n2nkfdLSJQQmX5EdPRAc3EIE3f13tyQub2yNx0OR4UzQDWgjwfVsEQ== dependencies: core-js "^3.0.1" -"@storybook/client-api@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.2.0.tgz#3f21fa5a260e50b11d115745d65ef11d7ff0f7bf" - integrity sha512-s9hTV9vHYeF6Fg3R4zTNNYcGEjX4iPSBtFjse/Bk1HaH6WbjsA6bY1NPO1i2CBzRngHzX+4yXFx3hGLVt/X1rg== +"@storybook/client-api@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-5.2.1.tgz#bdd335187279a4ab45e20d6d5e9131e5f7098acf" + integrity sha512-VxexqxrbORCGqwx2j0/91Eu1A/vq+rSVIesWwzIowmoLfBwRwDdskO20Yn9U7iMSpux4RvHGF6y1Q1ZtnXm9aA== dependencies: - "@storybook/addons" "5.2.0" - "@storybook/channel-postmessage" "5.2.0" - "@storybook/channels" "5.2.0" - "@storybook/client-logger" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/router" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/channel-postmessage" "5.2.1" + "@storybook/channels" "5.2.1" + "@storybook/client-logger" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/router" "5.2.1" common-tags "^1.8.0" core-js "^3.0.1" eventemitter3 "^4.0.0" @@ -2077,10 +2077,10 @@ dependencies: core-js "^3.0.1" -"@storybook/client-logger@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.0.tgz#68325c3abd7465c9a30e70dc8128e0c666889482" - integrity sha512-rjDiIT8awjLcOtf7n7Il2KPpYDrmGnP6iGRtVPRDBWghtaDNUVbwNNTRzbJDFGlDY41eUBiQkeemJZP6v9PCEA== +"@storybook/client-logger@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.2.1.tgz#5c1f122b65386f04a6ad648808dfa89f2d852d7a" + integrity sha512-wzxSE9t3DaLCdd/gnGFnjevmYRZ92F3TEwhUP/QDXM9cZkNsRKHkjE61qjiO5aQPaZQG6Ea9ayWEQEMgZXDucg== dependencies: core-js "^3.0.1" @@ -2093,13 +2093,13 @@ glamorous "^4.12.1" prop-types "^15.6.1" -"@storybook/components@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.2.0.tgz#87dfc795630db008bcd3f6ee87a0301ac326c1a5" - integrity sha512-JxynjvNEIuyOdIBLsLsslGHifx4BmdPqqjhCdejnzSNBUT+9MUAcXOCFiQ7L3UsSLruZVy7EjZRV7nM7XQHP2A== +"@storybook/components@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.2.1.tgz#a4519c5d435c2c25c481e2b64a768e1e568a223f" + integrity sha512-cik5J/mTm1b1TOI17qM+2Mikk3rjb3SbBD4WlNz3Zvn+Hw0ukgbx6kQwVBgujhMlDtsHreidyEgIg4TM13S0Tg== dependencies: - "@storybook/client-logger" "5.2.0" - "@storybook/theming" "5.2.0" + "@storybook/client-logger" "5.2.1" + "@storybook/theming" "5.2.1" "@types/react-syntax-highlighter" "10.1.0" core-js "^3.0.1" global "^4.3.2" @@ -2124,32 +2124,32 @@ dependencies: core-js "^3.0.1" -"@storybook/core-events@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.2.0.tgz#3a8dba0c70e935bc4ad9ceca86365a8930497d95" - integrity sha512-OQ2TwvHYab2Lojdh/Z3tiytyPDsDo9bKfyGh3V/jQLKg3jqKXdeRWdmJn9U4o18t/8Fm58bBqT8Ehp7UskBa/g== +"@storybook/core-events@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.2.1.tgz#bc28d704938d26dd544d0362d38ef08e8cfed916" + integrity sha512-AIYV/I+baQ0KxvEM7QAKqUedLn2os0XU9HTdtfZJTC3U9wjmR2ah2ScD6T0n7PBz3MderkvZG6dNjs9h8gRquQ== dependencies: core-js "^3.0.1" -"@storybook/core@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.2.0.tgz#fe3b375eee2775618a3672294960555fa3eb51ca" - integrity sha512-koAa9F3Xc/cbyFSVKRc1C77JC7pAscyhxe1cqbIuLMzmG1JV6aCHYltuXEzKAHuXF2YjF5o91cQ/1fUGrCxnZA== +"@storybook/core@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-5.2.1.tgz#3aa17c6fa9b02704723501d32884453869e3c06c" + integrity sha512-mGGvN3GWeLxZ9lYZ4IuD1IoJD+cn6XXm2Arzw+k6KEtJJDFrC5SjESTDGLVFienX5s2tgH4FjYb9Ps9sKfhHlg== dependencies: "@babel/plugin-proposal-class-properties" "^7.3.3" "@babel/plugin-proposal-object-rest-spread" "^7.3.2" "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/plugin-transform-react-constant-elements" "^7.2.0" "@babel/preset-env" "^7.4.5" - "@storybook/addons" "5.2.0" - "@storybook/channel-postmessage" "5.2.0" - "@storybook/client-api" "5.2.0" - "@storybook/client-logger" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/node-logger" "5.2.0" - "@storybook/router" "5.2.0" - "@storybook/theming" "5.2.0" - "@storybook/ui" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/channel-postmessage" "5.2.1" + "@storybook/client-api" "5.2.1" + "@storybook/client-logger" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/node-logger" "5.2.1" + "@storybook/router" "5.2.1" + "@storybook/theming" "5.2.1" + "@storybook/ui" "5.2.1" airbnb-js-shims "^1 || ^2" ansi-to-html "^0.6.11" autoprefixer "^9.4.9" @@ -2205,10 +2205,10 @@ webpack-dev-middleware "^3.7.0" webpack-hot-middleware "^2.25.0" -"@storybook/node-logger@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.0.tgz#68a39a271dd442563206a7f07249f66947094b2f" - integrity sha512-IuR6oa+oayEdqdl01Sh+Tsf+KV4wsfSHYa3OazYnMnmXJvBVwUP4RTywVapj+ylugltRVPlDEHQw0d1TFRbQrQ== +"@storybook/node-logger@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.1.tgz#00d8c0dc9dfd482e7d1d244a59c46726c6b761d9" + integrity sha512-rz+snXZyKwTegKEf15w4uaFWIKpgaWzTw+Ar8mxa+mX7C2DP65TOc+JGYZ7lsXdred+0WP0DhnmhGu2cX8z3lA== dependencies: chalk "^2.4.2" core-js "^3.0.1" @@ -2216,17 +2216,17 @@ pretty-hrtime "^1.0.3" regenerator-runtime "^0.12.1" -"@storybook/react@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.2.0.tgz#5e6a7cb7a4f41bedec03aa65fda8c97759efac9f" - integrity sha512-fkCQGUABo4C3DBcGe9mwpOV0V8h2ZbnuCgbEMuHTxw9jds/B2/FQ4ax4N9bw1PiiB7z7c9lnMo8pfhK06RzmqA== +"@storybook/react@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-5.2.1.tgz#860970fa8f0d49967862b496af4ef3712f0b96dd" + integrity sha512-brUG8iK2+1Fk5VFZWpAoSokCx21MaPX1zSAVA+Z/Ia0I0sFfurhpQgAGlVePTy9r7dtEEEdniZVtJOH/tHqk4Q== dependencies: "@babel/plugin-transform-react-constant-elements" "^7.2.0" "@babel/preset-flow" "^7.0.0" "@babel/preset-react" "^7.0.0" - "@storybook/addons" "5.2.0" - "@storybook/core" "5.2.0" - "@storybook/node-logger" "5.2.0" + "@storybook/addons" "5.2.1" + "@storybook/core" "5.2.1" + "@storybook/node-logger" "5.2.1" "@svgr/webpack" "^4.0.3" babel-plugin-add-react-displayname "^0.0.5" babel-plugin-named-asset-import "^0.3.1" @@ -2254,10 +2254,10 @@ memoizerific "^1.11.3" qs "^6.6.0" -"@storybook/router@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.2.0.tgz#4ce023d9525f2c3dbe7a5eef02e89cf0ec366319" - integrity sha512-OQkdELpoKOUDz5HDqu09w2x3QohIgpGtMExIMGoELXOvPDaHWz2/OQ03E/3u8VoJhEeU+YC0f2v9dalDL0A2ug== +"@storybook/router@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.2.1.tgz#9c49df79343d3be10c7f984858fb5c9ae3eb7491" + integrity sha512-Mlk275cyPoKtnP4DwQ5D8gTfnaRPL6kDZOSn0wbTMa6pQOfYKgJsa7tjzeAtZuZ/j8hKI4gAfT/auMgH6g+94A== dependencies: "@reach/router" "^1.2.1" "@types/reach__router" "^1.2.3" @@ -2285,14 +2285,14 @@ prop-types "^15.7.2" resolve-from "^5.0.0" -"@storybook/theming@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.0.tgz#39122c86eaa17d5bac0f1f814dbb430e74b836aa" - integrity sha512-DPqexBMlrlCr4/kYEYRUzYx3T1Tm5wBPamO2upU8txO4dY33Co1Niiv0P7e2gv4iSH3sdUVLtFrlHxzjzkkSPg== +"@storybook/theming@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.2.1.tgz#913e383632e4702035a107c2cc5e5cb27231b389" + integrity sha512-lbAfcyI7Tx8swduIPmlu/jdWzqTBN/v82IEQbZbPR4LS5OHRPmhXPNgFGrcH4kFAiD0GoezSsdum1x0ZZpsQUQ== dependencies: "@emotion/core" "^10.0.14" "@emotion/styled" "^10.0.14" - "@storybook/client-logger" "5.2.0" + "@storybook/client-logger" "5.2.1" common-tags "^1.8.0" core-js "^3.0.1" deep-object-diff "^1.1.0" @@ -2303,21 +2303,21 @@ prop-types "^15.7.2" resolve-from "^5.0.0" -"@storybook/ui@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.2.0.tgz#6443edbd973fed4d6ec10f45c0a4b49631394983" - integrity sha512-4xMpe8OTBDbwtYy7nEKsuMdrOpXTf3toQm+OXhYJKl6N5kUu0AHt60WtPG0WuhAOHHE1922pZHh2EQJYcIzv+g== +"@storybook/ui@5.2.1": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-5.2.1.tgz#ceba1657a232efd10f839027f8ae274e370c89f6" + integrity sha512-h6Yf1ro/nZcz4nQAU+eSVPxVmpqv7uT7RMb3Vz+VLTY59IEA/sWcoIgA4MIxwf14nVcWOqSmVBJzNKWwc+NGJw== dependencies: - "@storybook/addon-actions" "5.2.0" - "@storybook/addon-knobs" "5.2.0" - "@storybook/addons" "5.2.0" - "@storybook/api" "5.2.0" - "@storybook/channels" "5.2.0" - "@storybook/client-logger" "5.2.0" - "@storybook/components" "5.2.0" - "@storybook/core-events" "5.2.0" - "@storybook/router" "5.2.0" - "@storybook/theming" "5.2.0" + "@storybook/addon-actions" "5.2.1" + "@storybook/addon-knobs" "5.2.1" + "@storybook/addons" "5.2.1" + "@storybook/api" "5.2.1" + "@storybook/channels" "5.2.1" + "@storybook/client-logger" "5.2.1" + "@storybook/components" "5.2.1" + "@storybook/core-events" "5.2.1" + "@storybook/router" "5.2.1" + "@storybook/theming" "5.2.1" copy-to-clipboard "^3.0.8" core-js "^3.0.1" core-js-pure "^3.0.1" @@ -2892,10 +2892,10 @@ "@webassemblyjs/wast-parser" "1.8.5" "@xtuc/long" "4.2.2" -"@welldone-software/why-did-you-render@3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-3.3.4.tgz#fb7282c59625d52d5c4d84fbd560dc36a8881ca9" - integrity sha512-x/0bNE4BTKo5bEdnsU/0SwCI/geoRi7N4FLJeKDu8m3a86ciXUqKT4CJDPy036A9JFvx5mpzNDB9znBedWdfiQ== +"@welldone-software/why-did-you-render@3.3.5": + version "3.3.5" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-3.3.5.tgz#ba301216ebd7b0283e85995357706223186e6afb" + integrity sha512-hn3U5eU7tVEk3A14tRuYHolbBQv6IRmVd/ukNDeyKmC1IbxBck8j8HnFji4ARvw7Z2kJhUwKtXpRI2+gxVolBA== dependencies: lodash "^4" @@ -5396,7 +5396,7 @@ chokidar@^1.6.1: optionalDependencies: fsevents "^1.0.0" -chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4, chokidar@^2.1.6: +chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4: version "2.1.6" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== @@ -10012,10 +10012,10 @@ is-absolute-url@^2.0.0: resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= -is-absolute-url@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.0.tgz#eb21d69df2ed8ef72a3e6f243e216563036a0913" - integrity sha512-3OkP8XrM2Xq4/IxsJnClfMp3OaM3TAatLPLKPeWcxLBTrpe6hihwtX+XZfJTcXg/FTRi4qjy0y/C5qiyNxY24g== +is-absolute-url@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" + integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== is-absolute@^1.0.0: version "1.0.0" @@ -11806,11 +11806,16 @@ loglevel-colored-level-prefix@^1.0.0: chalk "^1.1.3" loglevel "^1.4.1" -loglevel@^1.4.1, loglevel@^1.6.3: +loglevel@^1.4.1: version "1.6.3" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.3.tgz#77f2eb64be55a404c9fd04ad16d57c1d6d6b1280" integrity sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA== +loglevel@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" + integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== + looper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" @@ -12582,10 +12587,10 @@ node-fetch@^2.6.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-forge@0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" - integrity sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ== +node-forge@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" + integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== node-int64@^0.4.0: version "0.4.0" @@ -13582,10 +13587,10 @@ popper.js@^1.14.1, popper.js@^1.14.4, popper.js@^1.14.7: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== -portfinder@^1.0.21: - version "1.0.21" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.21.tgz#60e1397b95ac170749db70034ece306b9a27e324" - integrity sha512-ESabpDCzmBS3ekHbmpAIiESq3udRsCBGiBZLsC+HgBKv2ezb0R4oG+7RnYEVZ/ZCfhel5Tx3UzdNWA0Lox2QCA== +portfinder@^1.0.24: + version "1.0.24" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" + integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== dependencies: async "^1.5.2" debug "^2.2.0" @@ -15866,12 +15871,12 @@ select@^1.1.2: resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selfsigned@^1.10.4: - version "1.10.4" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.4.tgz#cdd7eccfca4ed7635d47a08bf2d5d3074092e2cd" - integrity sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw== +selfsigned@^1.10.6: + version "1.10.6" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" + integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== dependencies: - node-forge "0.7.5" + node-forge "0.8.2" semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" @@ -16218,6 +16223,18 @@ sockjs-client@1.3.0: json3 "^3.3.2" url-parse "^1.4.3" +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + sockjs@0.3.19: version "0.3.19" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" @@ -19492,10 +19509,10 @@ webpack-bundle-analyzer@3.5.0: opener "^1.5.1" ws "^6.0.0" -webpack-cli@3.3.8: - version "3.3.8" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.8.tgz#caeaebcc26f685db1736e5decd3f01aac30123ec" - integrity sha512-RANYSXwikSWINjHMd/mtesblNSpjpDLoYTBtP99n1RhXqVI/wxN40Auqy42I7y4xrbmRBoA5Zy5E0JSBD5XRhw== +webpack-cli@3.3.9: + version "3.3.9" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.9.tgz#79c27e71f94b7fe324d594ab64a8e396b9daa91a" + integrity sha512-xwnSxWl8nZtBl/AFJCOn9pG7s5CYUYdZxmmukv+fAHLcBIHM36dImfpQg3WfShZXeArkWlf6QRw24Klcsv8a5A== dependencies: chalk "2.4.2" cross-spawn "6.0.5" @@ -19519,14 +19536,25 @@ webpack-dev-middleware@^3.7.0: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.0.tgz#06cc4fc2f440428508d0e9770da1fef10e5ef28d" - integrity sha512-Hs8K9yI6pyMvGkaPTeTonhD6JXVsigXDApYk9JLW4M7viVBspQvb1WdAcWxqtmttxNW4zf2UFLsLNe0y87pIGQ== +webpack-dev-middleware@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" + integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" + integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" - chokidar "^2.1.6" + chokidar "^2.1.8" compression "^1.7.4" connect-history-api-fallback "^1.6.0" debug "^4.1.1" @@ -19537,23 +19565,23 @@ webpack-dev-server@3.8.0: import-local "^2.0.0" internal-ip "^4.3.0" ip "^1.1.5" - is-absolute-url "^3.0.0" + is-absolute-url "^3.0.2" killable "^1.0.1" - loglevel "^1.6.3" + loglevel "^1.6.4" opn "^5.5.0" p-retry "^3.0.1" - portfinder "^1.0.21" + portfinder "^1.0.24" schema-utils "^1.0.0" - selfsigned "^1.10.4" + selfsigned "^1.10.6" semver "^6.3.0" serve-index "^1.9.1" sockjs "0.3.19" - sockjs-client "1.3.0" + sockjs-client "1.4.0" spdy "^4.0.1" strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" - webpack-dev-middleware "^3.7.0" + webpack-dev-middleware "^3.7.1" webpack-log "^2.0.0" ws "^6.2.1" yargs "12.0.5" From 05059dd8aa98da71391977dce10e9d90a80fb6a2 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 12:36:09 +0400 Subject: [PATCH 18/35] save default safe to storage --- src/components/Sidebar/SafeList/index.jsx | 6 +++--- src/logic/safe/utils/safeStorage.js | 18 +++++++++++++++++- .../safe/store/middleware/safeStorage.js | 12 +++++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/components/Sidebar/SafeList/index.jsx b/src/components/Sidebar/SafeList/index.jsx index 81816ccc..b80ec7a5 100644 --- a/src/components/Sidebar/SafeList/index.jsx +++ b/src/components/Sidebar/SafeList/index.jsx @@ -34,11 +34,11 @@ const useStyles = makeStyles({ paddingTop: 0, paddingBottom: 0, '&:hover $makeDefaultBtn': { - visibility: 'initial' + visibility: 'initial', }, '&:focus $makeDefaultBtn': { - visibility: 'initial' - } + visibility: 'initial', + }, }, safeName: { color: secondary, diff --git a/src/logic/safe/utils/safeStorage.js b/src/logic/safe/utils/safeStorage.js index 0dc3ce82..90fb7ab6 100644 --- a/src/logic/safe/utils/safeStorage.js +++ b/src/logic/safe/utils/safeStorage.js @@ -6,6 +6,7 @@ import { loadFromStorage, saveToStorage, removeFromStorage } from '~/utils/stora export const SAFES_KEY = 'SAFES' export const TX_KEY = 'TX' export const OWNERS_KEY = 'OWNERS' +export const DEFAULT_SAFE_KEY = 'DEFAULT_SAFE' export const getSafeName = async (safeAddress: string) => { const safes = await loadFromStorage(SAFES_KEY) @@ -42,11 +43,26 @@ export const getOwners = async (safeAddress: string): Promise => { + const defaultSafe = await loadFromStorage(DEFAULT_SAFE_KEY) + + return defaultSafe || '' +} + +export const saveDefaultSafe = async (safeAddress: string): Promise => { + try { + await saveToStorage(DEFAULT_SAFE_KEY, safeAddress) + } catch (err) { + // eslint-disable-next-line + console.error('Error saving default save to storage: ', err) + } +} + export const removeOwners = async (safeAddress: string): Promise => { try { await removeFromStorage(`${OWNERS_KEY}-${safeAddress}`) } catch (err) { // eslint-disable-next-line - console.log('Error removing owners from localstorage') + console.error('Error removing owners from localstorage: ', err) } } diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index 3a3e8766..853d50fb 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -9,7 +9,9 @@ import { REMOVE_SAFE_OWNER } from '~/routes/safe/store/actions/removeSafeOwner' import { REPLACE_SAFE_OWNER } from '~/routes/safe/store/actions/replaceSafeOwner' import { EDIT_SAFE_OWNER } from '~/routes/safe/store/actions/editSafeOwner' import { type GlobalState } from '~/store/' -import { saveSafes, setOwners, removeOwners } from '~/logic/safe/utils' +import { + saveSafes, setOwners, removeOwners, saveDefaultSafe, +} from '~/logic/safe/utils' import { safesMapSelector } from '~/routes/safeList/store/selectors' import { getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' import { tokensSelector } from '~/logic/tokens/store/selectors' @@ -17,6 +19,7 @@ import type { Token } from '~/logic/tokens/store/model/token' import { makeOwner } from '~/routes/safe/store/models/owner' import { saveActiveTokens } from '~/logic/tokens/utils/tokensStorage' import { ACTIVATE_TOKEN_FOR_ALL_SAFES } from '~/routes/safe/store/actions/activateTokenForAllSafes' +import { SET_DEFAULT_SAFE } from '~/routes/safe/store/actions/setDefaultSafe' const watchedActions = [ ADD_SAFE, @@ -27,6 +30,7 @@ const watchedActions = [ REPLACE_SAFE_OWNER, EDIT_SAFE_OWNER, ACTIVATE_TOKEN_FOR_ALL_SAFES, + SET_DEFAULT_SAFE, ] const recalculateActiveTokens = (state: GlobalState): void => { @@ -109,6 +113,12 @@ const safeStorageMware = (store: Store) => (next: Function) => asyn setOwners(safeAddress, owners.update(ownerToUpdateIndex, (owner) => owner.set('name', ownerName))) break } + case SET_DEFAULT_SAFE: { + if (action.payload) { + saveDefaultSafe(action.payload) + break + } + } default: break } From 99fd7db46a32bc6d740339f2c5361914ced6852d Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 13:30:13 +0400 Subject: [PATCH 19/35] load default safe on initial load wip --- src/index.js | 2 ++ src/routes/index.js | 28 ++++++++++++++-- .../safe/store/actions/loadDefaultSafe.js | 20 +++++++++++ src/routes/safe/store/reducer/safe.js | 33 ++----------------- src/store/index.js | 7 ++-- 5 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 src/routes/safe/store/actions/loadDefaultSafe.js diff --git a/src/index.js b/src/index.js index 1d831f27..a7992734 100644 --- a/src/index.js +++ b/src/index.js @@ -7,6 +7,7 @@ import Root from '~/components/Root' import { store } from '~/store' import loadSafesFromStorage from '~/routes/safe/store/actions/loadSafesFromStorage' import loadActiveTokens from '~/logic/tokens/store/actions/loadActiveTokens' +import loadDefaultSafe from '~/routes/safe/store/actions/loadDefaultSafe' if (process.env.NODE_ENV !== 'production') { // eslint-disable-next-line @@ -16,5 +17,6 @@ if (process.env.NODE_ENV !== 'production') { store.dispatch(loadActiveTokens()) store.dispatch(loadSafesFromStorage()) +store.dispatch(loadDefaultSafe()) ReactDOM.render(, document.getElementById('root')) diff --git a/src/routes/index.js b/src/routes/index.js index 64186ea5..0786dd82 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,6 +1,8 @@ // @flow import React from 'react' +import { connect } from 'react-redux' import { Switch, Redirect, Route } from 'react-router-dom' +import { defaultSafeSelector } from '~/routes/safeList/store/selectors' import Welcome from './welcome/container' import { SAFELIST_ADDRESS, @@ -23,9 +25,25 @@ const Load = React.lazy(() => import('./load/container/Load')) const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}` -const Routes = () => ( +type RoutesProps = { + defaultSafe?: string, +} + +const Routes = ({ defaultSafe }: RoutesProps) => ( - + { + if (typeof defaultSafe === 'undefined') { + return 'Loading...' + } + if (defaultSafe) { + return + } + return + }} + /> @@ -35,4 +53,8 @@ const Routes = () => ( ) -export default Routes +export default connect( + // $FlowFixMe + (state) => ({ defaultSafe: defaultSafeSelector(state) }), + null, +)(Routes) diff --git a/src/routes/safe/store/actions/loadDefaultSafe.js b/src/routes/safe/store/actions/loadDefaultSafe.js new file mode 100644 index 00000000..76a9dff3 --- /dev/null +++ b/src/routes/safe/store/actions/loadDefaultSafe.js @@ -0,0 +1,20 @@ +// @flow +import type { Dispatch as ReduxDispatch } from 'redux' +import { type GlobalState } from '~/store/index' +import { getDefaultSafe } from '~/logic/safe/utils' +import setDefaultSafe from './setDefaultSafe' + +const loadDefaultSafe = () => async (dispatch: ReduxDispatch) => { + try { + const defaultSafe: ?string = await getDefaultSafe() + + if (defaultSafe) { + dispatch(setDefaultSafe(defaultSafe)) + } + } catch (err) { + // eslint-disable-next-line + console.error('Error while getting defautl safe from storage:', err) + } +} + +export default loadDefaultSafe diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index e0a355b6..261be0f2 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -2,11 +2,9 @@ import { Map, List } from 'immutable' import { handleActions, type ActionType } from 'redux-actions' import { ADD_SAFE, buildOwnersFrom } from '~/routes/safe/store/actions/addSafe' -import SafeRecord, { type Safe, type SafeProps } from '~/routes/safe/store/models/safe' +import SafeRecord, { type SafeProps } from '~/routes/safe/store/models/safe' import TokenBalance from '~/routes/safe/store/models/tokenBalance' import { makeOwner, type OwnerProps } from '~/routes/safe/store/models/owner' -import { loadFromStorage } from '~/utils/storage' -import { SAFES_KEY } from '~/logic/safe/utils' import { UPDATE_SAFE } from '~/routes/safe/store/actions/updateSafe' import { ACTIVATE_TOKEN_FOR_ALL_SAFES } from '~/routes/safe/store/actions/activateTokenForAllSafes' import { REMOVE_SAFE } from '~/routes/safe/store/actions/removeSafe' @@ -18,7 +16,7 @@ import { SET_DEFAULT_SAFE } from '~/routes/safe/store/actions/setDefaultSafe' export const SAFE_REDUCER_ID = 'safes' -type SafeReducerState = Map +export type SafeReducerState = Map export const buildSafe = (storedSafe: SafeProps) => { const names = storedSafe.owners.map((owner: OwnerProps) => owner.name) @@ -37,31 +35,6 @@ export const buildSafe = (storedSafe: SafeProps) => { return safe } -const buildSafesFrom = (loadedSafes: Object): Map => { - const safes: Map = Map() - - const keys = Object.keys(loadedSafes) - try { - const safeRecords = keys.map((address: string) => buildSafe(loadedSafes[address])) - - return safes.withMutations(async (map) => { - safeRecords.forEach((safe: SafeProps) => map.set(safe.address, safe)) - }) - } catch (err) { - // eslint-disable-next-line - console.log('Error while fetching safes information') - - return Map() - } -} - -export const safesInitialState = async (): Promise => { - const storedSafes = await loadFromStorage(SAFES_KEY) - const safes = storedSafes ? buildSafesFrom(storedSafes) : Map() - - return safes -} - export default handleActions( { [UPDATE_SAFE]: (state: SafeReducerState, action: ActionType): SafeReducerState => { @@ -142,7 +115,7 @@ export default handleActions( }, Map({ // $FlowFixMe - defaultSafe: '', + defaultSafe: undefined, safes: Map(), }), ) diff --git a/src/store/index.js b/src/store/index.js index 9542511c..0d514224 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,7 +6,7 @@ import { } from 'redux' import thunk from 'redux-thunk' import provider, { PROVIDER_REDUCER_ID, type State as ProviderState } from '~/logic/wallets/store/reducer/provider' -import safe, { SAFE_REDUCER_ID, type State as SafeState } from '~/routes/safe/store/reducer/safe' +import safe, { SAFE_REDUCER_ID, type SafeReducerState as SafeState } from '~/routes/safe/store/reducer/safe' import safeStorage from '~/routes/safe/store/middleware/safeStorage' import tokens, { TOKEN_REDUCER_ID, type State as TokensState } from '~/logic/tokens/store/reducer/tokens' import transactions, { @@ -37,6 +37,9 @@ const reducers: Reducer = combineReducers({ [TRANSACTIONS_REDUCER_ID]: transactions, }) -export const store: Store = createStore(reducers, finalCreateStore) +export const store: Store = createStore( + reducers, + finalCreateStore, +) export const aNewStore = (localState?: Object): Store => createStore(reducers, localState, finalCreateStore) From c882c6ff5f757cb0c257aef654b115f2563bc17a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 14:31:29 +0400 Subject: [PATCH 20/35] display loader on initial load when loadingg defaultSafe --- src/routes/index.js | 60 +++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index 0786dd82..39f9a0a5 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,8 +1,9 @@ // @flow -import React from 'react' +import React, { useState } from 'react' import { connect } from 'react-redux' import { Switch, Redirect, Route } from 'react-router-dom' import { defaultSafeSelector } from '~/routes/safeList/store/selectors' +import Loader from '~/components/Loader' import Welcome from './welcome/container' import { SAFELIST_ADDRESS, @@ -29,29 +30,40 @@ type RoutesProps = { defaultSafe?: string, } -const Routes = ({ defaultSafe }: RoutesProps) => ( - - { - if (typeof defaultSafe === 'undefined') { - return 'Loading...' - } - if (defaultSafe) { - return - } - return - }} - /> - - - - - - - -) +const Routes = ({ defaultSafe }: RoutesProps) => { + const [isInitialLoad, setIniitialLoad] = useState(true) + + return ( + + { + if (!isInitialLoad) { + return + } + + if (typeof defaultSafe === 'undefined') { + return + } + + setIniitialLoad(false) + if (defaultSafe) { + return + } + + return + }} + /> + + + + + + + + ) +} export default connect( // $FlowFixMe From b531ffd0570ac0d42ee26f1803a47b72f17d8955 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 14:40:15 +0400 Subject: [PATCH 21/35] Setting 1 safe as default WIP --- src/routes/safe/store/actions/addSafe.js | 11 ++++++++++- src/routes/safe/store/actions/loadDefaultSafe.js | 6 ++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/routes/safe/store/actions/addSafe.js b/src/routes/safe/store/actions/addSafe.js index a3395ac8..47c5e23e 100644 --- a/src/routes/safe/store/actions/addSafe.js +++ b/src/routes/safe/store/actions/addSafe.js @@ -1,10 +1,12 @@ // @flow import { List } from 'immutable' import { createAction } from 'redux-actions' -import type { Dispatch as ReduxDispatch } from 'redux' +import type { Dispatch as ReduxDispatch, GetState } from 'redux' import { type GlobalState } from '~/store' +import { safesListSelector } from '~/routes/safeList/store/selectors' import SafeRecord, { type Safe } from '~/routes/safe/store/models/safe' import { makeOwner, type Owner } from '~/routes/safe/store/models/owner' +import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' export const ADD_SAFE = 'ADD_SAFE' @@ -24,8 +26,11 @@ export const addSafe = createAction(ADD_SAFE, (s const saveSafe = (name: string, address: string, threshold: number, ownersName: string[], ownersAddress: string[]) => ( dispatch: ReduxDispatch, + getState: GetState, ) => { const owners: List = buildOwnersFrom(ownersName, ownersAddress) + const state = getState() + const safeList = safesListSelector(state) const safe: Safe = SafeRecord({ name, @@ -35,6 +40,10 @@ const saveSafe = (name: string, address: string, threshold: number, ownersName: }) dispatch(addSafe(safe)) + console.log(safeList.size) + if (safeList.size === 0) { + setDefaultSafe(address) + } } export default saveSafe diff --git a/src/routes/safe/store/actions/loadDefaultSafe.js b/src/routes/safe/store/actions/loadDefaultSafe.js index 76a9dff3..71d4cc32 100644 --- a/src/routes/safe/store/actions/loadDefaultSafe.js +++ b/src/routes/safe/store/actions/loadDefaultSafe.js @@ -6,11 +6,9 @@ import setDefaultSafe from './setDefaultSafe' const loadDefaultSafe = () => async (dispatch: ReduxDispatch) => { try { - const defaultSafe: ?string = await getDefaultSafe() + const defaultSafe: string = await getDefaultSafe() - if (defaultSafe) { - dispatch(setDefaultSafe(defaultSafe)) - } + dispatch(setDefaultSafe(defaultSafe)) } catch (err) { // eslint-disable-next-line console.error('Error while getting defautl safe from storage:', err) From 35bc1c2b3dfd29b86966dd2d530de79ac11d21ad Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 15:45:41 +0400 Subject: [PATCH 22/35] Fix single default safe, fix redirect when initial route was other than / --- src/routes/index.js | 17 +++++++++++++---- src/routes/load/container/Load.jsx | 1 + src/routes/load/container/actions.js | 2 +- src/routes/open/container/Open.jsx | 14 +++++++++----- src/routes/safe/store/actions/addSafe.js | 18 +++++------------- src/routes/safe/store/actions/fetchSafe.js | 2 +- 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index 39f9a0a5..57ec5ea3 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,7 +1,9 @@ // @flow -import React, { useState } from 'react' +import React, { useState, useEffect } from 'react' import { connect } from 'react-redux' -import { Switch, Redirect, Route } from 'react-router-dom' +import { + Switch, Redirect, Route, withRouter, +} from 'react-router-dom' import { defaultSafeSelector } from '~/routes/safeList/store/selectors' import Loader from '~/components/Loader' import Welcome from './welcome/container' @@ -28,11 +30,18 @@ const SAFE_ADDRESS = `${SAFELIST_ADDRESS}/:${SAFE_PARAM_ADDRESS}` type RoutesProps = { defaultSafe?: string, + location: Object, } -const Routes = ({ defaultSafe }: RoutesProps) => { +const Routes = ({ defaultSafe, location }: RoutesProps) => { const [isInitialLoad, setIniitialLoad] = useState(true) + useEffect(() => { + if (location.pathname !== '/') { + setIniitialLoad(false) + } + }, []) + return ( ( // $FlowFixMe (state) => ({ defaultSafe: defaultSafeSelector(state) }), null, -)(Routes) +)(withRouter(Routes)) diff --git a/src/routes/load/container/Load.jsx b/src/routes/load/container/Load.jsx index d3065f04..86d3b6b3 100644 --- a/src/routes/load/container/Load.jsx +++ b/src/routes/load/container/Load.jsx @@ -24,6 +24,7 @@ export const loadSafe = async ( ) => { const safeProps = await buildSafe(safeAddress, safeName) safeProps.owners = owners + await addSafe(safeProps) const storedSafes = (await loadFromStorage(SAFES_KEY)) || {} diff --git a/src/routes/load/container/actions.js b/src/routes/load/container/actions.js index ef7f6914..fd88b01d 100644 --- a/src/routes/load/container/actions.js +++ b/src/routes/load/container/actions.js @@ -1,5 +1,5 @@ // @flow -import { addSafe } from '~/routes/safe/store/actions/addSafe' +import addSafe from '~/routes/safe/store/actions/addSafe' export type Actions = { addSafe: Function, diff --git a/src/routes/open/container/Open.jsx b/src/routes/open/container/Open.jsx index 7d65b08f..ee1b9b0b 100644 --- a/src/routes/open/container/Open.jsx +++ b/src/routes/open/container/Open.jsx @@ -3,8 +3,9 @@ import * as React from 'react' import { connect } from 'react-redux' import Page from '~/components/layout/Page' import { - getAccountsFrom, getThresholdFrom, getNamesFrom, getSafeNameFrom, + getAccountsFrom, getThresholdFrom, getNamesFrom, getSafeNameFrom, getOwnersFrom, } from '~/routes/open/utils/safeDataExtractor' +import { buildSafe } from '~/routes/safe/store/actions/fetchSafe' import { getGnosisSafeInstanceAt, deploySafeContract, initContracts } from '~/logic/contracts/safeContracts' import { checkReceiptStatus } from '~/logic/wallets/ethTransactions' import { history } from '~/store' @@ -24,19 +25,22 @@ export type OpenState = { } export const createSafe = async (values: Object, userAccount: string, addSafe: AddSafe): Promise => { - const accounts = getAccountsFrom(values) + const ownerAddresses = getAccountsFrom(values) const numConfirmations = getThresholdFrom(values) const name = getSafeNameFrom(values) - const owners = getNamesFrom(values) + const ownersNames = getNamesFrom(values) await initContracts() - const safe = await deploySafeContract(accounts, numConfirmations, userAccount) + const safe = await deploySafeContract(ownerAddresses, numConfirmations, userAccount) await checkReceiptStatus(safe.tx) const safeAddress = safe.logs[0].args.proxy const safeContract = await getGnosisSafeInstanceAt(safeAddress) + const safeProps = await buildSafe(safeAddress, name) + const owners = getOwnersFrom(ownersNames, ownerAddresses.sort()) + safeProps.owners = owners - addSafe(name, safeContract.address, numConfirmations, owners, accounts) + addSafe(safeProps) if (stillInOpeningView()) { const url = { diff --git a/src/routes/safe/store/actions/addSafe.js b/src/routes/safe/store/actions/addSafe.js index 47c5e23e..735b4f3f 100644 --- a/src/routes/safe/store/actions/addSafe.js +++ b/src/routes/safe/store/actions/addSafe.js @@ -4,8 +4,8 @@ import { createAction } from 'redux-actions' import type { Dispatch as ReduxDispatch, GetState } from 'redux' import { type GlobalState } from '~/store' import { safesListSelector } from '~/routes/safeList/store/selectors' -import SafeRecord, { type Safe } from '~/routes/safe/store/models/safe' -import { makeOwner, type Owner } from '~/routes/safe/store/models/owner' +import { type Safe } from '~/routes/safe/store/models/safe' +import { makeOwner } from '~/routes/safe/store/models/owner' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' export const ADD_SAFE = 'ADD_SAFE' @@ -24,25 +24,17 @@ export const addSafe = createAction(ADD_SAFE, (s safe, })) -const saveSafe = (name: string, address: string, threshold: number, ownersName: string[], ownersAddress: string[]) => ( +const saveSafe = (safe: Safe) => ( dispatch: ReduxDispatch, getState: GetState, ) => { - const owners: List = buildOwnersFrom(ownersName, ownersAddress) const state = getState() const safeList = safesListSelector(state) - const safe: Safe = SafeRecord({ - name, - address, - threshold, - owners, - }) - dispatch(addSafe(safe)) - console.log(safeList.size) + if (safeList.size === 0) { - setDefaultSafe(address) + dispatch(setDefaultSafe(safe.address)) } } diff --git a/src/routes/safe/store/actions/fetchSafe.js b/src/routes/safe/store/actions/fetchSafe.js index 83fd2774..7b536047 100644 --- a/src/routes/safe/store/actions/fetchSafe.js +++ b/src/routes/safe/store/actions/fetchSafe.js @@ -4,7 +4,7 @@ import { List, Map } from 'immutable' import { type GlobalState } from '~/store/index' import { makeOwner } from '~/routes/safe/store/models/owner' import type { SafeProps } from '~/routes/safe/store/models/safe' -import { addSafe } from '~/routes/safe/store/actions/addSafe' +import addSafe from '~/routes/safe/store/actions/addSafe' import { getOwners, getSafeName } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { getBalanceInEtherOf } from '~/logic/wallets/getWeb3' From 14b946abc23ce4db397dcc756fb31529599d5ce3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 16:14:15 +0400 Subject: [PATCH 23/35] Remove Footer --- src/components/Footer/index.jsx | 20 ------------------- src/components/Footer/index.scss | 24 ----------------------- src/components/Footer/index.stories.js | 16 --------------- src/components/layout/PageFrame/index.jsx | 2 -- 4 files changed, 62 deletions(-) delete mode 100644 src/components/Footer/index.jsx delete mode 100644 src/components/Footer/index.scss delete mode 100644 src/components/Footer/index.stories.js diff --git a/src/components/Footer/index.jsx b/src/components/Footer/index.jsx deleted file mode 100644 index 8ab1c99d..00000000 --- a/src/components/Footer/index.jsx +++ /dev/null @@ -1,20 +0,0 @@ -// @flow -import React from 'react' -import Block from '~/components/layout/Block' -import Link from '~/components/layout/Link' -import Paragraph from '~/components/layout/Paragraph' -import { WELCOME_ADDRESS, SAFELIST_ADDRESS } from '~/routes/routes' -import styles from './index.scss' - -const Footer = () => ( - - - Add Safe - - - Safe List - - -) - -export default Footer diff --git a/src/components/Footer/index.scss b/src/components/Footer/index.scss deleted file mode 100644 index 0f3b3eba..00000000 --- a/src/components/Footer/index.scss +++ /dev/null @@ -1,24 +0,0 @@ -.footer { - font-size: $smallFontSize; - display: grid; - grid-template-columns: 100px 100px 1fr; - grid-template-rows: 36px; - justify-items: center; - align-items: center; - border: solid 0.5px $border; - background-color: white; - margin-top: 50px; -} - -@media only screen and (max-width: $(screenXs)px) { - .footer { - grid-template-columns: none; - grid-template-rows: auto auto; - grid-row-gap: $sm; - justify-items: center; - } - - .footer > a { - padding: 0; - } -} \ No newline at end of file diff --git a/src/components/Footer/index.stories.js b/src/components/Footer/index.stories.js deleted file mode 100644 index e0b29e91..00000000 --- a/src/components/Footer/index.stories.js +++ /dev/null @@ -1,16 +0,0 @@ -// @flow -import { storiesOf } from '@storybook/react' -import * as React from 'react' -import styles from '~/components/layout/PageFrame/index.scss' -import Component from './index' - -const FrameDecorator = (story) => ( -
-
- {story()} -
-) - -storiesOf('Components /Footer', module) - .addDecorator(FrameDecorator) - .add('Loaded', () => ) diff --git a/src/components/layout/PageFrame/index.jsx b/src/components/layout/PageFrame/index.jsx index 7ae223ec..6159ca41 100644 --- a/src/components/layout/PageFrame/index.jsx +++ b/src/components/layout/PageFrame/index.jsx @@ -1,6 +1,5 @@ // @flow import * as React from 'react' -import Footer from '~/components/Footer' import Header from '~/components/Header' import SidebarProvider from '~/components/Sidebar' import { SharedSnackbarProvider } from '~/components/SharedSnackBar' @@ -16,7 +15,6 @@ const PageFrame = ({ children }: Props) => (
{children} -
From db9788b4cc2dab3a1aba3ccff5619b84f5b54366 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 16:34:20 +0400 Subject: [PATCH 24/35] remove SafeList route because the list moved to sidebar --- .../Header/component/SafeListHeader/index.jsx | 2 +- src/components/Sidebar/index.jsx | 2 +- src/routes/index.js | 6 +-- src/routes/safe/store/actions/addSafe.js | 2 +- .../safe/store/middleware/safeStorage.js | 2 +- src/routes/safe/store/selectors/index.js | 22 +++++++++- src/routes/safeList/components/Layout.jsx | 25 ----------- .../safeList/components/Layout.stories.js | 13 ------ src/routes/safeList/components/SafeTable.jsx | 44 ------------------- src/routes/safeList/container/index.jsx | 21 --------- src/routes/safeList/container/selector.js | 9 ---- src/routes/safeList/store/selectors/index.js | 25 ----------- 12 files changed, 26 insertions(+), 147 deletions(-) delete mode 100644 src/routes/safeList/components/Layout.jsx delete mode 100644 src/routes/safeList/components/Layout.stories.js delete mode 100644 src/routes/safeList/components/SafeTable.jsx delete mode 100644 src/routes/safeList/container/index.jsx delete mode 100644 src/routes/safeList/container/selector.js delete mode 100644 src/routes/safeList/store/selectors/index.js diff --git a/src/components/Header/component/SafeListHeader/index.jsx b/src/components/Header/component/SafeListHeader/index.jsx index c7df187b..18abbb86 100644 --- a/src/components/Header/component/SafeListHeader/index.jsx +++ b/src/components/Header/component/SafeListHeader/index.jsx @@ -10,7 +10,7 @@ import Col from '~/components/layout/Col' import { xs, sm, md, border, } from '~/theme/variables' -import { safesCountSelector } from '~/routes/safeList/store/selectors' +import { safesCountSelector } from '~/routes/safe/store/selectors' import { SidebarContext } from '~/components/Sidebar' const useStyles = makeStyles({ diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 61d617ce..2f90d538 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -13,7 +13,7 @@ import Spacer from '~/components/Spacer' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' -import { safesListSelector, defaultSafeSelector } from '~/routes/safeList/store/selectors' +import { safesListSelector, defaultSafeSelector } from '~/routes/safe/store/selectors' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' import useSidebarStyles from './style' import SafeList from './SafeList' diff --git a/src/routes/index.js b/src/routes/index.js index 57ec5ea3..c238ef8f 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux' import { Switch, Redirect, Route, withRouter, } from 'react-router-dom' -import { defaultSafeSelector } from '~/routes/safeList/store/selectors' +import { defaultSafeSelector } from '~/routes/safe/store/selectors' import Loader from '~/components/Loader' import Welcome from './welcome/container' import { @@ -18,8 +18,6 @@ import { const Safe = React.lazy(() => import('./safe/container')) -const SafeList = React.lazy(() => import('./safeList/container')) - const Open = React.lazy(() => import('./open/container/Open')) const Opening = React.lazy(() => import('./opening/container')) @@ -66,10 +64,10 @@ const Routes = ({ defaultSafe, location }: RoutesProps) => { /> - +
) } diff --git a/src/routes/safe/store/actions/addSafe.js b/src/routes/safe/store/actions/addSafe.js index 735b4f3f..5a6bbf1b 100644 --- a/src/routes/safe/store/actions/addSafe.js +++ b/src/routes/safe/store/actions/addSafe.js @@ -3,7 +3,7 @@ import { List } from 'immutable' import { createAction } from 'redux-actions' import type { Dispatch as ReduxDispatch, GetState } from 'redux' import { type GlobalState } from '~/store' -import { safesListSelector } from '~/routes/safeList/store/selectors' +import { safesListSelector } from '~/routes/safe/store/selectors' import { type Safe } from '~/routes/safe/store/models/safe' import { makeOwner } from '~/routes/safe/store/models/owner' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index 853d50fb..de7cb3dd 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -12,7 +12,7 @@ import { type GlobalState } from '~/store/' import { saveSafes, setOwners, removeOwners, saveDefaultSafe, } from '~/logic/safe/utils' -import { safesMapSelector } from '~/routes/safeList/store/selectors' +import { safesMapSelector } from '~/routes/safe/store/selectors' import { getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' import { tokensSelector } from '~/logic/tokens/store/selectors' import type { Token } from '~/logic/tokens/store/model/token' diff --git a/src/routes/safe/store/selectors/index.js b/src/routes/safe/store/selectors/index.js index f194061c..46574d4b 100644 --- a/src/routes/safe/store/selectors/index.js +++ b/src/routes/safe/store/selectors/index.js @@ -5,11 +5,10 @@ import { createSelector, createStructuredSelector, type Selector } from 'reselec import { type GlobalState } from '~/store/index' import { SAFE_PARAM_ADDRESS } from '~/routes/routes' import { type Safe } from '~/routes/safe/store/models/safe' -import { safesMapSelector } from '~/routes/safeList/store/selectors' import { type State as TransactionsState, TRANSACTIONS_REDUCER_ID } from '~/routes/safe/store/reducer/transactions' import { type Transaction } from '~/routes/safe/store/models/transaction' import { type Confirmation } from '~/routes/safe/store/models/confirmation' -import { safesListSelector } from '~/routes/safeList/store/selectors/' +import { SAFE_REDUCER_ID } from '~/routes/safe/store/reducer/safe' export type RouterProps = { match: Match, @@ -23,6 +22,25 @@ type TransactionProps = { transaction: Transaction, } +const safesStateSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID] + +export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID].get('safes') + +export const safesListSelector: Selector> = createSelector( + safesMapSelector, + (safes: Map): List => safes.toList(), +) + +export const safesCountSelector: Selector = createSelector( + safesMapSelector, + (safes: Map): number => safes.size, +) + +export const defaultSafeSelector: Selector = createSelector( + safesStateSelector, + (safeState: Map): string => safeState.get('defaultSafe'), +) + const transactionsSelector = (state: GlobalState): TransactionsState => state[TRANSACTIONS_REDUCER_ID] const oneTransactionSelector = (state: GlobalState, props: TransactionProps) => props.transaction diff --git a/src/routes/safeList/components/Layout.jsx b/src/routes/safeList/components/Layout.jsx deleted file mode 100644 index a7dde521..00000000 --- a/src/routes/safeList/components/Layout.jsx +++ /dev/null @@ -1,25 +0,0 @@ -// @flow -import { List } from 'immutable' -import * as React from 'react' -import NoSafe from '~/components/NoSafe' -import { type Safe } from '~/routes/safe/store/models/safe' -import SafeTable from '~/routes/safeList/components/SafeTable' - -type Props = { - safes: List, - provider: string, -} - -const SafeList = ({ safes, provider }: Props) => { - const safesAvailable = safes && safes.count() > 0 - - return ( - <> - { safesAvailable - ? - : } - - ) -} - -export default SafeList diff --git a/src/routes/safeList/components/Layout.stories.js b/src/routes/safeList/components/Layout.stories.js deleted file mode 100644 index 391b8de6..00000000 --- a/src/routes/safeList/components/Layout.stories.js +++ /dev/null @@ -1,13 +0,0 @@ -// @flow -import { storiesOf } from '@storybook/react' -import { List } from 'immutable' -import * as React from 'react' -import styles from '~/components/layout/PageFrame/index.scss' -import Component from './Layout' - -const FrameDecorator = (story) =>
{story()}
- -storiesOf('Routes /safes', module) - .addDecorator(FrameDecorator) - .add('Safe List whithout safes and connected', () => ) - .add('Safe List whithout safes and NOT connected', () => ) diff --git a/src/routes/safeList/components/SafeTable.jsx b/src/routes/safeList/components/SafeTable.jsx deleted file mode 100644 index 78dc14d2..00000000 --- a/src/routes/safeList/components/SafeTable.jsx +++ /dev/null @@ -1,44 +0,0 @@ -// @flow -import { List } from 'immutable' -import * as React from 'react' -import Button from '~/components/layout/Button' -import Link from '~/components/layout/Link' -import Table, { - TableBody, TableCell, TableHead, TableRow, -} from '~/components/layout/Table' -import { type Safe } from '~/routes/safe/store/models/safe' -import { SAFELIST_ADDRESS } from '~/routes/routes' - -type Props = { - safes: List -} -const SafeTable = ({ safes }: Props) => ( - - - - Open - Name - Deployed Address - Confirmations - Number of owners - - - - {safes.map(safe => ( - - - - - - - {safe.get('name')} - {safe.get('address')} - {safe.get('threshold')} - {safe.get('owners').count()} - - ))} - -
-) - -export default SafeTable diff --git a/src/routes/safeList/container/index.jsx b/src/routes/safeList/container/index.jsx deleted file mode 100644 index 6eaf1bb7..00000000 --- a/src/routes/safeList/container/index.jsx +++ /dev/null @@ -1,21 +0,0 @@ -// @flow -import { List } from 'immutable' -import * as React from 'react' -import { connect } from 'react-redux' -import Page from '~/components/layout/Page' -import { type Safe } from '~/routes/safe/store/models/safe' -import Layout from '../components/Layout' -import selector from './selector' - -type Props = { - safes: List, - provider: string, -} - -const SafeList = ({ safes, provider }: Props) => ( - - - -) - -export default connect<*, *, *, *>(selector)(SafeList) diff --git a/src/routes/safeList/container/selector.js b/src/routes/safeList/container/selector.js deleted file mode 100644 index 9a301e0e..00000000 --- a/src/routes/safeList/container/selector.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow -import { createStructuredSelector } from 'reselect' -import { safesListSelector } from '~/routes/safeList/store/selectors' -import { providerNameSelector } from '~/logic/wallets/store/selectors' - -export default createStructuredSelector({ - safes: safesListSelector, - provider: providerNameSelector, -}) diff --git a/src/routes/safeList/store/selectors/index.js b/src/routes/safeList/store/selectors/index.js deleted file mode 100644 index f37f0afa..00000000 --- a/src/routes/safeList/store/selectors/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// @flow -import { List, Map } from 'immutable' -import { createSelector, type Selector } from 'reselect' -import { type GlobalState } from '~/store/index' -import { type Safe } from '~/routes/safe/store/models/safe' -import { SAFE_REDUCER_ID } from '~/routes/safe/store/reducer/safe' - -const safesStateSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID] - -export const safesMapSelector = (state: GlobalState): Map => state[SAFE_REDUCER_ID].get('safes') - -export const safesListSelector: Selector> = createSelector( - safesMapSelector, - (safes: Map): List => safes.toList(), -) - -export const safesCountSelector: Selector = createSelector( - safesMapSelector, - (safes: Map): number => safes.size, -) - -export const defaultSafeSelector: Selector = createSelector( - safesStateSelector, - (safeState: Map): string => safeState.get('defaultSafe'), -) From 232c7416a93689cb7e8e247116f2c6e259700d0a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 18:22:39 +0400 Subject: [PATCH 25/35] unify imports --- src/routes/safe/store/middleware/safeStorage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/store/middleware/safeStorage.js b/src/routes/safe/store/middleware/safeStorage.js index de7cb3dd..d52bd317 100644 --- a/src/routes/safe/store/middleware/safeStorage.js +++ b/src/routes/safe/store/middleware/safeStorage.js @@ -12,8 +12,8 @@ import { type GlobalState } from '~/store/' import { saveSafes, setOwners, removeOwners, saveDefaultSafe, } from '~/logic/safe/utils' -import { safesMapSelector } from '~/routes/safe/store/selectors' -import { getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' +import { safesMapSelector, getActiveTokensAddressesForAllSafes } from '~/routes/safe/store/selectors' + import { tokensSelector } from '~/logic/tokens/store/selectors' import type { Token } from '~/logic/tokens/store/model/token' import { makeOwner } from '~/routes/safe/store/models/owner' From dcdc9659843d3375269f8600eb465ff5898776aa Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 19 Sep 2019 19:12:41 +0400 Subject: [PATCH 26/35] fix send funds tests --- src/logic/tokens/utils/tokenHelpers.js | 2 +- src/routes/safe/components/Layout.jsx | 1 - src/test/utils/transactions/moveFunds.helper.js | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/logic/tokens/utils/tokenHelpers.js b/src/logic/tokens/utils/tokenHelpers.js index 1fac59f9..7723664a 100644 --- a/src/logic/tokens/utils/tokenHelpers.js +++ b/src/logic/tokens/utils/tokenHelpers.js @@ -49,4 +49,4 @@ export const isAddressAToken = async (tokenAddress: string) => { return call !== '0x' } -export const isTokenTransfer = async (data: string, value: number) => data.substring(0, 10) === '0xa9059cbb' && value === 0 +export const isTokenTransfer = async (data: string, value: number) => data && data.substring(0, 10) === '0xa9059cbb' && value === 0 diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index 8904b636..41c4bb48 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -137,7 +137,6 @@ class Layout extends React.Component { className={classes.send} onClick={() => showSendFunds('Ether')} disabled={!granted} - testId="balance-send-btn" > Send diff --git a/src/test/utils/transactions/moveFunds.helper.js b/src/test/utils/transactions/moveFunds.helper.js index 64b89074..d33d6402 100644 --- a/src/test/utils/transactions/moveFunds.helper.js +++ b/src/test/utils/transactions/moveFunds.helper.js @@ -1,6 +1,6 @@ // @flow import * as React from 'react' -import { fireEvent } from '@testing-library/react' +import { fireEvent, waitForElement } from '@testing-library/react' import { sleep } from '~/utils/timer' export const fillAndSubmitSendFundsForm = async ( @@ -24,7 +24,7 @@ export const fillAndSubmitSendFundsForm = async ( fireEvent.click(reviewBtn) // Submit the tx (Review Tx screen) - const submitBtn = SafeDom.getByTestId('submit-tx-btn') + const submitBtn = await waitForElement(() => SafeDom.getByTestId('submit-tx-btn')) fireEvent.click(submitBtn) await sleep(1000) } From e3b770b2bc7f0366c897ccf4ad2fbc0ee8a316f4 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 20 Sep 2019 16:04:35 +0400 Subject: [PATCH 27/35] Fix funds test, fix create safe test --- .eslintrc | 3 +- src/routes/open/container/Open.jsx | 1 + src/routes/safe/container/index.jsx | 1 + src/routes/safe/store/actions/fetchSafe.js | 9 +---- src/routes/safe/store/reducer/safe.js | 2 +- src/test/safe.dom.create.test.js | 45 ++++++++++++++------- src/test/safe.dom.funds.threshold>1.test.js | 20 ++++----- 7 files changed, 48 insertions(+), 33 deletions(-) diff --git a/.eslintrc b/.eslintrc index f04dfa1b..da0eb9a1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -45,7 +45,8 @@ ], "react/require-default-props": 0, "react/no-array-index-key": 0, - "react/jsx-props-no-spreading": 0 + "react/jsx-props-no-spreading": 0, + "react/state-in-constructor": 0 }, "env": { "jest/globals": true, diff --git a/src/routes/open/container/Open.jsx b/src/routes/open/container/Open.jsx index 1c99006c..3d8f9734 100644 --- a/src/routes/open/container/Open.jsx +++ b/src/routes/open/container/Open.jsx @@ -31,6 +31,7 @@ export const createSafe = async (values: Object, userAccount: string, addSafe: A const ownersNames = getNamesFrom(values) await initContracts() + const safe = await deploySafeContract(ownerAddresses, numConfirmations, userAccount) await checkReceiptStatus(safe.tx) diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx index ff8b4317..fa6b170e 100644 --- a/src/routes/safe/container/index.jsx +++ b/src/routes/safe/container/index.jsx @@ -3,6 +3,7 @@ import * as React from 'react' import { connect } from 'react-redux' import Page from '~/components/layout/Page' import Layout from '~/routes/safe/components/Layout' +import { type Token } from '~/logic/tokens/store/model/token' import selector, { type SelectorProps } from './selector' import actions, { type Actions } from './actions' diff --git a/src/routes/safe/store/actions/fetchSafe.js b/src/routes/safe/store/actions/fetchSafe.js index 7b536047..f49577a6 100644 --- a/src/routes/safe/store/actions/fetchSafe.js +++ b/src/routes/safe/store/actions/fetchSafe.js @@ -8,7 +8,6 @@ import addSafe from '~/routes/safe/store/actions/addSafe' import { getOwners, getSafeName } from '~/logic/safe/utils' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { getBalanceInEtherOf } from '~/logic/wallets/getWeb3' -import updateSafe from '~/routes/safe/store/actions/updateSafe' const buildOwnersFrom = ( safeOwners: string[], @@ -36,16 +35,12 @@ export const buildSafe = async (safeAddress: string, safeName: string) => { return safe } -export default (safeAddress: string, update: boolean = false) => async (dispatch: ReduxDispatch) => { +export default (safeAddress: string) => async (dispatch: ReduxDispatch) => { try { const safeName = (await getSafeName(safeAddress)) || 'LOADED SAFE' const safeProps: SafeProps = await buildSafe(safeAddress, safeName) - if (update) { - dispatch(updateSafe(safeProps)) - } else { - dispatch(addSafe(safeProps)) - } + dispatch(addSafe(safeProps)) } catch (err) { // eslint-disable-next-line console.error('Error while updating safe information: ', err) diff --git a/src/routes/safe/store/reducer/safe.js b/src/routes/safe/store/reducer/safe.js index 261be0f2..09dfd5d8 100644 --- a/src/routes/safe/store/reducer/safe.js +++ b/src/routes/safe/store/reducer/safe.js @@ -64,7 +64,7 @@ export default handleActions( // in case of update it shouldn't, because a record would be initialized // with initial props and it would overwrite existing ones - if (state.has(safe.address)) { + if (state.hasIn(['safes', safe.address])) { return state.updateIn(['safes', safe.address], (prevSafe) => prevSafe.merge(safe)) } diff --git a/src/test/safe.dom.create.test.js b/src/test/safe.dom.create.test.js index 4f6809c6..7b8759ff 100644 --- a/src/test/safe.dom.create.test.js +++ b/src/test/safe.dom.create.test.js @@ -1,20 +1,21 @@ // @flow import * as React from 'react' import { type Store } from 'redux' -import { render, fireEvent } from '@testing-library/react' +import { render, fireEvent, act } from '@testing-library/react' import { Provider } from 'react-redux' import { ConnectedRouter } from 'connected-react-router' +import { sleep } from '~/utils/timer' import { ADD_OWNER_BUTTON } from '~/routes/open/components/SafeOwnersConfirmationsForm' import Open from '~/routes/open/container/Open' import { aNewStore, history, type GlobalState } from '~/store' -import { sleep } from '~/utils/timer' import { getProviderInfo, getWeb3 } from '~/logic/wallets/getWeb3' import addProvider from '~/logic/wallets/store/actions/addProvider' import { makeProvider } from '~/logic/wallets/store/model/provider' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { whenSafeDeployed } from './builder/safe.dom.utils' -// https://github.com/testing-library/@testing-library/react/issues/281 +// For some reason it warns about events not wrapped in act +// But they're wrapped :( const originalError = console.error beforeAll(() => { console.error = (...args) => { @@ -53,9 +54,10 @@ const deploySafe = async (createSafeForm: any, threshold: number, numOwners: num // Fill Safe's name const nameInput: HTMLInputElement = createSafeForm.getByPlaceholderText('Name of the new Safe') - fireEvent.change(nameInput, { target: { value: 'Adolfo Safe' } }) - fireEvent.submit(form) - await sleep(400) + await act(async () => { + fireEvent.change(nameInput, { target: { value: 'Adolfo Safe' } }) + fireEvent.submit(form) + }) // Fill owners const addedUpfront = 1 @@ -63,7 +65,11 @@ const deploySafe = async (createSafeForm: any, threshold: number, numOwners: num expect(addOwnerButton.getElementsByTagName('span')[0].textContent).toEqual(ADD_OWNER_BUTTON) for (let i = addedUpfront; i < numOwners; i += 1) { - fireEvent.click(addOwnerButton) + /* eslint-disable */ + await act(async () => { + fireEvent.click(addOwnerButton) + }) + /* eslint-enable */ } const ownerNameInputs = createSafeForm.getAllByPlaceholderText('Owner Name*') @@ -75,23 +81,31 @@ const deploySafe = async (createSafeForm: any, threshold: number, numOwners: num const ownerNameInput = ownerNameInputs[i] const ownerAddressInput = ownerAddressInputs[i] - fireEvent.change(ownerNameInput, { target: { value: `Owner ${i + 1}` } }) - fireEvent.change(ownerAddressInput, { target: { value: accounts[i] } }) + /* eslint-disable */ + await act(async () => { + fireEvent.change(ownerNameInput, { target: { value: `Owner ${i + 1}` } }) + fireEvent.change(ownerAddressInput, { target: { value: accounts[i] } }) + }) + /* eslint-enable */ } // Fill Threshold // The test is fragile here, MUI select btn is hard to find const thresholdSelect = createSafeForm.getAllByRole('button')[2] - fireEvent.click(thresholdSelect) + await act(async () => { + fireEvent.click(thresholdSelect) + }) const thresholdOptions = createSafeForm.getAllByRole('option') - fireEvent.click(thresholdOptions[numOwners - 1]) - fireEvent.submit(form) - await sleep(400) + await act(async () => { + fireEvent.click(thresholdOptions[numOwners - 1]) + fireEvent.submit(form) + }) // Submit - fireEvent.submit(form) - await sleep(400) + await act(async () => { + fireEvent.submit(form) + }) // giving some time to the component for updating its state with safe // before destroying its context @@ -100,6 +114,7 @@ const deploySafe = async (createSafeForm: any, threshold: number, numOwners: num const aDeployedSafe = async (specificStore: Store, threshold?: number = 1, numOwners?: number = 1) => { const safe: React.Component<{}> = await renderOpenSafeForm(specificStore) + await sleep(1500) const safeAddress = await deploySafe(safe, threshold, numOwners) return safeAddress diff --git a/src/test/safe.dom.funds.threshold>1.test.js b/src/test/safe.dom.funds.threshold>1.test.js index a1ed2088..25ab2ded 100644 --- a/src/test/safe.dom.funds.threshold>1.test.js +++ b/src/test/safe.dom.funds.threshold>1.test.js @@ -1,5 +1,5 @@ // @flow -import { fireEvent } from '@testing-library/react' +import { fireEvent, waitForElement } from '@testing-library/react' import { aNewStore } from '~/store' import { aMinedSafe } from '~/test/builder/safe.redux.builder' import { sendEtherTo } from '~/test/utils/tokenMovements' @@ -59,18 +59,20 @@ describe('DOM > Feature > Sending Funds', () => { expect(txRows.length).toBe(1) fireEvent.click(txRows[0]) - await sleep(100) - fireEvent.click(SafeDom.getByTestId(CONFIRM_TX_BTN_TEST_ID)) - await sleep(100) + + const confirmBtn = await waitForElement(() => SafeDom.getByTestId(CONFIRM_TX_BTN_TEST_ID)) + fireEvent.click(confirmBtn) // Travel confirm modal - fireEvent.click(SafeDom.getByTestId(APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID)) - await sleep(2000) + const approveTxBtn = await waitForElement(() => SafeDom.getByTestId(APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID)) + fireEvent.click(approveTxBtn) // EXECUTE TX - fireEvent.click(SafeDom.getByTestId(EXECUTE_TX_BTN_TEST_ID)) - await sleep(100) - fireEvent.click(SafeDom.getByTestId(APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID)) + const executeTxBtn = await waitForElement(() => SafeDom.getByTestId(EXECUTE_TX_BTN_TEST_ID)) + fireEvent.click(executeTxBtn) + + const confirmReviewTxBtn = await waitForElement(() => SafeDom.getByTestId(APPROVE_TX_MODAL_SUBMIT_BTN_TEST_ID)) + fireEvent.click(confirmReviewTxBtn) await sleep(500) // THEN From 60e2bb0fcff7e6a532f64bedc2c8eed708b1c4fd Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 20 Sep 2019 18:05:05 +0400 Subject: [PATCH 28/35] Fix tests (finally) --- scripts/test.js | 1 + src/routes/open/utils/safeDataExtractor.js | 7 ++++--- src/routes/safe/container/selector.js | 2 +- src/test/safe.dom.settings.owners.test.js | 10 ++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/test.js b/scripts/test.js index ff7207c1..76223eff 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -11,6 +11,7 @@ require('dotenv').config({ silent: true }) const jest = require('jest') const argv = process.argv.slice(2) +argv.push('--runInBand') // Watch unless on CI or in coverage mode if (!process.env.CI && argv.indexOf('--coverage') < 0) { diff --git a/src/routes/open/utils/safeDataExtractor.js b/src/routes/open/utils/safeDataExtractor.js index b20f070f..b555b5fb 100644 --- a/src/routes/open/utils/safeDataExtractor.js +++ b/src/routes/open/utils/safeDataExtractor.js @@ -1,5 +1,6 @@ // @flow -import { makeOwner } from '~/routes/safe/store/models/owner' +import { List } from 'immutable' +import { makeOwner, type Owner } from '~/routes/safe/store/models/owner' export const getAccountsFrom = (values: Object): string[] => { const accounts = Object.keys(values) @@ -17,10 +18,10 @@ export const getNamesFrom = (values: Object): string[] => { return accounts.map((account) => values[account]).slice(0, values.owners) } -export const getOwnersFrom = (names: string[], addresses: string[]): Array => { +export const getOwnersFrom = (names: string[], addresses: string[]): List => { const owners = names.map((name: string, index: number) => makeOwner({ name, address: addresses[index] })) - return owners + return List(owners) } export const getThresholdFrom = (values: Object): number => Number(values.confirmations) diff --git a/src/routes/safe/container/selector.js b/src/routes/safe/container/selector.js index e0fa4ff4..efaee36b 100644 --- a/src/routes/safe/container/selector.js +++ b/src/routes/safe/container/selector.js @@ -59,7 +59,7 @@ export const grantedSelector: Selector = crea return false } - const owners: List = safe.get('owners') + const { owners }: List = safe if (!owners) { return false } diff --git a/src/test/safe.dom.settings.owners.test.js b/src/test/safe.dom.settings.owners.test.js index 7b838499..3a789276 100644 --- a/src/test/safe.dom.settings.owners.test.js +++ b/src/test/safe.dom.settings.owners.test.js @@ -1,5 +1,5 @@ // @flow -import { fireEvent } from '@testing-library/react' +import { fireEvent, waitForElement } from '@testing-library/react' import { aNewStore } from '~/store' import { aMinedSafe } from '~/test/builder/safe.redux.builder' import { renderSafeView } from '~/test/builder/safe.dom.utils' @@ -55,17 +55,15 @@ describe('DOM > Feature > Settings - Manage owners', () => { await sleep(1300) // Travel to settings - const settingsBtn = SafeDom.getByTestId(SETTINGS_TAB_BTN_TEST_ID) + const settingsBtn = await waitForElement(() => SafeDom.getByTestId(SETTINGS_TAB_BTN_TEST_ID)) fireEvent.click(settingsBtn) - await sleep(200) // click on owners settings - const ownersSettingsBtn = SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID) + const ownersSettingsBtn = await waitForElement(() => SafeDom.getByTestId(OWNERS_SETTINGS_TAB_TEST_ID)) fireEvent.click(ownersSettingsBtn) - await sleep(200) // open rename owner modal - const renameOwnerBtn = SafeDom.getByTestId(RENAME_OWNER_BTN_TEST_ID) + const renameOwnerBtn = await waitForElement(() => SafeDom.getByTestId(RENAME_OWNER_BTN_TEST_ID)) fireEvent.click(renameOwnerBtn) // rename owner From 3ce3bde231dc8674b7de7dfb6f4a0102fcc06773 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 20 Sep 2019 18:08:27 +0400 Subject: [PATCH 29/35] Clear filter on sidebar close --- src/components/Sidebar/index.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 2f90d538..30aeb636 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -19,7 +19,7 @@ import useSidebarStyles from './style' import SafeList from './SafeList' import { WELCOME_ADDRESS } from '~/routes/routes' -const { useState } = React +const { useState, useEffect } = React type TSidebarContext = { isOpen: boolean, @@ -51,6 +51,10 @@ const Sidebar = ({ const [filter, setFilter] = useState('') const classes = useSidebarStyles() + useEffect(() => { + setFilter('') + }, [isOpen]) + const searchClasses = { input: classes.searchInput, root: classes.searchRoot, From fbb89bb32d6f66d7d0fff63914f8626680454043 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 23 Sep 2019 14:38:45 +0400 Subject: [PATCH 30/35] Dep bump, header border-bottom/shadow updates, clear filter in sideBar after 300ms after closing so user doesn\'t see the changes --- package.json | 14 +- src/components/Header/component/Layout.jsx | 3 +- src/components/Sidebar/index.jsx | 4 +- src/test/safe.dom.sidebar.test.js | 0 yarn.lock | 240 ++++++++++++--------- 5 files changed, 150 insertions(+), 111 deletions(-) create mode 100644 src/test/safe.dom.sidebar.test.js diff --git a/package.json b/package.json index 02ce4d01..828bf019 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ ], "dependencies": { "@gnosis.pm/safe-contracts": "^1.0.0", - "@gnosis.pm/util-contracts": "2.0.2", - "@material-ui/core": "4.4.2", - "@material-ui/icons": "4.4.1", + "@gnosis.pm/util-contracts": "2.0.4", + "@material-ui/core": "4.4.3", + "@material-ui/icons": "4.4.3", "@testing-library/jest-dom": "4.1.0", "@welldone-software/why-did-you-render": "3.3.5", "axios": "0.19.0", @@ -51,7 +51,7 @@ "react-dom": "16.9.0", "react-final-form": "6.3.0", "react-final-form-listeners": "^1.0.2", - "react-hot-loader": "4.12.13", + "react-hot-loader": "4.12.14", "react-infinite-scroll-component": "4.5.3", "react-qr-reader": "^2.2.1", "react-redux": "7.1.1", @@ -115,7 +115,7 @@ "ethereumjs-abi": "0.6.8", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "4.2.0", - "flow-bin": "0.107.0", + "flow-bin": "0.108.0", "fs-extra": "8.1.0", "html-loader": "^0.5.5", "html-webpack-plugin": "^3.0.4", @@ -132,13 +132,13 @@ "storybook-host": "5.1.0", "storybook-router": "^0.3.3", "style-loader": "1.0.0", - "truffle": "5.0.36", + "truffle": "5.0.37", "truffle-contract": "4.0.31", "truffle-solidity-loader": "0.1.32", "uglifyjs-webpack-plugin": "2.2.0", "url-loader": "^2.1.0", "webpack": "4.40.2", - "webpack-bundle-analyzer": "3.5.0", + "webpack-bundle-analyzer": "3.5.1", "webpack-cli": "3.3.9", "webpack-dev-server": "3.8.1", "webpack-manifest-plugin": "^2.0.0-rc.2" diff --git a/src/components/Header/component/Layout.jsx b/src/components/Header/component/Layout.jsx index 17d8edc0..877647ea 100644 --- a/src/components/Header/component/Layout.jsx +++ b/src/components/Header/component/Layout.jsx @@ -35,9 +35,10 @@ const styles = () => ({ left: '4px', }, summary: { - borderBottom: `solid 1px ${border}`, + borderBottom: `solid 2px ${border}`, alignItems: 'center', height: headerHeight, + boxShadow: '0 2px 4px 0 rgba(212, 212, 211, 0.59)', backgroundColor: 'white', zIndex: 1301, }, diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 30aeb636..bd6d7ef8 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -52,7 +52,9 @@ const Sidebar = ({ const classes = useSidebarStyles() useEffect(() => { - setFilter('') + setTimeout(() => { + setFilter('') + }, 300) }, [isOpen]) const searchClasses = { diff --git a/src/test/safe.dom.sidebar.test.js b/src/test/safe.dom.sidebar.test.js new file mode 100644 index 00000000..e69de29b diff --git a/yarn.lock b/yarn.lock index eaade6fb..6b44d191 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1522,10 +1522,10 @@ solc "^0.5.0" truffle-hdwallet-provider "0.0.7-beta.1" -"@gnosis.pm/util-contracts@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@gnosis.pm/util-contracts/-/util-contracts-2.0.2.tgz#a85c0f673b03666cc81ea3e85ba66550799bae7b" - integrity sha512-DlKWeOEJbYNkZQBtliqoIxY4DcrtUrfB1/JiZV15vUXsYTnPatGwOG+V3K3J5kqnebpOmIPvRp2AkLSlTaKOhQ== +"@gnosis.pm/util-contracts@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@gnosis.pm/util-contracts/-/util-contracts-2.0.4.tgz#fe16753f13f1a7382d9005b7ce18f4dd8b6a0177" + integrity sha512-v+gpWDW0hZ9nZ2FgDI5cfkpXZIsVXP51SXzVLdres6GrERcYx+WJsz2RqIQ1nyehKTyS+el1TTkhIKdbBAFtDg== "@icons/material@^0.2.4": version "0.2.4" @@ -1707,14 +1707,14 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@material-ui/core@4.4.2": - version "4.4.2" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.4.2.tgz#66a9423e533833d2867827e6fdf526adbdceb7c0" - integrity sha512-hnZ4SP/hWJ9sUoNMkStz/y/CL2c7j4JpVIB2py3+vpBFU9TgHL3noBk3Fr0gltRvvlYA9ekpiGsGZ2ukk1R7Eg== +"@material-ui/core@4.4.3": + version "4.4.3" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.4.3.tgz#65665d2c4e9cb84e018774e1471f6d0417f4535e" + integrity sha512-Lz8sMFeCrtq5/pbhqClWFHpveL0huixjca0tw7uvh9xKKB7VyyYOyTu7RamSZLxb34UCSMPlobR+KK25Nqzkqw== dependencies: "@babel/runtime" "^7.4.4" - "@material-ui/styles" "^4.4.1" - "@material-ui/system" "^4.3.3" + "@material-ui/styles" "^4.4.3" + "@material-ui/system" "^4.4.3" "@material-ui/types" "^4.1.1" "@material-ui/utils" "^4.4.0" "@types/react-transition-group" "^4.2.0" @@ -1726,20 +1726,19 @@ normalize-scroll-left "^0.2.0" popper.js "^1.14.1" prop-types "^15.7.2" - react-transition-group "^4.0.0" - warning "^4.0.1" + react-transition-group "^4.3.0" -"@material-ui/icons@4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.4.1.tgz#a09d53275a5d73a77ee621f91c005a1793432df7" - integrity sha512-ilo6rSgsI3B5L7s1H3tBS1x77sJqPql3QJDYzVi2TVluZLCTfRKjpbYYDUwolEAQC0MzXLjVbXHqJ97VeJqpmQ== +"@material-ui/icons@4.4.3": + version "4.4.3" + resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.4.3.tgz#5d4346ddbb2673a1b57ebc78fd6d50bcd88711db" + integrity sha512-HVVvUyc/78kmaBd93LkfWyGkXMM+zOMKzUfulWXxaV/fFAZ3N0pD0oHjWUd94zrOoF3tZP9JC7EPlIpIcZSNow== dependencies: "@babel/runtime" "^7.4.4" -"@material-ui/styles@^4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.4.1.tgz#a53fb39e373636bd2c296a78c54afecb80f68446" - integrity sha512-wXASlta7G+N8NeihbAKQjL6E1XMkS3SWpksNKn1cxhmKYQ+5pkMAUW/rChC5ovG7C/C2ZIdajYgOz977m3xlBA== +"@material-ui/styles@^4.4.3": + version "4.4.3" + resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.4.3.tgz#78239177723660093cc9a277db5759c01c693c2a" + integrity sha512-kNUdHFWsrvWKIEPx8Xy2/qayqsGMrYmCMq+FIiJiYczVZl5hiS8j5+KayonnpVta/O+Dktk+cxWkVcgwtxMrHg== dependencies: "@babel/runtime" "^7.4.4" "@emotion/hash" "^0.7.1" @@ -1749,26 +1748,24 @@ csstype "^2.5.2" deepmerge "^4.0.0" hoist-non-react-statics "^3.2.1" - jss "10.0.0-alpha.24" - jss-plugin-camel-case "10.0.0-alpha.24" - jss-plugin-default-unit "10.0.0-alpha.24" - jss-plugin-global "10.0.0-alpha.24" - jss-plugin-nested "10.0.0-alpha.24" - jss-plugin-props-sort "10.0.0-alpha.24" - jss-plugin-rule-value-function "10.0.0-alpha.24" - jss-plugin-vendor-prefixer "10.0.0-alpha.24" + jss "10.0.0-alpha.25" + jss-plugin-camel-case "10.0.0-alpha.25" + jss-plugin-default-unit "10.0.0-alpha.25" + jss-plugin-global "10.0.0-alpha.25" + jss-plugin-nested "10.0.0-alpha.25" + jss-plugin-props-sort "10.0.0-alpha.25" + jss-plugin-rule-value-function "10.0.0-alpha.25" + jss-plugin-vendor-prefixer "10.0.0-alpha.25" prop-types "^15.7.2" - warning "^4.0.1" -"@material-ui/system@^4.3.3": - version "4.3.3" - resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.3.3.tgz#8534fe76adbd3938a8dea833e69d84a7a143ecff" - integrity sha512-j7JyvlhcTdc1wV6HzrDTU7XXlarxYXEUyzyHawOA0kCGmYVN2uFHENQRARLUdl+mEmuXO4TsAhNAiqiKakkFMg== +"@material-ui/system@^4.4.3": + version "4.4.3" + resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.4.3.tgz#68ca8cf83614255fcd5b9d3a72ce8ee58a43a5c7" + integrity sha512-Cb05vLXsaCzssXD/iZKa0/qC6YOwbFWnYdnOEdkXZ3Fn2Ytz7rsnMgFejUSQV1luVhUBlEIm8DVz40N25WwW7w== dependencies: "@babel/runtime" "^7.4.4" deepmerge "^4.0.0" prop-types "^15.7.2" - warning "^4.0.1" "@material-ui/types@^4.1.1": version "4.1.1" @@ -6202,12 +6199,12 @@ css-unit-converter@^1.1.1: resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996" integrity sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY= -css-vendor@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.5.tgz#949c58fd5307e79a9417daa0939506f0e5d0a187" - integrity sha512-36w+4Cg0zqFIt5TAkaM3proB6XWh5kSGmbddRCPdrRLQiYNfHPTgaWPOlCrcuZIO0iAtrG+5wsHJZ6jj8AUULA== +css-vendor@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.6.tgz#a205f73d7562e8728c86ef6ce5ee7c7e5eefd71b" + integrity sha512-buv8FoZh84iMrtPHYGYll00/qSNV0gYO6E/GUCjUPTsSPj7uf/wot/QZwig+7qdFGxJ7HjOSJoclbhag09TVUQ== dependencies: - "@babel/runtime" "^7.3.1" + "@babel/runtime" "^7.5.5" is-in-browser "^1.0.2" css-what@2.1, css-what@^2.1.2: @@ -6334,7 +6331,7 @@ cssstyle@^1.0.0: dependencies: cssom "0.3.x" -csstype@^2.2.0, csstype@^2.5.2, csstype@^2.5.7, csstype@^2.6.5: +csstype@^2.2.0, csstype@^2.5.2, csstype@^2.5.7, csstype@^2.6.5, csstype@^2.6.6: version "2.6.6" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.6.tgz#c34f8226a94bbb10c32cc0d714afdf942291fc41" integrity sha512-RpFbQGUE74iyPgvr46U9t1xoQBM8T4BL8SxrN66Le2xYAPSaDJJKeztV3awugusb3g3G9iL8StmkBBXhcbbXhg== @@ -6796,6 +6793,14 @@ dom-helpers@^3.4.0: dependencies: "@babel/runtime" "^7.1.2" +dom-helpers@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.0.tgz#57a726de04abcc2a8bbfe664b3e21c584bde514e" + integrity sha512-zRRYDhpiKuAJHasOqCm7lBnsd22nrM4+OYI4ASWCxen+ocTMl7BIAKgGag97TlLiTl6rrau5aPe1VGUm9jQBng== + dependencies: + "@babel/runtime" "^7.5.5" + csstype "^2.6.6" + dom-serializer@0, dom-serializer@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" @@ -7215,6 +7220,13 @@ eslint-config-airbnb@18.0.1: object.assign "^4.1.0" object.entries "^1.1.0" +eslint-config-prettier@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz#e73b48e59dc49d950843f3eb96d519e2248286a3" + integrity sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A== + dependencies: + get-stdin "^6.0.0" + eslint-import-resolver-node@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" @@ -7277,6 +7289,13 @@ eslint-plugin-jsx-a11y@6.2.3: has "^1.0.3" jsx-ast-utils "^2.2.1" +eslint-plugin-prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz#507b8562410d02a03f0ddc949c616f877852f2ba" + integrity sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-plugin-react@7.14.3: version "7.14.3" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz#911030dd7e98ba49e1b2208599571846a66bdf13" @@ -8150,6 +8169,11 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^2.0.2: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -8455,10 +8479,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== -flow-bin@0.107.0: - version "0.107.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.107.0.tgz#b37bfcce51204d35d58f8eb93b3a76b52291e4cc" - integrity sha512-hsmwO5Q0+XUXaO2kIKLpleUNNBSFcsGEQGBOTEC/KR/4Ez695I1fweX/ioSjbU4RWhPZhkIqnpbF9opVAauCHg== +flow-bin@0.108.0: + version "0.108.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.108.0.tgz#6a42c85fd664d23dd937d925851e8e6ab5d71393" + integrity sha512-hPEyCP1J8rdhNDfCAA5w7bN6HUNBDcHVg/ABU5JVo0gUFMx+uRewpyEH8LlLBGjVQuIpbaPpaqpoaQhAVyaYww== flow-stoplight@^1.0.0: version "1.0.0" @@ -8851,6 +8875,11 @@ get-params@^0.1.2: resolved "https://registry.yarnpkg.com/get-params/-/get-params-0.1.2.tgz#bae0dfaba588a0c60d7834c0d8dc2ff60eeef2fe" integrity sha1-uuDfq6WIoMYNeDTA2Nwv9g7u8v4= +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stdin@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" @@ -11232,69 +11261,69 @@ jsqr@^1.2.0: resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.2.0.tgz#f93fc65fa7d1ded78b1bcb020fa044352b04261a" integrity sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg== -jss-plugin-camel-case@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.0-alpha.24.tgz#579a48989d2628ee8baaa006449b1b82d32ee27e" - integrity sha512-cRYLbGl6oO9wdGXp3hn+xqc8pw8bjaui25dDYuEeEsRZMh5/OKl3ByYxDT3PLKgFqouy5Xo+YmLGVH8l+nnEdQ== +jss-plugin-camel-case@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.0-alpha.25.tgz#ea4389de47ccf3b4757f76e62cbb2e8b96b7a2c2" + integrity sha512-J5ZEGDTy9ddqdTUPAF4SJQ25u5kiG1ORP8F+ZPEZAkkiMQJp+/Aol4I7xhTS2aW1Lhg8xNxdhdRfBi5yU7wOvg== dependencies: "@babel/runtime" "^7.3.1" hyphenate-style-name "^1.0.3" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" -jss-plugin-default-unit@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.0-alpha.24.tgz#3e6e24e8ec7aaa950c8975f1645ea861b8aa338e" - integrity sha512-1E1XlJqJ/9I1lR5EO/tA75U1LIIicKvW6xZEKLxAP8NC/rUjI+yBQBTBJn61LOpua51e7fgW8me46Z+iuXiC4A== +jss-plugin-default-unit@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.0-alpha.25.tgz#df5b39bbc0114146101bb3cf8bc7e281e3d0f454" + integrity sha512-auOG459B+yEqkojgaXH02SYO9+xjmAxlmP+WbzhVpXqOFJ2CN/kaxd8P4NJZLdj3BQxHiM7WIyMVh786StE+EA== dependencies: "@babel/runtime" "^7.3.1" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" -jss-plugin-global@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.0.0-alpha.24.tgz#a53e2028d0cb073661e8213f2e622fef9ef4b1fa" - integrity sha512-3LoxrZloF4tvXrS5S7enV9OhtaxXsEP3BQdiE76vI/ecCmgNDZNpnPd8MG20ptn2iAOsoMGfoMX20Ea1IKl/Mg== +jss-plugin-global@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-global/-/jss-plugin-global-10.0.0-alpha.25.tgz#2b6a6a14ef6cdb9994dbadf709e480d5c871b5f6" + integrity sha512-cS98Q8X8jwltuaBZd9eYuxMXxkUL+mJGl2Ok3/nmJzH9nLzj6i7kLxSoDtuJNqsRmbP7ogIXVozJUq9lUu2hlQ== dependencies: "@babel/runtime" "^7.3.1" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" -jss-plugin-nested@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.0.0-alpha.24.tgz#f1b4a0bd1050e29d627c9bc2dc0f424c35f0aa44" - integrity sha512-BWU6NaRZTVSJc7N+3FeHacdkFOjCMThouoRQPCWVxeT0nmAVlVGwgYzChcI+vzncx+UaRQC0x+01FYhVQ2xAFA== +jss-plugin-nested@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-nested/-/jss-plugin-nested-10.0.0-alpha.25.tgz#b8e29d336e1850047914511681d56330e3ea24ac" + integrity sha512-7sk7/6mX1YTgXe+AyeD1zEyKTgIGbbhYtg+wWQcHJlE1flW2JHfcQ5mw84FgHcHQRQ8Dq3l9I3aEY51ev0J1Wg== dependencies: "@babel/runtime" "^7.3.1" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" tiny-warning "^1.0.2" -jss-plugin-props-sort@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.0-alpha.24.tgz#e309e286004b6e059c373efaa308b8742e22ec16" - integrity sha512-TB4RpXwnGSEE58rN2RRzcWqhIaz0oAS1UBg10mk1fuLpkKyHEJWuuZXzgGih23Ivl/8LDVzTF+QRY5JagMUUGg== +jss-plugin-props-sort@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.0-alpha.25.tgz#dfaa1a6bf9863ae9593b99bf51cd26caea2fe0ec" + integrity sha512-8B/6QLQuUX8cIlZbXdjEm5l0jCX4EgacYMcFJhdKwDKEZYeAghpgQQrCKl0/CYHW7iFge5wim67P+uL6QxMzyw== dependencies: "@babel/runtime" "^7.3.1" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" -jss-plugin-rule-value-function@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.0-alpha.24.tgz#85bfd5f994647cb4bf2237d18232421ea362665c" - integrity sha512-uFw4tf8PN48bdv4ZcDjG3OzKPIFZ4gpCC1cWO/dyexYfFIubX3bnQUbK4B0wPNe9LJU4KQo8s4F42B8B1ADTrA== +jss-plugin-rule-value-function@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.0-alpha.25.tgz#35350da52334a6031808e197526227434c194277" + integrity sha512-CQQtWO+/OZRGaFRBSGQUgAci9YlVtdoXcWQKBNo70tmpp+kaXKlFNCYaL3jmHbJHMiwKQYG2RYFQNIrwJ9SGmA== dependencies: "@babel/runtime" "^7.3.1" - jss "10.0.0-alpha.24" + jss "10.0.0-alpha.25" -jss-plugin-vendor-prefixer@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.0-alpha.24.tgz#c4c2c28667d3c7c0d9a01ca1f7a2f74367d1ceef" - integrity sha512-hffKj0kSSvZsXs6RYEylpBlEGjryMzU1lsWqC5vQAT/Xb3tDe60BbEarEOFLBGv7EfyajXkuRwlXAQocV5ejCg== +jss-plugin-vendor-prefixer@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.0-alpha.25.tgz#bc0c4b6dcb28d4801775cbad70ad9bc7e0c7707b" + integrity sha512-5FXpB/TiwckbrkoDCmd27YsWCESl1K4hAX/oro2/geEXgnVQvDgQOf2eWCsjYO2K1lYPPXtskMfws/Q3eKmbYg== dependencies: "@babel/runtime" "^7.3.1" - css-vendor "^2.0.5" - jss "10.0.0-alpha.24" + css-vendor "^2.0.6" + jss "10.0.0-alpha.25" -jss@10.0.0-alpha.24: - version "10.0.0-alpha.24" - resolved "https://registry.yarnpkg.com/jss/-/jss-10.0.0-alpha.24.tgz#f8e2044b6b2f034db05a685d99c599095baf8b61" - integrity sha512-kfuSitcj7MTrDtSPLkrWcZppgZlTE3A+cqrkC+Z10WYROt0RXIWINAaK8tE2ohwkDfUlaM1YcRYvV3iT6YNFTA== +jss@10.0.0-alpha.25: + version "10.0.0-alpha.25" + resolved "https://registry.yarnpkg.com/jss/-/jss-10.0.0-alpha.25.tgz#20a506d8159e3f6bd91e133d54ffd3df0ffd3010" + integrity sha512-zqKnXv181B9vue2yYhmVhc+6ggbbxHF/33rjXfXEjaa22nOvknTI21QDfq3oZ8uCC50kcFp3Z8KU1ghUXdFvIA== dependencies: "@babel/runtime" "^7.3.1" csstype "^2.6.5" @@ -14055,6 +14084,13 @@ prettier-eslint@^9.0.0: typescript "^3.2.1" vue-eslint-parser "^2.0.2" +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^1.7.0: version "1.18.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" @@ -14611,10 +14647,10 @@ react-helmet-async@^1.0.2: react-fast-compare "2.0.4" shallowequal "1.1.0" -react-hot-loader@4.12.13: - version "4.12.13" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.13.tgz#78dcb55f49f88ce3d4316c7c86a8c01fdd196cd2" - integrity sha512-4Byk3aVQhcmTnVCBvDHOEOUnMFMj81r2yRKZQSfLOG2yd/4hm/A3oK15AnCZilQExqSFSsHcK64lIIU+dU2zQQ== +react-hot-loader@4.12.14: + version "4.12.14" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.14.tgz#81ca06ffda0b90aad15d6069339f73ed6428340a" + integrity sha512-ecxH4eBvEaJ9onT8vkEmK1FAAJUh1PqzGqds9S3k+GeihSp7nKAp4fOxytO+Ghr491LiBD38jaKyDXYnnpI9pQ== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" @@ -14822,13 +14858,13 @@ react-transition-group@^2.2.1: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -react-transition-group@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.2.1.tgz#61fc9e36568bff9a1fe4e60fae323c8a6dbc0680" - integrity sha512-IXrPr93VzCPupwm2O6n6C2kJIofJ/Rp5Ltihhm9UfE8lkuVX2ng/SUUl/oWjblybK9Fq2Io7LGa6maVqPB762Q== +react-transition-group@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" + integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw== dependencies: - "@babel/runtime" "^7.4.5" - dom-helpers "^3.4.0" + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" loose-envify "^1.4.0" prop-types "^15.6.2" @@ -17778,10 +17814,10 @@ truffle-workflow-compile@^2.1.3: truffle-external-compile "^1.0.15" truffle-resolver "^5.0.15" -truffle@5.0.36: - version "5.0.36" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.36.tgz#ca8361be8e62cc351c42867d7e25fd66a1541f96" - integrity sha512-lcEFJYf+HzdGsIp+YS9g5mSW1wpKlkBfqu/DHFUmbzvTPV5nxKXkKCYlwWjo20lNAOBTErFtwNpw4+EOaBJVRA== +truffle@5.0.37: + version "5.0.37" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.37.tgz#10da6f1bb9e661c4ccec75c295554bc4434f6b18" + integrity sha512-od3mnu6sCV7sYbJCLSDV66RZ4bYeuLQ1QDpjGQHyJMB5AIw+u8GnxBmj6MKBOWHC+zixnwkRwS9yTYpj5IObFg== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -19490,10 +19526,10 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-bundle-analyzer@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.5.0.tgz#c82130a490a05f9267aa5956871aef574dff5074" - integrity sha512-NzueflueLSJxWGzDlMq5oUV+P8Qoq6yiaQlXGCbDYUpHEKlmzWdPLBJ4k/B6HTdAP/vHM8ply1Fx08mDnY+S8Q== +webpack-bundle-analyzer@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.5.1.tgz#84aabb1547178d842ebb4ccc7324084b6c3b0ea9" + integrity sha512-CDdaT3TTu4F9X3tcDq6PNJOiNGgREOM0WdN2vVAoUUn+M6NLB5kJ543HImCWbrDwOpbpGARSwU8r+u0Pl367kA== dependencies: acorn "^6.0.7" acorn-walk "^6.1.1" From 6d1c44bc3903736a463b7566a17b08a5363a1650 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 23 Sep 2019 15:26:16 +0400 Subject: [PATCH 31/35] Sort safes alphabetically in the sidebar --- src/components/Sidebar/index.jsx | 5 +- src/components/Sidebar/selectors.js | 11 ++ src/components/Sidebar/style.js | 2 +- src/routes/safe/test/Safe.threshold.test.js | 130 -------------------- src/routes/safe/test/testMultisig.js | 9 -- src/test/safe.dom.sidebar.test.js | 1 + 6 files changed, 16 insertions(+), 142 deletions(-) create mode 100644 src/components/Sidebar/selectors.js delete mode 100644 src/routes/safe/test/Safe.threshold.test.js delete mode 100644 src/routes/safe/test/testMultisig.js diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index bd6d7ef8..07f3f9d1 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -13,8 +13,9 @@ import Spacer from '~/components/Spacer' import Hairline from '~/components/layout/Hairline' import Row from '~/components/layout/Row' import { type Safe } from '~/routes/safe/store/models/safe' -import { safesListSelector, defaultSafeSelector } from '~/routes/safe/store/selectors' +import { defaultSafeSelector } from '~/routes/safe/store/selectors' import setDefaultSafe from '~/routes/safe/store/actions/setDefaultSafe' +import { sortedSafeListSelector } from './selectors' import useSidebarStyles from './style' import SafeList from './SafeList' import { WELCOME_ADDRESS } from '~/routes/routes' @@ -136,6 +137,6 @@ const Sidebar = ({ export default connect( // $FlowFixMe - (state) => ({ safes: safesListSelector(state), defaultSafe: defaultSafeSelector(state) }), + (state) => ({ safes: sortedSafeListSelector(state), defaultSafe: defaultSafeSelector(state) }), { setDefaultSafeAction: setDefaultSafe }, )(Sidebar) diff --git a/src/components/Sidebar/selectors.js b/src/components/Sidebar/selectors.js new file mode 100644 index 00000000..1c6e56c3 --- /dev/null +++ b/src/components/Sidebar/selectors.js @@ -0,0 +1,11 @@ +// @flow +import { List } from 'immutable' +import { createSelector, type Selector } from 'reselect' +import { type Safe } from '~/routes/safe/store/models/safe' +import { safesListSelector } from '~/routes/safe/store/selectors' +import { type GlobalState } from '~/store/index' + +export const sortedSafeListSelector: Selector> = createSelector( + safesListSelector, + (safes: List): List => safes.sort((a: Safe, b: Safe) => (a.name > b.name ? 1 : -1)), +) diff --git a/src/components/Sidebar/style.js b/src/components/Sidebar/style.js index 010086d5..1083a530 100644 --- a/src/components/Sidebar/style.js +++ b/src/components/Sidebar/style.js @@ -14,7 +14,7 @@ const useSidebarStyles = makeStyles({ width: sidebarWidth, }, headerPlaceholder: { - height: headerHeight, // for some reason it didn't want to work with an imported variable 🤔 + minHeight: headerHeight, }, addSafeBtn: { fontSize: mediumFontSize, diff --git a/src/routes/safe/test/Safe.threshold.test.js b/src/routes/safe/test/Safe.threshold.test.js deleted file mode 100644 index 33632e2c..00000000 --- a/src/routes/safe/test/Safe.threshold.test.js +++ /dev/null @@ -1,130 +0,0 @@ -// @flow -/* -import { aNewStore } from '~/store' -import { aDeployedSafe } from '~/routes/safe/store/test/builder/deployedSafe.builder' -import { getWeb3 } from '~/logic/wallets/getWeb3' -import { sleep } from '~/utils/timer' -import { type Match } from 'react-router-dom' -import { promisify } from '~/utils/promisify' -import { processTransaction } from '~/routes/safe/component/Transactions/processTransactions' -import { - confirmationsTransactionSelector, - safeSelector, - safeTransactionsSelector -} from '~/routes/safe/store/selectors' -import { getTransactionFromReduxStore } from '~/routes/safe/test/testMultisig' -import { buildMathPropsFrom } from '~/test/utils/buildReactRouterProps' -import { createTransaction } from '~/wallets/createTransactions' -import { getGnosisSafeInstanceAt } from '~/wallets/safeContracts' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' -*/ -describe('React DOM TESTS > Change threshold', () => { - it('should update the threshold directly if safe has 1 threshold', async () => {}) -}) - -/* - // GIVEN - const numOwners = 2 - const threshold = 1 - const store = aNewStore() - const address = await aDeployedSafe(store, 10, threshold, numOwners) - const accounts = await promisify(cb => getWeb3().eth.getAccounts(cb)) - const match: Match = buildMathPropsFrom(address) - const safe = safeSelector(store.getState(), { match }) - if (!safe) throw new Error() - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - - // WHEN - const nonce = Date.now() - const data = gnosisSafe.contract.changeThreshold.getData(2) - await createTransaction(safe, "Change Safe's threshold", address, 0, nonce, accounts[0], data) - await sleep(1500) - await store.dispatch(fetchTransactions()) - - // THEN - const transactions = safeTransactionsSelector(store.getState(), { safeAddress: address }) - expect(transactions.count()).toBe(1) - - const thresholdTx = transactions.get(0) - if (!thresholdTx) throw new Error() - expect(thresholdTx.get('tx')).not.toBe(null) - expect(thresholdTx.get('tx')).not.toBe(undefined) - expect(thresholdTx.get('tx')).not.toBe('') - - const safeThreshold = await gnosisSafe.getThreshold() - expect(Number(safeThreshold)).toEqual(2) - }) - - const changeThreshold = async (store, safeAddress, executor) => { - const tx = getTransactionFromReduxStore(store, safeAddress) - if (!tx) throw new Error() - const confirmed = confirmationsTransactionSelector(store.getState(), { transaction: tx }) - const data = tx.get('data') - expect(data).not.toBe(null) - expect(data).not.toBe(undefined) - expect(data).not.toBe('') - await processTransaction(safeAddress, tx, confirmed, executor) - await sleep(1800) - } - - it('should wait for confirmation to update threshold when safe has 1+ threshold', async () => { - // GIVEN - const numOwners = 3 - const threshold = 2 - const store = aNewStore() - const address = await aDeployedSafe(store, 10, threshold, numOwners) - const accounts = await promisify(cb => getWeb3().eth.getAccounts(cb)) - const match: Match = buildMathPropsFrom(address) - const safe = safeSelector(store.getState(), { match }) - if (!safe) throw new Error() - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - - // WHEN - const nonce = Date.now() - const data = gnosisSafe.contract.changeThreshold.getData(3) - await createTransaction(safe, "Change Safe's threshold", address, 0, nonce, accounts[0], data) - await sleep(1500) - await store.dispatch(fetchTransactions()) - - let transactions = safeTransactionsSelector(store.getState(), { safeAddress: address }) - if (!transactions) throw new Error() - expect(transactions.count()).toBe(1) - - let thresholdTx = transactions.get(0) - if (!thresholdTx) throw new Error() - expect(thresholdTx.get('tx')).toBe('') - let firstOwnerConfirmation = thresholdTx.get('confirmations').get(0) - if (!firstOwnerConfirmation) throw new Error() - expect(firstOwnerConfirmation.get('status')).toBe(true) - let secondOwnerConfirmation = thresholdTx.get('confirmations').get(1) - if (!secondOwnerConfirmation) throw new Error() - expect(secondOwnerConfirmation.get('status')).toBe(false) - - let safeThreshold = await gnosisSafe.getThreshold() - expect(Number(safeThreshold)).toEqual(2) - - // THEN - await changeThreshold(store, address, accounts[1]) - safeThreshold = await gnosisSafe.getThreshold() - expect(Number(safeThreshold)).toEqual(3) - - await store.dispatch(fetchTransactions()) - sleep(1200) - transactions = safeTransactionsSelector(store.getState(), { safeAddress: address }) - expect(transactions.count()).toBe(1) - - thresholdTx = transactions.get(0) - if (!thresholdTx) throw new Error() - expect(thresholdTx.get('tx')).not.toBe(undefined) - expect(thresholdTx.get('tx')).not.toBe(null) - expect(thresholdTx.get('tx')).not.toBe('') - - firstOwnerConfirmation = thresholdTx.get('confirmations').get(0) - if (!firstOwnerConfirmation) throw new Error() - expect(firstOwnerConfirmation.get('status')).toBe(true) - secondOwnerConfirmation = thresholdTx.get('confirmations').get(1) - if (!secondOwnerConfirmation) throw new Error() - expect(secondOwnerConfirmation.get('status')).toBe(true) - }) -}) -*/ diff --git a/src/routes/safe/test/testMultisig.js b/src/routes/safe/test/testMultisig.js deleted file mode 100644 index 2f9f1655..00000000 --- a/src/routes/safe/test/testMultisig.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow -import { safeTransactionsSelector } from '~/routes/safe/store/selectors/index' -import { type GlobalState } from '~/store/index' - -export const getTransactionFromReduxStore = (store: Store, address: string, index: number = 0) => { - const transactions = safeTransactionsSelector(store.getState(), { safeAddress: address }) - - return transactions.get(index) -} diff --git a/src/test/safe.dom.sidebar.test.js b/src/test/safe.dom.sidebar.test.js index e69de29b..46e7f7c0 100644 --- a/src/test/safe.dom.sidebar.test.js +++ b/src/test/safe.dom.sidebar.test.js @@ -0,0 +1 @@ +// @flow From 6e80d09d17efec6904f430517b9add078ed805d8 Mon Sep 17 00:00:00 2001 From: mmv Date: Mon, 23 Sep 2019 15:39:58 +0400 Subject: [PATCH 32/35] scrollable safelist in sidebar --- src/components/Sidebar/SafeList/index.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar/SafeList/index.jsx b/src/components/Sidebar/SafeList/index.jsx index b80ec7a5..1470af63 100644 --- a/src/components/Sidebar/SafeList/index.jsx +++ b/src/components/Sidebar/SafeList/index.jsx @@ -30,6 +30,12 @@ const useStyles = makeStyles({ icon: { marginRight: sm, }, + list: { + overflow: 'hidden', + overflowY: 'scroll', + padding: 0, + height: '100%', + }, listItemRoot: { paddingTop: 0, paddingBottom: 0, @@ -60,7 +66,7 @@ const SafeList = ({ const classes = useStyles() return ( - + {safes.map((safe) => ( From 0fd579f6b77a88e2845f3321e1c0dda60d6e50a9 Mon Sep 17 00:00:00 2001 From: mmv Date: Mon, 23 Sep 2019 16:57:44 +0400 Subject: [PATCH 33/35] Add default label test for sidebar --- .../Header/component/SafeListHeader/index.jsx | 9 +++++- src/components/Sidebar/SafeList/index.jsx | 4 ++- src/test/safe.dom.sidebar.test.js | 29 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/components/Header/component/SafeListHeader/index.jsx b/src/components/Header/component/SafeListHeader/index.jsx index 18abbb86..dafbf3da 100644 --- a/src/components/Header/component/SafeListHeader/index.jsx +++ b/src/components/Header/component/SafeListHeader/index.jsx @@ -13,6 +13,8 @@ import { import { safesCountSelector } from '~/routes/safe/store/selectors' import { SidebarContext } from '~/components/Sidebar' +export const TOGGLE_SIDEBAR_BTN_TESTID = 'TOGGLE_SIDEBAR_BTN' + const useStyles = makeStyles({ container: { flexGrow: 0, @@ -47,7 +49,12 @@ const SafeListHeader = ({ safesCount }: Props) => { {safesCount} - + {isOpen ? : } diff --git a/src/components/Sidebar/SafeList/index.jsx b/src/components/Sidebar/SafeList/index.jsx index 1470af63..8e2f1232 100644 --- a/src/components/Sidebar/SafeList/index.jsx +++ b/src/components/Sidebar/SafeList/index.jsx @@ -19,6 +19,8 @@ import { type Safe } from '~/routes/safe/store/models/safe' import { SAFELIST_ADDRESS } from '~/routes/routes' import DefaultBadge from './DefaultBadge' +export const SIDEBAR_SAFELIST_ROW_TESTID = 'SIDEBAR_SAFELIST_ROW_TESTID' + type SafeListProps = { safes: List, onSafeClick: Function, @@ -69,7 +71,7 @@ const SafeList = ({ {safes.map((safe) => ( - + diff --git a/src/test/safe.dom.sidebar.test.js b/src/test/safe.dom.sidebar.test.js index 46e7f7c0..6663e2bb 100644 --- a/src/test/safe.dom.sidebar.test.js +++ b/src/test/safe.dom.sidebar.test.js @@ -1 +1,30 @@ // @flow +import { act, fireEvent } from '@testing-library/react' +import { aNewStore } from '~/store' +import { aMinedSafe } from '~/test/builder/safe.redux.builder' +import { renderSafeView } from '~/test/builder/safe.dom.utils' +import '@testing-library/jest-dom/extend-expect' +import { TOGGLE_SIDEBAR_BTN_TESTID } from '~/components/Header/component/SafeListHeader' +import { SIDEBAR_SAFELIST_ROW_TESTID } from '~/components/Sidebar/SafeList' + +describe('DOM > Feature > Sidebar', () => { + let store + let safeAddress: string + beforeEach(async () => { + store = aNewStore() + safeAddress = await aMinedSafe(store) + }) + + it('Shows "default" label for a single safe', async () => { + const SafeDom = await renderSafeView(store, safeAddress) + + act(() => { + fireEvent.click(SafeDom.getByTestId(TOGGLE_SIDEBAR_BTN_TESTID)) + }) + + const safes = SafeDom.getAllByTestId(SIDEBAR_SAFELIST_ROW_TESTID) + expect(safes.length).toBe(1) + + expect(safes[0]).toContainElement(SafeDom.getByText('default')) + }) +}) From 957c06879f4ec7a25871776b0179fba8475ea84e Mon Sep 17 00:00:00 2001 From: mmv Date: Mon, 23 Sep 2019 18:53:13 +0400 Subject: [PATCH 34/35] Add default safe test --- src/test/builder/safe.redux.builder.js | 3 ++- src/test/safe.dom.sidebar.test.js | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/test/builder/safe.redux.builder.js b/src/test/builder/safe.redux.builder.js index 9839c6b2..23e7bd34 100644 --- a/src/test/builder/safe.redux.builder.js +++ b/src/test/builder/safe.redux.builder.js @@ -72,6 +72,7 @@ export const aMinedSafe = async ( store: Store, owners: number = 1, threshold: number = 1, + name: string = 'Safe Name', ): Promise => { const provider = await getProviderInfo() const walletRecord = makeProvider(provider) @@ -79,7 +80,7 @@ export const aMinedSafe = async ( const accounts = await getWeb3().eth.getAccounts() const form = { - [FIELD_NAME]: 'Safe Name', + [FIELD_NAME]: name, [FIELD_CONFIRMATIONS]: `${threshold}`, [FIELD_OWNERS]: `${owners}`, } diff --git a/src/test/safe.dom.sidebar.test.js b/src/test/safe.dom.sidebar.test.js index 6663e2bb..a6545a50 100644 --- a/src/test/safe.dom.sidebar.test.js +++ b/src/test/safe.dom.sidebar.test.js @@ -6,6 +6,7 @@ import { renderSafeView } from '~/test/builder/safe.dom.utils' import '@testing-library/jest-dom/extend-expect' import { TOGGLE_SIDEBAR_BTN_TESTID } from '~/components/Header/component/SafeListHeader' import { SIDEBAR_SAFELIST_ROW_TESTID } from '~/components/Sidebar/SafeList' +import { sleep } from '~/utils/timer' describe('DOM > Feature > Sidebar', () => { let store @@ -27,4 +28,28 @@ describe('DOM > Feature > Sidebar', () => { expect(safes[0]).toContainElement(SafeDom.getByText('default')) }) + + it('Changes default safe', async () => { + const SafeDom = await renderSafeView(store, safeAddress) + await aMinedSafe(store) + + await sleep(2000) + + act(() => { + fireEvent.click(SafeDom.getByTestId(TOGGLE_SIDEBAR_BTN_TESTID)) + }) + + const safes = SafeDom.getAllByTestId(SIDEBAR_SAFELIST_ROW_TESTID) + expect(safes.length).toBe(2) + + expect(safes[1]).toContainElement(SafeDom.getByText('default')) + expect(safes[0]).toContainElement(SafeDom.getByText('Make default')) + + act(() => { + fireEvent.click(SafeDom.getByText('Make default')) + }) + + expect(safes[0]).toContainElement(SafeDom.getByText('default')) + expect(safes[1]).toContainElement(SafeDom.getByText('Make default')) + }) }) From 16703e9f01fe39ee1c4c2ccdc4efce66d095a9f4 Mon Sep 17 00:00:00 2001 From: mmv Date: Tue, 24 Sep 2019 12:58:30 +0400 Subject: [PATCH 35/35] typo fixeS --- src/logic/safe/utils/safeStorage.js | 2 +- src/routes/index.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logic/safe/utils/safeStorage.js b/src/logic/safe/utils/safeStorage.js index 90fb7ab6..da498908 100644 --- a/src/logic/safe/utils/safeStorage.js +++ b/src/logic/safe/utils/safeStorage.js @@ -54,7 +54,7 @@ export const saveDefaultSafe = async (safeAddress: string): Promise => { await saveToStorage(DEFAULT_SAFE_KEY, safeAddress) } catch (err) { // eslint-disable-next-line - console.error('Error saving default save to storage: ', err) + console.error('Error saving default safe to storage: ', err) } } diff --git a/src/routes/index.js b/src/routes/index.js index c238ef8f..79bd4845 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -32,11 +32,11 @@ type RoutesProps = { } const Routes = ({ defaultSafe, location }: RoutesProps) => { - const [isInitialLoad, setIniitialLoad] = useState(true) + const [isInitialLoad, setInitialLoad] = useState(true) useEffect(() => { if (location.pathname !== '/') { - setIniitialLoad(false) + setInitialLoad(false) } }, []) @@ -54,7 +54,7 @@ const Routes = ({ defaultSafe, location }: RoutesProps) => { return } - setIniitialLoad(false) + setInitialLoad(false) if (defaultSafe) { return }