From 3810f7c71dc5dfad97d8818bae6ee90ca2c39aee Mon Sep 17 00:00:00 2001 From: HichamELBSI Date: Thu, 24 Dec 2020 10:51:28 +0100 Subject: [PATCH] Update BuffetJS Signed-off-by: HichamELBSI --- .../PrivateRoute/BasePrivateRoute.js | 36 ---------- packages/strapi-admin/package.json | 12 ++-- packages/strapi-helper-plugin/package.json | 12 ++-- .../package.json | 12 ++-- .../package.json | 12 ++-- .../strapi-plugin-documentation/package.json | 12 ++-- packages/strapi-plugin-upload/package.json | 12 ++-- .../package.json | 12 ++-- yarn.lock | 65 ++++++++++--------- 9 files changed, 75 insertions(+), 110 deletions(-) delete mode 100644 packages/strapi-admin/admin/src/containers/PrivateRoute/BasePrivateRoute.js diff --git a/packages/strapi-admin/admin/src/containers/PrivateRoute/BasePrivateRoute.js b/packages/strapi-admin/admin/src/containers/PrivateRoute/BasePrivateRoute.js deleted file mode 100644 index b6190a695c..0000000000 --- a/packages/strapi-admin/admin/src/containers/PrivateRoute/BasePrivateRoute.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * PrivateRoute - * Higher Order Component that blocks navigation when the user is not logged in - * and redirect the user to login page - * - * Wrap your protected routes to secure your container - */ - -import React, { memo } from 'react'; -import { Redirect, Route } from 'react-router-dom'; -import PropTypes from 'prop-types'; -import { auth } from 'strapi-helper-plugin'; - -const BasePrivateRoute = ({ component: Component, path, ...rest }) => ( - - auth.getToken() !== null ? ( - - ) : ( - - )} - /> -); - -BasePrivateRoute.propTypes = { - component: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired, - path: PropTypes.string.isRequired, -}; - -export default memo(BasePrivateRoute); diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index 30b6262683..a7c691eb6f 100644 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -23,12 +23,12 @@ "@babel/preset-env": "^7.9.5", "@babel/preset-react": "^7.9.4", "@babel/runtime": "^7.9.2", - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "@casl/ability": "^4.1.5", "@fortawesome/fontawesome-free": "^5.11.2", "@fortawesome/fontawesome-svg-core": "^1.2.32", diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index 1b9f3ede8b..34df59f572 100644 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -50,12 +50,12 @@ "rollup-plugin-terser": "^4.0.4" }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "bootstrap": "^4.5.3", "classnames": "^2.2.5", "immutable": "^3.8.2", diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index c82238407f..66887a2b6a 100644 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -9,12 +9,12 @@ "required": true }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "@sindresorhus/slugify": "1.1.0", "classnames": "^2.2.6", "codemirror": "^5.59.0", diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 72c07ce08e..fd03141793 100644 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -8,12 +8,12 @@ "description": "content-type-builder.plugin.description" }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "@sindresorhus/slugify": "1.1.0", "fs-extra": "^9.0.1", "immutable": "^3.8.2", diff --git a/packages/strapi-plugin-documentation/package.json b/packages/strapi-plugin-documentation/package.json index fb26d1400c..b41369c198 100644 --- a/packages/strapi-plugin-documentation/package.json +++ b/packages/strapi-plugin-documentation/package.json @@ -11,12 +11,12 @@ "test": "echo \"no tests yet\"" }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "cheerio": "^1.0.0-rc.3", "fs-extra": "^9.0.1", "immutable": "^3.8.2", diff --git a/packages/strapi-plugin-upload/package.json b/packages/strapi-plugin-upload/package.json index 8e52bcf18e..09cdfdc0b0 100644 --- a/packages/strapi-plugin-upload/package.json +++ b/packages/strapi-plugin-upload/package.json @@ -12,12 +12,12 @@ "test": "echo \"no tests yet\"" }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "byte-size": "^7.0.0", "cropperjs": "^1.5.6", "immer": "^7.0.14", diff --git a/packages/strapi-plugin-users-permissions/package.json b/packages/strapi-plugin-users-permissions/package.json index d1dbd6f8d2..76a380a432 100644 --- a/packages/strapi-plugin-users-permissions/package.json +++ b/packages/strapi-plugin-users-permissions/package.json @@ -12,12 +12,12 @@ "test": "echo \"no tests yet\"" }, "dependencies": { - "@buffetjs/core": "3.3.3", - "@buffetjs/custom": "3.3.3", - "@buffetjs/hooks": "3.3.3", - "@buffetjs/icons": "3.3.3", - "@buffetjs/styles": "3.3.3", - "@buffetjs/utils": "3.3.3", + "@buffetjs/core": "3.3.3-next.1", + "@buffetjs/custom": "3.3.3-next.1", + "@buffetjs/hooks": "3.3.3-next.1", + "@buffetjs/icons": "3.3.3-next.1", + "@buffetjs/styles": "3.3.3-next.1", + "@buffetjs/utils": "3.3.3-next.1", "@purest/providers": "^1.0.2", "bcryptjs": "^2.4.3", "grant-koa": "5.4.8", diff --git a/yarn.lock b/yarn.lock index 23909aea4a..e886f7af7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1042,15 +1042,15 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@buffetjs/core@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/core/-/core-3.3.3.tgz#d312b917a3ada0c34c791bc963a80aced5ac6b2f" - integrity sha512-2kczHnWmgwC+VjoG5HWrKo9FCzcbTBDd+HvKaCBbv8RTI6PsGgUBV7J/KEN/bl+9arefMPBjpVwry4IdQFZiwQ== +"@buffetjs/core@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/core/-/core-3.3.3-next.1.tgz#9e0b57f9dbc5fb5cbb92c3efad829ecf1034e3bd" + integrity sha512-E4QNEanBbTese337xStENt5CIBOUyEbb4B4ZLCdnLdmlHyeY8TaxBeE3xH+3qNK+rrcHeFWMm2ImWn+usMAehA== dependencies: - "@buffetjs/hooks" "3.3.3" - "@buffetjs/icons" "3.3.3" - "@buffetjs/styles" "3.3.3" - "@buffetjs/utils" "3.3.3" + "@buffetjs/hooks" "3.3.3-next.1" + "@buffetjs/icons" "3.3.3-next.1" + "@buffetjs/styles" "3.3.3-next.1" + "@buffetjs/utils" "3.3.3-next.1" "@fortawesome/fontawesome-svg-core" "^1.2.25" "@fortawesome/free-regular-svg-icons" "^5.11.2" "@fortawesome/free-solid-svg-icons" "^5.11.2" @@ -1066,35 +1066,35 @@ react-with-direction "^1.3.1" reactstrap "^8.5.1" -"@buffetjs/custom@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/custom/-/custom-3.3.3.tgz#8bc088de176366b1d0620764d45d9f52edca697a" - integrity sha512-9kLD6hKQEsXoQK4Lr9OlVY37ZNByecHpGUeh4PxcJfKYqLRtU3xbKTaUJbexCrdx+2XddlyrRgNTNcrl59S8uA== +"@buffetjs/custom@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/custom/-/custom-3.3.3-next.1.tgz#5ac6c06149b14c632e93af396634b434b379c0b3" + integrity sha512-ZivpxktXcB2MEeHzolZ5Bjg0qUsps32m6gbyRc1H+PheACdWj/TEGDi+iDZJyGYIcT0HTwAgkGQpU3G6CD77FQ== dependencies: - "@buffetjs/core" "3.3.3" - "@buffetjs/styles" "3.3.3" - "@buffetjs/utils" "3.3.3" + "@buffetjs/core" "3.3.3-next.1" + "@buffetjs/styles" "3.3.3-next.1" + "@buffetjs/utils" "3.3.3-next.1" lodash "4.17.19" moment "^2.24.0" prop-types "^15.5.10" react-moment-proptypes "^1.7.0" -"@buffetjs/hooks@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/hooks/-/hooks-3.3.3.tgz#7a78d10ad354fe1e23d17e853509c71dc150e82e" - integrity sha512-84rIOVarxg1HRJNYbPEFnbFHHbBTpIzxfbbYZ43rVZW0Qe5VcRLaZ6j+jmaNeeTyv0SxgMgH7ZgwZYlEMlBfEA== +"@buffetjs/hooks@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/hooks/-/hooks-3.3.3-next.1.tgz#32ced5f559bd0f2df6451663c31014b10e2bae86" + integrity sha512-AyQsMHWSEpeBOhE6ygYGHMBc8+DMiFbB7k/0Bp9e2WPU6pV20hlymbtRnAUJzDDUyD9WFPuOkO/fpTBKQZsHcw== -"@buffetjs/icons@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/icons/-/icons-3.3.3.tgz#6cfa34ef8919f969a8cbf0c5852e0c645da37d88" - integrity sha512-xp/DT6mmOHG6ezYoI4AoP0YzHKX4ZBIcfkNbE5JFF5CFh+9lkypRdoZQ1Y/LAshDx0u/GP6hmshm7L8B2lDnRQ== +"@buffetjs/icons@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/icons/-/icons-3.3.3-next.1.tgz#ba29c11b4440e0e376941e25ff67451f0a7dce59" + integrity sha512-/YjGcGg++YatMtBElt/rM9YYBUCLcVrfF3/FzUWhAVXzf0SK0uVJMko/bM291puyMZywSNuHeyqusGr0Oy1zbQ== dependencies: prop-types "^15.5.10" -"@buffetjs/styles@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/styles/-/styles-3.3.3.tgz#9abfd3a73e068bb23c6040ab4f6b5e372d5f6c13" - integrity sha512-LohTzWpcFsreW+9+FfqYyXSFkqFF/g3tDtpGsCia9TSiQLsipuVMG2++JqaNUmorBOLNUKsfnPSDczSd5XRFFA== +"@buffetjs/styles@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/styles/-/styles-3.3.3-next.1.tgz#82383bf5a328d0419dcd309bb82e3df26d15f7eb" + integrity sha512-Is2VGuUmgY194/5y67c71fD+RvDRmYqj6zOhz/4YKMrMAOORq0RSa33BksTbUJCD+1H6HVcjm6NRvr64vn8YWg== dependencies: "@fortawesome/fontawesome-free" "^5.12.0" "@fortawesome/fontawesome-svg-core" "^1.2.22" @@ -1103,11 +1103,12 @@ "@fortawesome/react-fontawesome" "^0.1.4" prop-types "^15.7.2" react-dates "^21.1.0" + react-tooltip "^4.2.11" -"@buffetjs/utils@3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@buffetjs/utils/-/utils-3.3.3.tgz#14cc3f541741e7da57e212c0f8632a34ad16c3fd" - integrity sha512-LiinNk1ocs/5IG2qgo+dBbGjNOEp85cosbWmZ/YuHnTnYXt2GVAUQh//M0he179iAlHNN9hH6hlK7KW85MaKbw== +"@buffetjs/utils@3.3.3-next.1": + version "3.3.3-next.1" + resolved "https://registry.yarnpkg.com/@buffetjs/utils/-/utils-3.3.3-next.1.tgz#2387274d69bb37fdd0a22d91cdbff3925d0eced1" + integrity sha512-e7wrz+xqMd502NR0MJ+Jj1lc3/J9ITPeUectiUOJRQc73NcNPuUD1GFgmSMFxbRsBvtjb9qpU78eAyl1FiQNng== dependencies: lodash "4.17.19" yup "^0.27.0" @@ -15636,7 +15637,7 @@ react-test-renderer@^17.0.1: react-shallow-renderer "^16.13.1" scheduler "^0.20.1" -react-tooltip@4.2.11: +react-tooltip@4.2.11, react-tooltip@^4.2.11: version "4.2.11" resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-4.2.11.tgz#244d4d1833c583160c4e6c95a8a89e0fb320e18a" integrity sha512-exREte3mK/qbeuQpFbEL3ImdF5/TSAb+x/T7pkVfKmgVcfQLZKHSgLN+Msv7ZOHxaWNJwuCrSsCAy/iTGoPigg==