diff --git a/package-lock.json b/package-lock.json index b230d1ff2447e59ccfaffb6e66a13acceb74258b..03db2266fbbaf872363501094473e632940c5ab8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,10 +20,10 @@ "dev": true, "requires": { "@babel/types": "7.0.0-beta.44", - "jsesc": "^2.5.1", - "lodash": "^4.2.0", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "jsesc": "2.5.1", + "lodash": "4.17.10", + "source-map": "0.5.7", + "trim-right": "1.0.1" } }, "@babel/helper-function-name": { @@ -61,9 +61,9 @@ "integrity": "sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "@babel/template": { @@ -75,7 +75,7 @@ "@babel/code-frame": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "lodash": "^4.2.0" + "lodash": "4.17.10" } }, "@babel/traverse": { @@ -90,10 +90,10 @@ "@babel/helper-split-export-declaration": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.2.0" + "debug": "3.1.0", + "globals": "11.7.0", + "invariant": "2.2.4", + "lodash": "4.17.10" } }, "@babel/types": { @@ -102,9 +102,9 @@ "integrity": "sha512-5eTV4WRmqbaFM3v9gHAIljEQJU4Ssc6fxL61JN+Oe2ga/BwyjzjamwkCVVAQjHGuAX8i0BWo42dshL8eO5KfLQ==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.2.0", - "to-fast-properties": "^2.0.0" + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "2.0.0" } }, "JSONStream": { @@ -113,8 +113,8 @@ "integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "jsonparse": "1.3.1", + "through": "2.3.8" } }, "acorn": { @@ -129,7 +129,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "^3.0.4" + "acorn": "3.3.0" }, "dependencies": { "acorn": { @@ -152,10 +152,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -170,9 +170,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -199,7 +199,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.2" } }, "app-root-path": { @@ -220,8 +220,8 @@ "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "argparse": { @@ -230,7 +230,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "aria-query": { @@ -240,7 +240,7 @@ "dev": true, "requires": { "ast-types-flow": "0.0.7", - "commander": "^2.11.0" + "commander": "2.16.0" } }, "arr-diff": { @@ -249,7 +249,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "arr-flatten": { @@ -276,8 +276,8 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "1.1.2", + "es-abstract": "1.12.0" } }, "array-iterate": { @@ -292,7 +292,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -331,12 +331,12 @@ "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", "dev": true, "requires": { - "browserslist": "^2.11.3", - "caniuse-lite": "^1.0.30000805", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.17", - "postcss-value-parser": "^3.2.3" + "browserslist": "2.11.3", + "caniuse-lite": "1.0.30000865", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.23", + "postcss-value-parser": "3.3.0" } }, "axobject-query": { @@ -354,9 +354,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" }, "dependencies": { "ansi-styles": { @@ -371,11 +371,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -397,7 +397,7 @@ "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", "eslint-scope": "3.7.1", - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "1.0.0" } }, "babel-helper-call-delegate": { @@ -406,10 +406,10 @@ "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-define-map": { @@ -418,10 +418,10 @@ "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-function-name": { @@ -430,11 +430,11 @@ "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "dev": true, "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-get-function-arity": { @@ -443,8 +443,8 @@ "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-hoist-variables": { @@ -453,8 +453,8 @@ "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-optimise-call-expression": { @@ -463,8 +463,8 @@ "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-helper-regex": { @@ -473,9 +473,9 @@ "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-helper-replace-supers": { @@ -484,12 +484,12 @@ "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", "dev": true, "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-messages": { @@ -498,7 +498,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-check-es2015-constants": { @@ -507,7 +507,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-arrow-functions": { @@ -516,7 +516,7 @@ "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { @@ -525,7 +525,7 @@ "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-block-scoping": { @@ -534,11 +534,11 @@ "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.10" } }, "babel-plugin-transform-es2015-classes": { @@ -547,15 +547,15 @@ "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "dev": true, "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-computed-properties": { @@ -564,8 +564,8 @@ "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-destructuring": { @@ -574,7 +574,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { @@ -583,8 +583,8 @@ "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-for-of": { @@ -593,7 +593,7 @@ "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -602,9 +602,9 @@ "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "dev": true, "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-literals": { @@ -613,7 +613,7 @@ "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-modules-amd": { @@ -622,9 +622,9 @@ "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-commonjs": { @@ -633,10 +633,10 @@ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-modules-systemjs": { @@ -645,9 +645,9 @@ "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "dev": true, "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-modules-umd": { @@ -656,9 +656,9 @@ "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "dev": true, "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" } }, "babel-plugin-transform-es2015-object-super": { @@ -667,8 +667,8 @@ "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "dev": true, "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-parameters": { @@ -677,12 +677,12 @@ "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-shorthand-properties": { @@ -691,8 +691,8 @@ "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-spread": { @@ -701,7 +701,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -710,9 +710,9 @@ "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-plugin-transform-es2015-template-literals": { @@ -721,7 +721,7 @@ "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { @@ -730,7 +730,7 @@ "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-plugin-transform-es2015-unicode-regex": { @@ -739,9 +739,9 @@ "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" } }, "babel-plugin-transform-regenerator": { @@ -750,7 +750,7 @@ "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "dev": true, "requires": { - "regenerator-transform": "^0.10.0" + "regenerator-transform": "0.10.1" } }, "babel-plugin-transform-strict-mode": { @@ -759,8 +759,8 @@ "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" } }, "babel-preset-es2015": { @@ -769,30 +769,30 @@ "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-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.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.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.26.2", + "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.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" } }, "babel-runtime": { @@ -801,8 +801,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -811,11 +811,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.10" }, "dependencies": { "babylon": { @@ -832,15 +832,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" }, "dependencies": { "babylon": { @@ -872,10 +872,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" }, "dependencies": { "to-fast-properties": { @@ -910,7 +910,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -920,9 +920,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "browserslist": { @@ -931,8 +931,8 @@ "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" + "caniuse-lite": "1.0.30000865", + "electron-to-chromium": "1.3.52" } }, "buffer-from": { @@ -959,7 +959,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -981,9 +981,9 @@ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "dev": true, "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "camelcase": "4.1.0", + "map-obj": "2.0.0", + "quick-lru": "1.1.0" }, "dependencies": { "camelcase": { @@ -1019,8 +1019,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -1029,9 +1029,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "character-entities": { @@ -1082,7 +1082,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-spinners": { @@ -1098,7 +1098,7 @@ "dev": true, "requires": { "slice-ansi": "0.0.4", - "string-width": "^1.0.1" + "string-width": "1.0.2" }, "dependencies": { "is-fullwidth-code-point": { @@ -1107,7 +1107,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "slice-ansi": { @@ -1122,9 +1122,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1142,8 +1142,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -1168,8 +1168,8 @@ "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", "dev": true, "requires": { - "is-regexp": "^1.0.0", - "is-supported-regexp-flag": "^1.0.0" + "is-regexp": "1.0.0", + "is-supported-regexp-flag": "1.0.1" } }, "cmd-shim": { @@ -1178,8 +1178,8 @@ "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "mkdirp": "~0.5.0" + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1" } }, "co": { @@ -1221,8 +1221,8 @@ "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", "dev": true, "requires": { - "strip-ansi": "^3.0.0", - "wcwidth": "^1.0.0" + "strip-ansi": "3.0.1", + "wcwidth": "1.0.1" } }, "command-join": { @@ -1243,8 +1243,8 @@ "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", "dev": true, "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^3.0.0" + "array-ify": "1.0.0", + "dot-prop": "3.0.0" } }, "concat-map": { @@ -1259,10 +1259,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "buffer-from": "1.1.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "console-control-strings": { @@ -1283,17 +1283,17 @@ "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==", "dev": true, "requires": { - "conventional-changelog-angular": "^1.6.6", - "conventional-changelog-atom": "^0.2.8", - "conventional-changelog-codemirror": "^0.3.8", - "conventional-changelog-core": "^2.0.11", - "conventional-changelog-ember": "^0.3.12", - "conventional-changelog-eslint": "^1.0.9", - "conventional-changelog-express": "^0.3.6", - "conventional-changelog-jquery": "^0.1.0", - "conventional-changelog-jscs": "^0.1.0", - "conventional-changelog-jshint": "^0.3.8", - "conventional-changelog-preset-loader": "^1.1.8" + "conventional-changelog-angular": "1.6.6", + "conventional-changelog-atom": "0.2.8", + "conventional-changelog-codemirror": "0.3.8", + "conventional-changelog-core": "2.0.11", + "conventional-changelog-ember": "0.3.12", + "conventional-changelog-eslint": "1.0.9", + "conventional-changelog-express": "0.3.6", + "conventional-changelog-jquery": "0.1.0", + "conventional-changelog-jscs": "0.1.0", + "conventional-changelog-jshint": "0.3.8", + "conventional-changelog-preset-loader": "1.1.8" } }, "conventional-changelog-angular": { @@ -1302,8 +1302,8 @@ "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "dev": true, "requires": { - "compare-func": "^1.3.1", - "q": "^1.5.1" + "compare-func": "1.3.2", + "q": "1.5.1" } }, "conventional-changelog-atom": { @@ -1312,7 +1312,7 @@ "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", "dev": true, "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-cli": { @@ -1321,11 +1321,11 @@ "integrity": "sha512-pnjdIJbxjkZ5VdAX/H1wndr1G10CY8MuZgnXuJhIHglOXfIrXygb7KZC836GW9uo1u8PjEIvIw/bKX0lOmOzZg==", "dev": true, "requires": { - "add-stream": "^1.0.0", - "conventional-changelog": "^1.1.24", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "tempfile": "^1.1.1" + "add-stream": "1.0.0", + "conventional-changelog": "1.1.24", + "lodash": "4.17.10", + "meow": "4.0.1", + "tempfile": "1.1.1" } }, "conventional-changelog-codemirror": { @@ -1334,7 +1334,7 @@ "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", "dev": true, "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-core": { @@ -1343,19 +1343,19 @@ "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", "dev": true, "requires": { - "conventional-changelog-writer": "^3.0.9", - "conventional-commits-parser": "^2.1.7", - "dateformat": "^3.0.0", - "get-pkg-repo": "^1.0.0", - "git-raw-commits": "^1.3.6", - "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^1.3.6", - "lodash": "^4.2.1", - "normalize-package-data": "^2.3.5", - "q": "^1.5.1", - "read-pkg": "^1.1.0", - "read-pkg-up": "^1.0.1", - "through2": "^2.0.0" + "conventional-changelog-writer": "3.0.9", + "conventional-commits-parser": "2.1.7", + "dateformat": "3.0.3", + "get-pkg-repo": "1.4.0", + "git-raw-commits": "1.3.6", + "git-remote-origin-url": "2.0.0", + "git-semver-tags": "1.3.6", + "lodash": "4.17.10", + "normalize-package-data": "2.4.0", + "q": "1.5.1", + "read-pkg": "1.1.0", + "read-pkg-up": "1.0.1", + "through2": "2.0.3" }, "dependencies": { "load-json-file": { @@ -1364,11 +1364,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "path-type": { @@ -1377,9 +1377,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "read-pkg": { @@ -1388,9 +1388,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -1399,8 +1399,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "strip-bom": { @@ -1409,7 +1409,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } } } @@ -1420,7 +1420,7 @@ "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==", "dev": true, "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-eslint": { @@ -1429,7 +1429,7 @@ "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", "dev": true, "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-express": { @@ -1438,7 +1438,7 @@ "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", "dev": true, "requires": { - "q": "^1.5.1" + "q": "1.5.1" } }, "conventional-changelog-jquery": { @@ -1447,7 +1447,7 @@ "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", "dev": true, "requires": { - "q": "^1.4.1" + "q": "1.5.1" } }, "conventional-changelog-jscs": { @@ -1456,7 +1456,7 @@ "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", "dev": true, "requires": { - "q": "^1.4.1" + "q": "1.5.1" } }, "conventional-changelog-jshint": { @@ -1465,8 +1465,8 @@ "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", "dev": true, "requires": { - "compare-func": "^1.3.1", - "q": "^1.5.1" + "compare-func": "1.3.2", + "q": "1.5.1" } }, "conventional-changelog-preset-loader": { @@ -1481,16 +1481,16 @@ "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", "dev": true, "requires": { - "compare-func": "^1.3.1", - "conventional-commits-filter": "^1.1.6", - "dateformat": "^3.0.0", - "handlebars": "^4.0.2", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "semver": "^5.5.0", - "split": "^1.0.0", - "through2": "^2.0.0" + "compare-func": "1.3.2", + "conventional-commits-filter": "1.1.6", + "dateformat": "3.0.3", + "handlebars": "4.0.11", + "json-stringify-safe": "5.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "semver": "5.5.0", + "split": "1.0.1", + "through2": "2.0.3" } }, "conventional-commit-types": { @@ -1505,8 +1505,8 @@ "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", "dev": true, "requires": { - "is-subset": "^0.1.1", - "modify-values": "^1.0.0" + "is-subset": "0.1.1", + "modify-values": "1.0.1" } }, "conventional-commits-parser": { @@ -1515,13 +1515,13 @@ "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "dev": true, "requires": { - "JSONStream": "^1.0.4", - "is-text-path": "^1.0.0", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0", - "trim-off-newlines": "^1.0.0" + "JSONStream": "1.3.3", + "is-text-path": "1.0.1", + "lodash": "4.17.10", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3", + "trim-off-newlines": "1.0.1" } }, "conventional-recommended-bump": { @@ -1530,13 +1530,13 @@ "integrity": "sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w==", "dev": true, "requires": { - "concat-stream": "^1.4.10", - "conventional-commits-filter": "^1.1.1", - "conventional-commits-parser": "^2.1.1", - "git-raw-commits": "^1.3.0", - "git-semver-tags": "^1.3.0", - "meow": "^3.3.0", - "object-assign": "^4.0.1" + "concat-stream": "1.6.2", + "conventional-commits-filter": "1.1.6", + "conventional-commits-parser": "2.1.7", + "git-raw-commits": "1.3.6", + "git-semver-tags": "1.3.6", + "meow": "3.7.0", + "object-assign": "4.1.1" }, "dependencies": { "camelcase": { @@ -1551,8 +1551,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, "get-stdin": { @@ -1567,7 +1567,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "load-json-file": { @@ -1576,11 +1576,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "map-obj": { @@ -1595,16 +1595,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "minimist": { @@ -1619,9 +1619,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "read-pkg": { @@ -1630,9 +1630,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -1641,8 +1641,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "redent": { @@ -1651,8 +1651,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, "strip-bom": { @@ -1661,7 +1661,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-indent": { @@ -1670,7 +1670,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "trim-newlines": { @@ -1699,14 +1699,14 @@ "integrity": "sha1-DeoPmATv37kp+7GxiOJVU+oFPTc=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "js-yaml": "^3.4.3", - "minimist": "^1.2.0", - "object-assign": "^4.0.1", - "os-homedir": "^1.0.1", - "parse-json": "^2.2.0", - "pinkie-promise": "^2.0.0", - "require-from-string": "^1.1.0" + "graceful-fs": "4.1.11", + "js-yaml": "3.12.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "pinkie-promise": "2.0.1", + "require-from-string": "1.2.1" }, "dependencies": { "minimist": { @@ -1723,7 +1723,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "^1.0.0" + "capture-stack-trace": "1.0.0" } }, "cross-spawn": { @@ -1732,9 +1732,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "currently-unhandled": { @@ -1743,7 +1743,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "^1.0.1" + "array-find-index": "1.0.2" } }, "cz-conventional-changelog": { @@ -1752,11 +1752,11 @@ "integrity": "sha1-L0vHOQ4yROTfKT5ro1Hkx0Cnx2Q=", "dev": true, "requires": { - "conventional-commit-types": "^2.0.0", - "lodash.map": "^4.5.1", - "longest": "^1.0.1", - "right-pad": "^1.0.1", - "word-wrap": "^1.0.3" + "conventional-commit-types": "2.2.0", + "lodash.map": "4.6.0", + "longest": "1.0.1", + "right-pad": "1.0.1", + "word-wrap": "1.2.3" } }, "damerau-levenshtein": { @@ -1771,7 +1771,7 @@ "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "date-fns": { @@ -1807,8 +1807,8 @@ "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", "dev": true, "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" + "decamelize": "1.2.0", + "map-obj": "1.0.1" }, "dependencies": { "map-obj": { @@ -1843,7 +1843,7 @@ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { - "clone": "^1.0.2" + "clone": "1.0.4" } }, "define-properties": { @@ -1852,8 +1852,8 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "foreach": "2.0.5", + "object-keys": "1.0.12" } }, "del": { @@ -1862,13 +1862,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" } }, "delegates": { @@ -1889,8 +1889,8 @@ "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", "dev": true, "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" + "arrify": "1.0.1", + "path-type": "3.0.0" }, "dependencies": { "path-type": { @@ -1899,7 +1899,7 @@ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "pify": { @@ -1916,7 +1916,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -1925,8 +1925,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { "domelementtype": { @@ -1949,7 +1949,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "domutils": { @@ -1958,8 +1958,8 @@ "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" } }, "dot-prop": { @@ -1968,7 +1968,7 @@ "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } }, "duplexer": { @@ -2013,7 +2013,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "es-abstract": { @@ -2022,11 +2022,11 @@ "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" + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "is-callable": "1.1.4", + "is-regex": "1.0.4" } }, "es-to-primitive": { @@ -2035,9 +2035,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-callable": "1.1.4", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" } }, "escape-string-regexp": { @@ -2052,44 +2052,44 @@ "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.7.0", + "ignore": "3.3.10", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", + "require-uncached": "1.0.3", + "semver": "5.5.0", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", "table": "4.0.2", - "text-table": "~0.2.0" + "text-table": "0.2.0" }, "dependencies": { "ansi-regex": { @@ -2104,7 +2104,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2115,7 +2115,7 @@ "integrity": "sha512-zLyOhVWhzB/jwbz7IPSbkUuj7X2ox4PHXTcZkEmDqTvd0baJmJyuxlFPDlZOE/Y5bC+HQRaEkT3FoHo9wIdRiw==", "dev": true, "requires": { - "eslint-config-airbnb-base": "^12.1.0" + "eslint-config-airbnb-base": "12.1.0" } }, "eslint-config-airbnb-base": { @@ -2124,7 +2124,7 @@ "integrity": "sha512-/vjm0Px5ZCpmJqnjIzcFb9TKZrKWz0gnuG/7Gfkt0Db1ELJR51xkZth+t14rYdqWgX836XbuxtArbIHlVhbLBA==", "dev": true, "requires": { - "eslint-restricted-globals": "^0.1.1" + "eslint-restricted-globals": "0.1.1" } }, "eslint-config-prettier": { @@ -2133,7 +2133,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "^5.0.1" + "get-stdin": "5.0.1" } }, "eslint-config-pubsweet": { @@ -2142,10 +2142,10 @@ "integrity": "sha512-xrkwbCcs5CEPSom99O5aHprxU0JyG8cKAudztvUytEHUfxGJfzRXwBGvOsW4eQBbU1e52jhMXz2HlQ0RZ9UW6A==", "dev": true, "requires": { - "eslint-config-airbnb": "^16.1.0", - "eslint-config-prettier": "^2.7.0", - "eslint-config-standard": "^10.2.1", - "eslint-config-standard-react": "^5.0.0" + "eslint-config-airbnb": "16.1.0", + "eslint-config-prettier": "2.9.0", + "eslint-config-standard": "10.2.1", + "eslint-config-standard-react": "5.0.0" } }, "eslint-config-standard": { @@ -2166,7 +2166,7 @@ "integrity": "sha1-ZMe4FAFyhSvoEKU9SO6HZJ/xeOM=", "dev": true, "requires": { - "eslint-config-standard-jsx": "^4.0.0" + "eslint-config-standard-jsx": "4.0.2" } }, "eslint-import-resolver-node": { @@ -2175,8 +2175,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.5.0" + "debug": "2.6.9", + "resolve": "1.8.1" }, "dependencies": { "debug": { @@ -2196,8 +2196,8 @@ "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", "dev": true, "requires": { - "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "debug": "2.6.9", + "pkg-dir": "1.0.0" }, "dependencies": { "debug": { @@ -2217,16 +2217,16 @@ "integrity": "sha512-t6hGKQDMIt9N8R7vLepsYXgDfeuhp6ZJSgtrLEDxonpSubyxUZHjhm6LsAaZX8q6GYVxkbT3kTsV9G5mBCFR6A==", "dev": true, "requires": { - "contains-path": "^0.1.0", - "debug": "^2.6.8", + "contains-path": "0.1.0", + "debug": "2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" + "eslint-import-resolver-node": "0.3.2", + "eslint-module-utils": "2.2.0", + "has": "1.0.3", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "read-pkg-up": "2.0.0", + "resolve": "1.8.1" }, "dependencies": { "debug": { @@ -2244,8 +2244,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "2.0.2", + "isarray": "1.0.0" } } } @@ -2262,14 +2262,14 @@ "integrity": "sha512-JsxNKqa3TwmPypeXNnI75FntkUktGzI1wSa1LgNZdSOMI+B4sxnr1lSF8m8lPiz4mKiC+14ysZQM4scewUrP7A==", "dev": true, "requires": { - "aria-query": "^3.0.0", - "array-includes": "^3.0.3", - "ast-types-flow": "^0.0.7", - "axobject-query": "^2.0.1", - "damerau-levenshtein": "^1.0.4", - "emoji-regex": "^6.5.1", - "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1" + "aria-query": "3.0.0", + "array-includes": "3.0.3", + "ast-types-flow": "0.0.7", + "axobject-query": "2.0.1", + "damerau-levenshtein": "1.0.4", + "emoji-regex": "6.5.1", + "has": "1.0.3", + "jsx-ast-utils": "2.0.1" } }, "eslint-plugin-node": { @@ -2278,9 +2278,9 @@ "integrity": "sha512-xhPXrh0Vl/b7870uEbaumb2Q+LxaEcOQ3kS1jtIXanBAwpMre1l5q/l2l/hESYJGEFKuI78bp6Uw50hlpr7B+g==", "dev": true, "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", + "ignore": "3.3.10", + "minimatch": "3.0.4", + "resolve": "1.8.1", "semver": "5.3.0" }, "dependencies": { @@ -2298,8 +2298,8 @@ "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", "dev": true, "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" + "fast-diff": "1.1.2", + "jest-docblock": "21.2.0" } }, "eslint-plugin-promise": { @@ -2314,10 +2314,10 @@ "integrity": "sha512-18rzWn4AtbSUxFKKM7aCVcj5LXOhOKdwBino3KKWy4psxfPW0YtIbE8WNRDUdyHFL50BeLb6qFd4vpvNYyp7hw==", "dev": true, "requires": { - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.2" + "doctrine": "2.1.0", + "has": "1.0.3", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.2" } }, "eslint-plugin-standard": { @@ -2338,8 +2338,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.1", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { @@ -2354,8 +2354,8 @@ "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "5.7.1", + "acorn-jsx": "3.0.1" } }, "esprima": { @@ -2370,7 +2370,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { @@ -2379,7 +2379,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "4.2.0" } }, "estraverse": { @@ -2400,13 +2400,13 @@ "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "execall": { @@ -2415,7 +2415,7 @@ "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", "dev": true, "requires": { - "clone-regexp": "^1.0.0" + "clone-regexp": "1.0.1" } }, "exit-hook": { @@ -2430,7 +2430,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "expand-range": { @@ -2439,7 +2439,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.4" } }, "extend": { @@ -2454,9 +2454,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.23", + "tmp": "0.0.33" } }, "extglob": { @@ -2465,7 +2465,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" }, "dependencies": { "is-extglob": { @@ -2506,7 +2506,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -2515,8 +2515,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "filename-regex": { @@ -2531,11 +2531,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "find-up": { @@ -2544,8 +2544,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "flat-cache": { @@ -2554,10 +2554,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "for-in": { @@ -2572,7 +2572,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "foreach": { @@ -2587,9 +2587,9 @@ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.2" } }, "fs.realpath": { @@ -2616,14 +2616,14 @@ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" }, "dependencies": { "is-fullwidth-code-point": { @@ -2632,7 +2632,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -2641,9 +2641,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -2666,11 +2666,11 @@ "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "meow": "^3.3.0", - "normalize-package-data": "^2.3.0", - "parse-github-repo-url": "^1.3.0", - "through2": "^2.0.0" + "hosted-git-info": "2.7.1", + "meow": "3.7.0", + "normalize-package-data": "2.4.0", + "parse-github-repo-url": "1.4.1", + "through2": "2.0.3" }, "dependencies": { "camelcase": { @@ -2685,8 +2685,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" } }, "get-stdin": { @@ -2701,7 +2701,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "load-json-file": { @@ -2710,11 +2710,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "map-obj": { @@ -2729,16 +2729,16 @@ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "minimist": { @@ -2753,9 +2753,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "read-pkg": { @@ -2764,9 +2764,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -2775,8 +2775,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "redent": { @@ -2785,8 +2785,8 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" } }, "strip-bom": { @@ -2795,7 +2795,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-indent": { @@ -2804,7 +2804,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "trim-newlines": { @@ -2839,11 +2839,11 @@ "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", "dev": true, "requires": { - "dargs": "^4.0.1", - "lodash.template": "^4.0.2", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0" + "dargs": "4.1.0", + "lodash.template": "4.4.0", + "meow": "4.0.1", + "split2": "2.2.0", + "through2": "2.0.3" } }, "git-remote-origin-url": { @@ -2852,8 +2852,8 @@ "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", "dev": true, "requires": { - "gitconfiglocal": "^1.0.0", - "pify": "^2.3.0" + "gitconfiglocal": "1.0.0", + "pify": "2.3.0" } }, "git-semver-tags": { @@ -2862,8 +2862,8 @@ "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", "dev": true, "requires": { - "meow": "^4.0.0", - "semver": "^5.5.0" + "meow": "4.0.1", + "semver": "5.5.0" } }, "gitconfiglocal": { @@ -2872,7 +2872,7 @@ "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", "dev": true, "requires": { - "ini": "^1.3.2" + "ini": "1.3.5" } }, "glob": { @@ -2881,12 +2881,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "glob-base": { @@ -2895,8 +2895,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" }, "dependencies": { "glob-parent": { @@ -2905,7 +2905,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -2920,7 +2920,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -2931,8 +2931,8 @@ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "3.1.0", + "path-dirname": "1.0.2" } }, "globals": { @@ -2947,12 +2947,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "globjoin": { @@ -2967,7 +2967,7 @@ "integrity": "sha512-Kjhohco0esHQnOiqqdJeNz/5fyPkOMD/d6XVjwTAoPGUFh0mCollPUTUTa2OZy4dYNAqlPIQdTiNzJTWdd9Htw==", "dev": true, "requires": { - "minimist": "1.1.x" + "minimist": "1.1.3" }, "dependencies": { "minimist": { @@ -2984,17 +2984,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "create-error-class": "3.0.2", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "unzip-response": "2.0.1", + "url-parse-lax": "1.0.0" } }, "graceful-fs": { @@ -3009,10 +3009,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -3021,7 +3021,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -3032,7 +3032,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "function-bind": "1.1.1" } }, "has-ansi": { @@ -3041,7 +3041,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -3062,11 +3062,11 @@ "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", "dev": true, "requires": { - "invariant": "^2.2.1", - "loose-envify": "^1.2.0", - "resolve-pathname": "^2.2.0", - "value-equal": "^0.4.0", - "warning": "^3.0.0" + "invariant": "2.2.4", + "loose-envify": "1.4.0", + "resolve-pathname": "2.2.0", + "value-equal": "0.4.0", + "warning": "3.0.0" } }, "hoist-non-react-statics": { @@ -3093,23 +3093,28 @@ "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" + "domelementtype": "1.3.0", + "domhandler": "2.4.2", + "domutils": "1.7.0", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" } }, + "humps": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", + "integrity": "sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao=" + }, "husky": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", "dev": true, "requires": { - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" + "is-ci": "1.1.0", + "normalize-path": "1.0.0", + "strip-indent": "2.0.0" } }, "iconv-lite": { @@ -3118,7 +3123,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore": { @@ -3151,8 +3156,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -3173,20 +3178,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "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.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.10", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" }, "dependencies": { "ansi-regex": { @@ -3201,7 +3206,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -3212,7 +3217,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.4.0" } }, "invert-kv": { @@ -3239,8 +3244,8 @@ "integrity": "sha512-pyfU/0kHdISIgslFfZN9nfY1Gk3MquQgUm1mJTjdkEPpkAKNWuBTSqFwewOpR7N351VkErCiyV71zX7mlQQqsg==", "dev": true, "requires": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" + "is-alphabetical": "1.0.2", + "is-decimal": "1.0.2" } }, "is-arrayish": { @@ -3261,7 +3266,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-callable": { @@ -3276,7 +3281,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "^1.0.0" + "ci-info": "1.1.3" } }, "is-date-object": { @@ -3309,7 +3314,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -3330,7 +3335,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -3345,7 +3350,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } }, "is-hexadecimal": { @@ -3360,7 +3365,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-obj": { @@ -3381,7 +3386,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -3390,7 +3395,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-plain-obj": { @@ -3429,7 +3434,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "^1.0.1" + "has": "1.0.3" } }, "is-regexp": { @@ -3480,7 +3485,7 @@ "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", "dev": true, "requires": { - "text-extensions": "^1.0.0" + "text-extensions": "1.7.0" } }, "is-utf8": { @@ -3540,10 +3545,10 @@ "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", "dev": true, "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^21.2.0", - "leven": "^2.1.0", - "pretty-format": "^21.2.1" + "chalk": "2.4.1", + "jest-get-type": "21.2.0", + "leven": "2.1.0", + "pretty-format": "21.2.1" } }, "js-base64": { @@ -3555,8 +3560,7 @@ "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" }, "js-yaml": { "version": "3.12.0", @@ -3564,8 +3568,8 @@ "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.1" } }, "jsesc": { @@ -3604,7 +3608,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsonparse": { @@ -3619,7 +3623,7 @@ "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", "dev": true, "requires": { - "array-includes": "^3.0.3" + "array-includes": "3.0.3" } }, "kind-of": { @@ -3628,7 +3632,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "known-css-properties": { @@ -3650,7 +3654,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "lerna": { @@ -3659,45 +3663,45 @@ "integrity": "sha512-kgM6zwe2P2tR30MYvgiLLW+9buFCm6E7o8HnRlhTgm70WVBvXVhydqv+q/MF2HrVZkCawfVtCfetyQmtd4oHhQ==", "dev": true, "requires": { - "async": "^1.5.0", - "chalk": "^2.1.0", - "cmd-shim": "^2.0.2", - "columnify": "^1.5.4", - "command-join": "^2.0.0", - "conventional-changelog-cli": "^1.3.13", - "conventional-recommended-bump": "^1.2.1", - "dedent": "^0.7.0", - "execa": "^0.8.0", - "find-up": "^2.1.0", - "fs-extra": "^4.0.1", - "get-port": "^3.2.0", - "glob": "^7.1.2", - "glob-parent": "^3.1.0", - "globby": "^6.1.0", - "graceful-fs": "^4.1.11", - "hosted-git-info": "^2.5.0", - "inquirer": "^3.2.2", - "is-ci": "^1.0.10", - "load-json-file": "^4.0.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "npmlog": "^4.1.2", - "p-finally": "^1.0.0", - "package-json": "^4.0.1", - "path-exists": "^3.0.0", - "read-cmd-shim": "^1.0.1", - "read-pkg": "^3.0.0", - "rimraf": "^2.6.1", - "safe-buffer": "^5.1.1", - "semver": "^5.4.1", - "signal-exit": "^3.0.2", - "slash": "^1.0.0", - "strong-log-transformer": "^1.0.6", - "temp-write": "^3.3.0", - "write-file-atomic": "^2.3.0", - "write-json-file": "^2.2.0", - "write-pkg": "^3.1.0", - "yargs": "^8.0.2" + "async": "1.5.2", + "chalk": "2.4.1", + "cmd-shim": "2.0.2", + "columnify": "1.5.4", + "command-join": "2.0.0", + "conventional-changelog-cli": "1.3.22", + "conventional-recommended-bump": "1.2.1", + "dedent": "0.7.0", + "execa": "0.8.0", + "find-up": "2.1.0", + "fs-extra": "4.0.3", + "get-port": "3.2.0", + "glob": "7.1.2", + "glob-parent": "3.1.0", + "globby": "6.1.0", + "graceful-fs": "4.1.11", + "hosted-git-info": "2.7.1", + "inquirer": "3.3.0", + "is-ci": "1.1.0", + "load-json-file": "4.0.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "npmlog": "4.1.2", + "p-finally": "1.0.0", + "package-json": "4.0.1", + "path-exists": "3.0.0", + "read-cmd-shim": "1.0.1", + "read-pkg": "3.0.0", + "rimraf": "2.6.2", + "safe-buffer": "5.1.2", + "semver": "5.5.0", + "signal-exit": "3.0.2", + "slash": "1.0.0", + "strong-log-transformer": "1.0.6", + "temp-write": "3.4.0", + "write-file-atomic": "2.3.0", + "write-json-file": "2.3.0", + "write-pkg": "3.2.0", + "yargs": "8.0.2" }, "dependencies": { "find-up": { @@ -3706,7 +3710,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "globby": { @@ -3715,11 +3719,11 @@ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "load-json-file": { @@ -3728,10 +3732,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" }, "dependencies": { "pify": { @@ -3748,8 +3752,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" } }, "path-exists": { @@ -3764,7 +3768,7 @@ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" }, "dependencies": { "pify": { @@ -3781,9 +3785,9 @@ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" } } } @@ -3800,8 +3804,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "lint-staged": { @@ -3810,21 +3814,21 @@ "integrity": "sha512-C/Zxslg0VRbsxwmCu977iIs+QyrmW2cyRCPUV5NDFYOH/jtRFHH8ch7ua2fH0voI/nVC3Tpg7DykfgMZySliKw==", "dev": true, "requires": { - "app-root-path": "^2.0.0", - "chalk": "^2.1.0", - "commander": "^2.11.0", - "cosmiconfig": "^1.1.0", - "execa": "^0.8.0", - "is-glob": "^4.0.0", - "jest-validate": "^21.1.0", - "listr": "^0.12.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "minimatch": "^3.0.0", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", + "app-root-path": "2.1.0", + "chalk": "2.4.1", + "commander": "2.16.0", + "cosmiconfig": "1.1.0", + "execa": "0.8.0", + "is-glob": "4.0.0", + "jest-validate": "21.2.1", + "listr": "0.12.0", + "lodash": "4.17.10", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "npm-which": "3.0.1", + "p-map": "1.2.0", "staged-git-files": "0.0.4", - "stringify-object": "^3.2.0" + "stringify-object": "3.2.2" }, "dependencies": { "is-glob": { @@ -3833,7 +3837,7 @@ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "is-extglob": "2.1.1" } } } @@ -3844,22 +3848,22 @@ "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.2.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.0.0-beta.11", - "stream-to-observable": "^0.1.0", - "strip-ansi": "^3.0.1" + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.2.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "5.5.11", + "stream-to-observable": "0.1.0", + "strip-ansi": "3.0.1" }, "dependencies": { "ansi-styles": { @@ -3874,11 +3878,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "figures": { @@ -3887,8 +3891,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "indent-string": { @@ -3897,7 +3901,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "log-symbols": { @@ -3906,7 +3910,7 @@ "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "dev": true, "requires": { - "chalk": "^1.0.0" + "chalk": "1.1.3" } }, "supports-color": { @@ -3929,14 +3933,14 @@ "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "ansi-styles": { @@ -3951,11 +3955,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "figures": { @@ -3964,8 +3968,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "log-symbols": { @@ -3974,7 +3978,7 @@ "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "dev": true, "requires": { - "chalk": "^1.0.0" + "chalk": "1.1.3" } }, "supports-color": { @@ -3991,10 +3995,10 @@ "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" }, "dependencies": { "ansi-styles": { @@ -4009,11 +4013,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cli-cursor": { @@ -4022,7 +4026,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "figures": { @@ -4031,8 +4035,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "onetime": { @@ -4047,8 +4051,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "supports-color": { @@ -4065,10 +4069,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" } }, "locate-path": { @@ -4077,8 +4081,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" }, "dependencies": { "path-exists": { @@ -4113,8 +4117,8 @@ "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "dev": true, "requires": { - "lodash._reinterpolate": "~3.0.0", - "lodash.templatesettings": "^4.0.0" + "lodash._reinterpolate": "3.0.0", + "lodash.templatesettings": "4.1.0" } }, "lodash.templatesettings": { @@ -4123,7 +4127,7 @@ "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", "dev": true, "requires": { - "lodash._reinterpolate": "~3.0.0" + "lodash._reinterpolate": "3.0.0" } }, "log-symbols": { @@ -4132,7 +4136,7 @@ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "2.4.1" } }, "log-update": { @@ -4141,8 +4145,8 @@ "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", "dev": true, "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" }, "dependencies": { "ansi-escapes": { @@ -4157,7 +4161,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "onetime": { @@ -4172,8 +4176,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } } } @@ -4194,9 +4198,8 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "js-tokens": "3.0.2" } }, "loud-rejection": { @@ -4205,8 +4208,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" } }, "lowercase-keys": { @@ -4221,8 +4224,8 @@ "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "make-dir": { @@ -4231,7 +4234,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" }, "dependencies": { "pify": { @@ -4278,8 +4281,8 @@ "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=", "dev": true, "requires": { - "unist-util-modify-children": "^1.0.0", - "unist-util-visit": "^1.1.0" + "unist-util-modify-children": "1.1.2", + "unist-util-visit": "1.4.0" } }, "mem": { @@ -4288,7 +4291,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "meow": { @@ -4297,15 +4300,15 @@ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "dev": true, "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" + "camelcase-keys": "4.2.0", + "decamelize-keys": "1.1.0", + "loud-rejection": "1.6.0", + "minimist": "1.2.0", + "minimist-options": "3.0.2", + "normalize-package-data": "2.4.0", + "read-pkg-up": "3.0.0", + "redent": "2.0.0", + "trim-newlines": "2.0.0" }, "dependencies": { "find-up": { @@ -4314,7 +4317,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "load-json-file": { @@ -4323,10 +4326,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" } }, "minimist": { @@ -4341,8 +4344,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" } }, "path-type": { @@ -4351,7 +4354,7 @@ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "3.0.0" } }, "pify": { @@ -4366,9 +4369,9 @@ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "load-json-file": "4.0.0", + "normalize-package-data": "2.4.0", + "path-type": "3.0.0" } }, "read-pkg-up": { @@ -4377,8 +4380,8 @@ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "find-up": "2.1.0", + "read-pkg": "3.0.0" } } } @@ -4389,19 +4392,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" }, "dependencies": { "is-extglob": { @@ -4416,7 +4419,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "normalize-path": { @@ -4425,7 +4428,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } } } @@ -4442,7 +4445,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -4457,8 +4460,8 @@ "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", "dev": true, "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" + "arrify": "1.0.1", + "is-plain-obj": "1.1.0" } }, "mkdirp": { @@ -4506,10 +4509,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.7.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -4536,7 +4539,7 @@ "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", "dev": true, "requires": { - "which": "^1.2.10" + "which": "1.3.1" } }, "npm-run-path": { @@ -4545,7 +4548,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "npm-which": { @@ -4554,9 +4557,9 @@ "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", "dev": true, "requires": { - "commander": "^2.9.0", - "npm-path": "^2.0.2", - "which": "^1.2.10" + "commander": "2.16.0", + "npm-path": "2.0.4", + "which": "1.3.1" } }, "npmlog": { @@ -4565,10 +4568,10 @@ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "num2fraction": { @@ -4586,8 +4589,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-keys": { "version": "1.0.12", @@ -4601,8 +4603,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "once": { @@ -4611,7 +4613,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -4620,7 +4622,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.2.0" } }, "optimist": { @@ -4629,8 +4631,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" }, "dependencies": { "wordwrap": { @@ -4647,12 +4649,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" } }, "ora": { @@ -4661,10 +4663,10 @@ "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", "dev": true, "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" }, "dependencies": { "ansi-styles": { @@ -4679,11 +4681,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "cli-cursor": { @@ -4692,7 +4694,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "onetime": { @@ -4707,8 +4709,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "supports-color": { @@ -4731,9 +4733,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" }, "dependencies": { "execa": { @@ -4742,13 +4744,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } } } @@ -4771,7 +4773,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "1.0.0" } }, "p-locate": { @@ -4780,7 +4782,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.3.0" } }, "p-map": { @@ -4801,10 +4803,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "got": "6.7.1", + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0", + "semver": "5.5.0" } }, "parse-entities": { @@ -4813,12 +4815,12 @@ "integrity": "sha512-5N9lmQ7tmxfXf+hO3X6KRG6w7uYO/HL9fHalSySTdyn63C3WNvTM/1R8tn1u1larNcEbo3Slcy2bsVDQqvEpUg==", "dev": true, "requires": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "character-entities": "1.2.2", + "character-entities-legacy": "1.1.2", + "character-reference-invalid": "1.1.2", + "is-alphanumerical": "1.0.2", + "is-decimal": "1.0.2", + "is-hexadecimal": "1.0.2" } }, "parse-github-repo-url": { @@ -4833,10 +4835,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" }, "dependencies": { "is-extglob": { @@ -4851,7 +4853,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } } } @@ -4862,7 +4864,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.2" } }, "path-dirname": { @@ -4877,7 +4879,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -4927,7 +4929,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "2.3.0" } }, "pify": { @@ -4948,7 +4950,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-dir": { @@ -4957,7 +4959,7 @@ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" } }, "pluralize": { @@ -4972,9 +4974,9 @@ "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" }, "dependencies": { "source-map": { @@ -4991,9 +4993,9 @@ "integrity": "sha512-KxKUpj7AY7nlCbLcTOYxdfJnGE7QFAfU2n95ADj1Q90RM/pOLdz8k3n4avOyRFs7MDQHcRzJQWM1dehCwJxisQ==", "dev": true, "requires": { - "htmlparser2": "^3.9.2", - "remark": "^8.0.0", - "unist-util-find-all-after": "^1.0.1" + "htmlparser2": "3.9.2", + "remark": "8.0.0", + "unist-util-find-all-after": "1.0.2" } }, "postcss-less": { @@ -5002,7 +5004,7 @@ "integrity": "sha512-QQIiIqgEjNnquc0d4b6HDOSFZxbFQoy4MPpli2lSLpKhMyBkKwwca2HFqu4xzxlKID/F2fxSOowwtKpgczhF7A==", "dev": true, "requires": { - "postcss": "^5.2.16" + "postcss": "5.2.18" }, "dependencies": { "ansi-styles": { @@ -5017,11 +5019,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" }, "dependencies": { "supports-color": { @@ -5044,10 +5046,10 @@ "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", "dev": true, "requires": { - "chalk": "^1.1.3", - "js-base64": "^2.1.9", - "source-map": "^0.5.6", - "supports-color": "^3.2.3" + "chalk": "1.1.3", + "js-base64": "2.4.8", + "source-map": "0.5.7", + "supports-color": "3.2.3" } }, "supports-color": { @@ -5056,7 +5058,7 @@ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -5073,10 +5075,10 @@ "integrity": "sha512-rBkDbaHAu5uywbCR2XE8a25tats3xSOsGNx6mppK6Q9kSFGKc/FyAzfci+fWM2l+K402p1D0pNcfDGxeje5IKg==", "dev": true, "requires": { - "chalk": "^2.0.1", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "postcss": "^6.0.8" + "chalk": "2.4.1", + "lodash": "4.17.10", + "log-symbols": "2.2.0", + "postcss": "6.0.23" } }, "postcss-resolve-nested-selector": { @@ -5091,7 +5093,7 @@ "integrity": "sha1-t1Pv9sfArqXoN1++TN6L+QY/8UI=", "dev": true, "requires": { - "postcss": "^6.0.6" + "postcss": "6.0.23" } }, "postcss-sass": { @@ -5100,8 +5102,8 @@ "integrity": "sha512-cUmYzkP747fPCQE6d+CH2l1L4VSyIlAzZsok3HPjb5Gzsq3jE+VjpAdGlPsnQ310WKWI42sw+ar0UNN59/f3hg==", "dev": true, "requires": { - "gonzales-pe": "^4.0.3", - "postcss": "^6.0.6" + "gonzales-pe": "4.2.3", + "postcss": "6.0.23" } }, "postcss-scss": { @@ -5110,7 +5112,7 @@ "integrity": "sha512-4EFYGHcEw+H3E06PT/pQQri06u/1VIIPjeJQaM8skB80vZuXMhp4cSNV5azmdNkontnOID/XYWEvEEELLFB1ww==", "dev": true, "requires": { - "postcss": "^6.0.23" + "postcss": "6.0.23" } }, "postcss-selector-parser": { @@ -5119,9 +5121,9 @@ "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", "dev": true, "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" + "dot-prop": "4.2.0", + "indexes-of": "1.0.1", + "uniq": "1.0.1" }, "dependencies": { "dot-prop": { @@ -5130,7 +5132,7 @@ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "1.0.1" } } } @@ -5141,8 +5143,8 @@ "integrity": "sha512-YCPTcJwGIInF1LpMD1lIYvMHTGUL4s97o/OraA6eKvoauhhk6vjwOWDDjm6uRKqug/kyDPMKEzmYZ6FtW6RDgw==", "dev": true, "requires": { - "lodash": "^4.17.4", - "postcss": "^6.0.13" + "lodash": "4.17.10", + "postcss": "6.0.23" } }, "postcss-value-parser": { @@ -5181,8 +5183,8 @@ "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.1" }, "dependencies": { "ansi-regex": { @@ -5215,10 +5217,9 @@ "version": "15.6.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", - "dev": true, "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "1.4.0", + "object-assign": "4.1.1" } }, "pseudomap": { @@ -5245,9 +5246,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { "is-number": { @@ -5270,10 +5271,10 @@ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -5290,13 +5291,13 @@ "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", "dev": true, "requires": { - "history": "^4.7.2", - "hoist-non-react-statics": "^2.5.0", - "invariant": "^2.2.4", - "loose-envify": "^1.3.1", - "path-to-regexp": "^1.7.0", - "prop-types": "^15.6.1", - "warning": "^4.0.1" + "history": "4.7.2", + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.4", + "loose-envify": "1.4.0", + "path-to-regexp": "1.7.0", + "prop-types": "15.6.2", + "warning": "4.0.1" }, "dependencies": { "warning": { @@ -5305,7 +5306,7 @@ "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.4.0" } } } @@ -5316,9 +5317,9 @@ "integrity": "sha512-euSgNIANnRXr4GydIuwA7RZCefrLQzIw5WdXspS8NPYbV+FxrKSS9MKG7U9vb6vsKHONnA4VxrVNWfnMUnUQAw==", "dev": true, "requires": { - "history": "^4.7.2", - "prop-types": "^15.6.0", - "react-router": "^4.2.0" + "history": "4.7.2", + "prop-types": "15.6.2", + "react-router": "4.3.1" } }, "read-cmd-shim": { @@ -5327,7 +5328,7 @@ "integrity": "sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs=", "dev": true, "requires": { - "graceful-fs": "^4.1.2" + "graceful-fs": "4.1.11" } }, "read-pkg": { @@ -5336,9 +5337,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" } }, "read-pkg-up": { @@ -5347,8 +5348,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "2.1.0", + "read-pkg": "2.0.0" }, "dependencies": { "find-up": { @@ -5357,7 +5358,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } } } @@ -5368,13 +5369,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "redent": { @@ -5383,8 +5384,8 @@ "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", "dev": true, "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" + "indent-string": "3.2.0", + "strip-indent": "2.0.0" } }, "regenerate": { @@ -5405,9 +5406,9 @@ "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "dev": true, "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" } }, "regex-cache": { @@ -5416,7 +5417,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regexpp": { @@ -5431,9 +5432,9 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "regenerate": "1.4.0", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" } }, "registry-auth-token": { @@ -5442,8 +5443,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "rc": "1.2.8", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -5452,7 +5453,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "^1.0.1" + "rc": "1.2.8" } }, "regjsgen": { @@ -5467,7 +5468,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "jsesc": "0.5.0" }, "dependencies": { "jsesc": { @@ -5484,9 +5485,9 @@ "integrity": "sha512-K0PTsaZvJlXTl9DN6qYlvjTkqSZBFELhROZMrblm2rB+085flN84nz4g/BscKRMqDvhzlK1oQ/xnWQumdeNZYw==", "dev": true, "requires": { - "remark-parse": "^4.0.0", - "remark-stringify": "^4.0.0", - "unified": "^6.0.0" + "remark-parse": "4.0.0", + "remark-stringify": "4.0.0", + "unified": "6.2.0" } }, "remark-parse": { @@ -5495,21 +5496,21 @@ "integrity": "sha512-XZgICP2gJ1MHU7+vQaRM+VA9HEL3X253uwUM/BGgx3iv6TH2B3bF3B8q00DKcyP9YrJV+/7WOWEWBFF/u8cIsw==", "dev": true, "requires": { - "collapse-white-space": "^1.0.2", - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "is-word-character": "^1.0.0", - "markdown-escapes": "^1.0.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", + "collapse-white-space": "1.0.4", + "is-alphabetical": "1.0.2", + "is-decimal": "1.0.2", + "is-whitespace-character": "1.0.2", + "is-word-character": "1.0.2", + "markdown-escapes": "1.0.2", + "parse-entities": "1.1.2", + "repeat-string": "1.6.1", + "state-toggle": "1.0.1", "trim": "0.0.1", - "trim-trailing-lines": "^1.0.0", - "unherit": "^1.0.4", - "unist-util-remove-position": "^1.0.0", - "vfile-location": "^2.0.0", - "xtend": "^4.0.1" + "trim-trailing-lines": "1.1.1", + "unherit": "1.1.1", + "unist-util-remove-position": "1.1.2", + "vfile-location": "2.0.3", + "xtend": "4.0.1" } }, "remark-stringify": { @@ -5518,20 +5519,20 @@ "integrity": "sha512-xLuyKTnuQer3ke9hkU38SUYLiTmS078QOnoFavztmbt/pAJtNSkNtFgR0U//uCcmG0qnyxao+PDuatQav46F1w==", "dev": true, "requires": { - "ccount": "^1.0.0", - "is-alphanumeric": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "longest-streak": "^2.0.1", - "markdown-escapes": "^1.0.0", - "markdown-table": "^1.1.0", - "mdast-util-compact": "^1.0.0", - "parse-entities": "^1.0.2", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "stringify-entities": "^1.0.1", - "unherit": "^1.0.4", - "xtend": "^4.0.1" + "ccount": "1.0.3", + "is-alphanumeric": "1.0.0", + "is-decimal": "1.0.2", + "is-whitespace-character": "1.0.2", + "longest-streak": "2.0.2", + "markdown-escapes": "1.0.2", + "markdown-table": "1.1.2", + "mdast-util-compact": "1.0.1", + "parse-entities": "1.1.2", + "repeat-string": "1.6.1", + "state-toggle": "1.0.1", + "stringify-entities": "1.3.2", + "unherit": "1.1.1", + "xtend": "4.0.1" } }, "remove-trailing-separator": { @@ -5558,7 +5559,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "replace-ext": { @@ -5591,8 +5592,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" } }, "resolve": { @@ -5601,7 +5602,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-from": { @@ -5622,8 +5623,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "right-align": { @@ -5633,7 +5634,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "right-pad": { @@ -5648,7 +5649,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "run-async": { @@ -5657,7 +5658,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "rx-lite": { @@ -5672,7 +5673,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "*" + "rx-lite": "4.0.8" } }, "rxjs": { @@ -5714,7 +5715,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -5741,7 +5742,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" } }, "sort-keys": { @@ -5750,7 +5751,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "^1.0.0" + "is-plain-obj": "1.1.0" } }, "source-map": { @@ -5765,8 +5766,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -5781,8 +5782,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -5803,7 +5804,7 @@ "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, "requires": { - "through": "2" + "through": "2.3.8" } }, "split2": { @@ -5812,7 +5813,7 @@ "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "dev": true, "requires": { - "through2": "^2.0.2" + "through2": "2.0.3" } }, "sprintf-js": { @@ -5845,8 +5846,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { "ansi-regex": { @@ -5861,7 +5862,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -5872,7 +5873,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "stringify-entities": { @@ -5881,10 +5882,10 @@ "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==", "dev": true, "requires": { - "character-entities-html4": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "character-entities-html4": "1.1.2", + "character-entities-legacy": "1.1.2", + "is-alphanumerical": "1.0.2", + "is-hexadecimal": "1.0.2" } }, "stringify-object": { @@ -5893,9 +5894,9 @@ "integrity": "sha512-O696NF21oLiDy8PhpWu8AEqoZHw++QW6mUv0UvKZe8gWSdSvMXkiLufK7OmnP27Dro4GU5kb9U7JIO0mBuCRQg==", "dev": true, "requires": { - "get-own-enumerable-property-symbols": "^2.0.1", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" + "get-own-enumerable-property-symbols": "2.0.1", + "is-obj": "1.0.1", + "is-regexp": "1.0.0" } }, "strip-ansi": { @@ -5904,7 +5905,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -5937,11 +5938,11 @@ "integrity": "sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M=", "dev": true, "requires": { - "byline": "^5.0.0", - "duplexer": "^0.1.1", - "minimist": "^0.1.0", - "moment": "^2.6.0", - "through": "^2.3.4" + "byline": "5.0.0", + "duplexer": "0.1.1", + "minimist": "0.1.0", + "moment": "2.22.2", + "through": "2.3.8" }, "dependencies": { "minimist": { @@ -5964,45 +5965,45 @@ "integrity": "sha512-56hPH5mTFnk8LzlEuTWq0epa34fHuS54UFYQidBOFt563RJBNi1nz1F2HK2MoT1X1waq47milvRsRahFCCJs/Q==", "dev": true, "requires": { - "autoprefixer": "^7.1.2", - "balanced-match": "^1.0.0", - "chalk": "^2.0.1", - "cosmiconfig": "^3.1.0", - "debug": "^3.0.0", - "execall": "^1.0.0", - "file-entry-cache": "^2.0.0", - "get-stdin": "^5.0.1", - "globby": "^7.0.0", - "globjoin": "^0.1.4", - "html-tags": "^2.0.0", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "known-css-properties": "^0.5.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "mathml-tag-names": "^2.0.1", - "meow": "^4.0.0", - "micromatch": "^2.3.11", - "normalize-selector": "^0.2.0", - "pify": "^3.0.0", - "postcss": "^6.0.6", - "postcss-html": "^0.12.0", - "postcss-less": "^1.1.0", - "postcss-media-query-parser": "^0.2.3", - "postcss-reporter": "^5.0.0", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^3.0.1", - "postcss-sass": "^0.2.0", - "postcss-scss": "^1.0.2", - "postcss-selector-parser": "^3.1.0", - "postcss-value-parser": "^3.3.0", - "resolve-from": "^4.0.0", - "specificity": "^0.3.1", - "string-width": "^2.1.0", - "style-search": "^0.1.0", - "sugarss": "^1.0.0", - "svg-tags": "^1.0.0", - "table": "^4.0.1" + "autoprefixer": "7.2.6", + "balanced-match": "1.0.0", + "chalk": "2.4.1", + "cosmiconfig": "3.1.0", + "debug": "3.1.0", + "execall": "1.0.0", + "file-entry-cache": "2.0.0", + "get-stdin": "5.0.1", + "globby": "7.1.1", + "globjoin": "0.1.4", + "html-tags": "2.0.0", + "ignore": "3.3.10", + "imurmurhash": "0.1.4", + "known-css-properties": "0.5.0", + "lodash": "4.17.10", + "log-symbols": "2.2.0", + "mathml-tag-names": "2.1.0", + "meow": "4.0.1", + "micromatch": "2.3.11", + "normalize-selector": "0.2.0", + "pify": "3.0.0", + "postcss": "6.0.23", + "postcss-html": "0.12.0", + "postcss-less": "1.1.5", + "postcss-media-query-parser": "0.2.3", + "postcss-reporter": "5.0.0", + "postcss-resolve-nested-selector": "0.1.1", + "postcss-safe-parser": "3.0.1", + "postcss-sass": "0.2.0", + "postcss-scss": "1.0.6", + "postcss-selector-parser": "3.1.1", + "postcss-value-parser": "3.3.0", + "resolve-from": "4.0.0", + "specificity": "0.3.2", + "string-width": "2.1.1", + "style-search": "0.1.0", + "sugarss": "1.0.1", + "svg-tags": "1.0.0", + "table": "4.0.2" }, "dependencies": { "cosmiconfig": { @@ -6011,10 +6012,10 @@ "integrity": "sha512-zedsBhLSbPBms+kE7AH4vHg6JsKDz6epSv2/+5XHs8ILHlgDciSJfSWf8sX9aQ52Jb7KI7VswUTsLpR/G0cr2Q==", "dev": true, "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^3.0.0", - "require-from-string": "^2.0.1" + "is-directory": "0.3.1", + "js-yaml": "3.12.0", + "parse-json": "3.0.0", + "require-from-string": "2.0.2" } }, "globby": { @@ -6023,12 +6024,12 @@ "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.10", + "pify": "3.0.0", + "slash": "1.0.0" } }, "parse-json": { @@ -6037,7 +6038,7 @@ "integrity": "sha1-+m9HsY4jgm6tMvJj50TQ4ehH+xM=", "dev": true, "requires": { - "error-ex": "^1.3.1" + "error-ex": "1.3.2" } }, "pify": { @@ -6066,16 +6067,19 @@ "integrity": "sha512-YQmvrpIly8chSZYQSDNYY1AbVF+yvYoXkXGgllUGRNLlSn2nra2kBtXlJ3KwkzPkn9/AWaohWVeqaZ7pkB8V6w==", "dev": true, "requires": { - "stylelint": "^8.2.0", - "stylelint-config-standard": "^18.0.0", - "stylelint-order": "^0.7.0" + "stylelint": "8.4.0", + "stylelint-config-standard": "18.2.0", + "stylelint-order": "0.7.0" } }, "stylelint-config-recommended": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-2.1.0.tgz", "integrity": "sha512-ajMbivOD7JxdsnlS5945KYhvt7L/HwN6YeYF2BH6kE4UCLJR0YvXMf+2j7nQpJyYLZx9uZzU5G1ZOSBiWAc6yA==", - "dev": true + "dev": true, + "rules": { + "font-family-no-missing-generic-family-keyword": false + } }, "stylelint-config-standard": { "version": "18.2.0", @@ -6083,7 +6087,7 @@ "integrity": "sha512-07x0TaSIzvXlbOioUU4ORkCIM07kyIuojkbSVCyFWNVgXMXYHfhnQSCkqu+oHWJf3YADAnPGWzdJ53NxkoJ7RA==", "dev": true, "requires": { - "stylelint-config-recommended": "^2.1.0" + "stylelint-config-recommended": "2.1.0" } }, "stylelint-order": { @@ -6092,9 +6096,9 @@ "integrity": "sha1-zqtcviSqM/pjWQAkmVOV9u38mrc=", "dev": true, "requires": { - "lodash": "^4.17.4", - "postcss": "^6.0.11", - "postcss-sorting": "^3.0.2" + "lodash": "4.17.10", + "postcss": "6.0.23", + "postcss-sorting": "3.1.0" } }, "sugarss": { @@ -6103,7 +6107,7 @@ "integrity": "sha512-3qgLZytikQQEVn1/FrhY7B68gPUUGY3R1Q1vTiD5xT+Ti1DP/8iZuwFet9ONs5+bmL8pZoDQ6JrQHVgrNlK6mA==", "dev": true, "requires": { - "postcss": "^6.0.14" + "postcss": "6.0.23" } }, "supports-color": { @@ -6112,7 +6116,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } }, "svg-tags": { @@ -6133,12 +6137,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" } }, "temp-dir": { @@ -6153,12 +6157,12 @@ "integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "is-stream": "^1.1.0", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "temp-dir": "^1.0.0", - "uuid": "^3.0.1" + "graceful-fs": "4.1.11", + "is-stream": "1.1.0", + "make-dir": "1.3.0", + "pify": "3.0.0", + "temp-dir": "1.0.0", + "uuid": "3.3.2" }, "dependencies": { "pify": { @@ -6181,8 +6185,8 @@ "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", "dev": true, "requires": { - "os-tmpdir": "^1.0.0", - "uuid": "^2.0.1" + "os-tmpdir": "1.0.2", + "uuid": "2.0.3" } }, "text-extensions": { @@ -6209,8 +6213,8 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "timed-out": { @@ -6225,7 +6229,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-fast-properties": { @@ -6276,7 +6280,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "typedarray": { @@ -6292,9 +6296,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" }, "dependencies": { "yargs": { @@ -6304,9 +6308,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } } @@ -6325,8 +6329,8 @@ "integrity": "sha512-+XZuV691Cn4zHsK0vkKYwBEwB74T3IZIcxrgn2E4rKwTfFyI1zCh7X7grwh9Re08fdPlarIdyWgI8aVB3F5A5g==", "dev": true, "requires": { - "inherits": "^2.0.1", - "xtend": "^4.0.1" + "inherits": "2.0.3", + "xtend": "4.0.1" } }, "unified": { @@ -6335,12 +6339,12 @@ "integrity": "sha512-1k+KPhlVtqmG99RaTbAv/usu85fcSRu3wY8X+vnsEhIxNP5VbVIDiXnLqyKIG+UMdyTg0ZX9EI6k2AfjJkHPtA==", "dev": true, "requires": { - "bail": "^1.0.0", - "extend": "^3.0.0", - "is-plain-obj": "^1.1.0", - "trough": "^1.0.0", - "vfile": "^2.0.0", - "x-is-string": "^0.1.0" + "bail": "1.0.3", + "extend": "3.0.2", + "is-plain-obj": "1.1.0", + "trough": "1.0.2", + "vfile": "2.3.0", + "x-is-string": "0.1.0" } }, "uniq": { @@ -6355,7 +6359,7 @@ "integrity": "sha512-nDl79mKpffXojLpCimVXnxhlH/jjaTnDuScznU9J4jjsaUtBdDbxmlc109XtcqxY4SDO0SwzngsxxW8DIISt1w==", "dev": true, "requires": { - "unist-util-is": "^2.0.0" + "unist-util-is": "2.1.2" } }, "unist-util-is": { @@ -6370,7 +6374,7 @@ "integrity": "sha512-GRi04yhng1WqBf5RBzPkOtWAadcZS2gvuOgNn/cyJBYNxtTuyYqTKN0eg4rC1YJwGnzrqfRB3dSKm8cNCjNirg==", "dev": true, "requires": { - "array-iterate": "^1.0.0" + "array-iterate": "1.1.2" } }, "unist-util-remove-position": { @@ -6379,7 +6383,7 @@ "integrity": "sha512-XxoNOBvq1WXRKXxgnSYbtCF76TJrRoe5++pD4cCBsssSiWSnPEktyFrFLE8LTk3JW5mt9hB0Sk5zn4x/JeWY7Q==", "dev": true, "requires": { - "unist-util-visit": "^1.1.0" + "unist-util-visit": "1.4.0" } }, "unist-util-stringify-position": { @@ -6394,7 +6398,7 @@ "integrity": "sha512-FiGu34ziNsZA3ZUteZxSFaczIjGmksfSgdKqBfOejrrfzyUy5b7YrlzT1Bcvi+djkYDituJDy2XB7tGTeBieKw==", "dev": true, "requires": { - "unist-util-visit-parents": "^2.0.0" + "unist-util-visit-parents": "2.0.1" } }, "unist-util-visit-parents": { @@ -6403,7 +6407,7 @@ "integrity": "sha512-6B0UTiMfdWql4cQ03gDTCSns+64Zkfo2OCbK31Ov0uMizEz+CJeAp0cgZVb5Fhmcd7Bct2iRNywejT0orpbqUA==", "dev": true, "requires": { - "unist-util-is": "^2.1.2" + "unist-util-is": "2.1.2" } }, "universalify": { @@ -6424,7 +6428,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "^1.0.1" + "prepend-http": "1.0.4" } }, "util-deprecate": { @@ -6445,8 +6449,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "value-equal": { @@ -6461,10 +6465,10 @@ "integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==", "dev": true, "requires": { - "is-buffer": "^1.1.4", + "is-buffer": "1.1.6", "replace-ext": "1.0.0", - "unist-util-stringify-position": "^1.0.0", - "vfile-message": "^1.0.0" + "unist-util-stringify-position": "1.1.2", + "vfile-message": "1.0.1" } }, "vfile-location": { @@ -6479,7 +6483,7 @@ "integrity": "sha512-vSGCkhNvJzO6VcWC6AlJW4NtYOVtS+RgCaqFIYUjoGIlHnFL+i0LbtYvonDWOMcB97uTPT4PRsyYY7REWC9vug==", "dev": true, "requires": { - "unist-util-stringify-position": "^1.1.1" + "unist-util-stringify-position": "1.1.2" } }, "warning": { @@ -6488,7 +6492,7 @@ "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.4.0" } }, "wcwidth": { @@ -6497,7 +6501,7 @@ "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", "dev": true, "requires": { - "defaults": "^1.0.3" + "defaults": "1.0.3" } }, "which": { @@ -6506,7 +6510,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -6521,7 +6525,7 @@ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "2.1.1" } }, "window-size": { @@ -6549,8 +6553,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "is-fullwidth-code-point": { @@ -6559,7 +6563,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "string-width": { @@ -6568,9 +6572,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -6587,7 +6591,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "write-file-atomic": { @@ -6596,9 +6600,9 @@ "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" } }, "write-json-file": { @@ -6607,12 +6611,12 @@ "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", "dev": true, "requires": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "pify": "^3.0.0", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.0.0" + "detect-indent": "5.0.0", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "pify": "3.0.0", + "sort-keys": "2.0.0", + "write-file-atomic": "2.3.0" }, "dependencies": { "pify": { @@ -6629,8 +6633,8 @@ "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { - "sort-keys": "^2.0.0", - "write-json-file": "^2.2.0" + "sort-keys": "2.0.0", + "write-json-file": "2.3.0" } }, "x-is-string": { @@ -6663,19 +6667,19 @@ "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", "dev": true, "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.3", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" }, "dependencies": { "camelcase": { @@ -6690,9 +6694,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" }, "dependencies": { "string-width": { @@ -6701,9 +6705,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -6714,7 +6718,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } } } @@ -6725,7 +6729,7 @@ "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { diff --git a/package.json b/package.json index c652fec844ca30b0504f668a112095c19b6b2a91..d08e78a1635e32d0de1843d970d9830bd8b9da18 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,7 @@ "start": "docker-compose up" }, "lint-staged": { - "*.js": [ - "prettier --write", - "git add" - ], + "*.js": ["prettier --write"], "*.css": "stylelint", "*.scss": "stylelint" }, @@ -49,12 +46,11 @@ "node": ">=8", "yarn": ">=1.2" }, - "workspaces": [ - "packages/*" - ], + "workspaces": ["packages/*"], "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } - } + }, + "dependencies": {} } diff --git a/packages/component-faraday-selectors/src/index.js b/packages/component-faraday-selectors/src/index.js index 3c48b4f1aaf15ce372a53952f776dd1049bb49bb..d51783f1446fedd11253274513411241b8fc01ad 100644 --- a/packages/component-faraday-selectors/src/index.js +++ b/packages/component-faraday-selectors/src/index.js @@ -115,6 +115,8 @@ export const authorCanViewReportsDetails = ( ) } +export const canInviteReviewersAsEiC = state => !currentUserIs(state, 'isEiC') + export const reviewersCanViewReviewerReports = ( state, collection = {}, @@ -303,7 +305,7 @@ export const canHEOnlyReject = (collection = {}) => { return canHEOnlyRejectStatuses.includes(status) } -const canEditManuscriptStatuses = ['draft', 'technicalChecks', 'inQA'] +const cannotEditManuscriptStatuses = ['withdrawn', 'rejected', 'accepted'] export const canEditManuscript = (state, collection = {}, fragment = {}) => { const isAdmin = currentUserIs(state, 'isAdmin') if ( @@ -313,7 +315,7 @@ export const canEditManuscript = (state, collection = {}, fragment = {}) => { return false const status = get(collection, 'status', 'draft') - return canEditManuscriptStatuses.includes(status) + return !cannotEditManuscriptStatuses.includes(status) } const canOverrideTechnicalChecksStatuses = ['technicalChecks', 'inQA'] diff --git a/packages/component-faraday-ui/src/ActionLink.js b/packages/component-faraday-ui/src/ActionLink.js index 05ad25cd28ff0ec15c333469b13f6ec6c16e9402..7da088b7f4222acd69206dd116a2e9ae64583ae5 100644 --- a/packages/component-faraday-ui/src/ActionLink.js +++ b/packages/component-faraday-ui/src/ActionLink.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import styled from 'styled-components' import { Link } from 'react-router-dom' import { withHandlers } from 'recompose' @@ -12,10 +13,13 @@ const ActionLink = ({ icon, size, onClick, + fontIcon, disabled, children, renderLink, - iconSize = 2, + paddingBottom, + paddingRight, + iconSize = 1.8, iconPosition = 'left', ...rest }) => ( @@ -26,6 +30,15 @@ const ActionLink = ({ {icon} </Icon> )} + {fontIcon && + (iconPosition === 'left' && ( + <FontIconButton + className={`${fontIcon} fontIconStyle`} + paddingBottom={paddingBottom} + paddingRight={paddingRight} + size={size} + /> + ))} {renderLink()} {icon && iconPosition === 'right' && ( @@ -33,9 +46,43 @@ const ActionLink = ({ {icon} </Icon> )} + {fontIcon && + (iconPosition === 'right' && ( + <FontIconButton + className={`${fontIcon} fontIconStyle`} + paddingBottom={paddingBottom} + paddingRight={paddingRight} + size={size} + /> + ))} </Root> ) +ActionLink.propTypes = { + /** Link/URL specifying where to navigate, outside or inside the app. + * If present the component will behave like a navigation link. */ + to: PropTypes.string, + /** What icon to be used. */ + icon: PropTypes.string, + /** Size of the icon. */ + iconSize: PropTypes.number, + /** Position of the icon. */ + iconPosition: PropTypes.oneOf(['left', 'right']), + /** Callback function fired when the component is clicked. */ + onClick: PropTypes.func, + /** If true the component will be disabled (can't be interacted with). */ + disabled: PropTypes.bool, +} + +ActionLink.defaultProps = { + iconSize: 2, + to: '', + disabled: true, + icon: '', + onClick: () => {}, + iconPosition: 'left', +} + export default withHandlers({ renderLink: ({ to, internal, disabled, onClick, size, children }) => () => { if (to && !internal) { @@ -73,6 +120,7 @@ const CustomLink = ExternalLink.withComponent(Link) const Root = styled.div` align-items: center; + justify-content: center; display: ${props => (props.to ? 'inline-flex' : 'flex')}; ${marginHelper}; @@ -80,9 +128,11 @@ const Root = styled.div` height: ${props => (props.height ? `${props.height}px` : 'max-content')}; width: max-content; - - & span { - padding-top: 5px; - } ` +const FontIconButton = styled.span` + padding-bottom: calc(${props => props.paddingBottom} * ${th('gridUnit')} / 2); + padding-right: calc(${props => props.paddingRight} * ${th('gridUnit')} / 2); + font-size: calc(${props => props.size} * ${th('gridUnit')}); +` + // #endregion diff --git a/packages/component-faraday-ui/src/ActionLink.md b/packages/component-faraday-ui/src/ActionLink.md index 0cd8d6bd08b1b05eb671aea9fac370142a1d8866..833522ce676de7d23217b3e9ebc804f843a38745 100644 --- a/packages/component-faraday-ui/src/ActionLink.md +++ b/packages/component-faraday-ui/src/ActionLink.md @@ -1,7 +1,9 @@ A clickable text button. ```js -<ActionLink onClick={() => console.log('I am clicked.')}>Default action</ActionLink> +<ActionLink onClick={() => console.log('I am clicked.')}> + Default action +</ActionLink> ``` A disabled text buton. @@ -24,7 +26,7 @@ A text button with an icon on the right. </ActionLink> ``` -A text link. +A navigation link. ```js <ActionLink icon="eye" iconPosition="right" to="https://www.google.com"> diff --git a/packages/component-faraday-ui/src/AppBar.js b/packages/component-faraday-ui/src/AppBar.js index 80dc030cc5b325b62bc929a143d3500009f3a948..22cf49c553cf64e99dc1c09f7195ddd7491032b5 100644 --- a/packages/component-faraday-ui/src/AppBar.js +++ b/packages/component-faraday-ui/src/AppBar.js @@ -1,5 +1,6 @@ import React, { Fragment } from 'react' import { get, once } from 'lodash' +import PropTypes from 'prop-types' import styled from 'styled-components' import { H2, Button } from '@pubsweet/ui' import { th } from '@pubsweet/ui-toolkit' @@ -7,13 +8,12 @@ import { compose, setDisplayName, withProps } from 'recompose' import { Item, Row, Text } from 'pubsweet-component-faraday-ui' const AppBar = ({ + fixed, logo: Logo, menu: Menu, createDraft, - canCreateDraft = true, - currentUser = {}, - fixed = true, - isSubmit, + canCreateDraft, + currentUser, autosave: Autosave, journal: { metadata: { backgroundImage } }, }) => ( @@ -28,7 +28,6 @@ const AppBar = ({ <Autosave /> </Item> {createDraft && - !isSubmit && currentUser.user && ( <Button data-test-id="new-manuscript" @@ -46,7 +45,7 @@ const AppBar = ({ </RightContainer> </Root> {!canCreateDraft && ( - <RibbonRow bgColor={th('colorInfo')} fixed={fixed}> + <RibbonRow fixed={fixed}> <Text pb={1 / 2} pt={1}> Your account is not confirmed. Please check your email. </Text> @@ -55,10 +54,30 @@ const AppBar = ({ </Fragment> ) +AppBar.propTypes = { + /** If true, it will be fixed at the top of the screen. */ + fixed: PropTypes.bool, + /** Logo that will be added to the fragment. */ + logo: PropTypes.func, + currentUser: PropTypes.shape({ + user: PropTypes.object, + isAuthenticated: PropTypes.bool, + }), + /** If false an error message will appear. */ + canCreateDraft: PropTypes.bool, + /** Pass the menu component. */ + menu: PropTypes.func, + /** Custom component that will be used as an autosave indicator. */ + autosave: PropTypes.func, +} + AppBar.defaultProps = { - autosave: () => <div />, + fixed: true, + currentUser: {}, + canCreateDraft: true, logo: () => <div />, menu: () => <div />, + autosave: () => <div />, } export default compose( @@ -117,7 +136,6 @@ const JournalBackground = styled.div` rgba(0, 0, 0, 0.05) ); ` - const Root = styled.div` align-items: center; background-color: ${th('appBar.colorBackground')}; @@ -140,6 +158,7 @@ const Root = styled.div` ` const RibbonRow = styled(Row)` + background-color: ${th('colorInfo')}; position: ${props => (props.fixed ? 'fixed' : 'relative')}; top: ${props => (props.fixed ? th('appBar.height') : '0')}; ` diff --git a/packages/component-faraday-ui/src/AppBar.md b/packages/component-faraday-ui/src/AppBar.md index 49d8caf19e0c34f49c73d564d41d0bee7c07a981..107dbbe75848be2c09398dcf1608fff58059dbf7 100644 --- a/packages/component-faraday-ui/src/AppBar.md +++ b/packages/component-faraday-ui/src/AppBar.md @@ -18,7 +18,7 @@ const autosave = { const HindawiLogo = () => ( <Logo onClick={() => console.log('Hindawi best publish!')} - title="Hindawi" + title="Anca" src="https://upload.wikimedia.org/wikipedia/en/thumb/c/ca/Hindawi.svg/1200px-Hindawi.svg.png" /> ) diff --git a/packages/component-faraday-ui/src/AppBarMenu.js b/packages/component-faraday-ui/src/AppBarMenu.js index e934d21a9157c99452a37e98a0b1f587d10f0690..6f50749532638e80ae63213be975ea1f96751ae0 100644 --- a/packages/component-faraday-ui/src/AppBarMenu.js +++ b/packages/component-faraday-ui/src/AppBarMenu.js @@ -1,6 +1,5 @@ import React from 'react' import { get } from 'lodash' -import { Icon } from '@pubsweet/ui' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { @@ -11,7 +10,7 @@ import { withStateHandlers, } from 'recompose' -import { Text } from './' +import { Text, IconButton } from './' const AppBarMenu = ({ goTo, @@ -25,9 +24,12 @@ const AppBarMenu = ({ <Root> <User data-test-id="admin-menu-button" onClick={toggleMenu}> <Text>{username}</Text> - <Icon secondary size={2}> - {expanded ? 'chevron-up' : 'chevron-down'} - </Icon> + <IconButton + fontIcon={expanded ? 'arrowUp' : 'arrowDown'} + ml={1} + secondary + size={2} + /> </User> {expanded && ( <Dropdown data-test-id="admin-menu-dropdown"> diff --git a/packages/component-faraday-ui/src/AuthorCard.js b/packages/component-faraday-ui/src/AuthorCard.js index 36f74f2d439a408fe6024014e11d409564fec1d4..59f4ebe247e23e81dd133c043997c3a0d06ed070 100644 --- a/packages/component-faraday-ui/src/AuthorCard.js +++ b/packages/component-faraday-ui/src/AuthorCard.js @@ -1,10 +1,18 @@ import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import { isNumber, get } from 'lodash' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { required } from 'xpub-validators' import { reduxForm, Field } from 'redux-form' -import { H3, ValidatedField, TextField, Checkbox, Spinner } from '@pubsweet/ui' +import { + H3, + Menu, + Spinner, + Checkbox, + TextField, + ValidatedField, +} from '@pubsweet/ui' import { compose, withState, @@ -12,10 +20,10 @@ import { withHandlers, setDisplayName, } from 'recompose' +import { withCountries } from 'pubsweet-component-faraday-ui' -import { MenuCountry } from 'pubsweet-component-faraday-ui' -import { Tag, Label, Row, Item, PersonInfo, IconButton, OpenModal } from './' import { validators } from './helpers' +import { Tag, Label, Row, Item, PersonInfo, IconButton, OpenModal } from './' const Empty = () => <div /> @@ -50,7 +58,7 @@ const AuthorTitle = ({ > {showModal => ( <IconButton - icon="trash-2" + fontIcon="deleteIcon" iconSize={2} onClick={showModal} right={48} @@ -61,7 +69,7 @@ const AuthorTitle = ({ )} <IconButton disabled={isAuthorEdit} - icon="edit-2" + fontIcon="editIcon" iconSize={2} onClick={toggleEditMode} right={8} @@ -72,7 +80,7 @@ const AuthorTitle = ({ <Fragment> <IconButton data-test-id="author-card-cancel" - icon="x-circle" + fontIcon="removeIcon" iconSize={2} onClick={toggleEditMode} right={48} @@ -86,7 +94,7 @@ const AuthorTitle = ({ <IconButton data-test-id="author-card-save" disabled={formSubmitting} - icon="check-circle" + fontIcon="saveIcon" iconSize={2} onClick={saveChanges} right={8} @@ -122,6 +130,7 @@ const AuthorTitle = ({ // #region AuthorEdit const AuthorEdit = ({ + countries, author, editMode, listIndex, @@ -188,7 +197,7 @@ const AuthorEdit = ({ <Label required>Country</Label> <ValidatedField component={input => ( - <MenuCountry {...input} placeholder="Please select" /> + <Menu {...input} options={countries} placeholder="Please select" /> )} data-test-id="author-card-country" name="country" @@ -200,6 +209,7 @@ const AuthorEdit = ({ // #endregion const EnhancedAuthorEdit = compose( + withCountries, withProps(({ author }) => ({ initialValues: author, })), @@ -278,6 +288,45 @@ const AuthorCard = ({ </Root> ) +AuthorCard.propTypes = { + /** The author details. */ + item: PropTypes.shape({ + email: PropTypes.string, + firstName: PropTypes.string, + lastName: PropTypes.string, + affiliation: PropTypes.string, + country: PropTypes.string, + }).isRequired, + /** Callback function fired when deleting an author after confirmation. + * @param {Author} author + * @returns A function that receives the modal properties as an argument. + * */ + deleteAuthor: PropTypes.func, + /** Whether the author is currently being edited. */ + isAuthorEdit: PropTypes.bool, + /** Callback function fired when editing an author. + * Called with the author's index or null when closing edit mode. + * @param {number} authorIndex + * */ + onEdit: PropTypes.func, // eslint-disable-line + /** Callback function fired when saving a new author. + * The added author is passed as a parameter. */ + saveNewAuthor: PropTypes.func, + /** Callback function fired when editing an author. + * @param {object} values + * @param {function} dispatch + * @param {object} props */ + authorEditorSubmit: PropTypes.func, +} + +AuthorCard.defaultProps = { + onEdit: null, + deleteAuthor: null, + isAuthorEdit: false, + saveNewAuthor: null, + authorEditorSubmit: null, +} + export default compose( withState('editMode', 'setEditMode', ({ item }) => item.id === 'newAuthor'), withHandlers({ @@ -290,6 +339,7 @@ export default compose( )(AuthorCard) // #region styles + const AuthorTags = styled.div` align-items: center; display: flex; diff --git a/packages/component-faraday-ui/src/AuthorCard.md b/packages/component-faraday-ui/src/AuthorCard.md index d71f220ff31a8cbcebb047beb6d1baf8bb7d7324..6496d159d89867168daf9ebeabfc6a0594a83d78 100644 --- a/packages/component-faraday-ui/src/AuthorCard.md +++ b/packages/component-faraday-ui/src/AuthorCard.md @@ -1,3 +1,5 @@ +A component that shows details about an author. It has two modes: a presentation mode and an edit mode. This component can be a part of a submission wizard as well as in a sortable list. + An author card. ```js @@ -11,12 +13,14 @@ const author = { } ;<div> <AuthorCard - onEdit={() => console.log('s-a dat click pe edit')} + onEdit={e => console.log('s-a dat click pe edit', e)} index={0} item={author} deleteAuthor={item => () => { console.log('delete author', item) }} + saveNewAuthor={(...args) => console.log('save new authot', args)} + authorEditorSubmit={(...args) => console.log('edit the author', args)} /> <AuthorCard onEdit={() => console.log('s-a dat click pe edit')} diff --git a/packages/component-faraday-ui/src/AuthorReply.js b/packages/component-faraday-ui/src/AuthorReply.js index 872a4be66501eac3ca9dcf4aadcb4c18d94178ad..e1b6cfff662ac36bcebc29d983b20a17a8fc19fb 100644 --- a/packages/component-faraday-ui/src/AuthorReply.js +++ b/packages/component-faraday-ui/src/AuthorReply.js @@ -1,9 +1,10 @@ -import React, { Fragment } from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' import { withProps } from 'recompose' import styled from 'styled-components' -import { th } from '@pubsweet/ui-toolkit' +import React, { Fragment } from 'react' import { DateParser } from '@pubsweet/ui' +import { th } from '@pubsweet/ui-toolkit' import { Label, Item, Row, Text, FileItem } from './' @@ -54,6 +55,22 @@ const AuthorReply = ({ )} </Root> ) +AuthorReply.propTypes = { + /** Reply of author. */ + replyContent: PropTypes.string, + /** Name of author that replied. */ + authorName: PropTypes.string, + /** Date of submitted reply. */ + submittedOn: PropTypes.number, + /** Reply File. */ + replyFile: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), +} +AuthorReply.defaultProps = { + replyContent: '', + replyFile: {}, + authorName: '', + submittedOn: Date.now(), +} export default withProps( ({ fragment: { authors, submitted }, authorReply }) => ({ diff --git a/packages/component-faraday-ui/src/AuthorTag.js b/packages/component-faraday-ui/src/AuthorTag.js index 1ac2a56a90bd18468d8235f90746e827801b37fc..9f9394ff8023473f2046f7ab104a6f09afb70b1e 100644 --- a/packages/component-faraday-ui/src/AuthorTag.js +++ b/packages/component-faraday-ui/src/AuthorTag.js @@ -1,7 +1,7 @@ import React from 'react' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' - +import PropTypes from 'prop-types' import Tag from './Tag' import Text from './Text' @@ -23,6 +23,29 @@ const AuthorTag = ({ </Root> ) +AuthorTag.propTypes = { + /** The author you want to be on the card. */ + author: PropTypes.shape({ + id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + firstName: PropTypes.string, + lastName: PropTypes.string, + isCorresponding: PropTypes.bool, + isSubmitting: PropTypes.bool, + affiliationNumber: PropTypes.number, + }), +} + +AuthorTag.defaultProps = { + author: { + id: undefined, + firstName: undefined, + lastName: undefined, + isCorresponding: undefined, + isSubmitting: undefined, + affiliationNumber: undefined, + }, +} + export default AuthorTag // #region styles diff --git a/packages/component-faraday-ui/src/AuthorTagList.js b/packages/component-faraday-ui/src/AuthorTagList.js index 5aea50c288cf1b4dde73988203438d07ad0264d5..724643ba05407c3b5a2401bdaad4058cdd7b260b 100644 --- a/packages/component-faraday-ui/src/AuthorTagList.js +++ b/packages/component-faraday-ui/src/AuthorTagList.js @@ -3,6 +3,7 @@ import { get } from 'lodash' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { compose, withProps, withStateHandlers } from 'recompose' +import PropTypes from 'prop-types' import { Row, @@ -42,13 +43,13 @@ const parseAffiliations = (authors = []) => ) const AuthorTagList = ({ - authors = [], + authors, affiliationList, - separator = `, `, - authorKey = 'id', - withTooltip = false, - withAffiliations = false, - showAffiliation = false, + separator, + authorKey, + withTooltip, + withAffiliations, + showAffiliation, toggleAffiliation, }) => ( <Root> @@ -112,6 +113,27 @@ export default compose( })), )(AuthorTagList) +AuthorTagList.propTypes = { + /** The identificator label that will be seen on the card. */ + authorKey: PropTypes.string, + /** All authors we want to be seen on the card. */ + authors: PropTypes.arrayOf(PropTypes.object), + /** Separator between authors. */ + separator: PropTypes.string, + /** Tooltip about author details. */ + withTooltip: PropTypes.bool, + /** Show authors affifiations. */ + withAffiliations: PropTypes.bool, +} + +AuthorTagList.defaultProps = { + authorKey: 'id', + authors: [], + separator: `, `, + withTooltip: false, + withAffiliations: false, +} + // #region styles const Root = styled.div` align-items: center; diff --git a/packages/component-faraday-ui/src/AuthorTagList.md b/packages/component-faraday-ui/src/AuthorTagList.md index 12ff3c606db6c3d514c2b94c31487707967aaf0a..d66972f14e463b8a3a75974fba87ea25d63af785 100644 --- a/packages/component-faraday-ui/src/AuthorTagList.md +++ b/packages/component-faraday-ui/src/AuthorTagList.md @@ -107,12 +107,14 @@ Use a different separator and key for mapping the authors. ```js const authors = [ { + id: 1, email: 'john.doe@gmail.com', firstName: 'John', lastName: 'Doe', isSubmitting: true, }, { + id: 2, email: 'michael.felps@gmail.com', firstName: 'Michael', lastName: 'Felps', @@ -120,6 +122,7 @@ const authors = [ isCorresponding: true, }, { + id: 3, email: 'barrack.obama@gmail.com', firstName: 'Barrack', lastName: 'Obama', diff --git a/packages/component-faraday-ui/src/AutosaveIndicator.js b/packages/component-faraday-ui/src/AutosaveIndicator.js index 10335b7e8305dfd6750c67a2195bfbd36a4b7544..03a3041f2e18a80e6301cb577011c03628df0f71 100644 --- a/packages/component-faraday-ui/src/AutosaveIndicator.js +++ b/packages/component-faraday-ui/src/AutosaveIndicator.js @@ -6,6 +6,7 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { Icon, Spinner } from '@pubsweet/ui' import { compose, setDisplayName, withStateHandlers } from 'recompose' +import PropTypes from 'prop-types' import Text from './Text' @@ -99,6 +100,14 @@ export default compose( setDisplayName('AutosaveIndicator'), )(AutosaveIndicator) +AutosaveIndicator.propTypes = { + /** Displays the status of the form, in progress, saved or error. */ + autosave: PropTypes.object, // eslint-disable-line +} + +AutosaveIndicator.defaultProps = { + autosave: {}, +} // #region styles const Root = styled.div` align-items: center; diff --git a/packages/component-faraday-ui/src/ContextualBox.js b/packages/component-faraday-ui/src/ContextualBox.js index cbf2761870c26c3740af9e34f12ec5281787566d..188d9a4a38cf3d9c215be5b1da47e778b5d41d68 100644 --- a/packages/component-faraday-ui/src/ContextualBox.js +++ b/packages/component-faraday-ui/src/ContextualBox.js @@ -1,5 +1,6 @@ import React from 'react' -import { has } from 'lodash' +import PropTypes from 'prop-types' +import { isUndefined } from 'lodash' import styled from 'styled-components' import { Icon, H3 } from '@pubsweet/ui' import { override, th } from '@pubsweet/ui-toolkit' @@ -34,7 +35,7 @@ const CustomHeader = ({ ) const ContextualBox = ({ label, children, rightChildren, ...props }) => - has(props, 'expanded') ? ( + !isUndefined(props.expanded) ? ( <ControlledAccordion header={CustomHeader} label={label} @@ -56,6 +57,28 @@ const ContextualBox = ({ label, children, rightChildren, ...props }) => export default ContextualBox +ContextualBox.propTypes = { + /** Label of the contextual box. */ + label: PropTypes.string, + /** Component or html to be rendered on the right side. */ + rightChildren: PropTypes.any, // eslint-disable-line + /** The state of the contextual box. If passed from a parent then the component + * is controlled and can be expanded/collapsed remotely. + */ + expanded: PropTypes.bool, // eslint-disable-line + /** Callback function used to control the state of the component. + * To be used together with the `expanded` prop. + */ + toggle: PropTypes.func, // eslint-disable-line +} + +ContextualBox.defaultProps = { + label: '', + rightChildren: undefined, + expanded: false, + toggle: () => {}, +} + // #region styles const Header = styled.div.attrs(props => ({ 'data-test-id': props['data-test-id'] || 'accordion-header', diff --git a/packages/component-faraday-ui/src/ContextualBox.md b/packages/component-faraday-ui/src/ContextualBox.md index a9c7114bd4eeea1d9cfd51e27ba3fc2a138f4a0c..9e48b6c95951eb92006ba960ff9e21c4f949e652 100644 --- a/packages/component-faraday-ui/src/ContextualBox.md +++ b/packages/component-faraday-ui/src/ContextualBox.md @@ -1,3 +1,7 @@ +*Component to show or hide it's children. Can be controlled from a parent component by passing the expanded state and toggle callback.* + +--- + A collapseable contextual box. ```js @@ -113,7 +117,7 @@ const MyRightComponent = ({ headLabel }) => ( </ContextualBox> ``` -A controlled ContextualBox. +A controlled ContextualBox. This is usually used together with the RemoteOpener component. ```js const MyRightComponent = () => <div>works like a charm!</div> diff --git a/packages/component-faraday-ui/src/DownloadZipFiles.js b/packages/component-faraday-ui/src/DownloadZipFiles.js index 8e5d34d7c4251e31d7acc0efc995e8562554d40d..b642de06304463105af4754056a7c7d65bed4e34 100644 --- a/packages/component-faraday-ui/src/DownloadZipFiles.js +++ b/packages/component-faraday-ui/src/DownloadZipFiles.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { Spinner } from '@pubsweet/ui' import { compose, withState } from 'recompose' import { Item } from 'pubsweet-component-faraday-ui' @@ -9,6 +10,7 @@ const DownloadZipFiles = ({ disabled, fetching, children, downloadFiles }) => ( <Item flex={0} justify="flex-end" + ml={1} mr={1} onClick={!disabled ? downloadFiles : null} > @@ -16,6 +18,17 @@ const DownloadZipFiles = ({ disabled, fetching, children, downloadFiles }) => ( </Item> ) +DownloadZipFiles.propTypes = { + /** Name for the downloaded archive file. */ + archiveName: PropTypes.string.isRequired, // eslint-disable-line + /** If the user is a reviewer. */ + isReviewer: PropTypes.bool, // eslint-disable-line +} + +DownloadZipFiles.defaultProps = { + isReviewer: false, +} + export default compose( withState('fetching', 'setFetching', false), withZipDownload, diff --git a/packages/component-faraday-ui/src/DragHandle.js b/packages/component-faraday-ui/src/DragHandle.js index 1964082471d1bf6fcc4770f6eda306bf6e078004..c8db71ce59009e871ba43371c4c76b405046dffa 100644 --- a/packages/component-faraday-ui/src/DragHandle.js +++ b/packages/component-faraday-ui/src/DragHandle.js @@ -1,25 +1,40 @@ import React from 'react' -import { Icon } from '@pubsweet/ui' +import PropTypes from 'prop-types' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' +import { ActionLink } from 'pubsweet-component-faraday-ui/src' import { marginHelper } from './styledHelpers' // icon not like in the design, but untill we + Pubsweet decide on an Icon // implementation that supports custom icons this will do. Jen is working on it const DragHandle = props => ( <Handle {...props}> - <Icon secondary size={2}> - menu - </Icon> + <DragIcon fontIcon="moveIcon" size={2.5} /> </Handle> ) DragHandle.displayName = 'DragHandle' +DragHandle.protoTypes = { + /** Designed size for icon */ + size: PropTypes.number, +} +DragHandle.defaultProps = { + size: 2, +} + export default DragHandle // #region styles +const DragIcon = styled(ActionLink)` + display: flex; + align-items: center; + justify-content: center; + color: ${th('colorSecondary')}; + font-size: calc(${th('gridUnit')} * 2.5); + cursor: move; +` const Handle = styled.div` align-self: stretch; align-items: center; diff --git a/packages/component-faraday-ui/src/EditorialReportCard.js b/packages/component-faraday-ui/src/EditorialReportCard.js index f43ddb1072b43579b889eaffcbe8b34226258e3d..649beafe62774e2832120318dedae476ce7d43bb 100644 --- a/packages/component-faraday-ui/src/EditorialReportCard.js +++ b/packages/component-faraday-ui/src/EditorialReportCard.js @@ -4,6 +4,7 @@ import { withProps, withHandlers, compose } from 'recompose' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { DateParser } from '@pubsweet/ui' +import PropTypes from 'prop-types' import { Label, Item, Row, Text, Tag } from './' import { getReportComments } from './helpers' @@ -24,11 +25,10 @@ const EditorialReportCard = ({ <Root> <Row justify="space-between" mb={2}> <Item vertical> - {editorRole === 'HE' ? ( - <Label mb={1 / 2}>Recommendation</Label> - ) : ( - <Label mb={1 / 2}>Decision</Label> - )} + <Label mb={1 / 2}> + {editorRole === 'HE' ? 'Recommendation' : 'Decision'} + </Label> + ) <Text>{recommendation}</Text> </Item> @@ -111,6 +111,35 @@ export default compose( ), )(EditorialReportCard) +EditorialReportCard.propTypes = { + /** Label that will be publicly viewed, for example, a message for the author will be seen by other roles also. */ + publicLabel: PropTypes.string, + /** Label that will only be viewed as private message, for example, by the Editorial Team. */ + privateLabel: PropTypes.string, + /** Message by editorial team and other information. */ + report: PropTypes.shape({ + id: PropTypes.string, + userId: PropTypes.string, + comments: PropTypes.arrayOf(PropTypes.object), + createdOn: PropTypes.number, + updatedOn: PropTypes.number, + submittedOn: PropTypes.number, + recommendation: PropTypes.string, + recommendationType: PropTypes.string, + reviewer: PropTypes.object, + }), + /** Object containing the list of recommendations. */ + journal: PropTypes.shape({ + recommendation: PropTypes.arrayOf(PropTypes.object), + }), +} + +EditorialReportCard.defaultProps = { + publicLabel: '', + privateLabel: '', + report: {}, + journal: {}, +} // #region styles const Root = styled.div` box-shadow: ${th('boxShadow')}; diff --git a/packages/component-faraday-ui/src/File.js b/packages/component-faraday-ui/src/File.js index 4c6014d3ef4286bc0559282c6cfbc49846704f42..c412621398d222e8d065a1983f007f103e0baa1e 100644 --- a/packages/component-faraday-ui/src/File.js +++ b/packages/component-faraday-ui/src/File.js @@ -7,7 +7,7 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { withProps, withHandlers, compose } from 'recompose' -import { Label, IconButton, Text } from './' +import { Label, Text, IconButton } from './' import { marginHelper } from './styledHelpers' const parseFileSize = size => { @@ -51,8 +51,8 @@ const FileItem = ({ </FileInfo> {hasPreview && ( <IconButton - icon="eye" - iconSize={2} + fontIcon="previewIcon" + iconSize={1.8} ml={1} mr={1} onClick={onPreview} @@ -61,8 +61,8 @@ const FileItem = ({ /> )} <IconButton - icon="download" - iconSize={2} + fontIcon="downloadIcon" + iconSize={1.8} ml={hasPreview ? 0 : 1} mr={1} onClick={onDownload} @@ -71,8 +71,8 @@ const FileItem = ({ /> {hasDelete && ( <IconButton - icon="trash" - iconSize={2} + fontIcon="deleteIcon" + iconSize={1.8} mr={1} onClick={onDelete} pt={1 / 2} @@ -91,11 +91,17 @@ FileItem.propTypes = { }).isRequired, /** Used when part of a sortable list. */ dragHandle: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), - /** Handler for the preview button. */ + /** Callback function fired when clicking the preview icon. + * @param {File} file + */ onPreview: PropTypes.func, - /** Handler for the download button. */ + /** Callback function fired when clicking the download icon. + * @param {File} file + */ onDownload: PropTypes.func, - /** Handler for the delete button. */ + /** Callback function fired when clicking the delete icon. + * @param {File} file + */ onDelete: PropTypes.func, } @@ -120,7 +126,7 @@ export default compose( // #region styles const Root = styled.div` - align-items: center; + align-items: baseline; background-color: ${th('colorBackgroundHue')}; box-shadow: ${({ shadow }) => (shadow ? th('boxShadow') : 'none')}; border-radius: ${th('borderRadius')}; diff --git a/packages/component-faraday-ui/src/FileSection.js b/packages/component-faraday-ui/src/FileSection.js index af022f6e5f62708b45a5460b8ce5bc456016553f..f0691d983e217cf913d1b23a0eadc81129ef2890 100644 --- a/packages/component-faraday-ui/src/FileSection.js +++ b/packages/component-faraday-ui/src/FileSection.js @@ -3,6 +3,7 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { FilePicker, Spinner } from '@pubsweet/ui' import { compose, withState, withHandlers, withProps } from 'recompose' +import PropTypes from 'prop-types' import { radiusHelpers } from './styledHelpers' import { withNativeFileDrop, withFileSectionDrop } from './helpers' @@ -109,6 +110,42 @@ const FileSection = ({ </Root> ) +FileSection.propTypes = { + /** Files that are uploaded. */ + files: PropTypes.arrayOf(PropTypes.object), + /** Error you get on uploading. */ + error: PropTypes.string, + /** Titles of manuscript, cover letter and supplimental files. */ + title: PropTypes.string, + /** Id of manuscript, cover letter and supplimental files. */ + listId: PropTypes.string, + /** Function used for draging and hovering over items. */ + moveItem: PropTypes.func, + /** Extensions allowed to be uploaded. */ + allowedFileExtensions: PropTypes.arrayOf(PropTypes.string), + /** Callback function fired when a file is picked. */ + onFilePick: PropTypes.func, + /** Callback function fired when preview icon is pressed. */ + onPreview: PropTypes.func, + /** Callback function fired when download icon is pressed. */ + onDownload: PropTypes.func, + /** Callback function fired when delete icon is pressed. */ + onDelete: PropTypes.func, +} + +FileSection.defaultProps = { + files: {}, + error: '', + title: '', + listId: '', + moveItem: () => {}, + allowedFileExtensions: [], + onFilePick: () => {}, + onPreview: () => {}, + onDownload: () => {}, + onDelete: () => {}, +} + export default compose( withState('error', 'setStateError', ''), withHandlers({ diff --git a/packages/component-faraday-ui/src/IconButton.js b/packages/component-faraday-ui/src/IconButton.js index ac1ef02ba87f4616ca9219694b41852b9bd1e5b5..a90bb4a130c2c4d4f00b1afd3fb3e8ac5db7fbce 100644 --- a/packages/component-faraday-ui/src/IconButton.js +++ b/packages/component-faraday-ui/src/IconButton.js @@ -1,6 +1,7 @@ import React from 'react' import { Icon } from '@pubsweet/ui' import styled from 'styled-components' +import { th } from '@pubsweet/ui-toolkit' import { positionHelper, marginHelper, paddingHelper } from './styledHelpers' const IconButton = styled.div` @@ -11,7 +12,7 @@ const IconButton = styled.div` opacity: ${props => (props.disabled ? 0.7 : 1)}; pointer-events: ${props => (props.unclickable ? 'none' : 'auto')}; &:hover { - opacity: 0.7; + opacity: ${props => (props.noHover ? 1 : 0.7)}; } &[disabled] { @@ -24,20 +25,49 @@ const IconButton = styled.div` export default ({ icon, + size, onClick, - unclickable, - iconSize = 3, + primary, + fontIcon, disabled, + unclickable, + paddingTop, + paddingRight, + paddingBottom, + iconSize = 1.8, + className, ...props }) => ( <IconButton + className={className} disabled={disabled} + display="inline" onClick={!disabled ? onClick : null} + primary={primary} unclickable={unclickable} {...props} > - <Icon size={iconSize} {...props}> - {icon} - </Icon> + {icon && ( + <Icon size={iconSize} {...props}> + {icon} + </Icon> + )} + {fontIcon && ( + <FontIconButton + className={`${fontIcon} fontIconStyle`} + paddingBottom={paddingBottom} + paddingRight={paddingRight} + paddingTop={paddingTop} + size={iconSize} + {...props} + /> + )} </IconButton> ) + +const FontIconButton = styled.span` + padding-bottom: calc(${props => props.paddingBottom} * ${th('gridUnit')} / 2); + padding-right: calc(${props => props.paddingRight} * ${th('gridUnit')} / 2); + padding-top: calc(${props => props.paddingTop} * ${th('gridUnit')} / 2); + font-size: calc(${props => props.size} * ${th('gridUnit')}); +` diff --git a/packages/component-faraday-ui/src/IconCard.js b/packages/component-faraday-ui/src/IconCard.js index dfcc72c8f4477473712b56e61f93e30502983b7b..a352471b4b75827f30e7f5a31363720b468c5ce4 100644 --- a/packages/component-faraday-ui/src/IconCard.js +++ b/packages/component-faraday-ui/src/IconCard.js @@ -6,7 +6,7 @@ import { IconButton, Label, marginHelper } from './' const IconCard = ({ label, icon, iconSize, onClick, ...rest }) => ( <Root onClick={onClick} {...rest}> - <IconButton icon={icon} iconSize={iconSize} primary /> + <IconButton icon={icon} iconSize={iconSize} /> <Label>{label}</Label> </Root> ) @@ -26,6 +26,9 @@ const Root = styled.div` height: calc(${th('gridUnit')} * 19); width: calc(${th('gridUnit')} * 26); + svg { + stroke: ${th('colorPrimary')}; + } ${marginHelper}; ` diff --git a/packages/component-faraday-ui/src/IconTooltip.js b/packages/component-faraday-ui/src/IconTooltip.js index 75c537efa65baf69aaa195e0948a815e32f304d7..391a27877849d6cd8ba5137924b546c5356ee2f2 100644 --- a/packages/component-faraday-ui/src/IconTooltip.js +++ b/packages/component-faraday-ui/src/IconTooltip.js @@ -2,6 +2,7 @@ import React, { Fragment } from 'react' import 'react-tippy/dist/tippy.css' import { Tooltip } from 'react-tippy' import { ThemeProvider, withTheme } from 'styled-components' +import PropTypes from 'prop-types' import { IconButton } from './' @@ -9,8 +10,8 @@ const IconTooltip = ({ theme, primary, interactive, - icon = 'help-circle', - iconSize = 3, + fontIcon = 'tooltipIcon', + iconSize = 2, ...rest }) => ( <Tooltip @@ -22,7 +23,13 @@ const IconTooltip = ({ theme="light" trigger="click" > - <IconButton icon={icon} iconSize={iconSize} mt={1 / 4} primary={primary} /> + <IconButton + fontIcon={fontIcon} + iconSize={iconSize} + mb={1 / 2} + ml={1} + primary={primary} + /> </Tooltip> ) @@ -31,5 +38,22 @@ const InfoTooltip = ({ theme, content }) => ( <Fragment>{typeof content === 'function' ? content() : content}</Fragment> </ThemeProvider> ) +IconTooltip.propTypes = { + /** What icon to be used. */ + icon: PropTypes.string, + /** Size of the icon. */ + iconSize: PropTypes.number, + /** What content to be used in tooltip. */ + content: PropTypes.func, + /** If true the content can be clicked (can be interacted with). */ + interactive: PropTypes.bool, +} + +IconTooltip.defaultProps = { + icon: 'help-circle', + iconSize: 2, + content: () => {}, + interactive: false, +} export default withTheme(IconTooltip) diff --git a/packages/component-faraday-ui/src/InviteReviewers.js b/packages/component-faraday-ui/src/InviteReviewers.js index 7f07b70cba1b4e7944aea14142d5bcd1632a1fad..69b113655a3b73e8e551b2190b7a731de9e414e0 100644 --- a/packages/component-faraday-ui/src/InviteReviewers.js +++ b/packages/component-faraday-ui/src/InviteReviewers.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { compose } from 'recompose' import styled from 'styled-components' import { reduxForm } from 'redux-form' @@ -94,6 +95,18 @@ const InviteReviewers = ({ handleSubmit, reset }) => ( </Root> ) +InviteReviewers.propTypes = { + /** Callback function fired after confirming a reviewer invitation. + * @param {Reviewer} reviewer + * @param {object} props + */ + onInvite: PropTypes.func, +} + +InviteReviewers.defaultProps = { + onInvite: () => {}, +} + export default compose( withFetching, withModal(({ isFetching, modalKey }) => ({ diff --git a/packages/component-faraday-ui/src/Label.js b/packages/component-faraday-ui/src/Label.js index 5cbdf06966b47836f257ec677c8189a858e99b83..635efd36c1a793d2d3a5ab4bd1445210d4dc063b 100644 --- a/packages/component-faraday-ui/src/Label.js +++ b/packages/component-faraday-ui/src/Label.js @@ -2,16 +2,25 @@ import React from 'react' import { H4 } from '@pubsweet/ui' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' +import PropTypes from 'prop-types' import { marginHelper } from './' -const Label = ({ children, required = false, ...rest }) => ( +const Label = ({ children, required, ...rest }) => ( <Root {...rest}> <H4>{children}</H4> {required && <Required>*</Required>} </Root> ) +Label.propTypes = { + /** If true the label is required. */ + required: PropTypes.bool, +} + +Label.defaultProps = { + required: false, +} export default Label // #region styles diff --git a/packages/component-faraday-ui/src/Logo.js b/packages/component-faraday-ui/src/Logo.js index 338312793bdfef4b08c3b3cdbe138e5591248392..ddc7b7b7a6ecefb1e4aa2f566d78e44efec512c5 100644 --- a/packages/component-faraday-ui/src/Logo.js +++ b/packages/component-faraday-ui/src/Logo.js @@ -2,8 +2,9 @@ import React from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' -const Logo = ({ src, onClick, title, height = 36, ...rest }) => ( +const Logo = ({ src, onClick, title, height, ...rest }) => ( <img alt={title} data-test-id={get(rest, 'data-test-id', 'journal-logo')} @@ -14,4 +15,12 @@ const Logo = ({ src, onClick, title, height = 36, ...rest }) => ( /> ) +Logo.propTypes = { + /** Height of the logo. */ + height: PropTypes.number, +} + +Logo.defaultProps = { + height: 36, +} export default Logo diff --git a/packages/component-faraday-ui/src/ManuscriptCard.js b/packages/component-faraday-ui/src/ManuscriptCard.js index 17e9e176354403406b6066cf5b09f589a9a93cfa..d3d8373014192d140a96096d06e6e7068aa0a9c9 100644 --- a/packages/component-faraday-ui/src/ManuscriptCard.js +++ b/packages/component-faraday-ui/src/ManuscriptCard.js @@ -4,8 +4,8 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { withJournal } from 'xpub-journal' import { H3, H4, DateParser } from '@pubsweet/ui' +import PropTypes from 'prop-types' import { compose, withHandlers, setDisplayName, withProps } from 'recompose' - import { Tag, Text, @@ -17,18 +17,20 @@ import { TextTooltip, AuthorTagList, ReviewerBreakdown, + DeleteManuscriptModal, } from './' - import { OpenModal } from './modals' const ManuscriptCard = ({ + isDraft, onDelete, - canDelete, isFetching, onCardClick, - canViewReports, fragment = {}, manuscriptType = {}, + canViewReports, + deleteManuscript, + canDeleteManuscript, collection: { visibleStatus = 'Draft', handlingEditor, customId, id: collId }, }) => { const { @@ -54,7 +56,7 @@ const ManuscriptCard = ({ <AuthorTagList authors={authors} withTooltip /> </Row> )} - <Row alignItems="center" justify="flex-start" mb={1}> + <Row alignItems="center" justify="flex-start"> {customId && <Text customId mr={1}>{`ID ${customId}`}</Text>} {submitted && ( <DateParser humanizeThreshold={0} timestamp={submitted}> @@ -73,7 +75,7 @@ const ManuscriptCard = ({ </Text> )} </Row> - <Row alignItems="center" justify="flex-start" mb={1}> + <Row alignItems="center" justify="flex-start"> <H4>Handling editor</H4> <Text ml={1} mr={3} whiteSpace="nowrap"> {get(handlingEditor, 'name', 'Unassigned')} @@ -84,7 +86,7 @@ const ManuscriptCard = ({ <ReviewerBreakdown fragment={fragment} label="Reviewer Reports" /> </Fragment> )} - {canDelete && ( + {isDraft && ( <Item justify="flex-end" onClick={e => e.stopPropagation()}> <OpenModal confirmText="Delete" @@ -94,27 +96,37 @@ const ManuscriptCard = ({ title="Are you sure you want to delete this submission?" > {showModal => ( - <ActionLink - height={16} - icon="trash" + <DeleteIcon + fontIcon="deleteIcon" onClick={showModal} - size="small" + paddingBottom={2} + paddingRight={0} + size={1.65} > Delete - </ActionLink> + </DeleteIcon> )} </OpenModal> </Item> )} + + {canDeleteManuscript && ( + <Item justify="flex-end" onClick={e => e.stopPropagation()}> + <DeleteManuscriptModal + collectionId={collId} + modalKey={`archive-${collId}`} + onSubmit={deleteManuscript} + /> + </Item> + )} </Row> </MainContainer> <SideNavigation> - <IconButton icon="chevron-right" iconSize={2} /> + <IconButton fontIcon="arrowRight" iconSize={2} pl={0.4} /> </SideNavigation> </Root> ) } - export default compose( withJournal, withHandlers({ @@ -131,13 +143,36 @@ export default compose( manuscriptType: get(journal, 'manuscriptTypes', []).find( t => t.value === get(metadata, 'type', ''), ), - canDelete: status === 'draft', + isDraft: status === 'draft', + isDeleted: status === 'deleted', }), ), + withProps(({ isAdmin, isDraft, isDeleted }) => ({ + canDeleteManuscript: isAdmin && !isDraft && !isDeleted, + })), setDisplayName('ManuscriptCard'), )(ManuscriptCard) - // #region styles + +ManuscriptCard.propTypes = { + fragment: PropTypes.shape({ + authors: PropTypes.arrayOf(PropTypes.object), + created: PropTypes.string, + submitted: PropTypes.number, + metadata: PropTypes.object, + }), // eslint-disable-line + collection: PropTypes.shape({ + customId: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), + visibleStatus: PropTypes.string, + handlingEditor: PropTypes.object, + }), // eslint-disable-line +} + +ManuscriptCard.defaultProps = { + fragment: {}, + collection: {}, +} + const MainContainer = styled.div` justify-content: flex-start; display: flex; @@ -147,7 +182,6 @@ const MainContainer = styled.div` padding-bottom: ${th('gridUnit')}; width: calc(100% - (${th('gridUnit')} * 5 / 2)); overflow: hidden; - ${Row} { [data-tooltipped] { overflow: hidden; @@ -165,6 +199,10 @@ const MainContainer = styled.div` } } ` +const DeleteIcon = styled(ActionLink)` + cursor: default; + color: ${th('colorWarning')}; +` const SideNavigation = styled.div` align-items: center; @@ -176,7 +214,6 @@ const SideNavigation = styled.div` display: flex; width: calc(${th('gridUnit')} * 5 / 2); ` - const Root = styled.div` background-color: #fff; border-radius: ${th('borderRadius')}; @@ -185,14 +222,11 @@ const Root = styled.div` display: flex; margin: calc(${th('gridUnit')} / 4) calc(${th('gridUnit')} / 4) ${th('gridUnit')} calc(${th('gridUnit')} / 4); - &:hover { box-shadow: ${th('dashboardCard.hoverShadow')}; } - ${H3} { margin: 0; margin-bottom: ${th('gridUnit')}; } ` -// #endregion diff --git a/packages/component-faraday-ui/src/ManuscriptCard.md b/packages/component-faraday-ui/src/ManuscriptCard.md index aea9f0e6cf26bc6bab8d474c0ae54b8ce88828ed..ad9fc06f5ca257832768e68a4ac1d2764613455a 100644 --- a/packages/component-faraday-ui/src/ManuscriptCard.md +++ b/packages/component-faraday-ui/src/ManuscriptCard.md @@ -3,12 +3,14 @@ A manuscript card. ```js const authors = [ { + id:1, email: 'john.doe@gmail.com', firstName: 'John', lastName: 'Doe', isSubmitting: true, }, { + id:2, email: 'michael.felps@gmail.com', firstName: 'Michael', lastName: 'Felps', @@ -16,70 +18,35 @@ const authors = [ isCorresponding: true, }, { + id:3, email: 'barrack.obama@gmail.com', firstName: 'Barrack', lastName: 'Obama', }, { + id:5, email: 'barrack.obama@gmail1.com', firstName: 'Barrack 1', lastName: 'Obama', }, { + id:6, email: 'barrack.obama@gmail2.com', firstName: 'Barrack 2', lastName: 'Obama', }, { + id:7, email: 'barrack.obama@gmail3.com', firstName: 'Barrack 3', lastName: 'Obama', }, { + id:8, email: 'barrack.obama@gmail4.com', firstName: 'Barrack 4', lastName: 'Obama', }, - { - email: 'barrack.obama@gmail5.com', - firstName: 'Barrack 5', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail6.com', - firstName: 'Barrack 6', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail7.com', - firstName: 'Barrack 7', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail8.com', - firstName: 'Barrack 8', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail9.com', - firstName: 'Barrack 9', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail10.com', - firstName: 'Barrack 10', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail11.com', - firstName: 'Barrack 11', - lastName: 'Obama', - }, - { - email: 'barrack.obama@gmail12.com', - firstName: 'Barrack 12', - lastName: 'Obama', - }, ] const collection = { diff --git a/packages/component-faraday-ui/src/Pagination.js b/packages/component-faraday-ui/src/Pagination.js index 2078907f8e0187f8b20c8c9849460b204a2ce58b..d2a7701279a675b0b890f5b87f4b48270546084a 100644 --- a/packages/component-faraday-ui/src/Pagination.js +++ b/packages/component-faraday-ui/src/Pagination.js @@ -1,4 +1,5 @@ import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import styled from 'styled-components' import { TextField } from '@pubsweet/ui' import { th } from '@pubsweet/ui-toolkit' @@ -22,42 +23,71 @@ const PaginationComponent = ({ </Text> <TextInput onChange={changeItemsPerPage} value={itemsPerPage} /> <Chevrons + className="arrowEndLeft" hide={page === 0} - icon="chevrons-left" iconSize={2} onClick={toFirst} + pb={0.5} + pr={2} + pl={1} /> <Chevrons + className="caratRight" hide={page === 0} - icon="chevron-left" iconSize={2} onClick={prevPage} + pb={0.5} + pr={2} /> <Label>{`${page * itemsPerPage + 1} to ${ hasMore ? itemsPerPage * (page + 1) : maxItems }`}</Label> <Chevrons + className="caratLeft" hide={!hasMore} - icon="chevron-right" iconSize={2} onClick={nextPage} + pb={0.5} + pl={2} /> <Chevrons + className="arrowEndRight" hide={!hasMore} - icon="chevrons-right" iconSize={2} onClick={toLast} + pb={0.5} + pl={2} /> </Root> ) -export const Pagination = ({ paginatedItems, children, ...props }) => ( +export const Pagination = ({ Items, children, ...props }) => ( <Fragment> <PaginationComponent {...props} /> - {typeof children === 'function' && children(paginatedItems, props)} + {typeof children === 'function' && children(Items, props)} </Fragment> ) +Pagination.propTypes = { + /** Page current number. */ + page: PropTypes.number, + /** Indicates if there are more pages to be displayed. */ + hasMore: PropTypes.bool, + /** Maximum items displayed. */ + maxItems: PropTypes.number, + /** Items displayed per page. */ + itemsPerPage: PropTypes.number, + /** Change how many items should be displayed per page. */ + changeItemsPerPage: PropTypes.func, +} +Pagination.defaultProps = { + page: 1, + hasMore: false, + maxItems: 23, + itemsPerPage: 10, + changeItemsPerPage: () => {}, +} + export default PaginationComponent // #region styles diff --git a/packages/component-faraday-ui/src/PasswordValidation.js b/packages/component-faraday-ui/src/PasswordValidation.js index 6dacbd6349dbae4446a0c68407b4d4d486dd6deb..bdf79b02204855bff5334a653b9b202b7c622453 100644 --- a/packages/component-faraday-ui/src/PasswordValidation.js +++ b/packages/component-faraday-ui/src/PasswordValidation.js @@ -51,8 +51,15 @@ const PasswordValidation = ({ </Item> </Row> - <Row alignItems="center" justify="flex-start" mb={-1 / 2}> - <IconButton icon="info" iconSize={2} ml={-1 / 2} primary unclickable /> + <Row alignItems="center" justify="flex-start"> + <IconButton + fontIcon="infoIcon" + iconSize={2} + mb={1 / 2} + mr={1 / 2} + primary + unclickable + /> <RulesTitle>The password must contain: </RulesTitle> </Row> @@ -120,14 +127,14 @@ PasswordValidation.propTypes = { atLeastOnePunctuation: PropTypes.bool, } PasswordValidation.defaultProps = { - formName: undefined, - formLabel: undefined, + formName: '', + formLabel: '', submitFailed: false, - minLength: undefined, - atLeastOneDigit: undefined, - atLeastOneUppercase: undefined, - atLeastOneLowerrcase: undefined, - atLeastOnePunctuation: undefined, + minLength: false, + atLeastOneDigit: false, + atLeastOneUppercase: false, + atLeastOneLowerrcase: false, + atLeastOnePunctuation: false, } export default compose( diff --git a/packages/component-faraday-ui/src/PersonInfo.js b/packages/component-faraday-ui/src/PersonInfo.js index 7d9ce203b0be1271292ab8bbdff4f35d4fbd3e7e..bca7e16d14205d77df66a82a8d41ed490821f4a1 100644 --- a/packages/component-faraday-ui/src/PersonInfo.js +++ b/packages/component-faraday-ui/src/PersonInfo.js @@ -1,19 +1,10 @@ import React from 'react' -import PropTypes from 'prop-types' import { withCountries } from 'pubsweet-component-faraday-ui' - +import PropTypes from 'prop-types' import { Text, Row, Label, Item } from './' -const defaultPerson = { - email: '', - firstName: '', - lastName: '', - affiliation: '', - country: '', -} - const PersonInfo = ({ - person: { email, firstName, lastName, affiliation, country } = defaultPerson, + person: { email, firstName, lastName, affiliation, country }, countryLabel, }) => ( <Row> @@ -39,8 +30,8 @@ const PersonInfo = ({ </Item> </Row> ) - -PersonInfo.proTypes = { +PersonInfo.propTypes = { + /** Person with information */ person: PropTypes.shape({ email: PropTypes.string, firstName: PropTypes.string, @@ -50,4 +41,14 @@ PersonInfo.proTypes = { }), } +PersonInfo.defaultProps = { + person: { + email: '', + firstName: '', + lastName: '', + affiliation: '', + country: '', + }, +} + export default withCountries(PersonInfo) diff --git a/packages/component-faraday-ui/src/PersonInvitation.js b/packages/component-faraday-ui/src/PersonInvitation.js index 492d7cbdab15ab168f2a84f8c470105d1b24bb15..941dfc6107ed7f79888958114537b17d8162483a 100644 --- a/packages/component-faraday-ui/src/PersonInvitation.js +++ b/packages/component-faraday-ui/src/PersonInvitation.js @@ -1,5 +1,6 @@ -import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import styled from 'styled-components' +import React, { Fragment } from 'react' import { compose, withHandlers, defaultProps, setDisplayName } from 'recompose' import { Text, OpenModal, IconButton, marginHelper, withFetching } from './' @@ -30,8 +31,8 @@ const PersonInvitation = ({ > {showModal => ( <IconButton - icon="refresh-cw" - iconSize={2} + fontIcon="resendIcon" + mb={1} ml={2} onClick={showModal} secondary @@ -48,8 +49,8 @@ const PersonInvitation = ({ > {showModal => ( <IconButton - icon="x-circle" - iconSize={2} + fontIcon="removeIcon" + mb={1} ml={2} onClick={showModal} secondary @@ -71,8 +72,8 @@ const PersonInvitation = ({ > {showModal => ( <IconButton - icon="x-circle" - iconSize={2} + fontIcon="removeIcon" + mb={1} ml={2} onClick={showModal} secondary @@ -84,6 +85,44 @@ const PersonInvitation = ({ </Root> ) +PersonInvitation.propTypes = { + /** Id of invitation. */ + id: PropTypes.string, + /** Type of invitation. */ + type: PropTypes.string, + /** Role of user. */ + role: PropTypes.string, + /** Reason written for review. */ + reason: PropTypes.string, + /** Id of user. */ + userId: PropTypes.string, + /** If user has left an answer or not. */ + hasAnswer: PropTypes.bool, + /** Date of invite. */ + invitedOn: PropTypes.number, + /** If user was accepted or not. */ + isAccepted: PropTypes.bool, + /** Date of user response. */ + respondedOn: PropTypes.number, + /** Details of person. */ + person: PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + }), +} +PersonInvitation.defaultProps = { + id: '', + role: '', + type: '', + reason: '', + userId: '', + hasAnswer: false, + invitedOn: Date.now(), + isAccepted: false, + respondedOn: Date.now(), + person: {}, +} + export default compose( defaultProps({ person: { diff --git a/packages/component-faraday-ui/src/PreviewFile.js b/packages/component-faraday-ui/src/PreviewFile.js index 0160f399096481ec2e82e4f810d7586c6e6358ca..747c357bce56f62209db5e65aa113093cd167609 100644 --- a/packages/component-faraday-ui/src/PreviewFile.js +++ b/packages/component-faraday-ui/src/PreviewFile.js @@ -1,8 +1,8 @@ -import React, { Fragment } from 'react' import { last } from 'lodash' +import React, { Fragment } from 'react' import { withProps, withHandlers, compose } from 'recompose' +import IconButton from './IconButton' -import { IconButton } from './' import { withFilePreview } from './helpers' const hasPreview = (name = '') => { @@ -14,10 +14,10 @@ const PreviewFile = ({ onPreview, hasPreview }) => ( <Fragment> {hasPreview && ( <IconButton - icon="eye" + fontIcon="previewIcon" iconSize={2} ml={1} - mr={1} + mr={2} onClick={onPreview} secondary /> diff --git a/packages/component-faraday-ui/src/PublonsTable.js b/packages/component-faraday-ui/src/PublonsTable.js index ce9f549473a84b3e60bda962f46054e93cefd1ef..c77945960d0e45eb9fa65c3bb1616ebfda4859bb 100644 --- a/packages/component-faraday-ui/src/PublonsTable.js +++ b/packages/component-faraday-ui/src/PublonsTable.js @@ -4,7 +4,7 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { Button, Spinner } from '@pubsweet/ui' import { compose, withHandlers, withProps } from 'recompose' - +import PropTypes from 'prop-types' import { Label, OpenModal, Text, withFetching, ActionLink } from '../' const TableView = ({ @@ -100,6 +100,17 @@ export default compose( }), )(PublonsTable) +TableView.propTypes = { + reviewers: PropTypes.arrayOf(PropTypes.object), + /** Sends an invitation to the reviewer. */ + onInviteReviewer: PropTypes.func, +} + +TableView.defaultProps = { + reviewers: [], + onInviteReviewer: () => {}, +} + // #region styles const Table = styled.table` border-collapse: collapse; diff --git a/packages/component-faraday-ui/src/PublonsTable.md b/packages/component-faraday-ui/src/PublonsTable.md index f692c2e4740672589b4ff386c06e1f13c180315e..bf7301a2e05b4e794ce16a8664bbd5095e5e009e 100644 --- a/packages/component-faraday-ui/src/PublonsTable.md +++ b/packages/component-faraday-ui/src/PublonsTable.md @@ -3,37 +3,26 @@ A list of publon reviewers. ```js const reviewers = [ { - id: 0, - email: 'email1@email.com', - publishingName: 'Name1', - recentOrganizations: { - name: 'Org1' - }, - numVerifiedReviews: '100' + name: 'Ursachi Anca', + email: 'anca@thinslices.com', + profileUrl: '', + affiliation: 'ts', + reviews: 10, }, { - id: 1, - email: 'email2@email.com', - publishingName: 'Name2', - recentOrganizations: { - name: 'Org2' - }, - numVerifiedReviews: '200' + name: 'Josh', + email: 'josh@thinslices.com', + profileUrl: '', + affiliation: 'ts', + reviews: 8, }, - { - id: 2, - email: 'email3@email.com', - publishingName: 'Name3', - recentOrganizations: { - name: 'Org3' - }, - numVerifiedReviews: '300' - }, -]; +] +;<PublonsTable + reviewers={reviewers} + onInviteReviwer={(reviewer, modalProps) => { + console.log('the reviewer', reviewer) -<PublonsTable reviewers={reviewers} onInviteReviwer={(reviewer, modalProps) => { - console.log('the reviewer', reviewer) - - modalProps.setModalError('avem eroare boss') -}}/> + modalProps.setModalError('avem eroare boss') + }} +/> ``` diff --git a/packages/component-faraday-ui/src/RadioWithComments.js b/packages/component-faraday-ui/src/RadioWithComments.js index 785149e94c2ca25bd7bc8b0ee30f21eb5e9b286f..d81a9cdc37c9bdb9a34c1714d3c49a86435c8e3d 100644 --- a/packages/component-faraday-ui/src/RadioWithComments.js +++ b/packages/component-faraday-ui/src/RadioWithComments.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { get } from 'lodash' import { Field } from 'redux-form' import styled from 'styled-components' @@ -75,6 +76,32 @@ const RadioWithComments = ({ </Root> ) +RadioWithComments.propTypes = { + /** Defines if a fragment is required or not. */ + required: PropTypes.bool, + /** Values taken by form. */ + formValues: PropTypes.object, //eslint-disable-line + /** Name of field selected after using radio buttons. */ + radioFieldName: PropTypes.string, + /** Name of comments field after radio buttons choice. */ + commentsFieldName: PropTypes.string, + /** Name of field that was commented on. */ + commentsOn: PropTypes.string, + /** Label name of the field that was commented on. */ + commentsLabel: PropTypes.string, + /** Name of radio label field on witch it was commented. */ + radioLabel: PropTypes.string, +} +RadioWithComments.defaultProps = { + required: false, + formValues: {}, + radioFieldName: '', + commentsFieldName: '', + commentsOn: '', + commentsLabel: '', + radioLabel: '', +} + export default RadioWithComments // #region styles diff --git a/packages/component-faraday-ui/src/RemoteOpener.js b/packages/component-faraday-ui/src/RemoteOpener.js index 44bcb785bdb7be2d1db3e3a9bab8f951c4e002c2..6681f273f4deb13d8e53cef076ce9a3f04e32461 100644 --- a/packages/component-faraday-ui/src/RemoteOpener.js +++ b/packages/component-faraday-ui/src/RemoteOpener.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import { withStateHandlers } from 'recompose' const RemoteOpener = ({ expanded, toggle, children }) => @@ -11,3 +12,15 @@ export default withStateHandlers( }), }, )(RemoteOpener) + +RemoteOpener.propTypes = { + /** Prop used together with toggle. */ + expanded: PropTypes.bool, + /** Callback function used to control the state of the component. + * To be used together with the `expanded` prop. + */ toggle: PropTypes.func, +} +RemoteOpener.defaultProps = { + expanded: false, + toggle: () => {}, +} diff --git a/packages/component-faraday-ui/src/ReviewerBreakdown.js b/packages/component-faraday-ui/src/ReviewerBreakdown.js index 7d257102a24dc7f39217f22b6c0529d800026247..8e51446107a345ca5776fe3558849127755ad2b9 100644 --- a/packages/component-faraday-ui/src/ReviewerBreakdown.js +++ b/packages/component-faraday-ui/src/ReviewerBreakdown.js @@ -1,11 +1,8 @@ import React from 'react' -import { get } from 'lodash' -import { compose, withHandlers, withProps } from 'recompose' +import PropTypes from 'prop-types' import { Text, Row } from './' -const ReviewerBreakdown = ({ getReportBreakdown }) => getReportBreakdown() - const roleFilter = role => i => i.role === role const submittedFilter = r => r.review && r.review.submittedOn const acceptedFilter = i => i.hasAnswer && i.isAccepted @@ -17,48 +14,58 @@ const reviewerReduce = (acc, r) => ({ submitted: submittedFilter(r) ? acc.submitted + 1 : acc.submitted, }) -export default compose( - withProps(({ fragment }) => ({ - invitations: get(fragment, 'invitations', []), - recommendations: get(fragment, 'recommendations', []), - })), - withHandlers({ - getReportBreakdown: ({ invitations, recommendations, ...rest }) => () => { - const reviewerInvitations = invitations.filter(roleFilter('reviewer')) - const invitationsWithRecommendations = reviewerInvitations.map(r => ({ - ...r, - review: recommendations.find(rec => rec.userId === r.userId), - })) - const report = invitationsWithRecommendations.reduce(reviewerReduce, { - accepted: 0, - declined: 0, - submitted: 0, - }) - return reviewerInvitations.length ? ( - <Row fitContent justify="flex-end" {...rest}> - <Text customId mr={1 / 2}> - {reviewerInvitations.length} - </Text> - <Text mr={1 / 2}> invited,</Text> +const ReviewerBreakdown = ({ + fragment: { invitations = [], recommendations = [] }, + ...rest +}) => { + const reviewerInvitations = invitations.filter(roleFilter('reviewer')) + const invitationsWithRecommendations = reviewerInvitations.map(r => ({ + ...r, + review: recommendations.find(rec => rec.userId === r.userId), + })) + const report = invitationsWithRecommendations.reduce(reviewerReduce, { + accepted: 0, + declined: 0, + submitted: 0, + }) + return reviewerInvitations.length ? ( + <Row fitContent justify="flex-end" {...rest}> + <Text customId mr={1 / 2}> + {reviewerInvitations.length} + </Text> + <Text mr={1 / 2}> invited,</Text> + + <Text customId mr={1 / 2}> + {report.accepted} + </Text> + <Text mr={1 / 2}> agreed,</Text> - <Text customId mr={1 / 2}> - {report.accepted} - </Text> - <Text mr={1 / 2}> agreed,</Text> + <Text customId mr={1 / 2}> + {report.declined} + </Text> + <Text mr={1 / 2}> declined,</Text> - <Text customId mr={1 / 2}> - {report.declined} - </Text> - <Text mr={1 / 2}> declined,</Text> + <Text customId mr={1 / 2}> + {report.submitted} + </Text> + <Text mr={1 / 2}> submitted</Text> + </Row> + ) : ( + <Text mr={1}>{`${reviewerInvitations.length} invited`}</Text> + ) +} - <Text customId mr={1 / 2}> - {report.submitted} - </Text> - <Text mr={1 / 2}> submitted</Text> - </Row> - ) : ( - <Text mr={1}>{`${reviewerInvitations.length} invited`}</Text> - ) - }, +ReviewerBreakdown.propTypes = { + fragment: PropTypes.shape({ + invitations: PropTypes.arrayOf(PropTypes.object), + recommendations: PropTypes.arrayOf(PropTypes.object), }), -)(ReviewerBreakdown) +} +ReviewerBreakdown.defaultProps = { + fragment: { + invitations: [], + recommendations: [], + }, +} + +export default ReviewerBreakdown diff --git a/packages/component-faraday-ui/src/ReviewerReport.js b/packages/component-faraday-ui/src/ReviewerReport.js index 36c67144b3e092102fe16e27a26c2228c0809402..ab0359a208c8e5b743bc97ebc29c0ffc74e1c3ba 100644 --- a/packages/component-faraday-ui/src/ReviewerReport.js +++ b/packages/component-faraday-ui/src/ReviewerReport.js @@ -1,13 +1,16 @@ import React, { Fragment } from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' import { withProps } from 'recompose' import styled from 'styled-components' -import { th } from '@pubsweet/ui-toolkit' import { DateParser } from '@pubsweet/ui' +import { th } from '@pubsweet/ui-toolkit' import { Label, Item, FileItem, Row, Text } from './' const ReviewerReport = ({ + journal, + showOwner, onPreview, onDownload, reportFile, @@ -17,7 +20,6 @@ const ReviewerReport = ({ reviewerName, reviewerNumber, recommendation, - showOwner = false, report: { submittedOn }, }) => ( <Root> @@ -92,6 +94,39 @@ export default withProps( }), )(ReviewerReport) +ReviewerReport.propTypes = { + /** True when you want to show reviewer name. */ + showOwner: PropTypes.bool, + /** Pass object with informations about the report. */ + report: PropTypes.shape({ + /** Unique id for report. */ + id: PropTypes.string, + /** Unique id for user. */ + userId: PropTypes.string, + /** Comments by reviewers. */ + comments: PropTypes.arrayOf(PropTypes.object), + /** When the comment was created. */ + createdOn: PropTypes.number, + /** When the comment was updated. */ + updatedOn: PropTypes.number, + /** When the comment was submited. */ + submittedOn: PropTypes.number, + /** The recommendation given by reviewer. */ + recommendation: PropTypes.string, + /** Type of recommendation. */ + recommendationType: PropTypes.string, + }), + /** Pass object with informations about recommendation. */ + journal: PropTypes.shape({ + recommendations: PropTypes.arrayOf(PropTypes.object), + }), +} + +ReviewerReport.defaultProps = { + showOwner: false, + report: {}, + journal: { recommendation: [] }, +} // #region styles const Root = styled.div` background-color: ${th('colorBackgroundHue')}; diff --git a/packages/component-faraday-ui/src/ReviewerReport.md b/packages/component-faraday-ui/src/ReviewerReport.md index 440b6a882e447344287e5db1a6383fd9de82e775..515b6e4651c6304a51ef780dce202c860497a98a 100644 --- a/packages/component-faraday-ui/src/ReviewerReport.md +++ b/packages/component-faraday-ui/src/ReviewerReport.md @@ -29,6 +29,7 @@ const report = { submittedOn: 1538053600624, recommendation: 'publish', recommendationType: 'review', + reviewerIndex: 1 } const journal = { diff --git a/packages/component-faraday-ui/src/ReviewerReportAuthor.js b/packages/component-faraday-ui/src/ReviewerReportAuthor.js index b921052a43f28c03404f823a5244fd301cbb19dc..c29d5e60c5df76bbe0d37288022508aa001033c0 100644 --- a/packages/component-faraday-ui/src/ReviewerReportAuthor.js +++ b/packages/component-faraday-ui/src/ReviewerReportAuthor.js @@ -1,21 +1,24 @@ import React, { Fragment } from 'react' import { get } from 'lodash' -import { withProps, compose } from 'recompose' +import PropTypes from 'prop-types' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { DateParser } from '@pubsweet/ui' +import { withProps, compose } from 'recompose' import { - Label, - Item, - FileItem, Row, Text, + Item, + Label, + FileItem, withFilePreview, withFileDownload, } from './' const ReviewerReportAuthor = ({ + journal, + showOwner, reviewFile, previewFile, downloadFile, @@ -23,7 +26,6 @@ const ReviewerReportAuthor = ({ reviewerName, reviewerNumber, recommendation, - showOwner = false, report: { submittedOn }, }) => ( <Root> @@ -82,6 +84,40 @@ export default compose( })), )(ReviewerReportAuthor) +ReviewerReportAuthor.propTypes = { + /** True when you want to show reviewer name. */ + showOwner: PropTypes.bool, + /** Pass object with informations about the report. */ + report: PropTypes.shape({ + /** Unique id for report. */ + id: PropTypes.string, + /** Unique id for user. */ + userId: PropTypes.string, + /** Comments by reviewers. */ + comments: PropTypes.arrayOf(PropTypes.object), + /** When the comment was created. */ + createdOn: PropTypes.number, + /** When the comment was updated. */ + updatedOn: PropTypes.number, + /** When the comment was submited. */ + submittedOn: PropTypes.number, + /** The recommendation given by reviewer. */ + recommendation: PropTypes.string, + /** Type of recommendation. */ + recommendationType: PropTypes.string, + }), + /** Pass object with informations about recommendation. */ + journal: PropTypes.shape({ + recommendations: PropTypes.arrayOf(PropTypes.object), + }), +} + +ReviewerReportAuthor.defaultProps = { + showOwner: false, + report: {}, + journal: { recommendation: [] }, +} + // #region styles const Root = styled.div` background-color: ${th('colorBackgroundHue')}; diff --git a/packages/component-faraday-ui/src/ReviewersTable.js b/packages/component-faraday-ui/src/ReviewersTable.js index e2197d20c406eeff827b6b4051f48062d7e7493e..1278bbf3199cec07cdbeba58842f0732021e817f 100644 --- a/packages/component-faraday-ui/src/ReviewersTable.js +++ b/packages/component-faraday-ui/src/ReviewersTable.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types' import React, { Fragment } from 'react' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' @@ -5,10 +6,11 @@ import { DateParser } from '@pubsweet/ui' import { get, isEqual, orderBy } from 'lodash' import { compose, shouldUpdate, withHandlers, withProps } from 'recompose' -import { Label, PersonInvitation, Text } from '../' +import { Label, PersonInvitation, Text } from './' const ReviewersTable = ({ - invitations, + currentUser, + invitations = [], getInvitationStatus, renderAcceptedLabel, onResendReviewerInvite, @@ -70,13 +72,14 @@ const ReviewersTable = ({ </DateParser> </td> <HiddenCell> - {!invitation.hasAnswer && ( - <PersonInvitation - {...invitation} - onResend={onResendReviewerInvite} - onRevoke={onRevokeReviewerInvite} - /> - )} + {!invitation.hasAnswer && + get(currentUser, 'permissions.canInviteReviewersAsEiC') && ( + <PersonInvitation + {...invitation} + onResend={onResendReviewerInvite} + onRevoke={onRevokeReviewerInvite} + /> + )} </HiddenCell> </TableRow> ))} @@ -94,6 +97,34 @@ const orderInvitations = i => { return 1 } +ReviewersTable.propTypes = { + /** Passes properties for invited reviewwers. */ + invitations: PropTypes.arrayOf( + PropTypes.shape({ + /** Reviewers unique id. */ + id: PropTypes.string, + /** Reviewers role. */ + role: PropTypes.string, + /** Type of invitation. */ + type: PropTypes.string, + /** Users unique id. */ + userId: PropTypes.string, + /** Reviewer has responded. */ + hasAnswer: PropTypes.bool, + /** Date of invite. */ + invitedOn: PropTypes.number, + /** Reviewer has accepted. */ + isAccepted: PropTypes.bool, + /** Date of the response. */ + respondedOn: PropTypes.number, + }), + ), +} + +ReviewersTable.defaultProps = { + invitations: [], +} + export default compose( shouldUpdate( ({ invitations }, { invitations: nextInvitations }) => diff --git a/packages/component-faraday-ui/src/ShadowedBox.js b/packages/component-faraday-ui/src/ShadowedBox.js index f30f7ef8a6e2d26597b9ce402ec378c83672d54d..87c2e1ea56867aedf8e12771afd14488a400ccaf 100644 --- a/packages/component-faraday-ui/src/ShadowedBox.js +++ b/packages/component-faraday-ui/src/ShadowedBox.js @@ -9,12 +9,12 @@ const width = props => css` width: calc(${th('gridUnit')} * ${get(props, 'width', 50)}); ` -export default styled.div.attrs({ - pt: props => get(props, 'pt', 2), - pr: props => get(props, 'pr', 2), - pb: props => get(props, 'pb', 2), - pl: props => get(props, 'pl', 2), -})` +export default styled.div.attrs(props => ({ + pt: get(props, 'pt', 2), + pr: get(props, 'pr', 2), + pb: get(props, 'pb', 2), + pl: get(props, 'pl', 2), +}))` background-color: ${th('colorBackgroundHue')}; border-radius: ${th('borderRadius')}; box-shadow: ${th('boxShadow')}; diff --git a/packages/component-faraday-ui/src/Tabs.js b/packages/component-faraday-ui/src/Tabs.js index a7d90025dcd5eb9ce1d48215b0da37319fe9dffa..0e7ebbb3387a529091414f7e288ad22e851456e1 100644 --- a/packages/component-faraday-ui/src/Tabs.js +++ b/packages/component-faraday-ui/src/Tabs.js @@ -1,8 +1,21 @@ +import PropTypes from 'prop-types' import { compose, withStateHandlers } from 'recompose' -const Tabs = ({ items, selectedTab, changeTab, children }) => +const Tabs = ({ items, selectedTab = 2, changeTab, children }) => children({ selectedTab, changeTab }) +Tabs.propTypes = { + /** The selected tab. */ + selectedTab: PropTypes.number, + /** Handler to change the tab. */ + changeTab: PropTypes.func, +} + +Tabs.defaultProps = { + selectedTab: 0, + changeTab: () => {}, +} + export default compose( withStateHandlers(({ selectedTab = 0 }) => ({ selectedTab }), { changeTab: () => selectedTab => ({ diff --git a/packages/component-faraday-ui/src/Tag.js b/packages/component-faraday-ui/src/Tag.js index fd6ce0316577b29f1ca95619cdd180a860209c54..a37711bc72e4b111633e26248693206ed87b530e 100644 --- a/packages/component-faraday-ui/src/Tag.js +++ b/packages/component-faraday-ui/src/Tag.js @@ -1,11 +1,12 @@ -import { has } from 'lodash' +import { get } from 'lodash' +import PropTypes from 'prop-types' import { th } from '@pubsweet/ui-toolkit' import styled, { css } from 'styled-components' import { marginHelper } from './styledHelpers' const tagCSS = props => { - if (has(props, 'oldStatus')) { + if (get(props, 'oldStatus')) { return css` background-color: ${th('colorFurnitureHue')}; height: calc(${th('gridUnit')} * 3) @@ -15,7 +16,7 @@ const tagCSS = props => { ` } - if (has(props, `status`)) { + if (get(props, `status`)) { return css` background-color: ${th('tag.statusBackgroundColor')}; padding: calc(${th('gridUnit')} / 4) ${th('gridUnit')}; @@ -35,7 +36,7 @@ const tagCSS = props => { } /** @component */ -export default styled.div` +const Tag = styled.div` border-radius: ${th('tag.borderRadius') ? th('tag.borderRadius') : th('borderRadius')}; @@ -52,3 +53,17 @@ export default styled.div` ${tagCSS}; ${marginHelper}; ` + +Tag.propTypes = { + /** Old status of the corresponding user. */ + oldStatus: PropTypes.bool, + /** New status of the corresponding user. */ + status: PropTypes.bool, +} + +Tag.defaultProps = { + oldStatus: false, + status: false, +} + +export default Tag diff --git a/packages/component-faraday-ui/src/Text.js b/packages/component-faraday-ui/src/Text.js index d8092434a6dc7f35fa449cd1ad801d5344e0ea26..5a21b6b2e540bc4d977e0d33729800b563624196 100644 --- a/packages/component-faraday-ui/src/Text.js +++ b/packages/component-faraday-ui/src/Text.js @@ -1,30 +1,31 @@ import React from 'react' -import { has, get } from 'lodash' +import { get } from 'lodash' +import PropTypes from 'prop-types' import { th } from '@pubsweet/ui-toolkit' import styled, { css } from 'styled-components' import { paddingHelper, marginHelper } from './styledHelpers' const textHelper = props => { - if (has(props, 'secondary')) { + if (get(props, 'secondary')) { return css` color: ${th('colorSecondary')}; font-family: ${th('fontReading')}; ` } - if (has(props, 'error')) { + if (get(props, 'error')) { return css` color: ${th('colorError')}; font-family: ${th('fontReading')}; ` } - if (has(props, 'customId')) { + if (get(props, 'customId')) { return css` color: ${th('colorPrimary')}; font-family: ${th('fontInterface')}; ` } - if (has(props, 'labelLine')) { + if (get(props, 'labelLine')) { return css` color: ${th('colorFurnitureHue')}; font-family: ${th('fontInterface')}; @@ -38,7 +39,7 @@ const textHelper = props => { } ` } - if (has(props, 'journal')) { + if (get(props, 'journal')) { return css` color: ${th('colorSecondary')}; font-family: ${th('fontReading')}; @@ -88,7 +89,7 @@ const Root = styled.div` display: flex; ` -export default ({ bullet, children, ...rest }) => +const Text = ({ bullet, children, ...rest }) => bullet ? ( <Root> <Bullet>{'\u2022'}</Bullet> @@ -97,3 +98,29 @@ export default ({ bullet, children, ...rest }) => ) : ( <StyledText {...rest}>{children}</StyledText> ) + +Text.propTypes = { + /** Default color for non-primary actions. */ + secondary: PropTypes.bool, + /** Default color for error actions. */ + error: PropTypes.bool, + /** Default style for the customId text. */ + customId: PropTypes.bool, + /** Default style for text used as a label Line. */ + labelLine: PropTypes.bool, + /** Default style used for journal text. */ + journal: PropTypes.bool, + /** Default style used for small text. */ + small: PropTypes.bool, +} + +Text.defaultProps = { + secondary: false, + error: false, + customId: false, + labelLine: false, + journal: false, + small: false, +} + +export default Text diff --git a/packages/component-faraday-ui/src/Text.md b/packages/component-faraday-ui/src/Text.md index a99cff36c791742b9c407ace98d9b794b34edf6c..18d57021692c02150f753822defcf8c3083d3f64 100644 --- a/packages/component-faraday-ui/src/Text.md +++ b/packages/component-faraday-ui/src/Text.md @@ -19,12 +19,24 @@ A secondary text. (Body 2) <Text secondary>my boy is amazing</Text> ``` +Error text. + +```js +<Text error>why error?</Text> +``` + A text used for manuscript custom IDs. ```js <Text customId>ID 444222</Text> ``` +A text used for journal. + +```js +<Text journal>text for journal</Text> +``` + A small text. ```js diff --git a/packages/component-faraday-ui/src/TextTooltip.js b/packages/component-faraday-ui/src/TextTooltip.js index 8bcd4cc0352c3754f269295dab914b7c3ed089aa..2c43317ee93a8e6ed19b25a9ae36113c3d2d0350 100644 --- a/packages/component-faraday-ui/src/TextTooltip.js +++ b/packages/component-faraday-ui/src/TextTooltip.js @@ -1,6 +1,7 @@ -import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import 'react-tippy/dist/tippy.css' import { Tooltip } from 'react-tippy' +import React, { Fragment } from 'react' import { Text, Row } from 'pubsweet-component-faraday-ui' import { ThemeProvider, withTheme } from 'styled-components' @@ -25,4 +26,13 @@ const TextTooltip = ({ theme = {}, children, ...rest }) => ( </Tooltip> ) +TextTooltip.propTypes = { + /** User can hover over an item, without clicking it, and a new window will appear with a new title */ + title: PropTypes.string, +} +TextTooltip.defaultProps = { + title: + 'β-Carboline Silver Compound Binding Studies with Human Serum Albumin: A Comprehensive Multispectroscopic Analysis and Molecular Modeling Study', +} + export default withTheme(TextTooltip) diff --git a/packages/component-faraday-ui/src/Textarea.js b/packages/component-faraday-ui/src/Textarea.js index 8013357da8409d4356a9da67367b7719a41c1d39..91fac36c2976228cb22b6c18c5db3ba91d40b9c5 100644 --- a/packages/component-faraday-ui/src/Textarea.js +++ b/packages/component-faraday-ui/src/Textarea.js @@ -1,4 +1,5 @@ import { get } from 'lodash' +import PropTypes from 'prop-types' import { th } from '@pubsweet/ui-toolkit' import styled, { css } from 'styled-components' @@ -33,6 +34,14 @@ const Textarea = styled.textarea` background-color: ${th('colorBackgroundHue')}; } ` +Textarea.propTypes = { + /** The minimum height that the text box should have */ + minHeight: PropTypes.number, +} + +Textarea.defaultProps = { + minHeight: 10, +} /** @component */ export default Textarea diff --git a/packages/component-faraday-ui/src/UserProfile.js b/packages/component-faraday-ui/src/UserProfile.js index e1bdc2074f60d3a1810ab5e1f595b1289b564c00..7c59dda1bef5d1d2c9f17c011966e9ca87666ca1 100644 --- a/packages/component-faraday-ui/src/UserProfile.js +++ b/packages/component-faraday-ui/src/UserProfile.js @@ -1,13 +1,14 @@ /* eslint-disable handle-callback-err */ -import React, { Fragment } from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' import styled from 'styled-components' import { reduxForm } from 'redux-form' +import React, { Fragment } from 'react' import { th } from '@pubsweet/ui-toolkit' +import { withCountries } from 'pubsweet-component-faraday-ui' import { required as requiredValidator } from 'xpub-validators' import { compose, withStateHandlers, withProps } from 'recompose' import { H3, Spinner, ValidatedField, TextField, Menu } from '@pubsweet/ui' -import { withCountries, MenuCountry } from 'pubsweet-component-faraday-ui' import { Row, @@ -30,9 +31,11 @@ const Profile = ({ }) => ( <ShadowedBox position="relative" {...rest}> <IconButton - icon="edit-2" + fontIcon="editIcon" iconSize={2} onClick={toggleEdit} + paddingRight={2} + paddingTop={1} right={8} top={12} /> @@ -86,14 +89,14 @@ const Profile = ({ const EditModeIcons = ({ toggleEdit, onSaveChanges }) => ( <Fragment> <IconButton - icon="x-circle" + fontIcon="removeIcon" iconSize={2} onClick={toggleEdit} right={36} top={12} /> <IconButton - icon="check-circle" + fontIcon="saveIcon" iconSize={2} onClick={onSaveChanges} right={8} @@ -179,9 +182,7 @@ const EditUserProfile = compose( <Item ml={1} vertical> <Label required>Country</Label> <ValidatedField - component={input => ( - <MenuCountry {...input} placeholder="Please select" /> - )} + component={input => <Menu {...input} options={countries} />} name="country" validate={[requiredValidator]} /> @@ -238,6 +239,72 @@ const UserProfile = ({ /> ) +UserProfile.propTypes = { + /** Passes journals label and value which will appear in the signature. */ + journal: PropTypes.shape({ + title: PropTypes.arrayOf( + PropTypes.shape({ + label: PropTypes.string, + value: PropTypes.string, + }), + ), + }), + /** Passes properties for the users profile */ + user: PropTypes.shape({ + /** Users unique id. */ + id: PropTypes.string, + /** Type of created account. */ + type: PropTypes.string, + /** Determine if account is admin ot not. */ + admin: PropTypes.bool, + /** Email used for user authentification. */ + email: PropTypes.string, + /** */ + teams: PropTypes.array, + /** Title of account userd. */ + title: PropTypes.string, + /** */ + agreeTC: PropTypes.bool, + /** Country of account user. */ + contry: PropTypes.string, + /** Status of account. */ + isActive: PropTypes.bool, + /** Last Name of accounts user. */ + lastName: PropTypes.string, + /** First name of accounts user. */ + username: PropTypes.string, + /** Account user first name. */ + firstName: PropTypes.string, + /** */ + fragments: PropTypes.array, + /** Accounts user affiliation. */ + affiliation: PropTypes.string, + /** */ + collection: PropTypes.array, + /** Determine if account is confirmed or not. */ + isConfirmed: PropTypes.bool, + /** Determine if account is editor in chief or not. */ + editorInChief: PropTypes.bool, + /** */ + notifications: PropTypes.shape({ + email: PropTypes.shape({ + user: PropTypes.bool, + system: PropTypes.bool, + }), + }), + + /** Determine if account is hendling editor or not. */ + handlingEditor: PropTypes.bool, + /** Users unique token */ + token: PropTypes.string, + }), +} + +UserProfile.defaultProps = { + journal: {}, + user: {}, +} + export default compose( withCountries, withStateHandlers( diff --git a/packages/component-faraday-ui/src/WizardAuthors.js b/packages/component-faraday-ui/src/WizardAuthors.js index b9dbdcf9a3f93948130124018c7777d1173b643e..6739fd1c16731963438485fe3b25bdfe8cf90f7b 100644 --- a/packages/component-faraday-ui/src/WizardAuthors.js +++ b/packages/component-faraday-ui/src/WizardAuthors.js @@ -1,5 +1,6 @@ -import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import styled from 'styled-components' +import React, { Fragment } from 'react' import { th } from '@pubsweet/ui-toolkit' import { omit, isBoolean, get } from 'lodash' import { compose, withState, withHandlers } from 'recompose' @@ -83,7 +84,7 @@ const WizardAuthors = ({ </Item> <Item justify="flex-end"> <ActionLink - icon="link" + fontIcon="linkIcon" iconPosition="right" to={get( journal, @@ -223,6 +224,36 @@ export default compose( }), )(WizardAuthors) +WizardAuthors.propTypes = { + /** List of authors. */ + authors: PropTypes.arrayOf(PropTypes.object), + /** Function used for draging authors. */ + moveAuthor: PropTypes.func, + /** Funtion used for adding new authors. */ + addNewAuthor: PropTypes.func, + /** Function used for deleting authors. */ + deleteAuthor: PropTypes.func, + /** Function used for selecting authors for edit. */ + setAuthorEdit: PropTypes.func, + /** Function used for saving new authors. */ + saveNewAuthor: PropTypes.func, + /** Function used for editing authors. */ + editExistingAuthor: PropTypes.func, + /** Function used for submiting authors. */ + authorEditorSubmit: PropTypes.func, +} + +WizardAuthors.defaultProps = { + authors: [], + moveAuthor: () => {}, + addNewAuthor: () => {}, + deleteAuthor: () => {}, + setAuthorEdit: () => {}, + saveNewAuthor: () => {}, + editExistingAuthor: () => {}, + authorEditorSubmit: () => {}, +} + // #region styles const SortableContainer = styled.div` background-color: ${th('colorBackground')}; diff --git a/packages/component-faraday-ui/src/WizardFiles.js b/packages/component-faraday-ui/src/WizardFiles.js index 9bd0591a7ff21c8ca020583682a8130d7b9da290..d93ddfe81f76b809d52d828a3dc03bc5952ecca0 100644 --- a/packages/component-faraday-ui/src/WizardFiles.js +++ b/packages/component-faraday-ui/src/WizardFiles.js @@ -1,4 +1,5 @@ import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import { get } from 'lodash' import { compose, withState, withHandlers } from 'recompose' @@ -18,6 +19,9 @@ const WizardFiles = ({ changeList, previewFile, downloadFile, + manuscripts, + coverLetter, + supplementary, }) => ( <Fragment> <FileSection @@ -75,6 +79,47 @@ const initialFiles = { supplementary: [], } +WizardFiles.propTypes = { + /** Fragments manuscript file. */ + manuscripts: PropTypes.arrayOf( + PropTypes.shape({ + /** Id of added manuscript file. */ + id: PropTypes.string, + /** Name of added manuscript file. */ + name: PropTypes.string, + /** Size of added manusript file. */ + size: PropTypes.number, + }), + ), + /** Fragments cover letter file. */ + coverLetter: PropTypes.arrayOf( + PropTypes.shape({ + /** Id of added cover letter file. */ + id: PropTypes.string, + /** Name of added cover letter file. */ + name: PropTypes.string, + /** Size of added cover letter file. */ + size: PropTypes.number, + }), + ), + /** Fragments supplementary file. */ + supplementary: PropTypes.arrayOf( + PropTypes.shape({ + /** Id of added cover letter file. */ + id: PropTypes.string, + /** Name of added cover letter file. */ + name: PropTypes.string, + /** Size of added cover letter file. */ + size: PropTypes.number, + }), + ), +} +WizardFiles.defaultProps = { + manuscripts: [], + coverLetter: [], + supplementary: [], +} + export default compose( withFilePreview, withFileDownload, diff --git a/packages/component-faraday-ui/src/contextualBoxes/AssignHE.js b/packages/component-faraday-ui/src/contextualBoxes/AssignHE.js index c65487c70d9df515d6ec66f630bbef8b429d6eac..decb41c06ba7d32b0a7e2202024d63a8901e55a6 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/AssignHE.js +++ b/packages/component-faraday-ui/src/contextualBoxes/AssignHE.js @@ -1,4 +1,5 @@ import React, { Fragment } from 'react' +import PropTypes from 'prop-types' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { Button, TextField } from '@pubsweet/ui' @@ -39,7 +40,7 @@ const AssignHE = ({ /> {searchValue !== '' && ( <IconButton - icon="x-circle" + fontIcon="removeIcon" iconSize={2} onClick={clearSearch} right={8} @@ -49,7 +50,7 @@ const AssignHE = ({ </TextContainer> {handlingEditors.length > 0 && ( <Fragment> - <Row alignItems="center" height={4} pl={1}> + <Row alignItems="center" height="4" pl={1}> <Item flex={1}> <Label>Name</Label> </Item> @@ -62,7 +63,7 @@ const AssignHE = ({ <CustomRow alignItems="center" data-test-id={`manuscript-assign-he-invite-${he.id}`} - height={4} + height="4" isFirst={index === 0} key={he.id} pl={1} @@ -96,6 +97,27 @@ const AssignHE = ({ </Root> ) +AssignHE.propTypes = { + /** Changes the search value to lowercase letters. */ + changeSearch: PropTypes.func, + /** The value of the search input box. */ + searchValue: PropTypes.string, + /** Clears the value of the search input box. */ + clearSearch: PropTypes.func, + /** The list of available handling editors. */ + handlingEditors: PropTypes.arrayOf(PropTypes.object), + /** Invites the selected handling editor. */ + inviteHandlingEditor: PropTypes.func, +} + +AssignHE.defaultProps = { + changeSearch: () => {}, + searchValue: '', + clearSearch: () => {}, + handlingEditors: [], + inviteHandlingEditor: () => {}, +} + export default compose( defaultProps({ inviteHandlingEditor: he => {}, @@ -134,7 +156,6 @@ export default compose( // #region styles const Root = styled.div` background-color: ${th('colorBackgroundHue2')}; - ${paddingHelper}; ` diff --git a/packages/component-faraday-ui/src/contextualBoxes/AssignHE.md b/packages/component-faraday-ui/src/contextualBoxes/AssignHE.md index afb5179bdb3cc399ebf0e287c177d7a8ed4fc620..7e25e7c077d80db952c67ded04d8063a479563b9 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/AssignHE.md +++ b/packages/component-faraday-ui/src/contextualBoxes/AssignHE.md @@ -2,12 +2,22 @@ Assign Handling Editor contextual box. ```js const handlingEditors = [ - { id: '1', name: 'Handling Edi', email: 'handling@edi.com' }, - { id: '2', name: 'Aurel Vlaicu', email: 'aurel@vlaicu.com' }, - { id: '3', name: 'Gheorghe Hagi', email: 'gica@hagi.com' }, -]; + { + id: '1', + firstName: 'Handling', + lastName: 'Edi', + email: 'handling@edi.com', + }, + { + id: '2', + firstName: 'Aurel', + lastName: 'Vlaicu', + email: 'aurel@vlaicu.com', + }, + { id: '3', firstName: 'Gheorghe', lastName: 'Hagi', email: 'gica@hagi.com' }, +] -<ContextualBox label="Assign Handling Editor"> +;<ContextualBox label="Assign Handling Editor"> <AssignHE handlingEditors={handlingEditors} inviteHandlingEditor={he => console.log('inviting: ', he)} diff --git a/packages/component-faraday-ui/src/contextualBoxes/AuthorReviews.js b/packages/component-faraday-ui/src/contextualBoxes/AuthorReviews.js index 696e8a4e405ca71b5e6844cfedf81994863060a2..aed0b39d26e55a8bcffc0b8b600db616a0038ea5 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/AuthorReviews.js +++ b/packages/component-faraday-ui/src/contextualBoxes/AuthorReviews.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { withProps, compose } from 'recompose' import { get } from 'lodash' @@ -51,6 +52,24 @@ const AuthorReviews = ({ </ContextualBox> ) +AuthorReviews.propTypes = { + /** The list of available reports. */ + reports: PropTypes.arrayOf(PropTypes.object), + /** Returns the url of the selected file. */ + getSignedUrl: PropTypes.func, + /** Object containing the list of recommendations. */ + journal: PropTypes.object, //eslint-disable-line + /** Contains the token of the currently logged user. */ + token: PropTypes.string, +} + +AuthorReviews.defaultProps = { + reports: [], + getSignedUrl: () => {}, + journal: {}, + token: '', +} + export default compose( withProps( ({ diff --git a/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.js b/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.js index 3eb14eb32d1a156f67e545557886f1366d14b0cf..a07bbeaff5aba8211741f81739d6efddba38db01 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.js +++ b/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { get, tail } from 'lodash' import { reduxForm } from 'redux-form' import styled from 'styled-components' @@ -78,11 +79,14 @@ const HERecommendation = ({ handleSubmit, formValues, highlight, + ...rest }) => ( <ContextualBox + expanded highlight={highlight} label="Your Editorial Recommendation" mb={2} + {...rest} > <Root> <Row justify="flex-start"> @@ -107,7 +111,6 @@ const HERecommendation = ({ /> </ItemOverrideAlert> </Row> - {get(formValues, 'recommendation') === 'minor' || get(formValues, 'recommendation') === 'major' ? ( <Row mt={2}> @@ -147,7 +150,6 @@ const HERecommendation = ({ </ResponsiveItem> </ResponsiveRow> )} - <Row justify="flex-end" mt={2}> <Button data-test-id="button-editorial-recommendation-submit" @@ -166,6 +168,24 @@ const HERecommendation = ({ </ContextualBox> ) +HERecommendation.propTypes = { + /* Contains the values of the form inputs */ + formValues: PropTypes.object, //eslint-disable-line + /* Handles the submission of the recommendation */ + handleSubmit: PropTypes.func, + /* Specifies if the fragment has reviewer reports */ + hasReviewerReports: PropTypes.bool, + /* Specifies if the contextual box should be highlighted */ + highlight: PropTypes.bool, +} + +HERecommendation.defaultProps = { + formValues: {}, + handleSubmit: () => {}, + hasReviewerReports: false, + highlight: false, +} + export default compose( withFetching, withModal(({ isFetching }) => ({ diff --git a/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.md b/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.md index 8d00e6a5fd7d66796ff780a4ddbc1d9adb172546..45874db4a4e567de25d688c774c6db4e596fc1ca 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.md +++ b/packages/component-faraday-ui/src/contextualBoxes/HERecommendation.md @@ -2,10 +2,37 @@ HE recommendation. ```js const formValues = { - recommendation: 'minor-revision', + recommendation: 'minor', } +const options = [ + { + value: 'publish', + label: 'Publish', + message: 'Recommend Manuscript for Publishing', + button: 'Submit Recommendation', + }, + { + value: 'reject', + label: 'Reject', + message: 'Recommend Manuscript for Rejection', + button: 'Submit Recommendation', + }, + { + value: 'minor', + label: 'Request Minor Revision', + message: 'Request Minor Revision', + button: 'Request Revision', + }, + { + value: 'major', + label: 'Request Major Revision', + message: 'Request Major Revision', + button: 'Request Revision', + }, +] ;<HERecommendation formValues={formValues} + options={options} modalKey="heRecommendation" onRecommendationSubmit={(values, props) => { props.setFetching(true) diff --git a/packages/component-faraday-ui/src/contextualBoxes/ResponseToRevisionRequest.js b/packages/component-faraday-ui/src/contextualBoxes/ResponseToRevisionRequest.js index cdb6ed72a1c30a89e4da9bb466549eec443ce1bd..9c74c2c383b25b3807ec72f3b2c2d55dcd821698 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/ResponseToRevisionRequest.js +++ b/packages/component-faraday-ui/src/contextualBoxes/ResponseToRevisionRequest.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { compose } from 'recompose' import { @@ -33,6 +34,22 @@ const ResponseToRevisionRequest = ({ </ContextualBox> ) +ResponseToRevisionRequest.propTypes = { + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Callback function used to control the state of the component. + * To be used together with the `expanded` prop. + */ + toggle: PropTypes.func, + /** Prop used together with toggle. */ + expanded: PropTypes.bool, +} +ResponseToRevisionRequest.defaultProps = { + fragment: {}, + toggle: () => {}, + expanded: false, +} + export default compose(withFilePreview, withFileDownload)( ResponseToRevisionRequest, ) diff --git a/packages/component-faraday-ui/src/contextualBoxes/ReviewerDetails.js b/packages/component-faraday-ui/src/contextualBoxes/ReviewerDetails.js index 987aa4a775f7eed363cfcfe0793c5e4baeb1468c..98434bfa2ea4ddad76bc4fc0c563756d0a85e9e9 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/ReviewerDetails.js +++ b/packages/component-faraday-ui/src/contextualBoxes/ReviewerDetails.js @@ -1,5 +1,6 @@ import React, { Fragment } from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' import { H4 } from '@pubsweet/ui' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' @@ -26,6 +27,7 @@ const ReviewerDetails = ({ reports = [], fragment, invitations, + currentUser, publonReviewers, isFetching, previewFile, @@ -41,6 +43,7 @@ const ReviewerDetails = ({ highlight, canViewReviewersDetails, authorCanViewReportsDetails, + canSeeReviewerSuggestionsTab, isLatestVersion, ...rest }) => ( @@ -65,7 +68,8 @@ const ReviewerDetails = ({ <H4>Reviewer Details</H4> </TabButton> {canInviteReviewers && - isLatestVersion && ( + isLatestVersion && + get(currentUser, 'permissions.canInviteReviewersAsEiC') && ( <TabButton data-test-id="reviewer-tab-suggestions" ml={1} @@ -91,7 +95,8 @@ const ReviewerDetails = ({ {selectedTab === 0 && ( <Fragment> {canInviteReviewers && - isLatestVersion && ( + isLatestVersion && + get(currentUser, 'permissions.canInviteReviewersAsEiC') && ( <InviteReviewers modalKey="invite-reviewers" onInvite={onInviteReviewer} @@ -99,6 +104,7 @@ const ReviewerDetails = ({ )} <ReviewersTable + currentUser={currentUser} invitations={invitations} onResendReviewerInvite={onResendReviewerInvite} onRevokeReviewerInvite={onRevokeReviewerInvite} @@ -106,7 +112,8 @@ const ReviewerDetails = ({ </Fragment> )} {selectedTab === 2 && - isLatestVersion && ( + isLatestVersion && + get(currentUser, 'permissions.canInviteReviewersAsEiC') && ( <PublonsTable onInvite={onInvitePublonReviewer} publonsError={fetchingError} @@ -139,6 +146,67 @@ const ReviewerDetails = ({ </ContextualBox> ) +ReviewerDetails.propTypes = { + /** Object containing the list of recommendations. */ + journal: PropTypes.object, //eslint-disable-line + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Specifies how many reviewers have been invited. */ + invitations: PropTypes.array, //eslint-disable-line + /** Array that contains publon reviewers. */ + publonReviewers: PropTypes.array, //eslint-disable-line + /** View content of the uploaded file. */ + previewFile: PropTypes.func, + /** Downloads the file from the server. */ + downloadFile: PropTypes.func, + /** Sends an invitation to the reviewer. */ + onInviteReviewer: PropTypes.func, + /** Reviewers reports. */ + reports: PropTypes.array, //eslint-disable-line + /** Sends an invitation to a Publon reviewer. */ + onInvitePublonReviewer: PropTypes.func, + /** Resends an invitation to an already invited. */ + onResendReviewerInvite: PropTypes.func, + /** Cancels an invitation to an invited reviewer. */ + onRevokeReviewerInvite: PropTypes.func, + /** Callback function used to control the state of the component. + * To be used together with the `expanded` prop. + */ + toggle: PropTypes.func, + /** Prop used together with toggle. */ + expanded: PropTypes.bool, + /* Specifies if the contextual box should be highlighted */ + highlight: PropTypes.bool, + /** Specifies if manuscript is at the latest version. */ + isLatestVersion: PropTypes.bool, + /** Specifies if we can invite reviewers on the current version. */ + canInviteReviewers: PropTypes.bool, + /** Specifies if we can view reviewers details on the current version. */ + canViewReviewersDetails: PropTypes.bool, + /** Specifies if the author can view reports details on the current version. */ + authorCanViewReportsDetails: PropTypes.func, +} +ReviewerDetails.defaultProps = { + journal: {}, + reports: [], + fragment: {}, + invitations: [], + publonReviewers: [], + previewFile: () => {}, + downloadFile: () => {}, + onInviteReviewer: () => {}, + onInvitePublonReviewer: () => {}, + onResendReviewerInvite: () => {}, + onRevokeReviewerInvite: () => {}, + toggle: () => {}, + expanded: false, + highlight: false, + canInviteReviewers: false, + canViewReviewersDetails: false, + authorCanViewReportsDetails: () => {}, + isLatestVersion: false, +} + export default compose( withFilePreview, withFileDownload, diff --git a/packages/component-faraday-ui/src/contextualBoxes/ReviewerReportForm.js b/packages/component-faraday-ui/src/contextualBoxes/ReviewerReportForm.js index 8d66da2f9edae85b6e2cb7236b5883f23136d0ce..ca2272dc2328e021f15ad86ca3217c010db612f1 100644 --- a/packages/component-faraday-ui/src/contextualBoxes/ReviewerReportForm.js +++ b/packages/component-faraday-ui/src/contextualBoxes/ReviewerReportForm.js @@ -81,7 +81,11 @@ const ReviewerReportForm = ({ </Item> <Item justify="flex-end"> - <ActionLink to="https://about.hindawi.com/authors/peer-review-at-hindawi/"> + <ActionLink + fontIcon="linkIcon" + iconPosition="right" + to="https://about.hindawi.com/authors/peer-review-at-hindawi/" + > Hindawi Reviewer Guidelines </ActionLink> </Item> diff --git a/packages/component-faraday-ui/src/gridItems/Item.js b/packages/component-faraday-ui/src/gridItems/Item.js index 060846c5310beecc5fb598646589fcfeff966b47..3314a5eda1525e86d2f22412ccb9f5623a06d28b 100644 --- a/packages/component-faraday-ui/src/gridItems/Item.js +++ b/packages/component-faraday-ui/src/gridItems/Item.js @@ -1,10 +1,11 @@ import { isNumber } from 'lodash' +import PropTypes from 'prop-types' import styled from 'styled-components' import { marginHelper, paddingHelper } from 'pubsweet-component-faraday-ui' /** @component */ -export default styled.div.attrs(props => ({ +const Item = styled.div.attrs(props => ({ 'data-test-id': props['data-test-id'] || 'item', }))` align-items: ${({ alignItems }) => alignItems || 'initial'}; @@ -17,3 +18,26 @@ export default styled.div.attrs(props => ({ ${marginHelper}; ${paddingHelper}; ` + +Item.propTypes = { + /** Defines how flex items are laid out along the secondary axis. */ + alignItems: PropTypes.string, + /** How much space should this item take relative to the other items. */ + flex: PropTypes.number, + /** Sets the flex direction. If true items are layed out in a column. */ + vertical: PropTypes.bool, + /** Sets whether flex items are forced onto one line or can wrap on multiple ones. */ + flexWrap: PropTypes.string, + /** Specifies alignment along the main axis. */ + justify: PropTypes.string, +} + +Item.defaultProps = { + alignItems: 'initial', + flex: 1, + vertical: false, + flexWrap: 'initial', + justify: 'initial', +} + +export default Item diff --git a/packages/component-faraday-ui/src/gridItems/Item.md b/packages/component-faraday-ui/src/gridItems/Item.md index f6f91b4d33f93f53be7c1257d2786a38dadc315b..60aa616a3d7c01496c47fb5f353bf9f529ef062a 100644 --- a/packages/component-faraday-ui/src/gridItems/Item.md +++ b/packages/component-faraday-ui/src/gridItems/Item.md @@ -7,6 +7,14 @@ An item. By default the content is displayed in a row. </Item> ``` +All items are wrapped into a flex container + +```js +<Item flex={1}> + <div>i m the only flex container</div> +</Item> +``` + Displayed in a column. ```js @@ -15,3 +23,33 @@ Displayed in a column. <span>I am at the bottom</span> </Item> ``` + +Items are aligned in their containing block + +```js +<Item alignItems="center" vertical> + <div>I m the first item</div> + <div>I m the second item</div> + <div>I m the third item</div> +</Item> +``` + +Long items wrap on the next row + +```js +<Item flexWrap="wrap"> + <div>wrap us together please, i m first, and i will be the longest to prove my point</div> + <div>wrap us together please, i m second</div> + <div>wrap us together please, i m last</div> +</Item> +``` + +Adds spaces between items + +```js +<Item justify="space-between"> + <div>group us from the left, i m first</div> + <div>group us from the left, i m second</div> + <div>group us from the left, i m last</div> +</Item> +``` diff --git a/packages/component-faraday-ui/src/gridItems/Row.js b/packages/component-faraday-ui/src/gridItems/Row.js index facd07a3a394b4a7fe79be1a3c88bb1b2dec9fe0..86bcafade7093e078865b478341eb64a03761a4b 100644 --- a/packages/component-faraday-ui/src/gridItems/Row.js +++ b/packages/component-faraday-ui/src/gridItems/Row.js @@ -1,10 +1,11 @@ import { get } from 'lodash' +import PropTypes from 'prop-types' import styled from 'styled-components' import { heightHelper, marginHelper, paddingHelper } from '../styledHelpers' /** @component */ -export default styled.div.attrs(props => ({ +const Row = styled.div.attrs(props => ({ 'data-test-id': props['data-test-id'] || 'row', }))` align-items: ${props => get(props, 'alignItems', 'flex-start')}; @@ -12,11 +13,31 @@ export default styled.div.attrs(props => ({ display: flex; flex-wrap: ${props => get(props, 'flexWrap', 'initial')}; justify-content: ${props => get(props, 'justify', 'space-evenly')}; - height: ${props => get(props, 'height', 'auto')}; - width: ${props => (props.fitContent ? 'fit-content' : '100%')}; + height: ${props => get(props, 'height', 'autp')}; ${heightHelper}; ${marginHelper}; ${paddingHelper}; ` + +Row.propTypes = { + /** Defines how flex items are laid out along the seconday axis. */ + alignItems: PropTypes.string, + /** Defines the background color. */ + bgColor: PropTypes.string, + /** Sets whether flex items are forced onto one line or can wrap on multiple ones. */ + flexWrap: PropTypes.string, + /** Specifies alignment along the main axis. */ + justifyContent: PropTypes.string, +} + +Row.defaultProps = { + alignItems: 'flex-start', + bgColor: 'transparent', + flexWrap: 'initial', + justifyContent: 'space-evenly', + height: '100%', +} + +export default Row diff --git a/packages/component-faraday-ui/src/gridItems/Row.md b/packages/component-faraday-ui/src/gridItems/Row.md index 77bcd1717adfaab12885fe3178df888070346276..c397c36e451ca563392a6b28bd5f87eeb13a39cd 100644 --- a/packages/component-faraday-ui/src/gridItems/Row.md +++ b/packages/component-faraday-ui/src/gridItems/Row.md @@ -2,8 +2,57 @@ A row of items. ```js <Row> - <Item>Item 1</Item> - <Item>Item 2</Item> - <div>Item 3</div> + <Item>Item 1</Item> + <Item>Item 2</Item> + <Item>Item 3</Item> </Row> -``` \ No newline at end of file +``` + +Items are aligned in their containing block + +```js +<Row alignItems="flex-start" vertical> + <Item>I m the first item</Item> + <Item>I m the second item</Item> + <Item>I m the third item</Item> +</Row> +``` + +Long items wrap on the next row + +```js +<Row flexWrap="wrap"> + <Item> + wrap us together please, i m first, and i will be the longest to prove my + point + </Item> + <Item>wrap us together please, i m second</Item> + <Item>wrap us together please, i m last</Item> +</Row> +``` + +Adds spaces between items + +```js +<Row justifyContent="space-evenly"> + <Item>group us from the left, i m first</Item> + <Item>group us from the left, i m second</Item> + <Item>group us from the left, i m last</Item> +</Row> +``` + +The height of an item is specified + +```js +<Row height="100%"> + <Item>this is an item</Item> +</Row> +``` + +Adds color to the row + +```js +<Row bgColor="aqua"> + <Item>this is an item</Item> +</Row> +``` diff --git a/packages/component-faraday-ui/src/helpers/README.md b/packages/component-faraday-ui/src/helpers/README.md new file mode 100644 index 0000000000000000000000000000000000000000..588a016a342b676e6bb207f4a2f87fe92da8e694 --- /dev/null +++ b/packages/component-faraday-ui/src/helpers/README.md @@ -0,0 +1,320 @@ +## Hindawi Helpers + +_Utility HOCs_ + +* [withCountries](#withcountries) +* [withFetching](#withfetching) +* [withFileDownload](#withfiledownload) +* [withFilePreview](#withfilepreview) +* [withPagination](#withpagination) +* [withRoles](#withroles) +* [withZipDownload](#withzipdownload) + +_HOCs used for files drag and drop_ + +* [withFileSectionDrop](#withfilesectiondrop) +* [withNativeFileDrop](#withnativefiledrop) + +_Utility functions_ + +* [handleError](#handleerror) + +# Utility HOCs + +## withCountries + +Injects `countries` and `countryLabel` as props. + +### withCountries props + +| Name | Type | Description | +| :----------- | :--------------------------------- | :-------------------------------------------------- | +| countries | `[{value: string, label: string}]` | the list of countries | +| countryLabel | `(code: string) => string` | get the name of the country with the specified code | + +```js +import { Menu } from '@pubsweet/ui' +import { withCountries } from 'pubsweet-component-faraday-ui' + +const Wrapped = ({ countries, countryLabel }) => ( + <div> + <Menu options={countries} placeholder="Select a country" /> + + <span>Selected country: {countryLabel('RO')}</span> + </div> +) + +export default withCountries(Wrapped) +``` + +## withFetching + +Injects `isFetching`, `fetchingError`, `setFetching`, `toggleFetching`, `setError` and `clearError` as props. + +### withFetching props + +| Name | Type | Description | +| :------------- | :----------------------- | :---------------------------------------------------------- | +| isFetching | `bool` | Pending async operation sattus | +| fetchingError | `fetchingError` | Value representing the error | +| setFetching | `(value: bool) => any` | Function for setting the `isFetching` value | +| toggleFetching | `(value: bool) => any` | Function that toggles the current value of `isFetching` | +| setError | `(error: string) => any` | Function that sets `fetchingError` | +| clearError | `() => any` | Function that resets `fetchingError` to it's original value | + +```js +import { withFetching } from 'pubsweet-component-faraday-ui' + +const Wrapped = ({ isFetching, fetchingError, setFetching, toggleFetching }) => ( + <div> + {isFetching && <span>I am fetching</span>} + <span>{`The error: ${fetchingError}`</span> + <button onClick={() => setFetching(true)}>Set fetching true</button> + <button onClick={() => setFetching(false)}>Set fetching false</button> + <button onClick={toggleFetching}>Toggle fetching</button> + </div> +) + +export default withFetching(Wrapped) +``` + +## withFileDownload + +Injects `downloadFile` as a prop. + +### withFileDownload props + +| Name | Type | Description | +| :----------- | :------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| downloadFile | `(file: {id: string, name: string}) => any` | Downloads the file specified as a parameter. The wrapped component should have the authentication token in a prop called `token` in order for this to work. | + +```js +import { FileItem, withFileDownload } from 'pubsweet-component-faraday-ui' + +const file = { + id: 'myfile', + name: 'myfile.pdf', + size: 100231, +} + +const Wrapped = ({ downloadFile }) => ( + <div> + <FileItem item={file} onDownload={downloadfile} /> + </div> +) + +export default withFileDownload(Wrapped) +``` + +## withFilePreview + +Generate a securized file URL and preview it in a new tab. Injects `previewFile` as a prop. + +This HOC assumes the following props are present on the wrapped component: + +| Name | Type | Description | +| :----------- | :--------------------------------------------- | :------------------------------------------------ | +| getSignedURL | `(id: string) => Promise({signedURL: string})` | Async call that returns the securized S3 file url | + +### withFilePreviewProps + +| Name | Type | Description | +| :---------- | :--------------------------------- | :--------------------------------------------------------------------------- | +| previewFile | `(file: {id: string, ...}) => any` | Opens the file preview in a new tab (only possible for PDF files and images) | + +```javascript +import { withProps } from 'recompose' +import { FileItem, withFilePreview Wrapped} from 'pubsweet-component-faraday-ui' + +const file = { + id: 'myfile', + name: 'myfile.pdf', + size: 100231, +} + +const Wrapped = ({ previewFile }) => ( + <div> + <FileItem item={file} onPreview={previewFile} /> + </div> +) + +export default withFilePreview(Wrapped) +``` + +## withPagination + +Injects `page`, `itemsPerPage`, `toFirst`, `nextPage`, `toLast`, `prevPage`, `changeItemsPerPage`, `hasMore`, `maxItems` and `paginatedItems` as props. + +### withPagination props + +| Name | Type | Description | +| :----------------- | :---------------------------------------------------------- | :------------------------------------ | +| page | `number` | Current page. | +| itemsPerPage | `number` | Number of items to be shown per page. | +| maxItems | `number` | Total number of items. | +| maxItems | `number` | Total number of items. | +| hasMore | `bool` | If we're not at the last page yet. | +| paginatedItems | `[any]` | Slice of the original items. | +| toFirst | `() => { page: number }` | Go to the first page. | +| toLast | `() => { page: number }` | Go to the last page. | +| nextPage | `() => { page: number }` | Move to the next page. | +| prevPage | `() => { page: number }` | Move to the previous page. | +| changeItemsPerPage | `e: HTMLInputEvent => {page: number, itemsPerPage: number}` | Change the number of items per page. | + +```js +import { withPagination } from 'pubsweet-component-faraday-ui' + +const Wrapped = ({ page, nextPage, prevPage, paginatedItems, changeItemsPerPage }) => ( + <div> + <span>Page {page}</span> + <button onClick={prevPage}>Prev page</button> + <button onClick={nextPage}>Next page</button> + <input type="text" onChange={changeItemsPerPage} /> + <div> + { + paginatedItems.map(p => <span>{p}<span>) + } + </div> + </div> +) + +export default withPagination(Wrapped) +``` + +## withRoles + +Injects the `roles` array as a prop. The roles are parsed from the journal config files. + +### withRoles props + +| Name | Type | Description | +| :---- | :--------------------------------- | :---------------------- | +| roles | `[{value: string, label: string}]` | An array of user roles. | + +```js +import { Menu } from '@pubsweet/ui' +import { withRoles } from 'pubsweet-component-faraday-ui' + +const Wrapped = ({ roles }) => <Menu options={roles} /> + +export default withRoles(Wrapped) +``` + +## withZipDownload + +Downloads all the files of a fragment as a zip archive. Injects the `downloadFiles` function as a prop. + +This HOCs assumes the following props are present on the wrapped component: + +| Name | Type | Description | +| :---------- | :--------------------- | :----------------------------------------------------- | +| token | `string` | Authentication token (used to authorize this request). | +| isReviewer | `bool` | If the user is reviewer. | +| fragmentId | `string` | Id of the fragment whose files we want to download. | +| setFetching | `(value: bool) => any` | Callback to set a fetching status. | +| archiveName | `string` | Name of the outputted archive file. | + +### withZipDownload props + +| Name | Type | Description | +| :------------ | :---------------- | :----------------------------------------- | +| downloadFiles | `strin() => anyg` | Download all the fragment's file as a zip. | + +# Files drag and drop + +## withFileSectionDrop + +HOC used to provide drop functionality to the `FileSection` component. It's main purpose is to change a file from one list to another. This is usually done in a callback called `changeList` that should be provided to the wrapped component. + +This HOC assumes the wrapped component has the following props: + +| Name | Type | Description | +| :-------------------- | :-------------------------------------------------------------- | :------------------------------------------------- | +| files | `[{id: string, ...}]` | List of files passed to the wrapped component. | +| setError | `(error: string) => any` | Error setting callback. | +| listId | `string` | Current list id. | +| allowedFileExtensions | `[string]` | Allowed file types. | +| maxFiles | `number` | Maximum number of files allowed. | +| changeList | `(fromListId: string, toListId: string: fileId: string) => any` | Callback fired when moving the file to a new list. | + +```js +import { compose, withHandler, withProps } from 'recompose' +import { FileSection, withFileSectionDrop } from 'pubsweet-component-faraday-ui' + +const Wrapped = compose( + withProps({ + files: [...], + listId: 'CoverLetter', + maxFiles: 3, + allowedFileExtensions: ['pdf'], + }), + withHandlers({ + changeList: () => (fromListId, toListId, fileId) => { + // do the actual change here + } + }), + withFileSectionDrop, +)(FileSection) + +export default Wrapped +``` + +## withNativeFileDrop + +HOC used to provide native file drop functionality to the `FileSection` component. It's purpose is to do something when dragging files from the computer's hard drive into the app. _This HOC allows only single items! Dragging multiple items into the wrapped component will only handle the first item!_ + +This HOC assumes the wrapped component has the following props: + +| Name | Type | Description | +| :-------------------- | :----------------------- | :--------------------------------------------- | +| files | `[{id: string, ...}]` | List of files passed to the wrapped component. | +| setError | `(error: string) => any` | Error setting callback. | +| allowedFileExtensions | `[string]` | Allowed file types. | +| maxFiles | `number` | Maximum number of files allowed. | +| onFileDrop | `(file: File) => any` | Callback fired when a valid file is dropped. | + +```js +import { compose, withHandler, withProps } from 'recompose' +import { FileSection, withNativeFileDrop } from 'pubsweet-component-faraday-ui' + +const Wrapped = compose( + withProps({ + files: [...], + listId: 'CoverLetter', + maxFiles: 3, + allowedFileExtensions: ['pdf'], + }), + withHandlers({ + onFileDrop: () => file => { + // do something with the dropped file + } + }), + withNativeFileDrop, +)(FileSection) + +export default Wrapped +``` + +# Utility functions + +## handleError + +Function that parses the server error. Calls the passed function with the parsed error. + +Has the following signature: +`(callbackFn: (parsedError) => any) => (e: Error) => any` + +```js +const customErrorLogger = parsedError => + console.error(`This is very handled: ${parsedError}`) + +// point free notation +anAsyncOperation().catch(handleError(customErrorLogger)) + +// can be used besides other function calls + +anAsyncOperation().catch(err => { + setFetching(false) + handleError(customErrorLogger)(err) +}) +``` diff --git a/packages/component-faraday-ui/src/manuscriptDetails/DeleteManuscriptModal.js b/packages/component-faraday-ui/src/manuscriptDetails/DeleteManuscriptModal.js new file mode 100644 index 0000000000000000000000000000000000000000..514a206200203e8dc3fd17da0763e4e7337caf91 --- /dev/null +++ b/packages/component-faraday-ui/src/manuscriptDetails/DeleteManuscriptModal.js @@ -0,0 +1,114 @@ +import React, { Fragment } from 'react' +import styled from 'styled-components' +import { compose } from 'recompose' +import { reduxForm } from 'redux-form' +import { th } from '@pubsweet/ui-toolkit' +import { required } from 'xpub-validators' +import { H2, Button, ValidatedField, TextArea, Spinner } from '@pubsweet/ui' +import { + Row, + Text, + Label, + IconButton, + OpenModal, + ActionLink, + ItemOverrideAlert, + withFetching, +} from 'pubsweet-component-faraday-ui' + +const Form = compose( + withFetching, + reduxForm({ + form: 'deleteManuscript', + }), +)(({ fetchingError, hideModal, handleSubmit, isFetching }) => ( + <Root> + <IconButton + icon="x" + iconSize={2} + onClick={hideModal} + right={5} + secondary + top={5} + /> + <H2 ml={4} mr={4}> + Are you sure you want to remove this manuscript? + </H2> + + <Row mt={2}> + <ItemOverrideAlert data-test-id="manuscript-return-reason" vertical> + <Label required> + Reason for removing the manuscript from the platform: + </Label> + <ValidatedField + component={TextArea} + name="comments" + style={{ 'max-width': '440px', 'min-width': '440px' }} + validate={[required]} + /> + </ItemOverrideAlert> + </Row> + {fetchingError && ( + <Text align="center" error mt={1}> + {fetchingError} + </Text> + )} + <Row mt={3}> + {isFetching ? ( + <Spinner size={3} /> + ) : ( + <Fragment> + <Button data-test-id="modal-cancel" onClick={hideModal}> + NO + </Button> + <Button data-test-id="modal-confirm" onClick={handleSubmit} primary> + OK + </Button> + </Fragment> + )} + </Row> + </Root> +)) +const DeleteManuscriptModal = props => ( + <OpenModal component={Form} {...props}> + {showModal => ( + <DeleteIcon + fontIcon="deleteIcon" + onClick={showModal} + paddingBottom={2} + paddingRight={0} + size={1.65} + > + Delete + </DeleteIcon> + )} + </OpenModal> +) + +export default DeleteManuscriptModal + +DeleteManuscriptModal.defaultProps = { + onSubmit: () => {}, + collectionId: 'santa-claus', + modalKey: 'deleteManuscriptModal', +} + +// #region styles +const DeleteIcon = styled(ActionLink)`` +const Root = styled.div` + align-items: center; + background: ${th('colorBackgroundHue')}; + border: ${th('borderWidth')} ${th('borderStyle')} transparent; + border-radius: ${th('borderRadius')}; + box-shadow: ${th('boxShadow')}; + display: flex; + flex-direction: column; + position: relative; + padding: calc(${th('gridUnit')} * 5); + width: calc(${th('gridUnit')} * 65); + + ${H2} { + text-align: center; + } +` +// #endregion diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js index ed9e04dfc0e67bd3844c512eee5a6a49f9b7a0ce..59d3714ce59fd66775c0cf57ba1c30ffc0355174 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.js @@ -1,5 +1,6 @@ import React from 'react' import { ContextualBox, AssignHE } from 'pubsweet-component-faraday-ui' +import PropTypes from 'prop-types' const ManuscriptAssignHE = ({ toggle, @@ -8,6 +9,7 @@ const ManuscriptAssignHE = ({ isFetching, currentUser: { permissions: { canAssignHE = false } }, handlingEditors = [], + inviteHandlingEditor, }) => canAssignHE ? ( <ContextualBox @@ -25,4 +27,15 @@ const ManuscriptAssignHE = ({ </ContextualBox> ) : null +ManuscriptAssignHE.propTypes = { + /** Handling editors you want to be displayed. */ + handlingEditors: PropTypes.arrayOf(PropTypes.object), + /** Callback function fired when the handling editor is invited. */ + inviteHandlingEditor: PropTypes.func, +} + +ManuscriptAssignHE.defaultProps = { + handlingEditors: [], + inviteHandlingEditor: () => {}, +} export default ManuscriptAssignHE diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.md b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.md index 7787e62799867bccde289c719eaad3ece654ea85..29309b5e1745bec9febe83ab91addd1a5c210a46 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.md +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptAssignHE.md @@ -32,7 +32,7 @@ const currentUser = { {(expanded, toggle) => ( <ManuscriptAssignHE toggle={toggle} - expanded={expanded} + expanded currentUser={currentUser} handlingEditors={handlingEditors} assignHE={he => console.log('assigning...', he)} diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.js index 6a4c5dfb3a2d273cc235ae240e18c48561ff6fd4..ce835848092518c4831fcc9b34da41c8e5592db7 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.js @@ -2,13 +2,14 @@ import React from 'react' import { get } from 'lodash' import { DateParser } from '@pubsweet/ui' import { compose, withHandlers } from 'recompose' +import PropTypes from 'prop-types' import { Row, Item, Text, - ActionLink, IconButton, + ActionLink, PreviewFile, DownloadZipFiles, ManuscriptVersion, @@ -20,8 +21,8 @@ const ManuscriptDetailsTop = ({ goToEdit, getSignedUrl, goToTechnicalCheck, - fragment = {}, - collection = {}, + fragment, + collection, currentUser: { isReviewer, token, @@ -30,16 +31,22 @@ const ManuscriptDetailsTop = ({ }) => ( <Row alignItems="center" mb={1} mt={1}> <Item alignItems="center" justify="flex-start"> - <ActionLink icon="arrow-left" onClick={() => history.push('/dashboard')}> + <ActionLink + fontIcon="arrowLeft" + onClick={() => history.push('/dashboard')} + paddingBottom={1.2} + > Dashboard </ActionLink> </Item> - <Item alignItems="center" justify="flex-end"> + <Item alignItems="baseline" justify="flex-end"> {canOverrideTechChecks && ( <ActionLink data-test-id="button-qa-manuscript-technical-checks" - icon="check-square" + fontIcon="technicalChecks" onClick={goToTechnicalCheck(collection)} + paddingBottom={1.5} + paddingRight={1.5} pr={2} > Technical Checks @@ -48,8 +55,10 @@ const ManuscriptDetailsTop = ({ {canEditManuscript && ( <ActionLink data-test-id="button-qa-manuscript-edit" - icon="edit" + fontIcon="dashboardEdit" onClick={goToEdit(collection, fragment)} + paddingBottom={1.5} + paddingRight={1.5} pr={2} > Edit @@ -66,7 +75,7 @@ const ManuscriptDetailsTop = ({ isReviewer={isReviewer} token={token} > - <IconButton icon="download" iconSize={2} mr={3} secondary /> + <IconButton fontIcon="downloadZip" mr={2} secondary /> </DownloadZipFiles> <DateParser durationThreshold={0} timestamp={fragment.submitted || ''}> {timestamp => ( @@ -111,3 +120,30 @@ export default compose( }, }), )(ManuscriptDetailsTop) + +ManuscriptDetailsTop.propTypes = { + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Object containing the selected collection. */ + collection: PropTypes.object, //eslint-disable-line + /** Object with versions of manuscript. */ + versions: PropTypes.array, //eslint-disable-line + /** An async call that returns the securized S3 file url. */ + getSignedUrl: PropTypes.func, + /** An async call that takes you to edit. */ + goToEdit: PropTypes.func, + /** An async call that takes you to thchnical check. */ + goToTechnicalCheck: PropTypes.func, + /** Object containing token for current user. */ + currentUser: PropTypes.object, //eslint-disable-line +} + +ManuscriptDetailsTop.defaultProps = { + fragment: {}, + collection: {}, + versions: [], + getSignedUrl: () => {}, + goToEdit: () => {}, + goToTechnicalCheck: () => {}, + currentUser: {}, +} diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.md b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.md index f4b7fc2d8524c16945c715d88db44f52824025ab..f08d36e626c777e5ff28541097100a0f1cc39991 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.md +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptDetailsTop.md @@ -1,11 +1,61 @@ Manuscript Details top section ```js +const authors = [ + { + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + }, + { + email: 'michael.felps@gmail.com', + firstName: 'Michael', + lastName: 'Felps', + isSubmitting: true, + isCorresponding: true, + }, + { + email: 'barrack.obama@gmail.com', + firstName: 'Barrack', + lastName: 'Obama', + }, + { + email: 'barrack.obama@gmail1.com', + firstName: 'Barrack 1', + lastName: 'Obama', + }, + { + email: 'barrack.obama@gmail2.com', + firstName: 'Barrack 2', + lastName: 'Obama', + }, +] + +const collection = { + customId: '55113358', + visibleStatus: 'Pending Approval', + handlingEditor: { + id: 'he-1', + name: 'Handlington Ignashevici', + }, + invitations: [], +} + +const fragment = { + authors, + created: Date.now(), + submitted: Date.now(), + metadata: { + journal: 'Awesomeness', + title: 'A very ok title with many authors', + type: 'research', + }, +} const history = { push: () => alert('go back') }; -const fragment={}; -const collection={}; + const currentUser = { isReviewer: true, token: 'abc-123', diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js index 07fcac0087453c6943265160174beb18b23f95f0..3224fd577be60109705e15411ac235687d859470 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js @@ -6,6 +6,7 @@ import { reduxForm } from 'redux-form' import { th } from '@pubsweet/ui-toolkit' import { required } from 'xpub-validators' import { Button, Menu, ValidatedField } from '@pubsweet/ui' +import PropTypes from 'prop-types' import { withModal } from 'pubsweet-component-modal/src/components' import { @@ -59,7 +60,8 @@ const ManuscriptEicDecision = ({ isFetching, handleSubmit, messagesLabel, - collection = {}, + collection, + submitDecision, ...rest }) => ( <ContextualBox @@ -149,6 +151,23 @@ export default compose( }), )(ManuscriptEicDecision) +ManuscriptEicDecision.propTypes = { + /** Object with details about collection. */ + collection: PropTypes.object, //eslint-disable-line + /** Label of the decision of EIC. */ + messagesLabel: PropTypes.object, //eslint-disable-line + /** Callback function fired when the handling editor submit his decision. */ + submitDecision: PropTypes.func, + /** Values taken by form. */ + formValues: PropTypes.object, //eslint-disable-line +} +ManuscriptEicDecision.defaultProps = { + collection: {}, + messagesLabel: {}, + submitDecision: () => {}, + formValues: {}, +} + // #region styles const Root = styled.div` display: flex; diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileList.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileList.js index 4f4c2ea781867330911b163f54a2b395a2cfdade..901ebc1a2b66466f0dc45b5bddad781e5dbdc1bf 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileList.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileList.js @@ -1,6 +1,6 @@ +import PropTypes from 'prop-types' import React, { Fragment } from 'react' import { ManuscriptFileSection } from 'pubsweet-component-faraday-ui' - import { withFilePreview, withFileDownload } from '../helpers' const ManuscriptFileList = ({ @@ -35,5 +35,26 @@ const ManuscriptFileList = ({ /> </Fragment> ) +ManuscriptFileList.propTypes = { + /** Files that are uploaded by author. */ + files: PropTypes.shape({ + coverLetter: PropTypes.arrayOf(PropTypes.object), + manuscripts: PropTypes.arrayOf(PropTypes.object), + supplementary: PropTypes.arrayOf(PropTypes.object), + }), + /** Callback function fired when delete icon is pressed. */ + onDelete: PropTypes.func, + /** Callback function fired when download icon is pressed. */ + onDownload: PropTypes.func, + /** Callback function fired when preview icon is pressed. */ + onPreview: PropTypes.func, +} + +ManuscriptFileList.defaultProps = { + files: {}, + onDelete: () => {}, + onDownload: () => {}, + onPreview: () => {}, +} export default withFilePreview(withFileDownload(ManuscriptFileList)) diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileSection.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileSection.js index c2a6867e2577f2a943a4b61c7290caa68c0f619f..e4fef65e9a5e47432f311ec5f51087a6542b2aae 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileSection.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptFileSection.js @@ -1,7 +1,8 @@ import React, { Fragment } from 'react' import { Text, FileItem, Item, Row } from 'pubsweet-component-faraday-ui' +import PropTypes from 'prop-types' -const ManuscriptFileSection = ({ list = [], label = '', ...rest }) => ( +const ManuscriptFileSection = ({ list, label, ...rest }) => ( <Fragment> {!!list.length && ( <Fragment> @@ -28,4 +29,22 @@ const ManuscriptFileSection = ({ list = [], label = '', ...rest }) => ( </Fragment> ) +ManuscriptFileSection.propTypes = { + /** List of uploaded files */ + list: PropTypes.arrayOf(PropTypes.object), + /** Category name of uploaded files. */ + label: PropTypes.string, + /** Callback function fired when download icon is pressed. */ + onDownload: PropTypes.func, + /** Callback function fired when preview icon is pressed. */ + onPreview: PropTypes.func, +} + +ManuscriptFileSection.defaultProps = { + list: [], + label: '', + onDownload: () => {}, + onPreview: () => {}, +} + export default ManuscriptFileSection diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js index 296bebafcfc99f9f765f677a90d97d74f630b3e1..e3925e13ff39142a13dd6a91b92578fce453f48a 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.js @@ -1,5 +1,6 @@ import React, { Fragment } from 'react' import { get, chain, isEmpty } from 'lodash' +import PropTypes from 'prop-types' import { H2, H4, DateParser, Button } from '@pubsweet/ui' import { compose, @@ -83,6 +84,29 @@ const ManuscriptHeader = ({ ) } +ManuscriptHeader.propTypes = { + /** Component that takes a func that returns a react elem and calls it instead of implementing its own rander. */ + renderHE: PropTypes.func, + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Manuscript types that you can chose from. */ + manuscriptType: PropTypes.object, //eslint-disable-line + /** Status for editor in chief. */ + editorInChief: PropTypes.string, + /** Object containing the selected collection. */ + collection: PropTypes.object, //eslint-disable-line + /** Specifies if manuscript is at the latest version. */ + isLatestVersion: PropTypes.bool, +} +ManuscriptHeader.defaultProps = { + renderHE: () => {}, + fragment: {}, + manuscriptType: {}, + editorInChief: 'Unassigned', + collection: {}, + isLatestVersion: false, +} + export default compose( defaultProps({ inviteHE: () => {}, diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.md b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.md index 86ddd80a766067f270313f5e663095f18c6cb126..e8d4243ea27d655c5d98b001eaed06afa1907828 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.md +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptHeader.md @@ -2,33 +2,65 @@ Manuscript header without a HE assigned. ```js const authors = [ - { + { + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecbafc48fe', email: 'john.doe@gmail.com', firstName: 'John', lastName: 'Doe', isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'michael.felps@gmail.com', - firstName: 'Michael', - lastName: 'Felps', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecsdfc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', isSubmitting: true, isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail.com', - firstName: 'Barrack', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec56fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail1.com', - firstName: 'Barrack 1', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-144cbafc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail2.com', - firstName: 'Barrack 2', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec33fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, ] @@ -54,7 +86,9 @@ const fragment = { } const currentUser = { - canAssignHE: true, + permissions: { + canAssignHE: true, + }, } const journal = { @@ -75,7 +109,6 @@ const journal = { }, ], } - ;<ManuscriptHeader collection={collection} fragment={fragment} @@ -92,33 +125,65 @@ Manuscript header with a pending HE invitation. ```js const authors = [ - { + { + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecbafc48fe', email: 'john.doe@gmail.com', firstName: 'John', lastName: 'Doe', isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'michael.felps@gmail.com', - firstName: 'Michael', - lastName: 'Felps', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecsdfc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', isSubmitting: true, isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail.com', - firstName: 'Barrack', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec56fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail1.com', - firstName: 'Barrack 1', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-144cbafc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail2.com', - firstName: 'Barrack 2', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec33fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, ] @@ -143,12 +208,14 @@ const collection = { ], } -const handlingEditors=[{ +const handlingEditors = [ + { id: 'he-1', firstName: 'Handlington', lastName: 'Ignashevici', name: 'Handlington Ignashevici', -}] + }, +] const fragment = { authors, @@ -162,7 +229,9 @@ const fragment = { } const currentUser = { - canAssignHE: true, + permissions: { + canAssignHE: true, + }, } const journal = { @@ -183,7 +252,6 @@ const journal = { }, ], } - ;<ManuscriptHeader collection={collection} fragment={fragment} @@ -201,32 +269,64 @@ Manuscript header with a pending HE invitation. ```js const authors = [ { + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecbafc48fe', email: 'john.doe@gmail.com', firstName: 'John', lastName: 'Doe', isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'michael.felps@gmail.com', - firstName: 'Michael', - lastName: 'Felps', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ecsdfc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', isSubmitting: true, isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail.com', - firstName: 'Barrack', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec56fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail1.com', - firstName: 'Barrack 1', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-144cbafc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, { - email: 'barrack.obama@gmail2.com', - firstName: 'Barrack 2', - lastName: 'Obama', + affiliation: 'TSD', + affiliationNumber: 1, + country: 'AX', + id: '5001955e-cc18-42d4-b0ca-15ec33fc48fe', + email: 'john.doe@gmail.com', + firstName: 'John', + lastName: 'Doe', + isSubmitting: true, + isCorresponding: true, + title: 'mr', }, ] @@ -263,7 +363,11 @@ const fragment = { }, } -const currentUser = {} +const currentUser = { + permissions: { + canAssignHE: false, + }, +} const journal = { manuscriptTypes: [ @@ -283,7 +387,6 @@ const journal = { }, ], } - ;<ManuscriptHeader collection={collection} fragment={fragment} diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js index 69d79027af59245a32fbd5d180b8555cf926ce50..8b28cbb35f783296f696148be2cf385a1a1a8aab 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptMetadata.js @@ -1,6 +1,7 @@ -import React, { Fragment } from 'react' -import { isEmpty, get } from 'lodash' +import PropTypes from 'prop-types' import { withProps } from 'recompose' +import { isEmpty, get } from 'lodash' +import React, { Fragment } from 'react' import { Text, @@ -15,17 +16,25 @@ const ManuscriptMetadata = ({ getSignedUrl, currentUser: { token }, fragment: { files = {}, conflicts = {}, metadata: { abstract = '' } }, + abstractMetadataExpanded, + toggleAbstractMetadata, + toggleConflictsOfInterest, + conflictsOfInterestExpanded, + filesMetadataExpanded, + toggleFilesMetadata, }) => ( <Fragment> {!!abstract && ( <Item mb={1}> <ContextualBox data-test-id="abstract-tab" + expanded={abstractMetadataExpanded} label="Abstract" startExpanded + toggle={toggleAbstractMetadata} transparent > - <Text mb={1} mt={1} whiteSpace="pre-wrap"> + <Text mb={1} mt={1}> {abstract} </Text> </ContextualBox> @@ -35,7 +44,9 @@ const ManuscriptMetadata = ({ <Item mb={1}> <ContextualBox data-test-id="conflict-of-interest-tab" + expanded={conflictsOfInterestExpanded} label="Conflict of Interest" + toggle={toggleConflictsOfInterest} transparent > <Row alignItems="center" justify="flex-start"> @@ -67,7 +78,13 @@ const ManuscriptMetadata = ({ )} {!isEmpty(files) && ( <Item mb={1}> - <ContextualBox data-test-id="files-tab" label={filesLabel} transparent> + <ContextualBox + data-test-id="files-tab" + expanded={filesMetadataExpanded} + label={filesLabel} + toggle={toggleFilesMetadata} + transparent + > <ManuscriptFileList files={files} getSignedUrl={getSignedUrl} @@ -79,6 +96,23 @@ const ManuscriptMetadata = ({ </Fragment> ) +ManuscriptMetadata.propTypes = { + /** Files Label of the contextual box. */ + filesLabel: PropTypes.string, + /** An async call that returns the securized S3 file url. */ + getSignedUrl: PropTypes.func, + /** Object containing token for current user. */ + currentUser: PropTypes.object, //eslint-disable-line + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line +} +ManuscriptMetadata.defaultProps = { + filesLabel: '', + getSignedUrl: () => {}, + currentUser: {}, + fragment: {}, +} + export default withProps(({ fragment: { files } }) => ({ filesLabel: `Files (${get(files, 'manuscripts', []).length + get(files, 'coverLetter', []).length + diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.js index 2f7473750f267ef12771024e3480984dd06f82f9..423a35f0248d42c12f62fbfe37563f9b54a959ac 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.js @@ -1,10 +1,11 @@ import React from 'react' import { get } from 'lodash' +import PropTypes from 'prop-types' import { Menu } from '@pubsweet/ui' const ManuscriptVersion = ({ history, - versions, + versions = [], fragment = {}, collection = {}, }) => @@ -20,4 +21,18 @@ const ManuscriptVersion = ({ /> ) +ManuscriptVersion.propTypes = { + /** Object with versions of manuscript. */ + versions: PropTypes.array, //eslint-disable-line + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Object containing the selected collection. */ + collection: PropTypes.object, //eslint-disable-line +} + +ManuscriptVersion.defaultProps = { + versions: [], + fragment: {}, + collection: {}, +} export default ManuscriptVersion diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.md b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.md index 00e12ce334886136eb8308dd2c6b5fdc7a018e68..cee73787f78450a832987131c913cf7274943267 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.md +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptVersion.md @@ -1,19 +1,22 @@ Manuscript version component ```js - const history = { - push: v => console.log('go to version -> ', v) -}; - -const fragment={}; -const collection={ - fragments: ['1','2'], -}; + push: v => console.log('go to version -> ', v), +} -<ManuscriptVersion +const fragment = {} +const collection = { + fragments: ['1', '2'], +} +const versions = [ + { label: 'Version 1', value: '10d28459-6f8e-4f6c-a57e-65979e5f8d2' }, + { label: 'Version 2', value: '10d28459-6f8e-4f6c-a57e-65979e5f854' }, +] +;<ManuscriptVersion collection={collection} history={history} fragment={fragment} - /> + versions={versions} +/> ``` diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.js b/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.js index a638617e4a1adb041b45b48c310df51e95be1c29..27165b3c104800a7444733910499cc5a9700565d 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { reduxForm } from 'redux-form' import { required } from 'xpub-validators' import { get, has, capitalize } from 'lodash' @@ -86,6 +87,32 @@ const ResponseToInvitation = ({ </ContextualBox> ) +ResponseToInvitation.propTypes = { + /** Label of the contextual box. */ + label: PropTypes.string, + /** Title that will be showed on the card. */ + title: PropTypes.string, + /** Expands a message for collapse or expand. */ + expanded: PropTypes.bool, + /** Method used to toggle a message on click. */ + toggle: PropTypes.func, + /* Handles the submission of the recommendation. */ + handleSubmit: PropTypes.func, + /** Specifies if it will show comments on the current version. */ + shouldShowComments: PropTypes.bool, + /** Specifies the Label name for the respond to invitation button. */ + buttonLabel: PropTypes.string, +} +ResponseToInvitation.defaultProps = { + label: '', + title: '', + toggle: () => {}, + expanded: false, + handleSubmit: () => {}, + shouldShowComments: false, + buttonLabel: 'RESPOND TO INVITATION', +} + export default compose( withFetching, withModal(({ isFetching, modalKey }) => ({ diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.md b/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.md index e7f3a21c9d5f65814365bd1e87054d925a0fb775..588a77de8ffc3b45d90266d6d0ef94629240c262 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.md +++ b/packages/component-faraday-ui/src/manuscriptDetails/ResponseToInvitation.md @@ -5,10 +5,9 @@ const formValues = { decision: 'accept', } ;<RemoteOpener> - {({ toggle, expanded }) => ( + {({ toggle }) => ( <ResponseToInvitation commentsOn="decline" - expanded={expanded} label="Do you agree to be the handling editor for this manuscript?" formValues={formValues} onResponse={(values, { setFetching }) => { @@ -26,9 +25,8 @@ A Reviewer response to an invitation. ```js <RemoteOpener> - {({ toggle, expanded }) => ( + {({ toggle }) => ( <ResponseToInvitation - expanded={expanded} label="Do you agree to review this manuscript?" onResponse={(values, { setFetching }) => { console.log('on response: ', values) diff --git a/packages/component-faraday-ui/src/manuscriptDetails/index.js b/packages/component-faraday-ui/src/manuscriptDetails/index.js index c32284d507c22c2d5d4f105916caefc456ef3ea4..39501caf31bb9a6411b48aaa632fe85bfcd3b2ac 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/index.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/index.js @@ -1,3 +1,4 @@ +export { default as DeleteManuscriptModal } from './DeleteManuscriptModal' export { default as ManuscriptDetailsTop } from './ManuscriptDetailsTop' export { default as ManuscriptVersion } from './ManuscriptVersion' export { default as ManuscriptHeader } from './ManuscriptHeader' diff --git a/packages/component-faraday-ui/src/modals/MultiAction.js b/packages/component-faraday-ui/src/modals/MultiAction.js index 3a9acf7d332be3e39d6270cdde72fbf637e81b57..3d40da665ac17e088e9f2f154b9621f35aabcef8 100644 --- a/packages/component-faraday-ui/src/modals/MultiAction.js +++ b/packages/component-faraday-ui/src/modals/MultiAction.js @@ -3,19 +3,22 @@ import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { H2, Button, Spinner } from '@pubsweet/ui' import { compose, setDisplayName, withHandlers } from 'recompose' +import PropTypes from 'prop-types' import { IconButton, Text, Row } from '../' const MultiAction = ({ title, + content, onClose, + onCancel, subtitle, onConfirm, modalError, isFetching, renderContent, - confirmText = 'OK', - cancelText = 'Cancel', + confirmText, + cancelText, }) => ( <Root> <IconButton icon="x" onClick={onClose} right={5} secondary top={5} /> @@ -36,7 +39,7 @@ const MultiAction = ({ <Spinner size={3} /> ) : ( <Fragment> - <Button data-test-id="modal-cancel" onClick={onClose}> + <Button data-test-id="modal-cancel" onClick={onCancel}> {cancelText} </Button> <Button data-test-id="modal-confirm" onClick={onConfirm} primary> @@ -48,15 +51,47 @@ const MultiAction = ({ </Root> ) +MultiAction.propTypes = { + /** Title that will be showed on the card. */ + title: PropTypes.string, + /** Subtitle that will be showed on the card. */ + subtitle: PropTypes.string, + /** The text you want to see on the button when someone submit the report. */ + confirmText: PropTypes.string, + /** The text you want to see on the button when someone cancel the report. */ + cancelText: PropTypes.string, + /** Callback function fired when cancel confirmation card. */ + onCancel: PropTypes.func, + /** Callback function fired when confirm confirmation card. */ + onConfirm: PropTypes.func, + /** When is true will show a spinner. */ + onClose: PropTypes.func, + /** Callback function fired when you want to close the card. */ + isFetching: PropTypes.bool, + /** The component you want to show on the card. */ + content: PropTypes.func, +} +MultiAction.defaultProps = { + title: undefined, + subtitle: undefined, + confirmText: 'OK', + cancelText: 'Cancel', + onCancel: undefined, + onConfirm: undefined, + onClose: undefined, + isFetching: undefined, + content: undefined, +} + export default compose( withHandlers({ onConfirm: ({ onConfirm, ...props }) => () => { - if (onConfirm && typeof onConfirm === 'function') { + if (typeof onConfirm === 'function') { onConfirm(props) } }, onClose: ({ onCancel, ...props }) => () => { - if (onCancel && typeof onCancel === 'function') { + if (typeof onCancel === 'function') { onCancel(props) } props.hideModal() diff --git a/packages/component-faraday-ui/src/modals/OpenModal.js b/packages/component-faraday-ui/src/modals/OpenModal.js index 12c94451236f11e4a826a19dbce52b2a1830cf0c..e713ea392d68350757a5ca89e729ee4dbb44354e 100644 --- a/packages/component-faraday-ui/src/modals/OpenModal.js +++ b/packages/component-faraday-ui/src/modals/OpenModal.js @@ -1,9 +1,22 @@ +import React from 'react' import { compose, withHandlers, withProps } from 'recompose' import { withModal } from 'pubsweet-component-modal/src/components' +import PropTypes from 'prop-types' +import { MultiAction, SingleActionModal } from './' -import { MultiAction, SingleActionModal, FormModal } from './' - -const OpenModal = ({ showModal, children }) => children(showModal) +const OpenModal = ({ + showModal, + title, + subtitle, + confirmText, + cancelText, + children, + onConfirm, + onCancel, + onClose, + content, + modalKey, +}) => <div>{children(showModal)}</div> const selectModalComponent = props => { if (props.component) { @@ -13,18 +26,51 @@ const selectModalComponent = props => { } if (props.single) { return { - modalComponent: SingleActionModal, + modalComponent: props.component, } } - if (props.formModal) + if (props.single) { return { - modalComponent: FormModal, + modalComponent: SingleActionModal, } + } return { modalComponent: MultiAction, } } +OpenModal.propTypes = { + /** Title that will be showed on the card. */ + title: PropTypes.string, + /** Subtitle that will be showed on the card. */ + subtitle: PropTypes.string, + /** The text you want to see on the button when someone submit the report. */ + confirmText: PropTypes.string, + /** The text you want to see on the button when someone cancel the report. */ + cancelText: PropTypes.string, + /** Callback function fired when cancel confirmation card. */ + onCancel: PropTypes.func, + /** Callback function fired when confirm confirmation card. */ + onConfirm: PropTypes.func, + /** When is true will show a spinner. */ + onClose: PropTypes.func, + /** The text you want to show on the card. */ + content: PropTypes.func, + /** Unique key for modal box. */ + modalKey: PropTypes.string, +} +OpenModal.defaultProps = { + title: '', + subtitle: '', + confirmText: 'OK', + cancelText: 'Cancel', + onCancel: () => {}, + onConfirm: () => {}, + onClose: () => {}, + content: null, + modalKey: 'aModal', +} + export default compose( withProps(selectModalComponent), withModal(({ isFetching, modalKey, modalComponent }) => ({ diff --git a/packages/component-faraday-ui/src/modals/OpenModal.md b/packages/component-faraday-ui/src/modals/OpenModal.md index 617fcdf2544de263f0b7c2bfd0931b089b455f5b..ae38b6151b4272e841489d08572fa3d9d58cad13 100644 --- a/packages/component-faraday-ui/src/modals/OpenModal.md +++ b/packages/component-faraday-ui/src/modals/OpenModal.md @@ -19,9 +19,8 @@ Open a confirmation modal by clicking on an element Pass a custon component as the modal content. ```js -const Custom = () => <div>inside the modal</div>; - -<OpenModal +const Custom = `<div>inside the modal</div>` +;<OpenModal onConfirm={props => console.log('confirm', props)} onCancel={props => console.log('cancel', props)} title="Are you sure?" @@ -37,7 +36,7 @@ Open a single action modal. ```js <OpenModal - onConfirm={console.log} + onConfirm={props => console.log('confirm', props)} title="Are you sure?" confirmText="I am pretty sure" modalKey="1234" diff --git a/packages/component-faraday-ui/src/modals/SingleActionModal.js b/packages/component-faraday-ui/src/modals/SingleActionModal.js index 44385a9e75b20df802e0bb1c0248563ad84b4bb2..ebccf5ee584f076aa9ddc454ef5ef4a0857e0ccf 100644 --- a/packages/component-faraday-ui/src/modals/SingleActionModal.js +++ b/packages/component-faraday-ui/src/modals/SingleActionModal.js @@ -1,8 +1,9 @@ import React from 'react' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' -import { Button, Icon, H2 } from '@pubsweet/ui' +import { Button, H2 } from '@pubsweet/ui' import { compose, setDisplayName, withHandlers } from 'recompose' +import PropTypes from 'prop-types' import { IconButton, Text } from '../' @@ -12,13 +13,17 @@ const SingleActionModal = ({ content, onClick, subtitle, - confirmText = 'OK', + confirmText, + onConfirm, }) => ( <Root> <IconButton icon="x" onClick={onClick} right={5} secondary top={5} /> - <Icon error={error} primary={!error} size={6}> - {error ? 'x-circle' : 'check-circle'} - </Icon> + <IconButton + error={error} + fontIcon={error ? 'removeIcon' : 'saveIcon'} + primary={!error} + size={2} + /> {title && <H2>{title}</H2>} {subtitle && <Text secondary>{subtitle}</Text>} <Button data-test-id="modal-confirm" onClick={onClick} primary> @@ -63,4 +68,25 @@ const Root = styled.div` margin-top: ${th('gridUnit')}; } ` + +SingleActionModal.propTypes = { + /** Title that will be showed on the card. */ + title: PropTypes.string, + /** Subtitle that will be showed on the card. */ + subtitle: PropTypes.string, + /** Callback function fired when confirm confirmation card. */ + onConfirm: PropTypes.func, + /** The text you want to see on the button when someone submit the report. */ + confirmText: PropTypes.string, + /** If true success icon is replaced with error icon. */ + error: PropTypes.bool, +} + +SingleActionModal.defaultProps = { + title: undefined, + subtitle: undefined, + onConfirm: undefined, + confirmText: 'OK', + error: undefined, +} // #endregion diff --git a/packages/component-faraday-ui/src/pending/ControlledAccordion.js b/packages/component-faraday-ui/src/pending/ControlledAccordion.js index e4f9b30f9df252bf1070d0d561ac527f9a55fc69..84374ee3c1941ae6a7b04b29f39036a3a53e11af 100644 --- a/packages/component-faraday-ui/src/pending/ControlledAccordion.js +++ b/packages/component-faraday-ui/src/pending/ControlledAccordion.js @@ -24,8 +24,8 @@ class ControlledAccordion extends React.Component { const shouldScroll = !prevProps.expanded && this.props.expanded if (this.props.scrollIntoView && shouldScroll) { - const appBarHeight = 70 // TODO -- take height from constants - const appBarMargin = 16 // TODO -- take margin from constants + const appBarHeight = 70 + const appBarMargin = 16 this.scroller.scrollTop = this._accordion.offsetTop - appBarHeight - appBarMargin } diff --git a/packages/component-faraday-ui/src/submissionRevision/DetailsAndAuthors.js b/packages/component-faraday-ui/src/submissionRevision/DetailsAndAuthors.js index 351585752d1ff1f4f61873070293ece08fd8987e..31076120157ede92ae8ba51fe682e81938e71047 100644 --- a/packages/component-faraday-ui/src/submissionRevision/DetailsAndAuthors.js +++ b/packages/component-faraday-ui/src/submissionRevision/DetailsAndAuthors.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { get, has } from 'lodash' import { Field } from 'redux-form' import styled from 'styled-components' @@ -107,4 +108,149 @@ const Root = styled.div` padding-left: calc(${th('gridUnit')} * 1); ` +DetailsAndAuthors.propTypes = { + /** Deprecated object containing manuscript types. */ + journal: PropTypes.string, + /** Object containing the selected fragment */ + fragment: PropTypes.PropTypes.shape({ + id: PropTypes.string, + type: PropTypes.string, + files: PropTypes.shape({ + coverLetter: PropTypes.array, + manuscripts: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + size: PropTypes.number, + originalName: PropTypes.string, + }), + ), + supplementary: PropTypes.array, + }), + owners: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + username: PropTypes.string, + }), + ), + authors: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + email: PropTypes.string, + country: PropTypes.string, + lastName: PropTypes.string, + firstName: PropTypes.string, + affiliation: PropTypes.string, + isSubmitting: PropTypes.bool, + isCorresponding: PropTypes.bool, + }), + ), + created: PropTypes.string, + version: PropTypes.number, + metadata: PropTypes.shape({ + type: PropTypes.string, + title: PropTypes.string, + journal: PropTypes.string, + abstract: PropTypes.string, + }), + conflicts: PropTypes.shape({ + hasFunding: PropTypes.string, + hasConflicts: PropTypes.string, + hasDataAvailability: PropTypes.string, + }), + submitted: PropTypes.number, + collectionId: PropTypes.string, + declarations: PropTypes.shape({ + agree: PropTypes.bool, + }), + fragmentType: PropTypes.string, + recomandations: PropTypes.array, + }), + /** Object containing the selected collection. */ + collection: PropTypes.shape({ + id: PropTypes.string, + type: PropTypes.string, + owners: PropTypes.array, + status: PropTypes.string, + created: PropTypes.number, + customId: PropTypes.string, + fragments: PropTypes.arrayOf(PropTypes.string), + technicalChecks: PropTypes.object, + CurrentVersion: PropTypes.shape({ + id: PropTypes.string, + type: PropTypes.string, + files: PropTypes.shape({ + coverLetter: PropTypes.array, + manuscripts: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string, + size: PropTypes.number, + originalName: PropTypes.string, + }), + ), + supplementary: PropTypes.array, + }), + owners: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + username: PropTypes.string, + }), + ), + authors: PropTypes.arrayOf( + PropTypes.shape({ + id: PropTypes.string, + email: PropTypes.string, + country: PropTypes.string, + lastName: PropTypes.string, + firstName: PropTypes.string, + affiliation: PropTypes.string, + isSubmitting: PropTypes.bool, + isCorresponding: PropTypes.bool, + }), + ), + created: PropTypes.string, + version: PropTypes.number, + metadata: PropTypes.shape({ + type: PropTypes.string, + title: PropTypes.string, + journal: PropTypes.string, + abstract: PropTypes.string, + }), + conflicts: PropTypes.shape({ + hasFunding: PropTypes.string, + hasConflicts: PropTypes.string, + hasDataAvailability: PropTypes.string, + }), + submitted: PropTypes.number, + collectionId: PropTypes.string, + declarations: PropTypes.shape({ + agree: PropTypes.bool, + }), + fragmentType: PropTypes.string, + recomandations: PropTypes.array, + }), + visibleStatus: PropTypes.string, + }), + /** Chages the form to allow editing of the selected author and returns his index. */ + onAuthorEdit: PropTypes.func, + /** Manuscript types that you can chose from. */ + manuscriptTypes: PropTypes.arrayOf( + PropTypes.shape({ + label: PropTypes.string, + value: PropTypes.string, + author: PropTypes.bool, + peerReview: PropTypes.bool, + abstractRequired: PropTypes.bool, + }), + ), +} +DetailsAndAuthors.defaultProps = { + journal: '', + fragment: {}, + collection: {}, + onAuthorEdit: () => {}, + manuscriptTypes: [], +} + export default DetailsAndAuthors diff --git a/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.js b/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.js index 81a19cecb0d1f1d9cab4fcbc30de9e88af545303..9c1c1f2bf7e638b65f324f17beaca920bb53afa5 100644 --- a/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.js +++ b/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.js @@ -1,11 +1,12 @@ import React from 'react' import { get, has } from 'lodash' import { Field } from 'redux-form' +import PropTypes from 'prop-types' import { Icon } from '@pubsweet/ui' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' -import { ContextualBox, Row, Text, WizardFiles } from '../' +import { ContextualBox, Row, Text, WizardFiles, IconButton } from '../' const Empty = () => <div /> @@ -31,9 +32,7 @@ const ManuscriptFiles = ({ plus </CustomIcon>{' '} to upload. Use the{' '} - <CustomIcon secondary size={2}> - menu - </CustomIcon>{' '} + <CustomIconButton fontIcon="moveIcon" noHover secondary size={2} />{' '} icon to reorder or move files to a different type. </Text> </Row> @@ -59,6 +58,42 @@ const ManuscriptFiles = ({ </ContextualBox> ) +ManuscriptFiles.propTypes = { + /** Contains the token of the currently logged user. */ + token: PropTypes.string, + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** Object containing the selected collection. */ + collection: PropTypes.object, //eslint-disable-line + /** Name of added form. */ + formName: PropTypes.func, + /** Change added form. */ + changeForm: PropTypes.func, + /** Removes the file from the server. */ + deleteFile: PropTypes.func, + /** Uploads the file to the server. */ + uploadFile: PropTypes.func, + /** View content of the uploaded file. */ + previewFile: PropTypes.func, + /** An async call that returns the securized S3 file url. */ + getSignedUrl: PropTypes.func, + /** Value representing if the form has any errors. */ + formErrors: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), +} + +ManuscriptFiles.defaultProps = { + token: '', + fragment: {}, + collection: {}, + formName: () => {}, + changeForm: () => {}, + deleteFile: () => {}, + uploadFile: () => {}, + previewFile: () => {}, + getSignedUrl: () => {}, + formErrors: {}, +} + export default ManuscriptFiles // #region styled-components @@ -70,4 +105,9 @@ const Root = styled.div` const CustomIcon = styled(Icon)` vertical-align: sub; ` +const CustomIconButton = styled(IconButton)` + vertical-align: sub; + cursor: default; + display: inline-flex; +` // #endregion diff --git a/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.md b/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.md index 42a8e212005461b35ce3cedc2926dc0ffff6b7a2..5129d1d5a62f8cc632451b7b3eba4be8b0e69006 100644 --- a/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.md +++ b/packages/component-faraday-ui/src/submissionRevision/ManuscriptFiles.md @@ -14,8 +14,6 @@ const Wrapper = compose( reduxForm({ form: 'styleguide', }), -)(( props ) => ( - <ManuscriptFiles {...props} /> -)) +)(props => <ManuscriptFiles {...props} />) ;<Wrapper /> -``` \ No newline at end of file +``` diff --git a/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.js b/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.js index 790f2143d69a8cb7aa52c0edeff6ffd67b5387b2..d1f8bfdeba643f8e049e32328f231d4fa979023c 100644 --- a/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.js +++ b/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.js @@ -1,5 +1,6 @@ import React from 'react' import { isEmpty } from 'lodash' +import PropTypes from 'prop-types' import styled from 'styled-components' import { th } from '@pubsweet/ui-toolkit' import { FilePicker, Spinner, ValidatedField } from '@pubsweet/ui' @@ -20,6 +21,7 @@ import { const allowedFileExtensions = ['pdf', 'doc', 'docx', 'txt', 'rdf', 'odt'] const ResponseToReviewer = ({ file, + token, onDelete, onUpload, isFetching, @@ -74,6 +76,23 @@ const ResponseToReviewer = ({ </ContextualBox> ) +ResponseToReviewer.propTypes = { + /** Deletes the file from the server then updates the form. */ + onDelete: PropTypes.func, + /** Uploads the file then updates the form. */ + onUpload: PropTypes.func, + /** View content of the uploaded file. */ + previewFile: PropTypes.func, + /** Downloads the file from the server. */ + downloadFile: PropTypes.func, +} +ResponseToReviewer.defaultProps = { + onDelete: () => {}, + onUpload: () => {}, + previewFile: () => {}, + downloadFile: () => {}, +} + const Root = styled.div` border-left: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')}; padding-left: calc(${th('gridUnit')} * 1); diff --git a/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.md b/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.md index e9264445b46902365f4a0d50608d13bd67fde690..903a52a7079d90ebd8749503990df5bba2460577 100644 --- a/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.md +++ b/packages/component-faraday-ui/src/submissionRevision/ResponseToReviewer.md @@ -1,7 +1,24 @@ ```js +const { reduxForm, getFormValues, change } = require('redux-form') +const { compose } = require('recompose') +const { connect } = require('react-redux') + const allowedFileExtensions = ['pdf', 'doc', 'docx'] -const onUpload = (f) => {console.log('Upload', f)} +const onUpload = file => console.log('Upload', file) -<ResponseToReviewer onUpload={onUpload} allowedFileExtensions={allowedFileExtensions}/> +const Wrapper = compose( + connect(state => ({ + formValues: getFormValues('Response to reviewer')(state), + })), + reduxForm({ + form: 'Response to reviewer', + }), +)(props => ( + <ResponseToReviewer + onUpload={onUpload} + allowedFileExtensions={allowedFileExtensions} + /> +)) +;<Wrapper /> ``` diff --git a/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.js b/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.js index ace1a76edeca379d7beb733515e56ae95d00e23a..aec7021b003dc65598b05a433a0d4db559d70641 100644 --- a/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.js +++ b/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.js @@ -1,4 +1,5 @@ import React from 'react' +import PropTypes from 'prop-types' import { Button } from '@pubsweet/ui' import styled from 'styled-components' import { reduxForm } from 'redux-form' @@ -30,6 +31,7 @@ const SubmitRevision = ({ onAuthorEdit, isEditingAuthor, formErrors, + formName, }) => ( <ContextualBox highlight label="Submit Revision" mb={2}> <Root> @@ -51,7 +53,7 @@ const SubmitRevision = ({ deleteFile={deleteFile} downloadFile={downloadFile} formErrors={formErrors} - formName="revision" + formName={formName} fragment={fragment} getSignedUrl={getSignedUrl} previewFile={previewFile} @@ -85,6 +87,65 @@ const SubmitRevision = ({ </ContextualBox> ) +SubmitRevision.propTypes = { + /** Object containing the list of recommendations. */ + journal: PropTypes.object, //eslint-disable-line + /** Uploads the file to the server. */ + addFile: PropTypes.func, + /** Object containing the selected fragment. */ + fragment: PropTypes.object, //eslint-disable-line + /** An async call to add an author to the manuscript. */ + addAuthor: PropTypes.func, + /** Removes the file from the server. */ + deleteFile: PropTypes.func, + /** Object containing the selected collection. */ + collection: PropTypes.object, //eslint-disable-line + /** Change added form. */ + changeForm: PropTypes.func, + /** Object containing token for current user. */ + currentUser: PropTypes.object, //eslint-disable-line + /** View content of the uploaded file. */ + previewFile: PropTypes.func, + /** Value representing if the form has any errors. */ + hasFormError: PropTypes.bool, + /** An async call to remove an existing author from the manuscript. */ + deleteAuthor: PropTypes.func, + /** An async call that returns the securized S3 file url. */ + getSignedUrl: PropTypes.func, + /** Value containing the revision's file for the reviewer's response. */ + responseFile: PropTypes.object, //eslint-disable-line + /** Downloads the file from the server. */ + downloadFile: PropTypes.func, + /** Uploads the file then updates the form. */ + addResponseFile: PropTypes.func, + /** Deletes the file from the server then updates the form. */ + deleteResponseFile: PropTypes.func, + /** Chages the form to allow editing of the selected author and returns his index */ + onAuthorEdit: PropTypes.func, + /** Value representing if the form has any errors */ + formErrors: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]), +} +SubmitRevision.defaultProps = { + journal: {}, + addFile: () => {}, + fragment: {}, + addAuthor: () => {}, + deleteFile: () => {}, + collection: {}, + changeForm: () => {}, + currentUser: {}, + previewFile: () => {}, + hasFormError: false, + deleteAuthor: () => {}, + getSignedUrl: () => {}, + responseFile: {}, + downloadFile: () => {}, + addResponseFile: () => {}, + deleteResponseFile: () => {}, + onAuthorEdit: () => {}, + formErrors: {}, +} + const Root = styled.div` background-color: ${th('colorBackgroundHue2')}; padding: calc(${th('gridUnit')} * 2); diff --git a/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.md b/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.md index 6c9a0bde8927225e69c55be3fa2ee2cf2f78938c..a6768429d7e80c0e4ca23a917b4db015add55d20 100644 --- a/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.md +++ b/packages/component-faraday-ui/src/submissionRevision/SubmitRevision.md @@ -1,5 +1,8 @@ ```js const props = { + currentUser: { + token: 'hashmancasalaamdanam', + }, fragment: { id: 'a9dc38fe-5524-4728-b97f-9495a2eb4bee', type: 'fragment', diff --git a/packages/component-invite/src/tests/fragmentsInvitations/delete.test.js b/packages/component-invite/src/tests/fragmentsInvitations/delete.test.js index d7ee683a82165b31adf4b13eb53779be1c1d8b9c..c6e5c0fc9718533c793c610a05e47d2393464148 100644 --- a/packages/component-invite/src/tests/fragmentsInvitations/delete.test.js +++ b/packages/component-invite/src/tests/fragmentsInvitations/delete.test.js @@ -59,11 +59,11 @@ describe('Delete Fragments Invitations route handler', () => { ) }) it('should return an error when the invitation does not exist', async () => { - const { editorInChief } = testFixtures.users + const { handlingEditor } = testFixtures.users const { collection } = testFixtures.collections const { fragment } = testFixtures.fragments const res = await requests.sendRequest({ - userId: editorInChief.id, + userId: handlingEditor.id, route, models, path, @@ -78,11 +78,11 @@ describe('Delete Fragments Invitations route handler', () => { expect(data.error).toEqual('Invitation invalid-id not found') }) it('should return success when the collection and invitation exist', async () => { - const { editorInChief } = testFixtures.users + const { handlingEditor } = testFixtures.users const { collection } = testFixtures.collections const { fragment } = testFixtures.fragments const res = await requests.sendRequest({ - userId: editorInChief.id, + userId: handlingEditor.id, route, models, path, diff --git a/packages/component-invite/src/tests/fragmentsInvitations/post.test.js b/packages/component-invite/src/tests/fragmentsInvitations/post.test.js index cf4b990bb539ca664bb997a79bd136142908ac57..64a1efa019618bce9eaec3d1be17c41d1ce9192b 100644 --- a/packages/component-invite/src/tests/fragmentsInvitations/post.test.js +++ b/packages/component-invite/src/tests/fragmentsInvitations/post.test.js @@ -54,7 +54,7 @@ describe('Post fragments invitations route handler', () => { }) it('should return success when a reviewer is invited', async () => { - const { user, editorInChief } = testFixtures.users + const { user, handlingEditor } = testFixtures.users const { collection } = testFixtures.collections const { fragment } = testFixtures.fragments @@ -65,7 +65,7 @@ describe('Post fragments invitations route handler', () => { const res = await requests.sendRequest({ body, - userId: editorInChief.id, + userId: handlingEditor.id, route, models, path, @@ -81,7 +81,7 @@ describe('Post fragments invitations route handler', () => { }) it('should return success when resending an invitation to an existing reviewer', async () => { - const { editorInChief, reviewer } = testFixtures.users + const { handlingEditor, reviewer } = testFixtures.users const { collection } = testFixtures.collections const { fragment } = testFixtures.fragments @@ -93,7 +93,7 @@ describe('Post fragments invitations route handler', () => { const res = await requests.sendRequest({ body, - userId: editorInChief.id, + userId: handlingEditor.id, route, models, path, diff --git a/packages/component-manuscript-manager/src/Collections.js b/packages/component-manuscript-manager/src/Collections.js index 81f8c4d7f6977ae496a3d021ac6dbc0a7be37dca..e3f31556c53c9e9801276a849b6455738346321a 100644 --- a/packages/component-manuscript-manager/src/Collections.js +++ b/packages/component-manuscript-manager/src/Collections.js @@ -36,6 +36,11 @@ const Collections = app => { authBearer, require(`${routePath}/get`)(app.locals.models), ) + app.patch( + '/api/collections/:collectionId/archive', + authBearer, + require(`${routePath}/patch`)(app.locals.models), + ) /** * @api {delete} /api/collections/:collectionId Delete collection with specified id diff --git a/packages/component-manuscript-manager/src/routes/collections/patch.js b/packages/component-manuscript-manager/src/routes/collections/patch.js new file mode 100644 index 0000000000000000000000000000000000000000..d81429c23938e28ee70f02dc3ebea54900336bc3 --- /dev/null +++ b/packages/component-manuscript-manager/src/routes/collections/patch.js @@ -0,0 +1,48 @@ +const { get } = require('lodash') +const { + services, + Collection, + authsome: authsomeHelper, +} = require('pubsweet-component-helper-service') + +module.exports = models => async (req, res) => { + const { collectionId } = req.params + + try { + const collection = await models.Collection.find(collectionId) + const collectionStatus = get(collection, 'status') + const authsome = authsomeHelper.getAuthsome(models) + const target = { + path: req.route.path, + } + const canArchive = await authsome.can(req.user, 'PATCH', target) + + if (!canArchive) { + return res.status(403).json({ + error: 'Unauthorized', + }) + } + + if (!collectionStatus) { + return res.status(400).json({ + error: 'You cannot delete manuscripts while in draft.', + }) + } + + if (collectionStatus === 'deleted') { + return res.status(400).json({ + error: 'Manuscript already deleted', + }) + } + + const collectionHelper = new Collection({ collection }) + await collectionHelper.updateStatus({ newStatus: 'deleted' }) + + return res.status(200).json(collection) + } catch (e) { + const notFoundError = await services.handleNotFoundError(e, 'Collection') + return res.status(notFoundError.status).json({ + error: notFoundError.message, + }) + } +} diff --git a/packages/component-manuscript-manager/src/tests/collections/patch.test.js b/packages/component-manuscript-manager/src/tests/collections/patch.test.js new file mode 100644 index 0000000000000000000000000000000000000000..77767d8f92f509a54d3434ab7632c964e45af0e4 --- /dev/null +++ b/packages/component-manuscript-manager/src/tests/collections/patch.test.js @@ -0,0 +1,145 @@ +process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' +process.env.SUPPRESS_NO_CONFIG_WARNING = true + +const { cloneDeep } = require('lodash') +const fixturesService = require('pubsweet-component-fixture-service') +const requests = require('../requests') + +const { Model, fixtures } = fixturesService + +const reqBody = { + comments: {}, +} + +const path = '../routes/collections/patch' +const route = { + path: '/api/collections/:collectionId/archive', +} + +describe('Patch colection route handler', () => { + let testFixtures = {} + let body = {} + let models + beforeEach(() => { + testFixtures = cloneDeep(fixtures) + body = cloneDeep(reqBody) + models = Model.build(testFixtures) + }) + + it('should return an error if the manuscript does not exist', async () => { + const { admin } = testFixtures.users + const res = await requests.sendRequest({ + userId: admin.id, + body, + models, + route, + path, + params: { + collectionId: '123', + }, + }) + + expect(res.statusCode).toBe(404) + const data = JSON.parse(res._getData()) + expect(data.error).toBe('Collection not found') + }) + + it('should return success when deleting a manuscript as admin', async () => { + const { admin } = testFixtures.users + const { collection } = testFixtures.collections + collection.status = 'underReview' + const res = await requests.sendRequest({ + userId: admin.id, + body, + models, + route, + path, + params: { + collectionId: collection.id, + }, + }) + + expect(res.statusCode).toBe(200) + expect(JSON.parse(res._getData()).status).toEqual('deleted') + }) + + it('should return an error when deleting a manuscript as EiC', async () => { + const { editorInChief } = testFixtures.users + const { collection } = testFixtures.collections + collection.status = 'underReview' + const res = await requests.sendRequest({ + userId: editorInChief.id, + body, + models, + route, + path, + params: { + collectionId: collection.id, + }, + }) + + expect(res.statusCode).toBe(403) + const data = JSON.parse(res._getData()) + expect(data.error).toBe('Unauthorized') + }) + + it('should return an error when deleting a manuscript as author', async () => { + const { author } = testFixtures.users + const { collection } = testFixtures.collections + collection.status = 'underReview' + const res = await requests.sendRequest({ + userId: author.id, + body, + models, + route, + path, + params: { + collectionId: collection.id, + }, + }) + + expect(res.statusCode).toBe(403) + const data = JSON.parse(res._getData()) + expect(data.error).toBe('Unauthorized') + }) + + it('should return an error when deleting a manuscript while in draft', async () => { + const { admin } = testFixtures.users + const { collection } = testFixtures.collections + delete collection.status + const res = await requests.sendRequest({ + userId: admin.id, + body, + models, + route, + path, + params: { + collectionId: collection.id, + }, + }) + + expect(res.statusCode).toBe(400) + const data = JSON.parse(res._getData()) + expect(data.error).toBe('You cannot delete manuscripts while in draft.') + }) + + it('should return an error when deleting a manuscript already deleted', async () => { + const { admin } = testFixtures.users + const { collection } = testFixtures.collections + collection.status = 'deleted' + const res = await requests.sendRequest({ + userId: admin.id, + body, + models, + route, + path, + params: { + collectionId: collection.id, + }, + }) + + expect(res.statusCode).toBe(400) + const data = JSON.parse(res._getData()) + expect(data.error).toBe('Manuscript already deleted') + }) +}) diff --git a/packages/component-manuscript/src/components/ManuscriptLayout.js b/packages/component-manuscript/src/components/ManuscriptLayout.js index 589bf76083c0852480e0d3bde0e3a62ed13bfbf9..64fa83a98164bf9fb3cf58498afc8663951da9c4 100644 --- a/packages/component-manuscript/src/components/ManuscriptLayout.js +++ b/packages/component-manuscript/src/components/ManuscriptLayout.js @@ -55,15 +55,27 @@ const ManuscriptLayout = ({ handlingEditors, canHEOnlyReject, toggleHEResponse, + toggleEicDecision, heResponseExpanded, + toggleReviewReport, + eicDecisionExpanded, + reviewReportExpanded, inviteHandlingEditor, toggleReviewerDetails, - isFetchingFromAutosave, recommendationHandler, + isFetchingFromAutosave, + toggleHERecommentation, toggleReviewerResponse, reviewerDetailsExpanded, toggleEditorialComments, + toggleAbstractMetadata, + abstractMetadataExpanded, + toggleConflictsOfInterest, + conflictsOfInterestExpanded, + toggleFilesMetadata, + filesMetadataExpanded, reviewerRecommendations, + HERecommendationExpanded, invitationsWithReviewers, reviewerResponseExpanded, pendingOwnRecommendation, @@ -105,9 +117,15 @@ const ManuscriptLayout = ({ versions={versions} /> <ManuscriptMetadata + abstractMetadataExpanded={abstractMetadataExpanded} + conflictsOfInterestExpanded={conflictsOfInterestExpanded} currentUser={currentUser} + filesMetadataExpanded={filesMetadataExpanded} fragment={fragment} getSignedUrl={getSignedUrl} + toggleAbstractMetadata={toggleAbstractMetadata} + toggleConflictsOfInterest={toggleConflictsOfInterest} + toggleFilesMetadata={toggleFilesMetadata} /> {get(currentUser, 'permissions.canViewEditorialComments', true) && ( @@ -138,11 +156,13 @@ const ManuscriptLayout = ({ ) && ( <ReviewerReports currentUser={currentUser} + expanded={reviewReportExpanded} getSignedUrl={getSignedUrl} invitations={invitationsWithReviewers} isLatestVersion={isLatestVersion} journal={journal} reviewerReports={reviewerRecommendations} + toggle={toggleReviewReport} token={get(currentUser, 'token')} /> )} @@ -248,24 +268,27 @@ const ManuscriptLayout = ({ canHEMakeRecommendationToPublish } canHEOnlyReject={canHEOnlyReject} + expanded={HERecommendationExpanded} formValues={get(formValues, 'editorialRecommendation', {})} highlight={reviewerRecommendations.length > 0} modalKey="heRecommendation" onRecommendationSubmit={ recommendationHandler.onEditorialRecommendation } + toggle={toggleHERecommentation} /> )} - {isLatestVersion && get(currentUser, 'permissions.canMakeDecision', false) && ( <ManuscriptEicDecision collection={collection} + expanded={eicDecisionExpanded} formValues={get(formValues, 'eicDecision')} highlight={editorialRecommendations.length > 0} messagesLabel={messagesLabel} mt={2} submitDecision={recommendationHandler.createRecommendation} + toggle={toggleEicDecision} /> )} </Fragment> diff --git a/packages/component-manuscript/src/components/ManuscriptPage.js b/packages/component-manuscript/src/components/ManuscriptPage.js index 928d9077cc3d789097545716b34e5431ce9d0b14..9b9a3cf79ea7c0111972b05ddffdcded7a430ac3 100644 --- a/packages/component-manuscript/src/components/ManuscriptPage.js +++ b/packages/component-manuscript/src/components/ManuscriptPage.js @@ -49,6 +49,7 @@ import { isFetchingFromAutosave, canMakeHERecommendation, canViewReviewersDetails, + canInviteReviewersAsEiC, canViewEditorialComments, pendingReviewerInvitation, canViewResponseFromAuthor, @@ -196,6 +197,7 @@ export default compose( canMakeDecision: canMakeDecision(state, collection), canEditManuscript: canEditManuscript(state, collection, fragment), canViewReviewersDetails: canViewReviewersDetails(state, collection), + canInviteReviewersAsEiC: canInviteReviewersAsEiC(state), authorCanViewReportsDetails: authorCanViewReportsDetails( state, collection, @@ -291,6 +293,30 @@ export default compose( } }, }), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleAbstractMetadata: toggle, + abstractMetadataExpanded: expanded, + })), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleConflictsOfInterest: toggle, + conflictsOfInterestExpanded: expanded, + })), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleFilesMetadata: toggle, + filesMetadataExpanded: expanded, + })), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleReviewReport: toggle, + reviewReportExpanded: expanded, + })), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleHERecommentation: toggle, + HERecommendationExpanded: expanded, + })), + fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ + toggleEicDecision: toggle, + eicDecisionExpanded: expanded, + })), fromRenderProps(RemoteOpener, ({ toggle, expanded }) => ({ toggleAssignHE: toggle, heExpanded: expanded, @@ -342,8 +368,10 @@ export default compose( fetchUpdatedCollection, editorialRecommendations, fragment, + collection: { status }, currentUser: { isEIC, + isReviewer, isInvitedHE, isInvitedToReview, isHEToManuscript, @@ -370,6 +398,15 @@ export default compose( setEditorInChief(head(res.users)), ) + if (isEIC && status === 'pendingApproval') { + this.props.toggleEicDecision() + } + if (isReviewer && status === 'reviewCompleted') + this.props.toggleReviewReport() + + if (isHEToManuscript && status === 'reviewCompleted') + this.props.toggleHERecommentation() + if (canInviteReviewers) { getPublonsReviewers(fragmentId, setError) } diff --git a/packages/component-manuscript/src/components/ManuscriptVersion.js b/packages/component-manuscript/src/components/ManuscriptVersion.js deleted file mode 100644 index b198686d019f28f5db818cf7c71312896ec7b1e9..0000000000000000000000000000000000000000 --- a/packages/component-manuscript/src/components/ManuscriptVersion.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react' -import { get } from 'lodash' -import { Menu } from '@pubsweet/ui' -import { withRouter } from 'react-router-dom' - -import { parseVersionOptions } from './utils' - -const ManuscriptVersion = ({ - history, - version = {}, - project = { fragments: [] }, -}) => { - const fragments = get(project, 'fragments') - return ( - !!fragments.length && ( - <Menu - inline - onChange={v => - history.push(`/projects/${project.id}/versions/${v}/details`) - } - options={parseVersionOptions(fragments)} - placeholder="Please select" - value={get(version, 'id')} - /> - ) - ) -} - -export default withRouter(ManuscriptVersion) diff --git a/packages/component-manuscript/src/components/ReviewerReportForm.old.js b/packages/component-manuscript/src/components/ReviewerReportForm.old.js index d0285b89b38717cabd9eb46dd0206d985d5775ae..7d673253fb822fc39071549933f3a60193aac9bb 100644 --- a/packages/component-manuscript/src/components/ReviewerReportForm.old.js +++ b/packages/component-manuscript/src/components/ReviewerReportForm.old.js @@ -6,7 +6,7 @@ import { withJournal } from 'xpub-journal' import { required } from 'xpub-validators' import styled, { css } from 'styled-components' import { compose, withHandlers, withProps } from 'recompose' -import { Menu, Icon, Button, ErrorText, ValidatedField } from '@pubsweet/ui' +import { Menu, Button, ErrorText, ValidatedField } from '@pubsweet/ui' import { reduxForm, isSubmitting, @@ -31,6 +31,7 @@ import { updateRecommendation, } from 'pubsweet-components-faraday/src/redux/recommendations' +import { IconButton } from '../../../component-faraday-ui/src/IconButton' import { onReviewSubmit, onReviewChange, @@ -97,9 +98,9 @@ const ReviewerReportForm = ({ Note for the editorial team <i>Not shared with the author</i> </Label> <ActionTextIcon onClick={() => changeField('hasConfidential', false)}> - <Icon primary size={3}> + <IconButton primary size={3}> x - </Icon> + </IconButton> Remove </ActionTextIcon> </Row> diff --git a/packages/component-manuscript/src/components/ReviewerReports.js b/packages/component-manuscript/src/components/ReviewerReports.js index 9d838360390efb16be9bb8a837d299b866c55c8a..3533cbf907017038acf759d4e8e0f575749bc42c 100644 --- a/packages/component-manuscript/src/components/ReviewerReports.js +++ b/packages/component-manuscript/src/components/ReviewerReports.js @@ -33,12 +33,14 @@ const ReviewerReports = ({ token, invitations, reviwerReports, + ...rest }) => ( <ContextualBox label={isLatestVersion ? 'Your Report' : 'Reviewer Reports'} mb={2} rightChildren={<SubmittedReports reports={reports.length} />} startExpanded + {...rest} > {reports.map(report => ( <ReviewerReport diff --git a/packages/component-manuscript/src/components/index.js b/packages/component-manuscript/src/components/index.js index 1afadcd39c73e96ab282ac07a1ca105b73d5e575..246c1ba34418e61bbbb41a0ee9bf64e62bcd3f8b 100644 --- a/packages/component-manuscript/src/components/index.js +++ b/packages/component-manuscript/src/components/index.js @@ -2,11 +2,12 @@ export { default as Authors } from './Authors' export { default as ShowMore } from './ShowMore' export { default as SideBarRoles } from './SideBarRoles' export { default as ManuscriptPage } from './ManuscriptPage' -export { default as SubmitRevision } from './SubmitRevision' export { default as EditorialComment } from './EditorialComment' export { default as ReviewReportCard } from './ReviewReportCard' export { default as ManuscriptLayout } from './ManuscriptLayout' -export { default as ManuscriptVersion } from './ManuscriptVersion' +export { + default as ManuscriptVersion, +} from '../../../component-faraday-ui/src/manuscriptDetails/ManuscriptVersion' export { default as EditorialComments } from './EditorialComments' export { default as ReviewReportsList } from './ReviewReportsList' export { default as ReviewerReportForm } from './ReviewerReportForm' diff --git a/packages/component-manuscript/src/handleRecommendation/README.md b/packages/component-manuscript/src/handleRecommendation/README.md new file mode 100644 index 0000000000000000000000000000000000000000..81084d76afa0df06f8e584c720ec638558a4b753 --- /dev/null +++ b/packages/component-manuscript/src/handleRecommendation/README.md @@ -0,0 +1,57 @@ +## Hindawi Handling Recommendation HOC. + +Injects `createRecommendation` and `onEditorialRecommendation` handlers as props. + +### withHandleRecommendation props + +`recommendationHandler` namespace contains the following fields: + +| Name | Type | Description | +| :------------------------ | :------------------------------------- | :-------------------------------------------- | +| createRecommendation | `(reduxFormValues, modalProps) => any` | creates a recommendation for the manuscript | +| onEditorialRecommendation | `(reduxFormValues, modalProps) => any` | handles the recommendation for the manuscript | + +_Note: The functions must be used withing a modal._ + +```javascript +const HERecommendationPanel = ({ createRecommendation }) => ( + <Modal> + <span>Recommend the manuscript for:</span> + <select> + <option>Approve</option> + <option>Reject</option> + <option>Minor revision</option> + <option>Major revision</option> + </select> + <button + onClick={() => + createRecommendation(reduxFormValues, { ...modalProps, setFetching }) + } + > + Submit + </button> + </Modal> +) + +const EICDecisionPanel = ({ onEditorialRecommendation }) => ( + <Modal> + <span>Take decision to:</span> + <select> + <option>Approve</option> + <option>Reject</option> + <option>Minor revision</option> + <option>Major revision</option> + </select> + <button + onClick={() => + onEditorialRecommendation(reduxFormValues, { + ...modalProps, + setFetching, + }) + } + > + Submit + </button> + </Modal> +) +``` diff --git a/packages/component-manuscript/src/inviteHandlingEditor/README.md b/packages/component-manuscript/src/inviteHandlingEditor/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9badc8fff6048f76569b7df6f30afaf868e7b119 --- /dev/null +++ b/packages/component-manuscript/src/inviteHandlingEditor/README.md @@ -0,0 +1,51 @@ +## Hindawi Handling Editor Invite HOC. + +Injects `assignHE`, `revokeHE` and `onHEResponse` handlers as props. + +### withInviteHandlingEditor props + +`inviteHandlingEditor` namespace contains the following fields: + +| Name | Type | Description | +| :----------- | :------------------------------------- | :----------------------------------------------- | +| assignHE | `(email, modalProps) => any` | sends an invitation to the handling editor | +| revokeHE | `(invitationId, modalProps) => any` | revokes a sent invitation to the handling editor | +| onHEResponse | `(reduxFormValues, modalProps) => any` | handles the handling editor's response | + +_Note: The functions must be used withing a modal._ + +```javascript +const EditorInChiefPanel = ({ assignHE, revokeHE }) => ( + <Modal> + <span>Handlin d'Editor</span> + <button onClick={() => assignHE(email, { ...modalProps, setFetching })}> + Resend Invitation + </button> + <button + onClick={() => revokeHE(invitationId, { ...modalProps, setFetching })} + > + Cancel Invitation + </button> + </Modal> +) + +const HandlingEditorPanel = ({ onHeResponse }) => ( + <Modal> + <span>Accept invitation?</span> + <button + onClick={() => + onHeResponse(reduxFormValues, { ...modalProps, setFetching }) + } + > + Yes + </button> + <button + onClick={() => + onHeResponse(reduxFormValues, { ...modalProps, setFetching }) + } + > + No + </button> + </Modal> +) +``` diff --git a/packages/component-manuscript/src/inviteReviewer/README.md b/packages/component-manuscript/src/inviteReviewer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..74f050b225d985e666212a0909088bcb0c223c25 --- /dev/null +++ b/packages/component-manuscript/src/inviteReviewer/README.md @@ -0,0 +1,85 @@ +## Hindawi Reviewer Invite HOC. + +Injects `onInviteReviewer`, `onInvitePublonReviewer`, `onResendInviteReviewer`, `onRevokeInviteReviewer` and `onReviewerResponse` handlers as props. + +### withInviteReviewer props + +`inviteReviewer` namespace contains the following fields: + +| Name | Type | Description | +| :--------------------- | :------------------------------------- | :--------------------------------------------------- | +| onInviteReviewer | `(reduxFormValues, modalProps) => any` | sends an invitation to the reviewer | +| onInvitePublonReviewer | `(reduxFormValues, modalProps) => any` | sends an invitation to a Publon reviewer | +| onResendInviteReviewer | `(email, modalProps) => any` | resends an invitation to an already invited reviewer | +| onRevokeInviteReviewer | `(invitationId, modalProps) => any` | cancels an invitation to an invited reviewer | +| onReviewerResponse | `(reduxFormValues, modalProps) => any` | handles the reviewer response to the invitation | + +_Note: The functions must be used withing a modal_ + +```javascript +const InviteReviewer = ({ + onInviteReviewer, + onInvitePublonReviewer, + onResendInviteReviewer, + onRevokeInviteReviewer, +}) => ( + <Modal> + <span>Reviewers list</span> + <div> + <span>Revi Ewerin</span> + <button + onClick={() => onInviteReviewer(values, { ...modalProps, setFetching })} + > + Invite + </button> + </div> + <div> + <span>Publonus re' Vyewer</span> + <button + onClick={() => + onInvitePublonReviewer(reviewerData, { ...modalProps, setFetching }) + } + > + Invite + </button> + </div> + <div> + <span>Rev d'Iewer</span> + <button + onClick={() => + onResendInviteReviewer(email, { ...modalProps, setFetching }) + } + > + Resend invitation + </button> + <button + onClick={() => + onRevokeInviteReviewer(invitationId, { ...modalProps, setFetching }) + } + > + Cancel invitation + </button> + </div> + </Modal> +) + +const Invitation = ({ onReviewerResponse }) => ( + <Modal> + <span>Accept invitation?</span> + <button + onClick={() => + onReviewerResponse(reduxFormValues, { ...modalProps, setFetching }) + } + > + Yes + </button> + <button + onClick={() => + onReviewerResponse(reduxFormValues, { ...modalProps, setFetching }) + } + > + No + </button> + </Modal> +) +``` diff --git a/packages/component-manuscript/src/submitRevision/README.md b/packages/component-manuscript/src/submitRevision/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0ba42dd4bd5aaaf5cb96a90894f54442e4075967 --- /dev/null +++ b/packages/component-manuscript/src/submitRevision/README.md @@ -0,0 +1,81 @@ +## Hindawi Submit Revision HOC. + +The `withSubmitRevision` HOC contains the logic for submitting a manuscript version. It contains the following utility HOCs: + +* `withFetching` +* `withFilePreview` +* `withFileDownload` +* `withModal` + +..as well as other `recompose` HOCs. + +### withSubmitRevision props + +`submitRevision` namespace contains the following fields: +Name|Type|Description +---|---|--- +collection|`object`|Object containing the selected collection +fragment|`object`|Object containing the selected fragment +journal|`object`|Deprecated object containing manuscript types +currentUser|`object`|Object containing the currently logged user +initialValues|`{...fragment}`| Object containing the initial state of the fragment +isEditingAuthor|`bool`|Value representing if the current user is the editing author +canSubmit|`bool`|Value representing if the form doesn't have errors and can be submitted +hasFormError|`bool`|Value representing if the form has any errors +formErrors|`bool`|Value representing if the form has any errors +responseFile|`file`|Value containing the revision's file for the reviewer's response +addAuthor|`({ author, collectionId: string, fragmentId: string }) => any`|An async call to add an author to the manuscript +deleteAuthor|`({ authorId, fragmentId, collectionId }) => any`|An async call to remove an existing author from the manuscript +onAuthorEdit|`index => authorEditIndex: number`|Chages the form to allow editing of the selected author and returns his index +addFile|`({ file: object, type: string, fragment: object }) => any`|Uploads the file to the server +deleteFile|`({ fileId: string, type: string }) => any`|Removes the file from the server +getSignedUrl|`(id: string) => Promise({signedURL: string})`|An async call that returns the securized S3 file url +addResponseFile|`file => any`|Uploads the file then updates the form +deleteResponseFile|`file => any`|Deletes the file from the server then updates the form +onChange|`(reduxFormValues, dispatch, { collection, fragment }) => any`|Used to autosave new fragment when fields change +validate|`({ editAuthors: , files: array, responseToReviewers: object }) => errors: object`|Checks the form for required fields and returns the errors +onSubmit|`(reduxFormValues, dispatch, { history, fragment, collection, showModal, setFetching, canSubmit })`|Handles the submission of a new manuscript version + +```javascript +const ManuscriptLayout = ({submitRevision}) =>( + <SubmitRevision {...submitRevision} /> +) + +const SubmitRevision = ({...}) => ( + <Root> + <DetailsAndAuthors + addAuthor={addAuthor} + changeForm={changeForm} + collection={collection} + deleteAuthor={deleteAuthor} + formErrors={formErrors} + fragment={fragment} + isAuthorEdit={isEditingAuthor} + manuscriptTypes={journal.manuscriptTypes} + onAuthorEdit={onAuthorEdit} + /> + + <ManuscriptFiles + changeForm={changeForm} + collection={collection} + deleteFile={deleteFile} + downloadFile={downloadFile} + formErrors={formErrors} + formName="revision" + fragment={fragment} + getSignedUrl={getSignedUrl} + previewFile={previewFile} + token={currentUser.token} + uploadFile={addFile} + /> + + <ResponseToReviewer + file={responseFile} + getSignedUrl={getSignedUrl} + isFetching={isFetching} + onDelete={deleteResponseFile} + onUpload={addResponseFile} + token={currentUser.token} + /> + </Root> +``` diff --git a/packages/component-modal/src/components/ConfirmationModal.js b/packages/component-modal/src/components/ConfirmationModal.js index 01e52582e3327b54a579e05cf5e19973b47422cc..d516df52dc63b01f937b9802e88d7c1c70bdc21c 100644 --- a/packages/component-modal/src/components/ConfirmationModal.js +++ b/packages/component-modal/src/components/ConfirmationModal.js @@ -2,7 +2,8 @@ import React from 'react' import { th } from '@pubsweet/ui-toolkit' import styled, { css } from 'styled-components' import { compose, withHandlers } from 'recompose' -import { Icon, Button, Spinner } from '@pubsweet/ui' +import { Button, Spinner } from '@pubsweet/ui' +import { IconButton } from '../../../component-faraday-ui/src/IconButton' const ConfirmationModal = ({ title, @@ -17,7 +18,7 @@ const ConfirmationModal = ({ }) => ( <Root> <CloseIcon data-test-id="icon-modal-hide" onClick={onClose}> - <Icon primary>x</Icon> + <IconButton primary>x</IconButton> </CloseIcon> {title && <Title dangerouslySetInnerHTML={{ __html: title }} />} {subtitle && <Subtitle dangerouslySetInnerHTML={{ __html: subtitle }} />} diff --git a/packages/component-modal/src/components/SubmissionModal.js b/packages/component-modal/src/components/SubmissionModal.js index f2223512482016ef96d14a8e077759dbbd5883d8..cc1134b5933de3d39dae51fa56b7d5713cc20048 100644 --- a/packages/component-modal/src/components/SubmissionModal.js +++ b/packages/component-modal/src/components/SubmissionModal.js @@ -1,7 +1,8 @@ import React from 'react' import { th } from '@pubsweet/ui-toolkit' import styled, { css } from 'styled-components' -import { Icon, Button, Spinner } from '@pubsweet/ui' +import { Button, Spinner } from '@pubsweet/ui' +import { IconButton } from '../../../component-faraday-ui/src/IconButton' const SubmissionModal = ({ title, @@ -17,7 +18,7 @@ const SubmissionModal = ({ }) => ( <Root> <CloseIcon onClick={hideModal}> - <Icon primary>x</Icon> + <IconButton primary>x</IconButton> </CloseIcon> <Title>{title}</Title> <Text> diff --git a/packages/component-user/app/components/OpenUserForm.js b/packages/component-user/app/components/OpenUserForm.js index ae406374e15c9bb5b2696faf626c5d94c12a5820..481a3b503ed48a9d79d803c22403f8a9bbe7b3bf 100644 --- a/packages/component-user/app/components/OpenUserForm.js +++ b/packages/component-user/app/components/OpenUserForm.js @@ -18,7 +18,13 @@ const OpenUserForm = ({ edit, user, onSubmit, modalKey }) => ( > {showModal => edit ? ( - <IconButton icon="edit-2" iconSize={2} onClick={showModal} pt={1 / 2} /> + <IconButton + fontIcon="editIcon" + paddingBottom={1.5} + iconSize={2} + onClick={showModal} + pt={1 / 2} + /> ) : ( <ActionLink icon="plus" onClick={showModal}> ADD USER diff --git a/packages/component-user/app/pages/AdminUsers.js b/packages/component-user/app/pages/AdminUsers.js index 568ffd9c15a7ea9c48f9ab69bc82015c74b8c411..8249f2d45173f2804c0c65649354423615d3152b 100644 --- a/packages/component-user/app/pages/AdminUsers.js +++ b/packages/component-user/app/pages/AdminUsers.js @@ -43,7 +43,8 @@ const Users = ({ <Item alignItems="center"> <ActionLink data-test-id="go-to-dashboard" - icon="arrow-left" + fontIcon="arrowLeft" + paddingBottom={1.2} mr={2} onClick={history.goBack} > diff --git a/packages/component-user/package.json b/packages/component-user/package.json index 169e9f92164fc787f93ba0b4d82f3ad6c343f6ae..63cc0e68a972a1b9415f366ae2ce47be5b976e0e 100644 --- a/packages/component-user/package.json +++ b/packages/component-user/package.json @@ -43,12 +43,12 @@ }, "devDependencies": { "apidoc": "^0.17.6", - "jest": "^22.1.1", + "jest": "^23.6.0", "supertest": "^3.0.0" }, "jest": { "verbose": true, - "testRegex": "/src/.*.test.js$" + "testRegex": "/server/.*.test.js$" }, "publishConfig": { "access": "public" diff --git a/packages/component-user/server/tests/activateUser.test.js b/packages/component-user/server/tests/activateUser.test.js new file mode 100644 index 0000000000000000000000000000000000000000..20d5424008da2e801566097cc644cfe11eaa59ad --- /dev/null +++ b/packages/component-user/server/tests/activateUser.test.js @@ -0,0 +1,5 @@ +describe('activate use case', () => { + it('should work', () => { + expect(true).toBeFalsy() + }) +}) diff --git a/packages/component-wizard/src/components/StepThree.js b/packages/component-wizard/src/components/StepThree.js index 4b7666551a992a1a389bfdd0e050ee00a8bd3a19..209cb38ed9c5d3a9640e05de39f1dd80be99a45d 100644 --- a/packages/component-wizard/src/components/StepThree.js +++ b/packages/component-wizard/src/components/StepThree.js @@ -3,7 +3,12 @@ import { get } from 'lodash' import { Field } from 'redux-form' import styled from 'styled-components' import { H2, Icon } from '@pubsweet/ui' -import { Row, Text, WizardFiles } from 'pubsweet-component-faraday-ui' +import { + Row, + Text, + WizardFiles, + IconButton, +} from 'pubsweet-component-faraday-ui' import { Empty } from './' @@ -26,10 +31,8 @@ const StepThree = ({ plus </CustomIcon>{' '} to upload. Use the{' '} - <CustomIcon secondary size={2}> - menu - </CustomIcon>{' '} - icon to reorder or move files to a different type. + <CustomIconButton fontIcon="moveIcon" noHover secondary size={2} /> icon + to reorder or move files to a different type. </Text> </Row> @@ -58,4 +61,10 @@ export default StepThree const CustomIcon = styled(Icon)` vertical-align: sub; ` + +const CustomIconButton = styled(IconButton)` + vertical-align: sub; + cursor: default; + display: inline-flex; +` // #endregion diff --git a/packages/component-wizard/src/components/SubmissionWizard.js b/packages/component-wizard/src/components/SubmissionWizard.js index 2280a49a7cf5e13c423bd0d32021021b96a06dcc..78285ca3423014089ae1475ac140afc17d224937 100644 --- a/packages/component-wizard/src/components/SubmissionWizard.js +++ b/packages/component-wizard/src/components/SubmissionWizard.js @@ -17,7 +17,7 @@ import { withHandlers, withStateHandlers, } from 'recompose' -import { Row, MultiAction } from 'pubsweet-component-faraday-ui' +import { Row, MultiAction, IconButton } from 'pubsweet-component-faraday-ui' import { withModal } from 'pubsweet-component-modal/src/components' import { getUserToken } from 'pubsweet-component-faraday-selectors/src' @@ -85,7 +85,15 @@ const Wizard = ({ data-test-id="submission-back" mr={1} onClick={isFirstStep ? history.goBack : prevStep} - >{`< BACK`}</Button> + > + <IconButton + fontIcon="arrowLeft" + mb={0.1} + paddingBottom={1.2} + paddingRight={0.9} + /> + Back + </Button> <Button data-test-id="submission-next" ml={isFirstStep ? 0 : 1} @@ -93,6 +101,7 @@ const Wizard = ({ primary > {getButtonText()} + <IconButton fontIcon="arrowRight" mb={0.1} paddingBottom={0.5} /> </Button> </Fragment> )} @@ -174,7 +183,7 @@ export default compose( if (isEditMode && isLastStep) { return 'SAVE CHANGES' } - return isLastStep ? `SUBMIT MANUSCRIPT` : `NEXT STEP >` + return isLastStep ? `SUBMIT MANUSCRIPT` : `NEXT STEP` }, }), withModal(({ isFetching }) => ({ diff --git a/packages/components-faraday/src/components/Dashboard/Dashboard.js b/packages/components-faraday/src/components/Dashboard/Dashboard.js index a03dce5045de7b34967ca35b9bc7c8d7ec24180c..b9d1d50e41ecf0309ff0babf9c2ecad29f2293c2 100644 --- a/packages/components-faraday/src/components/Dashboard/Dashboard.js +++ b/packages/components-faraday/src/components/Dashboard/Dashboard.js @@ -1,13 +1,14 @@ import React, { Fragment } from 'react' import { compose, withProps } from 'recompose' - import { DashboardItems, DashboardFilters } from './' const Dashboard = ({ journal, + isAdmin, isFetching, dashboardItems, deleteCollection, + deleteManuscript, getFilterOptions, changeFilterValue, getDefaultFilterValue, @@ -18,8 +19,11 @@ const Dashboard = ({ getDefaultFilterValue={getDefaultFilterValue} getFilterOptions={getFilterOptions} /> + <DashboardItems deleteCollection={deleteCollection} + deleteManuscript={deleteManuscript} + isAdmin={isAdmin} isFetching={isFetching} list={dashboardItems} /> diff --git a/packages/components-faraday/src/components/Dashboard/DashboardItems.js b/packages/components-faraday/src/components/Dashboard/DashboardItems.js index 72d16891c5a40b967a4f7e5491dd9180c05e186d..5b9c405930c37846ddfb9e8e346d06d6efe2f4ae 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardItems.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardItems.js @@ -21,8 +21,10 @@ const DashboardItem = compose( const DashboardItems = ({ list, onClick, + isAdmin, isFetching, canViewReports, + deleteManuscript, deleteCollection, }) => ( <Root data-test-id="dashboard-list-items"> @@ -35,6 +37,8 @@ const DashboardItems = ({ <HideLoading key={collection.id}> <DashboardItem collection={collection} + deleteManuscript={deleteManuscript} + isAdmin={isAdmin} isFetching={isFetching} key={collection.id} onClick={onClick} diff --git a/packages/components-faraday/src/components/Dashboard/DashboardPage.js b/packages/components-faraday/src/components/Dashboard/DashboardPage.js index 7f96042f9cf5d84f6625ef6a1c912aa8cbf2d51b..689623146e2eda389d53679b13cbc8079221a5a8 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardPage.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardPage.js @@ -3,11 +3,12 @@ import { connect } from 'react-redux' import { actions } from 'pubsweet-client' import { withJournal } from 'xpub-journal' import { ConnectPage } from 'xpub-connect' +import { get } from 'lodash' import { withRouter } from 'react-router-dom' import { selectCurrentUser } from 'xpub-selectors' -import { compose, withHandlers, withContext } from 'recompose' import { handleError, withFetching } from 'pubsweet-component-faraday-ui' - +import { compose, withHandlers, withContext, shouldUpdate } from 'recompose' +import { update } from 'pubsweet-client/src/helpers/api' import { getUserPermissions, newestFirstParseDashboard, @@ -16,6 +17,9 @@ import { import { Dashboard } from './' import { priorityFilter, orderFilter, withFiltersHOC } from '../Filters' +const deleteManuscript = ({ collectionId, comments }) => + update(`/collections/${collectionId}/archive`, { comments }) + export default compose( ConnectPage(() => [ actions.getCollections(), @@ -35,6 +39,7 @@ export default compose( collections, currentUser, userPermissions, + isAdmin: get(state, 'currentUser.user.admin', 'false'), } }, { @@ -42,6 +47,12 @@ export default compose( deleteCollection: actions.deleteCollection, }, ), + shouldUpdate((props, nextProps) => + props.collections.some( + (collection, index) => + collection.status !== nextProps.collections[index].status, + ), + ), withRouter, withJournal, withFetching, @@ -76,5 +87,22 @@ export default compose( handleError(setModalError)(err) }) }, + deleteManuscript: ({ getCollections }) => ( + { comments }, + dispatch, + { setFetching, setError, hideModal, collectionId }, + ) => { + setFetching(true) + deleteManuscript({ collectionId, comments }) + .then(() => { + setFetching(false) + hideModal() + getCollections() + }) + .catch(e => { + setFetching(false) + handleError(setError)(e) + }) + }, }), )(Dashboard) diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep0.js b/packages/components-faraday/src/components/SignUp/SignUpStep0.js index dc60d273a5a3ea675d019a15be37db17a0016c85..e030a1a9c9f420639f2c189ba95835f277a5f3fa 100644 --- a/packages/components-faraday/src/components/SignUp/SignUpStep0.js +++ b/packages/components-faraday/src/components/SignUp/SignUpStep0.js @@ -116,7 +116,6 @@ const Step0 = ({ type, error, journal, handleSubmit, initialValues }) => > PROCEED TO SET {type === 'signup' && 'EMAIL AND'} PASSWORD </Button> - <Row mt={3}> <Text display="flex"> Already have an account? diff --git a/packages/components-faraday/src/components/UserProfile/UserProfilePage.js b/packages/components-faraday/src/components/UserProfile/UserProfilePage.js index 6c507ad66e750a5c49d9faa783230e46d5d75955..1a67344ad773d184caf0675afe3a2ba5ba8581f7 100644 --- a/packages/components-faraday/src/components/UserProfile/UserProfilePage.js +++ b/packages/components-faraday/src/components/UserProfile/UserProfilePage.js @@ -28,7 +28,11 @@ const UserProfilePage = ({ }) => ( <Root> <Row alignItems="center" justify="flex-start"> - <ActionLink icon="arrow-left" onClick={() => history.push('/dashboard')}> + <ActionLink + fontIcon="arrowLeft" + onClick={() => history.push('/dashboard')} + paddingBottom={1.2} + > Dashboard </ActionLink> </Row> diff --git a/packages/hindawi-theme/src/elements/Button.js b/packages/hindawi-theme/src/elements/Button.js index e6f844be07b67b06e48fdbbacbf85942fc5ef2d6..42e92f9f206acc0d5bae98a7bedd995b9d98e15f 100644 --- a/packages/hindawi-theme/src/elements/Button.js +++ b/packages/hindawi-theme/src/elements/Button.js @@ -80,6 +80,9 @@ const buttonSize = props => { } export default css` + align-items: center; + display: flex; + justify-content: center; padding: 0 calc(${th('gridUnit')}); text-transform: uppercase; diff --git a/packages/hindawi-theme/src/elements/Checkbox.js b/packages/hindawi-theme/src/elements/Checkbox.js index 528abbf99fd1a0c02c068ca07dbdda5ccea7e24f..2037a2d788f6f408f52096907df3ca539caf2e7a 100644 --- a/packages/hindawi-theme/src/elements/Checkbox.js +++ b/packages/hindawi-theme/src/elements/Checkbox.js @@ -5,11 +5,6 @@ const checkIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16 <path fill="#fff" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/> </svg>` -// const partialCheck = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> -// <path fill="#939393" fill-rule="evenodd" d="M1.994 0A1.995 1.995 0 0 0 0 1.994v12.012C0 15.107.895 16 1.994 16h12.012A1.995 1.995 0 0 0 16 14.006V1.994A1.995 1.995 0 0 0 14.006 0H1.994zm6.962 7.167h4.388c.201-.002.391.658.391.86 0 .202-.19.866-.391.864H2.78c-.2.01-.343-.647-.352-.847-.01-.2.119-.867.318-.877h6.209z"/> -// </svg> -// ` - const Checkbox = css` display: flex; font-family: ${th('fontReading')}; diff --git a/packages/hindawi-theme/src/fonts/hindawi-icons.eot b/packages/hindawi-theme/src/fonts/hindawi-icons.eot new file mode 100755 index 0000000000000000000000000000000000000000..685ec8cb55aa8ceb660c7914e5cd9fc60d8b3df6 Binary files /dev/null and b/packages/hindawi-theme/src/fonts/hindawi-icons.eot differ diff --git a/packages/hindawi-theme/src/fonts/hindawi-icons.ttf b/packages/hindawi-theme/src/fonts/hindawi-icons.ttf new file mode 100755 index 0000000000000000000000000000000000000000..655ab49f6144c26f134f2ba3020e3cb3911ce87d Binary files /dev/null and b/packages/hindawi-theme/src/fonts/hindawi-icons.ttf differ diff --git a/packages/hindawi-theme/src/fonts/hindawi-icons.woff b/packages/hindawi-theme/src/fonts/hindawi-icons.woff new file mode 100755 index 0000000000000000000000000000000000000000..edb71ad844924f26a51ff60c987718e3ef8ada7a Binary files /dev/null and b/packages/hindawi-theme/src/fonts/hindawi-icons.woff differ diff --git a/packages/hindawi-theme/src/fonts/index.css b/packages/hindawi-theme/src/fonts/index.css index 5816d3b0df6a6abc10583f82d44cd21e250e9164..55986d1b44e459fa3a2e5f799669c8929cdc5507 100644 --- a/packages/hindawi-theme/src/fonts/index.css +++ b/packages/hindawi-theme/src/fonts/index.css @@ -25,3 +25,150 @@ font-weight: normal; src: url('./MYRIADPRO-CONDIT.woff') format('woff'); } + +@font-face { + font-family: 'hindawi-icons'; + font-style: normal; + font-weight: normal; + src: + url('./hindawi-icons.woff') format('woff'), + url('./hindawi-icons.ttf') format('truetype'), + url('./hindawi-icons.eot') format('embedded-opentype'); +} + +.fontIconStyle::before { + display: flex; + height: 16px; + justify-content: center; + width: 16px; +} + +.saveIcon::before { + content: '\e900'; + font-family: hindawi-icons, sans-serif; +} + +.deleteIcon::before { + content: '\e901'; + font-family: hindawi-icons, sans-serif; +} + +.moveIcon::before { + content: '\e902'; + font-family: hindawi-icons, sans-serif; +} + +.linkIcon::before { + content: '\e903'; + font-family: hindawi-icons, sans-serif; + padding: 0 0 5px 5px; +} + +.editIcon::before { + content: '\e904'; + font-family: hindawi-icons, sans-serif; +} + +.downloadIcon::before { + content: '\e905'; + font-family: hindawi-icons, sans-serif; +} + +.previewIcon::before { + content: '\e906'; + font-family: hindawi-icons, sans-serif; +} + +.removeIcon::before { + content: '\e907'; + font-family: hindawi-icons, sans-serif; +} + +.infoIcon::before { + content: '\e908'; + font-family: hindawi-icons, sans-serif; +} + +.tooltipIcon::before { + content: '\e909'; + font-family: hindawi-icons, sans-serif; +} + +.downloadZip::before { + content: '\e90a'; + font-family: hindawi-icons, sans-serif; +} + +.checked-box::before { + content: '\e90b'; + font-family: hindawi-icons, sans-serif; +} + +.more-default::before { + content: '\e90c'; + font-family: hindawi-icons, sans-serif; +} + +.checkIcon::before { + content: '\e90d'; + font-family: hindawi-icons, sans-serif; +} + +.resendIcon::before { + content: '\e90e'; + font-family: hindawi-icons, sans-serif; +} + +.arrowLeft::before { + content: '\e90f'; + font-family: hindawi-icons, sans-serif; +} + +.arrowRight::before { + content: '\e90f'; + font-family: hindawi-icons, sans-serif; + transform: rotate(180deg); +} + +.arrowDown::before { + content: '\e910'; + font-family: hindawi-icons, sans-serif; +} + +.arrowUp::before { + content: '\e910'; + font-family: hindawi-icons, sans-serif; + transform: rotate(180deg); +} + +.dashboardEdit::before { + content: '\e904'; + font-family: hindawi-icons, sans-serif; +} + +.arrowEndLeft::before { + content: "\e912"; + font-family: hindawi-icons, sans-serif; + transform: rotate(180deg); +} + +.arrowEndRight::before { + content: "\e912"; + font-family: hindawi-icons, sans-serif; +} + +.caratLeft::before { + content: "\e911"; + font-family: hindawi-icons, sans-serif; + transform: rotate(180deg); +} + +.caratRight::before { + content: "\e911"; + font-family: hindawi-icons, sans-serif; +} + +.technicalChecks::before { + content: "\e913"; + font-family: hindawi-icons, sans-serif; +} diff --git a/packages/xpub-faraday/app/config/journal/statuses.js b/packages/xpub-faraday/app/config/journal/statuses.js index daa87a04be839c0aadd01a46c595705604b966aa..5e1a91caab505dfb6aba200179287f73d9fd26a9 100644 --- a/packages/xpub-faraday/app/config/journal/statuses.js +++ b/packages/xpub-faraday/app/config/journal/statuses.js @@ -308,4 +308,27 @@ module.exports = { needsAttention: false, }, }, + deleted: { + importance: 16, + author: { + label: 'Deleted', + needsAttention: false, + }, + handlingEditor: { + label: 'Deleted', + needsAttention: false, + }, + editorInChief: { + label: 'Deleted', + needsAttention: false, + }, + reviewer: { + label: 'Deleted', + needsAttention: false, + }, + admin: { + label: 'Deleted', + needsAttention: false, + }, + }, } diff --git a/packages/xpub-faraday/config/authsome-helpers.js b/packages/xpub-faraday/config/authsome-helpers.js index 39f753c539a754d22829a00a0397277236eb40b1..6433ffb06d434ae3ee146773ce57a993019c5104 100644 --- a/packages/xpub-faraday/config/authsome-helpers.js +++ b/packages/xpub-faraday/config/authsome-helpers.js @@ -37,6 +37,9 @@ const isOwner = ({ user: { id }, object }) => { return !!object.owners.find(own => own.id === id) } +const isLastFragment = (collection, fragment) => + get(fragment, 'id', '') === last(get(collection, 'fragments', [])) + const hasPermissionForObject = async ({ user, object, Team, roles = [] }) => { const userPermissions = await getUserPermissions({ user, @@ -245,7 +248,10 @@ const getCollections = async ({ user, models }) => { } }), )).filter(Boolean) - return chain(collections) + const filterArchivedCollection = collections.filter( + collection => collection.status !== 'deleted', + ) + return chain(filterArchivedCollection) .sortBy(c => c.currentVersion.version) .reverse() .uniqBy('id') @@ -333,6 +339,7 @@ module.exports = { parseUser, getUsersList, getCollections, + isLastFragment, isHandlingEditor, getUserPermissions, setCollectionStatus, diff --git a/packages/xpub-faraday/config/authsome-mode.js b/packages/xpub-faraday/config/authsome-mode.js index 27a22b8b852685e2b8923f80e68f8471f5a5d19e..9bba3c507b3fc83fc986a4d7680ab0ce25d80d2e 100644 --- a/packages/xpub-faraday/config/authsome-mode.js +++ b/packages/xpub-faraday/config/authsome-mode.js @@ -1,11 +1,10 @@ const config = require('config') -const logger = require('@pubsweet/logger') const { get, pickBy, last, has, pick } = require('lodash') const statuses = config.get('statuses') const helpers = require('./authsome-helpers') -function unauthenticatedUser(operation, object) { +function unauthenticatedUser(operation, object, userId) { // Public/unauthenticated users can GET /collections, filtered by 'published' if (operation === 'GET' && object && object.path === '/collections') { return { @@ -17,8 +16,7 @@ function unauthenticatedUser(operation, object) { // Public/unauthenticated users can GET /collections/:id/fragments, filtered by 'published' if ( operation === 'GET' && - object && - object.path === '/collections/:id/fragments' + get(object, 'path') === '/collections/:id/fragments' ) { return { filter: fragments => fragments.filter(fragment => fragment.published), @@ -54,9 +52,27 @@ function unauthenticatedUser(operation, object) { return true } } + + // allow users to authenticate + if ( + operation === 'POST' && + get(object, 'type') === 'user' && + get(object, 'id') === userId + ) { + return true + } + return false } +const isCollectionInStatuses = (c, statuses) => + statuses.includes(get(c, 'status', 'draft')) + +const filterCollectionInStatuses = (statuses = []) => c => + !statuses.includes(get(c, 'status', 'draft')) + +const filterNoFragmentCollections = c => c.fragments.length !== 0 + const createPaths = ['/collections', '/collections/:collectionId/fragments'] async function applyAuthenticatedUserPolicy(user, operation, object, context) { @@ -66,13 +82,17 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) { } if (get(object, 'type') === 'collection') { + if (isCollectionInStatuses(object, ['draft', 'technicalChecks'])) { + if (!helpers.isOwner({ user, object })) { + return false + } + } return { filter: async collection => { const userPermissions = await helpers.getUserPermissions({ user, Team: context.models.Team, }) - const fragmentPermissions = userPermissions .filter( up => up.objectType === 'fragment' && up.role === 'reviewer', @@ -284,12 +304,76 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) { // If no individual permissions exist (above), fallback to unauthenticated // user's permission - return unauthenticatedUser(operation, object) + return unauthenticatedUser(operation, object, user.id) +} + +async function applyAdminPolicy(user, operation, object, context) { + if (operation === 'GET') { + if (get(object, 'type') === 'collection') { + return { + filter: collection => ({ + ...collection, + visibleStatus: get(statuses, `${collection.status}.admin.label`), + }), + } + } + + if (get(object, 'path') === '/api/users') { + return helpers.getUsersList({ UserModel: context.models.User, user }) + } + + if (get(object, 'type') === 'user') { + return helpers.parseUser({ user: object }) + } + + if (get(object, 'path') === '/api/collections') { + const collections = await context.models.Collection.all() + return Promise.all( + collections + .filter(filterCollectionInStatuses(['deleted'])) + .filter(filterNoFragmentCollections) + .map(async coll => { + const latestFragmentId = coll.fragments[coll.fragments.length - 1] + coll.currentVersion = await context.models.Fragment.find( + latestFragmentId, + ) + const status = get(coll, 'status', 'draft') + coll.visibleStatus = get(statuses, `${status}.admin.label`) + return coll + }), + ) + } + } + if (operation === 'PATCH') { + if (get(object, 'current.type') === 'collection') { + return !isCollectionInStatuses(get(object, 'current'), [ + 'rejected', + 'accepted', + 'withdrawn', + ]) + } + if (get(object, 'current.type') === 'fragment') { + const collection = await context.models.Collection.find( + get(object, 'current.collectionId'), + ) + return ( + helpers.isLastFragment(collection, get(object, 'current')) && + !isCollectionInStatuses(collection, [ + 'rejected', + 'accepted', + 'withdrawn', + ]) + ) + } + } + return true } async function applyEditorInChiefPolicy(user, operation, object, context) { if (operation === 'GET') { if (get(object, 'type') === 'collection') { + if (isCollectionInStatuses(object, ['draft', 'technicalChecks'])) + return false return { filter: collection => ({ ...collection, @@ -301,6 +385,14 @@ async function applyEditorInChiefPolicy(user, operation, object, context) { } } + if (get(object, 'type') === 'fragment') { + const collection = await context.models.Collection.find( + get(object, 'collectionId'), + ) + if (isCollectionInStatuses(collection, ['draft', 'technicalChecks'])) + return false + } + if (get(object, 'path') === '/api/users') { return helpers.getUsersList({ UserModel: context.models.User, user }) } @@ -311,27 +403,49 @@ async function applyEditorInChiefPolicy(user, operation, object, context) { if (get(object, 'path') === '/api/collections') { const collections = await context.models.Collection.all() - const modifiedCollections = await Promise.all( - collections.map(async coll => { - if (coll.fragments.length === 0) { - logger.error(`Collection ${coll.id} does not have any fragments!`) - - return null - } - const latestFragmentId = coll.fragments[coll.fragments.length - 1] - coll.currentVersion = await context.models.Fragment.find( - latestFragmentId, + return Promise.all( + collections + .filter( + filterCollectionInStatuses(['draft', 'technicalChecks', 'deleted']), ) - const status = get(coll, 'status', 'draft') - coll.visibleStatus = get(statuses, `${status}.editorInChief.label`) - - return coll - }), + .filter(filterNoFragmentCollections) + .map(async coll => { + const latestFragmentId = coll.fragments[coll.fragments.length - 1] + coll.currentVersion = await context.models.Fragment.find( + latestFragmentId, + ) + const status = get(coll, 'status', 'draft') + coll.visibleStatus = get(statuses, `${status}.editorInChief.label`) + return coll + }), ) - - return modifiedCollections.filter(Boolean) } } + if (operation === 'PATCH') { + if (get(object, 'current.type') === 'collection') { + return false + } + if (get(object, 'current.type') === 'fragment') { + return false + } + if (get(object, 'path') === '/api/collections/:collectionId/archive') { + return false + } + } + if (operation === 'POST') { + if ( + get(object, 'path') === + '/api/collections/:collectionId/fragments/:fragmentId/invitations' + ) + return false + } + if (operation === 'DELETE') { + if ( + get(object, 'path') === + '/api/collections/:collectionId/fragments/:fragmentId/invitations/:invitationId' + ) + return false + } return true } @@ -345,14 +459,18 @@ const authsomeMode = async (userId, operation, object, context) => { } if (!userId) { - return unauthenticatedUser(operation, object) + return unauthenticatedUser(operation, object, userId) } // It's up to us to retrieve the relevant models for our // authorization/authsome mode, e.g. const user = await context.models.User.find(userId) - if (get(user, 'admin') || get(user, 'editorInChief')) { + if (get(user, 'admin')) { + return applyAdminPolicy(user, operation, object, context) + } + + if (get(user, 'editorInChief')) { return applyEditorInChiefPolicy(user, operation, object, context) } diff --git a/yarn.lock b/yarn.lock index 5782fb361f52f2bcd630d7d2d82eda1d07e4acff..2eea57c1648738bddcff0b6825fe5f5c660b9ce1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1426,6 +1426,14 @@ babel-jest@^22.4.0: babel-plugin-istanbul "^4.1.5" babel-preset-jest "^22.2.0" +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== + dependencies: + babel-plugin-istanbul "^4.1.6" + babel-preset-jest "^23.2.0" + babel-loader@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" @@ -1458,6 +1466,16 @@ babel-plugin-istanbul@^4.0.0, babel-plugin-istanbul@^4.1.5: istanbul-lib-instrument "^1.7.5" test-exclude "^4.1.1" +babel-plugin-istanbul@^4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== + dependencies: + babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.10.1" + test-exclude "^4.2.1" + babel-plugin-jest-hoist@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" @@ -1468,6 +1486,11 @@ babel-plugin-jest-hoist@^22.2.0: resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz#bd34f39d652406669713b8c89e23ef25c890b993" integrity sha512-NwicD5n1YQaj6sM3PVULdPBDk1XdlWvh8xBeUJg3nqZwp79Vofb8Q7GOVeWoZZ/RMlMuJMMrEAgSQl/p392nLA== +babel-plugin-jest-hoist@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= + "babel-plugin-styled-components@>= 1": version "1.9.2" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" @@ -1917,6 +1940,14 @@ babel-preset-jest@^22.2.0: babel-plugin-jest-hoist "^22.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" +babel-preset-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= + dependencies: + babel-plugin-jest-hoist "^23.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" + babel-preset-react@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" @@ -1982,7 +2013,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= @@ -1997,7 +2028,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= @@ -2251,6 +2282,13 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== + dependencies: + resolve "1.1.7" + browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.1.1" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" @@ -2356,6 +2394,11 @@ buffer-equal-constant-time@1.0.1: resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + buffer-indexof@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" @@ -4991,6 +5034,18 @@ expect@^22.4.0: jest-message-util "^22.4.0" jest-regex-util "^22.1.0" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== + dependencies: + ansi-styles "^3.2.0" + jest-diff "^23.6.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + express@^4.15.3, express@^4.16.1: version "4.16.2" resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" @@ -7220,11 +7275,33 @@ istanbul-api@^1.1.14: mkdirp "^0.5.1" once "^1.4.0" +istanbul-api@^1.3.1: + version "1.3.7" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" + integrity sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA== + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.2.1" + istanbul-lib-hook "^1.2.2" + istanbul-lib-instrument "^1.10.2" + istanbul-lib-report "^1.1.5" + istanbul-lib-source-maps "^1.2.6" + istanbul-reports "^1.5.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + istanbul-lib-coverage@^1.1.1, istanbul-lib-coverage@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" integrity sha512-tZYA0v5A7qBSsOzcebJJ/z3lk3oSzH62puG78DbBA1+zupipX2CakDyiPV3pOb8He+jBwVimuwB0dTnh38hX0w== +istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" + integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== + istanbul-lib-hook@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" @@ -7232,6 +7309,26 @@ istanbul-lib-hook@^1.1.0: dependencies: append-transform "^0.4.0" +istanbul-lib-hook@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" + integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" + integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.1" + semver "^5.3.0" + istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" @@ -7255,6 +7352,16 @@ istanbul-lib-report@^1.1.3: path-parse "^1.0.5" supports-color "^3.1.2" +istanbul-lib-report@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" + integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== + dependencies: + istanbul-lib-coverage "^1.2.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" @@ -7266,6 +7373,17 @@ istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3: rimraf "^2.6.1" source-map "^0.5.3" +istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" + integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.2.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + istanbul-reports@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" @@ -7273,6 +7391,13 @@ istanbul-reports@^1.1.4: dependencies: handlebars "^4.0.3" +istanbul-reports@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" + integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== + dependencies: + handlebars "^4.0.3" + items@2.x.x: version "2.1.1" resolved "https://registry.yarnpkg.com/items/-/items-2.1.1.tgz#8bd16d9c83b19529de5aea321acaada78364a198" @@ -7300,6 +7425,13 @@ jest-changed-files@^22.2.0: dependencies: throat "^4.0.0" +jest-changed-files@^23.4.2: + version "23.4.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" + integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== + dependencies: + throat "^4.0.0" + jest-cli@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.4.0.tgz#234d6175166e87ecab40c6e5a4f7b3f6a4cd4257" @@ -7340,6 +7472,48 @@ jest-cli@^22.4.0: which "^1.2.12" yargs "^10.0.3" +jest-cli@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" + integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.1.11" + import-local "^1.0.0" + is-ci "^1.0.10" + istanbul-api "^1.3.1" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-source-maps "^1.2.4" + jest-changed-files "^23.4.2" + jest-config "^23.6.0" + jest-environment-jsdom "^23.4.0" + jest-get-type "^22.1.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve-dependencies "^23.6.0" + jest-runner "^23.6.0" + jest-runtime "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + jest-watcher "^23.4.0" + jest-worker "^23.2.0" + micromatch "^2.3.11" + node-notifier "^5.2.1" + prompts "^0.1.9" + realpath-native "^1.0.0" + rimraf "^2.5.4" + slash "^1.0.0" + string-length "^2.0.0" + strip-ansi "^4.0.0" + which "^1.2.12" + yargs "^11.0.0" + jest-config@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.0.tgz#34ab50ff52e68a3b0f2dd5df91bfd9b8cf2aa474" @@ -7357,6 +7531,26 @@ jest-config@^22.4.0: jest-validate "^22.4.0" pretty-format "^22.4.0" +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== + dependencies: + babel-core "^6.0.0" + babel-jest "^23.6.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^23.6.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" + jest-diff@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.0.tgz#384c2b78519ca44ca126382df53f134289232525" @@ -7367,6 +7561,16 @@ jest-diff@^22.4.0: jest-get-type "^22.1.0" pretty-format "^22.4.0" +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" @@ -7379,6 +7583,21 @@ jest-docblock@^22.4.0: dependencies: detect-newline "^2.1.0" +jest-docblock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" + integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= + dependencies: + detect-newline "^2.1.0" + +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== + dependencies: + chalk "^2.0.1" + pretty-format "^23.6.0" + jest-environment-jsdom@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.0.tgz#09df84a1faf1ca47096aafc89411a095378f628e" @@ -7388,6 +7607,15 @@ jest-environment-jsdom@^22.4.0: jest-util "^22.4.0" jsdom "^11.5.1" +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + jsdom "^11.5.1" + jest-environment-node@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.0.tgz#b6d9458275053028d4b1658851c3475ab22dfb56" @@ -7396,6 +7624,14 @@ jest-environment-node@^22.4.0: jest-mock "^22.2.0" jest-util "^22.4.0" +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + jest-get-type@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" @@ -7419,6 +7655,20 @@ jest-haste-map@^22.4.0: micromatch "^2.3.11" sane "^2.0.0" +jest-haste-map@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" + integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + invariant "^2.2.4" + jest-docblock "^23.2.0" + jest-serializer "^23.0.1" + jest-worker "^23.2.0" + micromatch "^2.3.11" + sane "^2.0.0" + jest-jasmine2@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.0.tgz#1d9b607ede12a600ecadda2c8d89918d7d3c4d26" @@ -7436,6 +7686,24 @@ jest-jasmine2@^22.4.0: jest-snapshot "^22.4.0" source-map-support "^0.5.0" +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== + dependencies: + babel-traverse "^6.0.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^23.6.0" + is-generator-fn "^1.0.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + pretty-format "^23.6.0" + jest-leak-detector@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.0.tgz#64da77f05b001c96d2062226e079f89989c4aa2f" @@ -7443,6 +7711,13 @@ jest-leak-detector@^22.4.0: dependencies: pretty-format "^22.4.0" +jest-leak-detector@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" + integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== + dependencies: + pretty-format "^23.6.0" + jest-matcher-utils@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz#d55f5faf2270462736bdf7c7485ee931c9d4b6a1" @@ -7452,6 +7727,15 @@ jest-matcher-utils@^22.4.0: jest-get-type "^22.1.0" pretty-format "^22.4.0" +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + jest-message-util@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.0.tgz#e3d861df16d2fee60cb2bc8feac2188a42579642" @@ -7463,16 +7747,37 @@ jest-message-util@^22.4.0: slash "^1.0.0" stack-utils "^1.0.1" +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + jest-mock@^22.2.0: version "22.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" integrity sha512-eOfoUYLOB/JlxChOFkh/bzpWGqUXb9I+oOpkprHHs9L7nUNfL8Rk28h1ycWrqzWCEQ/jZBg/xIv7VdQkfAkOhw== +jest-mock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= + jest-regex-util@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" integrity sha512-on0LqVS6Xeh69sw3d1RukVnur+lVOl3zkmb0Q54FHj9wHoq6dbtWqb3TSlnVUyx36hqjJhjgs/QLqs07Bzu72Q== +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= + jest-resolve-dependencies@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31" @@ -7480,6 +7785,14 @@ jest-resolve-dependencies@^22.1.0: dependencies: jest-regex-util "^22.1.0" +jest-resolve-dependencies@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" + integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== + dependencies: + jest-regex-util "^23.3.0" + jest-snapshot "^23.6.0" + jest-resolve@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.0.tgz#c3550280d77c47c2885809e7dc8e42560f0b3e71" @@ -7488,6 +7801,15 @@ jest-resolve@^22.4.0: browser-resolve "^1.11.2" chalk "^2.0.1" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== + dependencies: + browser-resolve "^1.11.3" + chalk "^2.0.1" + realpath-native "^1.0.0" + jest-runner@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.0.tgz#2509b82834ab4aa7e984ff464626397c556177a7" @@ -7505,6 +7827,25 @@ jest-runner@^22.4.0: jest-worker "^22.2.2" throat "^4.0.0" +jest-runner@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" + integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== + dependencies: + exit "^0.1.2" + graceful-fs "^4.1.11" + jest-config "^23.6.0" + jest-docblock "^23.2.0" + jest-haste-map "^23.6.0" + jest-jasmine2 "^23.6.0" + jest-leak-detector "^23.6.0" + jest-message-util "^23.4.0" + jest-runtime "^23.6.0" + jest-util "^23.4.0" + jest-worker "^23.2.0" + source-map-support "^0.5.6" + throat "^4.0.0" + jest-runtime@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.4.0.tgz#a4e3e3709a2289725790ed51ca41526a5700ddc4" @@ -7531,11 +7872,43 @@ jest-runtime@^22.4.0: write-file-atomic "^2.1.0" yargs "^10.0.3" +jest-runtime@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" + integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.1.6" + chalk "^2.0.1" + convert-source-map "^1.4.0" + exit "^0.1.2" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.11" + jest-config "^23.6.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + realpath-native "^1.0.0" + slash "^1.0.0" + strip-bom "3.0.0" + write-file-atomic "^2.1.0" + yargs "^11.0.0" + jest-serializer@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.0.tgz#b5d145b98c4b0d2c20ab686609adbb81fe23b566" integrity sha512-dnqde95MiYfdc1ZJpjEiHCRvRGGJHPsZQARJFucEGIaOzxqqS9/tt2WzD/OUSGT6kxaEGLQE92faVJGdoCu+Rw== +jest-serializer@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= + jest-snapshot@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.0.tgz#03d3ce63f8fa7352388afc6a3c8b5ccc3a180ed7" @@ -7548,6 +7921,22 @@ jest-snapshot@^22.4.0: natural-compare "^1.4.0" pretty-format "^22.4.0" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== + dependencies: + babel-types "^6.0.0" + chalk "^2.0.1" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-resolve "^23.6.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^23.6.0" + semver "^5.5.0" + jest-util@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.0.tgz#ebdc147548d613c5faf7c7534051f59740c98ada" @@ -7560,6 +7949,20 @@ jest-util@^22.4.0: jest-message-util "^22.4.0" mkdirp "^0.5.1" +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.4.0" + mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" + jest-validate@^21.1.0: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" @@ -7581,6 +7984,25 @@ jest-validate@^22.4.0: leven "^2.1.0" pretty-format "^22.4.0" +jest-validate@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^23.6.0" + +jest-watcher@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" + integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + string-length "^2.0.0" + jest-worker@^22.2.2: version "22.2.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390" @@ -7588,6 +8010,13 @@ jest-worker@^22.2.2: dependencies: merge-stream "^1.0.1" +jest-worker@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= + dependencies: + merge-stream "^1.0.1" + jest@^22.1.1: version "22.4.0" resolved "https://registry.yarnpkg.com/jest/-/jest-22.4.0.tgz#476e2c08c6c2a6dbb5cfec520b8bf1cd4c99afd7" @@ -7596,6 +8025,14 @@ jest@^22.1.1: import-local "^1.0.0" jest-cli "^22.4.0" +jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" + integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== + dependencies: + import-local "^1.0.0" + jest-cli "^23.6.0" + jmespath@0.15.0: version "0.15.0" resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" @@ -10622,6 +11059,14 @@ pretty-format@^22.4.0: ansi-regex "^3.0.0" ansi-styles "^3.2.0" +pretty-format@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -10688,6 +11133,14 @@ prompt@^1.0.0, prompt@flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87: utile "0.3.x" winston "2.x" +prompts@^0.1.9: + version "0.1.14" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" + integrity sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w== + dependencies: + kleur "^2.0.1" + sisteransi "^0.1.1" + prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0: version "15.6.0" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" @@ -12470,6 +12923,11 @@ semver@5.3.0, semver@~5.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= +semver@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + send@0.16.1: version "0.16.1" resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" @@ -12652,6 +13110,11 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sisteransi@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -12777,6 +13240,14 @@ source-map-support@^0.5.0, source-map-support@^0.5.1: dependencies: source-map "^0.6.0" +source-map-support@^0.5.6: + version "0.5.9" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -13546,6 +14017,17 @@ test-exclude@^4.1.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" +test-exclude@^4.2.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" + integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + text-extensions@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39" @@ -14850,6 +15332,13 @@ yargs-parser@^8.1.0: dependencies: camelcase "^4.1.0" +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= + dependencies: + camelcase "^4.1.0" + yargs@6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" @@ -14887,6 +15376,24 @@ yargs@^10.0.3: y18n "^3.2.1" yargs-parser "^8.1.0" +yargs@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" + yargs@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"