Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Integrate with Storybook (#2028)
Dominik Żegleń22d283caa2b7
diff --git a/package-lock.json b/package-lock.jsonindex 5e795a7652..731933c71b 100644--- a/package-lock.json+++ b/package-lock.json@@ -2976,36 +2976,916 @@}}},+ "@emotion/hash": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.6.3.tgz",+ "integrity": "sha1-DnpWBGJvxsbUrEBhovWsgNUCYqQ=",+ "dev": true+ },+ "@emotion/is-prop-valid": {+ "version": "0.6.2",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.6.2.tgz",+ "integrity": "sha1-p2oWsXT/A/jjon+vYlm6zSGgKtw=",+ "dev": true,+ "requires": {+ "@emotion/memoize": "^0.6.2"+ }+ },+ "@emotion/memoize": {+ "version": "0.6.2",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.6.2.tgz",+ "integrity": "sha1-E44AszLVGbTjB73tYVnlukiro64=",+ "dev": true+ },+ "@emotion/stylis": {+ "version": "0.6.8",+ "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.6.8.tgz",+ "integrity": "sha1-atTo0ysZtEDvpEgbu8uYqMEnZbs=",+ "dev": true+ },+ "@emotion/unitless": {+ "version": "0.6.3",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.6.3.tgz",+ "integrity": "sha1-ZWguaKgnAccO77ONf5QaLAv6kN4=",+ "dev": true+ },"@mrmlnc/readdir-enhanced": {"version": "2.2.1","resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz","integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==","dev": true,"requires": {- "call-me-maybe": "^1.0.1",- "glob-to-regexp": "^0.3.0"+ "call-me-maybe": "^1.0.1",+ "glob-to-regexp": "^0.3.0"+ }+ },+ "@nodelib/fs.stat": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz",+ "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==",+ "dev": true+ },+ "@samverschueren/stream-to-observable": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",+ "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==",+ "dev": true,+ "requires": {+ "any-observable": "^0.3.0"+ }+ },+ "@sindresorhus/is": {+ "version": "0.7.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz",+ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==",+ "dev": true+ },+ "@storybook/addons": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-4.0.0-alpha.8.tgz",+ "integrity": "sha512-36pSlNt6r1Fcw93FGNv2GWj6WAuqk0TPb7vOfLcZwupJXmOXfP/sUKy7Ez+LhAvj0F5mGpSqVY3zAyVVFftHlw==",+ "dev": true,+ "requires": {+ "@storybook/channels": "4.0.0-alpha.8",+ "global": "^4.3.2",+ "util-deprecate": "^1.0.2"+ }+ },+ "@storybook/channel-postmessage": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-4.0.0-alpha.8.tgz",+ "integrity": "sha512-5fARhaYGLTrpDLc5dLdksnvSz67l6FN0Hdc9xF7aRtyK5FTDqj6wXRq1/1PcOSIkeqXZMcNJmmBITByv8S/jdA==",+ "dev": true,+ "requires": {+ "@storybook/channels": "4.0.0-alpha.8",+ "global": "^4.3.2",+ "json-stringify-safe": "^5.0.1"+ }+ },+ "@storybook/channels": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-4.0.0-alpha.8.tgz",+ "integrity": "sha512-vW5OD3rEdwzkdiu67AhBS+FVjK+MDDykj7WJ5nXFBtKRHKaVCmEpasq9MwsJezjvsK37tJC+VUldTDade3roIA==",+ "dev": true+ },+ "@storybook/client-logger": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-4.0.0-alpha.8.tgz",+ "integrity": "sha512-JbUscUkEImq/w/LHIJJhBqlOxGXNsBgbSVvnORqF7G/VkHJxO5XQe81NywpQS+gH7e9mBmmU1stzj/K4hRga8g==",+ "dev": true+ },+ "@storybook/components": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/components/-/components-4.0.0-alpha.8.tgz",+ "integrity": "sha512-vtmZCB/D0XBetFb2SVDcHM64VXfzQ7T0NrqxSvKM13+ZW54bKY6zcQ6NBBh2DbZSVurRpam82GFuXX4+IWLh/w==",+ "dev": true,+ "requires": {+ "emotion": "^9.1.3",+ "emotion-theming": "^9.1.2",+ "global": "^4.3.2",+ "lodash.pick": "^4.4.0",+ "lodash.throttle": "^4.1.1",+ "prop-types": "^15.6.1",+ "react-emotion": "^9.1.3",+ "react-split-pane": "^0.1.77"+ }+ },+ "@storybook/core": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/core/-/core-4.0.0-alpha.8.tgz",+ "integrity": "sha512-aCl7sbFqU73VPXcKGYcJLeQmbNdu9SkfKgqtijlfRxZfXHV/gr8TlMgNt2FPeXPMRRMJnBp7acY9UWIQhGxq0A==",+ "dev": true,+ "requires": {+ "@storybook/addons": "4.0.0-alpha.8",+ "@storybook/channel-postmessage": "4.0.0-alpha.8",+ "@storybook/client-logger": "4.0.0-alpha.8",+ "@storybook/core-events": "4.0.0-alpha.8",+ "@storybook/node-logger": "4.0.0-alpha.8",+ "@storybook/ui": "4.0.0-alpha.8",+ "autoprefixer": "^8.5.0",+ "babel-runtime": "^6.26.0",+ "chalk": "^2.4.1",+ "commander": "^2.15.1",+ "css-loader": "^0.28.11",+ "dotenv": "^5.0.1",+ "emotion": "^9.1.3",+ "events": "^2.0.0",+ "express": "^4.16.3",+ "file-loader": "^1.1.11",+ "find-cache-dir": "^1.0.0",+ "global": "^4.3.2",+ "json-loader": "^0.5.7",+ "json5": "^1.0.1",+ "postcss-flexbugs-fixes": "^3.3.1",+ "postcss-loader": "^2.1.5",+ "prop-types": "^15.6.1",+ "qs": "^6.5.2",+ "react-emotion": "^9.1.3",+ "redux": "^4.0.0",+ "serve-favicon": "^2.5.0",+ "shelljs": "^0.8.2",+ "style-loader": "^0.21.0",+ "svg-url-loader": "^2.3.2",+ "url-loader": "^1.0.1",+ "webpack": "^4.8.3",+ "webpack-dev-middleware": "^3.1.3",+ "webpack-hot-middleware": "^2.22.2"+ },+ "dependencies": {+ "ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dev": true,+ "requires": {+ "color-convert": "^1.9.0"+ }+ },+ "autoprefixer": {+ "version": "8.6.0",+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.0.tgz",+ "integrity": "sha512-JaYK4gmyklt+es0VDdWVS9R/X96D8eaT0qDLAO6R4niBsoKv6nI4QtfFs8YQskwatIdJ6XZeTBDRpjf4tH+Dlg==",+ "dev": true,+ "requires": {+ "browserslist": "^3.2.8",+ "caniuse-lite": "^1.0.30000847",+ "normalize-range": "^0.1.2",+ "num2fraction": "^1.2.2",+ "postcss": "^6.0.22",+ "postcss-value-parser": "^3.2.3"+ }+ },+ "browserslist": {+ "version": "3.2.8",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz",+ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==",+ "dev": true,+ "requires": {+ "caniuse-lite": "^1.0.30000844",+ "electron-to-chromium": "^1.3.47"+ }+ },+ "caniuse-lite": {+ "version": "1.0.30000849",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000849.tgz",+ "integrity": "sha512-hlkWpyGJTDjjim2m+nvvHiEqt2PZuPdB9yYRbys5P/T179Aq7YgMF6tnM489voTfqMLtJhqmOZNfghxWjjT8jg==",+ "dev": true+ },+ "chalk": {+ "version": "2.4.1",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",+ "dev": true,+ "requires": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ }+ },+ "commander": {+ "version": "2.15.1",+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",+ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",+ "dev": true+ },+ "electron-to-chromium": {+ "version": "1.3.48",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz",+ "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=",+ "dev": true+ },+ "events": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz",+ "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==",+ "dev": true+ },+ "json5": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",+ "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",+ "dev": true,+ "requires": {+ "minimist": "^1.2.0"+ }+ },+ "minimist": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",+ "dev": true+ },+ "ms": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",+ "dev": true+ },+ "postcss": {+ "version": "6.0.22",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz",+ "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==",+ "dev": true,+ "requires": {+ "chalk": "^2.4.1",+ "source-map": "^0.6.1",+ "supports-color": "^5.4.0"+ }+ },+ "postcss-flexbugs-fixes": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.3.1.tgz",+ "integrity": "sha512-9y9kDDf2F9EjKX6x9ueNa5GARvsUbXw4ezH8vXItXHwKzljbu8awP7t5dCaabKYm18Vs1lo5bKQcnc0HkISt+w==",+ "dev": true,+ "requires": {+ "postcss": "^6.0.1"+ }+ },+ "postcss-loader": {+ "version": "2.1.5",+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz",+ "integrity": "sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==",+ "dev": true,+ "requires": {+ "loader-utils": "^1.1.0",+ "postcss": "^6.0.0",+ "postcss-load-config": "^1.2.0",+ "schema-utils": "^0.4.0"+ }+ },+ "qs": {+ "version": "6.5.2",+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",+ "dev": true+ },+ "redux": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.0.tgz",+ "integrity": "sha512-NnnHF0h0WVE/hXyrB6OlX67LYRuaf/rJcbWvnHHEPCF/Xa/AZpwhs/20WyqzQae5x4SD2F9nPObgBh2rxAgLiA==",+ "dev": true,+ "requires": {+ "loose-envify": "^1.1.0",+ "symbol-observable": "^1.2.0"+ }+ },+ "serve-favicon": {+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz",+ "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=",+ "dev": true,+ "requires": {+ "etag": "~1.8.1",+ "fresh": "0.5.2",+ "ms": "2.1.1",+ "parseurl": "~1.3.2",+ "safe-buffer": "5.1.1"+ }+ },+ "source-map": {+ "version": "0.6.1",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",+ "dev": true+ },+ "style-loader": {+ "version": "0.21.0",+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz",+ "integrity": "sha512-T+UNsAcl3Yg+BsPKs1vd22Fr8sVT+CJMtzqc6LEw9bbJZb43lm9GoeIfUcDEefBSWC0BhYbcdupV1GtI4DGzxg==",+ "dev": true,+ "requires": {+ "loader-utils": "^1.1.0",+ "schema-utils": "^0.4.5"+ }+ },+ "webpack-hot-middleware": {+ "version": "2.22.2",+ "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.22.2.tgz",+ "integrity": "sha512-uccPS6b/UlXJoNCS+3fuc40z2KZgO0qQhnu+Ne1iZiHTy9s5fMCJAV+Vc8VTVkN203UphsxQmkumxYeHLiQ5jg==",+ "dev": true,+ "requires": {+ "ansi-html": "0.0.7",+ "html-entities": "^1.2.0",+ "querystring": "^0.2.0",+ "strip-ansi": "^3.0.0"+ }+ }+ }+ },+ "@storybook/core-events": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-4.0.0-alpha.8.tgz",+ "integrity": "sha512-tK8oqwj66lsr+2X6zfkhmC6S6xM1pG7UcttxCodforzoRbZBhY/4ezsJj2A7zu+F71CPCiXPZOX1iq+xi768PA==",+ "dev": true+ },+ "@storybook/mantra-core": {+ "version": "1.7.2",+ "resolved": "https://registry.npmjs.org/@storybook/mantra-core/-/mantra-core-1.7.2.tgz",+ "integrity": "sha512-GD4OYJ8GsayVhIg306sfgcKDk9j8YfuSKIAWvdB/g7IDlw0pDgueONALVEEE2XWJtCwcsUyDtCYzXFgCBWLEjA==",+ "dev": true,+ "requires": {+ "@storybook/react-komposer": "^2.0.1",+ "@storybook/react-simple-di": "^1.2.1",+ "babel-runtime": "6.x.x"+ }+ },+ "@storybook/node-logger": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-4.0.0-alpha.8.tgz",+ "integrity": "sha512-aoTK6JbnVRvE2T8WOdLCYI1NaEc2Va6y6pyw0LtrqOIC1w9XV3WXBTOf/0f2o7RZ7GvXdAL/w7BpNA0X7rTsTA==",+ "dev": true,+ "requires": {+ "npmlog": "^4.1.2"+ }+ },+ "@storybook/podda": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/@storybook/podda/-/podda-1.2.3.tgz",+ "integrity": "sha512-g7dsdsn50AhlGZ8iIDKdF8bi7Am++iFOq+QN+hNKz3FvgLuf8Dz+mpC/BFl90eE9bEYxXqXKeMf87399Ec5Qhw==",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.11.6",+ "immutable": "^3.8.1"+ }+ },+ "@storybook/react": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/react/-/react-4.0.0-alpha.8.tgz",+ "integrity": "sha512-wVf4jd3H8RLTERXByOYxPNgF4xjhvnXriyi1ytxqqMfj9qE4CeXdL7L7VfjlakdOvtoTIFwrf/CN/bDLyh2Ifw==",+ "dev": true,+ "requires": {+ "@storybook/core": "4.0.0-alpha.8",+ "@storybook/react-dev-utils": "^5.0.0",+ "airbnb-js-shims": "^1.5.1",+ "babel-loader": "^7.1.4",+ "babel-plugin-macros": "^2.2.1",+ "babel-plugin-react-docgen": "^2.0.0-rc.0",+ "babel-plugin-transform-regenerator": "^6.26.0",+ "babel-plugin-transform-runtime": "^6.23.0",+ "babel-preset-env": "^1.7.0",+ "babel-preset-minify": "^0.4.2",+ "babel-preset-react": "^6.24.1",+ "babel-preset-stage-0": "^6.24.1",+ "babel-runtime": "^6.26.0",+ "case-sensitive-paths-webpack-plugin": "^2.1.2",+ "common-tags": "^1.7.2",+ "core-js": "^2.5.6",+ "dotenv-webpack": "^1.5.5",+ "emotion": "^9.1.3",+ "global": "^4.3.2",+ "html-webpack-plugin": "^3.2.0",+ "lodash.flattendeep": "^4.4.0",+ "prop-types": "^15.6.1",+ "raw-loader": "^0.5.1",+ "react-emotion": "^9.1.3",+ "webpack": "^4.8.3",+ "webpack-hot-middleware": "^2.22.2"+ },+ "dependencies": {+ "ast-types": {+ "version": "0.10.1",+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz",+ "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==",+ "dev": true+ },+ "babel-loader": {+ "version": "7.1.4",+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.4.tgz",+ "integrity": "sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw==",+ "dev": true,+ "requires": {+ "find-cache-dir": "^1.0.0",+ "loader-utils": "^1.0.2",+ "mkdirp": "^0.5.1"+ }+ },+ "babel-plugin-macros": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.2.2.tgz",+ "integrity": "sha512-wq6DYqjNmSPskGyhOeRIbmuvLtsHTfc6ROtGqapTttIGL1RoQmM3V5N8aJiDxPaw3/fveIsVspF51E3V7qTOMQ==",+ "dev": true,+ "requires": {+ "cosmiconfig": "^4.0.0"+ }+ },+ "babel-plugin-react-docgen": {+ "version": "2.0.0-rc.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-2.0.0-rc.0.tgz",+ "integrity": "sha512-c3wrjpJcNmBBkro/2+ng/VqRhm9j6TpBMb7KJtFpneTadpiUBhHGuHQKVcBAdWGgWZUpvHaEw0JoSexCTEdsuw==",+ "dev": true,+ "requires": {+ "babel-types": "^6.24.1",+ "lodash": "^4.17.0",+ "react-docgen": "^3.0.0-beta11"+ }+ },+ "babel-preset-env": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",+ "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==",+ "dev": true,+ "requires": {+ "babel-plugin-check-es2015-constants": "^6.22.0",+ "babel-plugin-syntax-trailing-function-commas": "^6.22.0",+ "babel-plugin-transform-async-to-generator": "^6.22.0",+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",+ "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",+ "babel-plugin-transform-es2015-block-scoping": "^6.23.0",+ "babel-plugin-transform-es2015-classes": "^6.23.0",+ "babel-plugin-transform-es2015-computed-properties": "^6.22.0",+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",+ "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0",+ "babel-plugin-transform-es2015-for-of": "^6.23.0",+ "babel-plugin-transform-es2015-function-name": "^6.22.0",+ "babel-plugin-transform-es2015-literals": "^6.22.0",+ "babel-plugin-transform-es2015-modules-amd": "^6.22.0",+ "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",+ "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0",+ "babel-plugin-transform-es2015-modules-umd": "^6.23.0",+ "babel-plugin-transform-es2015-object-super": "^6.22.0",+ "babel-plugin-transform-es2015-parameters": "^6.23.0",+ "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0",+ "babel-plugin-transform-es2015-spread": "^6.22.0",+ "babel-plugin-transform-es2015-sticky-regex": "^6.22.0",+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",+ "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0",+ "babel-plugin-transform-es2015-unicode-regex": "^6.22.0",+ "babel-plugin-transform-exponentiation-operator": "^6.22.0",+ "babel-plugin-transform-regenerator": "^6.22.0",+ "browserslist": "^3.2.6",+ "invariant": "^2.2.2",+ "semver": "^5.3.0"+ }+ },+ "babylon": {+ "version": "7.0.0-beta.31",+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.31.tgz",+ "integrity": "sha512-6lm2mV3S51yEnKmQQNnswoABL1U1H1KHoCCVwdwI3hvIv+W7ya4ki7Aw4o4KxtUHjNKkK5WpZb22rrMMOcJXJQ==",+ "dev": true+ },+ "browserslist": {+ "version": "3.2.8",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz",+ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==",+ "dev": true,+ "requires": {+ "caniuse-lite": "^1.0.30000844",+ "electron-to-chromium": "^1.3.47"+ }+ },+ "caniuse-lite": {+ "version": "1.0.30000849",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000849.tgz",+ "integrity": "sha512-hlkWpyGJTDjjim2m+nvvHiEqt2PZuPdB9yYRbys5P/T179Aq7YgMF6tnM489voTfqMLtJhqmOZNfghxWjjT8jg==",+ "dev": true+ },+ "core-js": {+ "version": "2.5.7",+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",+ "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==",+ "dev": true+ },+ "cosmiconfig": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz",+ "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==",+ "dev": true,+ "requires": {+ "is-directory": "^0.3.1",+ "js-yaml": "^3.9.0",+ "parse-json": "^4.0.0",+ "require-from-string": "^2.0.1"+ }+ },+ "electron-to-chromium": {+ "version": "1.3.48",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz",+ "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=",+ "dev": true+ },+ "html-webpack-plugin": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",+ "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=",+ "dev": true,+ "requires": {+ "html-minifier": "^3.2.3",+ "loader-utils": "^0.2.16",+ "lodash": "^4.17.3",+ "pretty-error": "^2.0.2",+ "tapable": "^1.0.0",+ "toposort": "^1.0.0",+ "util.promisify": "1.0.0"+ },+ "dependencies": {+ "loader-utils": {+ "version": "0.2.17",+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",+ "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",+ "dev": true,+ "requires": {+ "big.js": "^3.1.3",+ "emojis-list": "^2.0.0",+ "json5": "^0.5.0",+ "object-assign": "^4.0.1"+ }+ }+ }+ },+ "js-yaml": {+ "version": "3.12.0",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",+ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",+ "dev": true,+ "requires": {+ "argparse": "^1.0.7",+ "esprima": "^4.0.0"+ }+ },+ "node-dir": {+ "version": "0.1.17",+ "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz",+ "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=",+ "dev": true,+ "requires": {+ "minimatch": "^3.0.2"+ }+ },+ "parse-json": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",+ "dev": true,+ "requires": {+ "error-ex": "^1.3.1",+ "json-parse-better-errors": "^1.0.1"+ }+ },+ "react-docgen": {+ "version": "3.0.0-beta9",+ "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-3.0.0-beta9.tgz",+ "integrity": "sha512-3UqwxygAP/eZdDtOKum6vClKWUlceZ7RBVQ3Fe122l1WBYOqHcBzoUZIwN8feaLVo+s2eB/q+NkBfanLgvmt+w==",+ "dev": true,+ "requires": {+ "async": "^2.1.4",+ "babel-runtime": "^6.9.2",+ "babylon": "7.0.0-beta.31",+ "commander": "^2.9.0",+ "doctrine": "^2.0.0",+ "node-dir": "^0.1.10",+ "recast": "^0.12.6"+ }+ },+ "recast": {+ "version": "0.12.9",+ "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz",+ "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==",+ "dev": true,+ "requires": {+ "ast-types": "0.10.1",+ "core-js": "^2.4.1",+ "esprima": "~4.0.0",+ "private": "~0.1.5",+ "source-map": "~0.6.1"+ }+ },+ "require-from-string": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",+ "dev": true+ },+ "source-map": {+ "version": "0.6.1",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",+ "dev": true+ },+ "webpack-hot-middleware": {+ "version": "2.22.2",+ "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.22.2.tgz",+ "integrity": "sha512-uccPS6b/UlXJoNCS+3fuc40z2KZgO0qQhnu+Ne1iZiHTy9s5fMCJAV+Vc8VTVkN203UphsxQmkumxYeHLiQ5jg==",+ "dev": true,+ "requires": {+ "ansi-html": "0.0.7",+ "html-entities": "^1.2.0",+ "querystring": "^0.2.0",+ "strip-ansi": "^3.0.0"+ }+ }+ }+ },+ "@storybook/react-dev-utils": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/@storybook/react-dev-utils/-/react-dev-utils-5.0.0.tgz",+ "integrity": "sha1-0zprr0gKmA4TXCGt6FljKsog/ng=",+ "dev": true,+ "requires": {+ "@babel/code-frame": "7.0.0-beta.42",+ "address": "1.0.3",+ "browserslist": "3.2.0",+ "chalk": "2.3.2",+ "cross-spawn": "6.0.5",+ "detect-port-alt": "1.1.5",+ "escape-string-regexp": "1.0.5",+ "filesize": "3.6.0",+ "find-pkg": "1.0.0",+ "global-modules": "1.0.0",+ "globby": "8.0.1",+ "gzip-size": "4.1.0",+ "inquirer": "5.1.0",+ "is-root": "1.0.0",+ "opn": "5.3.0",+ "pkg-up": "2.0.0",+ "react-error-overlay": "^4.0.0",+ "recursive-readdir": "2.2.2",+ "shell-quote": "1.6.1",+ "sockjs-client": "1.1.4",+ "strip-ansi": "4.0.0",+ "text-table": "0.2.0"+ },+ "dependencies": {+ "@babel/code-frame": {+ "version": "7.0.0-beta.42",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.42.tgz",+ "integrity": "sha512-L8i94FLSyaLQpRfDo/qqSm8Ndb44zMtXParXo0MebJICG1zoCCL4+GkzUOlB4BNTRSXXQdb3feam/qw7bKPipQ==",+ "dev": true,+ "requires": {+ "@babel/highlight": "7.0.0-beta.42"+ }+ },+ "@babel/highlight": {+ "version": "7.0.0-beta.42",+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.42.tgz",+ "integrity": "sha512-X3Ur/A/lIbbP8W0pmwgqtDXIxhQmxPaiwY9SKP7kF9wvZfjZRwMvbJE92ozUhF3UDK3DCKaV7oGqmI1rP/zqWA==",+ "dev": true,+ "requires": {+ "chalk": "^2.0.0",+ "esutils": "^2.0.2",+ "js-tokens": "^3.0.0"+ }+ },+ "ansi-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",+ "dev": true+ },+ "ansi-styles": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",+ "dev": true,+ "requires": {+ "color-convert": "^1.9.0"+ }+ },+ "browserslist": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.0.tgz",+ "integrity": "sha512-fXFmXYMUbD9E/I81MEknzD5TJmA1dQFy+2gYHHnO08CEWGTzWNlDyawBo9pfUIncaG840+RIuScjCT4IpQxTWA==",+ "dev": true,+ "requires": {+ "caniuse-lite": "^1.0.30000815",+ "electron-to-chromium": "^1.3.39"+ }+ },+ "chalk": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",+ "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==",+ "dev": true,+ "requires": {+ "ansi-styles": "^3.2.1",+ "escape-string-regexp": "^1.0.5",+ "supports-color": "^5.3.0"+ }+ },+ "cross-spawn": {+ "version": "6.0.5",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",+ "dev": true,+ "requires": {+ "nice-try": "^1.0.4",+ "path-key": "^2.0.1",+ "semver": "^5.5.0",+ "shebang-command": "^1.2.0",+ "which": "^1.2.9"+ }+ },+ "globby": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz",+ "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==",+ "dev": true,+ "requires": {+ "array-union": "^1.0.1",+ "dir-glob": "^2.0.0",+ "fast-glob": "^2.0.2",+ "glob": "^7.1.2",+ "ignore": "^3.3.5",+ "pify": "^3.0.0",+ "slash": "^1.0.0"+ }+ },+ "inquirer": {+ "version": "5.1.0",+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.1.0.tgz",+ "integrity": "sha512-kn7N70US1MSZHZHSGJLiZ7iCwwncc7b0gc68YtlX29OjI3Mp0tSVV+snVXpZ1G+ONS3Ac9zd1m6hve2ibLDYfA==",+ "dev": true,+ "requires": {+ "ansi-escapes": "^3.0.0",+ "chalk": "^2.0.0",+ "cli-cursor": "^2.1.0",+ "cli-width": "^2.0.0",+ "external-editor": "^2.1.0",+ "figures": "^2.0.0",+ "lodash": "^4.3.0",+ "mute-stream": "0.0.7",+ "run-async": "^2.2.0",+ "rxjs": "^5.5.2",+ "string-width": "^2.1.0",+ "strip-ansi": "^4.0.0",+ "through": "^2.3.6"+ }+ },+ "pify": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",+ "dev": true+ },+ "strip-ansi": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",+ "dev": true,+ "requires": {+ "ansi-regex": "^3.0.0"+ }+ }+ }+ },+ "@storybook/react-komposer": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@storybook/react-komposer/-/react-komposer-2.0.4.tgz",+ "integrity": "sha1-wsDUp12bSpwMa0bxSrBQ9FitS7A=",+ "dev": true,+ "requires": {+ "@storybook/react-stubber": "^1.0.0",+ "babel-runtime": "^6.11.6",+ "hoist-non-react-statics": "^1.2.0",+ "lodash.pick": "^4.4.0",+ "shallowequal": "^0.2.2"+ },+ "dependencies": {+ "hoist-non-react-statics": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz",+ "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=",+ "dev": true+ }}},- "@nodelib/fs.stat": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz",- "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==",- "dev": true+ "@storybook/react-simple-di": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/@storybook/react-simple-di/-/react-simple-di-1.3.0.tgz",+ "integrity": "sha512-RH6gPQaYMs/VzQX2dgbZU8DQMKFXVOv1ruohHjjNPys4q+YdqMFMDe5jOP1AUE3j9g01x0eW7bVjRawSpl++Ew==",+ "dev": true,+ "requires": {+ "babel-runtime": "6.x.x",+ "create-react-class": "^15.6.2",+ "hoist-non-react-statics": "1.x.x",+ "prop-types": "^15.6.0"+ },+ "dependencies": {+ "hoist-non-react-statics": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz",+ "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=",+ "dev": true+ }+ }},- "@samverschueren/stream-to-observable": {- "version": "0.3.0",- "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",- "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==",+ "@storybook/react-stubber": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@storybook/react-stubber/-/react-stubber-1.0.1.tgz",+ "integrity": "sha512-k+CHH+vA8bQfCmzBTtJsPkITFgD+C/w19KuByZ9WeEvNUFtnDaCqfP+Vp3/OR+3IAfAXYYOWolqPLxNPcEqEjw==","dev": true,"requires": {- "any-observable": "^0.3.0"+ "babel-runtime": "^6.5.0"}},- "@sindresorhus/is": {- "version": "0.7.0",- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz",- "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==",- "dev": true+ "@storybook/ui": {+ "version": "4.0.0-alpha.8",+ "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-4.0.0-alpha.8.tgz",+ "integrity": "sha512-RK1gVE0yVn11ttgH0uARPCMvuINTt8I1z6qt9YVBtbeFuuKyGlcwHdBkpJXWAza4j/nJGTubi+U+fKigCK/8cQ==",+ "dev": true,+ "requires": {+ "@storybook/components": "4.0.0-alpha.8",+ "@storybook/core-events": "4.0.0-alpha.8",+ "@storybook/mantra-core": "^1.7.2",+ "@storybook/podda": "^1.2.3",+ "@storybook/react-komposer": "^2.0.4",+ "babel-runtime": "^6.26.0",+ "deep-equal": "^1.0.1",+ "emotion": "^9.1.3",+ "events": "^2.0.0",+ "fuse.js": "^3.2.0",+ "global": "^4.3.2",+ "keycode": "^2.2.0",+ "lodash.debounce": "^4.0.8",+ "lodash.pick": "^4.4.0",+ "lodash.sortby": "^4.7.0",+ "lodash.throttle": "^4.1.1",+ "prop-types": "^15.6.1",+ "qs": "^6.5.2",+ "react-emotion": "^9.1.3",+ "react-fuzzy": "^0.5.2",+ "react-icons": "^2.2.7",+ "react-lifecycles-compat": "^3.0.4",+ "react-modal": "^3.4.4",+ "react-treebeard": "^2.1.0"+ },+ "dependencies": {+ "events": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz",+ "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==",+ "dev": true+ },+ "keycode": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz",+ "integrity": "sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=",+ "dev": true+ },+ "qs": {+ "version": "6.5.2",+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",+ "dev": true+ },+ "react-lifecycles-compat": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",+ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==",+ "dev": true+ },+ "react-modal": {+ "version": "3.4.5",+ "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.4.5.tgz",+ "integrity": "sha512-fYaGmsvt4z5voC2Bl/9ngIWES4BSRYgGnTljMwuzTuYZ1BBpaZbnXia8xlvj7mF0kg3aPV+5APjZRiMfRG6vyA==",+ "dev": true,+ "requires": {+ "exenv": "^1.2.0",+ "prop-types": "^15.5.10",+ "react-lifecycles-compat": "^3.0.0",+ "warning": "^3.0.0"+ }+ }+ }},"@types/async": {"version": "2.0.47",@@ -3356,6 +4236,35 @@}}},+ "address": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz",+ "integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==",+ "dev": true+ },+ "airbnb-js-shims": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/airbnb-js-shims/-/airbnb-js-shims-1.6.0.tgz",+ "integrity": "sha512-yrlKswsUUYR8KTalUzi92O3MNq7grj60pP1z4Txu1LTTtsu2ACblLgaYxgzS99FQ0BZUFKPZyX2CboPdDcuETQ==",+ "dev": true,+ "requires": {+ "array-includes": "^3.0.3",+ "array.prototype.flat": "^1.2.1",+ "array.prototype.flatmap": "^1.2.1",+ "array.prototype.flatten": "^1.2.1",+ "es5-shim": "^4.5.10",+ "es6-shim": "^0.35.3",+ "function.prototype.name": "^1.1.0",+ "object.entries": "^1.0.4",+ "object.getownpropertydescriptors": "^2.0.3",+ "object.values": "^1.0.4",+ "promise.prototype.finally": "^3.1.0",+ "string.prototype.matchall": "^3.0.0",+ "string.prototype.padend": "^3.0.0",+ "string.prototype.padstart": "^3.0.0",+ "symbol.prototype.description": "^1.0.0"+ }+ },"ajv": {"version": "5.5.2","resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",@@ -3741,6 +4650,12 @@"integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=","dev": true},+ "array-find": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz",+ "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=",+ "dev": true+ },"array-find-index": {"version": "1.0.2","resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",@@ -3796,6 +4711,39 @@"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=","dev": true},+ "array.prototype.flat": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.1.tgz",+ "integrity": "sha512-rVqIs330nLJvfC7JqYvEWwqVr5QjYF1ib02i3YJtR/fICO6527Tjpc/e4Mvmxh3GIePPreRXMdaGyC99YphWEw==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.10.0",+ "function-bind": "^1.1.1"+ }+ },+ "array.prototype.flatmap": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.1.tgz",+ "integrity": "sha512-i18e2APdsiezkcqDyZor78Pbfjfds3S94dG6dgIV2ZASJaUf1N0dz2tGdrmwrmlZuNUgxH+wz6Z0zYVH2c5xzQ==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.10.0",+ "function-bind": "^1.1.1"+ }+ },+ "array.prototype.flatten": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/array.prototype.flatten/-/array.prototype.flatten-1.2.1.tgz",+ "integrity": "sha512-3GhsA78XgK//wQKbhUe6L93kknekGlTRY0kvYcpuSi0aa9rVrMr/okeIIv/XSpN8fZ5iUM+bWifhf2/7CYKtIg==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.10.0",+ "function-bind": "^1.1.1"+ }+ },"arrify": {"version": "1.0.1","resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",@@ -4099,6 +5047,17 @@"babel-types": "^6.24.1"}},+ "babel-helper-builder-react-jsx": {+ "version": "6.26.0",+ "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz",+ "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.26.0",+ "babel-types": "^6.26.0",+ "esutils": "^2.0.2"+ }+ },"babel-helper-call-delegate": {"version": "6.24.1","resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",@@ -4179,6 +5138,12 @@"babel-types": "^6.24.1"}},+ "babel-helper-is-nodes-equiv": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",+ "integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=",+ "dev": true+ },"babel-helper-optimise-call-expression": {"version": "6.24.1","resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",@@ -4289,6 +5254,54 @@"babel-runtime": "^6.22.0"}},+ "babel-plugin-emotion": {+ "version": "9.1.2",+ "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-9.1.2.tgz",+ "integrity": "sha512-zc2JeGuXfk0O4Au4JtssH4H7241+BREmFctZoHJ3Z1JekckhkynlpTXc+9ZhysUAjxyjiaXMUgUIIALCzbkFNQ==",+ "dev": true,+ "requires": {+ "@babel/helper-module-imports": "7.0.0-beta.32",+ "@emotion/hash": "^0.6.2",+ "@emotion/memoize": "^0.6.1",+ "@emotion/stylis": "^0.6.5",+ "babel-plugin-macros": "^2.0.0",+ "babel-plugin-syntax-jsx": "^6.18.0",+ "convert-source-map": "^1.5.0",+ "find-root": "^1.1.0",+ "mkdirp": "^0.5.1",+ "source-map": "^0.5.7",+ "touch": "^1.0.0"+ },+ "dependencies": {+ "@babel/helper-module-imports": {+ "version": "7.0.0-beta.32",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.32.tgz",+ "integrity": "sha512-9jxfqCBrwCIa0p5ZIy1sakzKKm8x8tn0C52qpPr0M0WJ/k9gpD4ilS/mTV2v0tgmw4agjYdUXQ8slq51/5oOzQ==",+ "dev": true,+ "requires": {+ "@babel/types": "7.0.0-beta.32",+ "lodash": "^4.2.0"+ }+ },+ "@babel/types": {+ "version": "7.0.0-beta.32",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.32.tgz",+ "integrity": "sha512-w8+wzVcYCMb9OfaBfay2Vg5hyj7UfBX6qQtA+kB0qsW1h1NH/7xHMwvTZNqkuFBwjz5wxGS2QmaIcC3HH+UoxA==",+ "dev": true,+ "requires": {+ "esutils": "^2.0.2",+ "lodash": "^4.2.0",+ "to-fast-properties": "^2.0.0"+ }+ },+ "to-fast-properties": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",+ "dev": true+ }+ }+ },"babel-plugin-istanbul": {"version": "4.1.5","resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz",@@ -4300,11 +5313,60 @@"test-exclude": "^4.1.1"}},- "babel-plugin-jest-hoist": {- "version": "22.4.1",- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.1.tgz",- "integrity": "sha512-gmj5FvFflXSnRapWmF/jDjx5Lof1kX0OwXibCxMOx38V3CFMOnTxLTUrAFfLkhCey3FJvv0ACvv/+h4nzFRxhg==",- "dev": true+ "babel-plugin-macros": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.2.0.tgz",+ "integrity": "sha512-HGdenPU9+WGhg++P65O+6aIdmXx99p58K7VtAtizC3eUHbO4FXfyfK9SCJubylcyKziEB3nMAUDFHeyDUj38eA==",+ "dev": true,+ "requires": {+ "cosmiconfig": "^4.0.0"+ },+ "dependencies": {+ "cosmiconfig": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz",+ "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==",+ "dev": true,+ "requires": {+ "is-directory": "^0.3.1",+ "js-yaml": "^3.9.0",+ "parse-json": "^4.0.0",+ "require-from-string": "^2.0.1"+ }+ },+ "esprima": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",+ "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",+ "dev": true+ },+ "js-yaml": {+ "version": "3.11.0",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",+ "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",+ "dev": true,+ "requires": {+ "argparse": "^1.0.7",+ "esprima": "^4.0.0"+ }+ },+ "parse-json": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",+ "dev": true,+ "requires": {+ "error-ex": "^1.3.1",+ "json-parse-better-errors": "^1.0.1"+ }+ },+ "require-from-string": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.1.tgz",+ "integrity": "sha1-xUUjPp19pmFunVmt+zn8n1iGdv8=",+ "dev": true+ }+ }},"babel-plugin-syntax-async-functions": {"version": "6.13.0",@@ -4336,6 +5398,12 @@"integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=","dev": true},+ "babel-plugin-syntax-do-expressions": {+ "version": "6.13.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz",+ "integrity": "sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0=",+ "dev": true+ },"babel-plugin-syntax-dynamic-import": {"version": "6.18.0","resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",@@ -4360,6 +5428,18 @@"integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=","dev": true},+ "babel-plugin-syntax-function-bind": {+ "version": "6.13.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz",+ "integrity": "sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y=",+ "dev": true+ },+ "babel-plugin-syntax-jsx": {+ "version": "6.18.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",+ "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=",+ "dev": true+ },"babel-plugin-syntax-object-rest-spread": {"version": "6.13.0","resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",@@ -4430,6 +5510,16 @@"babel-types": "^6.24.1"}},+ "babel-plugin-transform-do-expressions": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz",+ "integrity": "sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-do-expressions": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },"babel-plugin-transform-es2015-arrow-functions": {"version": "6.22.0","resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",@@ -4687,130 +5777,467 @@"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=","dev": true},- "regjsparser": {- "version": "0.1.5",- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",- "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",+ "regjsparser": {+ "version": "0.1.5",+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",+ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",+ "dev": true,+ "requires": {+ "jsesc": "~0.5.0"+ }+ }+ }+ },+ "babel-plugin-transform-exponentiation-operator": {+ "version": "6.24.1",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",+ "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",+ "dev": true,+ "requires": {+ "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1",+ "babel-plugin-syntax-exponentiation-operator": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-export-extensions": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz",+ "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-export-extensions": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-flow-strip-types": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz",+ "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-flow": "^6.18.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-function-bind": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz",+ "integrity": "sha1-xvuOlqwpajELjPjqQBRiQH3fapc=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-function-bind": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-object-rest-spread": {+ "version": "6.26.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz",+ "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-object-rest-spread": "^6.8.0",+ "babel-runtime": "^6.26.0"+ }+ },+ "babel-plugin-transform-react-display-name": {+ "version": "6.25.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz",+ "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-react-jsx": {+ "version": "6.24.1",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz",+ "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=",+ "dev": true,+ "requires": {+ "babel-helper-builder-react-jsx": "^6.24.1",+ "babel-plugin-syntax-jsx": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-react-jsx-self": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz",+ "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-jsx": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-react-jsx-source": {+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz",+ "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=",+ "dev": true,+ "requires": {+ "babel-plugin-syntax-jsx": "^6.8.0",+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-regenerator": {+ "version": "6.26.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",+ "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",+ "dev": true,+ "requires": {+ "regenerator-transform": "^0.10.0"+ },+ "dependencies": {+ "regenerator-transform": {+ "version": "0.10.1",+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",+ "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.18.0",+ "babel-types": "^6.19.0",+ "private": "^0.1.6"+ }+ }+ }+ },+ "babel-plugin-transform-runtime": {+ "version": "6.23.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz",+ "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.22.0"+ }+ },+ "babel-plugin-transform-strict-mode": {+ "version": "6.24.1",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",+ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.22.0",+ "babel-types": "^6.24.1"+ }+ },+ "babel-preset-es2015": {+ "version": "6.24.1",+ "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",+ "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",+ "dev": true,+ "requires": {+ "babel-plugin-check-es2015-constants": "^6.22.0",+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",+ "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",+ "babel-plugin-transform-es2015-classes": "^6.24.1",+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",+ "babel-plugin-transform-es2015-destructuring": "^6.22.0",+ "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1",+ "babel-plugin-transform-es2015-for-of": "^6.22.0",+ "babel-plugin-transform-es2015-function-name": "^6.24.1",+ "babel-plugin-transform-es2015-literals": "^6.22.0",+ "babel-plugin-transform-es2015-modules-amd": "^6.24.1",+ "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",+ "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1",+ "babel-plugin-transform-es2015-modules-umd": "^6.24.1",+ "babel-plugin-transform-es2015-object-super": "^6.24.1",+ "babel-plugin-transform-es2015-parameters": "^6.24.1",+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",+ "babel-plugin-transform-es2015-spread": "^6.22.0",+ "babel-plugin-transform-es2015-sticky-regex": "^6.24.1",+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",+ "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0",+ "babel-plugin-transform-es2015-unicode-regex": "^6.24.1",+ "babel-plugin-transform-regenerator": "^6.24.1"+ }+ },+ "babel-preset-flow": {+ "version": "6.23.0",+ "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz",+ "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=",+ "dev": true,+ "requires": {+ "babel-plugin-transform-flow-strip-types": "^6.22.0"+ }+ },+ "babel-preset-jest": {+ "version": "22.4.4",+ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-22.4.4.tgz",+ "integrity": "sha512-+dxMtOFwnSYWfum0NaEc0O03oSdwBsjx4tMSChRDPGwu/4wSY6Q6ANW3wkjKpJzzguaovRs/DODcT4hbSN8yiA==",+ "dev": true,+ "requires": {+ "babel-plugin-jest-hoist": "^22.4.4",+ "babel-plugin-syntax-object-rest-spread": "^6.13.0"+ },+ "dependencies": {+ "babel-plugin-jest-hoist": {+ "version": "22.4.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz",+ "integrity": "sha512-DUvGfYaAIlkdnygVIEl0O4Av69NtuQWcrjMOv6DODPuhuGLDnbsARz3AwiiI/EkIMMlxQDUcrZ9yoyJvTNjcVQ==",+ "dev": true+ }+ }+ },+ "babel-preset-minify": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.4.3.tgz",+ "integrity": "sha1-spw91pGJBThFmPCSuVUVLiah/g8=",+ "dev": true,+ "requires": {+ "babel-plugin-minify-builtins": "^0.4.3",+ "babel-plugin-minify-constant-folding": "^0.4.3",+ "babel-plugin-minify-dead-code-elimination": "^0.4.3",+ "babel-plugin-minify-flip-comparisons": "^0.4.3",+ "babel-plugin-minify-guarded-expressions": "^0.4.3",+ "babel-plugin-minify-infinity": "^0.4.3",+ "babel-plugin-minify-mangle-names": "^0.4.3",+ "babel-plugin-minify-numeric-literals": "^0.4.3",+ "babel-plugin-minify-replace": "^0.4.3",+ "babel-plugin-minify-simplify": "^0.4.3",+ "babel-plugin-minify-type-constructors": "^0.4.3",+ "babel-plugin-transform-inline-consecutive-adds": "^0.4.3",+ "babel-plugin-transform-member-expression-literals": "^6.9.4",+ "babel-plugin-transform-merge-sibling-variables": "^6.9.4",+ "babel-plugin-transform-minify-booleans": "^6.9.4",+ "babel-plugin-transform-property-literals": "^6.9.4",+ "babel-plugin-transform-regexp-constructors": "^0.4.3",+ "babel-plugin-transform-remove-console": "^6.9.4",+ "babel-plugin-transform-remove-debugger": "^6.9.4",+ "babel-plugin-transform-remove-undefined": "^0.4.3",+ "babel-plugin-transform-simplify-comparison-operators": "^6.9.4",+ "babel-plugin-transform-undefined-to-void": "^6.9.4",+ "lodash.isplainobject": "^4.0.6"+ },+ "dependencies": {+ "babel-helper-evaluate-path": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.4.3.tgz",+ "integrity": "sha1-ComvcCwGshcCf6NxkI3UmJ0+Yz8=",+ "dev": true+ },+ "babel-helper-flip-expressions": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz",+ "integrity": "sha1-NpZzahKKwYvCUlS19AoizrPB0/0=",+ "dev": true+ },+ "babel-helper-is-void-0": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz",+ "integrity": "sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4=",+ "dev": true+ },+ "babel-helper-mark-eval-scopes": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz",+ "integrity": "sha1-0kSjvvmESHJgP/tG4izorN9VFWI=",+ "dev": true+ },+ "babel-helper-remove-or-void": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz",+ "integrity": "sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA=",+ "dev": true+ },+ "babel-helper-to-multiple-sequence-expressions": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.4.3.tgz",+ "integrity": "sha1-W1GLESf0ezA4dzOGoVYaK0jmMrY=",+ "dev": true+ },+ "babel-plugin-minify-builtins": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.4.3.tgz",+ "integrity": "sha1-nqPVn0rEp7uVjXEtKVVqH4b3+B4=",+ "dev": true,+ "requires": {+ "babel-helper-evaluate-path": "^0.4.3"+ }+ },+ "babel-plugin-minify-constant-folding": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.4.3.tgz",+ "integrity": "sha1-MA+d6N2ghEoXaxk2U5YOJK0z4ZE=",+ "dev": true,+ "requires": {+ "babel-helper-evaluate-path": "^0.4.3"+ }+ },+ "babel-plugin-minify-dead-code-elimination": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.4.3.tgz",+ "integrity": "sha1-c2KCZYZPkAjQAnUG9Yq+s8HQLZg=",+ "dev": true,+ "requires": {+ "babel-helper-evaluate-path": "^0.4.3",+ "babel-helper-mark-eval-scopes": "^0.4.3",+ "babel-helper-remove-or-void": "^0.4.3",+ "lodash.some": "^4.6.0"+ }+ },+ "babel-plugin-minify-flip-comparisons": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz",+ "integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=",+ "dev": true,+ "requires": {+ "babel-helper-is-void-0": "^0.4.3"+ }+ },+ "babel-plugin-minify-guarded-expressions": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.3.tgz",+ "integrity": "sha1-zHCbRFP9IbHzAod0RMifiEJ845c=",+ "dev": true,+ "requires": {+ "babel-helper-flip-expressions": "^0.4.3"+ }+ },+ "babel-plugin-minify-infinity": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz",+ "integrity": "sha1-37h2obCKBldjhO8/kuZTumB7Oco=",+ "dev": true+ },+ "babel-plugin-minify-mangle-names": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.4.3.tgz",+ "integrity": "sha1-FvG/90t6fJPfwkHngx3V+0sCPvc=",+ "dev": true,+ "requires": {+ "babel-helper-mark-eval-scopes": "^0.4.3"+ }+ },+ "babel-plugin-minify-numeric-literals": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz",+ "integrity": "sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw=",+ "dev": true+ },+ "babel-plugin-minify-replace": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.4.3.tgz",+ "integrity": "sha1-nSifS6FdTmAR6HmfpfG6d+yBIZ0=",+ "dev": true+ },+ "babel-plugin-minify-simplify": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.4.3.tgz",+ "integrity": "sha1-N3VthcYURktLCSfytOQXGR1Vc4o=",+ "dev": true,+ "requires": {+ "babel-helper-flip-expressions": "^0.4.3",+ "babel-helper-is-nodes-equiv": "^0.0.1",+ "babel-helper-to-multiple-sequence-expressions": "^0.4.3"+ }+ },+ "babel-plugin-minify-type-constructors": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz",+ "integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=",+ "dev": true,+ "requires": {+ "babel-helper-is-void-0": "^0.4.3"+ }+ },+ "babel-plugin-transform-inline-consecutive-adds": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz",+ "integrity": "sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE=",+ "dev": true+ },+ "babel-plugin-transform-member-expression-literals": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz",+ "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=",+ "dev": true+ },+ "babel-plugin-transform-merge-sibling-variables": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz",+ "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=",+ "dev": true+ },+ "babel-plugin-transform-minify-booleans": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz",+ "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=",+ "dev": true+ },+ "babel-plugin-transform-property-literals": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz",+ "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=","dev": true,"requires": {- "jsesc": "~0.5.0"+ "esutils": "^2.0.2"}- }- }- },- "babel-plugin-transform-exponentiation-operator": {- "version": "6.24.1",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",- "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",- "dev": true,- "requires": {- "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1",- "babel-plugin-syntax-exponentiation-operator": "^6.8.0",- "babel-runtime": "^6.22.0"- }- },- "babel-plugin-transform-export-extensions": {- "version": "6.22.0",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz",- "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=",- "dev": true,- "requires": {- "babel-plugin-syntax-export-extensions": "^6.8.0",- "babel-runtime": "^6.22.0"- }- },- "babel-plugin-transform-flow-strip-types": {- "version": "6.22.0",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz",- "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=",- "dev": true,- "requires": {- "babel-plugin-syntax-flow": "^6.18.0",- "babel-runtime": "^6.22.0"- }- },- "babel-plugin-transform-object-rest-spread": {- "version": "6.26.0",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz",- "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=",- "dev": true,- "requires": {- "babel-plugin-syntax-object-rest-spread": "^6.8.0",- "babel-runtime": "^6.26.0"- }- },- "babel-plugin-transform-regenerator": {- "version": "6.26.0",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",- "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",- "dev": true,- "requires": {- "regenerator-transform": "^0.10.0"- },- "dependencies": {- "regenerator-transform": {- "version": "0.10.1",- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",- "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",+ },+ "babel-plugin-transform-regexp-constructors": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz",+ "integrity": "sha1-WLd3W2OvzzMyj66aX4j71PsLSWU=",+ "dev": true+ },+ "babel-plugin-transform-remove-console": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz",+ "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=",+ "dev": true+ },+ "babel-plugin-transform-remove-debugger": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz",+ "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=",+ "dev": true+ },+ "babel-plugin-transform-remove-undefined": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.4.3.tgz",+ "integrity": "sha1-1AsNp/kcCMBsxyt2dHTAHEiU3gI=","dev": true,"requires": {- "babel-runtime": "^6.18.0",- "babel-types": "^6.19.0",- "private": "^0.1.6"+ "babel-helper-evaluate-path": "^0.4.3"}+ },+ "babel-plugin-transform-simplify-comparison-operators": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz",+ "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=",+ "dev": true+ },+ "babel-plugin-transform-undefined-to-void": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz",+ "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=",+ "dev": true}}},- "babel-plugin-transform-strict-mode": {+ "babel-preset-react": {"version": "6.24.1",- "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",- "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",+ "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz",+ "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=","dev": true,"requires": {- "babel-runtime": "^6.22.0",- "babel-types": "^6.24.1"+ "babel-plugin-syntax-jsx": "^6.3.13",+ "babel-plugin-transform-react-display-name": "^6.23.0",+ "babel-plugin-transform-react-jsx": "^6.24.1",+ "babel-plugin-transform-react-jsx-self": "^6.22.0",+ "babel-plugin-transform-react-jsx-source": "^6.22.0",+ "babel-preset-flow": "^6.23.0"}},- "babel-preset-es2015": {+ "babel-preset-stage-0": {"version": "6.24.1",- "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",- "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",- "dev": true,- "requires": {- "babel-plugin-check-es2015-constants": "^6.22.0",- "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",- "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",- "babel-plugin-transform-es2015-block-scoping": "^6.24.1",- "babel-plugin-transform-es2015-classes": "^6.24.1",- "babel-plugin-transform-es2015-computed-properties": "^6.24.1",- "babel-plugin-transform-es2015-destructuring": "^6.22.0",- "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1",- "babel-plugin-transform-es2015-for-of": "^6.22.0",- "babel-plugin-transform-es2015-function-name": "^6.24.1",- "babel-plugin-transform-es2015-literals": "^6.22.0",- "babel-plugin-transform-es2015-modules-amd": "^6.24.1",- "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",- "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1",- "babel-plugin-transform-es2015-modules-umd": "^6.24.1",- "babel-plugin-transform-es2015-object-super": "^6.24.1",- "babel-plugin-transform-es2015-parameters": "^6.24.1",- "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",- "babel-plugin-transform-es2015-spread": "^6.22.0",- "babel-plugin-transform-es2015-sticky-regex": "^6.24.1",- "babel-plugin-transform-es2015-template-literals": "^6.22.0",- "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0",- "babel-plugin-transform-es2015-unicode-regex": "^6.24.1",- "babel-plugin-transform-regenerator": "^6.24.1"- }- },- "babel-preset-jest": {- "version": "22.4.1",- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-22.4.1.tgz",- "integrity": "sha512-gW3+spyB8fkSAI9fX+41BQMwar5LjR+nyKa2QRvK22snxnI29+jJVAMfId+osucFJzJJvhlvzKWnfwX8Omodvg==",+ "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz",+ "integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=","dev": true,"requires": {- "babel-plugin-jest-hoist": "^22.4.1",- "babel-plugin-syntax-object-rest-spread": "^6.13.0"+ "babel-plugin-transform-do-expressions": "^6.22.0",+ "babel-plugin-transform-function-bind": "^6.22.0",+ "babel-preset-stage-1": "^6.24.1"}},"babel-preset-stage-1": {@@ -5158,6 +6585,12 @@"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz","integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA=="},+ "bowser": {+ "version": "1.9.3",+ "resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.3.tgz",+ "integrity": "sha512-/gp96UlcFw5DbV2KQPCqTqi0Mb9gZRyDAHiDsGEH+4B/KOQjeoE5lM1PxlVX8DQDvfEfitmC1rW2Oy8fk/XBDg==",+ "dev": true+ },"brace-expansion": {"version": "1.1.11","resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",@@ -5582,6 +7015,12 @@"rsvp": "^3.3.3"}},+ "case-sensitive-paths-webpack-plugin": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.2.tgz",+ "integrity": "sha512-oEZgAFfEvKtjSRCu6VgYkuGxwrWXMnQzyBmlLPP7r6PWQVtHxP5Z5N6XsuJvtoVax78am/r7lr46bwo3IVEBOg==",+ "dev": true+ },"caseless": {"version": "0.12.0","resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",@@ -6362,6 +7801,29 @@"elliptic": "^6.0.0"}},+ "create-emotion": {+ "version": "9.1.3",+ "resolved": "https://registry.npmjs.org/create-emotion/-/create-emotion-9.1.3.tgz",+ "integrity": "sha512-nCNDwBfDy0cgZRcKROFyHt9TmKyBVTkmjSxwYHuibAKW05UUM9btApKbwGi07wShP7s2IcUhVn8nNUz/nAFCOg==",+ "dev": true,+ "requires": {+ "@emotion/hash": "^0.6.2",+ "@emotion/memoize": "^0.6.1",+ "@emotion/stylis": "^0.6.5",+ "@emotion/unitless": "^0.6.2",+ "stylis": "^3.5.0",+ "stylis-rule-sheet": "^0.0.10"+ }+ },+ "create-emotion-styled": {+ "version": "9.1.2",+ "resolved": "https://registry.npmjs.org/create-emotion-styled/-/create-emotion-styled-9.1.2.tgz",+ "integrity": "sha512-d0QGQIxxwjiEEmn8+kQe4G/I9znD8LHPDa+cbN3JLv2SrGNnVOCz6D+2lBCljKO5Tv4inXLxMBP5dVGGsTxDiQ==",+ "dev": true,+ "requires": {+ "@emotion/is-prop-valid": "^0.6.1"+ }+ },"create-hash": {"version": "1.2.0","resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",@@ -6389,6 +7851,17 @@"sha.js": "^2.4.8"}},+ "create-react-class": {+ "version": "15.6.3",+ "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.3.tgz",+ "integrity": "sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg==",+ "dev": true,+ "requires": {+ "fbjs": "^0.8.9",+ "loose-envify": "^1.3.1",+ "object-assign": "^4.1.1"+ }+ },"cross-env": {"version": "5.1.6","resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.6.tgz",@@ -6450,6 +7923,15 @@"integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=","dev": true},+ "css-in-js-utils": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-2.0.0.tgz",+ "integrity": "sha512-yuWmPMD9FLi50Xf3k8W8oO3WM1eVnxEGCldCLyfusQ+CgivFk0s23yst4ooW6tfxMuSa03S6uUEga9UhX6GRrA==",+ "dev": true,+ "requires": {+ "hyphenate-style-name": "^1.0.2"+ }+ },"css-loader": {"version": "0.28.11","resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.11.tgz",@@ -7050,6 +8532,27 @@"resolved": "https://registry.npmjs.org/detect-passive-events/-/detect-passive-events-1.0.4.tgz","integrity": "sha1-btR35uW863kHlzXc01d4nTf5qRo="},+ "detect-port-alt": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.5.tgz",+ "integrity": "sha512-PlE9BuBz44BSDV8sJvfUxkGquPcDW4oHSYa5wY4yKj943C2I4xNU5Gd/EFroqdWNur7W6yU2zOLqvmKJCB//aA==",+ "dev": true,+ "requires": {+ "address": "^1.0.1",+ "debug": "^2.6.0"+ },+ "dependencies": {+ "debug": {+ "version": "2.6.9",+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",+ "dev": true,+ "requires": {+ "ms": "2.0.0"+ }+ }+ }+ },"diff": {"version": "3.4.0","resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz",@@ -7135,6 +8638,23 @@}}},+ "dom-converter": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz",+ "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=",+ "dev": true,+ "requires": {+ "utila": "~0.3"+ },+ "dependencies": {+ "utila": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz",+ "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=",+ "dev": true+ }+ }+ },"dom-helpers": {"version": "3.3.1","resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz",@@ -7211,6 +8731,21 @@"no-case": "^2.2.0"}},+ "dotenv": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",+ "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==",+ "dev": true+ },+ "dotenv-webpack": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/dotenv-webpack/-/dotenv-webpack-1.5.5.tgz",+ "integrity": "sha1-NEEJTwTTBLYRnmtyUk5i+zJS9fI=",+ "dev": true,+ "requires": {+ "dotenv": "^5.0.1"+ }+ },"drip": {"version": "1.1.0","resolved": "https://registry.npmjs.org/drip/-/drip-1.1.0.tgz",@@ -7339,6 +8874,25 @@"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=","dev": true},+ "emotion": {+ "version": "9.1.3",+ "resolved": "https://registry.npmjs.org/emotion/-/emotion-9.1.3.tgz",+ "integrity": "sha512-hoLEhtbGHK6scwQ4Bdulq6df/NOB3c5nGowkqweItWWUhJOsyrKFS7/AjOuvAzBsWlI75mWSglC3PKrkN+zUwg==",+ "dev": true,+ "requires": {+ "babel-plugin-emotion": "^9.1.2",+ "create-emotion": "^9.1.3"+ }+ },+ "emotion-theming": {+ "version": "9.1.2",+ "resolved": "https://registry.npmjs.org/emotion-theming/-/emotion-theming-9.1.2.tgz",+ "integrity": "sha512-Mlr7fIvzEna6paZOFu6hdCuiEPVHxu/+Jm/mKnULoGB2AEnhN8MM8SF6/WRvQtoJC1AXADSARNz6i+hM9Kk4uw==",+ "dev": true,+ "requires": {+ "hoist-non-react-statics": "^2.3.1"+ }+ },"encodeurl": {"version": "1.0.2","resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",@@ -7448,6 +9002,12 @@"next-tick": "1"}},+ "es5-shim": {+ "version": "4.5.10",+ "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.10.tgz",+ "integrity": "sha512-vmryBdqKRO8Ei9LJ4yyEk/EOmAOGIagcHDYPpTAi6pot4IMHS1AC2q5cTKPmydpijg2iX8DVmCuqgrNxIWj8Yg==",+ "dev": true+ },"es6-iterator": {"version": "2.0.3","resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",@@ -7459,6 +9019,12 @@"es6-symbol": "^3.1.1"}},+ "es6-shim": {+ "version": "0.35.3",+ "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.3.tgz",+ "integrity": "sha1-m/tzY/7//4emzbbNk+QF7DxLbyY=",+ "dev": true+ },"es6-symbol": {"version": "3.1.1","resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",@@ -7894,6 +9460,12 @@"acorn-jsx": "^3.0.0"}},+ "esprima": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",+ "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",+ "dev": true+ },"esquery": {"version": "1.0.1","resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",@@ -7983,6 +9555,12 @@"strip-eof": "^1.0.0"}},+ "exenv": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz",+ "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=",+ "dev": true+ },"exit": {"version": "0.1.2","resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",@@ -8598,6 +10176,12 @@"minimatch": "^3.0.3"}},+ "filesize": {+ "version": "3.6.0",+ "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.0.tgz",+ "integrity": "sha512-g5OWtoZWcPI56js1DFhIEqyG9tnu/7sG3foHwgS9KGYFMfsYguI3E+PRVCmtmE96VajQIEMRU2OhN+ME589Gdw==",+ "dev": true+ },"fill-range": {"version": "2.2.4","resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",@@ -8648,12 +10232,36 @@"pkg-dir": "^2.0.0"}},+ "find-file-up": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-1.0.2.tgz",+ "integrity": "sha1-TVNmS8Eoz3k5AUl/SxNVjZeXVco=",+ "dev": true,+ "requires": {+ "resolve-dir": "^1.0.0"+ }+ },"find-index": {"version": "0.1.1","resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz","integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=","dev": true},+ "find-pkg": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-1.0.0.tgz",+ "integrity": "sha1-ltskLgAcfFUCXTIhMwLqOrpncXc=",+ "dev": true,+ "requires": {+ "find-file-up": "^1.0.2"+ }+ },+ "find-root": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",+ "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",+ "dev": true+ },"find-up": {"version": "2.1.0","resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",@@ -9858,12 +11466,29 @@"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==","dev": true},+ "function.prototype.name": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.0.tgz",+ "integrity": "sha512-Bs0VRrTz4ghD8pTmbJQD1mZ8A/mN0ur/jGz+A6FBxPDUPkm1tNfF6bhTYPA7i7aF4lZJVr+OXTNNrnnIl58Wfg==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "function-bind": "^1.1.1",+ "is-callable": "^1.1.3"+ }+ },"functional-red-black-tree": {"version": "1.0.1","resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz","integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=","dev": true},+ "fuse.js": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-3.2.0.tgz",+ "integrity": "sha1-8ESOgGmFW/Kj5oPNwdMg5+KgfvQ=",+ "dev": true+ },"gaia-filter": {"version": "0.1.0","resolved": "https://registry.npmjs.org/gaia-filter/-/gaia-filter-0.1.0.tgz",@@ -10351,6 +11976,24 @@"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=","dev": true},+ "gzip-size": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz",+ "integrity": "sha1-iuCWJX6r59acRb4rZ8RIEk/7UXw=",+ "dev": true,+ "requires": {+ "duplexer": "^0.1.1",+ "pify": "^3.0.0"+ },+ "dependencies": {+ "pify": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",+ "dev": true+ }+ }+ },"hammerjs": {"version": "2.0.8","resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",@@ -11206,6 +12849,12 @@"integrity": "sha512-pH3vDzpczdsKHdZ9xxR3O46unSjisgVx0IImay7Zz2EdhRVbCkj+nthx9OuuWEhakx9FAO+fNVGrF0rZ2oMOvw==","dev": true},+ "immutable": {+ "version": "3.8.2",+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz",+ "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=",+ "dev": true+ },"import-local": {"version": "1.0.0","resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",@@ -11274,6 +12923,16 @@"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==","dev": true},+ "inline-style-prefixer": {+ "version": "3.0.8",+ "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-3.0.8.tgz",+ "integrity": "sha1-hVG45bTVcyROZqNLBPfTIHaitTQ=",+ "dev": true,+ "requires": {+ "bowser": "^1.7.3",+ "css-in-js-utils": "^2.0.0"+ }+ },"inquirer": {"version": "3.3.0","resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",@@ -11715,6 +13374,12 @@"integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=","dev": true},+ "is-root": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-root/-/is-root-1.0.0.tgz",+ "integrity": "sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU=",+ "dev": true+ },"is-scoped": {"version": "1.0.0","resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz",@@ -12335,7 +14000,18 @@"version": "22.4.3","resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-22.4.3.tgz","integrity": "sha512-06czCMVToSN8F2U4EvgSB1Bv/56gc7MpCftZ9z9fBgUQM7dzHGCMBsyfVA6dZTx8v0FDcnALf7hupeQxaBCvpA==",- "dev": true+ "dev": true,+ "requires": {+ "jest-regex-util": "^22.4.3"+ },+ "dependencies": {+ "jest-regex-util": {+ "version": "22.4.3",+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.4.3.tgz",+ "integrity": "sha512-LFg1gWr3QinIjb8j833bq7jtQopiwdAs67OGfkPrvy7uNUbVMfTXXcOKXJaeY5GgjobELkKvKENqq1xrUectWg==",+ "dev": true+ }+ }},"jest-serializer": {"version": "22.4.3",@@ -12552,6 +14228,12 @@"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=","dev": true},+ "json-loader": {+ "version": "0.5.7",+ "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",+ "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",+ "dev": true+ },"json-parse-better-errors": {"version": "1.0.2","resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",@@ -13125,6 +14807,12 @@"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.10.tgz","integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg=="},+ "lodash._getnative": {+ "version": "3.9.1",+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",+ "dev": true+ },"lodash.assign": {"version": "4.2.0","resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",@@ -13155,6 +14843,12 @@"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=","dev": true},+ "lodash.debounce": {+ "version": "4.0.8",+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",+ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",+ "dev": true+ },"lodash.defaults": {"version": "4.2.0","resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",@@ -13173,12 +14867,47 @@"integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=","dev": true},+ "lodash.flattendeep": {+ "version": "4.4.0",+ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",+ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",+ "dev": true+ },"lodash.foreach": {"version": "4.5.0","resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz","integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=","dev": true},+ "lodash.isarguments": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",+ "dev": true+ },+ "lodash.isarray": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",+ "dev": true+ },+ "lodash.isplainobject": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",+ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",+ "dev": true+ },+ "lodash.keys": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",+ "dev": true,+ "requires": {+ "lodash._getnative": "^3.0.0",+ "lodash.isarguments": "^3.0.0",+ "lodash.isarray": "^3.0.0"+ }+ },"lodash.map": {"version": "4.6.0","resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",@@ -13239,6 +14968,12 @@"integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=","dev": true},+ "lodash.throttle": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",+ "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=",+ "dev": true+ },"lodash.unescape": {"version": "4.0.1","resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",@@ -15071,6 +16806,18 @@"object-keys": "^1.0.11"}},+ "object.entries": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz",+ "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.6.1",+ "function-bind": "^1.1.0",+ "has": "^1.0.1"+ }+ },"object.getownpropertydescriptors": {"version": "2.0.3","resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",@@ -15108,6 +16855,18 @@}}},+ "object.values": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.0.4.tgz",+ "integrity": "sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo=",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.6.1",+ "function-bind": "^1.1.0",+ "has": "^1.0.1"+ }+ },"obuf": {"version": "1.1.2","resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",@@ -15591,6 +17350,15 @@"find-up": "^2.1.0"}},+ "pkg-up": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",+ "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",+ "dev": true,+ "requires": {+ "find-up": "^2.1.0"+ }+ },"pluralize": {"version": "7.0.0","resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz",@@ -17496,6 +19264,16 @@"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=","dev": true},+ "pretty-error": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz",+ "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=",+ "dev": true,+ "requires": {+ "renderkid": "^2.0.1",+ "utila": "~0.4"+ }+ },"pretty-format": {"version": "22.4.0","resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.0.tgz",@@ -17546,6 +19324,17 @@"integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=","dev": true},+ "promise.prototype.finally": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/promise.prototype.finally/-/promise.prototype.finally-3.1.0.tgz",+ "integrity": "sha512-7p/K2f6dI+dM8yjRQEGrTQs5hTQixUAdOGpMEA3+pVxpX5oHKRSKAXyLw9Q9HUWDTdwtoo39dSHGQtN90HcEwQ==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.9.0",+ "function-bind": "^1.1.1"+ }+ },"prop-types": {"version": "15.6.1","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz",@@ -17662,6 +19451,30 @@"integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==","dev": true},+ "radium": {+ "version": "0.19.6",+ "resolved": "https://registry.npmjs.org/radium/-/radium-0.19.6.tgz",+ "integrity": "sha512-IABYntqCwYelUUIwA52maSCgJbqtJjHKIoD21wgpw3dGhIUbJ5chDShDGdaFiEzdF03hN9jfQqlmn0bF4YhfrQ==",+ "dev": true,+ "requires": {+ "array-find": "^1.0.0",+ "exenv": "^1.2.1",+ "inline-style-prefixer": "^2.0.5",+ "prop-types": "^15.5.8"+ },+ "dependencies": {+ "inline-style-prefixer": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz",+ "integrity": "sha1-wVPH6I/YT+9cYC6VqBaLJ3BnH+c=",+ "dev": true,+ "requires": {+ "bowser": "^1.0.0",+ "hyphenate-style-name": "^1.0.1"+ }+ }+ }+ },"rafl": {"version": "1.2.2","resolved": "https://registry.npmjs.org/rafl/-/rafl-1.2.2.tgz",@@ -17758,6 +19571,12 @@}}},+ "raw-loader": {+ "version": "0.5.1",+ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",+ "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=",+ "dev": true+ },"react": {"version": "16.3.0","resolved": "https://registry.npmjs.org/react/-/react-16.3.0.tgz",@@ -17799,6 +19618,22 @@"prop-types": "^15.6.0"}},+ "react-emotion": {+ "version": "9.1.3",+ "resolved": "https://registry.npmjs.org/react-emotion/-/react-emotion-9.1.3.tgz",+ "integrity": "sha512-JRE6LbUpc7/Lu4Cr8VKbN03gClmkWjF3dsiBHF9sgXu2BVUE2rkf1rMIZ0cZoGtL9KrvY37Z+SL6RphU1NrOJA==",+ "dev": true,+ "requires": {+ "babel-plugin-emotion": "^9.1.2",+ "create-emotion-styled": "^9.1.2"+ }+ },+ "react-error-overlay": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz",+ "integrity": "sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==",+ "dev": true+ },"react-event-listener": {"version": "0.5.3","resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.5.3.tgz",@@ -17817,6 +19652,33 @@}}},+ "react-fuzzy": {+ "version": "0.5.2",+ "resolved": "https://registry.npmjs.org/react-fuzzy/-/react-fuzzy-0.5.2.tgz",+ "integrity": "sha512-qIZZxaCheb/HhcBi5fABbiCFg85+K5r1TCps1D4uaL0LAMMD/1zm/x1/kNR130Tx7nnY9V7mbFyY0DquPYeLAw==",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.23.0",+ "classnames": "^2.2.5",+ "fuse.js": "^3.0.1",+ "prop-types": "^15.5.9"+ }+ },+ "react-icon-base": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/react-icon-base/-/react-icon-base-2.1.0.tgz",+ "integrity": "sha1-oZbjP98eeqof2jrvu2i9rZ6Cp50=",+ "dev": true+ },+ "react-icons": {+ "version": "2.2.7",+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-2.2.7.tgz",+ "integrity": "sha512-0n4lcGqzJFcIQLoQytLdJCE0DKSA9dkwEZRYoGrIDJZFvIT6Hbajx5mv9geqhqFiNjUgtxg8kPyDfjlhymbGFg==",+ "dev": true,+ "requires": {+ "react-icon-base": "2.1.0"+ }+ },"react-jss": {"version": "8.3.5","resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.3.5.tgz",@@ -17913,6 +19775,26 @@"stifle": "^1.0.2"}},+ "react-split-pane": {+ "version": "0.1.77",+ "resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.77.tgz",+ "integrity": "sha512-xq0PPsbkNI9xEd6yTrGPr7hzf6XfIgnsxuUEdRJELq+kLPHMsO3ymFCjhiYP35wlDPn9W46+rHDsJd7LFYteMw==",+ "dev": true,+ "requires": {+ "inline-style-prefixer": "^3.0.6",+ "prop-types": "^15.5.10",+ "react-style-proptype": "^3.0.0"+ }+ },+ "react-style-proptype": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/react-style-proptype/-/react-style-proptype-3.2.1.tgz",+ "integrity": "sha512-Z02QsgmdZ4wYNxJsHhNGGZsIF8+MO93fYmdPaC+ljdqX3rq8tl/fSMXOGBbofGJNzq5W/2LFcONllmV6vzyYHA==",+ "dev": true,+ "requires": {+ "prop-types": "^15.5.4"+ }+ },"react-svg": {"version": "2.2.18","resolved": "https://registry.npmjs.org/react-svg/-/react-svg-2.2.18.tgz",@@ -17954,6 +19836,20 @@"warning": "^3.0.0"}},+ "react-treebeard": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/react-treebeard/-/react-treebeard-2.1.0.tgz",+ "integrity": "sha512-unoy8IJL1NR5jgTtK+CqOCZKZylh/Tlid0oYajW9bLZCbFelxzmCsF8Y2hyS6pvHqM4W501oOm5O/jvg3VZCrg==",+ "dev": true,+ "requires": {+ "babel-runtime": "^6.23.0",+ "deep-equal": "^1.0.1",+ "prop-types": "^15.5.8",+ "radium": "^0.19.0",+ "shallowequal": "^0.2.2",+ "velocity-react": "^1.3.1"+ }+ },"read-chunk": {"version": "2.1.0","resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz",@@ -18142,6 +20038,15 @@"symbol-observable": "^1.0.4"}},+ "recursive-readdir": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz",+ "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==",+ "dev": true,+ "requires": {+ "minimatch": "3.0.4"+ }+ },"redent": {"version": "1.0.0","resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",@@ -18238,6 +20143,15 @@"safe-regex": "^1.1.0"}},+ "regexp.prototype.flags": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz",+ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2"+ }+ },"regexpp": {"version": "1.1.0","resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz",@@ -18256,6 +20170,81 @@"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=","dev": true},+ "renderkid": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz",+ "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=",+ "dev": true,+ "requires": {+ "css-select": "^1.1.0",+ "dom-converter": "~0.1",+ "htmlparser2": "~3.3.0",+ "strip-ansi": "^3.0.0",+ "utila": "~0.3"+ },+ "dependencies": {+ "domhandler": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz",+ "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=",+ "dev": true,+ "requires": {+ "domelementtype": "1"+ }+ },+ "domutils": {+ "version": "1.1.6",+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz",+ "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=",+ "dev": true,+ "requires": {+ "domelementtype": "1"+ }+ },+ "htmlparser2": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz",+ "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=",+ "dev": true,+ "requires": {+ "domelementtype": "1",+ "domhandler": "2.1",+ "domutils": "1.1",+ "readable-stream": "1.0"+ }+ },+ "isarray": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",+ "dev": true+ },+ "readable-stream": {+ "version": "1.0.34",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",+ "dev": true,+ "requires": {+ "core-util-is": "~1.0.0",+ "inherits": "~2.0.1",+ "isarray": "0.0.1",+ "string_decoder": "~0.10.x"+ }+ },+ "string_decoder": {+ "version": "0.10.31",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",+ "dev": true+ },+ "utila": {+ "version": "0.3.3",+ "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz",+ "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=",+ "dev": true+ }+ }+ },"repeat-element": {"version": "1.1.2","resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",@@ -19778,6 +21767,15 @@}}},+ "shallowequal": {+ "version": "0.2.2",+ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-0.2.2.tgz",+ "integrity": "sha1-HjL9W8q2rWiKSBLLDMBO/HXHAU4=",+ "dev": true,+ "requires": {+ "lodash.keys": "^3.1.2"+ }+ },"shebang-command": {"version": "1.2.0","resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",@@ -20416,6 +22414,56 @@}}},+ "string.prototype.matchall": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-3.0.0.tgz",+ "integrity": "sha512-/g0YW/cEfXASRHAaLR7VZbTUlxgP14fmCsfSRFG2gvlG2S1q9rBpjYnEy/EIIzY+bjzs2nTfAHJYXmQ+zTnXSQ==",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.12.0",+ "function-bind": "^1.1.1",+ "has-symbols": "^1.0.0",+ "regexp.prototype.flags": "^1.2.0"+ },+ "dependencies": {+ "es-abstract": {+ "version": "1.12.0",+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",+ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",+ "dev": true,+ "requires": {+ "es-to-primitive": "^1.1.1",+ "function-bind": "^1.1.1",+ "has": "^1.0.1",+ "is-callable": "^1.1.3",+ "is-regex": "^1.0.4"+ }+ }+ }+ },+ "string.prototype.padend": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz",+ "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.4.3",+ "function-bind": "^1.0.2"+ }+ },+ "string.prototype.padstart": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz",+ "integrity": "sha1-W8+tOfRkm7LQMSkuGbzwtRDUskI=",+ "dev": true,+ "requires": {+ "define-properties": "^1.1.2",+ "es-abstract": "^1.4.3",+ "function-bind": "^1.0.2"+ }+ },"string_decoder": {"version": "1.1.1","resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",@@ -20478,6 +22526,18 @@"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=","dev": true},+ "stylis": {+ "version": "3.5.0",+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz",+ "integrity": "sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw==",+ "dev": true+ },+ "stylis-rule-sheet": {+ "version": "0.0.10",+ "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz",+ "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==",+ "dev": true+ },"subarg": {"version": "1.0.0","resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",@@ -20514,6 +22574,16 @@"resolved": "https://registry.npmjs.org/svg-injector-2/-/svg-injector-2-2.1.3.tgz","integrity": "sha1-6AjyK3kDG4gu0s2Ze27tL9sFn6E="},+ "svg-url-loader": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/svg-url-loader/-/svg-url-loader-2.3.2.tgz",+ "integrity": "sha1-3YaybBn+O5FPBOoQ7zlZTq3gRGQ=",+ "dev": true,+ "requires": {+ "file-loader": "1.1.11",+ "loader-utils": "1.1.0"+ }+ },"svgo": {"version": "0.7.2","resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz",@@ -20549,6 +22619,15 @@"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=","dev": true},+ "symbol.prototype.description": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/symbol.prototype.description/-/symbol.prototype.description-1.0.0.tgz",+ "integrity": "sha512-I9mrbZ5M96s7QeJDv95toF1svkUjeBybe8ydhY7foPaBmr0SPJMFupArmMkDrOKTTj0sJVr+nvQNxWLziQ7nDQ==",+ "dev": true,+ "requires": {+ "has-symbols": "^1.0.0"+ }+ },"tapable": {"version": "1.0.0","resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz",@@ -20766,6 +22845,32 @@}}},+ "toposort": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz",+ "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=",+ "dev": true+ },+ "touch": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/touch/-/touch-1.0.0.tgz",+ "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=",+ "dev": true,+ "requires": {+ "nopt": "~1.0.10"+ },+ "dependencies": {+ "nopt": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",+ "dev": true,+ "requires": {+ "abbrev": "1"+ }+ }+ }+ },"tough-cookie": {"version": "2.3.4","resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",@@ -22016,6 +24121,25 @@"integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=","dev": true},+ "url-loader": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.0.1.tgz",+ "integrity": "sha512-rAonpHy7231fmweBKUFe0bYnlGDty77E+fm53NZdij7j/YOpyGzc7ttqG1nAXl3aRs0k41o0PC3TvGXQiw2Zvw==",+ "dev": true,+ "requires": {+ "loader-utils": "^1.1.0",+ "mime": "^2.0.3",+ "schema-utils": "^0.4.3"+ },+ "dependencies": {+ "mime": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz",+ "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==",+ "dev": true+ }+ }+ },"url-parse": {"version": "1.4.0","resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz",@@ -22099,6 +24223,12 @@"object.getownpropertydescriptors": "^2.0.3"}},+ "utila": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz",+ "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=",+ "dev": true+ },"utils-merge": {"version": "1.0.1","resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",@@ -22144,6 +24274,45 @@"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=","dev": true},+ "velocity-animate": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/velocity-animate/-/velocity-animate-1.5.1.tgz",+ "integrity": "sha512-VJ3csMz5zP1ifkbBlsNYpxnoWkPHfVRQ8tUongS78W5DxSGHB68pjYHDTgUYBkVM7P/HpYdVukgVUFcxjr1gGg==",+ "dev": true+ },+ "velocity-react": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/velocity-react/-/velocity-react-1.3.3.tgz",+ "integrity": "sha1-1tRyds/Ivip1Yjh5sgFArFjBuCs=",+ "dev": true,+ "requires": {+ "lodash": "^3.10.1",+ "prop-types": "^15.5.8",+ "react-transition-group": "^1.1.2",+ "velocity-animate": "^1.4.0"+ },+ "dependencies": {+ "lodash": {+ "version": "3.10.1",+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",+ "dev": true+ },+ "react-transition-group": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz",+ "integrity": "sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==",+ "dev": true,+ "requires": {+ "chain-function": "^1.0.0",+ "dom-helpers": "^3.2.0",+ "loose-envify": "^1.3.1",+ "prop-types": "^15.5.6",+ "warning": "^3.0.0"+ }+ }+ }+ },"vendors": {"version": "1.0.1","resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz",diff --git a/package.json b/package.jsonindex b33d0b8e09..afe67aec0a 100644--- a/package.json+++ b/package.json@@ -71,6 +71,7 @@"@babel/preset-es2015": "^7.0.0-beta.44","@babel/preset-react": "^7.0.0-beta.44","@babel/preset-stage-0": "^7.0.0-beta.44",+ "@storybook/react": "^4.0.0-alpha.1","@types/i18next": "^8.4.3","@types/jest": "^22.2.2","@types/react-dom": "^16.0.4",@@ -149,6 +150,7 @@"heroku-postbuild": "npm run build-assets && npm run build-emails","start": "webpack -d --watch --progress","build-emails": "mjml --config.beautify false -l skip \"templates/templated_email/source/*.mjml\" -o templates/templated_email/compiled",+ "storybook": "start-storybook -p 3000 -c saleor/static/dashboard-next/storybook/","test": "jest saleor/static/dashboard-next/"}}diff --git a/saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.test.tsx b/saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.test.tsxnew file mode 100644index 0000000000..391415a0fc--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.test.tsx@@ -0,0 +1,38 @@+import * as React from "react";+import { MemoryRouter } from "react-router-dom";+import * as renderer from "react-test-renderer";++import CategoryBaseForm from "./CategoryBaseForm";++const category = {+ description:+ "Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.\nTell lose part purpose do when. Whatever drug contain particularly defense.",+ name: "Apparel"+};+const errors = [+ {+ field: "name",+ message: "To pole jest wymagane."+ }+];++describe("<CategoryBaseForm />", () => {+ it("renders with initial data", () => {+ const component = renderer.create(<CategoryBaseForm {...category} />);+ expect(component).toMatchSnapshot();+ });+ it("renders without initial data", () => {+ const component = renderer.create(+ <MemoryRouter>+ <CategoryBaseForm />+ </MemoryRouter>+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when errors occured", () => {+ const component = renderer.create(+ <CategoryBaseForm {...category} errors={errors} />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/category/components/BaseForm.tsx b/saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.tsxsimilarity index 69%rename from saleor/static/dashboard-next/category/components/BaseForm.tsxrename to saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.tsxindex a76446a9fc..77552fce6e 100644--- a/saleor/static/dashboard-next/category/components/BaseForm.tsx+++ b/saleor/static/dashboard-next/category/components/CategoryBaseForm/CategoryBaseForm.tsx@@ -1,11 +1,9 @@-import Button from "material-ui/Button";import { CardContent } from "material-ui/Card";-import { withStyles, WithStyles } from "material-ui/styles";-import Toolbar from "material-ui/Toolbar";+import { withStyles } from "material-ui/styles";import * as React from "react";import TextField from "material-ui/TextField";-import i18n from "../../i18n";+import i18n from "../../../i18n";const { Component } = React;@@ -19,28 +17,30 @@ const decorate = withStyles(theme => ({}));interface BaseCategoryFormProps {- description: string;- errors: Array<{+ description?: string;+ errors?: Array<{field: string;message: string;}>;- name: string;+ name?: string;onChange?(event: React.ChangeEvent<any>);}-export const BaseCategoryForm = decorate<BaseCategoryFormProps>(+export const CategoryBaseForm = decorate<BaseCategoryFormProps>(({ classes, description, errors, name, onChange }) => {- const errorList: { [key: string]: string } = errors.reduce((acc, curr) => {- acc[curr.field] = curr.message;- return acc;- }, {});+ const errorList: { [key: string]: string } = errors+ ? errors.reduce((acc, curr) => {+ acc[curr.field] = curr.message;+ return acc;+ }, {})+ : {};return (<CardContent><TextFieldautoFocusfullWidthclassName={classes.textField}- value={name}+ value={name || ""}error={!!errorList.name}helperText={errorList.name}label={i18n.t("Name", { context: "category" })}@@ -50,7 +50,7 @@ export const BaseCategoryForm = decorate<BaseCategoryFormProps>(<TextFieldfullWidthmultiline- value={description}+ value={description || ""}error={!!errorList.description}helperText={errorList.description || i18n.t("Optional", { context: "field" })@@ -64,4 +64,4 @@ export const BaseCategoryForm = decorate<BaseCategoryFormProps>(});-export default BaseCategoryForm;+export default CategoryBaseForm;diff --git a/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snapnew file mode 100644index 0000000000..b4cbfe0c1d--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap@@ -0,0 +1,368 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<CategoryBaseForm /> renders when errors occured 1`] = `+<div+ className="MuiCardContent-root-3"+>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7 Component-textField-2"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiFormLabel-error-17 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12 MuiInputLabel-shrink-11"+ data-shrink={true}+ htmlFor={undefined}+ >+ Name+ </label>+ <div+ className="MuiInput-root-20 MuiInput-error-25 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-underline-24"+ >+ <input+ aria-invalid={true}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={true}+ className="MuiInput-input-28"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="name"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="text"+ value="Apparel"+ />+ </div>+ <p+ className="MuiFormHelperText-root-37 MuiFormHelperText-error-38"+ id={undefined}+ >+ To pole jest wymagane.+ </p>+ </div>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12 MuiInputLabel-shrink-11"+ data-shrink={true}+ htmlFor={undefined}+ >+ Description+ </label>+ <div+ className="MuiInput-root-20 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-multiline-26 MuiInput-underline-24"+ >+ <div+ className="MuiTextarea-root-34"+ style={+ Object {+ "height": 19,+ }+ }+ >+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ readOnly={true}+ rows="1"+ tabIndex={-1}+ value=""+ />+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ defaultValue={undefined}+ readOnly={true}+ rows={1}+ tabIndex={-1}+ value="Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.+Tell lose part purpose do when. Whatever drug contain particularly defense."+ />+ <textarea+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiTextarea-textarea-35 MuiInput-input-28 MuiInput-inputMultiline-31"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="description"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={1}+ type="text"+ value="Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.+Tell lose part purpose do when. Whatever drug contain particularly defense."+ />+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-37"+ id={undefined}+ >+ Optional+ </p>+ </div>+</div>+`;++exports[`<CategoryBaseForm /> renders with initial data 1`] = `+<div+ className="MuiCardContent-root-3"+>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7 Component-textField-2"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12 MuiInputLabel-shrink-11"+ data-shrink={true}+ htmlFor={undefined}+ >+ Name+ </label>+ <div+ className="MuiInput-root-20 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-underline-24"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={true}+ className="MuiInput-input-28"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="name"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="text"+ value="Apparel"+ />+ </div>+ </div>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12 MuiInputLabel-shrink-11"+ data-shrink={true}+ htmlFor={undefined}+ >+ Description+ </label>+ <div+ className="MuiInput-root-20 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-multiline-26 MuiInput-underline-24"+ >+ <div+ className="MuiTextarea-root-34"+ style={+ Object {+ "height": 19,+ }+ }+ >+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ readOnly={true}+ rows="1"+ tabIndex={-1}+ value=""+ />+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ defaultValue={undefined}+ readOnly={true}+ rows={1}+ tabIndex={-1}+ value="Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.+Tell lose part purpose do when. Whatever drug contain particularly defense."+ />+ <textarea+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiTextarea-textarea-35 MuiInput-input-28 MuiInput-inputMultiline-31"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="description"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={1}+ type="text"+ value="Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.+Tell lose part purpose do when. Whatever drug contain particularly defense."+ />+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-37"+ id={undefined}+ >+ Optional+ </p>+ </div>+</div>+`;++exports[`<CategoryBaseForm /> renders without initial data 1`] = `+<div+ className="MuiCardContent-root-3"+>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7 Component-textField-2"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12"+ data-shrink={false}+ htmlFor={undefined}+ >+ Name+ </label>+ <div+ className="MuiInput-root-20 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-underline-24"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={true}+ className="MuiInput-input-28"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="name"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="text"+ value=""+ />+ </div>+ </div>+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-4 MuiFormControl-fullWidth-7"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-14 MuiInputLabel-root-8 MuiInputLabel-formControl-9 MuiInputLabel-animated-12"+ data-shrink={false}+ htmlFor={undefined}+ >+ Description+ </label>+ <div+ className="MuiInput-root-20 MuiInput-fullWidth-27 MuiInput-formControl-21 MuiInput-multiline-26 MuiInput-underline-24"+ >+ <div+ className="MuiTextarea-root-34"+ style={+ Object {+ "height": 19,+ }+ }+ >+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ readOnly={true}+ rows="1"+ tabIndex={-1}+ value=""+ />+ <textarea+ aria-hidden="true"+ className="MuiTextarea-shadow-36 MuiTextarea-textarea-35"+ defaultValue={undefined}+ readOnly={true}+ rows={1}+ tabIndex={-1}+ value=""+ />+ <textarea+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiTextarea-textarea-35 MuiInput-input-28 MuiInput-inputMultiline-31"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="description"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={1}+ type="text"+ value=""+ />+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-37"+ id={undefined}+ >+ Optional+ </p>+ </div>+</div>+`;diff --git a/saleor/static/dashboard-next/category/components/CategoryBaseForm/index.ts b/saleor/static/dashboard-next/category/components/CategoryBaseForm/index.tsnew file mode 100644index 0000000000..64589221ca--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryBaseForm/index.ts@@ -0,0 +1 @@+export { default } from "./CategoryBaseForm";diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts.tsx b/saleor/static/dashboard-next/category/components/CategoryProducts.tsxdeleted file mode 100644index f69c67edd2..0000000000--- a/saleor/static/dashboard-next/category/components/CategoryProducts.tsx+++ /dev/null@@ -1,69 +0,0 @@-import AddIcon from "material-ui-icons/Add";-import FilterListIcon from "material-ui-icons/FilterList";-import Card from "material-ui/Card";-import Hidden from "material-ui/Hidden";-import IconButton from "material-ui/IconButton";-import * as React from "react";--import PageHeader from "../../components/PageHeader";-import ProductList from "../../components/ProductList";-import { CategoryPropertiesQuery } from "../../gql-types";-import i18n from "../../i18n";--interface CategoryProductsProps {- data: CategoryPropertiesQuery;- loading?: boolean;- onCreate?();- onFilter?();- onNextPage?();- onPreviousPage?();-}--const CategoryProducts: React.StatelessComponent<CategoryProductsProps> = ({- data,- loading,- onCreate,- onFilter,- onNextPage,- onPreviousPage-}) => (- <Card>- <PageHeader- title={i18n.t("Products", {- context: "title"- })}- >- <IconButton disabled={loading} onClick={onCreate}>- <AddIcon />- </IconButton>- <Hidden mdUp>- <IconButton disabled={loading} onClick={onFilter}>- <FilterListIcon />- </IconButton>- </Hidden>- </PageHeader>- <ProductList- hasNextPage={- data.category &&- data.category.products &&- data.category.products.pageInfo &&- data.category.products.pageInfo.hasNextPage- }- hasPreviousPage={- data.category &&- data.category.products &&- data.category.products.pageInfo &&- data.category.products.pageInfo.hasPreviousPage- }- onNextPage={onNextPage}- onPreviousPage={onPreviousPage}- products={- data.category &&- data.category.products &&- data.category.products.edges.map(edge => edge.node)- }- />- </Card>-);--export default CategoryProducts;diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.test.tsx b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.test.tsxnew file mode 100644index 0000000000..9a2fe15866--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.test.tsx@@ -0,0 +1,92 @@+import * as React from "react";+import { MemoryRouter } from "react-router-dom";+import * as renderer from "react-test-renderer";++import CategoryProducts from "./CategoryProducts";++const products = [+ {+ id: "UHJvZHVjdDox",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoy",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoz",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoa",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ }+];++describe("<CategoryProducts />", () => {+ it("renders with initial data", () => {+ const component = renderer.create(+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ products={products}+ onCreate={jest.fn()}+ onFilter={jest.fn()}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders without initial data", () => {+ const component = renderer.create(+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ products={[]}+ onCreate={jest.fn()}+ onFilter={jest.fn()}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when loading data", () => {+ const component = renderer.create(+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ onCreate={jest.fn()}+ onFilter={jest.fn()}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsxnew file mode 100644index 0000000000..1b5dfc88e9--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx@@ -0,0 +1,64 @@+import AddIcon from "material-ui-icons/Add";+import FilterListIcon from "material-ui-icons/FilterList";+import Card from "material-ui/Card";+import Hidden from "material-ui/Hidden";+import IconButton from "material-ui/IconButton";+import * as React from "react";++import PageHeader from "../../../components/PageHeader";+import ProductList from "../../../components/ProductList";+import i18n from "../../../i18n";++interface CategoryProductsProps {+ hasPreviousPage: boolean;+ hasNextPage: boolean;+ products?: Array<{+ id: string;+ name: string;+ thumbnailUrl: string;+ productType: {+ id: string;+ name: string;+ };+ }>;+ onCreate?();+ onFilter?();+ onNextPage?();+ onPreviousPage?();+}++const CategoryProducts: React.StatelessComponent<CategoryProductsProps> = ({+ hasNextPage,+ hasPreviousPage,+ onCreate,+ onFilter,+ onNextPage,+ onPreviousPage,+ products+}) => (+ <Card>+ <PageHeader+ title={i18n.t("Products", {+ context: "title"+ })}+ >+ <IconButton onClick={onCreate}>+ <AddIcon />+ </IconButton>+ <Hidden mdUp>+ <IconButton onClick={onFilter}>+ <FilterListIcon />+ </IconButton>+ </Hidden>+ </PageHeader>+ <ProductList+ hasNextPage={hasNextPage}+ hasPreviousPage={hasPreviousPage}+ onNextPage={onNextPage}+ onPreviousPage={onPreviousPage}+ products={products}+ />+ </Card>+);++export default CategoryProducts;diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snapnew file mode 100644index 0000000000..2076bb83e3--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap@@ -0,0 +1,759 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<CategoryProducts /> renders when loading data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Products+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <table+ className="MuiTable-root-81"+ >+ <thead+ className="MuiTableHead-root-82"+ >+ <tr+ className="MuiTableRow-root-83 MuiTableRow-head-84"+ >+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89 Component-avatarCell-80"+ scope="col"+ />+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Name+ </th>+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Type+ </th>+ </tr>+ </thead>+ <tfoot>+ <tr+ className="MuiTableRow-root-83 MuiTableRow-footer-85"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-footer-91 MuiTablePagination-root-99"+ colSpan={3}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-105 MuiToolbar-gutters-106 MuiTablePagination-toolbar-104"+ >+ <div+ className="MuiTablePagination-spacer-103"+ />+ <div+ className="MuiTablePaginationActions-root-107"+ >+ <button+ className="MuiButtonBase-root-64 MuiButtonBase-disabled-65 MuiIconButton-root-58 MuiIconButton-disabled-62"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ </td>+ </tr>+ </tfoot>+ <tbody+ className="MuiTableBody-root-108"+ >+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ >+ <div+ className="MuiAvatar-root-109 MuiAvatar-colorDefault-110"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"+ />+ </svg>+ </div>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ <span+ className="Component-skeleton-112"+ style={undefined}+ >+ + </span>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ <span+ className="Component-skeleton-112"+ style={undefined}+ >+ + </span>+ </td>+ </tr>+ </tbody>+ </table>+</div>+`;++exports[`<CategoryProducts /> renders with initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Products+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <table+ className="MuiTable-root-81"+ >+ <thead+ className="MuiTableHead-root-82"+ >+ <tr+ className="MuiTableRow-root-83 MuiTableRow-head-84"+ >+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89 Component-avatarCell-80"+ scope="col"+ />+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Name+ </th>+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Type+ </th>+ </tr>+ </thead>+ <tfoot>+ <tr+ className="MuiTableRow-root-83 MuiTableRow-footer-85"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-footer-91 MuiTablePagination-root-99"+ colSpan={3}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-105 MuiToolbar-gutters-106 MuiTablePagination-toolbar-104"+ >+ <div+ className="MuiTablePagination-spacer-103"+ />+ <div+ className="MuiTablePaginationActions-root-107"+ >+ <button+ className="MuiButtonBase-root-64 MuiButtonBase-disabled-65 MuiIconButton-root-58 MuiIconButton-disabled-62"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ </td>+ </tr>+ </tfoot>+ <tbody+ className="MuiTableBody-root-108"+ >+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ >+ <div+ className="MuiAvatar-root-109"+ >+ <img+ alt={undefined}+ className="MuiAvatar-img-111"+ sizes={undefined}+ src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg"+ srcSet={undefined}+ />+ </div>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ Gardner, Graham and King+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ T-Shirt+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ >+ <div+ className="MuiAvatar-root-109"+ >+ <img+ alt={undefined}+ className="MuiAvatar-img-111"+ sizes={undefined}+ src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg"+ srcSet={undefined}+ />+ </div>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ Gardner, Graham and King+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ T-Shirt+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ >+ <div+ className="MuiAvatar-root-109"+ >+ <img+ alt={undefined}+ className="MuiAvatar-img-111"+ sizes={undefined}+ src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg"+ srcSet={undefined}+ />+ </div>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ Gardner, Graham and King+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ T-Shirt+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ >+ <div+ className="MuiAvatar-root-109"+ >+ <img+ alt={undefined}+ className="MuiAvatar-img-111"+ sizes={undefined}+ src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg"+ srcSet={undefined}+ />+ </div>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ Gardner, Graham and King+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ scope={undefined}+ >+ T-Shirt+ </td>+ </tr>+ </tbody>+ </table>+</div>+`;++exports[`<CategoryProducts /> renders without initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Products+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <table+ className="MuiTable-root-81"+ >+ <thead+ className="MuiTableHead-root-82"+ >+ <tr+ className="MuiTableRow-root-83 MuiTableRow-head-84"+ >+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89 Component-avatarCell-80"+ scope="col"+ />+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Name+ </th>+ <th+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-head-89"+ scope="col"+ >+ Type+ </th>+ </tr>+ </thead>+ <tfoot>+ <tr+ className="MuiTableRow-root-83 MuiTableRow-footer-85"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-footer-91 MuiTablePagination-root-99"+ colSpan={3}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-105 MuiToolbar-gutters-106 MuiTablePagination-toolbar-104"+ >+ <div+ className="MuiTablePagination-spacer-103"+ />+ <div+ className="MuiTablePaginationActions-root-107"+ >+ <button+ className="MuiButtonBase-root-64 MuiButtonBase-disabled-65 MuiIconButton-root-58 MuiIconButton-disabled-62"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ </td>+ </tr>+ </tfoot>+ <tbody+ className="MuiTableBody-root-108"+ >+ <tr+ className="MuiTableRow-root-83"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90 Component-avatarCell-80"+ scope={undefined}+ />+ <td+ aria-sort={null}+ className="MuiTableCell-root-88 MuiTableCell-body-90"+ colSpan={2}+ scope={undefined}+ >+ No products found+ </td>+ </tr>+ </tbody>+ </table>+</div>+`;diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/index.ts b/saleor/static/dashboard-next/category/components/CategoryProducts/index.tsnew file mode 100644index 0000000000..12cece4a6a--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/index.ts@@ -0,0 +1 @@+export { default } from "./CategoryProducts";diff --git a/saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.test.tsx b/saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.test.tsxnew file mode 100644index 0000000000..584df9dc9e--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.test.tsx@@ -0,0 +1,47 @@+import * as React from "react";+import { MemoryRouter } from "react-router-dom";+import * as renderer from "react-test-renderer";++import CategorySubcategories from "./CategorySubcategories";++describe("<CategorySubcategories />", () => {+ it("renders with initial data", () => {+ const categories = [+ {+ id: "123123",+ name: "Lorem ipsum dolor"+ },+ {+ id: "876752",+ name: "Mauris vehicula tortor vulputate"+ }+ ];+ const component = renderer.create(+ <CategorySubcategories+ subcategories={categories}+ onClickSubcategory={jest.fn()}+ onCreate={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders without initial data", () => {+ const component = renderer.create(+ <CategorySubcategories+ subcategories={[]}+ onClickSubcategory={jest.fn()}+ onCreate={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when loading data", () => {+ const component = renderer.create(+ <CategorySubcategories+ onClickSubcategory={jest.fn()}+ onCreate={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/category/components/CategorySubcategories.tsx b/saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.tsxsimilarity index 50%rename from saleor/static/dashboard-next/category/components/CategorySubcategories.tsxrename to saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.tsxindex 470487153b..a0765b86d6 100644--- a/saleor/static/dashboard-next/category/components/CategorySubcategories.tsx+++ b/saleor/static/dashboard-next/category/components/CategorySubcategories/CategorySubcategories.tsx@@ -3,37 +3,34 @@ import Card from "material-ui/Card";import IconButton from "material-ui/IconButton";import * as React from "react";-import CategoryList from "../../components/CategoryList";-import PageHeader from "../../components/PageHeader";-import { CategoryPropertiesQuery } from "../../gql-types";-import i18n from "../../i18n";+import CategoryList from "../../../components/CategoryList";+import PageHeader from "../../../components/PageHeader";+import { CategoryPropertiesQuery } from "../../../gql-types";+import i18n from "../../../i18n";interface CategorySubcategoriesProps {- data: CategoryPropertiesQuery;- loading?: boolean;+ subcategories?: Array<{+ id: string;+ name: string;+ }>;onClickSubcategory?(id: string);onCreate?();}const CategorySubcategories: React.StatelessComponent<CategorySubcategoriesProps-> = ({ data, loading, onClickSubcategory, onCreate }) => (+> = ({ subcategories, onClickSubcategory, onCreate }) => (<Card><PageHeadertitle={i18n.t("Subcategories", {context: "title"})}>- <IconButton disabled={loading} onClick={onCreate}>+ <IconButton onClick={onCreate}><AddIcon /></IconButton></PageHeader>- <CategoryList- categories={- data.category && data.category.children && data.category.children.edges- }- onClick={onClickSubcategory}- />+ <CategoryList categories={subcategories} onClick={onClickSubcategory} /></Card>);diff --git a/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snapnew file mode 100644index 0000000000..5d32d54db1--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap@@ -0,0 +1,296 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<CategorySubcategories /> renders when loading data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Subcategories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <li+ className="MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91"+ disabled={false}+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ <span+ className="Component-skeleton-106"+ style={undefined}+ >+ + </span>+ </h3>+ </div>+ </li>+ </ul>+</div>+`;++exports[`<CategorySubcategories /> renders with initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Subcategories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <div+ className="MuiButtonBase-root-64 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ role="button"+ tabIndex="0"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ Lorem ipsum dolor+ </h3>+ </div>+ <span+ className="MuiTouchRipple-root-73"+ />+ </div>+ <div+ className="MuiButtonBase-root-64 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ role="button"+ tabIndex="0"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ Mauris vehicula tortor vulputate+ </h3>+ </div>+ <span+ className="MuiTouchRipple-root-73"+ />+ </div>+ </ul>+</div>+`;++exports[`<CategorySubcategories /> renders without initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Subcategories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <li+ className="MuiListSubheader-root-101 MuiListSubheader-sticky-105"+ >+ No categories found+ </li>+ </ul>+</div>+`;diff --git a/saleor/static/dashboard-next/category/components/CategorySubcategories/index.ts b/saleor/static/dashboard-next/category/components/CategorySubcategories/index.tsnew file mode 100644index 0000000000..b4aea88215--- /dev/null+++ b/saleor/static/dashboard-next/category/components/CategorySubcategories/index.ts@@ -0,0 +1,2 @@+export { default } from "./CategorySubcategories";+export * from "./CategorySubcategories";diff --git a/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.test.tsx b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.test.tsxnew file mode 100644index 0000000000..d7d51a3ad0--- /dev/null+++ b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.test.tsx@@ -0,0 +1,43 @@+import * as React from "react";+import * as renderer from "react-test-renderer";++import ProductFilters from "./";++const productTypes = [+ { id: "123123123", name: "Type 1" },+ { id: "123123124", name: "Type 2" },+ { id: "123123125", name: "Type 3" },+ { id: "123123126", name: "Type 4" }+];+const productFilters = {+ highlighted: "false",+ name: "Lorem ipsum",+ price_max: "50",+ price_min: "30",+ productTypes: ["123123123", "123123126"],+ published: "true"+};++describe("<ProductFilters />", () => {+ it("renders without initial state", () => {+ const component = renderer.create(+ <ProductFilters+ handleClear={jest.fn()}+ handleSubmit={jest.fn()}+ productTypes={productTypes}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with initial state", () => {+ const component = renderer.create(+ <ProductFilters+ formState={productFilters}+ handleClear={jest.fn()}+ handleSubmit={jest.fn()}+ productTypes={productTypes}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/category/components/ProductFilters.tsx b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsxsimilarity index 88%rename from saleor/static/dashboard-next/category/components/ProductFilters.tsxrename to saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsxindex 2dd99c76e2..dd0d4b0227 100644--- a/saleor/static/dashboard-next/category/components/ProductFilters.tsx+++ b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsx@@ -1,12 +1,12 @@import TextField from "material-ui/TextField";import * as React from "react";-import FilterCard from "../../components/FilterCard";-import FormSpacer from "../../components/FormSpacer";-import MultiSelectField from "../../components/MultiSelectField";-import PriceField from "../../components/PriceField";-import SingleSelectField from "../../components/SingleSelectField";-import i18n from "../../i18n";+import FilterCard from "../../../components/FilterCard";+import FormSpacer from "../../../components/FormSpacer";+import MultiSelectField from "../../../components/MultiSelectField";+import PriceField from "../../../components/PriceField";+import SingleSelectField from "../../../components/SingleSelectField";+import i18n from "../../../i18n";const { Component } = React;@@ -24,7 +24,14 @@ interface ProductFiltersProps {id: string;name: string;}>;- formState?: ProductFiltersState;+ formState?: {+ highlighted: string;+ name: string;+ price_min: string;+ price_max: string;+ productTypes: string[];+ published: string;+ };handleSubmit(formState: any);handleClear();}diff --git a/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap b/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snapnew file mode 100644index 0000000000..5743231dba--- /dev/null+++ b/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap@@ -0,0 +1,872 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<ProductFilters /> renders with initial state 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <form>+ <div+ className="MuiCardHeader-root-28"+ >+ <div+ className="MuiCardHeader-content-31"+ >+ <span+ className="MuiTypography-root-34 MuiTypography-headline-39 MuiCardHeader-title-32"+ >+ Filters+ </span>+ </div>+ <div+ className="MuiCardHeader-action-30"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <div+ className="MuiCardContent-root-80"+ >+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"+ data-shrink={true}+ htmlFor={undefined}+ >+ Name+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="name"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="text"+ value="Lorem ipsum"+ />+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-114"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"+ data-shrink={true}+ >+ Product type+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <div+ className="Component-chipContainer-113"+ >+ <div+ className="MuiChip-root-132 Component-chip-112"+ onClick={undefined}+ onKeyDown={[Function]}+ role="button"+ tabIndex={-1}+ >+ <span+ className="MuiChip-label-137"+ >+ Type 1+ </span>+ </div>+ <div+ className="MuiChip-root-132 Component-chip-112"+ onClick={undefined}+ onKeyDown={[Function]}+ role="button"+ tabIndex={-1}+ >+ <span+ className="MuiChip-label-137"+ >+ Type 4+ </span>+ </div>+ </div>+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="productTypes"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="123123123,123123126"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="Component-widgetContainer-127"+ >+ <div+ className="Component-inputContainer-124"+ >+ <div+ className="MuiFormControl-root-81"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"+ data-shrink={true}+ htmlFor="price_min"+ >+ Price+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105 MuiInput-inputType-109"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="30"+ />+ <div+ className="MuiInputAdornment-root-128 MuiInputAdornment-positionEnd-130"+ >+ <p+ className="MuiTypography-root-34 MuiTypography-body1-43 MuiTypography-colorTextSecondary-56"+ >+ USD+ </p>+ </div>+ </div>+ </div>+ <span+ className="Component-separator-126"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-81"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101 Component-pullDown-125"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105 MuiInput-inputType-109"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="50"+ />+ <div+ className="MuiInputAdornment-root-128 MuiInputAdornment-positionEnd-130"+ >+ <p+ className="MuiTypography-root-34 MuiTypography-body1-43 MuiTypography-colorTextSecondary-56"+ >+ USD+ </p>+ </div>+ </div>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-131"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"+ data-shrink={true}+ >+ Published+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="published"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="true"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-131"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"+ data-shrink={true}+ >+ Highlighted+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="highlighted"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="false"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ </div>+ </form>+</div>+`;++exports[`<ProductFilters /> renders without initial state 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <form>+ <div+ className="MuiCardHeader-root-28"+ >+ <div+ className="MuiCardHeader-content-31"+ >+ <span+ className="MuiTypography-root-34 MuiTypography-headline-39 MuiCardHeader-title-32"+ >+ Filters+ </span>+ </div>+ <div+ className="MuiCardHeader-action-30"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <div+ className="MuiCardContent-root-80"+ >+ <div+ aria-describedby={undefined}+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"+ data-shrink={false}+ htmlFor={undefined}+ >+ Name+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="name"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="text"+ value=""+ />+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-114"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"+ data-shrink={false}+ >+ Product type+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="productTypes"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="Component-widgetContainer-127"+ >+ <div+ className="Component-inputContainer-124"+ >+ <div+ className="MuiFormControl-root-81"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"+ data-shrink={false}+ htmlFor="price_min"+ >+ Price+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105 MuiInput-inputType-109"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <div+ className="MuiInputAdornment-root-128 MuiInputAdornment-positionEnd-130"+ >+ <p+ className="MuiTypography-root-34 MuiTypography-body1-43 MuiTypography-colorTextSecondary-56"+ >+ USD+ </p>+ </div>+ </div>+ </div>+ <span+ className="Component-separator-126"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-81"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101 Component-pullDown-125"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-105 MuiInput-inputType-109"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <div+ className="MuiInputAdornment-root-128 MuiInputAdornment-positionEnd-130"+ >+ <p+ className="MuiTypography-root-34 MuiTypography-body1-43 MuiTypography-colorTextSecondary-56"+ >+ USD+ </p>+ </div>+ </div>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-131"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"+ data-shrink={false}+ >+ Published+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="published"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ <div+ className="Component-spacer-111"+ />+ <div+ className="MuiFormControl-root-81 Component-formControl-131"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-91 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"+ data-shrink={false}+ >+ Highlighted+ </label>+ <div+ className="MuiInput-root-97 MuiInput-fullWidth-104 MuiInput-formControl-98 MuiInput-underline-101"+ >+ <div+ className="MuiSelect-root-115"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-116 MuiSelect-selectMenu-117 MuiInput-input-105"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name="highlighted"+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiSelect-icon-119"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ </div>+ </div>+ </form>+</div>+`;diff --git a/saleor/static/dashboard-next/category/components/ProductFilters/index.ts b/saleor/static/dashboard-next/category/components/ProductFilters/index.tsnew file mode 100644index 0000000000..053048c577--- /dev/null+++ b/saleor/static/dashboard-next/category/components/ProductFilters/index.ts@@ -0,0 +1,2 @@+export { default } from "./ProductFilters";+export * from "./ProductFilters";diff --git a/saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.test.tsx b/saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.test.tsxnew file mode 100644index 0000000000..e76767b54e--- /dev/null+++ b/saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.test.tsx@@ -0,0 +1,44 @@+import * as React from "react";+import { MemoryRouter } from "react-router-dom";+import * as renderer from "react-test-renderer";++import RootCategoryList from "./";++describe("<CategorySubcategories />", () => {+ it("renders with initial data", () => {+ const categories = [+ {+ id: "123123",+ name: "Lorem ipsum dolor"+ },+ {+ id: "876752",+ name: "Mauris vehicula tortor vulputate"+ }+ ];+ const component = renderer.create(+ <RootCategoryList+ categories={categories}+ onClick={jest.fn()}+ onCreate={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders without initial data", () => {+ const component = renderer.create(+ <RootCategoryList+ categories={[]}+ onClick={jest.fn()}+ onCreate={jest.fn()}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when loading data", () => {+ const component = renderer.create(+ <RootCategoryList onClick={jest.fn()} onCreate={jest.fn()} />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/category/components/RootCategoryList.tsx b/saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.tsxsimilarity index 54%rename from saleor/static/dashboard-next/category/components/RootCategoryList.tsxrename to saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.tsxindex fa010b5754..6632416f12 100644--- a/saleor/static/dashboard-next/category/components/RootCategoryList.tsx+++ b/saleor/static/dashboard-next/category/components/RootCategoryList/RootCategoryList.tsx@@ -3,34 +3,32 @@ import Card from "material-ui/Card";import IconButton from "material-ui/IconButton";import * as React from "react";-import CategoryList from "../../components/CategoryList";-import PageHeader from "../../components/PageHeader";-import { RootCategoryChildrenQuery } from "../../gql-types";-import i18n from "../../i18n";+import CategoryList from "../../../components/CategoryList";+import PageHeader from "../../../components/PageHeader";+import { RootCategoryChildrenQuery } from "../../../gql-types";+import i18n from "../../../i18n";interface RootCategoryListProps {- data: RootCategoryChildrenQuery;- loading?: boolean;+ categories?: Array<{+ id: string;+ name: string;+ }>;onClick?(id: string);onCreate?();}const RootCategoryList: React.StatelessComponent<RootCategoryListProps> = ({- data,- loading,+ categories,onClick,onCreate}) => (<Card><PageHeader title={i18n.t("Categories", { context: "title" })}>- <IconButton onClick={onCreate} disabled={loading}>+ <IconButton onClick={onCreate}><AddIcon /></IconButton></PageHeader>- <CategoryList- categories={data.categories && data.categories.edges}- onClick={onClick}- />+ <CategoryList categories={categories} onClick={onClick} /></Card>);diff --git a/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap b/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snapnew file mode 100644index 0000000000..7c3100733c--- /dev/null+++ b/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap@@ -0,0 +1,296 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<CategorySubcategories /> renders when loading data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Categories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <li+ className="MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91"+ disabled={false}+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ <span+ className="Component-skeleton-106"+ style={undefined}+ >+ + </span>+ </h3>+ </div>+ </li>+ </ul>+</div>+`;++exports[`<CategorySubcategories /> renders with initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Categories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <div+ className="MuiButtonBase-root-64 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ role="button"+ tabIndex="0"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ Lorem ipsum dolor+ </h3>+ </div>+ <span+ className="MuiTouchRipple-root-73"+ />+ </div>+ <div+ className="MuiButtonBase-root-64 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ role="button"+ tabIndex="0"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </svg>+ <div+ className="MuiListItemText-root-95"+ >+ <h3+ className="MuiTypography-root-34 MuiTypography-subheading-41 MuiListItemText-primary-98"+ >+ Mauris vehicula tortor vulputate+ </h3>+ </div>+ <span+ className="MuiTouchRipple-root-73"+ />+ </div>+ </ul>+</div>+`;++exports[`<CategorySubcategories /> renders without initial data 1`] = `+<div+ className="MuiPaper-root-1 MuiPaper-elevation2-5 MuiPaper-rounded-2"+>+ <div+ className="Component-root-31"+ >+ <h2+ className="MuiTypography-root-34 MuiTypography-title-40 Component-title-33"+ >+ Categories+ </h2>+ <div+ className="Component-action-28"+ >+ <button+ className="MuiButtonBase-root-64 MuiIconButton-root-58"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-63"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-67"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-73"+ />+ </button>+ </div>+ </div>+ <ul+ className="MuiList-root-80 MuiList-padding-81"+ >+ <li+ className="MuiListSubheader-root-101 MuiListSubheader-sticky-105"+ >+ No categories found+ </li>+ </ul>+</div>+`;diff --git a/saleor/static/dashboard-next/category/components/RootCategoryList/index.ts b/saleor/static/dashboard-next/category/components/RootCategoryList/index.tsnew file mode 100644index 0000000000..7a2a819935--- /dev/null+++ b/saleor/static/dashboard-next/category/components/RootCategoryList/index.ts@@ -0,0 +1,2 @@+export { default } from "./RootCategoryList";+export * from "./RootCategoryList";diff --git a/saleor/static/dashboard-next/category/views/CategoryCreateForm.tsx b/saleor/static/dashboard-next/category/views/CategoryCreateForm.tsxindex 2b5bd6e741..ddf6464e4d 100644--- a/saleor/static/dashboard-next/category/views/CategoryCreateForm.tsx+++ b/saleor/static/dashboard-next/category/views/CategoryCreateForm.tsx@@ -7,7 +7,7 @@ import { NavigatorLink } from "../../components/Navigator";import PageHeader from "../../components/PageHeader";import { CategoryCreateMutationVariables } from "../../gql-types";import i18n from "../../i18n";-import BaseCategoryForm from "../components/BaseForm";+import CategoryBaseForm from "../components/CategoryBaseForm";import { categoryShowUrl } from "../index";import {categoryCreateMutation,@@ -62,7 +62,7 @@ export const CategoryCreateForm: React.StatelessComponent<onBack={handleCancel}title={i18n.t("Add category", { context: "title" })}/>- <BaseCategoryForm+ <CategoryBaseFormdescription={data.description}errors={errors}name={data.name}diff --git a/saleor/static/dashboard-next/category/views/CategoryUpdateForm.tsx b/saleor/static/dashboard-next/category/views/CategoryUpdateForm.tsxindex 59a293a14f..1d3beb05ec 100644--- a/saleor/static/dashboard-next/category/views/CategoryUpdateForm.tsx+++ b/saleor/static/dashboard-next/category/views/CategoryUpdateForm.tsx@@ -10,7 +10,7 @@ import { NavigatorLink } from "../../components/Navigator";import PageHeader from "../../components/PageHeader";import { CategoryUpdateMutationVariables } from "../../gql-types";import i18n from "../../i18n";-import BaseCategoryForm from "../components/BaseForm";+import CategoryBaseForm from "../components/CategoryBaseForm";import { categoryShowUrl } from "../index";import {categoryUpdateMutation,@@ -96,7 +96,7 @@ export const CategoryUpdateForm = decorate<CategoryUpdateFormProps>(context: "title"})}/>- <BaseCategoryForm+ <CategoryBaseFormdescription={data.description}errors={errors}name={data.name}diff --git a/saleor/static/dashboard-next/category/views/details.tsx b/saleor/static/dashboard-next/category/views/details.tsxindex 200a87e243..83c68cc449 100644--- a/saleor/static/dashboard-next/category/views/details.tsx+++ b/saleor/static/dashboard-next/category/views/details.tsx@@ -192,132 +192,158 @@ const CategoryDetails = decorate<CategoryDetailsProps>(const clearFilters = () => navigate("?");return (<CategoryPaginationProvider id={id}>- {({ data, loading, fetchNextPage, fetchPreviousPage }) => (- <CategoryDeleteProvider category={data.category}>- {deleteCategory => (- <Toggle>- {(- filtersVisible,- { disable: hideFilters, enable: showFilters }- ) => (- <div className={classes.root}>- <Toggle>- {(- deleteVisible,- { disable: hideDelete, enable: showDelete }- ) => (- <NavigatorLink- to={- (data.category &&- categoryShowUrl(- data.category.parent &&- data.category.parent.id- )) ||- "#"+ {({ data, loading, fetchNextPage, fetchPreviousPage }) => {+ const dataHasProducts =+ data && data.category && data.category.products;+ return (+ <CategoryDeleteProvider category={data.category}>+ {deleteCategory => (+ <Toggle>+ {(+ filtersVisible,+ { disable: hideFilters, enable: showFilters }+ ) => (+ <div className={classes.root}>+ <Toggle>+ {(+ deleteVisible,+ { disable: hideDelete, enable: showDelete }+ ) => (+ <NavigatorLink+ to={+ (data.category &&+ categoryShowUrl(+ data.category.parent &&+ data.category.parent.id+ )) ||+ "#"+ }+ >+ {handleBack => (+ <NavigatorLink+ to={+ data.category &&+ categoryEditUrl(data.category.id)+ }+ >+ {handleEdit => (+ <>+ <CategoryPropertiesCard+ description={+ data.category &&+ data.category.description+ }+ onBack={handleBack}+ onDelete={showDelete}+ onEdit={handleEdit}+ title={+ data.category &&+ data.category.name+ }+ />+ <CategoryDeleteDialog+ name={+ data.category &&+ data.category.name+ }+ onClose={hideDelete}+ onConfirm={deleteCategory}+ open={deleteVisible}+ productCount={+ dataHasProducts &&+ data.category.products+ .totalCount+ }+ />+ </>+ )}+ </NavigatorLink>+ )}+ </NavigatorLink>+ )}+ </Toggle>+ <Hidden smDown implementation="css" />+ <NavigatorLink+ to={+ data.category+ ? categoryAddUrl(data.category.id)+ : "#"+ }+ >+ {handleCreate => (+ <CategorySubcategories+ subcategories={+ data && data.category+ ? data.category.children.edges.map(+ edge => edge.node+ )+ : []+ }+ onClickSubcategory={id =>+ navigate(categoryShowUrl(id))+ }+ onCreate={handleCreate}+ />+ )}+ </NavigatorLink>+ <Hidden smDown implementation="css" />+ <div>+ {/* CSS grid will make this full height */}+ <CategoryProducts+ products={+ dataHasProducts+ ? data.category.products.edges.map(+ edge => edge.node+ )+ : []}- >- {handleBack => (- <NavigatorLink- to={- data.category &&- categoryEditUrl(data.category.id)- }- >- {handleEdit => (- <>- <CategoryPropertiesCard- description={- data.category &&- data.category.description- }- onBack={handleBack}- onDelete={showDelete}- onEdit={handleEdit}- title={- data.category &&- data.category.name- }- />- <CategoryDeleteDialog- name={- data.category &&- data.category.name- }- onClose={hideDelete}- onConfirm={deleteCategory}- open={deleteVisible}- productCount={- data.category &&- data.category.products &&- data.category.products.totalCount- }- />- </>- )}- </NavigatorLink>- )}- </NavigatorLink>- )}- </Toggle>- <Hidden smDown implementation="css" />- <NavigatorLink- to={- data.category- ? categoryAddUrl(data.category.id)- : "#"- }- >- {handleCreate => (- <CategorySubcategories- data={data}- loading={loading}- onClickSubcategory={id =>- navigate(categoryShowUrl(id))+ hasPreviousPage={+ dataHasProducts+ ? data.category.products.pageInfo+ .hasPreviousPage+ : false}- onCreate={handleCreate}+ hasNextPage={+ dataHasProducts+ ? data.category.products.pageInfo+ .hasNextPage+ : false+ }+ onCreate={() => undefined}+ onFilter={showFilters}+ onNextPage={fetchNextPage}+ onPreviousPage={fetchPreviousPage}/>- )}- </NavigatorLink>- <Hidden smDown implementation="css" />- <div>- {/* CSS grid will make this full height */}- <CategoryProducts- data={data}- loading={loading}- onCreate={() => undefined}- onFilter={showFilters}- onNextPage={fetchNextPage}- onPreviousPage={fetchPreviousPage}- />- </div>- <Hidden smDown implementation="css">- <ProductFilters- handleSubmit={applyFilters}- handleClear={clearFilters}- productTypes={dummyProductTypes}- formState={filters}- />- </Hidden>- <Hidden mdUp implementation="css">- <Drawer- open={filtersVisible}- onClose={hideFilters}- anchor="bottom"- >+ </div>+ <Hidden smDown implementation="css"><ProductFiltershandleSubmit={applyFilters}handleClear={clearFilters}productTypes={dummyProductTypes}formState={filters}/>- </Drawer>- </Hidden>- </div>- )}- </Toggle>- )}- </CategoryDeleteProvider>- )}+ </Hidden>+ <Hidden mdUp implementation="css">+ <Drawer+ open={filtersVisible}+ onClose={hideFilters}+ anchor="bottom"+ >+ <ProductFilters+ handleSubmit={applyFilters}+ handleClear={clearFilters}+ productTypes={dummyProductTypes}+ formState={filters}+ />+ </Drawer>+ </Hidden>+ </div>+ )}+ </Toggle>+ )}+ </CategoryDeleteProvider>+ );+ }}</CategoryPaginationProvider>);}}@@ -341,8 +367,11 @@ const CategoryDetails = decorate<CategoryDetailsProps>(<NavigatorLink to={categoryAddUrl()}>{handleCreate => (<RootCategoryList- data={data}- loading={loading}+ categories={+ data && data.categories+ ? data.categories.edges.map(edge => edge.node)+ : []+ }onClick={id => navigate(categoryShowUrl(id))}onCreate={handleCreate}/>diff --git a/saleor/static/dashboard-next/components/CategoryList/CategoryList.test.tsx b/saleor/static/dashboard-next/components/CategoryList/CategoryList.test.tsxindex 0d5f0cab4d..c15678cad5 100644--- a/saleor/static/dashboard-next/components/CategoryList/CategoryList.test.tsx+++ b/saleor/static/dashboard-next/components/CategoryList/CategoryList.test.tsx@@ -1,59 +1,40 @@import * as React from "react";-import { MemoryRouter } from "react-router-dom";import * as renderer from "react-test-renderer";import CategoryList from "./CategoryList";const categories = [{- node: {- id: "cat1",- name: "Apparel"- }+ id: "cat1",+ name: "Apparel"},{- node: {- id: "cat2",- name: "Accessories"- }+ id: "cat2",+ name: "Accessories"},{- node: {- id: "cat3",- name: "Groceries"- }+ id: "cat3",+ name: "Groceries"},{- node: {- id: "cat4",- name: "Books"- }+ id: "cat4",+ name: "Books"}];describe("<CategoryList />", () => {it("renders while data is loading", () => {- const component = renderer.create(- <MemoryRouter>- <CategoryList />- </MemoryRouter>- );+ const component = renderer.create(<CategoryList />);expect(component).toMatchSnapshot();});it("renders when data is fully loaded", () => {const component = renderer.create(- <MemoryRouter>- <CategoryList categories={categories} onClick={jest.fn()} />- </MemoryRouter>+ <CategoryList categories={categories} onClick={jest.fn()} />);expect(component).toMatchSnapshot();});it("renders when category list is empty", () => {- const component = renderer.create(- <MemoryRouter>- <CategoryList categories={[]} />- </MemoryRouter>- );+ const component = renderer.create(<CategoryList categories={[]} />);expect(component).toMatchSnapshot();});});diff --git a/saleor/static/dashboard-next/components/CategoryList/CategoryList.tsx b/saleor/static/dashboard-next/components/CategoryList/CategoryList.tsxindex b5d622a787..1c565d4854 100644--- a/saleor/static/dashboard-next/components/CategoryList/CategoryList.tsx+++ b/saleor/static/dashboard-next/components/CategoryList/CategoryList.tsx@@ -12,7 +12,10 @@ import i18n from "../../i18n";import Skeleton from "../Skeleton";interface CategoryListProps {- categories?: CategoryPropertiesQuery["category"]["children"]["edges"];+ categories?: Array<{+ id: string;+ name: string;+ }>;onClick?(id: string);}export const CategoryList: React.StatelessComponent<CategoryListProps> = ({@@ -20,7 +23,7 @@ export const CategoryList: React.StatelessComponent<CategoryListProps> = ({onClick}) => (<List>- {categories === undefined ? (+ {categories === undefined || categories === null ? (<ListItem><ListItemIcon><Folder />@@ -30,18 +33,18 @@ export const CategoryList: React.StatelessComponent<CategoryListProps> = ({</ListItemText></ListItem>) : categories.length > 0 ? (- categories.map(edge => (+ categories.map(category => (<ListItembutton={!!onClick}- key={edge.node.id}+ key={category.id}onClick={- onClick !== undefined ? () => onClick(edge.node.id) : undefined+ onClick !== undefined ? () => onClick(category.id) : undefined}><ListItemIcon><Folder /></ListItemIcon>- <ListItemText primary={edge.node.name} />+ <ListItemText primary={category.name} /></ListItem>))) : (diff --git a/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.test.tsx b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.test.tsxnew file mode 100644index 0000000000..c76093f4f6--- /dev/null+++ b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.test.tsx@@ -0,0 +1,84 @@+import * as React from "react";+import * as renderer from "react-test-renderer";++import MultiSelectField from "./";++const choices = [+ { value: "1", label: "Apparel" },+ { value: "2", label: "Groceries" },+ { value: "3", label: "Books" },+ { value: "4", label: "Accessories" }+];++describe("<MultiSelectField />", () => {+ it("renders with no value", () => {+ const component = renderer.create(+ <MultiSelectField choices={choices} onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ value={[choices[0].value]}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with hint", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label and hint", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem"+ hint="Ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value, label and hint", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ value={[choices[0].value]}+ label="Lorem"+ hint="Ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with error hint", () => {+ const component = renderer.create(+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem error"+ error={true}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/components/MultiSelectField.tsx b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsxsimilarity index 81%rename from saleor/static/dashboard-next/components/MultiSelectField.tsxrename to saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsxindex 4180d79b4e..8128a499ae 100644--- a/saleor/static/dashboard-next/components/MultiSelectField.tsx+++ b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsx@@ -14,11 +14,9 @@ const decorate = withStyles(theme => ({display: "flex","flex-wrap": "wrap",marginLeft: -theme.spacing.unit * 0.5,- marginRight: -theme.spacing.unit * 0.5,- marginTop: -theme.spacing.unit * 2+ marginRight: -theme.spacing.unit * 0.5},formControl: {- // marginTop: theme.spacing.unit * 2,width: "100%"}}));@@ -28,23 +26,34 @@ interface MultiSelectFieldProps {value: string;label: string;}>;+ error?: boolean;hint?: string;- label: string;- name: string;+ label?: string;+ name?: string;selectProps?: SelectProps;- value: string[];+ value?: string[];onChange(event: any);}export const MultiSelectField = decorate<MultiSelectFieldProps>(- ({ classes, label, choices, value, onChange, name, hint, selectProps }) => {+ ({+ classes,+ error,+ label,+ choices,+ value,+ onChange,+ name,+ hint,+ selectProps+ }) => {const choicesByKey = choices.reduce((prev, curr) => {prev[curr.value] = curr.label;return prev;}, {});return (- <FormControl className={classes.formControl}>- <InputLabel>{label}</InputLabel>+ <FormControl className={classes.formControl} error={error}>+ {label && <InputLabel>{label}</InputLabel>}<SelectmultiplefullWidth@@ -75,5 +84,8 @@ export const MultiSelectField = decorate<MultiSelectFieldProps>();});+MultiSelectField.defaultProps = {+ value: []+};export default MultiSelectField;diff --git a/saleor/static/dashboard-next/components/MultiSelectField/__snapshots__/MultiSelectField.test.tsx.snap b/saleor/static/dashboard-next/components/MultiSelectField/__snapshots__/MultiSelectField.test.tsx.snapnew file mode 100644index 0000000000..3195c67588--- /dev/null+++ b/saleor/static/dashboard-next/components/MultiSelectField/__snapshots__/MultiSelectField.test.tsx.snap@@ -0,0 +1,514 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<MultiSelectField /> renders with error hint 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <div+ className="MuiInput-root-13 MuiInput-error-18 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={true}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-56 MuiFormHelperText-error-57"+ >+ Lorem error+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with hint 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-56"+ >+ Lorem ipsum+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with label 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-50 MuiInputLabel-root-44 MuiInputLabel-formControl-45 MuiInputLabel-animated-48"+ data-shrink={false}+ >+ Lorem ipsum+ </label>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with label and hint 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-50 MuiInputLabel-root-44 MuiInputLabel-formControl-45 MuiInputLabel-animated-48"+ data-shrink={false}+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-56"+ >+ Ipsum+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with no value 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with value 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <div+ className="Component-chipContainer-2"+ >+ <div+ className="MuiChip-root-37 Component-chip-1"+ onClick={undefined}+ onKeyDown={[Function]}+ role="button"+ tabIndex={-1}+ >+ <span+ className="MuiChip-label-42"+ >+ Apparel+ </span>+ </div>+ </div>+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="1"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with value, label and hint 1`] = `+<div+ className="MuiFormControl-root-4 Component-formControl-3"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-50 MuiInputLabel-root-44 MuiInputLabel-formControl-45 MuiInputLabel-animated-48 MuiInputLabel-shrink-47"+ data-shrink={true}+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-13 MuiInput-fullWidth-20 MuiInput-formControl-14 MuiInput-underline-17"+ >+ <div+ className="MuiSelect-root-8"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-9 MuiSelect-selectMenu-10 MuiInput-input-21"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <div+ className="Component-chipContainer-2"+ >+ <div+ className="MuiChip-root-37 Component-chip-1"+ onClick={undefined}+ onKeyDown={[Function]}+ role="button"+ tabIndex={-1}+ >+ <span+ className="MuiChip-label-42"+ >+ Apparel+ </span>+ </div>+ </div>+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="1"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-27 MuiSelect-icon-12"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-56"+ >+ Ipsum+ </p>+</div>+`;diff --git a/saleor/static/dashboard-next/components/MultiSelectField/index.ts b/saleor/static/dashboard-next/components/MultiSelectField/index.tsnew file mode 100644index 0000000000..16d0759519--- /dev/null+++ b/saleor/static/dashboard-next/components/MultiSelectField/index.ts@@ -0,0 +1,2 @@+export { default } from "./MultiSelectField";+export * from "./MultiSelectField";diff --git a/saleor/static/dashboard-next/components/PageHeader/PageHeader.test.tsx b/saleor/static/dashboard-next/components/PageHeader/PageHeader.test.tsxnew file mode 100644index 0000000000..f0d0ea94e6--- /dev/null+++ b/saleor/static/dashboard-next/components/PageHeader/PageHeader.test.tsx@@ -0,0 +1,43 @@+import DeleteIcon from "material-ui-icons/Delete";+import IconButton from "material-ui/IconButton";+import * as React from "react";+import * as renderer from "react-test-renderer";++import PageHeader from "./";++describe("<PageHeader />", () => {+ it("renders without title", () => {+ const component = renderer.create(<PageHeader />);+ expect(component).toMatchSnapshot();+ });+ it("renders with title", () => {+ const component = renderer.create(<PageHeader title="Lorem ipsum" />);+ expect(component).toMatchSnapshot();+ });+ it("renders with title and back button", () => {+ const component = renderer.create(+ <PageHeader title="Lorem ipsum" onBack={jest.fn()} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with title icon bar", () => {+ const component = renderer.create(+ <PageHeader title="Lorem ipsum">+ <IconButton>+ <DeleteIcon />+ </IconButton>+ </PageHeader>+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with title, back button and icon bar", () => {+ const component = renderer.create(+ <PageHeader title="Lorem ipsum" onBack={jest.fn()}>+ <IconButton>+ <DeleteIcon />+ </IconButton>+ </PageHeader>+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/components/PageHeader.tsx b/saleor/static/dashboard-next/components/PageHeader/PageHeader.tsxsimilarity index 96%rename from saleor/static/dashboard-next/components/PageHeader.tsxrename to saleor/static/dashboard-next/components/PageHeader/PageHeader.tsxindex 39f0498231..4dab88d4ca 100644--- a/saleor/static/dashboard-next/components/PageHeader.tsx+++ b/saleor/static/dashboard-next/components/PageHeader/PageHeader.tsx@@ -4,7 +4,7 @@ import IconButton from "material-ui/IconButton";import { withStyles } from "material-ui/styles";import Typography from "material-ui/Typography";import * as React from "react";-import Skeleton from "./Skeleton";+import Skeleton from "../Skeleton";const decorate = withStyles(theme => ({action: {@@ -36,7 +36,7 @@ const decorate = withStyles(theme => ({}));interface PageHeaderProps {- title: string;+ title?: string;onBack?();}diff --git a/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap b/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snapnew file mode 100644index 0000000000..a8f78ec586--- /dev/null+++ b/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap@@ -0,0 +1,229 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<PageHeader /> renders with title 1`] = `+<div+ className="Component-root-4"+>+ <h2+ className="MuiTypography-root-7 MuiTypography-title-13 Component-title-6"+ >+ Lorem ipsum+ </h2>+ <div+ className="Component-action-1"+ />+</div>+`;++exports[`<PageHeader /> renders with title and back button 1`] = `+<div+ className="Component-root-4"+>+ <button+ className="MuiButtonBase-root-38 MuiIconButton-root-32 MuiIconButton-colorInherit-33 Component-menuButton-3"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-37"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-41"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ <h2+ className="MuiTypography-root-7 MuiTypography-title-13 Component-title-6"+ >+ Lorem ipsum+ </h2>+ <div+ className="Component-action-1"+ />+</div>+`;++exports[`<PageHeader /> renders with title icon bar 1`] = `+<div+ className="Component-root-4"+>+ <h2+ className="MuiTypography-root-7 MuiTypography-title-13 Component-title-6"+ >+ Lorem ipsum+ </h2>+ <div+ className="Component-action-1"+ >+ <button+ className="MuiButtonBase-root-38 MuiIconButton-root-32"+ disabled={false}+ onBlur={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-37"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-41"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ </div>+</div>+`;++exports[`<PageHeader /> renders with title, back button and icon bar 1`] = `+<div+ className="Component-root-4"+>+ <button+ className="MuiButtonBase-root-38 MuiIconButton-root-32 MuiIconButton-colorInherit-33 Component-menuButton-3"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-37"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-41"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ <h2+ className="MuiTypography-root-7 MuiTypography-title-13 Component-title-6"+ >+ Lorem ipsum+ </h2>+ <div+ className="Component-action-1"+ >+ <button+ className="MuiButtonBase-root-38 MuiIconButton-root-32"+ disabled={false}+ onBlur={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-37"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-41"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ </div>+</div>+`;++exports[`<PageHeader /> renders without title 1`] = `+<div+ className="Component-root-4"+>+ <h2+ className="MuiTypography-root-7 MuiTypography-title-13 Component-title-6"+ >+ <span+ className="Component-skeleton-31"+ style={+ Object {+ "width": "10em",+ }+ }+ >+ + </span>+ </h2>+ <div+ className="Component-action-1"+ />+</div>+`;diff --git a/saleor/static/dashboard-next/components/PageHeader/index.ts b/saleor/static/dashboard-next/components/PageHeader/index.tsnew file mode 100644index 0000000000..fbf397de45--- /dev/null+++ b/saleor/static/dashboard-next/components/PageHeader/index.ts@@ -0,0 +1,2 @@+export { default } from "./PageHeader";+export * from "./PageHeader";diff --git a/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx b/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsxnew file mode 100644index 0000000000..88b778ece6--- /dev/null+++ b/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx@@ -0,0 +1,63 @@+import * as React from "react";+import * as renderer from "react-test-renderer";++import PriceField from "./";++const value = {+ max: "30",+ min: "10"+};++describe("<PriceField />", () => {+ it("renders with no value", () => {+ const component = renderer.create(<PriceField onChange={() => {}} />);+ expect(component).toMatchSnapshot();+ });+ it("renders with value", () => {+ const component = renderer.create(+ <PriceField value={value} onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label", () => {+ const component = renderer.create(+ <PriceField label="Lorem ipsum" onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with hint", () => {+ const component = renderer.create(+ <PriceField hint="Lorem ipsum" onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label and hint", () => {+ const component = renderer.create(+ <PriceField label="Lorem" hint="Ipsum" onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value, label and hint", () => {+ const component = renderer.create(+ <PriceField+ value={value}+ label="Lorem"+ hint="Ipsum"+ onChange={() => {}}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value, label and error", () => {+ const component = renderer.create(+ <PriceField+ value={value}+ label="Lorem"+ hint="Ipsum"+ error={true}+ onChange={() => {}}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/components/PriceField.tsx b/saleor/static/dashboard-next/components/PriceField/PriceField.tsxsimilarity index 58%rename from saleor/static/dashboard-next/components/PriceField.tsxrename to saleor/static/dashboard-next/components/PriceField/PriceField.tsxindex f61f1f78f3..4798b11c8a 100644--- a/saleor/static/dashboard-next/components/PriceField.tsx+++ b/saleor/static/dashboard-next/components/PriceField/PriceField.tsx@@ -4,11 +4,12 @@ import { withStyles } from "material-ui/styles";import * as React from "react";interface PriceFieldProps {- currencySymbol: string;+ currencySymbol?: string;+ error?: boolean;hint?: string;- label: string;- name: string;- value: {+ label?: string;+ name?: string;+ value?: {max?: string;min?: string;};@@ -20,7 +21,7 @@ const decorate = withStyles(theme => ({display: "grid",gridTemplateColumns: "calc(50% - 1rem) 2rem calc(50% - 1rem)"},- maxInput: {+ pullDown: {marginTop: theme.spacing.unit * 2},separator: {@@ -34,30 +35,40 @@ const decorate = withStyles(theme => ({}));export const PriceField = decorate<PriceFieldProps>(- ({ label, hint, currencySymbol, name, classes, onChange, value }) => (+ ({ error, label, hint, currencySymbol, name, classes, onChange, value }) => (<div className={classes.widgetContainer}><div className={classes.inputContainer}>- <FormControl>- <InputLabel htmlFor={`${name}_min`}>{label}</InputLabel>+ <FormControl error={error}>+ {label && <InputLabel htmlFor={`${name}_min`}>{label}</InputLabel>}<Input- value={value.min}+ value={value ? value.min : ""}endAdornment={- <InputAdornment position="end">{currencySymbol}</InputAdornment>+ currencySymbol ? (+ <InputAdornment position="end">{currencySymbol}</InputAdornment>+ ) : (+ <span />+ )}+ className={label ? "" : classes.pullDown}fullWidthname={`${name}_min`}onChange={onChange}type="number"/>+ {hint && <FormHelperText>{hint}</FormHelperText>}</FormControl><span className={classes.separator}>-</span>- <FormControl>+ <FormControl error={error}><Input- value={value.max}+ value={value ? value.max : ""}endAdornment={- <InputAdornment position="end">{currencySymbol}</InputAdornment>+ currencySymbol ? (+ <InputAdornment position="end">{currencySymbol}</InputAdornment>+ ) : (+ <span />+ )}- className={classes.maxInput}+ className={classes.pullDown}fullWidthname={`${name}_max`}onChange={onChange}@@ -65,9 +76,11 @@ export const PriceField = decorate<PriceFieldProps>(/></FormControl></div>- {hint && <FormHelperText>{hint}</FormHelperText>}</div>));+PriceField.defaultProps = {+ name: "price"+};export default PriceField;diff --git a/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap b/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snapnew file mode 100644index 0000000000..b6ac622c44--- /dev/null+++ b/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap@@ -0,0 +1,623 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<PriceField /> renders with hint 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ <p+ className="MuiFormHelperText-root-35"+ >+ Lorem ipsum+ </p>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with label 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-29 MuiInputLabel-root-23 MuiInputLabel-formControl-24 MuiInputLabel-animated-27"+ data-shrink={false}+ htmlFor="price_min"+ >+ Lorem ipsum+ </label>+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with label and hint 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-29 MuiInputLabel-root-23 MuiInputLabel-formControl-24 MuiInputLabel-animated-27"+ data-shrink={false}+ htmlFor="price_min"+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ <p+ className="MuiFormHelperText-root-35"+ >+ Ipsum+ </p>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with no value 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value=""+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with value 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="10"+ />+ <span />+ </div>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="30"+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with value, label and error 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-29 MuiFormLabel-error-32 MuiInputLabel-root-23 MuiInputLabel-formControl-24 MuiInputLabel-animated-27 MuiInputLabel-shrink-26"+ data-shrink={true}+ htmlFor="price_min"+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-9 MuiInput-error-14 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13"+ >+ <input+ aria-invalid={true}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="10"+ />+ <span />+ </div>+ <p+ className="MuiFormHelperText-root-35 MuiFormHelperText-error-36"+ >+ Ipsum+ </p>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-error-14 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={true}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="30"+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;++exports[`<PriceField /> renders with value, label and hint 1`] = `+<div+ className="Component-widgetContainer-4"+>+ <div+ className="Component-inputContainer-1"+ >+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <label+ className="MuiFormLabel-root-29 MuiInputLabel-root-23 MuiInputLabel-formControl-24 MuiInputLabel-animated-27 MuiInputLabel-shrink-26"+ data-shrink={true}+ htmlFor="price_min"+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_min"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="10"+ />+ <span />+ </div>+ <p+ className="MuiFormHelperText-root-35"+ >+ Ipsum+ </p>+ </div>+ <span+ className="Component-separator-3"+ >+ -+ </span>+ <div+ className="MuiFormControl-root-5"+ onBlur={[Function]}+ onFocus={[Function]}+ >+ <div+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"+ >+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ className="MuiInput-input-17 MuiInput-inputType-21"+ defaultValue={undefined}+ disabled={false}+ id={undefined}+ name="price_max"+ onBlur={[Function]}+ onChange={[Function]}+ onFocus={[Function]}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="number"+ value="30"+ />+ <span />+ </div>+ </div>+ </div>+</div>+`;diff --git a/saleor/static/dashboard-next/components/PriceField/index.ts b/saleor/static/dashboard-next/components/PriceField/index.tsnew file mode 100644index 0000000000..17b4249c58--- /dev/null+++ b/saleor/static/dashboard-next/components/PriceField/index.ts@@ -0,0 +1,2 @@+export { default } from "./PriceField";+export * from "./PriceField";diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.test.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.test.tsxindex 788ac0993b..216dc5c8f1 100644--- a/saleor/static/dashboard-next/components/ProductList/ProductList.test.tsx+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.test.tsx@@ -1,5 +1,4 @@import * as React from "react";-import { MemoryRouter } from "react-router-dom";import * as renderer from "react-test-renderer";import ProductList from "./ProductList";@@ -40,52 +39,35 @@ const products = [describe("<ProductList />", () => {it("renders while data is loading", () => {const component = renderer.create(- <MemoryRouter>- <ProductList- hasNextPage={false}- onNextPage={jest.fn()}- onPreviousPage={jest.fn()}- />- </MemoryRouter>+ <ProductList+ hasPreviousPage={false}+ hasNextPage={false}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ />);expect(component).toMatchSnapshot();});it("renders properly when data is loaded", () => {const component = renderer.create(- <MemoryRouter>- <ProductList- hasNextPage={false}- onNextPage={jest.fn()}- onPreviousPage={jest.fn()}- products={products}- />- </MemoryRouter>- );- expect(component).toMatchSnapshot();- });- it("renders properly 'load more' button", () => {- const component = renderer.create(- <MemoryRouter>- <ProductList- hasNextPage={true}- onNextPage={jest.fn()}- onPreviousPage={jest.fn()}- products={products}- />- </MemoryRouter>+ <ProductList+ hasPreviousPage={false}+ hasNextPage={false}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ products={products}+ />);expect(component).toMatchSnapshot();});it("renders properly when product list is empty", () => {const component = renderer.create(- <MemoryRouter>- <ProductList- hasNextPage={false}- onNextPage={jest.fn()}- onPreviousPage={jest.fn()}- products={[]}- />- </MemoryRouter>+ <ProductList+ hasNextPage={false}+ onNextPage={jest.fn()}+ onPreviousPage={jest.fn()}+ products={[]}+ />);expect(component).toMatchSnapshot();});diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.tsxindex 0f7a838637..0f8375602d 100644--- a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx@@ -67,7 +67,7 @@ export const ProductList = decorate<ProductListProps>(</TableRow></TableFooter><TableBody>- {products === undefined ? (+ {products === undefined || products === null ? (<TableRow><TableCell className={classes.avatarCell}><Avatar>diff --git a/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap b/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snapindex b79e7a0e27..c7d8039840 100644--- a/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap+++ b/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap@@ -1,241 +1,5 @@// Jest Snapshot v1, https://goo.gl/fbAQLP-exports[`<ProductList /> renders properly 'load more' button 1`] = `-<table- className="MuiTable-root-2"->- <thead- className="MuiTableHead-root-3"- >- <tr- className="MuiTableRow-root-4 MuiTableRow-head-5"- >- <th- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-head-10 Component-avatarCell-1"- scope="col"- />- <th- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-head-10"- scope="col"- >- Name- </th>- <th- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-head-10"- scope="col"- >- Type- </th>- </tr>- </thead>- <tfoot>- <tr- className="MuiTableRow-root-4 MuiTableRow-footer-6"- >- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-footer-12 MuiTablePagination-root-20"- colSpan={3}- scope={undefined}- >- <div- className="MuiToolbar-root-26 MuiToolbar-gutters-27 MuiTablePagination-toolbar-25"- >- <div- className="MuiTablePagination-spacer-24"- />- <div- className="MuiTablePaginationActions-root-28"- >- <button- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"- disabled={true}- onBlur={[Function]}- onClick={[MockFunction]}- onFocus={[Function]}- onKeyDown={[Function]}- onKeyUp={[Function]}- onMouseDown={[Function]}- onMouseLeave={[Function]}- onMouseUp={[Function]}- onTouchEnd={[Function]}- onTouchMove={[Function]}- onTouchStart={[Function]}- tabIndex="-1"- type="button"- >- <span- className="MuiIconButton-label-34"- >- <svg- aria-hidden="true"- className="MuiSvgIcon-root-38"- color={undefined}- focusable="false"- viewBox="0 0 24 24"- >- <path- d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"- />- </svg>- </span>- </button>- <button- className="MuiButtonBase-root-35 MuiIconButton-root-29"- disabled={false}- onBlur={[Function]}- onClick={[MockFunction]}- onFocus={[Function]}- onKeyDown={[Function]}- onKeyUp={[Function]}- onMouseDown={[Function]}- onMouseLeave={[Function]}- onMouseUp={[Function]}- onTouchEnd={[Function]}- onTouchMove={[Function]}- onTouchStart={[Function]}- tabIndex="0"- type="button"- >- <span- className="MuiIconButton-label-34"- >- <svg- aria-hidden="true"- className="MuiSvgIcon-root-38"- color={undefined}- focusable="false"- viewBox="0 0 24 24"- >- <path- d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"- />- </svg>- </span>- <span- className="MuiTouchRipple-root-49"- />- </button>- </div>- </div>- </td>- </tr>- </tfoot>- <tbody- className="MuiTableBody-root-44"- >- <tr- className="MuiTableRow-root-4"- >- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"- scope={undefined}- >- <div- className="MuiAvatar-root-45"- >- <img- alt={undefined}- className="MuiAvatar-img-47"- sizes={undefined}- src="/media/__sized__/products/saleor/static/placeholders/t-shirts/5_ZoF6Xi8-crop-c0-5__0-5-255x255-70.jpg"- srcSet={undefined}- />- </div>- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- Lewis PLC- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- T-sirts- </td>- </tr>- <tr- className="MuiTableRow-root-4"- >- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"- scope={undefined}- >- <div- className="MuiAvatar-root-45"- >- <img- alt={undefined}- className="MuiAvatar-img-47"- sizes={undefined}- src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_07Fa6v8-crop-c0-5__0-5-255x255-70.jpg"- srcSet={undefined}- />- </div>- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- Kennedy-Ramirez- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- T-sirts- </td>- </tr>- <tr- className="MuiTableRow-root-4"- >- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"- scope={undefined}- >- <div- className="MuiAvatar-root-45"- >- <img- alt={undefined}- className="MuiAvatar-img-47"- sizes={undefined}- src="/media/__sized__/products/saleor/static/placeholders/t-shirts/6_zeczDly-crop-c0-5__0-5-255x255-70.jpg"- srcSet={undefined}- />- </div>- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- Newman, Ashley and Roberson- </td>- <td- aria-sort={null}- className="MuiTableCell-root-9 MuiTableCell-body-11"- scope={undefined}- >- T-sirts- </td>- </tr>- </tbody>-</table>-`;-exports[`<ProductList /> renders properly when data is loaded 1`] = `<tableclassName="MuiTable-root-2"diff --git a/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.test.tsx b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.test.tsxnew file mode 100644index 0000000000..e8dae76771--- /dev/null+++ b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.test.tsx@@ -0,0 +1,84 @@+import * as React from "react";+import * as renderer from "react-test-renderer";++import SingleSelectField from "./";++const choices = [+ { value: "1", label: "Apparel" },+ { value: "2", label: "Groceries" },+ { value: "3", label: "Books" },+ { value: "4", label: "Accessories" }+];++describe("<MultiSelectField />", () => {+ it("renders with no value", () => {+ const component = renderer.create(+ <SingleSelectField choices={choices} onChange={() => {}} />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ value={choices[0].value}+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with hint", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with label and hint", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem"+ hint="Ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with value, label and hint", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ value={choices[0].value}+ label="Lorem"+ hint="Ipsum"+ />+ );+ expect(component).toMatchSnapshot();+ });+ it("renders with error hint", () => {+ const component = renderer.create(+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem error"+ error={true}+ />+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/components/SingleSelectField.tsx b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsxsimilarity index 82%rename from saleor/static/dashboard-next/components/SingleSelectField.tsxrename to saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsxindex 7095bc32dd..c50a0f2efd 100644--- a/saleor/static/dashboard-next/components/SingleSelectField.tsx+++ b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsx@@ -16,16 +16,27 @@ interface SingleSelectFieldProps {value: string;label: string;}>;+ error?: boolean;hint?: string;- label: string;- name: string;+ label?: string;+ name?: string;selectProps?: SelectProps;- value: string;+ value?: string;onChange(event: any);}export const SingleSelectField = decorate<SingleSelectFieldProps>(- ({ classes, label, choices, value, onChange, name, hint, selectProps }) => {+ ({+ classes,+ error,+ label,+ choices,+ value,+ onChange,+ name,+ hint,+ selectProps+ }) => {const choicesByKey: { [key: string]: string } = choices.reduce((prev, curr) => {prev[curr.value] = curr.label;@@ -35,14 +46,14 @@ export const SingleSelectField = decorate<SingleSelectFieldProps>();return (- <FormControl className={classes.formControl}>+ <FormControl className={classes.formControl} error={error}><InputLabel shrink={!!value}>{label}</InputLabel><SelectfullWidthrenderValue={choiceValue =>choiceValue ? choicesByKey[choiceValue.toString()] : ""}- value={value}+ value={value || ""}name={name}onChange={onChange}{...selectProps}diff --git a/saleor/static/dashboard-next/components/SingleSelectField/__snapshots__/SingleSelectField.test.tsx.snap b/saleor/static/dashboard-next/components/SingleSelectField/__snapshots__/SingleSelectField.test.tsx.snapnew file mode 100644index 0000000000..c7ff8881a2--- /dev/null+++ b/saleor/static/dashboard-next/components/SingleSelectField/__snapshots__/SingleSelectField.test.tsx.snap@@ -0,0 +1,498 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<MultiSelectField /> renders with error hint 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiFormLabel-error-15 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10"+ data-shrink={false}+ />+ <div+ className="MuiInput-root-23 MuiInput-error-28 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={true}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-47 MuiFormHelperText-error-48"+ >+ Lorem error+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with hint 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10"+ data-shrink={false}+ />+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-47"+ >+ Lorem ipsum+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with label 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10"+ data-shrink={false}+ >+ Lorem ipsum+ </label>+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with label and hint 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10"+ data-shrink={false}+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-47"+ >+ Ipsum+ </p>+</div>+`;++exports[`<MultiSelectField /> renders with no value 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10"+ data-shrink={false}+ />+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ <span+ dangerouslySetInnerHTML={+ Object {+ "__html": "​",+ }+ }+ />+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value=""+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with value 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10 MuiInputLabel-shrink-9"+ data-shrink={true}+ />+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ Apparel+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="1"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+</div>+`;++exports[`<MultiSelectField /> renders with value, label and hint 1`] = `+<div+ className="MuiFormControl-root-2 Component-formControl-1"+ onBlur={[Function]}+ onFocus={[Function]}+>+ <label+ className="MuiFormLabel-root-12 MuiInputLabel-root-6 MuiInputLabel-formControl-7 MuiInputLabel-animated-10 MuiInputLabel-shrink-9"+ data-shrink={true}+ >+ Lorem+ </label>+ <div+ className="MuiInput-root-23 MuiInput-fullWidth-30 MuiInput-formControl-24 MuiInput-underline-27"+ >+ <div+ className="MuiSelect-root-18"+ >+ <div+ aria-haspopup="true"+ aria-owns={null}+ aria-pressed="false"+ className="MuiSelect-select-19 MuiSelect-selectMenu-20 MuiInput-input-31"+ onBlur={[Function]}+ onClick={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ role="button"+ tabIndex={0}+ >+ Apparel+ </div>+ <input+ aria-invalid={false}+ aria-required={false}+ autoComplete={undefined}+ autoFocus={undefined}+ defaultValue={undefined}+ id={undefined}+ name={undefined}+ onKeyDown={undefined}+ onKeyUp={undefined}+ placeholder={undefined}+ readOnly={undefined}+ required={undefined}+ rows={undefined}+ type="hidden"+ value="1"+ />+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-37 MuiSelect-icon-22"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M7 10l5 5 5-5z"+ />+ </svg>+ </div>+ </div>+ <p+ className="MuiFormHelperText-root-47"+ >+ Ipsum+ </p>+</div>+`;diff --git a/saleor/static/dashboard-next/components/SingleSelectField/index.ts b/saleor/static/dashboard-next/components/SingleSelectField/index.tsnew file mode 100644index 0000000000..c8af8bf3f4--- /dev/null+++ b/saleor/static/dashboard-next/components/SingleSelectField/index.ts@@ -0,0 +1,2 @@+export { default } from "./SingleSelectField";+export * from "./SingleSelectField";diff --git a/saleor/static/dashboard-next/components/TablePagination/TablePagination.test.tsx b/saleor/static/dashboard-next/components/TablePagination/TablePagination.test.tsxnew file mode 100644index 0000000000..e57cb3f2fc--- /dev/null+++ b/saleor/static/dashboard-next/components/TablePagination/TablePagination.test.tsx@@ -0,0 +1,64 @@+import Table from "material-ui/Table";+import * as React from "react";+import * as renderer from "react-test-renderer";++import TablePagination from "./TablePagination";++describe("<TablePagination />", () => {+ it("renders when no previous / next page are available", () => {+ const component = renderer.create(+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={false}+ hasPreviousPage={false}+ onPreviousPage={jest.fn()}+ onNextPage={jest.fn()}+ />+ </Table>+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when previous page is available", () => {+ const component = renderer.create(+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={false}+ hasPreviousPage={true}+ onPreviousPage={jest.fn()}+ onNextPage={jest.fn()}+ />+ </Table>+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when next page is available", () => {+ const component = renderer.create(+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={true}+ hasPreviousPage={false}+ onPreviousPage={jest.fn()}+ onNextPage={jest.fn()}+ />+ </Table>+ );+ expect(component).toMatchSnapshot();+ });+ it("renders when previous and next pages are available", () => {+ const component = renderer.create(+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={true}+ hasPreviousPage={true}+ onPreviousPage={jest.fn()}+ onNextPage={jest.fn()}+ />+ </Table>+ );+ expect(component).toMatchSnapshot();+ });+});diff --git a/saleor/static/dashboard-next/components/TablePagination.tsx b/saleor/static/dashboard-next/components/TablePagination/TablePagination.tsxsimilarity index 100%rename from saleor/static/dashboard-next/components/TablePagination.tsxrename to saleor/static/dashboard-next/components/TablePagination/TablePagination.tsxdiff --git a/saleor/static/dashboard-next/components/TablePaginationActions.tsx b/saleor/static/dashboard-next/components/TablePagination/TablePaginationActions.tsxsimilarity index 100%rename from saleor/static/dashboard-next/components/TablePaginationActions.tsxrename to saleor/static/dashboard-next/components/TablePagination/TablePaginationActions.tsxdiff --git a/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap b/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snapnew file mode 100644index 0000000000..5ba8b891dd--- /dev/null+++ b/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap@@ -0,0 +1,377 @@+// Jest Snapshot v1, https://goo.gl/fbAQLP++exports[`<TablePagination /> renders when next page is available 1`] = `+<table+ className="MuiTable-root-1"+>+ <td+ aria-sort={null}+ className="MuiTableCell-root-11 MuiTablePagination-root-5"+ colSpan={1}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-19 MuiToolbar-gutters-20 MuiTablePagination-toolbar-10"+ >+ <div+ className="MuiTablePagination-spacer-9"+ />+ <div+ className="MuiTablePaginationActions-root-21"+ >+ <button+ className="MuiButtonBase-root-28 MuiButtonBase-disabled-29 MuiIconButton-root-22 MuiIconButton-disabled-26"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ className="MuiButtonBase-root-28 MuiIconButton-root-22"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-37"+ />+ </button>+ </div>+ </div>+ </td>+</table>+`;++exports[`<TablePagination /> renders when no previous / next page are available 1`] = `+<table+ className="MuiTable-root-1"+>+ <td+ aria-sort={null}+ className="MuiTableCell-root-11 MuiTablePagination-root-5"+ colSpan={1}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-19 MuiToolbar-gutters-20 MuiTablePagination-toolbar-10"+ >+ <div+ className="MuiTablePagination-spacer-9"+ />+ <div+ className="MuiTablePaginationActions-root-21"+ >+ <button+ className="MuiButtonBase-root-28 MuiButtonBase-disabled-29 MuiIconButton-root-22 MuiIconButton-disabled-26"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ className="MuiButtonBase-root-28 MuiButtonBase-disabled-29 MuiIconButton-root-22 MuiIconButton-disabled-26"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ </button>+ </div>+ </div>+ </td>+</table>+`;++exports[`<TablePagination /> renders when previous and next pages are available 1`] = `+<table+ className="MuiTable-root-1"+>+ <td+ aria-sort={null}+ className="MuiTableCell-root-11 MuiTablePagination-root-5"+ colSpan={1}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-19 MuiToolbar-gutters-20 MuiTablePagination-toolbar-10"+ >+ <div+ className="MuiTablePagination-spacer-9"+ />+ <div+ className="MuiTablePaginationActions-root-21"+ >+ <button+ className="MuiButtonBase-root-28 MuiIconButton-root-22"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-37"+ />+ </button>+ <button+ className="MuiButtonBase-root-28 MuiIconButton-root-22"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-37"+ />+ </button>+ </div>+ </div>+ </td>+</table>+`;++exports[`<TablePagination /> renders when previous page is available 1`] = `+<table+ className="MuiTable-root-1"+>+ <td+ aria-sort={null}+ className="MuiTableCell-root-11 MuiTablePagination-root-5"+ colSpan={1}+ scope={undefined}+ >+ <div+ className="MuiToolbar-root-19 MuiToolbar-gutters-20 MuiTablePagination-toolbar-10"+ >+ <div+ className="MuiTablePagination-spacer-9"+ />+ <div+ className="MuiTablePaginationActions-root-21"+ >+ <button+ className="MuiButtonBase-root-28 MuiIconButton-root-22"+ disabled={false}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-37"+ />+ </button>+ <button+ className="MuiButtonBase-root-28 MuiButtonBase-disabled-29 MuiIconButton-root-22 MuiIconButton-disabled-26"+ disabled={true}+ onBlur={[Function]}+ onClick={[MockFunction]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-27"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-31"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ </button>+ </div>+ </div>+ </td>+</table>+`;diff --git a/saleor/static/dashboard-next/components/TablePagination/index.ts b/saleor/static/dashboard-next/components/TablePagination/index.tsnew file mode 100644index 0000000000..731a67cc7b--- /dev/null+++ b/saleor/static/dashboard-next/components/TablePagination/index.ts@@ -0,0 +1,2 @@+export { default } from "./TablePagination";+export * from "./TablePagination";diff --git a/saleor/static/dashboard-next/page/components/PageList/PageList.test.tsx b/saleor/static/dashboard-next/page/components/PageList/PageList.test.tsxindex 3fdc9f72f0..91e03ef14b 100644--- a/saleor/static/dashboard-next/page/components/PageList/PageList.test.tsx+++ b/saleor/static/dashboard-next/page/components/PageList/PageList.test.tsx@@ -48,12 +48,10 @@ describe("<PageList />", () => {const component = renderer.create(<MemoryRouter><PageList- loading={true}handlePreviousPage={jest.fn()}handleNextPage={jest.fn()}- pages={[]}- editPageUrl={jest.fn()}- showPageUrl={jest.fn()}+ onEditClick={jest.fn()}+ onShowPageClick={jest.fn()}pageInfo={{endCursor: "",hasNextPage: false,@@ -69,12 +67,11 @@ describe("<PageList />", () => {const component = renderer.create(<MemoryRouter><PageList- loading={true}handlePreviousPage={jest.fn()}handleNextPage={jest.fn()}pages={pageList}- editPageUrl={jest.fn()}- showPageUrl={jest.fn()}+ onEditClick={jest.fn()}+ onShowPageClick={jest.fn()}pageInfo={{endCursor: "",hasNextPage: false,@@ -90,12 +87,11 @@ describe("<PageList />", () => {const component = renderer.create(<MemoryRouter><PageList- loading={true}handlePreviousPage={jest.fn()}handleNextPage={jest.fn()}pages={[]}- editPageUrl={jest.fn()}- showPageUrl={jest.fn()}+ onEditClick={jest.fn()}+ onShowPageClick={jest.fn()}pageInfo={{endCursor: "",hasNextPage: false,diff --git a/saleor/static/dashboard-next/page/components/PageList/PageList.tsx b/saleor/static/dashboard-next/page/components/PageList/PageList.tsxindex 6059f3201b..430b27b4d3 100644--- a/saleor/static/dashboard-next/page/components/PageList/PageList.tsx+++ b/saleor/static/dashboard-next/page/components/PageList/PageList.tsx@@ -18,18 +18,18 @@ import { PageListQuery } from "../../../gql-types";import i18n from "../../../i18n";interface PageListComponentProps {- pages: PageListQuery["pages"]["edges"];+ pages?: PageListQuery["pages"]["edges"];pageInfo: PageListQuery["pages"]["pageInfo"];- loading: boolean;handlePreviousPage();handleNextPage();- editPageUrl(id: string);- showPageUrl(slug: string);+ onEditClick(id: string);+ onShowPageClick(slug: string);}const decorate = withStyles({link: {color: blue[500],+ cursor: "pointer",textDecoration: "none"},textRight: {@@ -42,11 +42,10 @@ export const PageListComponent = decorate<PageListComponentProps>(classes,handlePreviousPage,handleNextPage,- editPageUrl,- showPageUrl,+ onEditClick,+ onShowPageClick,pages,- pageInfo,- loading+ pageInfo}) => (<Table><TableHead>@@ -71,7 +70,7 @@ export const PageListComponent = decorate<PageListComponentProps>(</TableRow></TableFooter><TableBody>- {loading ? (+ {pages === undefined || pages === null ? (<TableRow><TableCell><Skeleton />@@ -79,14 +78,23 @@ export const PageListComponent = decorate<PageListComponentProps>(<TableCell><Skeleton /></TableCell>+ <TableCell>+ <Skeleton />+ </TableCell>+ <TableCell className={classes.textRight}>+ <IconButton disabled>+ <VisibilityIcon />+ </IconButton>+ </TableCell></TableRow>) : pages.length > 0 ? (pages.map(edge => (<TableRow key={edge.node.id}>- <TableCell>- <Link to={editPageUrl(edge.node.id)} className={classes.link}>- {edge.node.title}- </Link>+ <TableCell+ onClick={onEditClick(edge.node.id)}+ className={classes.link}+ >+ {edge.node.title}</TableCell><TableCell>{`/${edge.node.slug}`}</TableCell><TableCell>@@ -95,15 +103,7 @@ export const PageListComponent = decorate<PageListComponentProps>(: i18n.t("Not published", { context: "object" })}</TableCell><TableCell className={classes.textRight}>- <IconButton- component={props => (- <a- href={showPageUrl(edge.node.slug)}- target="_blank"- {...props}- />- )}- >+ <IconButton onClick={onShowPageClick(edge.node.slug)}><VisibilityIcon /></IconButton></TableCell>diff --git a/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap b/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snapindex f0fec929ad..381bd0e799 100644--- a/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap+++ b/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap@@ -139,26 +139,10 @@ exports[`<PageList /> renders when category list is empty 1`] = `<tdaria-sort={null}className="MuiTableCell-root-10 MuiTableCell-body-12"+ colSpan={3}scope={undefined}>- <span- className="Component-skeleton-46"- style={undefined}- >- - </span>- </td>- <td- aria-sort={null}- className="MuiTableCell-root-10 MuiTableCell-body-12"- scope={undefined}- >- <span- className="Component-skeleton-46"- style={undefined}- >- - </span>+ No pages found</td></tr></tbody>@@ -301,29 +285,273 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `<trclassName="MuiTableRow-root-5">+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-link-1"+ onClick={undefined}+ scope={undefined}+ >+ Lorem ipsum+ </td><tdaria-sort={null}className="MuiTableCell-root-10 MuiTableCell-body-12"scope={undefined}>- <span- className="Component-skeleton-46"- style={undefined}+ /lorem-ipsum-dolor+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ Published+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-textRight-2"+ scope={undefined}+ >+ <button+ className="MuiButtonBase-root-36 MuiIconButton-root-30"+ disabled={false}+ onBlur={[Function]}+ onClick={undefined}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button">- - </span>+ <span+ className="MuiIconButton-label-35"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-39"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-5"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-link-1"+ onClick={undefined}+ scope={undefined}+ >+ Pellentesque habitant morbi tristique senectus</td><tdaria-sort={null}className="MuiTableCell-root-10 MuiTableCell-body-12"scope={undefined}>- <span- className="Component-skeleton-46"- style={undefined}+ /lorem-ipsum-consectetur+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ Published+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-textRight-2"+ scope={undefined}+ >+ <button+ className="MuiButtonBase-root-36 MuiIconButton-root-30"+ disabled={false}+ onBlur={[Function]}+ onClick={undefined}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button">- - </span>+ <span+ className="MuiIconButton-label-35"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-39"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-5"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-link-1"+ onClick={undefined}+ scope={undefined}+ >+ Pellentesque metus turpis+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ /lorem-ipsum-amet+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ Published+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-textRight-2"+ scope={undefined}+ >+ <button+ className="MuiButtonBase-root-36 MuiIconButton-root-30"+ disabled={false}+ onBlur={[Function]}+ onClick={undefined}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-35"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-39"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button>+ </td>+ </tr>+ <tr+ className="MuiTableRow-root-5"+ >+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-link-1"+ onClick={undefined}+ scope={undefined}+ >+ Nulla blandit ut lectus at placerat+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ /lorem-ipsum-sit+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ Published+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-textRight-2"+ scope={undefined}+ >+ <button+ className="MuiButtonBase-root-36 MuiIconButton-root-30"+ disabled={false}+ onBlur={[Function]}+ onClick={undefined}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="0"+ type="button"+ >+ <span+ className="MuiIconButton-label-35"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-39"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"+ />+ </svg>+ </span>+ <span+ className="MuiTouchRipple-root-47"+ />+ </button></td></tr></tbody>@@ -490,6 +718,56 @@ exports[`<PageList /> renders while data is loading 1`] = `</span></td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12"+ scope={undefined}+ >+ <span+ className="Component-skeleton-46"+ style={undefined}+ >+ + </span>+ </td>+ <td+ aria-sort={null}+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-textRight-2"+ scope={undefined}+ >+ <button+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"+ disabled={true}+ onBlur={[Function]}+ onFocus={[Function]}+ onKeyDown={[Function]}+ onKeyUp={[Function]}+ onMouseDown={[Function]}+ onMouseLeave={[Function]}+ onMouseUp={[Function]}+ onTouchEnd={[Function]}+ onTouchMove={[Function]}+ onTouchStart={[Function]}+ tabIndex="-1"+ type="button"+ >+ <span+ className="MuiIconButton-label-35"+ >+ <svg+ aria-hidden="true"+ className="MuiSvgIcon-root-39"+ color={undefined}+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"+ />+ </svg>+ </span>+ </button>+ </td></tr></tbody></table>diff --git a/saleor/static/dashboard-next/page/index.tsx b/saleor/static/dashboard-next/page/index.tsxindex 6d97264a21..06664ee697 100644--- a/saleor/static/dashboard-next/page/index.tsx+++ b/saleor/static/dashboard-next/page/index.tsx@@ -32,7 +32,7 @@ export function pageEditUrl(id: string) {}export function pageStorefrontUrl(slug: string) {- return `/pages/${slug}/`;+ return `/page/${slug}/`;}export const pageListUrl = "/pages/";diff --git a/saleor/static/dashboard-next/page/views/PageList.tsx b/saleor/static/dashboard-next/page/views/PageList.tsxindex ef64c45dc3..c40fd7857a 100644--- a/saleor/static/dashboard-next/page/views/PageList.tsx+++ b/saleor/static/dashboard-next/page/views/PageList.tsx@@ -108,6 +108,10 @@ export class PageList extends React.Component<PageListProps, PageListState> {);};const clearFilters = () => navigate("?");+ const handleEditClick = (id: string) => () =>+ navigate(pageEditUrl(id));+ const handleShowPageClick = (slug: string) => () =>+ window.open(pageStorefrontUrl(slug));return (<Grid container spacing={16}><Grid item xs={12}>@@ -139,9 +143,8 @@ export class PageList extends React.Component<PageListProps, PageListState> {pages={loading ? null : data.pages.edges}handlePreviousPage={loadPreviousPage}handleNextPage={loadNextPage}- editPageUrl={pageEditUrl}- showPageUrl={pageStorefrontUrl}- loading={loading}+ onEditClick={handleEditClick}+ onShowPageClick={handleShowPageClick}/></Card></Grid>diff --git a/saleor/static/dashboard-next/page/views/PageUpdateForm.tsx b/saleor/static/dashboard-next/page/views/PageUpdateForm.tsxindex ba1abc5b5a..fbcaa41a16 100644--- a/saleor/static/dashboard-next/page/views/PageUpdateForm.tsx+++ b/saleor/static/dashboard-next/page/views/PageUpdateForm.tsx@@ -1,12 +1,12 @@import DeleteIcon from "material-ui-icons/Delete";import Card from "material-ui/Card";+import { DialogContentText } from "material-ui/Dialog";import Grid from "material-ui/Grid";import IconButton from "material-ui/IconButton";import { CircularProgress } from "material-ui/Progress";import * as React from "react";import { Redirect } from "react-router";-import { DialogContentText } from "material-ui/Dialog";import { pageListUrl } from "..";import ErrorMessageCard from "../../components/ErrorMessageCard";import Form, { FormActions, FormProps } from "../../components/Form";diff --git a/saleor/static/dashboard-next/storybook/config.js b/saleor/static/dashboard-next/storybook/config.jsnew file mode 100644index 0000000000..1c3bedea75--- /dev/null+++ b/saleor/static/dashboard-next/storybook/config.js@@ -0,0 +1,27 @@+import { configure } from "@storybook/react";++function loadStories() {+ // Components+ require("./stories/components/ErrorMessageCard");+ require("./stories/components/MultiSelectField");+ require("./stories/components/PageHeader");+ require("./stories/components/PriceField");+ require("./stories/components/SingleSelectField");+ require("./stories/components/Skeleton");+ require("./stories/components/TablePagination");++ // Categories+ require("./stories/categories/CategoryBaseForm");+ require("./stories/categories/CategoryProducts");+ require("./stories/categories/CategorySubcategories");+ require("./stories/categories/ProductFilters");+ require("./stories/categories/RootCategoryList");++ // Pages+ require("./stories/pages/PageBaseForm");+ require("./stories/pages/PageDeleteDialog");+ require("./stories/pages/PageFilters");+ require("./stories/pages/PageList");+}++configure(loadStories, module);diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategoryBaseForm.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategoryBaseForm.tsxnew file mode 100644index 0000000000..731091edf7--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategoryBaseForm.tsx@@ -0,0 +1,24 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import CategoryBaseForm from "../../../category/components/CategoryBaseForm";++const category = {+ description:+ "Across pressure PM food discover recognize. Send letter reach listen. Quickly work plan rule.\nTell lose part purpose do when. Whatever drug contain particularly defense.",+ name: "Apparel"+};++storiesOf("Categories / CategoryBaseForm", module)+ .add("with initial data", () => <CategoryBaseForm {...category} />)+ .add("without initial data", () => <CategoryBaseForm />)+ .add("with 'errors' property", () => {+ const errors = [+ {+ field: "name",+ message: "To pole jest wymagane."+ }+ ];+ return <CategoryBaseForm {...category} errors={errors} />;+ });diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsxnew file mode 100644index 0000000000..0212603503--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx@@ -0,0 +1,82 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import CategoryProducts from "../../../category/components/CategoryProducts";++const products = [+ {+ id: "UHJvZHVjdDox",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoy",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoz",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ },+ {+ id: "UHJvZHVjdDoa",+ name: "Gardner, Graham and King",+ thumbnailUrl:+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",+ productType: {+ id: "1",+ name: "T-Shirt"+ }+ }+];++storiesOf("Categories / CategoryProducts", module)+ .add("with initial data", () => (+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ products={products}+ onCreate={() => {}}+ onFilter={() => {}}+ onNextPage={() => {}}+ onPreviousPage={() => {}}+ />+ ))+ .add("without initial data", () => (+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ products={[]}+ onCreate={() => {}}+ onFilter={() => {}}+ onNextPage={() => {}}+ onPreviousPage={() => {}}+ />+ ))+ .add("when loading data", () => (+ <CategoryProducts+ hasNextPage={true}+ hasPreviousPage={false}+ onCreate={() => {}}+ onFilter={() => {}}+ onNextPage={() => {}}+ onPreviousPage={() => {}}+ />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategorySubcategories.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategorySubcategories.tsxnew file mode 100644index 0000000000..c2a4c421cc--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategorySubcategories.tsx@@ -0,0 +1,35 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import CategorySubcategories from "../../../category/components/CategorySubcategories";++const categories = [+ {+ id: "123123",+ name: "Lorem ipsum dolor"+ },+ {+ id: "876752",+ name: "Mauris vehicula tortor vulputate"+ }+];++storiesOf("Categories / CategorySubcategories", module)+ .add("with initial data", () => (+ <CategorySubcategories+ subcategories={categories}+ onClickSubcategory={() => {}}+ onCreate={() => {}}+ />+ ))+ .add("without initial data", () => (+ <CategorySubcategories+ subcategories={[]}+ onClickSubcategory={() => {}}+ onCreate={() => {}}+ />+ ))+ .add("when loading data", () => (+ <CategorySubcategories onClickSubcategory={() => {}} onCreate={() => {}} />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/categories/ProductFilters.tsx b/saleor/static/dashboard-next/storybook/stories/categories/ProductFilters.tsxnew file mode 100644index 0000000000..b3a0ceb10e--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/categories/ProductFilters.tsx@@ -0,0 +1,36 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import ProductFilters from "../../../category/components/ProductFilters";++const productTypes = [+ { id: "123123123", name: "Type 1" },+ { id: "123123124", name: "Type 2" },+ { id: "123123125", name: "Type 3" },+ { id: "123123126", name: "Type 4" }+];+const productFilters = {+ highlighted: "false",+ name: "Lorem ipsum",+ price_max: "50",+ price_min: "30",+ productTypes: ["123123123", "123123126"],+ published: "true"+};++storiesOf("Categories / ProductFilters", module)+ .add("with initial data", () => (+ <ProductFilters+ formState={productFilters}+ handleClear={() => {}}+ handleSubmit={() => {}}+ productTypes={productTypes}+ />+ ))+ .add("without initial data", () => (+ <ProductFilters+ handleClear={() => {}}+ handleSubmit={() => {}}+ productTypes={productTypes}+ />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/categories/RootCategoryList.tsx b/saleor/static/dashboard-next/storybook/stories/categories/RootCategoryList.tsxnew file mode 100644index 0000000000..5d76e7c67e--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/categories/RootCategoryList.tsx@@ -0,0 +1,31 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import RootCategoryList from "../../../category/components/RootCategoryList";++const categories = [+ {+ id: "123123",+ name: "Lorem ipsum dolor"+ },+ {+ id: "876752",+ name: "Mauris vehicula tortor vulputate"+ }+];++storiesOf("Categories / RootCategoryList", module)+ .add("with initial data", () => (+ <RootCategoryList+ categories={categories}+ onClick={() => {}}+ onCreate={() => {}}+ />+ ))+ .add("without initial data", () => (+ <RootCategoryList categories={[]} onClick={() => {}} onCreate={() => {}} />+ ))+ .add("when loading data", () => (+ <RootCategoryList onClick={() => {}} onCreate={() => {}} />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/components/ErrorMessageCard.tsx b/saleor/static/dashboard-next/storybook/stories/components/ErrorMessageCard.tsxnew file mode 100644index 0000000000..34ff8aa771--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/ErrorMessageCard.tsx@@ -0,0 +1,8 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import ErrorMessageCard from "../../../components/ErrorMessageCard";++storiesOf("Generics / ErrorMessageCard", module).add("default", () => (+ <ErrorMessageCard message="Loren ipsum dolor sit amet!" />+));diff --git a/saleor/static/dashboard-next/storybook/stories/components/MultiSelectField.tsx b/saleor/static/dashboard-next/storybook/stories/components/MultiSelectField.tsxnew file mode 100644index 0000000000..ec7c89a8fb--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/MultiSelectField.tsx@@ -0,0 +1,62 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import MultiSelectField from "../../../components/MultiSelectField";++const choices = [+ { value: "1", label: "Apparel" },+ { value: "2", label: "Groceries" },+ { value: "3", label: "Books" },+ { value: "4", label: "Accessories" }+];++storiesOf("Generics / MultiSelectField", module)+ .add("with no value", () => (+ <MultiSelectField choices={choices} onChange={() => {}} />+ ))+ .add("with value", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ value={[choices[0].value]}+ />+ ))+ .add("with label", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem ipsum"+ />+ ))+ .add("with hint", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem ipsum"+ />+ ))+ .add("with label and hint", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem"+ hint="Ipsum"+ />+ ))+ .add("with value, label and hint", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ value={[choices[0].value]}+ label="Lorem"+ hint="Ipsum"+ />+ ))+ .add("with error hint", () => (+ <MultiSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem error"+ error={true}+ />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/components/PageHeader.tsx b/saleor/static/dashboard-next/storybook/stories/components/PageHeader.tsxnew file mode 100644index 0000000000..6eb91c3672--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/PageHeader.tsx@@ -0,0 +1,27 @@+import { storiesOf } from "@storybook/react";+import DeleteIcon from "material-ui-icons/Delete";+import IconButton from "material-ui/IconButton";+import * as React from "react";++import PageHeader from "../../../components/PageHeader";++storiesOf("Generics / PageHeader", module)+ .add("without title", () => <PageHeader />)+ .add("with title", () => <PageHeader title="Lorem ipsum" />)+ .add("with title and back button", () => (+ <PageHeader title="Lorem ipsum" onBack={() => {}} />+ ))+ .add("with title icon bar", () => (+ <PageHeader title="Lorem ipsum">+ <IconButton>+ <DeleteIcon />+ </IconButton>+ </PageHeader>+ ))+ .add("with title, back button and icon bar", () => (+ <PageHeader title="Lorem ipsum" onBack={() => {}}>+ <IconButton>+ <DeleteIcon />+ </IconButton>+ </PageHeader>+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsxnew file mode 100644index 0000000000..2e919e6a59--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx@@ -0,0 +1,32 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import PriceField from "../../../components/PriceField";++const value = {+ max: "30",+ min: "10"+};++storiesOf("Generics / PriceField", module)+ .add("with no value", () => <PriceField onChange={() => {}} />)+ .add("with value", () => <PriceField value={value} onChange={() => {}} />)+ .add("with label", () => (+ <PriceField label="Lorem ipsum" onChange={() => {}} />+ ))+ .add("with hint", () => <PriceField hint="Lorem ipsum" onChange={() => {}} />)+ .add("with label and hint", () => (+ <PriceField label="Lorem" hint="Ipsum" onChange={() => {}} />+ ))+ .add("with value, label and hint", () => (+ <PriceField value={value} label="Lorem" hint="Ipsum" onChange={() => {}} />+ ))+ .add("with value, label and error", () => (+ <PriceField+ value={value}+ label="Lorem"+ hint="Ipsum"+ error={true}+ onChange={() => {}}+ />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/components/SingleSelectField.tsx b/saleor/static/dashboard-next/storybook/stories/components/SingleSelectField.tsxnew file mode 100644index 0000000000..745aa517ba--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/SingleSelectField.tsx@@ -0,0 +1,62 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import SingleSelectField from "../../../components/SingleSelectField";++const choices = [+ { value: "1", label: "Apparel" },+ { value: "2", label: "Groceries" },+ { value: "3", label: "Books" },+ { value: "4", label: "Accessories" }+];++storiesOf("Generics / SingleSelectField", module)+ .add("with no value", () => (+ <SingleSelectField choices={choices} onChange={() => {}} />+ ))+ .add("with value", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ value={choices[0].value}+ />+ ))+ .add("with label", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem ipsum"+ />+ ))+ .add("with hint", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem ipsum"+ />+ ))+ .add("with label and hint", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ label="Lorem"+ hint="Ipsum"+ />+ ))+ .add("with value, label and hint", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ value={choices[0].value}+ label="Lorem"+ hint="Ipsum"+ />+ ))+ .add("with error hint", () => (+ <SingleSelectField+ choices={choices}+ onChange={() => {}}+ hint="Lorem error"+ error={true}+ />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/components/Skeleton.tsx b/saleor/static/dashboard-next/storybook/stories/components/Skeleton.tsxnew file mode 100644index 0000000000..2abcc9e502--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/Skeleton.tsx@@ -0,0 +1,8 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import Skeleton from "../../../components/Skeleton";++storiesOf("Generics / Skeleton", module).add("default", () => (+ <Skeleton style={{ maxWidth: 300 }} />+));diff --git a/saleor/static/dashboard-next/storybook/stories/components/TablePagination.tsx b/saleor/static/dashboard-next/storybook/stories/components/TablePagination.tsxnew file mode 100644index 0000000000..5aff6c03b7--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/components/TablePagination.tsx@@ -0,0 +1,51 @@+import { storiesOf } from "@storybook/react";+import Table from "material-ui/Table";+import * as React from "react";++import TablePagination from "../../../components/TablePagination";++storiesOf("Generics / TablePagination", module)+ .add("no previous / next page", () => (+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={false}+ hasPreviousPage={false}+ onPreviousPage={() => {}}+ onNextPage={() => {}}+ />+ </Table>+ ))+ .add("previous page available", () => (+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={false}+ hasPreviousPage={true}+ onPreviousPage={() => {}}+ onNextPage={() => {}}+ />+ </Table>+ ))+ .add("next page available", () => (+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={true}+ hasPreviousPage={false}+ onPreviousPage={() => {}}+ onNextPage={() => {}}+ />+ </Table>+ ))+ .add("both previous and next pages are available", () => (+ <Table>+ <TablePagination+ colSpan={1}+ hasNextPage={true}+ hasPreviousPage={true}+ onPreviousPage={() => {}}+ onNextPage={() => {}}+ />+ </Table>+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/pages/PageBaseForm.tsx b/saleor/static/dashboard-next/storybook/stories/pages/PageBaseForm.tsxnew file mode 100644index 0000000000..2200c29d88--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/pages/PageBaseForm.tsx@@ -0,0 +1,38 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import PageBaseForm from "../../../page/components/PageBaseForm";++const page = {+ availableOn: "2018-03-20T16:39:08.850105+00:00",+ content:+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin bibendum et justo sit amet viverra. Maecenas euismod auctor nisi et tincidunt. Maecenas ante urna, aliquet at odio sed, gravida efficitur purus. Morbi ut dapibus ante. Nulla eu neque sit amet odio tincidunt porttitor eu quis purus. Aliquam at diam sit amet turpis varius semper vitae non lectus. Vivamus lectus ligula, molestie eu augue eu, cursus tincidunt sem. Nam ornare egestas tincidunt.",+ isVisible: true,+ slug: "lorem-ipsum-dolor",+ title: "Lorem ipsum"+};++storiesOf("Pages / PageBaseForm", module)+ .add("with initial data", () => <PageBaseForm {...page} />)+ .add("with 'created' property", () => {+ const created = "2018-03-20T16:39:08.850105+00:00";+ return <PageBaseForm {...page} created={created} />;+ })+ .add("with 'errors' property", () => {+ const errors = [+ {+ field: "slug",+ message: "To pole jest wymagane."+ },+ {+ field: "title",+ message: "To pole jest wymagane."+ },+ {+ field: "content",+ message: "To pole jest wymagane."+ }+ ];+ return <PageBaseForm {...page} errors={errors} />;+ });diff --git a/saleor/static/dashboard-next/storybook/stories/pages/PageDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/pages/PageDeleteDialog.tsxnew file mode 100644index 0000000000..3016d7880b--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/pages/PageDeleteDialog.tsx@@ -0,0 +1,13 @@+import { storiesOf } from "@storybook/react";+import { DialogContentText } from "material-ui/Dialog";+import * as React from "react";++import PageDeleteDialog from "../../../page/components/PageDeleteDialog";++storiesOf("Pages / PageDeleteDialog", module).add("default", () => (+ <PageDeleteDialog opened={true}>+ <DialogContentText>+ Do you really want to delete this page?+ </DialogContentText>+ </PageDeleteDialog>+));diff --git a/saleor/static/dashboard-next/storybook/stories/pages/PageFilters.tsx b/saleor/static/dashboard-next/storybook/stories/pages/PageFilters.tsxnew file mode 100644index 0000000000..f3972d9153--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/pages/PageFilters.tsx@@ -0,0 +1,16 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";++import PageFilters from "../../../page/components/PageFilters";++storiesOf("Pages / PageFilters", module)+ .add("with initial data", () => (+ <PageFilters+ handleClear={() => {}}+ handleSubmit={() => {}}+ formState={{ title: "Initial title", url: "initial-url" }}+ />+ ))+ .add("without initial data", () => (+ <PageFilters handleClear={() => {}} handleSubmit={() => {}} />+ ));diff --git a/saleor/static/dashboard-next/storybook/stories/pages/PageList.tsx b/saleor/static/dashboard-next/storybook/stories/pages/PageList.tsxnew file mode 100644index 0000000000..db913f20ed--- /dev/null+++ b/saleor/static/dashboard-next/storybook/stories/pages/PageList.tsx@@ -0,0 +1,69 @@+import { storiesOf } from "@storybook/react";+import * as React from "react";+import Card from "material-ui/Card";++import PageList from "../../../page/components/PageList";++const pages = [+ {+ cursor: "YXJyYXljb25uZWN0aW9uOjA=",+ node: {+ id: "UGFnZTox",+ slug: "about",+ title: "About",+ isVisible: true+ }+ },+ {+ cursor: "YXJyYXljb25uZWN0aW9uOjE=",+ node: {+ id: "UGFnZToy",+ slug: "terms-of-use",+ title: "Terms of use",+ isVisible: false+ }+ }+];+const pageInfo = {+ hasPreviousPage: false,+ hasNextPage: false,+ startCursor: "YXJyYXljb25uZWN0aW9uOjA=",+ endCursor: "YXJyYXljb25uZWN0aW9uOjE="+};++storiesOf("Pages / PageList", module)+ .add("with data", () => (+ <Card>+ <PageList+ pages={pages}+ pageInfo={pageInfo}+ handlePreviousPage={() => {}}+ handleNextPage={() => {}}+ onEditClick={() => {}}+ onShowPageClick={() => {}}+ />+ </Card>+ ))+ .add("without data", () => (+ <Card>+ <PageList+ pages={[]}+ pageInfo={pageInfo}+ handlePreviousPage={() => {}}+ handleNextPage={() => {}}+ onEditClick={() => {}}+ onShowPageClick={() => {}}+ />+ </Card>+ ))+ .add("when loading data", () => (+ <Card>+ <PageList+ pageInfo={pageInfo}+ handlePreviousPage={() => {}}+ handleNextPage={() => {}}+ onEditClick={() => {}}+ onShowPageClick={() => {}}+ />+ </Card>+ ));diff --git a/saleor/static/dashboard-next/storybook/webpack.config.js b/saleor/static/dashboard-next/storybook/webpack.config.jsnew file mode 100644index 0000000000..411a771f89--- /dev/null+++ b/saleor/static/dashboard-next/storybook/webpack.config.js@@ -0,0 +1,47 @@+var path = require("path");+var webpack = require("webpack");++var resolve = path.resolve.bind(path, `${__dirname}/../../../../`);++var reactPath;+var reactDomPath;++if (process.env.NODE_ENV === "production") {+ reactPath = "node_modules/react/umd/react.production.min.js";+ reactDomPath = "node_modules/react-dom/umd/react-dom.production.min.js";+} else {+ reactPath = "node_modules/react/umd/react.development.js";+ reactDomPath = "node_modules/react-dom/umd/react-dom.development.js";+}+var providePlugin = new webpack.ProvidePlugin({+ "query-string": "query-string"+});++var config = {+ entry: {+ "dashboard-next": "./saleor/static/dashboard-next/index.tsx"+ },+ module: {+ rules: [+ {+ test: /\.js$/,+ exclude: /node_modules/,+ loader: "babel-loader"+ },+ {+ test: /\.tsx?$/,+ loader: "ts-loader"+ }+ ]+ },+ plugins: [providePlugin],+ resolve: {+ alias: {+ react: resolve(reactPath),+ "react-dom": resolve(reactDomPath)+ },+ extensions: [".ts", ".tsx", ".js", ".jsx"]+ }+};++module.exports = config;