From bb7ea251852363a542f33c030dcaecbdf235b6aa Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Thu, 27 May 2021 11:13:38 +0200 Subject: [PATCH] F #3951: Redux toolkit migration (#1252) --- src/fireedge/package-lock.json | 2150 +++++++++-------- src/fireedge/package.json | 3 +- src/fireedge/src/client/apps/flow/_app.js | 39 +- .../{router/flow.js => apps/flow/routes.js} | 36 +- .../src/client/apps/provision/_app.js | 45 +- .../provision.js => apps/provision/routes.js} | 16 - .../components/Cards/SelectCard/Action.js | 5 +- .../components/Cards/SelectCard/styles.js | 2 +- .../src/client/components/Cards/index.js | 34 +- .../src/client/components/Count/index.js | 2 +- .../src/client/components/DebugLog/index.js | 1 - .../src/client/components/DebugLog/message.js | 26 +- .../components/Dialogs/DialogRequest.js | 6 +- .../components/FormControl/SubmitButton.js | 31 +- .../client/components/FormStepper/index.js | 5 +- .../components/HOC/InternalLayout/index.js | 17 +- .../src/client/components/HOC/MainLayout.js | 103 - .../src/client/components/HOC/Translate.js | 2 +- .../src/client/components/HOC/index.js | 1 - .../src/client/components/Header/Group.js | 14 +- .../src/client/components/Header/Popover.js | 11 +- .../src/client/components/Header/User.js | 14 +- .../src/client/components/Header/index.js | 86 +- .../src/client/components/Header/styles.js | 1 - .../client/components/List/ListCards/index.js | 99 +- .../components/List/ListCards/styles.js | 5 +- .../src/client/components/Notifier/index.js | 17 +- .../client/components/Route/NoAuthRoute.js | 28 + .../client/components/Route/ProtectedRoute.js | 32 + .../src/client/components/Route/index.js | 4 + .../client/components/Sidebar/SidebarLink.js | 7 +- .../src/client/components/Sidebar/index.js | 8 +- .../Widgets/TotalProviders/index.js | 5 +- .../Widgets/TotalProvisionInfrastructures.js | 4 +- .../Widgets/TotalProvisionsByState/index.js | 4 +- .../containers/ApplicationsInstances/index.js | 51 +- .../Form/Create/Steps/Clusters/index.js | 10 +- .../Form/Create/Steps/Networking/index.js | 9 +- .../Form/Create/Steps/Networking/schema.js | 5 +- .../Tiers/Steps/Template/List/MarketApps.js | 5 +- .../Tiers/Steps/Template/List/Templates.js | 5 +- .../Form/Create/index.js | 20 +- .../Form/Deploy/Steps/Networking/index.js | 5 +- .../Form/Deploy/Steps/Networking/schema.js | 6 +- .../Form/Deploy/index.js | 26 +- .../containers/ApplicationsTemplates/index.js | 38 +- .../containers/Dashboard/Provision/index.js | 10 +- .../src/client/containers/Login/Form.js | 2 +- .../src/client/containers/Login/index.js | 62 +- .../src/client/containers/Login/schema.js | 11 +- .../Form/Create/Steps/Connection/index.js | 2 +- .../Form/Create/Steps/Template/index.js | 6 +- .../containers/Providers/Form/Create/index.js | 31 +- .../containers/Providers/Sections/info.js | 20 +- .../src/client/containers/Providers/index.js | 31 +- .../Provisions/DialogInfo/datastores.js | 88 +- .../containers/Provisions/DialogInfo/hosts.js | 105 +- .../containers/Provisions/DialogInfo/index.js | 33 +- .../containers/Provisions/DialogInfo/info.js | 14 +- .../containers/Provisions/DialogInfo/log.js | 18 +- .../Provisions/DialogInfo/networks.js | 88 +- .../Form/Create/Steps/Inputs/index.js | 10 +- .../Form/Create/Steps/Provider/index.js | 5 +- .../Form/Create/Steps/Template/index.js | 6 +- .../Provisions/Form/Create/index.js | 16 +- .../src/client/containers/Provisions/index.js | 60 +- .../src/client/containers/Settings/index.js | 13 +- .../client/containers/TestApi/ResponseForm.js | 11 +- .../{Webconsole => WebConsole}/index.js | 0 src/fireedge/src/client/dev/_app.js | 6 +- src/fireedge/src/client/dev/index.js | 9 +- .../src/client/features/Auth/actions.js | 103 + .../src/client/features/Auth/hooks.js | 37 + .../src/client/features/Auth/index.js | 4 + .../src/client/features/Auth/services.js | 18 + .../src/client/features/Auth/slice.js | 66 + .../src/client/features/General/actions.js | 10 + .../src/client/features/General/hooks.js | 59 + .../src/client/features/General/index.js | 3 + .../src/client/features/General/slice.js | 98 + .../features/One/application/actions.js | 10 + .../client/features/One/application/hooks.js | 23 + .../features/One/application/services.js | 19 + .../One/applicationTemplate/actions.js | 28 + .../features/One/applicationTemplate/hooks.js | 30 + .../One/applicationTemplate/services.js | 50 + .../client/features/One/cluster/actions.js | 10 + .../src/client/features/One/cluster/hooks.js | 23 + .../client/features/One/cluster/services.js | 25 + .../client/features/One/datastore/actions.js | 10 + .../client/features/One/datastore/hooks.js | 23 + .../client/features/One/datastore/services.js | 25 + .../src/client/features/One/group/actions.js | 10 + .../src/client/features/One/group/hooks.js | 23 + .../src/client/features/One/group/services.js | 25 + src/fireedge/src/client/features/One/hooks.js | 20 + .../src/client/features/One/host/actions.js | 10 + .../src/client/features/One/host/hooks.js | 23 + .../src/client/features/One/host/services.js | 25 + src/fireedge/src/client/features/One/index.js | 2 + .../client/features/One/marketApp/actions.js | 10 + .../client/features/One/marketApp/hooks.js | 23 + .../client/features/One/marketApp/services.js | 25 + .../client/features/One/provider/actions.js | 15 + .../src/client/features/One/provider/hooks.js | 27 + .../client/features/One/provider/services.js | 55 + .../client/features/One/provision/actions.js | 31 + .../client/features/One/provision/hooks.js | 39 + .../client/features/One/provision/services.js | 121 + src/fireedge/src/client/features/One/slice.js | 59 + .../src/client/features/One/user/actions.js | 13 + .../src/client/features/One/user/hooks.js | 25 + .../src/client/features/One/user/services.js | 45 + src/fireedge/src/client/features/One/utils.js | 37 + .../src/client/features/One/vm/actions.js | 10 + .../src/client/features/One/vm/hooks.js | 23 + .../src/client/features/One/vm/services.js | 25 + .../client/features/One/vmTemplate/actions.js | 10 + .../client/features/One/vmTemplate/hooks.js | 23 + .../features/One/vmTemplate/services.js | 19 + .../client/features/One/vnetwork/actions.js | 10 + .../src/client/features/One/vnetwork/hooks.js | 23 + .../client/features/One/vnetwork/services.js | 25 + .../features/One/vnetworkTemplate/actions.js | 13 + .../features/One/vnetworkTemplate/hooks.js | 23 + .../features/One/vnetworkTemplate/services.js | 25 + src/fireedge/src/client/flow.js | 8 +- src/fireedge/src/client/hooks/index.js | 8 - .../src/client/hooks/useApplication.js | 139 -- src/fireedge/src/client/hooks/useAuth.js | 147 -- src/fireedge/src/client/hooks/useFetch.js | 2 +- .../src/client/hooks/useOpennebula.js | 235 -- src/fireedge/src/client/hooks/useProvision.js | 285 --- .../src/client/providers/muiProvider.js | 2 +- .../src/client/providers/socketProvider.js | 13 +- src/fireedge/src/client/provision.js | 8 +- src/fireedge/src/client/router/common.js | 17 + src/fireedge/src/client/router/dev.js | 14 +- src/fireedge/src/client/router/index.js | 79 +- src/fireedge/src/client/services/auth.js | 38 - .../src/client/services/flow/application.js | 101 - .../src/client/services/flow/index.js | 1 - .../src/client/services/one/cluster.js | 17 - .../src/client/services/one/datastore.js | 17 - src/fireedge/src/client/services/one/host.js | 17 - src/fireedge/src/client/services/one/index.js | 8 - src/fireedge/src/client/services/one/pool.js | 149 -- src/fireedge/src/client/services/one/user.js | 43 - .../src/client/services/one/vNetTemplate.js | 17 - .../src/client/services/one/vNetwork.js | 17 - .../src/client/services/one/vmTemplate.js | 17 - .../src/client/services/provision/index.js | 2 - .../src/client/services/provision/provider.js | 77 - .../client/services/provision/provision.js | 164 -- src/fireedge/src/client/services/socket.js | 9 - src/fireedge/src/client/store.js | 43 +- src/fireedge/src/client/utils/environments.js | 14 + src/fireedge/src/client/utils/index.js | 9 +- src/fireedge/src/client/utils/polyfills.js | 2 - src/fireedge/src/client/utils/rest.js | 93 + src/fireedge/src/client/utils/storage.js | 41 + src/fireedge/src/client/utils/utils.js | 109 - src/fireedge/webpack.config.dev.client.js | 70 +- 163 files changed, 3792 insertions(+), 3506 deletions(-) rename src/fireedge/src/client/{router/flow.js => apps/flow/routes.js} (66%) rename src/fireedge/src/client/{router/provision.js => apps/provision/routes.js} (84%) delete mode 100644 src/fireedge/src/client/components/HOC/MainLayout.js create mode 100644 src/fireedge/src/client/components/Route/NoAuthRoute.js create mode 100644 src/fireedge/src/client/components/Route/ProtectedRoute.js create mode 100644 src/fireedge/src/client/components/Route/index.js rename src/fireedge/src/client/containers/{Webconsole => WebConsole}/index.js (100%) create mode 100644 src/fireedge/src/client/features/Auth/actions.js create mode 100644 src/fireedge/src/client/features/Auth/hooks.js create mode 100644 src/fireedge/src/client/features/Auth/index.js create mode 100644 src/fireedge/src/client/features/Auth/services.js create mode 100644 src/fireedge/src/client/features/Auth/slice.js create mode 100644 src/fireedge/src/client/features/General/actions.js create mode 100644 src/fireedge/src/client/features/General/hooks.js create mode 100644 src/fireedge/src/client/features/General/index.js create mode 100644 src/fireedge/src/client/features/General/slice.js create mode 100644 src/fireedge/src/client/features/One/application/actions.js create mode 100644 src/fireedge/src/client/features/One/application/hooks.js create mode 100644 src/fireedge/src/client/features/One/application/services.js create mode 100644 src/fireedge/src/client/features/One/applicationTemplate/actions.js create mode 100644 src/fireedge/src/client/features/One/applicationTemplate/hooks.js create mode 100644 src/fireedge/src/client/features/One/applicationTemplate/services.js create mode 100644 src/fireedge/src/client/features/One/cluster/actions.js create mode 100644 src/fireedge/src/client/features/One/cluster/hooks.js create mode 100644 src/fireedge/src/client/features/One/cluster/services.js create mode 100644 src/fireedge/src/client/features/One/datastore/actions.js create mode 100644 src/fireedge/src/client/features/One/datastore/hooks.js create mode 100644 src/fireedge/src/client/features/One/datastore/services.js create mode 100644 src/fireedge/src/client/features/One/group/actions.js create mode 100644 src/fireedge/src/client/features/One/group/hooks.js create mode 100644 src/fireedge/src/client/features/One/group/services.js create mode 100644 src/fireedge/src/client/features/One/hooks.js create mode 100644 src/fireedge/src/client/features/One/host/actions.js create mode 100644 src/fireedge/src/client/features/One/host/hooks.js create mode 100644 src/fireedge/src/client/features/One/host/services.js create mode 100644 src/fireedge/src/client/features/One/index.js create mode 100644 src/fireedge/src/client/features/One/marketApp/actions.js create mode 100644 src/fireedge/src/client/features/One/marketApp/hooks.js create mode 100644 src/fireedge/src/client/features/One/marketApp/services.js create mode 100644 src/fireedge/src/client/features/One/provider/actions.js create mode 100644 src/fireedge/src/client/features/One/provider/hooks.js create mode 100644 src/fireedge/src/client/features/One/provider/services.js create mode 100644 src/fireedge/src/client/features/One/provision/actions.js create mode 100644 src/fireedge/src/client/features/One/provision/hooks.js create mode 100644 src/fireedge/src/client/features/One/provision/services.js create mode 100644 src/fireedge/src/client/features/One/slice.js create mode 100644 src/fireedge/src/client/features/One/user/actions.js create mode 100644 src/fireedge/src/client/features/One/user/hooks.js create mode 100644 src/fireedge/src/client/features/One/user/services.js create mode 100644 src/fireedge/src/client/features/One/utils.js create mode 100644 src/fireedge/src/client/features/One/vm/actions.js create mode 100644 src/fireedge/src/client/features/One/vm/hooks.js create mode 100644 src/fireedge/src/client/features/One/vm/services.js create mode 100644 src/fireedge/src/client/features/One/vmTemplate/actions.js create mode 100644 src/fireedge/src/client/features/One/vmTemplate/hooks.js create mode 100644 src/fireedge/src/client/features/One/vmTemplate/services.js create mode 100644 src/fireedge/src/client/features/One/vnetwork/actions.js create mode 100644 src/fireedge/src/client/features/One/vnetwork/hooks.js create mode 100644 src/fireedge/src/client/features/One/vnetwork/services.js create mode 100644 src/fireedge/src/client/features/One/vnetworkTemplate/actions.js create mode 100644 src/fireedge/src/client/features/One/vnetworkTemplate/hooks.js create mode 100644 src/fireedge/src/client/features/One/vnetworkTemplate/services.js delete mode 100644 src/fireedge/src/client/hooks/useApplication.js delete mode 100644 src/fireedge/src/client/hooks/useAuth.js delete mode 100644 src/fireedge/src/client/hooks/useOpennebula.js delete mode 100644 src/fireedge/src/client/hooks/useProvision.js create mode 100644 src/fireedge/src/client/router/common.js delete mode 100644 src/fireedge/src/client/services/auth.js delete mode 100644 src/fireedge/src/client/services/flow/application.js delete mode 100644 src/fireedge/src/client/services/flow/index.js delete mode 100644 src/fireedge/src/client/services/one/cluster.js delete mode 100644 src/fireedge/src/client/services/one/datastore.js delete mode 100644 src/fireedge/src/client/services/one/host.js delete mode 100644 src/fireedge/src/client/services/one/index.js delete mode 100644 src/fireedge/src/client/services/one/pool.js delete mode 100644 src/fireedge/src/client/services/one/user.js delete mode 100644 src/fireedge/src/client/services/one/vNetTemplate.js delete mode 100644 src/fireedge/src/client/services/one/vNetwork.js delete mode 100644 src/fireedge/src/client/services/one/vmTemplate.js delete mode 100644 src/fireedge/src/client/services/provision/index.js delete mode 100644 src/fireedge/src/client/services/provision/provider.js delete mode 100644 src/fireedge/src/client/services/provision/provision.js delete mode 100644 src/fireedge/src/client/services/socket.js create mode 100644 src/fireedge/src/client/utils/environments.js delete mode 100644 src/fireedge/src/client/utils/polyfills.js create mode 100644 src/fireedge/src/client/utils/rest.js create mode 100644 src/fireedge/src/client/utils/storage.js delete mode 100644 src/fireedge/src/client/utils/utils.js diff --git a/src/fireedge/package-lock.json b/src/fireedge/package-lock.json index 16eb779252..400ea283c0 100644 --- a/src/fireedge/package-lock.json +++ b/src/fireedge/package-lock.json @@ -26,6 +26,7 @@ "@material-ui/core": "4.11.0", "@material-ui/icons": "4.11.2", "@material-ui/lab": "4.0.0-alpha.58", + "@reduxjs/toolkit": "1.5.1", "ace-builds": "1.4.12", "atob": "2.1.2", "axios": "0.21.1", @@ -74,7 +75,7 @@ "react-router": "5.2.0", "react-router-dom": "5.2.0", "react-transition-group": "4.4.1", - "redux": "4.0.4", + "redux": "4.1.0", "redux-thunk": "2.3.0", "rimraf": "3.0.2", "socket.io": "4.1.2", @@ -151,9 +152,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.8.tgz", - "integrity": "sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==" }, "node_modules/@babel/core": { "version": "7.12.13", @@ -185,11 +186,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", "dependencies": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.1", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -212,11 +213,11 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.8.tgz", - "integrity": "sha512-pBljUGC1y3xKLn1nrx2eAhurLMA8OqBtBP/JwG4U8skN7kf8/aqwwxpV1N6T0e7r6+7uNitIa/fUxPFagSXp3A==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "dependencies": { - "@babel/compat-data": "^7.13.8", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -234,14 +235,15 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz", - "integrity": "sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.1.tgz", + "integrity": "sha512-r8rsUahG4ywm0QpGcCrLaUSOuNAISR3IZCg4Fx05Ozq31aCUrQsTLH6KPxy0N5ULoQ4Sn9qjNdGNtbPWAC6hYg==", "dependencies": { + "@babel/helper-annotate-as-pure": "^7.12.13", "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13" }, "peerDependencies": { @@ -287,44 +289,43 @@ } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.16.tgz", + "integrity": "sha512-1eMtTrXtrwscjcAeO4BVK+vvkxaLJSPFz1w1KLawz6HLNi9bPFGBNwwDyVfiu1Tv/vRRFYfoGaKhmAQPGPn5Wg==", "dependencies": { - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz", - "integrity": "sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", "dependencies": { - "@babel/types": "^7.13.0" + "@babel/types": "^7.13.12" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", - "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", "dependencies": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz", - "integrity": "sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", + "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", "dependencies": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", - "lodash": "^4.17.19" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "node_modules/@babel/helper-optimise-call-expression": { @@ -351,22 +352,22 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", - "integrity": "sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/types": "^7.13.12" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", - "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", "dependencies": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { @@ -386,9 +387,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" }, "node_modules/@babel/helper-validator-option": { "version": "7.12.17", @@ -407,21 +408,21 @@ } }, "node_modules/@babel/helpers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.0.tgz", - "integrity": "sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", "dependencies": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "node_modules/@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } @@ -447,9 +448,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", + "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==", "bin": { "parser": "bin/babel-parser.js" }, @@ -458,9 +459,9 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz", + "integrity": "sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA==", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -798,11 +799,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.1.tgz", + "integrity": "sha512-2mQXd0zBrwfp0O1moWIhPpEeTKDvxyHcnma3JATVP1l+CctWBuot6OJG8LQ4DnBj4ZZPSmlb/fm4mu47EOAnVA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -837,9 +838,9 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.17.tgz", + "integrity": "sha512-UAUqiLv+uRLO+xuBKKMEpC+t7YRNVRqBsWWq1yKXbBZBje/t3IXCiSinZhjn/DC3qzBfICeYd2EFGEbHsh5RLA==", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0" }, @@ -928,11 +929,11 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.0.tgz", + "integrity": "sha512-CF4c5LX4LQ03LebQxJ5JZes2OYjzBuk1TdiF7cG7d5dK4lAdw9NZmaxq5K/mouUdNeqwz3TNjnW6v01UqUNgpQ==", "dependencies": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", "babel-plugin-dynamic-import-node": "^2.3.3" }, @@ -941,13 +942,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.0.tgz", + "integrity": "sha512-EX4QePlsTaRZQmw9BsoPeyh5OCtRGIhwfLquhxGp5e32w+dyL8htOcDwamlitmNFK6xBZYlygjdye9dbd9rUlQ==", "dependencies": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-simple-access": "^7.13.12", "babel-plugin-dynamic-import-node": "^2.3.3" }, "peerDependencies": { @@ -970,11 +971,11 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.0.tgz", + "integrity": "sha512-nPZdnWtXXeY7I87UZr9VlsWme3Y0cfFFE41Wbxz4bbaexAjNMInXPFUpRRUJ8NoMm0Cw+zxbqjdPmLhcjfazMw==", "dependencies": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0" }, "peerDependencies": { @@ -1049,15 +1050,15 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz", - "integrity": "sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.13.12.tgz", + "integrity": "sha512-jcEI2UqIcpCqB5U5DRxIl0tQEProI2gcu+g8VTIqxLO5Iidojb4d77q+fwGseCvd8af/lJ9masp4QWzBXFE2xA==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/types": "^7.12.17" + "@babel/types": "^7.13.12" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -1087,9 +1088,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "dependencies": { "regenerator-transform": "^0.14.2" }, @@ -1294,12 +1295,12 @@ } }, "node_modules/@babel/register": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.13.8.tgz", - "integrity": "sha512-yCVtABcmvQjRsX2elcZFUV5Q5kDDpHdtXKKku22hNDma60lYuhKmtp1ykZ/okRCPLT2bR5S+cA1kvtBdAFlDTQ==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.13.16.tgz", + "integrity": "sha512-dh2t11ysujTwByQjXNgJ48QZ2zcXKQVdV8s0TbeMI0flmtGWCdTwK9tJiACHXPLmncm5+ktNn/diojA45JE4jg==", "dependencies": { + "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", - "lodash": "^4.17.19", "make-dir": "^2.1.0", "pirates": "^4.0.0", "source-map-support": "^0.5.16" @@ -1309,9 +1310,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.9.tgz", - "integrity": "sha512-aY2kU+xgJ3dJ1eU6FMB9EH8dIe8dmusF1xEku52joLvw6eAFN0AI+WxCLDnpev2LEejWBAy2sBvBOBAjI3zmvA==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", "dependencies": { "regenerator-runtime": "^0.13.4" } @@ -1327,28 +1328,26 @@ } }, "node_modules/@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", + "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", "dependencies": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.14.0", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.14.0", + "@babel/types": "^7.14.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "node_modules/@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, @@ -1581,13 +1580,13 @@ } }, "node_modules/@material-ui/styles": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.3.tgz", - "integrity": "sha512-HzVzCG+PpgUGMUYEJ2rTEmQYeonGh41BYfILNFb/1ueqma+p1meSdu4RX6NjxYBMhf7k+jgfHFTTz+L1SXL/Zg==", + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.4.tgz", + "integrity": "sha512-KNTIZcnj/zprG5LW0Sao7zw+yG3O35pviHzejMdcSGCdWbiO8qzRgOYL8JAxAsWBKOKYwVZxXtHWaB5T2Kvxew==", "dependencies": { "@babel/runtime": "^7.4.4", "@emotion/hash": "^0.8.0", - "@material-ui/types": "^5.1.0", + "@material-ui/types": "5.1.0", "@material-ui/utils": "^4.11.2", "clsx": "^1.0.4", "csstype": "^2.5.2", @@ -1752,6 +1751,17 @@ "node": ">=10" } }, + "node_modules/@reduxjs/toolkit": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.5.1.tgz", + "integrity": "sha512-PngZKuwVZsd+mimnmhiOQzoD0FiMjqVks6ituO1//Ft5UEX5Ca9of13NEjo//pU22Jk7z/mdXVsmDfgsig1osA==", + "dependencies": { + "immer": "^8.0.1", + "redux": "^4.0.0", + "redux-thunk": "^2.3.0", + "reselect": "^4.0.0" + } + }, "node_modules/@types/component-emitter": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz", @@ -1792,9 +1802,9 @@ "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==" }, "node_modules/@types/node": { - "version": "14.14.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", - "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.2.tgz", + "integrity": "sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA==" }, "node_modules/@types/prop-types": { "version": "15.7.3", @@ -1802,11 +1812,12 @@ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" }, "node_modules/@types/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz", - "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==", + "version": "17.0.5", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.5.tgz", + "integrity": "sha512-bj4biDB9ZJmGAYTWSKJly6bMr4BLUiBrx9ujiJEoP9XIDY9CTaPGxE5QWN/1WjpPLzYF7/jRNnV2nNxNe970sw==", "dependencies": { "@types/prop-types": "*", + "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -1819,9 +1830,14 @@ } }, "node_modules/@types/react/node_modules/csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" + }, + "node_modules/@types/scheduler": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz", + "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==" }, "node_modules/@webassemblyjs/ast": { "version": "1.9.0", @@ -2447,9 +2463,9 @@ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base": { "version": "0.11.2", @@ -2547,15 +2563,6 @@ "node": ">=0.10.0" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -2787,15 +2794,15 @@ } }, "node_modules/browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dependencies": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" }, "bin": { "browserslist": "cli.js" @@ -2877,9 +2884,9 @@ } }, "node_modules/cacache": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz", - "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==", + "version": "15.0.6", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.6.tgz", + "integrity": "sha512-g1WYDMct/jzW+JdWEyjaX2zoBkZ6ZT9VpOyp2I/VMtDsNLffNat3kqPFfi1eDRSK9/SuKGyORDHcQMcPF8sQ/w==", "dependencies": { "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", @@ -2895,7 +2902,7 @@ "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", - "ssri": "^8.0.0", + "ssri": "^8.0.1", "tar": "^6.0.2", "unique-filename": "^1.1.1" }, @@ -2962,9 +2969,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==" + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==" }, "node_modules/chalk": { "version": "2.4.2", @@ -3001,9 +3008,9 @@ } }, "node_modules/chokidar/node_modules/anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "optional": true, "dependencies": { "normalize-path": "^3.0.0", @@ -3047,9 +3054,9 @@ } }, "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "optional": true, "dependencies": { "is-glob": "^4.0.1" @@ -3112,12 +3119,9 @@ } }, "node_modules/chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "dependencies": { - "tslib": "^1.9.0" - }, + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "engines": { "node": ">=6.0" } @@ -3167,6 +3171,17 @@ "node": ">=0.10.0" } }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/class-utils/node_modules/is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -3178,6 +3193,17 @@ "node": ">=0.10.0" } }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/class-utils/node_modules/is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -3191,7 +3217,7 @@ "node": ">=0.10.0" } }, - "node_modules/class-utils/node_modules/is-descriptor/node_modules/kind-of": { + "node_modules/class-utils/node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", @@ -3205,9 +3231,9 @@ "integrity": "sha512-RA8O5oCi1I1CF6rR4cRBROh8MtZzM4w7xKLm0jd+S6UN2G4FIto+9DVOeFc46JEZFN5PVe/EZWLQO1VU/AUH4A==" }, "node_modules/classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" }, "node_modules/clean-stack": { "version": "2.2.0", @@ -3246,6 +3272,19 @@ "node": ">=6" } }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -3531,9 +3570,9 @@ } }, "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, @@ -3632,9 +3671,9 @@ } }, "node_modules/core-js": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.1.tgz", - "integrity": "sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.12.1.tgz", + "integrity": "sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -3642,11 +3681,11 @@ } }, "node_modules/core-js-compat": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.9.1.tgz", - "integrity": "sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.12.1.tgz", + "integrity": "sha512-i6h5qODpw6EsHAoIdQhKoZdWn+dGBF3dSS8m5tif36RlWvW3A6+yu2S16QHUo3CrkzrnEskMAt9f8FxmY9fhWQ==", "dependencies": { - "browserslist": "^4.16.3", + "browserslist": "^4.16.6", "semver": "7.0.0" }, "funding": { @@ -3779,9 +3818,9 @@ } }, "node_modules/csstype": { - "version": "2.6.16", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", - "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" + "version": "2.6.17", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz", + "integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==" }, "node_modules/cyclist": { "version": "1.0.1", @@ -3867,9 +3906,9 @@ } }, "node_modules/debounce": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", - "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" }, "node_modules/debug": { "version": "4.3.1", @@ -4044,18 +4083,18 @@ } }, "node_modules/dom-helpers": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz", - "integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" } }, "node_modules/dom-helpers/node_modules/csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" }, "node_modules/dom-walk": { "version": "0.1.2", @@ -4106,13 +4145,12 @@ "react": "^16.8.0" } }, - "node_modules/easy-peasy/node_modules/redux": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", - "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", - "dependencies": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" + "node_modules/easy-peasy/node_modules/is-plain-object": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", + "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", + "engines": { + "node": ">=0.10.0" } }, "node_modules/ecdsa-sig-formatter": { @@ -4129,9 +4167,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "node_modules/electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==" + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -4327,9 +4365,9 @@ } }, "node_modules/es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -4815,9 +4853,9 @@ } }, "node_modules/eslint/node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4846,17 +4884,17 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "engines": { "node": ">=10" } }, "node_modules/eslint/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, @@ -4887,9 +4925,9 @@ } }, "node_modules/eslint/node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -5075,6 +5113,17 @@ "node": ">=0.10.0" } }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/expand-brackets/node_modules/is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -5086,6 +5135,17 @@ "node": ">=0.10.0" } }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/expand-brackets/node_modules/is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -5099,7 +5159,7 @@ "node": ">=0.10.0" } }, - "node_modules/expand-brackets/node_modules/is-descriptor/node_modules/kind-of": { + "node_modules/expand-brackets/node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", @@ -5268,9 +5328,9 @@ } }, "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, @@ -5287,15 +5347,15 @@ } }, "node_modules/fast-glob/node_modules/micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dependencies": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, "node_modules/fast-glob/node_modules/to-regex-range": { @@ -5343,12 +5403,6 @@ "node": ">=4" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true - }, "node_modules/fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -5556,9 +5610,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", + "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==", "funding": [ { "type": "individual", @@ -5669,19 +5723,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -5810,9 +5851,9 @@ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5883,14 +5924,6 @@ "node": ">=6" } }, - "node_modules/global-prefix/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -5911,9 +5944,9 @@ } }, "node_modules/globby": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", - "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -6147,9 +6180,9 @@ } }, "node_modules/hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "node_modules/html-entities": { @@ -6242,15 +6275,15 @@ } }, "node_modules/http-proxy-middleware/node_modules/micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dependencies": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, "node_modules/http-proxy-middleware/node_modules/to-regex-range": { @@ -6322,6 +6355,15 @@ "node": ">= 4" } }, + "node_modules/immer": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.4.tgz", + "integrity": "sha512-jMfL18P+/6P6epANRvRk6q8t+3gGhqsJ9EuJ25AXE+9bNTYtssvzeYbEd0mXRYWCmmXSIbnlpz6vd6iJlmGGGQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/immer-peasy": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/immer-peasy/-/immer-peasy-3.1.3.tgz", @@ -6515,14 +6557,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -6530,9 +6564,9 @@ "dev": true }, "node_modules/is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6550,11 +6584,11 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", "dependencies": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6580,9 +6614,9 @@ } }, "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.3.0.tgz", + "integrity": "sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==", "dependencies": { "has": "^1.0.3" }, @@ -6601,18 +6635,10 @@ "node": ">=0.10.0" } }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", "engines": { "node": ">= 0.4" }, @@ -6633,14 +6659,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -6704,9 +6722,9 @@ } }, "node_modules/is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", "engines": { "node": ">= 0.4" }, @@ -6714,21 +6732,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-plain-object": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", - "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6738,9 +6770,9 @@ } }, "node_modules/is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", "engines": { "node": ">= 0.4" }, @@ -6749,11 +6781,11 @@ } }, "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dependencies": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6902,9 +6934,9 @@ } }, "node_modules/jss": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.5.1.tgz", - "integrity": "sha512-hbbO3+FOTqVdd7ZUoTiwpHzKXIo5vGpMNbuXH1a0wubRSWLWSBvwvaq4CiHH/U42CmjOnp6lVNNs/l+Z7ZdDmg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.6.0.tgz", + "integrity": "sha512-n7SHdCozmxnzYGXBHe0NsO0eUf9TvsHVq2MXvi4JmTn3x5raynodDVE/9VQmBdWFyyj9HpHZ2B4xNZ7MMy7lkw==", "dependencies": { "@babel/runtime": "^7.3.1", "csstype": "^3.0.2", @@ -6918,76 +6950,76 @@ } }, "node_modules/jss-plugin-camel-case": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.5.1.tgz", - "integrity": "sha512-9+oymA7wPtswm+zxVti1qiowC5q7bRdCJNORtns2JUj/QHp2QPXYwSNRD8+D2Cy3/CEMtdJzlNnt5aXmpS6NAg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.6.0.tgz", + "integrity": "sha512-JdLpA3aI/npwj3nDMKk308pvnhoSzkW3PXlbgHAzfx0yHWnPPVUjPhXFtLJzgKZge8lsfkUxvYSQ3X2OYIFU6A==", "dependencies": { "@babel/runtime": "^7.3.1", "hyphenate-style-name": "^1.0.3", - "jss": "10.5.1" + "jss": "10.6.0" } }, "node_modules/jss-plugin-default-unit": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.5.1.tgz", - "integrity": "sha512-D48hJBc9Tj3PusvlillHW8Fz0y/QqA7MNmTYDQaSB/7mTrCZjt7AVRROExoOHEtd2qIYKOYJW3Jc2agnvsXRlQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.6.0.tgz", + "integrity": "sha512-7y4cAScMHAxvslBK2JRK37ES9UT0YfTIXWgzUWD5euvR+JR3q+o8sQKzBw7GmkQRfZijrRJKNTiSt1PBsLI9/w==", "dependencies": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "node_modules/jss-plugin-global": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.5.1.tgz", - "integrity": "sha512-jX4XpNgoaB8yPWw/gA1aPXJEoX0LNpvsROPvxlnYe+SE0JOhuvF7mA6dCkgpXBxfTWKJsno7cDSCgzHTocRjCQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.6.0.tgz", + "integrity": "sha512-I3w7ji/UXPi3VuWrTCbHG9rVCgB4yoBQLehGDTmsnDfXQb3r1l3WIdcO8JFp9m0YMmyy2CU7UOV6oPI7/Tmu+w==", "dependencies": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "node_modules/jss-plugin-nested": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.5.1.tgz", - "integrity": "sha512-xXkWKOCljuwHNjSYcXrCxBnjd8eJp90KVFW1rlhvKKRXnEKVD6vdKXYezk2a89uKAHckSvBvBoDGsfZrldWqqQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.6.0.tgz", + "integrity": "sha512-fOFQWgd98H89E6aJSNkEh2fAXquC9aZcAVjSw4q4RoQ9gU++emg18encR4AT4OOIFl4lQwt5nEyBBRn9V1Rk8g==", "dependencies": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.6.0", "tiny-warning": "^1.0.2" } }, "node_modules/jss-plugin-props-sort": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.5.1.tgz", - "integrity": "sha512-t+2vcevNmMg4U/jAuxlfjKt46D/jHzCPEjsjLRj/J56CvP7Iy03scsUP58Iw8mVnaV36xAUZH2CmAmAdo8994g==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.6.0.tgz", + "integrity": "sha512-oMCe7hgho2FllNc60d9VAfdtMrZPo9n1Iu6RNa+3p9n0Bkvnv/XX5San8fTPujrTBScPqv9mOE0nWVvIaohNuw==", "dependencies": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "node_modules/jss-plugin-rule-value-function": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.5.1.tgz", - "integrity": "sha512-3gjrSxsy4ka/lGQsTDY8oYYtkt2esBvQiceGBB4PykXxHoGRz14tbCK31Zc6DHEnIeqsjMUGbq+wEly5UViStQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.6.0.tgz", + "integrity": "sha512-TKFqhRTDHN1QrPTMYRlIQUOC2FFQb271+AbnetURKlGvRl/eWLswcgHQajwuxI464uZk91sPiTtdGi7r7XaWfA==", "dependencies": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.6.0", "tiny-warning": "^1.0.2" } }, "node_modules/jss-plugin-vendor-prefixer": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.5.1.tgz", - "integrity": "sha512-cLkH6RaPZWHa1TqSfd2vszNNgxT1W0omlSjAd6hCFHp3KIocSrW21gaHjlMU26JpTHwkc+tJTCQOmE/O1A4FKQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.6.0.tgz", + "integrity": "sha512-doJ7MouBXT1lypLLctCwb4nJ6lDYqrTfVS3LtXgox42Xz0gXusXIIDboeh6UwnSmox90QpVnub7au8ybrb0krQ==", "dependencies": { "@babel/runtime": "^7.3.1", "css-vendor": "^2.0.8", - "jss": "10.5.1" + "jss": "10.6.0" } }, "node_modules/jss/node_modules/csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" }, "node_modules/jsx-ast-utils": { "version": "3.2.0", @@ -7030,12 +7062,9 @@ } }, "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "engines": { "node": ">=0.10.0" } @@ -7360,25 +7389,6 @@ "node": ">=0.10.0" } }, - "node_modules/micromatch/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/micromatch/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -7408,19 +7418,19 @@ } }, "node_modules/mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "dependencies": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" }, "engines": { "node": ">= 0.6" @@ -7583,17 +7593,6 @@ "node": ">=0.10.0" } }, - "node_modules/mixin-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -7729,25 +7728,6 @@ "node": ">=0.10.0" } }, - "node_modules/nanomatch/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -7777,9 +7757,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node_modules/node-abi": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.20.0.tgz", - "integrity": "sha512-6ldtfVR5l3RS8D0aT+lj/uM2Vv/PGEkeWzt2tl8DFBsGY/IuVnAIHl+dG6C14NlWClVv7Rn2+ZDvox+35Hx2Kg==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.26.0.tgz", + "integrity": "sha512-ag/Vos/mXXpWLLAYWsAoQdgS+gW7IwvgMLOgqopm/DbzAjazLltzgzpVMsFlgmo9TzG5hGXeaBZx2AI731RIsQ==", "dependencies": { "semver": "^5.4.1" } @@ -7973,10 +7953,21 @@ "node": ">=0.10.0" } }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8409,9 +8400,9 @@ } }, "node_modules/pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -8424,9 +8415,9 @@ } }, "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", "engines": { "node": ">=8.6" }, @@ -8763,9 +8754,9 @@ } }, "node_modules/queue-microtask": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", - "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "funding": [ { "type": "github", @@ -8998,6 +8989,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/react-minimal-pie-chart/-/react-minimal-pie-chart-8.2.0.tgz", "integrity": "sha512-RhrHzprJt3KfBe4L3sE0Ha6fj4kYcwQtesQgscnld9Umf64+nZnxxInycnbimKsbIjxJONv77JIZp+qRbJD+bA==", + "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0" @@ -9177,6 +9169,14 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -9207,12 +9207,11 @@ } }, "node_modules/redux": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz", - "integrity": "sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", + "integrity": "sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g==", "dependencies": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" + "@babel/runtime": "^7.9.2" } }, "node_modules/redux-thunk": { @@ -9284,17 +9283,6 @@ "node": ">=0.10.0" } }, - "node_modules/regex-not/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", @@ -9344,9 +9332,9 @@ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" }, "node_modules/regjsparser": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz", - "integrity": "sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", "dependencies": { "jsesc": "~0.5.0" }, @@ -9369,9 +9357,9 @@ "optional": true }, "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "engines": { "node": ">=0.10.0" } @@ -9722,17 +9710,6 @@ "node": ">=0.10.0" } }, - "node_modules/set-value/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -9755,6 +9732,17 @@ "sha.js": "bin.js" } }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -9902,6 +9890,17 @@ "node": ">=0.10.0" } }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/snapdragon/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -9932,6 +9931,17 @@ "node": ">=0.10.0" } }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/snapdragon/node_modules/is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -9943,6 +9953,17 @@ "node": ">=0.10.0" } }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/snapdragon/node_modules/is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -9956,7 +9977,7 @@ "node": ">=0.10.0" } }, - "node_modules/snapdragon/node_modules/is-descriptor/node_modules/kind-of": { + "node_modules/snapdragon/node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", @@ -10163,17 +10184,6 @@ "node": ">=0.10.0" } }, - "node_modules/split-string/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", @@ -10229,6 +10239,17 @@ "node": ">=0.10.0" } }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/static-extend/node_modules/is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -10240,6 +10261,17 @@ "node": ">=0.10.0" } }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/static-extend/node_modules/is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -10253,7 +10285,7 @@ "node": ">=0.10.0" } }, - "node_modules/static-extend/node_modules/is-descriptor/node_modules/kind-of": { + "node_modules/static-extend/node_modules/kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", @@ -10305,13 +10337,32 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dependencies": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -10644,9 +10695,9 @@ } }, "node_modules/terser-webpack-plugin/node_modules/ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", "dependencies": { "figgy-pudding": "^3.5.1" } @@ -10728,6 +10779,17 @@ "node": ">=0.10.0" } }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -10777,17 +10839,6 @@ "node": ">=0.10.0" } }, - "node_modules/to-regex/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -10830,11 +10881,6 @@ "json5": "lib/cli.js" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -10893,14 +10939,17 @@ "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" }, "node_modules/unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dependencies": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -11129,9 +11178,9 @@ } }, "node_modules/v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "node_modules/v8flags": { "version": "3.2.0", @@ -11217,24 +11266,6 @@ "fsevents": "^1.2.7" } }, - "node_modules/watchpack-chokidar2/node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, "node_modules/webpack": { "version": "4.43.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", @@ -11810,9 +11841,9 @@ } }, "node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "node_modules/yallist": { "version": "4.0.0", @@ -11975,9 +12006,9 @@ } }, "@babel/compat-data": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.8.tgz", - "integrity": "sha512-EaI33z19T4qN3xLXsGf48M2cDqa6ei9tPZlfLdb2HC+e/cFtREiRd8hdSqDbwdLB0/+gLwqJmCYASH0z2bUdog==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==" }, "@babel/core": { "version": "7.12.13", @@ -12002,11 +12033,11 @@ } }, "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.1", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -12029,11 +12060,11 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.8.tgz", - "integrity": "sha512-pBljUGC1y3xKLn1nrx2eAhurLMA8OqBtBP/JwG4U8skN7kf8/aqwwxpV1N6T0e7r6+7uNitIa/fUxPFagSXp3A==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "requires": { - "@babel/compat-data": "^7.13.8", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -12047,14 +12078,15 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.8.tgz", - "integrity": "sha512-qioaRrKHQbn4hkRKDHbnuQ6kAxmmOF+kzKGnIfxPK4j2rckSJCpKzr/SSTlohSCiE3uAQpNDJ9FIh4baeE8W+w==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.1.tgz", + "integrity": "sha512-r8rsUahG4ywm0QpGcCrLaUSOuNAISR3IZCg4Fx05Ozq31aCUrQsTLH6KPxy0N5ULoQ4Sn9qjNdGNtbPWAC6hYg==", "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13" } }, @@ -12094,44 +12126,43 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.16.tgz", + "integrity": "sha512-1eMtTrXtrwscjcAeO4BVK+vvkxaLJSPFz1w1KLawz6HLNi9bPFGBNwwDyVfiu1Tv/vRRFYfoGaKhmAQPGPn5Wg==", "requires": { - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz", - "integrity": "sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", "requires": { - "@babel/types": "^7.13.0" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-imports": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", - "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-transforms": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.0.tgz", - "integrity": "sha512-Ls8/VBwH577+pw7Ku1QkUWIyRRNHpYlts7+qSqBBFCW3I8QteB9DxfcZ5YJpOwH6Ihe/wn8ch7fMGOP1OhEIvw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", + "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", "requires": { - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", - "lodash": "^4.17.19" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/helper-optimise-call-expression": { @@ -12158,22 +12189,22 @@ } }, "@babel/helper-replace-supers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz", - "integrity": "sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/types": "^7.13.12" } }, "@babel/helper-simple-access": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", - "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.13.12" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -12193,9 +12224,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" }, "@babel/helper-validator-option": { "version": "7.12.17", @@ -12214,21 +12245,21 @@ } }, "@babel/helpers": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.0.tgz", - "integrity": "sha512-aan1MeFPxFacZeSz6Ld7YZo5aPuqnKlD7+HZY75xQsueczFccP9A7V05+oe0XpLwHK3oLorPe9eaAUljL7WEaQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/highlight": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", - "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } @@ -12248,14 +12279,14 @@ } }, "@babel/parser": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz", - "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==" + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", + "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz", + "integrity": "sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -12503,11 +12534,11 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.1.tgz", + "integrity": "sha512-2mQXd0zBrwfp0O1moWIhPpEeTKDvxyHcnma3JATVP1l+CctWBuot6OJG8LQ4DnBj4ZZPSmlb/fm4mu47EOAnVA==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" } }, "@babel/plugin-transform-classes": { @@ -12533,9 +12564,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.17.tgz", + "integrity": "sha512-UAUqiLv+uRLO+xuBKKMEpC+t7YRNVRqBsWWq1yKXbBZBje/t3IXCiSinZhjn/DC3qzBfICeYd2EFGEbHsh5RLA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0" } @@ -12600,23 +12631,23 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.0.tgz", + "integrity": "sha512-CF4c5LX4LQ03LebQxJ5JZes2OYjzBuk1TdiF7cG7d5dK4lAdw9NZmaxq5K/mouUdNeqwz3TNjnW6v01UqUNgpQ==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.0.tgz", + "integrity": "sha512-EX4QePlsTaRZQmw9BsoPeyh5OCtRGIhwfLquhxGp5e32w+dyL8htOcDwamlitmNFK6xBZYlygjdye9dbd9rUlQ==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-simple-access": "^7.13.12", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -12633,11 +12664,11 @@ } }, "@babel/plugin-transform-modules-umd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.0.tgz", + "integrity": "sha512-nPZdnWtXXeY7I87UZr9VlsWme3Y0cfFFE41Wbxz4bbaexAjNMInXPFUpRRUJ8NoMm0Cw+zxbqjdPmLhcjfazMw==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0" } }, @@ -12691,15 +12722,15 @@ } }, "@babel/plugin-transform-react-jsx": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz", - "integrity": "sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.13.12.tgz", + "integrity": "sha512-jcEI2UqIcpCqB5U5DRxIl0tQEProI2gcu+g8VTIqxLO5Iidojb4d77q+fwGseCvd8af/lJ9masp4QWzBXFE2xA==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/types": "^7.12.17" + "@babel/types": "^7.13.12" } }, "@babel/plugin-transform-react-jsx-development": { @@ -12720,9 +12751,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "requires": { "regenerator-transform": "^0.14.2" } @@ -12891,21 +12922,21 @@ } }, "@babel/register": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.13.8.tgz", - "integrity": "sha512-yCVtABcmvQjRsX2elcZFUV5Q5kDDpHdtXKKku22hNDma60lYuhKmtp1ykZ/okRCPLT2bR5S+cA1kvtBdAFlDTQ==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.13.16.tgz", + "integrity": "sha512-dh2t11ysujTwByQjXNgJ48QZ2zcXKQVdV8s0TbeMI0flmtGWCdTwK9tJiACHXPLmncm5+ktNn/diojA45JE4jg==", "requires": { + "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", - "lodash": "^4.17.19", "make-dir": "^2.1.0", "pirates": "^4.0.0", "source-map-support": "^0.5.16" } }, "@babel/runtime": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.9.tgz", - "integrity": "sha512-aY2kU+xgJ3dJ1eU6FMB9EH8dIe8dmusF1xEku52joLvw6eAFN0AI+WxCLDnpev2LEejWBAy2sBvBOBAjI3zmvA==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -12921,28 +12952,26 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", + "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.14.0", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.14.0", + "@babel/types": "^7.14.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", - "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, @@ -13073,13 +13102,13 @@ } }, "@material-ui/styles": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.3.tgz", - "integrity": "sha512-HzVzCG+PpgUGMUYEJ2rTEmQYeonGh41BYfILNFb/1ueqma+p1meSdu4RX6NjxYBMhf7k+jgfHFTTz+L1SXL/Zg==", + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.4.tgz", + "integrity": "sha512-KNTIZcnj/zprG5LW0Sao7zw+yG3O35pviHzejMdcSGCdWbiO8qzRgOYL8JAxAsWBKOKYwVZxXtHWaB5T2Kvxew==", "requires": { "@babel/runtime": "^7.4.4", "@emotion/hash": "^0.8.0", - "@material-ui/types": "^5.1.0", + "@material-ui/types": "5.1.0", "@material-ui/utils": "^4.11.2", "clsx": "^1.0.4", "csstype": "^2.5.2", @@ -13180,6 +13209,17 @@ } } }, + "@reduxjs/toolkit": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.5.1.tgz", + "integrity": "sha512-PngZKuwVZsd+mimnmhiOQzoD0FiMjqVks6ituO1//Ft5UEX5Ca9of13NEjo//pU22Jk7z/mdXVsmDfgsig1osA==", + "requires": { + "immer": "^8.0.1", + "redux": "^4.0.0", + "redux-thunk": "^2.3.0", + "reselect": "^4.0.0" + } + }, "@types/component-emitter": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz", @@ -13220,9 +13260,9 @@ "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==" }, "@types/node": { - "version": "14.14.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", - "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.2.tgz", + "integrity": "sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA==" }, "@types/prop-types": { "version": "15.7.3", @@ -13230,18 +13270,19 @@ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" }, "@types/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz", - "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==", + "version": "17.0.5", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.5.tgz", + "integrity": "sha512-bj4biDB9ZJmGAYTWSKJly6bMr4BLUiBrx9ujiJEoP9XIDY9CTaPGxE5QWN/1WjpPLzYF7/jRNnV2nNxNe970sw==", "requires": { "@types/prop-types": "*", + "@types/scheduler": "*", "csstype": "^3.0.2" }, "dependencies": { "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" } } }, @@ -13253,6 +13294,11 @@ "@types/react": "*" } }, + "@types/scheduler": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz", + "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==" + }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", @@ -13777,9 +13823,9 @@ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base": { "version": "0.11.2", @@ -13844,15 +13890,6 @@ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "optional": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -14047,15 +14084,15 @@ } }, "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" } }, "btoa": { @@ -14118,9 +14155,9 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz", - "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==", + "version": "15.0.6", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.6.tgz", + "integrity": "sha512-g1WYDMct/jzW+JdWEyjaX2zoBkZ6ZT9VpOyp2I/VMtDsNLffNat3kqPFfi1eDRSK9/SuKGyORDHcQMcPF8sQ/w==", "requires": { "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", @@ -14136,7 +14173,7 @@ "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", - "ssri": "^8.0.0", + "ssri": "^8.0.1", "tar": "^6.0.2", "unique-filename": "^1.1.1" }, @@ -14184,9 +14221,9 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { - "version": "1.0.30001194", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001194.tgz", - "integrity": "sha512-iDUOH+oFeBYk5XawYsPtsx/8fFpndAPUQJC7gBTfxHM8xw5nOZv7ceAD4frS1MKCLUac7QL5wdAJiFQlDRjXlA==" + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==" }, "chalk": { "version": "2.4.2", @@ -14215,9 +14252,9 @@ }, "dependencies": { "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "optional": true, "requires": { "normalize-path": "^3.0.0", @@ -14249,9 +14286,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "optional": true, "requires": { "is-glob": "^4.0.1" @@ -14298,12 +14335,9 @@ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "requires": { - "tslib": "^1.9.0" - } + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, "cipher-base": { "version": "1.0.4", @@ -14339,6 +14373,16 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-data-descriptor": { @@ -14347,6 +14391,16 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-descriptor": { @@ -14357,14 +14411,12 @@ "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -14374,9 +14426,9 @@ "integrity": "sha512-RA8O5oCi1I1CF6rR4cRBROh8MtZzM4w7xKLm0jd+S6UN2G4FIto+9DVOeFc46JEZFN5PVe/EZWLQO1VU/AUH4A==" }, "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" }, "clean-stack": { "version": "2.2.0", @@ -14408,6 +14460,16 @@ } } }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, "clsx": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", @@ -14636,9 +14698,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -14708,16 +14770,16 @@ } }, "core-js": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.1.tgz", - "integrity": "sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==" + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.12.1.tgz", + "integrity": "sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw==" }, "core-js-compat": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.9.1.tgz", - "integrity": "sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.12.1.tgz", + "integrity": "sha512-i6h5qODpw6EsHAoIdQhKoZdWn+dGBF3dSS8m5tif36RlWvW3A6+yu2S16QHUo3CrkzrnEskMAt9f8FxmY9fhWQ==", "requires": { - "browserslist": "^4.16.3", + "browserslist": "^4.16.6", "semver": "7.0.0" }, "dependencies": { @@ -14829,9 +14891,9 @@ } }, "csstype": { - "version": "2.6.16", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", - "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" + "version": "2.6.17", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz", + "integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==" }, "cyclist": { "version": "1.0.1", @@ -14914,9 +14976,9 @@ } }, "debounce": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", - "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" }, "debug": { "version": "4.3.1", @@ -15049,18 +15111,18 @@ } }, "dom-helpers": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz", - "integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", "requires": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" }, "dependencies": { "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" } } }, @@ -15106,14 +15168,10 @@ "ts-toolbelt": "^6.1.6" }, "dependencies": { - "redux": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", - "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", - "requires": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" - } + "is-plain-object": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", + "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==" } } }, @@ -15131,9 +15189,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.678", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.678.tgz", - "integrity": "sha512-E5ha1pE9+aWWrT2fUD5wdPBWUnYtKnEnloewbtVyrkAs79HvodOiNO4rMR94+hKbxgMFQG4fnPQACOc1cfMfBg==" + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==" }, "elliptic": { "version": "6.5.4", @@ -15283,9 +15341,9 @@ } }, "es-abstract": { - "version": "1.18.0-next.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.3.tgz", - "integrity": "sha512-VMzHx/Bczjg59E6jZOQjHeN3DEoptdhejpARgflAViidlqSpjdq9zA6lKwlhRRs/lOw1gHJv2xkkSFRgvEwbQg==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -15383,9 +15441,9 @@ } }, "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -15405,14 +15463,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -15431,9 +15489,9 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "requires": { "lru-cache": "^6.0.0" } @@ -15846,6 +15904,16 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-data-descriptor": { @@ -15854,6 +15922,16 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-descriptor": { @@ -15864,15 +15942,13 @@ "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } } }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -16013,9 +16089,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -16026,12 +16102,12 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "to-regex-range": { @@ -16075,12 +16151,6 @@ "flat-cache": "^2.0.1" } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -16251,9 +16321,9 @@ } }, "follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", + "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==" }, "for-in": { "version": "1.0.2", @@ -16332,12 +16402,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -16438,9 +16502,9 @@ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -16498,11 +16562,6 @@ "which": "^1.3.1" }, "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -16519,9 +16578,9 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "globby": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", - "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -16699,9 +16758,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-entities": { @@ -16778,12 +16837,12 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "to-regex-range": { @@ -16834,6 +16893,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, + "immer": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.4.tgz", + "integrity": "sha512-jMfL18P+/6P6epANRvRk6q8t+3gGhqsJ9EuJ25AXE+9bNTYtssvzeYbEd0mXRYWCmmXSIbnlpz6vd6iJlmGGGQ==" + }, "immer-peasy": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/immer-peasy/-/immer-peasy-3.1.3.tgz", @@ -16979,13 +17043,6 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } } }, "is-arrayish": { @@ -16995,9 +17052,9 @@ "dev": true }, "is-bigint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" }, "is-binary-path": { "version": "1.0.1", @@ -17009,11 +17066,11 @@ } }, "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", "requires": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2" } }, "is-buffer": { @@ -17027,9 +17084,9 @@ "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.3.0.tgz", + "integrity": "sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==", "requires": { "has": "^1.0.3" } @@ -17040,19 +17097,12 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } } }, "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==" }, "is-descriptor": { "version": "1.0.2", @@ -17062,13 +17112,6 @@ "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - } } }, "is-extendable": { @@ -17110,38 +17153,51 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" }, "is-plain-object": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", - "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } }, "is-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", - "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", "requires": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" } }, "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" }, "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" } }, "is-windows": { @@ -17250,9 +17306,9 @@ } }, "jss": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.5.1.tgz", - "integrity": "sha512-hbbO3+FOTqVdd7ZUoTiwpHzKXIo5vGpMNbuXH1a0wubRSWLWSBvwvaq4CiHH/U42CmjOnp6lVNNs/l+Z7ZdDmg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.6.0.tgz", + "integrity": "sha512-n7SHdCozmxnzYGXBHe0NsO0eUf9TvsHVq2MXvi4JmTn3x5raynodDVE/9VQmBdWFyyj9HpHZ2B4xNZ7MMy7lkw==", "requires": { "@babel/runtime": "^7.3.1", "csstype": "^3.0.2", @@ -17262,77 +17318,77 @@ }, "dependencies": { "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==" + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==" } } }, "jss-plugin-camel-case": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.5.1.tgz", - "integrity": "sha512-9+oymA7wPtswm+zxVti1qiowC5q7bRdCJNORtns2JUj/QHp2QPXYwSNRD8+D2Cy3/CEMtdJzlNnt5aXmpS6NAg==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.6.0.tgz", + "integrity": "sha512-JdLpA3aI/npwj3nDMKk308pvnhoSzkW3PXlbgHAzfx0yHWnPPVUjPhXFtLJzgKZge8lsfkUxvYSQ3X2OYIFU6A==", "requires": { "@babel/runtime": "^7.3.1", "hyphenate-style-name": "^1.0.3", - "jss": "10.5.1" + "jss": "10.6.0" } }, "jss-plugin-default-unit": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.5.1.tgz", - "integrity": "sha512-D48hJBc9Tj3PusvlillHW8Fz0y/QqA7MNmTYDQaSB/7mTrCZjt7AVRROExoOHEtd2qIYKOYJW3Jc2agnvsXRlQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.6.0.tgz", + "integrity": "sha512-7y4cAScMHAxvslBK2JRK37ES9UT0YfTIXWgzUWD5euvR+JR3q+o8sQKzBw7GmkQRfZijrRJKNTiSt1PBsLI9/w==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "jss-plugin-global": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.5.1.tgz", - "integrity": "sha512-jX4XpNgoaB8yPWw/gA1aPXJEoX0LNpvsROPvxlnYe+SE0JOhuvF7mA6dCkgpXBxfTWKJsno7cDSCgzHTocRjCQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.6.0.tgz", + "integrity": "sha512-I3w7ji/UXPi3VuWrTCbHG9rVCgB4yoBQLehGDTmsnDfXQb3r1l3WIdcO8JFp9m0YMmyy2CU7UOV6oPI7/Tmu+w==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "jss-plugin-nested": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.5.1.tgz", - "integrity": "sha512-xXkWKOCljuwHNjSYcXrCxBnjd8eJp90KVFW1rlhvKKRXnEKVD6vdKXYezk2a89uKAHckSvBvBoDGsfZrldWqqQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.6.0.tgz", + "integrity": "sha512-fOFQWgd98H89E6aJSNkEh2fAXquC9aZcAVjSw4q4RoQ9gU++emg18encR4AT4OOIFl4lQwt5nEyBBRn9V1Rk8g==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.6.0", "tiny-warning": "^1.0.2" } }, "jss-plugin-props-sort": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.5.1.tgz", - "integrity": "sha512-t+2vcevNmMg4U/jAuxlfjKt46D/jHzCPEjsjLRj/J56CvP7Iy03scsUP58Iw8mVnaV36xAUZH2CmAmAdo8994g==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.6.0.tgz", + "integrity": "sha512-oMCe7hgho2FllNc60d9VAfdtMrZPo9n1Iu6RNa+3p9n0Bkvnv/XX5San8fTPujrTBScPqv9mOE0nWVvIaohNuw==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1" + "jss": "10.6.0" } }, "jss-plugin-rule-value-function": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.5.1.tgz", - "integrity": "sha512-3gjrSxsy4ka/lGQsTDY8oYYtkt2esBvQiceGBB4PykXxHoGRz14tbCK31Zc6DHEnIeqsjMUGbq+wEly5UViStQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.6.0.tgz", + "integrity": "sha512-TKFqhRTDHN1QrPTMYRlIQUOC2FFQb271+AbnetURKlGvRl/eWLswcgHQajwuxI464uZk91sPiTtdGi7r7XaWfA==", "requires": { "@babel/runtime": "^7.3.1", - "jss": "10.5.1", + "jss": "10.6.0", "tiny-warning": "^1.0.2" } }, "jss-plugin-vendor-prefixer": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.5.1.tgz", - "integrity": "sha512-cLkH6RaPZWHa1TqSfd2vszNNgxT1W0omlSjAd6hCFHp3KIocSrW21gaHjlMU26JpTHwkc+tJTCQOmE/O1A4FKQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.6.0.tgz", + "integrity": "sha512-doJ7MouBXT1lypLLctCwb4nJ6lDYqrTfVS3LtXgox42Xz0gXusXIIDboeh6UwnSmox90QpVnub7au8ybrb0krQ==", "requires": { "@babel/runtime": "^7.3.1", "css-vendor": "^2.0.8", - "jss": "10.5.1" + "jss": "10.6.0" } }, "jsx-ast-utils": { @@ -17370,12 +17426,9 @@ "integrity": "sha512-40aUybvhH9t2h71ncA1/1SbtTNCVZHgsTsTgqPUxGWDmUDrXyDf2wMNQKEbdBjbf4AI+fQhbECNTV6lWxQKUzg==" }, "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "levn": { "version": "0.4.1", @@ -17637,19 +17690,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -17675,16 +17715,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" }, "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "requires": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" } }, "mimic-response": { @@ -17806,14 +17846,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } } } }, @@ -17934,19 +17966,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" } } }, @@ -17976,9 +17995,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-abi": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.20.0.tgz", - "integrity": "sha512-6ldtfVR5l3RS8D0aT+lj/uM2Vv/PGEkeWzt2tl8DFBsGY/IuVnAIHl+dG6C14NlWClVv7Rn2+ZDvox+35Hx2Kg==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.26.0.tgz", + "integrity": "sha512-ag/Vos/mXXpWLLAYWsAoQdgS+gW7IwvgMLOgqopm/DbzAjazLltzgzpVMsFlgmo9TzG5hGXeaBZx2AI731RIsQ==", "requires": { "semver": "^5.4.1" } @@ -18134,13 +18153,21 @@ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } } } }, "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" }, "object-keys": { "version": "1.1.1", @@ -18472,9 +18499,9 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -18484,9 +18511,9 @@ } }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" }, "pify": { "version": "4.0.1", @@ -18745,9 +18772,9 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "queue-microtask": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", - "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, "randombytes": { "version": "2.1.0", @@ -19066,6 +19093,16 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "readdirp": { @@ -19091,12 +19128,11 @@ } }, "redux": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz", - "integrity": "sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", + "integrity": "sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g==", "requires": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" + "@babel/runtime": "^7.9.2" } }, "redux-thunk": { @@ -19155,14 +19191,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } } } }, @@ -19200,9 +19228,9 @@ "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" }, "regjsparser": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz", - "integrity": "sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", "requires": { "jsesc": "~0.5.0" }, @@ -19221,9 +19249,9 @@ "optional": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" }, "repeat-string": { "version": "1.6.1", @@ -19500,16 +19528,6 @@ "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" - }, - "dependencies": { - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - } } }, "setimmediate": { @@ -19531,6 +19549,14 @@ "safe-buffer": "^5.0.1" } }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "requires": { + "kind-of": "^6.0.2" + } + }, "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", @@ -19633,6 +19659,16 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-data-descriptor": { @@ -19641,6 +19677,16 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-descriptor": { @@ -19651,15 +19697,13 @@ "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } } }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -19693,6 +19737,16 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "socket.io": { @@ -19862,14 +19916,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } } } }, @@ -19914,6 +19960,16 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-data-descriptor": { @@ -19922,6 +19978,16 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-descriptor": { @@ -19932,14 +19998,12 @@ "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -19984,11 +20048,18 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } } }, "string-width": { @@ -20265,9 +20336,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", "requires": { "figgy-pudding": "^3.5.1" } @@ -20327,6 +20398,16 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "to-regex": { @@ -20356,14 +20437,6 @@ "requires": { "is-plain-object": "^2.0.4" } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } } } }, @@ -20414,11 +20487,6 @@ } } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -20465,14 +20533,14 @@ "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" }, "unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "requires": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" } }, "unicode-canonical-property-names-ecmascript": { @@ -20658,9 +20726,9 @@ "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" }, "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "v8flags": { "version": "3.2.0", @@ -20734,16 +20802,6 @@ "readdirp": "^2.2.1", "upath": "^1.1.1" } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } } } }, @@ -21196,9 +21254,9 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "yallist": { "version": "4.0.0", diff --git a/src/fireedge/package.json b/src/fireedge/package.json index cd7eaa5fd9..e18677337e 100644 --- a/src/fireedge/package.json +++ b/src/fireedge/package.json @@ -60,6 +60,7 @@ "@material-ui/core": "4.11.0", "@material-ui/icons": "4.11.2", "@material-ui/lab": "4.0.0-alpha.58", + "@reduxjs/toolkit": "1.5.1", "ace-builds": "1.4.12", "atob": "2.1.2", "axios": "0.21.1", @@ -108,7 +109,7 @@ "react-router": "5.2.0", "react-router-dom": "5.2.0", "react-transition-group": "4.4.1", - "redux": "4.0.4", + "redux": "4.1.0", "redux-thunk": "2.3.0", "rimraf": "3.0.2", "socket.io": "4.1.2", diff --git a/src/fireedge/src/client/apps/flow/_app.js b/src/fireedge/src/client/apps/flow/_app.js index 61d4e59b7e..426722861d 100644 --- a/src/fireedge/src/client/apps/flow/_app.js +++ b/src/fireedge/src/client/apps/flow/_app.js @@ -16,13 +16,46 @@ import * as React from 'react' import Router from 'client/router' -import routes from 'client/router/flow' +import routes from 'client/apps/flow/routes' -import { _APPS } from 'client/constants' +import { useGeneralApi } from 'client/features/General' +import { useAuth, useAuthApi } from 'client/features/Auth' + +import LoadingScreen from 'client/components/LoadingScreen' +import { fakeDelay } from 'client/utils' +import { _APPS, TIME_HIDE_LOGO } from 'client/constants' const APP_NAME = _APPS.flow.name -const FlowApp = () => +const FlowApp = () => { + const [firstRender, setFirstRender] = React.useState(() => true) + + const { jwt } = useAuth() + const { getAuthUser } = useAuthApi() + const { changeTitle } = useGeneralApi() + + React.useEffect(() => { + if (firstRender) { + jwt && (async () => { + await getAuthUser() + })() + + fakeDelay(TIME_HIDE_LOGO).then(() => setFirstRender(false)) + } + }, [firstRender, jwt]) + + React.useEffect(() => { + changeTitle(APP_NAME) + }, []) + + if (firstRender) { + return + } + + return ( + + ) +} FlowApp.displayName = '_FlowApp' diff --git a/src/fireedge/src/client/router/flow.js b/src/fireedge/src/client/apps/flow/routes.js similarity index 66% rename from src/fireedge/src/client/router/flow.js rename to src/fireedge/src/client/apps/flow/routes.js index e8cd604f31..a2d7e7d41c 100644 --- a/src/fireedge/src/client/router/flow.js +++ b/src/fireedge/src/client/apps/flow/routes.js @@ -6,12 +6,25 @@ import { import loadable from '@loadable/component' -const Login = loadable(() => import('client/containers/Login'), { ssr: false }) +const Dashboard = loadable( + () => import('client/containers/Dashboard'), + { ssr: false } +) -const Dashboard = loadable(() => import('client/containers/Dashboard'), { ssr: false }) -const Settings = loadable(() => import('client/containers/Settings'), { ssr: false }) -const ApplicationsTemplates = loadable(() => import('client/containers/ApplicationsTemplates'), { ssr: false }) -const ApplicationsInstances = loadable(() => import('client/containers/ApplicationsInstances'), { ssr: false }) +const Settings = loadable( + () => import('client/containers/Settings'), + { ssr: false } +) + +const ApplicationsTemplates = loadable( + () => import('client/containers/ApplicationsTemplates'), + { ssr: false } +) + +const ApplicationsInstances = loadable( + () => import('client/containers/ApplicationsInstances'), + { ssr: false } +) const ApplicationsTemplatesFormCreate = loadable( () => import('client/containers/ApplicationsTemplates/Form/Create'), @@ -19,7 +32,6 @@ const ApplicationsTemplatesFormCreate = loadable( ) export const PATH = { - LOGIN: '/', DASHBOARD: '/dashboard', APPLICATIONS_TEMPLATES: { LIST: '/applications-templates', @@ -33,16 +45,9 @@ export const PATH = { } export const ENDPOINTS = [ - { - label: 'Login', - path: PATH.LOGIN, - authenticated: false, - Component: Login - }, { label: 'Dashboard', path: PATH.DASHBOARD, - authenticated: true, sidebar: true, icon: DashboardIcon, Component: Dashboard @@ -50,14 +55,12 @@ export const ENDPOINTS = [ { label: 'Settings', path: PATH.SETTINGS, - authenticated: true, header: true, Component: Settings }, { label: 'Templates', path: PATH.APPLICATIONS_TEMPLATES.LIST, - authenticated: true, sidebar: true, icon: TemplatesIcons, Component: ApplicationsTemplates @@ -65,19 +68,16 @@ export const ENDPOINTS = [ { label: 'Create Application template', path: PATH.APPLICATIONS_TEMPLATES.CREATE, - authenticated: true, Component: ApplicationsTemplatesFormCreate }, { label: 'Edit Application template', path: PATH.APPLICATIONS_TEMPLATES.EDIT, - authenticated: true, Component: ApplicationsTemplatesFormCreate }, { label: 'Instances', path: PATH.APPLICATIONS.LIST, - authenticated: true, sidebar: true, icon: InstancesIcons, Component: ApplicationsInstances diff --git a/src/fireedge/src/client/apps/provision/_app.js b/src/fireedge/src/client/apps/provision/_app.js index 6fb0b3ddd4..13efb59827 100644 --- a/src/fireedge/src/client/apps/provision/_app.js +++ b/src/fireedge/src/client/apps/provision/_app.js @@ -15,25 +15,52 @@ import * as React from 'react' -import { useAuth, useProvision } from 'client/hooks' import Router from 'client/router' -import routes from 'client/router/provision' +import routes from 'client/apps/provision/routes' +import { useGeneralApi } from 'client/features/General' +import { useAuth, useAuthApi } from 'client/features/Auth' +import { useProvisionTemplate, useProvisionApi } from 'client/features/One' + +import LoadingScreen from 'client/components/LoadingScreen' import { _APPS } from 'client/constants' const APP_NAME = _APPS.provision.name const ProvisionApp = () => { - const { isLogged, isLoginInProcess } = useAuth() - const { getProvisionsTemplates } = useProvision() + const { jwt } = useAuth() + const { getAuthUser, logout } = useAuthApi() + + const provisionTemplate = useProvisionTemplate() + const { getProvisionsTemplates } = useProvisionApi() + const { changeTitle } = useGeneralApi() + + const [firstRender, setFirstRender] = React.useState(() => !!jwt) React.useEffect(() => { - if (isLogged && !isLoginInProcess) { - getProvisionsTemplates() - } - }, [isLogged]) + (async () => { + try { + if (jwt) { + getAuthUser() + !provisionTemplate?.length && await getProvisionsTemplates() + } - return + firstRender && setFirstRender(false) + } catch { + logout() + } + })() + }, [firstRender, jwt]) + + React.useEffect(() => { + changeTitle(APP_NAME) + }, []) + + if (firstRender) { + return + } + + return } ProvisionApp.displayName = '_ProvisionApp' diff --git a/src/fireedge/src/client/router/provision.js b/src/fireedge/src/client/apps/provision/routes.js similarity index 84% rename from src/fireedge/src/client/router/provision.js rename to src/fireedge/src/client/apps/provision/routes.js index 686fa8d1b6..443d011071 100644 --- a/src/fireedge/src/client/router/provision.js +++ b/src/fireedge/src/client/apps/provision/routes.js @@ -7,7 +7,6 @@ import { import loadable from '@loadable/component' -const Login = loadable(() => import('client/containers/Login'), { ssr: false }) const Dashboard = loadable(() => import('client/containers/Dashboard/Provision'), { ssr: false }) const Providers = loadable(() => import('client/containers/Providers'), { ssr: false }) @@ -19,7 +18,6 @@ const ProvisionsFormCreate = loadable(() => import('client/containers/Provisions const Settings = loadable(() => import('client/containers/Settings'), { ssr: false }) export const PATH = { - LOGIN: '/', DASHBOARD: '/dashboard', PROVIDERS: { LIST: '/providers', @@ -36,16 +34,9 @@ export const PATH = { } export const ENDPOINTS = [ - { - label: 'Login', - path: PATH.LOGIN, - authenticated: false, - Component: Login - }, { label: 'Dashboard', path: PATH.DASHBOARD, - authenticated: true, sidebar: true, icon: DashboardIcon, Component: Dashboard @@ -53,7 +44,6 @@ export const ENDPOINTS = [ { label: 'Providers', path: PATH.PROVIDERS.LIST, - authenticated: true, sidebar: true, icon: ProvidersIcon, Component: Providers @@ -61,19 +51,16 @@ export const ENDPOINTS = [ { label: 'Create Provider', path: PATH.PROVIDERS.CREATE, - authenticated: true, Component: ProvidersFormCreate }, { label: 'Edit Provider template', path: PATH.PROVIDERS.EDIT, - authenticated: true, Component: ProvidersFormCreate }, { label: 'Provisions', path: PATH.PROVISIONS.LIST, - authenticated: true, sidebar: true, icon: ProvisionsIcon, Component: Provisions @@ -81,19 +68,16 @@ export const ENDPOINTS = [ { label: 'Create Provision', path: PATH.PROVISIONS.CREATE, - authenticated: true, Component: ProvisionsFormCreate }, { label: 'Edit Provision template', path: PATH.PROVISIONS.EDIT, - authenticated: true, Component: ProvisionsFormCreate }, { label: 'Settings', path: PATH.SETTINGS, - authenticated: true, sidebar: true, icon: SettingsIcon, Component: Settings diff --git a/src/fireedge/src/client/components/Cards/SelectCard/Action.js b/src/fireedge/src/client/components/Cards/SelectCard/Action.js index cf1ad2a2a5..a20af313ab 100644 --- a/src/fireedge/src/client/components/Cards/SelectCard/Action.js +++ b/src/fireedge/src/client/components/Cards/SelectCard/Action.js @@ -5,7 +5,7 @@ import useFetch from 'client/hooks/useFetch' import { SubmitButton } from 'client/components/FormControl' const Action = memo(({ handleClick, icon, cy, ...props }) => { - const { fetchRequest, loading } = useFetch( + const { fetchRequest, data, loading } = useFetch( () => Promise.resolve(handleClick()) ) @@ -15,7 +15,8 @@ const Action = memo(({ handleClick, icon, cy, ...props }) => { icon isSubmitting={loading} label={icon} - onClick={() => fetchRequest()} + onClick={fetchRequest} + disabled={!!data} {...props} /> ) diff --git a/src/fireedge/src/client/components/Cards/SelectCard/styles.js b/src/fireedge/src/client/components/Cards/SelectCard/styles.js index 411a33bf84..ac19728332 100644 --- a/src/fireedge/src/client/components/Cards/SelectCard/styles.js +++ b/src/fireedge/src/client/components/Cards/SelectCard/styles.js @@ -54,7 +54,7 @@ export default makeStyles(theme => ({ }, headerRoot: { // align header icon to top - alignItems: 'end' + alignItems: 'start' }, headerContent: { overflow: 'auto' }, headerAvatar: { diff --git a/src/fireedge/src/client/components/Cards/index.js b/src/fireedge/src/client/components/Cards/index.js index 91d83a974e..aeacc4a299 100644 --- a/src/fireedge/src/client/components/Cards/index.js +++ b/src/fireedge/src/client/components/Cards/index.js @@ -1,31 +1,31 @@ -import ClusterCard from 'client/components/Cards/ClusterCard' -import DatastoreCard from 'client/components/Cards/DatastoreCard' -import HostCard from 'client/components/Cards/HostCard' -import NetworkCard from 'client/components/Cards/NetworkCard' -import TierCard from 'client/components/Cards/TierCard' -import EmptyCard from 'client/components/Cards/EmptyCard' -import SelectCard from 'client/components/Cards/SelectCard' -import ApplicationTemplateCard from 'client/components/Cards/ApplicationTemplateCard' import ApplicationCard from 'client/components/Cards/ApplicationCard' import ApplicationNetworkCard from 'client/components/Cards/ApplicationNetworkCard' +import ApplicationTemplateCard from 'client/components/Cards/ApplicationTemplateCard' +import ClusterCard from 'client/components/Cards/ClusterCard' +import DatastoreCard from 'client/components/Cards/DatastoreCard' +import EmptyCard from 'client/components/Cards/EmptyCard' +import HostCard from 'client/components/Cards/HostCard' +import NetworkCard from 'client/components/Cards/NetworkCard' import PolicyCard from 'client/components/Cards/PolicyCard' import ProvisionCard from 'client/components/Cards/ProvisionCard' import ProvisionTemplateCard from 'client/components/Cards/ProvisionTemplateCard' +import SelectCard from 'client/components/Cards/SelectCard' +import TierCard from 'client/components/Cards/TierCard' import WavesCard from 'client/components/Cards/WavesCard' export { - ClusterCard, - DatastoreCard, - HostCard, - NetworkCard, - TierCard, - EmptyCard, - SelectCard, - ApplicationTemplateCard, ApplicationCard, ApplicationNetworkCard, + ApplicationTemplateCard, + ClusterCard, + DatastoreCard, + EmptyCard, + HostCard, + NetworkCard, PolicyCard, - ProvisionTemplateCard, ProvisionCard, + ProvisionTemplateCard, + SelectCard, + TierCard, WavesCard } diff --git a/src/fireedge/src/client/components/Count/index.js b/src/fireedge/src/client/components/Count/index.js index 910b3d3c63..7c49b732f9 100644 --- a/src/fireedge/src/client/components/Count/index.js +++ b/src/fireedge/src/client/components/Count/index.js @@ -14,7 +14,7 @@ const Count = ({ start, number, duration }) => { const timer = setInterval(() => { start += 1 - setCount(String(start) + number.substring(3)) + setCount(String(start) + String(number).substring(3)) if (start === end) clearInterval(timer) }, incrementTime) diff --git a/src/fireedge/src/client/components/DebugLog/index.js b/src/fireedge/src/client/components/DebugLog/index.js index ba731d32fc..9f43f7b3cc 100644 --- a/src/fireedge/src/client/components/DebugLog/index.js +++ b/src/fireedge/src/client/components/DebugLog/index.js @@ -19,7 +19,6 @@ const debugLogStyles = makeStyles(theme => ({ overflow: 'auto', borderRadius: 5, backgroundColor: '#1d1f21', - fontSize: '1.1em', wordBreak: 'break-word', '&::-webkit-scrollbar': { width: 14 diff --git a/src/fireedge/src/client/components/DebugLog/message.js b/src/fireedge/src/client/components/DebugLog/message.js index 02b9e00c96..92f97249c6 100644 --- a/src/fireedge/src/client/components/DebugLog/message.js +++ b/src/fireedge/src/client/components/DebugLog/message.js @@ -13,25 +13,23 @@ const MAX_CHARS = 80 const useStyles = makeStyles(theme => ({ root: { - display: 'flex', - alignItems: 'center', marginBottom: '0.3em', padding: '0.5em 0', - cursor: ({ isMoreThanMaxChars }) => isMoreThanMaxChars ? 'pointer' : 'default', + fontSize: '14px', fontFamily: 'monospace', color: '#fafafa', '&:hover': { background: '#333537' - } - }, - arrow: { - padding: '0 0.5em', - width: '32px' - }, - time: { - minWidth: '220px' + }, + display: 'grid', + gridTemplateColumns: '32px 220px 1fr', + gap: '1em', + alignItems: 'center', + cursor: ({ isMoreThanMaxChars }) => + isMoreThanMaxChars ? 'pointer' : 'default' }, message: { + transition: 'all 0.3s ease-out', whiteSpace: 'pre-line' }, [DEBUG_LEVEL.ERROR]: { borderLeft: `0.3em solid ${theme.palette.error.light}` }, @@ -56,14 +54,14 @@ const Message = memo(({ timestamp, severity, message }) => { className={clsx(classes.root, classes[severity])} onClick={() => setCollapse(prev => !prev)} > -
+ {isMoreThanMaxChars && (isCollapsed ? ( ) : ( ))} -
-
{timestamp}
+ +
{timestamp}
diff --git a/src/fireedge/src/client/components/Dialogs/DialogRequest.js b/src/fireedge/src/client/components/Dialogs/DialogRequest.js index 273876ae40..6f435deda1 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogRequest.js +++ b/src/fireedge/src/client/components/Dialogs/DialogRequest.js @@ -21,8 +21,8 @@ const useStyles = makeStyles(theme => ({ const DialogRequest = ({ withTabs, request, dialogProps, children }) => { const classes = useStyles() - const methods = useFetch(request) - const { data, fetchRequest, loading, error } = methods + const fetchProps = useFetch(request) + const { data, fetchRequest, loading, error } = fetchProps useEffect(() => { fetchRequest() }, []) @@ -47,7 +47,7 @@ const DialogRequest = ({ withTabs, request, dialogProps, children }) => { return ( - {children(methods)} + {children({ fetchProps })} ) } diff --git a/src/fireedge/src/client/components/FormControl/SubmitButton.js b/src/fireedge/src/client/components/FormControl/SubmitButton.js index 176a1de0e0..534a15f438 100644 --- a/src/fireedge/src/client/components/FormControl/SubmitButton.js +++ b/src/fireedge/src/client/components/FormControl/SubmitButton.js @@ -1,24 +1,28 @@ import * as React from 'react' import PropTypes from 'prop-types' -import { - makeStyles, CircularProgress, Button, IconButton -} from '@material-ui/core' -import { Tr } from 'client/components/HOC' -import { T } from 'client/constants' +import { makeStyles, CircularProgress, Button, IconButton } from '@material-ui/core' import clsx from 'clsx' -const useStyles = makeStyles(() => ({ +import { Tr } from 'client/components/HOC' +import { T } from 'client/constants' + +const useStyles = makeStyles(theme => ({ root: { transition: 'disabled 0.5s ease', boxShadow: 'none' + }, + disabled: { + '& svg': { + color: theme.palette.action.disabled + } } })) const ButtonComponent = ({ icon, children, ...props }) => icon ? ( {children} ) : ( - ) @@ -29,25 +33,28 @@ ButtonComponent.propTypes = { } const SubmitButton = React.memo( - ({ isSubmitting, label, icon, color, size, className, ...props }) => { + ({ isSubmitting, disabled, label, icon, color, size, className, ...props }) => { const classes = useStyles() return ( - {isSubmitting && } + {isSubmitting && } {!isSubmitting && (label ?? Tr(T.Submit))} ) }, (prev, next) => prev.isSubmitting === next.isSubmitting && + prev.disabled === next.disabled && prev.label === next.label && prev.onClick === next.onClick ) @@ -56,6 +63,7 @@ SubmitButton.propTypes = { icon: PropTypes.bool, label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), isSubmitting: PropTypes.bool, + disabled: PropTypes.bool, className: PropTypes.string, color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']), size: PropTypes.oneOf(['large', 'medium', 'small']) @@ -65,6 +73,7 @@ SubmitButton.defaultProps = { icon: false, label: undefined, isSubmitting: false, + disabled: false, className: undefined, color: 'default' } diff --git a/src/fireedge/src/client/components/FormStepper/index.js b/src/fireedge/src/client/components/FormStepper/index.js index fe58836588..8a30756d46 100644 --- a/src/fireedge/src/client/components/FormStepper/index.js +++ b/src/fireedge/src/client/components/FormStepper/index.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types' import { useFormContext } from 'react-hook-form' import { useMediaQuery } from '@material-ui/core' -import { useGeneral } from 'client/hooks' +import { useGeneral } from 'client/features/General' import CustomMobileStepper from 'client/components/FormStepper/MobileStepper' import CustomStepper from 'client/components/FormStepper/Stepper' import { groupBy } from 'client/utils' @@ -14,7 +14,7 @@ const FIRST_STEP = 0 const FormStepper = ({ steps, schema, onSubmit }) => { const isMobile = useMediaQuery(theme => theme.breakpoints.only('xs')) const { watch, reset, errors, setError } = useFormContext() - const { isLoading, changeLoading } = useGeneral() + const { isLoading } = useGeneral() const [formData, setFormData] = useState(() => watch()) const [activeStep, setActiveStep] = useState(FIRST_STEP) @@ -38,7 +38,6 @@ const FormStepper = ({ steps, schema, onSubmit }) => { } const setErrors = ({ inner = [], ...rest }) => { - changeLoading(false) const errorsByPath = groupBy(inner, 'path') ?? {} const totalErrors = Object.keys(errorsByPath).length diff --git a/src/fireedge/src/client/components/HOC/InternalLayout/index.js b/src/fireedge/src/client/components/HOC/InternalLayout/index.js index 0d2ea48296..02892d0b26 100644 --- a/src/fireedge/src/client/components/HOC/InternalLayout/index.js +++ b/src/fireedge/src/client/components/HOC/InternalLayout/index.js @@ -20,19 +20,19 @@ import clsx from 'clsx' import { Box, Container } from '@material-ui/core' import { CSSTransition } from 'react-transition-group' -import { useGeneral } from 'client/hooks' +import { useGeneral } from 'client/features/General' import Header from 'client/components/Header' import Footer from 'client/components/Footer' import internalStyles from 'client/components/HOC/InternalLayout/styles' -const InternalLayout = ({ label, children }) => { +const InternalLayout = ({ children }) => { const classes = internalStyles() - const scroll = React.useRef() + const container = React.useRef() const { isFixMenu } = useGeneral() return ( -
+
{ timeout={300} unmountOnExit > - + {children} @@ -60,18 +60,15 @@ const InternalLayout = ({ label, children }) => { } InternalLayout.propTypes = { - endpoints: PropTypes.arrayOf(PropTypes.object), children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.string - ]), - label: PropTypes.string + ]) } InternalLayout.defaultProps = { - children: [], - label: null + children: [] } export default InternalLayout diff --git a/src/fireedge/src/client/components/HOC/MainLayout.js b/src/fireedge/src/client/components/HOC/MainLayout.js deleted file mode 100644 index fdcaacdc8d..0000000000 --- a/src/fireedge/src/client/components/HOC/MainLayout.js +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -import React, { useEffect } from 'react' -import PropTypes from 'prop-types' -import { useLocation, Redirect, matchPath } from 'react-router-dom' - -import { useAuth, useOpennebula } from 'client/hooks' -import Sidebar from 'client/components/Sidebar' -import Notifier from 'client/components/Notifier' -import LoadingScreen from 'client/components/LoadingScreen' - -const findRouteByPathname = (endpoints = [], pathname = '') => { - const route = endpoints?.find(({ path }) => - matchPath(pathname, { path, exact: true }) - ) - - return route ?? {} -} - -const MainLayout = ({ endpoints, children }) => { - const { PATH, ENDPOINTS } = endpoints - const { pathname } = useLocation() - const { groups } = useOpennebula() - const { - isLogged, - isLoginInProcess, - getAuthInfo, - authUser, - firstRender, - isLoading - } = useAuth() - - useEffect(() => { - if (isLogged && !isLoginInProcess && !isLoading) { - getAuthInfo() - } - }, [isLogged, isLoginInProcess, pathname]) - - const { authenticated } = findRouteByPathname(ENDPOINTS, pathname) - const authRoute = Boolean(authenticated) - - // PENDING TO AUTHENTICATING OR FIRST RENDERING - if (firstRender || (isLogged && authRoute && !authUser && !groups?.length)) { - return - } - - // PROTECTED ROUTE - if (authRoute && !isLogged && !isLoginInProcess) { - return - } - - // PUBLIC ROUTE - if (!authRoute && isLogged && !isLoginInProcess) { - return - } - - return ( - <> - {authRoute && isLogged && ( - <> - - - - )} - {children} - - ) -} - -MainLayout.propTypes = { - endpoints: PropTypes.shape({ - PATH: PropTypes.object, - ENDPOINTS: PropTypes.array - }), - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), - PropTypes.node, - PropTypes.string - ]) -} - -MainLayout.defaultProps = { - endpoints: { - PATH: {}, - ENDPOINTS: [] - }, - children: '' -} - -export default MainLayout diff --git a/src/fireedge/src/client/components/HOC/Translate.js b/src/fireedge/src/client/components/HOC/Translate.js index e0108446bd..067fbd3000 100644 --- a/src/fireedge/src/client/components/HOC/Translate.js +++ b/src/fireedge/src/client/components/HOC/Translate.js @@ -18,7 +18,7 @@ import PropTypes from 'prop-types' import root from 'window-or-global' import { sprintf } from 'sprintf-js' -import { useAuth } from 'client/hooks' +import { useAuth } from 'client/features/Auth' import { DEFAULT_LANGUAGE, LANGUAGES_URL } from 'client/constants' const TranslateContext = createContext() diff --git a/src/fireedge/src/client/components/HOC/index.js b/src/fireedge/src/client/components/HOC/index.js index 0a85ebb010..1cb0ef5f72 100644 --- a/src/fireedge/src/client/components/HOC/index.js +++ b/src/fireedge/src/client/components/HOC/index.js @@ -14,5 +14,4 @@ /* -------------------------------------------------------------------------- */ export { default as InternalLayout } from 'client/components/HOC/InternalLayout' -export { default as MainLayout } from 'client/components/HOC/MainLayout' export * from 'client/components/HOC/Translate' diff --git a/src/fireedge/src/client/components/Header/Group.js b/src/fireedge/src/client/components/Header/Group.js index b5e15605b1..2cb17f847c 100644 --- a/src/fireedge/src/client/components/Header/Group.js +++ b/src/fireedge/src/client/components/Header/Group.js @@ -4,7 +4,7 @@ import { Button } from '@material-ui/core' import FilterIcon from '@material-ui/icons/FilterDrama' import SelectedIcon from '@material-ui/icons/FilterVintage' -import { useAuth, useOpennebula } from 'client/hooks' +import { useAuth, useAuthApi } from 'client/features/Auth' import Search from 'client/components/Search' import { FILTER_POOL } from 'client/constants' @@ -15,17 +15,17 @@ const { ALL_RESOURCES, PRIMARY_GROUP_RESOURCES } = FILTER_POOL const Group = () => { const classes = headerStyles() - const { authUser, filterPool, setPrimaryGroup } = useAuth() - const { groups } = useOpennebula() + const { user, groups, filterPool } = useAuth() + const { changeGroup } = useAuthApi() const handleChangeGroup = group => { - group && setPrimaryGroup({ group }) + group && changeGroup({ id: user.ID, group }) } const renderResult = ({ ID, NAME }, handleClose) => { const isSelected = (filterPool === ALL_RESOURCES && ALL_RESOURCES === ID) || - (filterPool === PRIMARY_GROUP_RESOURCES && authUser?.GID === ID) + (filterPool === PRIMARY_GROUP_RESOURCES && user?.GID === ID) return ( {headerTitle && ( - + {Tr(headerTitle)} )} diff --git a/src/fireedge/src/client/components/Header/User.js b/src/fireedge/src/client/components/Header/User.js index 0965f40530..2a52b1cce7 100644 --- a/src/fireedge/src/client/components/Header/User.js +++ b/src/fireedge/src/client/components/Header/User.js @@ -3,31 +3,33 @@ import * as React from 'react' import { MenuItem, MenuList, Link } from '@material-ui/core' import AccountCircleIcon from '@material-ui/icons/AccountCircle' -import { useAuth } from 'client/hooks' +import { useAuth, useAuthApi } from 'client/features/Auth' import HeaderPopover from 'client/components/Header/Popover' import { DevTypography } from 'client/components/Typography' import { Tr } from 'client/components/HOC' +import { isDevelopment } from 'client/utils' import { T, APPS, APP_URL } from 'client/constants' const User = React.memo(() => { - const { logout, authUser } = useAuth() + const { user } = useAuth() + const { logout } = useAuthApi() const handleLogout = () => logout() return ( } buttonProps={{ 'data-cy': 'header-user-button', variant: 'outlined' }} disablePadding > {() => ( - + {Tr(T.SignOut)} - {process?.env?.NODE_ENV === 'development' && + {isDevelopment() && APPS?.map(appName => ( diff --git a/src/fireedge/src/client/components/Header/index.js b/src/fireedge/src/client/components/Header/index.js index 61c9d52b4c..0ca66266c5 100644 --- a/src/fireedge/src/client/components/Header/index.js +++ b/src/fireedge/src/client/components/Header/index.js @@ -13,7 +13,7 @@ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ -import React, { useMemo } from 'react' +import * as React from 'react' import PropTypes from 'prop-types' import { @@ -22,73 +22,73 @@ import { Toolbar, Typography, IconButton, - useMediaQuery, - useScrollTrigger + useMediaQuery + // useScrollTrigger } from '@material-ui/core' import MenuIcon from '@material-ui/icons/Menu' -import { useAuth, useGeneral } from 'client/hooks' +import { useAuth } from 'client/features/Auth' +import { useGeneral, useGeneralApi } from 'client/features/General' + import User from 'client/components/Header/User' import Group from 'client/components/Header/Group' import Zone from 'client/components/Header/Zone' import headerStyles from 'client/components/Header/styles' -const Header = ({ title, scrollableContainer }) => { +const Header = ({ scrollContainer }) => { const { isOneAdmin } = useAuth() - const { theme, isFixMenu, fixMenu } = useGeneral() + const { title } = useGeneral() + const { fixMenu } = useGeneralApi() const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg')) const isMobile = useMediaQuery(theme => theme.breakpoints.only('xs')) - const isScroll = useScrollTrigger({ + /* const isScroll = scrollContainer && useScrollTrigger({ disableHysteresis: true, threshold: 100, - target: scrollableContainer ?? undefined - }) + target: scrollContainer + }) */ - const classes = headerStyles({ isScroll }) + const classes = headerStyles({ isScroll: false }) - const handleFixMenu = () => fixMenu(true) + const handleFixMenu = () => { + fixMenu(true) + } - return useMemo( - () => ( - - - {!isUpLg && ( - - - - )} - {!isMobile && ( - - {'One'} - - {title} - - - )} - - - {!isOneAdmin && } - - - - - ), - [theme, isFixMenu, fixMenu, isUpLg, isMobile, isOneAdmin, classes] + return ( + + + {!isUpLg && ( + + + + )} + {!isMobile && ( + + {'One'} + {title} + + )} + + + {!isOneAdmin && } + + + + ) } Header.propTypes = { - title: PropTypes.string + scrollContainer: PropTypes.object } Header.defaultProps = { - title: '' + scrollContainer: null } export default Header diff --git a/src/fireedge/src/client/components/Header/styles.js b/src/fireedge/src/client/components/Header/styles.js index ae8f287ad8..56f7dcd7fa 100644 --- a/src/fireedge/src/client/components/Header/styles.js +++ b/src/fireedge/src/client/components/Header/styles.js @@ -12,7 +12,6 @@ export default makeStyles(theme => ({ userSelect: 'none', flexGrow: 1, display: 'inline-flex', - color: theme.palette.primary.contrastText, '& span': { textTransform: 'capitalize' } }, app: { diff --git a/src/fireedge/src/client/components/List/ListCards/index.js b/src/fireedge/src/client/components/List/ListCards/index.js index 8e6ef9a715..6bc871d171 100644 --- a/src/fireedge/src/client/components/List/ListCards/index.js +++ b/src/fireedge/src/client/components/List/ListCards/index.js @@ -27,57 +27,58 @@ const ListCards = ({ const classes = listCardsStyles() const isMobile = useMediaQuery(theme => theme.breakpoints.only('xs')) - if (isLoading) { - return - } - return ( - - {/* CREATE CARD COMPONENT */} - {handleCreate && (ButtonCreateComponent ? ( - - ) : ( - isMobile ? ( - } onClick={handleCreate} /> - ) : ( - - - - - - - - ) - ))} - - {/* LIST */} - {list.length > 0 ? ( - - {list?.map((value, index) => { - const key = value[keyProp] ?? value[keyProp.toUpperCase()] - - return ( - - - - - - ) - })} - - ) : ( - (displayEmpty || EmptyComponent) && ( - - {EmptyComponent ?? } - - ) + <> + {isLoading && ( + )} - + + {/* CREATE CARD COMPONENT */} + {handleCreate && (ButtonCreateComponent ? ( + + ) : ( + isMobile ? ( + } onClick={handleCreate} /> + ) : ( + + + + + + + + ) + ))} + + {/* LIST */} + {list.length > 0 ? ( + + {list?.map((value, index) => { + const key = value[keyProp] ?? value[keyProp.toUpperCase()] + + return ( + + + + + + ) + })} + + ) : ( + (displayEmpty || EmptyComponent) && ( + + {EmptyComponent ?? } + + ) + )} + + ) } diff --git a/src/fireedge/src/client/components/List/ListCards/styles.js b/src/fireedge/src/client/components/List/ListCards/styles.js index 0350156dea..451d2d4c55 100644 --- a/src/fireedge/src/client/components/List/ListCards/styles.js +++ b/src/fireedge/src/client/components/List/ListCards/styles.js @@ -7,7 +7,10 @@ export default makeStyles(() => ({ display: 'flex', textAlign: 'center' }, - loading: { width: '100%' }, + loading: { + width: '100%', + marginBottom: '1em' + }, item: { '&-enter': { opacity: 0 }, '&-enter-active': { diff --git a/src/fireedge/src/client/components/Notifier/index.js b/src/fireedge/src/client/components/Notifier/index.js index c972008d1f..86d8da0928 100644 --- a/src/fireedge/src/client/components/Notifier/index.js +++ b/src/fireedge/src/client/components/Notifier/index.js @@ -1,12 +1,11 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' -import { useDispatch, useSelector } from 'react-redux' import { useSnackbar } from 'notistack' import { IconButton } from '@material-ui/core' import CloseIcon from '@material-ui/icons/Close' -import { removeSnackbar } from 'client/actions/general' +import { useGeneral, useGeneralApi } from 'client/features/General' const CloseButton = ({ handleClick }) => ( @@ -17,8 +16,9 @@ const CloseButton = ({ handleClick }) => ( let displayed = [] const Notifier = () => { - const dispatch = useDispatch() - const notifications = useSelector(store => store.General.notifications || []) + const { notifications } = useGeneral() + const { deleteSnackbar } = useGeneralApi() + const { enqueueSnackbar, closeSnackbar } = useSnackbar() const storeDisplayed = id => { @@ -43,13 +43,8 @@ const Notifier = () => { key, ...options, action: CloseButton({ handleClick: () => closeSnackbar(key) }), - onClose: (event, reason, myKey) => { - if (options.onClose) { - options.onClose(event, reason, myKey) - } - }, onExited: (_, myKey) => { - dispatch(removeSnackbar(myKey)) + deleteSnackbar(myKey) removeDisplayed(myKey) } }) @@ -58,7 +53,7 @@ const Notifier = () => { storeDisplayed(key) } ) - }, [notifications, closeSnackbar, enqueueSnackbar, dispatch]) + }, [notifications, closeSnackbar, enqueueSnackbar, deleteSnackbar]) return null } diff --git a/src/fireedge/src/client/components/Route/NoAuthRoute.js b/src/fireedge/src/client/components/Route/NoAuthRoute.js new file mode 100644 index 0000000000..1211ee44eb --- /dev/null +++ b/src/fireedge/src/client/components/Route/NoAuthRoute.js @@ -0,0 +1,28 @@ +/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ +/* not use this file except in compliance with the License. You may obtain */ +/* a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/* -------------------------------------------------------------------------- */ + +import * as React from 'react' + +import { Redirect, Route } from 'react-router-dom' +import { useAuth } from 'client/features/Auth' + +const NoAuthRoute = props => { + const { isLogged, isLoginInProgress, isLoading } = useAuth() + const isAuthenticated = isLogged && !isLoginInProgress && !isLoading + + return isAuthenticated ? : +} + +export default NoAuthRoute diff --git a/src/fireedge/src/client/components/Route/ProtectedRoute.js b/src/fireedge/src/client/components/Route/ProtectedRoute.js new file mode 100644 index 0000000000..4f4e30f934 --- /dev/null +++ b/src/fireedge/src/client/components/Route/ProtectedRoute.js @@ -0,0 +1,32 @@ +/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ +/* not use this file except in compliance with the License. You may obtain */ +/* a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/* -------------------------------------------------------------------------- */ + +import * as React from 'react' +import { Redirect, Route } from 'react-router-dom' + +import { useAuth, useAuthApi } from 'client/features/Auth' + +const ProtectedRoute = props => { + const { isLogged, jwt } = useAuth() + const { getAuthUser } = useAuthApi() + + React.useEffect(() => { + jwt && getAuthUser() + }, []) + + return isLogged ? : +} + +export default ProtectedRoute diff --git a/src/fireedge/src/client/components/Route/index.js b/src/fireedge/src/client/components/Route/index.js new file mode 100644 index 0000000000..94b6237238 --- /dev/null +++ b/src/fireedge/src/client/components/Route/index.js @@ -0,0 +1,4 @@ +import NoAuthRoute from 'client/components/Route/NoAuthRoute' +import ProtectedRoute from 'client/components/Route/ProtectedRoute' + +export { NoAuthRoute, ProtectedRoute } diff --git a/src/fireedge/src/client/components/Sidebar/SidebarLink.js b/src/fireedge/src/client/components/Sidebar/SidebarLink.js index 16834228fe..34bf3cd50a 100644 --- a/src/fireedge/src/client/components/Sidebar/SidebarLink.js +++ b/src/fireedge/src/client/components/Sidebar/SidebarLink.js @@ -10,7 +10,7 @@ import { useMediaQuery } from '@material-ui/core' -import { useGeneral } from 'client/hooks' +import { useGeneralApi } from 'client/features/General' import sidebarStyles from 'client/components/Sidebar/styles' import { DevTypography } from 'client/components/Typography' @@ -18,10 +18,11 @@ const STATIC_LABEL_PROPS = { 'data-cy': 'main-menu-item-text' } const SidebarLink = ({ label, path, icon: Icon, devMode, isSubItem }) => { const classes = sidebarStyles() + const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg'), { noSsr: true }) + const history = useHistory() const { pathname } = useLocation() - const { fixMenu } = useGeneral() - const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg'), { noSsr: true }) + const { fixMenu } = useGeneralApi() const handleClick = () => { history.push(path) diff --git a/src/fireedge/src/client/components/Sidebar/index.js b/src/fireedge/src/client/components/Sidebar/index.js index 1423aeee18..ae5116258e 100644 --- a/src/fireedge/src/client/components/Sidebar/index.js +++ b/src/fireedge/src/client/components/Sidebar/index.js @@ -27,7 +27,7 @@ import { } from '@material-ui/core' import { Menu as MenuIcon, Close as CloseIcon } from '@material-ui/icons' -import { useGeneral } from 'client/hooks' +import { useGeneral, useGeneralApi } from 'client/features/General' import sidebarStyles from 'client/components/Sidebar/styles' import SidebarLink from 'client/components/Sidebar/SidebarLink' import SidebarCollapseItem from 'client/components/Sidebar/SidebarCollapseItem' @@ -35,15 +35,17 @@ import Logo from 'client/icons/logo' const Sidebar = memo(({ endpoints }) => { const classes = sidebarStyles() - const { isFixMenu, fixMenu } = useGeneral() const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg'), { noSsr: true }) + const { isFixMenu } = useGeneral() + const { fixMenu } = useGeneralApi() + const handleSwapMenu = () => fixMenu(!isFixMenu) const SidebarEndpoints = useMemo( () => endpoints - ?.filter(({ authenticated, sidebar = false }) => authenticated && sidebar) + ?.filter(({ sidebar = false }) => sidebar) ?.map((endpoint, index) => endpoint.routes ? ( diff --git a/src/fireedge/src/client/components/Widgets/TotalProviders/index.js b/src/fireedge/src/client/components/Widgets/TotalProviders/index.js index f46f03e42d..7fdf590f09 100644 --- a/src/fireedge/src/client/components/Widgets/TotalProviders/index.js +++ b/src/fireedge/src/client/components/Widgets/TotalProviders/index.js @@ -3,7 +3,7 @@ import * as React from 'react' import { PieChart } from 'react-minimal-pie-chart' import { Typography, Paper } from '@material-ui/core' -import { useProvision } from 'client/hooks' +import { useOne } from 'client/features/One' import { TypographyWithPoint } from 'client/components/Typography' import Count from 'client/components/Count' import { groupBy } from 'client/utils' @@ -12,9 +12,8 @@ import { T, PROVIDERS_TYPES } from 'client/constants' import useStyles from 'client/components/Widgets/TotalProviders/styles' const TotalProviders = () => { - const { providers } = useProvision() - const classes = useStyles() + const { providers } = useOne() const totalProviders = React.useMemo(() => providers.length, [providers.length]) diff --git a/src/fireedge/src/client/components/Widgets/TotalProvisionInfrastructures.js b/src/fireedge/src/client/components/Widgets/TotalProvisionInfrastructures.js index bd82376343..803b278d2d 100644 --- a/src/fireedge/src/client/components/Widgets/TotalProvisionInfrastructures.js +++ b/src/fireedge/src/client/components/Widgets/TotalProvisionInfrastructures.js @@ -7,14 +7,14 @@ import { AccountTree as NetworkIcon } from '@material-ui/icons' -import { useProvision } from 'client/hooks' +import { useOne } from 'client/features/One' import Count from 'client/components/Count' import { WavesCard } from 'client/components/Cards' import { get } from 'client/utils' import { T } from 'client/constants' const TotalProvisionInfrastructures = () => { - const { provisions } = useProvision() + const { provisions } = useOne() const provisionsByProvider = React.useMemo(() => provisions diff --git a/src/fireedge/src/client/components/Widgets/TotalProvisionsByState/index.js b/src/fireedge/src/client/components/Widgets/TotalProvisionsByState/index.js index 4985f35147..78e60568ba 100644 --- a/src/fireedge/src/client/components/Widgets/TotalProvisionsByState/index.js +++ b/src/fireedge/src/client/components/Widgets/TotalProvisionsByState/index.js @@ -2,7 +2,7 @@ import * as React from 'react' import { Paper, Typography } from '@material-ui/core' -import { useProvision } from 'client/hooks' +import { useOne } from 'client/features/One' import { SingleBar } from 'client/components/Charts' import Count from 'client/components/Count' import { groupBy } from 'client/utils' @@ -11,8 +11,8 @@ import { T, PROVISIONS_STATES } from 'client/constants' import useStyles from 'client/components/Widgets/TotalProvisionsByState/styles' const TotalProvisionsByState = () => { - const { provisions } = useProvision() const classes = useStyles() + const { provisions } = useOne() const chartData = React.useMemo(() => { const groups = groupBy(provisions, 'TEMPLATE.BODY.state') diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/index.js b/src/fireedge/src/client/containers/ApplicationsInstances/index.js index 49d31a727d..6798b01f6e 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/index.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/index.js @@ -1,28 +1,34 @@ -import React, { useEffect, useMemo, useState } from 'react' +import React, { useEffect, useState } from 'react' import { Container, Box } from '@material-ui/core' -import { useApplication, useFetch } from 'client/hooks' +import { useFetch } from 'client/hooks' +import { useApplication, useApplicationApi } from 'client/features/One' + import DialogInfo from 'client/containers/ApplicationsInstances/DialogInfo' import { ListHeader, ListCards } from 'client/components/List' import AlertError from 'client/components/Alerts/Error' -import { ApplicationCard, EmptyCard } from 'client/components/Cards' -import { T, DONE, APPLICATION_STATES } from 'client/constants' +import { ApplicationCard } from 'client/components/Cards' + +import { T } from 'client/constants' function ApplicationsInstances () { - const { applications, getApplications } = useApplication() const [showDialog, setShowDialog] = useState(false) + + const applications = useApplication() + const { getApplications } = useApplicationApi() + const { error, fetchRequest, loading, reloading } = useFetch(getApplications) useEffect(() => { fetchRequest() }, []) - const list = useMemo(() => ( - applications.length > 0 - ? applications?.filter(({ TEMPLATE: { BODY: { state } } }) => - APPLICATION_STATES[state]?.name !== DONE - ) - : applications - ), [applications]) + // const list = useMemo(() => ( + // applications.length > 0 + // ? applications?.filter(({ TEMPLATE: { BODY: { state } } }) => + // APPLICATION_STATES[state]?.name !== DONE + // ) + // : applications + // ), [applications]) return ( @@ -30,6 +36,7 @@ function ApplicationsInstances () { title={T.ApplicationsInstances} hasReloadButton reloadButtonProps={{ + 'data-cy': 'refresh-application-list', onClick: () => fetchRequest(undefined, { reload: true, delay: 500 }), isSubmitting: Boolean(loading || reloading) }} @@ -39,24 +46,22 @@ function ApplicationsInstances () { {T.CannotConnectOneFlow} ) : ( - } + list={applications} + isLoading={applications.length === 0 && loading} + gridProps={{ 'data-cy': 'applications' }} CardComponent={ApplicationCard} cardsProps={({ value }) => ({ handleShow: () => setShowDialog(value) })} /> )} - {showDialog !== false && ( - setShowDialog(false)} - /> - )} + {showDialog !== false && ( + setShowDialog(false)} + /> + )} ) } diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Clusters/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Clusters/index.js index 0ec2003819..73e145447f 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Clusters/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Clusters/index.js @@ -1,10 +1,11 @@ import React, { useEffect, useCallback } from 'react' -import { useOpennebula, useListForm, useFetch } from 'client/hooks' +import { useListForm, useFetch } from 'client/hooks' +import { useCluster, useClusterApi } from 'client/features/One' import { ListCards } from 'client/components/List' import { ClusterCard, EmptyCard } from 'client/components/Cards' -import { STEP_FORM_SCHEMA } from './schema' +import { STEP_FORM_SCHEMA } from 'client/containers/ApplicationsTemplates/Form/Create/Steps/Clusters/schema' import { T } from 'client/constants' export const STEP_ID = 'clusters' @@ -14,8 +15,11 @@ const Clusters = () => ({ label: T.WhereWillItRun, resolver: STEP_FORM_SCHEMA, content: useCallback(({ data, setFormData }) => { - const { clusters, getClusters } = useOpennebula() + const clusters = useCluster() + const { getClusters } = useClusterApi() + const { fetchRequest, loading } = useFetch(getClusters) + const { handleSelect, handleUnselect } = useListForm({ key: STEP_ID, setList: setFormData diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/index.js index fafcdfb2d2..8d5243db8e 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/index.js @@ -2,7 +2,9 @@ import React, { useState, useEffect, useCallback } from 'react' import { useWatch } from 'react-hook-form' -import { useOpennebula, useListForm } from 'client/hooks' +import { useListForm } from 'client/hooks' +import { useVNetworkApi, useVNetworkTemplateApi } from 'client/features/One' + import FormWithSchema from 'client/components/Forms/FormWithSchema' import { ListCards } from 'client/components/List' import { DialogForm } from 'client/components/Dialogs' @@ -21,7 +23,10 @@ const Networks = () => ({ content: useCallback(({ data, setFormData }) => { const form = useWatch({}) const [showDialog, setShowDialog] = useState(false) - const { getVNetworks, getVNetworksTemplates } = useOpennebula() + + const { getVNetworks } = useVNetworkApi() + const { getVNetworksTemplates } = useVNetworkTemplateApi() + const { editingData, handleSave, diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/schema.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/schema.js index 8cd91cf973..75f385b15c 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/schema.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Networking/schema.js @@ -1,6 +1,6 @@ import * as yup from 'yup' import { v4 as uuidv4 } from 'uuid' -import { useOpennebula } from 'client/hooks' +import { useVNetwork, useVNetworkTemplate } from 'client/features/One' import { INPUT_TYPES } from 'client/constants' import { getValidationFromFields } from 'client/utils' @@ -87,7 +87,8 @@ const ID_VNET = { type: INPUT_TYPES.AUTOCOMPLETE, dependOf: TYPE.name, values: dependValue => { - const { vNetworks, vNetworksTemplates } = useOpennebula() + const vNetworks = useVNetwork() + const vNetworksTemplates = useVNetworkTemplate() const values = isNetworkSelector(dependValue) ? vNetworks : vNetworksTemplates diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/MarketApps.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/MarketApps.js index 17921ed8ae..a01c0aac43 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/MarketApps.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/MarketApps.js @@ -1,14 +1,15 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' -import { useOpennebula } from 'client/hooks' +import { useMarketApp, useMarketAppApi } from 'client/features/One' import Search from 'client/components/Search' import { SelectCard } from 'client/components/Cards' const sortByID = (a, b) => a.ID - b.ID const ListMarketApp = ({ backButton, currentValue, handleSetData }) => { - const { apps, getMarketApps } = useOpennebula() + const apps = useMarketApp() + const { getMarketApps } = useMarketAppApi() useEffect(() => { getMarketApps() diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Templates.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Templates.js index 6020e2e144..72e08bc953 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Templates.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Templates.js @@ -1,14 +1,15 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' -import { useOpennebula } from 'client/hooks' +import { useVmTemplate, useVmTemplateApi } from 'client/features/One' import Search from 'client/components/Search' import { SelectCard } from 'client/components/Cards' const sortByID = (a, b) => a.ID - b.ID const ListTemplates = ({ backButton, currentValue, handleSetData }) => { - const { templates, getTemplates } = useOpennebula() + const templates = useVmTemplate() + const { getTemplates } = useVmTemplateApi() useEffect(() => { getTemplates() diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js index 46aac119df..de51ab311b 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js @@ -8,19 +8,22 @@ import { yupResolver } from '@hookform/resolvers' import FormStepper from 'client/components/FormStepper' import Steps from 'client/containers/ApplicationsTemplates/Form/Create/Steps' -import { PATH } from 'client/router/flow' -import { useApplication, useFetch } from 'client/hooks' +import { PATH } from 'client/apps/flow/routes' +import { useFetch } from 'client/hooks' +import { useApplicationTemplateApi } from 'client/features/One' import { parseApplicationToForm, parseFormToApplication } from 'client/utils' function ApplicationsTemplatesCreateForm () { const history = useHistory() const { id } = useParams() const { steps, defaultValues, resolvers } = Steps() + const { getApplicationTemplate, createApplicationTemplate, updateApplicationTemplate - } = useApplication() + } = useApplicationTemplateApi() + const { data, fetchRequest, loading, error } = useFetch( getApplicationTemplate ) @@ -35,13 +38,11 @@ function ApplicationsTemplatesCreateForm () { const application = parseFormToApplication(formData) if (id) { - updateApplicationTemplate({ id, data: application }).then( - res => res && history.push(PATH.APPLICATIONS_TEMPLATES.LIST) - ) + updateApplicationTemplate(id, application) + .then(res => res && history.push(PATH.APPLICATIONS_TEMPLATES.LIST)) } else { - createApplicationTemplate({ data: application }).then( - res => res && history.push(PATH.APPLICATIONS_TEMPLATES.LIST) - ) + createApplicationTemplate(application) + .then(res => res && history.push(PATH.APPLICATIONS_TEMPLATES.LIST)) } } @@ -51,6 +52,7 @@ function ApplicationsTemplatesCreateForm () { useEffect(() => { const formData = data ? parseApplicationToForm(data) : {} + methods.reset(resolvers().cast(formData), { errors: false }) }, [data]) diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/index.js index 39d86daaf3..b0c1ab6697 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/index.js @@ -2,7 +2,7 @@ import React, { useEffect, useCallback } from 'react' import { Divider, Paper, Typography } from '@material-ui/core' -import { useOpennebula } from 'client/hooks' +import { useVNetworkApi, useVNetworkTemplateApi } from 'client/features/One' import FormWithSchema from 'client/components/Forms/FormWithSchema' import { T } from 'client/constants' @@ -16,7 +16,8 @@ const Networks = () => ({ resolver: STEP_FORM_SCHEMA, optionsValidate: { abortEarly: false }, content: useCallback(({ data }) => { - const { getVNetworks, getVNetworksTemplates } = useOpennebula() + const { getVNetworks } = useVNetworkApi() + const { getVNetworksTemplates } = useVNetworkTemplateApi() useEffect(() => { getVNetworks() diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/schema.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/schema.js index 182277387c..4b23e4e2cd 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/schema.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Networking/schema.js @@ -1,6 +1,6 @@ import * as yup from 'yup' import { INPUT_TYPES } from 'client/constants' -import { useOpennebula } from 'client/hooks' +import { useVNetwork, useVNetworkTemplate } from 'client/features/One' import { getValidationFromFields } from 'client/utils' const SELECT = { @@ -36,7 +36,9 @@ const ID_VNET = { type: INPUT_TYPES.AUTOCOMPLETE, dependOf: TYPE.name, values: dependValue => { - const { vNetworks, vNetworksTemplates } = useOpennebula() + const vNetworks = useVNetwork() + const vNetworksTemplates = useVNetworkTemplate() + const type = TYPES_NETWORKS.find(({ value }) => value === dependValue) const values = diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js index 2d9d2b139c..2c177d5c46 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js @@ -3,12 +3,14 @@ import PropTypes from 'prop-types' import { makeStyles, CircularProgress, Backdrop } from '@material-ui/core' -import { useFetchAll, useOpennebula, useApplication } from 'client/hooks' +import { useFetchAll } from 'client/hooks' +import { useApplicationTemplateApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' + import { DialogForm } from 'client/components/Dialogs' import FormStepper from 'client/components/FormStepper' - -import { parseApplicationToForm, parseFormToDeployApplication } from 'client/utils' import Steps from 'client/containers/ApplicationsTemplates/Form/Deploy/Steps' +import { parseApplicationToForm, parseFormToDeployApplication } from 'client/utils' const useStyles = makeStyles(theme => ({ backdrop: { @@ -20,8 +22,9 @@ const useStyles = makeStyles(theme => ({ const DeployForm = ({ applicationTemplate, handleCancel }) => { const classes = useStyles() const [vmTemplates, setVmTemplates] = useState([]) - const { instantiateApplicationTemplate } = useApplication() - const { getTemplate } = useOpennebula() + + const { enqueueInfo } = useGeneralApi() + const { getApplicationsTemplates, instantiateApplicationTemplate } = useApplicationTemplateApi() const { data, fetchRequestAll, loading } = useFetchAll() const applicationParsed = useMemo(() => @@ -42,7 +45,7 @@ const DeployForm = ({ applicationTemplate, handleCancel }) => { list.includes(templateId) ? list : [...list, templateId] , []) ?.map(templateId => - getTemplate({ id: templateId }).then(vmTemplate => + getApplicationsTemplates(templateId).then(vmTemplate => setVmTemplates(prev => [...prev, vmTemplate]) ) ) @@ -56,11 +59,12 @@ const DeployForm = ({ applicationTemplate, handleCancel }) => { ...application } = parseFormToDeployApplication(values, applicationParsed) - return instantiateApplicationTemplate({ - id: applicationTemplate.ID, - data: application, - instances - }).then(() => handleCancel()) + return Promise + .all([...new Array(instances)] + .map(() => instantiateApplicationTemplate(applicationTemplate.ID, application)) + ) + .then(() => handleCancel()) + .then(() => enqueueInfo(`Template instantiate - x${instances}`)) } if ((applicationTemplate && !data) || loading) { diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js index c340bdb550..e453986bf3 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js @@ -3,8 +3,9 @@ import React, { useEffect, useState } from 'react' import { useHistory } from 'react-router-dom' import { Container, Box } from '@material-ui/core' -import { PATH } from 'client/router/flow' -import { useApplication, useFetch } from 'client/hooks' +import { PATH } from 'client/apps/flow/routes' +import { useFetch } from 'client/hooks' +import { useApplicationTemplate, useApplicationTemplateApi } from 'client/features/One' import DeployForm from 'client/containers/ApplicationsTemplates/Form/Deploy' import { ListHeader, ListCards } from 'client/components/List' @@ -15,14 +16,12 @@ import { T } from 'client/constants' function ApplicationsTemplates () { const history = useHistory() const [showDialog, setShowDialog] = useState(false) - const { applicationsTemplates, getApplicationsTemplates } = useApplication() - const { - error, - fetchRequest, - loading, - reloading - } = useFetch(getApplicationsTemplates) + const applicationsTemplates = useApplicationTemplate() + const { getApplicationsTemplates } = useApplicationTemplateApi() + + const { error, fetchRequest, loading, reloading } = useFetch(getApplicationsTemplates) + console.log({ error }) useEffect(() => { fetchRequest() }, []) return ( @@ -31,9 +30,14 @@ function ApplicationsTemplates () { title={T.ApplicationsTemplates} hasReloadButton reloadButtonProps={{ + 'data-cy': 'refresh-application-template-list', onClick: () => fetchRequest(undefined, { reload: true, delay: 500 }), isSubmitting: Boolean(loading || reloading) }} + addButtonProps={{ + 'data-cy': 'create-application-template', + onClick: () => history.push(PATH.APPLICATIONS_TEMPLATES.CREATE) + }} /> {error ? ( @@ -42,24 +46,24 @@ function ApplicationsTemplates () { history.push(PATH.APPLICATIONS_TEMPLATES.CREATE)} + gridProps={{ 'data-cy': 'applications-templates' }} CardComponent={ApplicationTemplateCard} cardsProps={({ value }) => ({ handleEdit: () => history.push( PATH.APPLICATIONS_TEMPLATES.EDIT.replace(':id', value?.ID) ), handleDeploy: () => setShowDialog(value), - handleRemove: undefined + handleRemove: undefined // TODO })} /> )} - {showDialog !== false && ( - setShowDialog(false)} - /> - )} + {showDialog !== false && ( + setShowDialog(false)} + /> + )} ) } diff --git a/src/fireedge/src/client/containers/Dashboard/Provision/index.js b/src/fireedge/src/client/containers/Dashboard/Provision/index.js index f8a0251b4c..440f98d7d3 100644 --- a/src/fireedge/src/client/containers/Dashboard/Provision/index.js +++ b/src/fireedge/src/client/containers/Dashboard/Provision/index.js @@ -3,19 +3,21 @@ import * as React from 'react' import clsx from 'clsx' import { Container, Box, Grid } from '@material-ui/core' -import { useAuth, useFetchAll, useProvision } from 'client/hooks' +import { useAuth } from 'client/features/Auth' +import { useProvisionApi, useProviderApi } from 'client/features/One' import * as Widgets from 'client/components/Widgets' import dashboardStyles from 'client/containers/Dashboard/Provision/styles' function Dashboard () { const { settings: { disableanimations } = {} } = useAuth() - const { getProviders, getProvisions } = useProvision() - const { fetchRequestAll } = useFetchAll() + const { getProvisions } = useProvisionApi() + const { getProviders } = useProviderApi() const classes = dashboardStyles({ disableanimations }) React.useEffect(() => { - fetchRequestAll([getProviders(), getProvisions()]) + getProviders() + getProvisions() }, []) const withoutAnimations = String(disableanimations).toUpperCase() === 'YES' diff --git a/src/fireedge/src/client/containers/Login/Form.js b/src/fireedge/src/client/containers/Login/Form.js index a875369ba5..ba666c6953 100644 --- a/src/fireedge/src/client/containers/Login/Form.js +++ b/src/fireedge/src/client/containers/Login/Form.js @@ -44,7 +44,7 @@ const Form = ({ onBack, onSubmit, resolver, fields, error, isLoading, transition {onBack && ( - )} diff --git a/src/fireedge/src/client/containers/Login/index.js b/src/fireedge/src/client/containers/Login/index.js index a6040114d3..05edda93f1 100644 --- a/src/fireedge/src/client/containers/Login/index.js +++ b/src/fireedge/src/client/containers/Login/index.js @@ -2,18 +2,10 @@ import React, { useMemo, useState } from 'react' import { Paper, Box, Container, LinearProgress, useMediaQuery } from '@material-ui/core' -import { useAuth } from 'client/hooks' import Logo from 'client/icons/logo' -import { ONEADMIN_ID } from 'client/constants' -import { - FORM_USER_FIELDS, - FORM_USER_SCHEMA, - FORM_2FA_FIELDS, - FORM_2FA_SCHEMA, - FORM_GROUP_FIELDS, - FORM_GROUP_SCHEMA -} from 'client/containers/Login/schema' +import * as FORMS from 'client/containers/Login/schema' +import { useAuth, useAuthApi } from 'client/features/Auth' import Form from 'client/containers/Login/Form' import loginStyles from 'client/containers/Login/styles' @@ -26,35 +18,29 @@ const STEPS = { function Login () { const classes = loginStyles() const isMobile = useMediaQuery(theme => theme.breakpoints.only('xs')) - const [user, setUser] = useState(undefined) + const [dataUserForm, setDataUserForm] = useState(undefined) const [step, setStep] = useState(STEPS.USER_FORM) - const { - isLoading, - error, - login, - logout, - getAuthInfo, - setPrimaryGroup - } = useAuth() + + const { isLoading, error } = useAuth() + const { login, getAuthUser, changeGroup, logout } = useAuthApi() const handleSubmitUser = dataForm => { - login({ ...user, ...dataForm }).then(data => { - if (data?.token) { - getAuthInfo().then(() => { - data?.id !== ONEADMIN_ID && setStep(STEPS.GROUP_FORM) - }) - } else { - setStep(data ? STEPS.FA2_FORM : step) - setUser(data ? dataForm : user) - } - }) + login({ ...dataUserForm, ...dataForm }) + .then(({ jwt, user, isLoginInProgress }) => { + if (jwt && isLoginInProgress) { + getAuthUser().then(() => setStep(STEPS.GROUP_FORM)) + } else if (!jwt && user?.ID) { + setStep(STEPS.FA2_FORM) + setDataUserForm(dataForm) + } + }) } - const handleSubmitGroup = dataForm => setPrimaryGroup(dataForm) + const handleSubmitGroup = dataForm => changeGroup(dataForm) const handleBack = () => { logout() - setUser(undefined) + setDataUserForm(undefined) setStep(STEPS.USER_FORM) } @@ -75,11 +61,11 @@ function Login () { transitionProps={{ direction: 'right', in: step === STEPS.USER_FORM, - appear: false + enter: false }} onSubmit={handleSubmitUser} - resolver={FORM_USER_SCHEMA} - fields={FORM_USER_FIELDS} + resolver={FORMS.FORM_USER_SCHEMA} + fields={FORMS.FORM_USER_FIELDS} error={error} isLoading={isLoading} />} @@ -90,8 +76,8 @@ function Login () { }} onBack={handleBack} onSubmit={handleSubmitUser} - resolver={FORM_2FA_SCHEMA} - fields={FORM_2FA_FIELDS} + resolver={FORMS.FORM_2FA_SCHEMA} + fields={FORMS.FORM_2FA_FIELDS} error={error} isLoading={isLoading} />} @@ -102,8 +88,8 @@ function Login () { }} onBack={handleBack} onSubmit={handleSubmitGroup} - resolver={FORM_GROUP_SCHEMA} - fields={FORM_GROUP_FIELDS} + resolver={FORMS.FORM_GROUP_SCHEMA} + fields={FORMS.FORM_GROUP_FIELDS} error={error} isLoading={isLoading} />} diff --git a/src/fireedge/src/client/containers/Login/schema.js b/src/fireedge/src/client/containers/Login/schema.js index ed2a4dc7b9..aa99a1eda5 100644 --- a/src/fireedge/src/client/containers/Login/schema.js +++ b/src/fireedge/src/client/containers/Login/schema.js @@ -3,9 +3,9 @@ import * as React from 'react' import SelectedIcon from '@material-ui/icons/FilterVintage' import * as yup from 'yup' -import { useAuth, useOpennebula } from 'client/hooks' -import { T, INPUT_TYPES, FILTER_POOL } from 'client/constants' +import { useAuth } from 'client/features/Auth' import { getValidationFromFields } from 'client/utils' +import { T, INPUT_TYPES, FILTER_POOL } from 'client/constants' export const USERNAME = { name: 'user', @@ -75,17 +75,16 @@ export const GROUP = { label: T.SelectGroup, type: INPUT_TYPES.SELECT, values: () => { - const { authUser } = useAuth() - const { groups } = useOpennebula() + const { user, groups } = useAuth() return [{ text: T.ShowAll, value: FILTER_POOL.ALL_RESOURCES }] - .concat(groups + .concat([...groups] .sort((a, b) => a.ID - b.ID) .map(({ ID, NAME }) => ({ text: ( <> {`${ID} - ${String(NAME)}`} - {authUser?.GID === ID && ( + {user?.GID === ID && ( )} diff --git a/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Connection/index.js b/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Connection/index.js index 479cfa784f..dd8e170cfc 100644 --- a/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Connection/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Connection/index.js @@ -47,7 +47,7 @@ const Connection = ({ isUpdate }) => ({ }, [data]) return (fields?.length === 0) ? ( - + ) : ( ) diff --git a/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Template/index.js b/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Template/index.js index 5db39f5595..34ffd8d21d 100644 --- a/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Template/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/Create/Steps/Template/index.js @@ -3,7 +3,8 @@ import { Divider, Select, Breadcrumbs, InputLabel, FormControl } from '@material import ArrowIcon from '@material-ui/icons/ArrowForwardIosRounded' import Marked from 'marked' -import { useProvision, useListForm } from 'client/hooks' +import { useListForm } from 'client/hooks' +import { useOne } from 'client/features/One' import { ListCards } from 'client/components/List' import { ProvisionTemplateCard } from 'client/components/Cards' import { sanitize, groupBy } from 'client/utils' @@ -23,7 +24,8 @@ const Template = () => ({ resolver: () => STEP_FORM_SCHEMA, content: useCallback( ({ data, setFormData }) => { - const { provisionsTemplates } = useProvision() + const { provisionsTemplates } = useOne() + const templateSelected = data?.[0] const [provisionSelected, setProvision] = React.useState( diff --git a/src/fireedge/src/client/containers/Providers/Form/Create/index.js b/src/fireedge/src/client/containers/Providers/Form/Create/index.js index 6bba6abd00..74591a0ef4 100644 --- a/src/fireedge/src/client/containers/Providers/Form/Create/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/Create/index.js @@ -8,9 +8,11 @@ import { yupResolver } from '@hookform/resolvers' import FormStepper from 'client/components/FormStepper' import Steps from 'client/containers/Providers/Form/Create/Steps' -import { useFetchAll, useGeneral, useProvision } from 'client/hooks' +import { useFetchAll } from 'client/hooks' +import { useProviderApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' import * as ProviderTemplateModel from 'client/models/ProviderTemplate' -import { PATH } from 'client/router/provision' +import { PATH } from 'client/apps/provision/routes' function ProviderCreateForm () { const history = useHistory() @@ -19,14 +21,15 @@ function ProviderCreateForm () { const { getProvider, - getProviderConnection, createProvider, - updateProvider - } = useProvision() + updateProvider, + getProviderConnection + } = useProviderApi() + + const { enqueueError, enqueueSuccess, changeLoading } = useGeneralApi() const { data, fetchRequestAll, loading, error } = useFetchAll() const { steps, defaultValues, resolvers } = Steps({ isUpdate }) - const { showError, changeLoading } = useGeneral() const methods = useForm({ mode: 'onSubmit', @@ -35,7 +38,7 @@ function ProviderCreateForm () { }) const redirectWithError = (message = 'Error') => { - showError({ message }) + enqueueError(message) history.push(PATH.PROVIDERS.LIST) } @@ -47,8 +50,8 @@ function ProviderCreateForm () { const isValid = ProviderTemplateModel.isValidProviderTemplate(templateSelected) !isValid && redirectWithError(` - The template selected has a bad format. - Ask your cloud administrator` + The template selected has a bad format. + Ask your cloud administrator` ) const { name, description } = configuration @@ -61,7 +64,8 @@ function ProviderCreateForm () { name } - createProvider({ data: formatData }) + createProvider(formatData) + .then(id => enqueueSuccess(`Provider created - ID: ${id}`)) .then(() => history.push(PATH.PROVIDERS.LIST)) } @@ -78,7 +82,8 @@ function ProviderCreateForm () { connection: { ...connection, ...connectionEditable } } - updateProvider({ id, data: formatData }) + updateProvider(id, formatData) + .then(() => enqueueSuccess(`Provider updated - ID: ${id}`)) .then(() => history.push(PATH.PROVIDERS.LIST)) } @@ -89,8 +94,8 @@ function ProviderCreateForm () { useEffect(() => { isUpdate && fetchRequestAll([ - getProvider({ id }), - getProviderConnection({ id }) + getProvider(id), + getProviderConnection(id) ]) }, [isUpdate]) diff --git a/src/fireedge/src/client/containers/Providers/Sections/info.js b/src/fireedge/src/client/containers/Providers/Sections/info.js index 6630043cf7..0a7e86cbd8 100644 --- a/src/fireedge/src/client/containers/Providers/Sections/info.js +++ b/src/fireedge/src/client/containers/Providers/Sections/info.js @@ -5,20 +5,21 @@ import { List, ListItem, Typography, Grid, Paper, Divider } from '@material-ui/c import { CheckBox, CheckBoxOutlineBlank, Visibility } from '@material-ui/icons' import clsx from 'clsx' -import { useProvision } from 'client/hooks' +import { useProviderApi } from 'client/features/One' import { Action } from 'client/components/Cards/SelectCard' import { Tr } from 'client/components/HOC' import { T } from 'client/constants' +import * as Types from 'client/types/provision' import useStyles from 'client/containers/Providers/Sections/styles' -const Info = memo(({ data }) => { +const Info = memo(({ fetchProps }) => { const classes = useStyles() - const { getProviderConnection } = useProvision() + const { getProviderConnection } = useProviderApi() const [showConnection, setShowConnection] = useState(undefined) - const { ID, NAME, GNAME, UNAME, PERMISSIONS, TEMPLATE } = data + const { ID, NAME, GNAME, UNAME, PERMISSIONS, TEMPLATE } = fetchProps?.data const { connection, description, @@ -35,8 +36,7 @@ const Info = memo(({ data }) => { } cy='provider-connection' - handleClick={() => getProviderConnection({ id: ID }) - .then(setShowConnection)} + handleClick={() => getProviderConnection(ID).then(setShowConnection)} /> ) @@ -148,11 +148,15 @@ const Info = memo(({ data }) => { }) Info.propTypes = { - data: PropTypes.object.isRequired + fetchProps: PropTypes.shape({ + data: Types.Provision.isRequired + }).isRequired } Info.defaultProps = { - data: {} + fetchProps: { + data: {} + } } Info.displayName = 'Info' diff --git a/src/fireedge/src/client/containers/Providers/index.js b/src/fireedge/src/client/containers/Providers/index.js index 85bc10a016..5e1e5bbcd4 100644 --- a/src/fireedge/src/client/containers/Providers/index.js +++ b/src/fireedge/src/client/containers/Providers/index.js @@ -5,12 +5,14 @@ import { Container, Box } from '@material-ui/core' import EditIcon from '@material-ui/icons/Settings' import DeleteIcon from '@material-ui/icons/Delete' -import { PATH } from 'client/router/provision' -import { useProvision, useFetch, useSearch } from 'client/hooks' +import { PATH } from 'client/apps/provision/routes' +import { useProvider, useProviderApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' +import { useFetch, useSearch } from 'client/hooks' + import { ListHeader, ListCards } from 'client/components/List' import AlertError from 'client/components/Alerts/Error' import { ProvisionCard } from 'client/components/Cards' - import { DialogRequest } from 'client/components/Dialogs' import Information from 'client/containers/Providers/Sections/info' import { T } from 'client/constants' @@ -19,9 +21,12 @@ function Providers () { const history = useHistory() const [showDialog, setShowDialog] = useState(false) - const { providers, getProviders, getProvider, deleteProvider } = useProvision() + const providers = useProvider() + const { getProviders, getProvider, deleteProvider } = useProviderApi() + const { enqueueSuccess } = useGeneralApi() const { error, fetchRequest, loading, reloading } = useFetch(getProviders) + const { result, handleChange } = useSearch({ list: providers, listOptions: { shouldSort: true, keys: ['ID', 'NAME'] } @@ -36,10 +41,14 @@ function Providers () { fetchRequest(undefined, { reload: true }), isSubmitting: Boolean(loading || reloading) }} - addButtonProps={{ 'data-cy': 'create-provider', onClick: () => history.push(PATH.PROVIDERS.CREATE) }} + addButtonProps={{ + 'data-cy': 'create-provider', + onClick: () => history.push(PATH.PROVIDERS.CREATE) + }} searchProps={{ handleChange }} /> @@ -68,10 +77,14 @@ function Providers () { { handleClick: () => setShowDialog({ id: ID, - title: `DELETE provider - #${ID} - ${NAME}`, + title: `DELETE - ${NAME}`, + subheader: `#${ID}`, handleAccept: () => { - deleteProvider({ id: ID }) setShowDialog(false) + + return deleteProvider(ID) + .then(() => enqueueSuccess(`Provider deleted - ID: ${ID}`)) + .then(() => fetchRequest(undefined, { reload: true })) } }), icon: , @@ -84,10 +97,10 @@ function Providers () { {showDialog !== false && ( getProvider({ id: showDialog.id })} + request={() => getProvider(showDialog.id)} dialogProps={{ handleCancel, ...showDialog }} > - {({ data }) => } + {fetchProps => } )} diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js index c7313a2034..0806a9f189 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js @@ -3,64 +3,70 @@ import PropTypes from 'prop-types' import DeleteIcon from '@material-ui/icons/Delete' -import { useProvision, useOpennebula, useFetchAll } from 'client/hooks' +import { useFetchAll } from 'client/hooks' +import { useDatastoreApi, useProvisionApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' import { ListCards } from 'client/components/List' import { DatastoreCard } from 'client/components/Cards' import * as Types from 'client/types/provision' -const Datastores = memo(({ hidden, data, fetchRequest }) => { - const { - datastores - } = data?.TEMPLATE?.BODY?.provision?.infrastructure +const Datastores = memo( + ({ hidden, data, reloading, refetchProvision, disableAllActions }) => { + const { + datastores = [] + } = data?.TEMPLATE?.BODY?.provision?.infrastructure - const { deleteDatastore } = useProvision() - const { getDatastore } = useOpennebula() - const { data: list, fetchRequestAll, loading } = useFetchAll() + const { enqueueSuccess } = useGeneralApi() + const { deleteDatastore } = useProvisionApi() + const { getDatastore } = useDatastoreApi() - useEffect(() => { - if (!hidden) { - const requests = datastores?.map(getDatastore) ?? [] - fetchRequestAll(requests) - } - }, [datastores]) + const { data: list, fetchRequestAll, loading } = useFetchAll() + const fetchDatastores = () => fetchRequestAll(datastores?.map(({ id }) => getDatastore(id))) - useEffect(() => { - if (!list && !hidden) { - const requests = datastores?.map(getDatastore) ?? [] - fetchRequestAll(requests) - } - }, [hidden]) + useEffect(() => { + !hidden && !list && fetchDatastores() + }, [hidden]) - return ( - ({ - actions: [{ - handleClick: () => deleteDatastore({ id: ID }) - .then(() => fetchRequest(undefined, { reload: true })), - icon: , - cy: `provision-datastore-delete-${ID}` - }] - })} - displayEmpty - breakpoints={{ xs: 12, md: 6 }} - /> - ) -}, (prev, next) => - prev.hidden === next.hidden && prev.data === next.data) + useEffect(() => { + !reloading && !loading && fetchDatastores() + }, [reloading]) + + return ( + !disableAllActions && ({ + actions: [{ + handleClick: () => deleteDatastore(ID) + .then(refetchProvision) + .then(() => enqueueSuccess(`Datastore deleted - ID: ${ID}`)), + icon: , + cy: `provision-datastore-delete-${ID}` + }] + })} + displayEmpty + breakpoints={{ xs: 12, md: 6 }} + /> + ) + }, (prev, next) => + prev.hidden === next.hidden && prev.reloading === next.reloading +) Datastores.propTypes = { data: Types.Provision.isRequired, hidden: PropTypes.bool, - fetchRequest: PropTypes.func + refetchProvision: PropTypes.func, + reloading: PropTypes.bool, + disableAllActions: PropTypes.bool } Datastores.defaultProps = { data: {}, hidden: false, - fetchRequest: () => undefined + refetchProvision: () => undefined, + reloading: false, + disableAllActions: false } Datastores.displayName = 'Datastores' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js index bf73589261..65979caad1 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js @@ -4,71 +4,78 @@ import PropTypes from 'prop-types' import DeleteIcon from '@material-ui/icons/Delete' import ConfigureIcon from '@material-ui/icons/Settings' -import { useProvision, useOpennebula, useFetchAll } from 'client/hooks' +import { useFetchAll } from 'client/hooks' +import { useHostApi, useProvisionApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' import { ListCards } from 'client/components/List' import { HostCard } from 'client/components/Cards' import * as Types from 'client/types/provision' -const Hosts = memo(({ hidden, data, fetchRequest }) => { - const { - hosts - } = data?.TEMPLATE?.BODY?.provision?.infrastructure +const Hosts = memo( + ({ hidden, data, reloading, refetchProvision, disableAllActions }) => { + const { + hosts = [] + } = data?.TEMPLATE?.BODY?.provision?.infrastructure - const { configureHost, deleteHost } = useProvision() - const { getHost } = useOpennebula() - const { data: list, fetchRequestAll, loading } = useFetchAll() + const { enqueueSuccess, enqueueInfo } = useGeneralApi() + const { configureHost, deleteHost } = useProvisionApi() + const { getHost } = useHostApi() - useEffect(() => { - if (!hidden) { - const requests = hosts?.map(getHost) ?? [] - fetchRequestAll(requests) - } - }, [hosts]) + const { data: list, fetchRequestAll, loading } = useFetchAll() + const fetchHosts = () => fetchRequestAll(hosts?.map(({ id }) => getHost(id))) - useEffect(() => { - if (!list && !hidden) { - const requests = hosts?.map(getHost) ?? [] - fetchRequestAll(requests) - } - }, [hidden]) + useEffect(() => { + !hidden && !list && fetchHosts() + }, [hidden]) - return ( - ({ - actions: [ - { - handleClick: () => configureHost({ id: ID }), - icon: , - cy: `provision-host-configure-${ID}` - }, - { - handleClick: () => deleteHost({ id: ID }) - .then(() => fetchRequest(undefined, { reload: true })), - icon: , - cy: `provision-host-delete-${ID}` - } - ] - })} - displayEmpty - breakpoints={{ xs: 12, md: 6 }} - /> - ) -}, (prev, next) => - prev.hidden === next.hidden && prev.data === next.data) + useEffect(() => { + !reloading && !loading && fetchHosts() + }, [reloading]) + + return ( + !disableAllActions && ({ + actions: [ + { + handleClick: () => configureHost(ID) + .then(() => enqueueInfo(`Configuring host - ID: ${ID}`)) + .then(refetchProvision), + icon: , + cy: `provision-host-configure-${ID}` + }, + { + handleClick: () => deleteHost(ID) + .then(refetchProvision) + .then(() => enqueueSuccess(`Host deleted - ID: ${ID}`)), + icon: , + cy: `provision-host-delete-${ID}` + } + ] + })} + displayEmpty + breakpoints={{ xs: 12, md: 6 }} + /> + ) + }, (prev, next) => + prev.hidden === next.hidden && prev.reloading === next.reloading) Hosts.propTypes = { data: Types.Provision.isRequired, hidden: PropTypes.bool, - fetchRequest: PropTypes.func + refetchProvision: PropTypes.func, + reloading: PropTypes.bool, + disableAllActions: PropTypes.bool } Hosts.defaultProps = { data: {}, - hidde: false, - fetchRequest: () => undefined + hidden: false, + refetchProvision: () => undefined, + reloading: false, + disableAllActions: false } Hosts.displayName = 'Hosts' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js index 90777088ae..03c241483c 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js @@ -24,15 +24,16 @@ const TABS = [ { name: 'log', icon: LogIcon, content: LogTab } ] -const DialogInfo = ({ data, ...methods }) => { +const DialogInfo = ({ disableAllActions, fetchProps }) => { const [tabSelected, setTab] = useState(0) + const { data, fetchRequest, reloading } = fetchProps const renderTabs = useMemo(() => ( - + setTab(tab)} > {TABS.map(({ name, icon: Icon }, idx) => @@ -57,27 +58,37 @@ const DialogInfo = ({ data, ...methods }) => { height={1} hidden={tabSelected !== idx} key={`tab-${name}`} - overflow="auto" + overflow='auto' > - )), [tabSelected, data])} + )), [tabSelected, reloading])} ) } DialogInfo.propTypes = { - data: Types.Provision.isRequired, - fetchRequest: PropTypes.func + disableAllActions: PropTypes.bool, + fetchProps: PropTypes.shape({ + data: Types.Provision.isRequired, + fetchRequest: PropTypes.func, + reloading: PropTypes.bool + }).isRequired } DialogInfo.defaultProps = { - data: {}, - fetchRequest: undefined + disableAllActions: false, + fetchProps: { + data: {}, + fetchRequest: undefined, + reloading: false + } } export default DialogInfo diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js index 9c25d10c35..379e81c833 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js @@ -31,7 +31,7 @@ const Info = memo(({ data }) => { return ( - + {Tr(T.Information)} @@ -43,19 +43,19 @@ const Info = memo(({ data }) => { {Tr(T.Name)} - {name} + {name} {Tr(T.Description)} - {description} + {description} {Tr(T.Provider)} - {providerName} + {providerName} {Tr(T.Cluster)} - {`${clusterId} - ${clusterName}`} + {`${clusterId} - ${clusterName}`} {Tr(T.StartTime)} @@ -73,7 +73,7 @@ const Info = memo(({ data }) => { - + {Tr(T.Permissions)} @@ -102,7 +102,7 @@ const Info = memo(({ data }) => { - + {Tr(T.Ownership)} diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js index 9b4ed1f7e6..4f7deb6d8c 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js @@ -3,26 +3,23 @@ import PropTypes from 'prop-types' import { LinearProgress } from '@material-ui/core' -import { useProvision, useFetch, useSocket } from 'client/hooks' +import { useFetch, useSocket } from 'client/hooks' +import { useProvisionApi } from 'client/features/One' import DebugLog, { LogUtils } from 'client/components/DebugLog' import * as Types from 'client/types/provision' -const Log = React.memo(({ hidden, data: { ID: id } }) => { +const Log = React.memo(({ hidden, data: { ID } }) => { const { getProvision } = useSocket() - const { getProvisionLog } = useProvision() + const { getProvisionLog } = useProvisionApi() const { - data: { uuid = id, log } = {}, + data: { uuid = ID, log } = {}, fetchRequest, loading } = useFetch(getProvisionLog) React.useEffect(() => { - !hidden && fetchRequest({ id }) - }, [id]) - - React.useEffect(() => { - (!log && !hidden) && fetchRequest({ id }) + (!log && !hidden) && fetchRequest(ID) }, [hidden]) const parsedLog = React.useMemo(() => @@ -39,7 +36,8 @@ const Log = React.memo(({ hidden, data: { ID: id } }) => { ) }, (prev, next) => - prev.hidden === next.hidden && prev.data === next.data) + prev.hidden === next.hidden && prev.reloading === next.reloading +) Log.propTypes = { data: Types.Provision.isRequired, diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js index 66813df31b..d6a8a80002 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js @@ -3,64 +3,70 @@ import PropTypes from 'prop-types' import DeleteIcon from '@material-ui/icons/Delete' -import { useProvision, useOpennebula, useFetchAll } from 'client/hooks' +import { useFetchAll } from 'client/hooks' +import { useVNetworkApi, useProvisionApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' import { ListCards } from 'client/components/List' import { NetworkCard } from 'client/components/Cards' import * as Types from 'client/types/provision' -const Networks = memo(({ hidden, data, fetchRequest }) => { - const { - networks - } = data?.TEMPLATE?.BODY?.provision?.infrastructure +const Networks = memo( + ({ hidden, data, reloading, refetchProvision, disableAllActions }) => { + const { + networks = [] + } = data?.TEMPLATE?.BODY?.provision?.infrastructure - const { deleteVNetwork } = useProvision() - const { getVNetwork } = useOpennebula() - const { data: list, fetchRequestAll, loading } = useFetchAll() + const { enqueueSuccess } = useGeneralApi() + const { deleteVNetwork } = useProvisionApi() + const { getVNetwork } = useVNetworkApi() - useEffect(() => { - if (!hidden) { - const requests = networks?.map(getVNetwork) ?? [] - fetchRequestAll(requests) - } - }, [networks]) + const { data: list, fetchRequestAll, loading } = useFetchAll() + const fetchVNetworks = () => fetchRequestAll(networks?.map(({ id }) => getVNetwork(id))) - useEffect(() => { - if (!list && !hidden) { - const requests = networks?.map(getVNetwork) ?? [] - fetchRequestAll(requests) - } - }, [hidden]) + useEffect(() => { + !hidden && !list && fetchVNetworks() + }, [hidden]) - return ( - ({ - actions: [{ - handleClick: () => deleteVNetwork({ id: ID }) - .then(() => fetchRequest(undefined, { reload: true })), - icon: , - cy: `provision-vnet-delete-${ID}` - }] - })} - displayEmpty - breakpoints={{ xs: 12, md: 6 }} - /> - ) -}, (prev, next) => - prev.hidden === next.hidden && prev.data === next.data) + useEffect(() => { + !reloading && !loading && fetchVNetworks() + }, [reloading]) + + return ( + !disableAllActions && ({ + actions: [{ + handleClick: () => deleteVNetwork(ID) + .then(refetchProvision) + .then(() => enqueueSuccess(`VNetwork deleted - ID: ${ID}`)), + icon: , + cy: `provision-vnet-delete-${ID}` + }] + })} + displayEmpty + breakpoints={{ xs: 12, md: 6 }} + /> + ) + }, (prev, next) => + prev.hidden === next.hidden && prev.reloading === next.reloading +) Networks.propTypes = { data: Types.Provision.isRequired, hidden: PropTypes.bool, - fetchRequest: PropTypes.func + refetchProvision: PropTypes.func, + reloading: PropTypes.bool, + disableAllActions: PropTypes.bool } Networks.defaultProps = { data: {}, hidden: false, - fetchRequest: () => undefined + refetchProvision: () => undefined, + reloading: false, + disableAllActions: false } Networks.displayName = 'Networks' diff --git a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Inputs/index.js b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Inputs/index.js index d6f7bce50d..3d75c55665 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Inputs/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Inputs/index.js @@ -3,7 +3,9 @@ import React, { useCallback, useEffect, useState } from 'react' import { useFormContext } from 'react-hook-form' import { LinearProgress } from '@material-ui/core' -import { useProvision, useFetch, useGeneral } from 'client/hooks' +import { useFetch } from 'client/hooks' +import { useGeneralApi } from 'client/features/General' +import { useProviderApi } from 'client/features/One' import FormWithSchema from 'client/components/Forms/FormWithSchema' import { EmptyCard } from 'client/components/Cards' import { T } from 'client/constants' @@ -25,8 +27,8 @@ const Inputs = () => ({ optionsValidate: { abortEarly: false }, content: useCallback(() => { const [fields, setFields] = useState(undefined) - const { changeLoading } = useGeneral() - const { getProvider } = useProvision() + const { changeLoading } = useGeneralApi() + const { getProvider } = useProviderApi() const { data: fetchData, fetchRequest, loading } = useFetch(getProvider) const { watch, reset } = useFormContext() @@ -35,7 +37,7 @@ const Inputs = () => ({ if (!currentInputs) { changeLoading(true) // disable finish button until provider is fetched - fetchRequest({ id: providerSelected[0]?.ID }) + fetchRequest(providerSelected[0]?.ID) } else { setFields(FORM_FIELDS(inputs)) } diff --git a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Provider/index.js b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Provider/index.js index 3c78202039..e77ce6f977 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Provider/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Provider/index.js @@ -1,7 +1,8 @@ import React, { useCallback } from 'react' import { useWatch } from 'react-hook-form' -import { useProvision, useListForm } from 'client/hooks' +import { useListForm } from 'client/hooks' +import { useOne } from 'client/features/One' import { ListCards } from 'client/components/List' import { EmptyCard, ProvisionCard } from 'client/components/Cards' import { T } from 'client/constants' @@ -17,7 +18,7 @@ const Provider = () => ({ label: T.Provider, resolver: () => STEP_FORM_SCHEMA, content: useCallback(({ data, setFormData }) => { - const { providers } = useProvision() + const { providers } = useOne() const provisionTemplate = useWatch({ name: TEMPLATE_ID }) const provisionTemplateSelected = provisionTemplate?.[0] ?? {} diff --git a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Template/index.js b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Template/index.js index 836e86375f..7822208469 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Template/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/Create/Steps/Template/index.js @@ -3,7 +3,8 @@ import { Divider, Select, Breadcrumbs, InputLabel, FormControl } from '@material import ArrowIcon from '@material-ui/icons/ArrowForwardIosRounded' import Marked from 'marked' -import { useProvision, useListForm } from 'client/hooks' +import { useListForm } from 'client/hooks' +import { useOne } from 'client/features/One' import { ListCards } from 'client/components/List' import { ProvisionTemplateCard } from 'client/components/Cards' import { sanitize, groupBy } from 'client/utils' @@ -22,7 +23,8 @@ const Template = () => ({ label: T.ProvisionTemplate, resolver: () => STEP_FORM_SCHEMA, content: useCallback(({ data, setFormData }) => { - const { provisionsTemplates, providers } = useProvision() + const { provisionsTemplates, providers } = useOne() + const templateSelected = data?.[0] const [provisionSelected, setProvision] = React.useState( diff --git a/src/fireedge/src/client/containers/Provisions/Form/Create/index.js b/src/fireedge/src/client/containers/Provisions/Form/Create/index.js index 76f432e329..3d27c4235f 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/Create/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/Create/index.js @@ -11,8 +11,10 @@ import Steps from 'client/containers/Provisions/Form/Create/Steps' import formCreateStyles from 'client/containers/Provisions/Form/Create/styles' import DebugLog from 'client/components/DebugLog' -import { useProvision, useSocket, useFetch } from 'client/hooks' -import { PATH } from 'client/router/provision' +import { useSocket, useFetch } from 'client/hooks' +import { useProviderApi, useProvisionApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' +import { PATH } from 'client/apps/provision/routes' import { set, cloneObject, mapUserInputs } from 'client/utils' import { Translate } from 'client/components/HOC' @@ -23,9 +25,11 @@ function ProvisionCreateForm () { const history = useHistory() const [uuid, setUuid] = useState(undefined) - const { getProvision } = useSocket() - const { getProviders, createProvision } = useProvision() + const { getProvision } = useSocket() + const { getProviders } = useProviderApi() + const { createProvision } = useProvisionApi() + const { enqueueInfo } = useGeneralApi() const { data, fetchRequest, loading, error } = useFetch(getProviders) @@ -64,7 +68,9 @@ function ProvisionCreateForm () { ?.map(input => ({ ...input, value: `${parseInputs[input?.name]}` })) } - createProvision({ data: formatData }).then(res => res && setUuid(res)) + createProvision(formatData) + .then(res => res && setUuid(res)) + .then(() => enqueueInfo('Creating provision')) } useEffect(() => { fetchRequest() }, []) diff --git a/src/fireedge/src/client/containers/Provisions/index.js b/src/fireedge/src/client/containers/Provisions/index.js index 2c5c29da89..51f846c241 100644 --- a/src/fireedge/src/client/containers/Provisions/index.js +++ b/src/fireedge/src/client/containers/Provisions/index.js @@ -5,8 +5,11 @@ import { Container, Box } from '@material-ui/core' import EditIcon from '@material-ui/icons/Settings' import DeleteIcon from '@material-ui/icons/Delete' -import { PATH } from 'client/router/provision' -import { useProvision, useFetch, useSearch } from 'client/hooks' +import { PATH } from 'client/apps/provision/routes' +import { useFetch, useSearch } from 'client/hooks' +import { useProvision, useProvisionApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' + import { ListHeader, ListCards } from 'client/components/List' import AlertError from 'client/components/Alerts/Error' import { ProvisionCard } from 'client/components/Cards' @@ -17,17 +20,21 @@ import { T } from 'client/constants' function Provisions () { const history = useHistory() - const [showDialog, setShowDialog] = useState(false) + const [{ content, ...showDialog } = {}, setShowDialog] = useState() + const handleCloseDialog = () => setShowDialog() + + const { enqueueInfo } = useGeneralApi() + const provisions = useProvision() const { - provisions, getProvisions, getProvision, configureProvision, deleteProvision - } = useProvision() + } = useProvisionApi() const { error, fetchRequest, loading, reloading } = useFetch(getProvisions) + const { result, handleChange } = useSearch({ list: provisions, listOptions: { shouldSort: true, keys: ['ID', 'NAME'] } @@ -35,17 +42,19 @@ function Provisions () { useEffect(() => { fetchRequest() }, []) - const handleCancel = () => setShowDialog(false) - return ( fetchRequest(undefined, { reload: true }), isSubmitting: Boolean(loading || reloading) }} - addButtonProps={{ 'data-cy': 'create-provision', onClick: () => history.push(PATH.PROVISIONS.CREATE) }} + addButtonProps={{ + 'data-cy': 'create-provision', + onClick: () => history.push(PATH.PROVISIONS.CREATE) + }} searchProps={{ handleChange }} /> @@ -62,23 +71,36 @@ function Provisions () { id: ID, title: NAME, subheader: `#${ID}`, - content: DialogInfo + content: props => createElement(DialogInfo, { + ...props, + displayName: 'DialogDetailProvision' + }) }), actions: [ { - handleClick: () => configureProvision({ id: ID }), + handleClick: () => configureProvision(ID) + .then(() => enqueueInfo(`Configuring provision - ID: ${ID}`)) + .then(() => fetchRequest(undefined, { reload: true })), icon: , cy: 'provision-configure' }, { handleClick: () => setShowDialog({ id: ID, - title: `DELETE provision - #${ID} - ${NAME}`, + content: props => createElement(DialogInfo, { + ...props, + disableAllActions: true, + displayName: 'DialogDeleteProvision' + }), + title: `DELETE - ${NAME}`, + subheader: `#${ID}`, handleAccept: () => { - deleteProvision({ id: ID }) - setShowDialog(false) - }, - content: DialogInfo + handleCloseDialog() + + return deleteProvision(ID) + .then(() => enqueueInfo(`Deleting provision - ID: ${ID}`)) + .then(() => fetchRequest(undefined, { reload: true })) + } }), icon: , cy: 'provision-delete' @@ -88,13 +110,13 @@ function Provisions () { /> )} - {showDialog !== false && ( + {content && ( getProvision({ id: showDialog.id })} - dialogProps={{ handleCancel, ...showDialog }} + request={() => getProvision(showDialog.id)} + dialogProps={{ handleCancel: handleCloseDialog, ...showDialog }} > - {props => createElement(showDialog.content, props)} + {props => content(props)} )} diff --git a/src/fireedge/src/client/containers/Settings/index.js b/src/fireedge/src/client/containers/Settings/index.js index 7958eb32ff..f961d62a5c 100644 --- a/src/fireedge/src/client/containers/Settings/index.js +++ b/src/fireedge/src/client/containers/Settings/index.js @@ -21,9 +21,10 @@ import { useForm, FormProvider } from 'react-hook-form' import { yupResolver } from '@hookform/resolvers' import FormWithSchema from 'client/components/Forms/FormWithSchema' -import { SubmitButton } from 'client/components/FormControl' +import SubmitButton from 'client/components/FormControl/SubmitButton' -import { useAuth } from 'client/hooks' +import { useAuth, useAuthApi } from 'client/features/Auth' +import { useUserApi } from 'client/features/One' import { Tr } from 'client/components/HOC' import { T } from 'client/constants' @@ -55,8 +56,9 @@ const useStyles = makeStyles(theme => ({ const Settings = () => { const classes = useStyles() - - const { updateUser, settings = {} } = useAuth() + const { user, settings } = useAuth() + const { getAuthUser } = useAuthApi() + const { updateUser } = useUserApi() const { handleSubmit, setError, reset, formState, ...methods } = useForm({ reValidateMode: 'onSubmit', @@ -79,7 +81,8 @@ const Settings = () => { .map(([key, value]) => `\n ${String(key).toUpperCase()} = "${value}"`) .join(',') - return updateUser({ template: `FIREEDGE = [${values}]\n` }) + return updateUser({ id: user.ID, template: `FIREEDGE = [${values}]\n` }) + .then(getAuthUser) } return ( diff --git a/src/fireedge/src/client/containers/TestApi/ResponseForm.js b/src/fireedge/src/client/containers/TestApi/ResponseForm.js index 023781ca6a..6d9866b178 100644 --- a/src/fireedge/src/client/containers/TestApi/ResponseForm.js +++ b/src/fireedge/src/client/containers/TestApi/ResponseForm.js @@ -11,7 +11,7 @@ import { } from '@material-ui/core' import { SubmitButton } from 'client/components/FormControl' -import { requestData, requestParams } from 'client/utils' +import { RestClient, requestParams } from 'client/utils' const ResponseForm = ({ handleChangeResponse, @@ -20,13 +20,10 @@ const ResponseForm = ({ const { control, handleSubmit, errors, formState } = useForm() const onSubmit = dataForm => { - const { url, options } = requestParams(dataForm, { - name, - httpMethod, - params - }) + const command = { name, httpMethod, params } + const { url, options: { method, data } } = requestParams(dataForm, command) - requestData(url, options).then(({ id, ...res }) => { + RestClient[method](url, data).then(({ id, ...res }) => { id === 401 && console.log('ERROR') id === 200 && handleChangeResponse(JSON.stringify(res, null, '\t')) }) diff --git a/src/fireedge/src/client/containers/Webconsole/index.js b/src/fireedge/src/client/containers/WebConsole/index.js similarity index 100% rename from src/fireedge/src/client/containers/Webconsole/index.js rename to src/fireedge/src/client/containers/WebConsole/index.js diff --git a/src/fireedge/src/client/dev/_app.js b/src/fireedge/src/client/dev/_app.js index 55a5f02534..1ecc51c10e 100644 --- a/src/fireedge/src/client/dev/_app.js +++ b/src/fireedge/src/client/dev/_app.js @@ -18,15 +18,13 @@ import * as React from 'react' import FlowApp from 'client/apps/flow' import ProvisionApp from 'client/apps/provision' +import { isDevelopment, isBackend } from 'client/utils' import { _APPS, APPS } from 'client/constants' const DevelopmentApp = props => { let appName = '' - if ( - process?.env?.NODE_ENV === 'development' && - typeof window !== 'undefined' - ) { + if (isDevelopment() && !isBackend()) { const parseUrl = window.location.pathname .split(/\//gi) .filter(sub => sub?.length > 0) diff --git a/src/fireedge/src/client/dev/index.js b/src/fireedge/src/client/dev/index.js index 1bae849b22..1a3310f7b0 100644 --- a/src/fireedge/src/client/dev/index.js +++ b/src/fireedge/src/client/dev/index.js @@ -16,13 +16,12 @@ import * as React from 'react' import { render } from 'react-dom' -import store from 'client/store' +import { createStore } from 'client/store' import App from 'client/dev/_app' -render( - , - document.getElementById('root') -) +const { store } = createStore({ initState: window.REDUX_DATA }) + +render(, document.getElementById('root')) if (process.env.NODE_ENV === 'development' && module.hot) { module.hot.accept('./_app', () => { diff --git a/src/fireedge/src/client/features/Auth/actions.js b/src/fireedge/src/client/features/Auth/actions.js new file mode 100644 index 0000000000..2baa093fe6 --- /dev/null +++ b/src/fireedge/src/client/features/Auth/actions.js @@ -0,0 +1,103 @@ +import { createAsyncThunk, createAction } from '@reduxjs/toolkit' + +import { T, JWT_NAME, ONEADMIN_ID, FILTER_POOL } from 'client/constants' +import { authService } from 'client/features/Auth/services' +import { userService } from 'client/features/One/user/services' +import { getGroups } from 'client/features/One/group/actions' +import { dismissSnackbar } from 'client/features/General/actions' + +import { storage, removeStoreData } from 'client/utils' + +const login = createAsyncThunk( + 'auth/login', + async ({ remember, ...user }, { rejectWithValue, dispatch }) => { + try { + const response = await authService.login(user) + const { id, token } = response + const isOneAdmin = id === ONEADMIN_ID + + if (token) { + storage(JWT_NAME, token, remember) + dispatch(dismissSnackbar({ dismissAll: true })) + } + + return { + jwt: token, + user: { ID: id }, + isOneAdmin, + isLoginInProgress: !!token && !isOneAdmin + } + } catch (error) { + return rejectWithValue({ error }) + } + } +) + +const getUser = createAsyncThunk( + 'auth/user', + async (_, { dispatch, getState }) => { + try { + const user = await authService.getUser() + await dispatch(getGroups()) + + const isOneAdmin = user?.ID === ONEADMIN_ID + const userSettings = user?.TEMPLATE?.FIREEDGE ?? {} + + const settings = { + ...getState().auth?.settings, + ...Object.entries(userSettings).reduce((res, [key, value]) => + ({ ...res, [String(key).toLowerCase()]: value }) + , {}) + } + + return { user, settings, isOneAdmin } + } catch (error) { + dispatch(logout(T.SessionExpired)) + } + }, { + condition: (_, { getState }) => { + const { isLoading } = getState().auth + + return !isLoading + } + } +) + +const logout = createAction('logout', errorMessage => { + removeStoreData([JWT_NAME]) + + return { error: errorMessage } +}) + +const changeFilter = createAction( + 'auth/change-filter', + filterPool => ({ payload: { filterPool, isLoginInProgress: false } }) +) + +const changeGroup = createAsyncThunk( + 'auth/change-group', + async ({ group }, { getState, dispatch, rejectWithValue }) => { + try { + if (group === FILTER_POOL.ALL_RESOURCES) { + dispatch(changeFilter(FILTER_POOL.ALL_RESOURCES)) + } else { + const { user } = getState().auth + + const data = { id: user?.ID, group } + await userService.changeGroup({ data }) + + dispatch(changeFilter(FILTER_POOL.PRIMARY_GROUP_RESOURCES)) + return { + user: { + ...user, + GID: group + } + } + } + } catch (error) { + return rejectWithValue({ error }) + } + } +) + +export { login, getUser, logout, changeFilter, changeGroup } diff --git a/src/fireedge/src/client/features/Auth/hooks.js b/src/fireedge/src/client/features/Auth/hooks.js new file mode 100644 index 0000000000..e102edc5d9 --- /dev/null +++ b/src/fireedge/src/client/features/Auth/hooks.js @@ -0,0 +1,37 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector, shallowEqual } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/Auth/actions' + +export const useAuth = () => { + const auth = useSelector(state => state.auth, shallowEqual) + const groups = useSelector(state => state.one.groups, shallowEqual) + + const { user, jwt } = auth + + const userGroups = [user?.GROUPS?.ID] + .flat() + .map(id => groups.find(({ ID }) => ID === id)) + .filter(Boolean) + + const isLogged = !!jwt && !!userGroups?.length + + return { ...auth, groups: userGroups, isLogged } +} + +export const useAuthApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + login: user => unwrapDispatch(actions.login(user)), + getAuthUser: () => dispatch(actions.getUser()), + changeGroup: data => unwrapDispatch(actions.changeGroup(data)), + logout: () => dispatch(actions.logout()) + } +} diff --git a/src/fireedge/src/client/features/Auth/index.js b/src/fireedge/src/client/features/Auth/index.js new file mode 100644 index 0000000000..ad60034316 --- /dev/null +++ b/src/fireedge/src/client/features/Auth/index.js @@ -0,0 +1,4 @@ +export * from 'client/features/Auth/slice' +export * from 'client/features/Auth/actions' +export * from 'client/features/Auth/hooks' +export * from 'client/features/Auth/services' diff --git a/src/fireedge/src/client/features/Auth/services.js b/src/fireedge/src/client/features/Auth/services.js new file mode 100644 index 0000000000..c17500afcf --- /dev/null +++ b/src/fireedge/src/client/features/Auth/services.js @@ -0,0 +1,18 @@ +import { httpCodes } from 'server/utils/constants' +import { RestClient } from 'client/utils' + +export const authService = ({ + login: user => RestClient.post('/api/auth', user).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res + throw res + } + + return res?.data + }), + getUser: () => RestClient.get('/api/user/info').then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.USER ?? {} + }) +}) diff --git a/src/fireedge/src/client/features/Auth/slice.js b/src/fireedge/src/client/features/Auth/slice.js new file mode 100644 index 0000000000..2730163d75 --- /dev/null +++ b/src/fireedge/src/client/features/Auth/slice.js @@ -0,0 +1,66 @@ +import { createSlice } from '@reduxjs/toolkit' + +import { login, getUser, logout, changeFilter, changeGroup } from 'client/features/Auth/actions' +import { JWT_NAME, FILTER_POOL, DEFAULT_SCHEME, DEFAULT_LANGUAGE } from 'client/constants' +import { isBackend } from 'client/utils' + +const initial = () => ({ + jwt: !isBackend() + ? window.localStorage.getItem(JWT_NAME) ?? + window.sessionStorage.getItem(JWT_NAME) ?? + null + : null, + user: null, + error: null, + filterPool: FILTER_POOL.ALL_RESOURCES, + settings: { + scheme: DEFAULT_SCHEME, + lang: DEFAULT_LANGUAGE, + disableAnimations: 'NO' + }, + isLoginInProgress: false, + isLoading: false +}) + +const { actions, reducer } = createSlice({ + name: 'auth', + initialState: initial(), + extraReducers: builder => { + builder + .addCase( + logout, + (_, { error }) => ({ ...initial(), error }) + ) + .addMatcher( + ({ type }) => { + return [ + changeFilter.type, + login.fulfilled.type, + getUser.fulfilled.type, + changeGroup.fulfilled.type + ].includes(type) + }, + (state, { payload }) => ({ ...state, ...payload }) + ) + .addMatcher( + ({ type }) => type.startsWith('auth/') && type.endsWith('/pending'), + state => ({ ...state, isLoading: true, error: null }) + ) + .addMatcher( + ({ type }) => type.startsWith('auth/') && type.endsWith('/fulfilled'), + state => ({ ...state, isLoading: false }) + ) + .addMatcher( + ({ type }) => type.startsWith('auth/') && type.endsWith('/rejected'), + (state, { payload }) => ({ + ...state, + ...payload, + isLoginInProgress: false, + isLoading: false, + jwt: null + }) + ) + } +}) + +export { actions, reducer } diff --git a/src/fireedge/src/client/features/General/actions.js b/src/fireedge/src/client/features/General/actions.js new file mode 100644 index 0000000000..030fae73e0 --- /dev/null +++ b/src/fireedge/src/client/features/General/actions.js @@ -0,0 +1,10 @@ +import { createAction } from '@reduxjs/toolkit' + +export const fixMenu = createAction('Fix menu') +export const changeZone = createAction('Change zone') +export const changeLoading = createAction('Change loading') +export const changeTitle = createAction('Change title') + +export const enqueueSnackbar = createAction('Enqueue snackbar') +export const dismissSnackbar = createAction('Dismiss snackbar') +export const deleteSnackbar = createAction('Delete snackbar') diff --git a/src/fireedge/src/client/features/General/hooks.js b/src/fireedge/src/client/features/General/hooks.js new file mode 100644 index 0000000000..679919872d --- /dev/null +++ b/src/fireedge/src/client/features/General/hooks.js @@ -0,0 +1,59 @@ +import { useDispatch, useSelector } from 'react-redux' + +import * as actions from 'client/features/General/actions' + +const generateKey = () => new Date().getTime() + Math.random() + +export const useGeneral = () => ( + useSelector(state => state.general) +) + +export const useGeneralApi = () => { + const dispatch = useDispatch() + + return { + fixMenu: isFixed => dispatch(actions.fixMenu(isFixed)), + changeLoading: isLoading => dispatch(actions.changeLoading(isLoading)), + changeTitle: title => dispatch(actions.changeTitle(title)), + changeZone: zone => dispatch(actions.changeZone(zone)), + + enqueueSnackbar: notification => { + const key = notification.options && notification.options.key + + return dispatch(actions.enqueueSnackbar({ + key: key || generateKey(), + message: String(notification.message) || '', + options: notification.options || {} + })) + }, + // dismiss all if no key has been defined + dismissSnackbar: key => dispatch( + actions.dismissSnackbar({ key, dismissAll: !key }) + ), + deleteSnackbar: key => dispatch( + actions.deleteSnackbar({ key }) + ), + + enqueueSuccess: message => dispatch( + actions.enqueueSnackbar({ + key: generateKey(), + message, + options: { variant: 'success' } + }) + ), + enqueueError: message => dispatch( + actions.enqueueSnackbar({ + key: generateKey(), + message, + options: { variant: 'success' } + }) + ), + enqueueInfo: message => dispatch( + actions.enqueueSnackbar({ + key: generateKey(), + message, + options: { variant: 'success' } + }) + ) + } +} diff --git a/src/fireedge/src/client/features/General/index.js b/src/fireedge/src/client/features/General/index.js new file mode 100644 index 0000000000..c02f2a69be --- /dev/null +++ b/src/fireedge/src/client/features/General/index.js @@ -0,0 +1,3 @@ +export * from 'client/features/General/slice' +export * from 'client/features/General/actions' +export * from 'client/features/General/hooks' diff --git a/src/fireedge/src/client/features/General/slice.js b/src/fireedge/src/client/features/General/slice.js new file mode 100644 index 0000000000..4efe9986ee --- /dev/null +++ b/src/fireedge/src/client/features/General/slice.js @@ -0,0 +1,98 @@ +import { createSlice } from '@reduxjs/toolkit' + +import * as actions from 'client/features/General/actions' + +const initial = { + zone: 0, + title: null, + isLoading: false, + isFixMenu: false, + + notifications: [] +} + +const { reducer } = createSlice({ + name: 'general', + initialState: initial, + extraReducers: builder => { + builder + .addCase('logout', ({ title }) => ({ ...initial, title })) + + /* UI ACTIONS */ + .addCase(actions.fixMenu, (state, { payload }) => { + return { ...state, isFixMenu: !!payload } + }) + .addCase(actions.changeLoading, (state, { payload }) => { + return { ...state, isLoading: !!payload } + }) + .addCase(actions.changeTitle, (state, { payload }) => { + return { ...state, title: payload } + }) + .addCase(actions.changeZone, (state, { payload }) => { + return { ...state, zone: payload } + }) + + /* NOTIFICATION ACTIONS */ + .addCase(actions.enqueueSnackbar, (state, { payload }) => { + const { key, options, message } = payload + + return { + ...state, + notifications: [ + ...state.notifications, + { key, options, message } + ] + } + }) + .addCase(actions.dismissSnackbar, (state, { payload }) => { + const { key, dismissAll } = payload + + return { + ...state, + notifications: state.notifications.map(notification => + dismissAll || notification.key !== key + ? { ...notification, dismissed: true } + : { ...notification } + ) + } + }) + .addCase(actions.deleteSnackbar, (state, { payload }) => { + const { key } = payload + + return { + ...state, + notifications: state.notifications.filter( + notification => notification.key !== key + ) + } + }) + + /* REQUESTS API MATCHES */ + .addMatcher( + ({ type }) => type.endsWith('/pending') && !type.includes('auth'), + state => ({ ...state, isLoading: true }) + ) + .addMatcher( + ({ type }) => type.endsWith('/fulfilled') && !type.includes('auth'), + state => ({ ...state, isLoading: false }) + ) + .addMatcher( + ({ type, meta }) => + !meta?.aborted && type.endsWith('/rejected') && !type.includes('auth'), + (state, { payload }) => ({ + ...state, + isLoading: false, + notifications: [ + ...state.notifications, + { + key: new Date().getTime() + Math.random(), + message: payload, + options: { variant: 'error' } + } + ] + }) + ) + } +}) + +export { reducer } diff --git a/src/fireedge/src/client/features/One/application/actions.js b/src/fireedge/src/client/features/One/application/actions.js new file mode 100644 index 0000000000..56f12e6f3c --- /dev/null +++ b/src/fireedge/src/client/features/One/application/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { applicationService } from 'client/features/One/application/services' + +export const getApplication = createAction('cluster', applicationService.getApplication) + +export const getApplications = createAction( + 'application/pool', + applicationService.getApplications, + response => ({ applications: response }) +) diff --git a/src/fireedge/src/client/features/One/application/hooks.js b/src/fireedge/src/client/features/One/application/hooks.js new file mode 100644 index 0000000000..6b5f15263f --- /dev/null +++ b/src/fireedge/src/client/features/One/application/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/application/actions' + +export const useApplication = () => ( + useSelector(state => state.one.applications) +) + +export const useApplicationApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getApplication: id => unwrapDispatch(actions.getApplication({ id })), + getApplications: () => unwrapDispatch(actions.getApplications()) + } +} diff --git a/src/fireedge/src/client/features/One/application/services.js b/src/fireedge/src/client/features/One/application/services.js new file mode 100644 index 0000000000..9ee23aa75b --- /dev/null +++ b/src/fireedge/src/client/features/One/application/services.js @@ -0,0 +1,19 @@ +import { SERVICE } from 'server/routes/api/oneflow/string-routes' +import { httpCodes } from 'server/utils/constants' +import { RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const applicationService = ({ + getApplication: ({ filter, id }) => RestClient + .get(`/api/${SERVICE}/list/${id}`, { filter }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + getApplications: data => { + const command = { name: `${SERVICE}.list`, params: {} } + return poolRequest(data, command, 'DOCUMENT') + } +}) diff --git a/src/fireedge/src/client/features/One/applicationTemplate/actions.js b/src/fireedge/src/client/features/One/applicationTemplate/actions.js new file mode 100644 index 0000000000..95c6cd9e71 --- /dev/null +++ b/src/fireedge/src/client/features/One/applicationTemplate/actions.js @@ -0,0 +1,28 @@ +import { createAction } from 'client/features/One/utils' +import { applicationTemplateService } from 'client/features/One/applicationTemplate/services' + +export const getApplicationTemplate = createAction( + 'application-template', + applicationTemplateService.getApplicationTemplate +) + +export const getApplicationsTemplates = createAction( + 'application-template/pool', + applicationTemplateService.getApplicationsTemplates, + response => ({ applicationsTemplates: response }) +) + +export const createApplicationTemplate = createAction( + 'application-template/create', + applicationTemplateService.createApplicationTemplate +) + +export const updateApplicationTemplate = createAction( + 'application-template/update', + applicationTemplateService.updateApplicationTemplate +) + +export const instantiateApplicationTemplate = createAction( + 'application-template/instantiate', + applicationTemplateService.instantiateApplicationTemplate +) diff --git a/src/fireedge/src/client/features/One/applicationTemplate/hooks.js b/src/fireedge/src/client/features/One/applicationTemplate/hooks.js new file mode 100644 index 0000000000..f5ff5b1e3e --- /dev/null +++ b/src/fireedge/src/client/features/One/applicationTemplate/hooks.js @@ -0,0 +1,30 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/applicationTemplate/actions' + +export const useApplicationTemplate = () => ( + useSelector(state => state.one.applicationsTemplates) +) + +export const useApplicationTemplateApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getApplicationTemplate: id => unwrapDispatch(actions.getApplicationTemplate({ id })), + getApplicationsTemplates: () => unwrapDispatch(actions.getApplicationsTemplates()), + createApplicationTemplate: data => unwrapDispatch(actions.createApplicationTemplate({ data })), + + updateApplicationTemplate: (id, data) => + unwrapDispatch(actions.updateApplicationTemplate({ id, data })), + + instantiateApplicationTemplate: (id, data) => + unwrapDispatch(actions.instantiateApplicationTemplate({ id, data })) + } +} diff --git a/src/fireedge/src/client/features/One/applicationTemplate/services.js b/src/fireedge/src/client/features/One/applicationTemplate/services.js new file mode 100644 index 0000000000..586b47e6ff --- /dev/null +++ b/src/fireedge/src/client/features/One/applicationTemplate/services.js @@ -0,0 +1,50 @@ +import { SERVICE_TEMPLATE } from 'server/routes/api/oneflow/string-routes' +import { httpCodes } from 'server/utils/constants' +import { RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const applicationTemplateService = ({ + getApplicationTemplate: ({ filter, id }) => RestClient + .get(`/api/${SERVICE_TEMPLATE}/list/${id}`, { filter }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + getApplicationsTemplates: data => { + const command = { name: `${SERVICE_TEMPLATE}.list`, params: {} } + return poolRequest(data, command, 'DOCUMENT') + }, + + createApplicationTemplate: ({ data = {} }) => RestClient + .post(`/api/${SERVICE_TEMPLATE}/create`, data) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + updateApplicationTemplate: ({ id, data = {} }) => RestClient + .put(`/api/${SERVICE_TEMPLATE}/update/${id}`, data) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + instantiateApplicationTemplate: ({ id, data = {} }) => RestClient + .post(`/api/${SERVICE_TEMPLATE}/action/${id}`, { + data: { + action: { + perform: 'instantiate', + params: { merge_template: data } + } + } + }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }) +}) diff --git a/src/fireedge/src/client/features/One/cluster/actions.js b/src/fireedge/src/client/features/One/cluster/actions.js new file mode 100644 index 0000000000..93f170a5fd --- /dev/null +++ b/src/fireedge/src/client/features/One/cluster/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { clusterService } from 'client/features/One/cluster/services' + +export const getCluster = createAction('cluster', clusterService.getCluster) + +export const getClusters = createAction( + 'cluster/pool', + clusterService.getClusters, + response => ({ clusters: response }) +) diff --git a/src/fireedge/src/client/features/One/cluster/hooks.js b/src/fireedge/src/client/features/One/cluster/hooks.js new file mode 100644 index 0000000000..2a7a029b3d --- /dev/null +++ b/src/fireedge/src/client/features/One/cluster/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/cluster/actions' + +export const useCluster = () => ( + useSelector(state => state.one.clusters) +) + +export const useClusterApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getCluster: id => unwrapDispatch(actions.getCluster({ id })), + getClusters: () => unwrapDispatch(actions.getClusters()) + } +} diff --git a/src/fireedge/src/client/features/One/cluster/services.js b/src/fireedge/src/client/features/One/cluster/services.js new file mode 100644 index 0000000000..4e675b248f --- /dev/null +++ b/src/fireedge/src/client/features/One/cluster/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/cluster' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const clusterService = ({ + getCluster: ({ filter, id }) => { + const name = Actions.CLUSTER_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.CLUSTER ?? {} + }) + }, + getClusters: data => { + const name = Actions.CLUSTER_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'CLUSTER') + } +}) diff --git a/src/fireedge/src/client/features/One/datastore/actions.js b/src/fireedge/src/client/features/One/datastore/actions.js new file mode 100644 index 0000000000..0ebb9d0236 --- /dev/null +++ b/src/fireedge/src/client/features/One/datastore/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { datastoreService } from 'client/features/One/datastore/services' + +export const getDatastore = createAction('datastore', datastoreService.getDatastore) + +export const getDatastores = createAction( + 'datastore', + datastoreService.getDatastores, + response => ({ datastores: response }) +) diff --git a/src/fireedge/src/client/features/One/datastore/hooks.js b/src/fireedge/src/client/features/One/datastore/hooks.js new file mode 100644 index 0000000000..b5a7bd8b9e --- /dev/null +++ b/src/fireedge/src/client/features/One/datastore/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/datastore/actions' + +export const useDatastore = () => ( + useSelector(state => state.one.datastores) +) + +export const useDatastoreApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getDatastore: id => unwrapDispatch(actions.getDatastore({ id })), + getDatastores: () => unwrapDispatch(actions.getDatastores()) + } +} diff --git a/src/fireedge/src/client/features/One/datastore/services.js b/src/fireedge/src/client/features/One/datastore/services.js new file mode 100644 index 0000000000..ff6bf4dc31 --- /dev/null +++ b/src/fireedge/src/client/features/One/datastore/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/datastore' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const datastoreService = ({ + getDatastore: ({ filter, id }) => { + const name = Actions.DATASTORE_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DATASTORE ?? {} + }) + }, + getDatastores: data => { + const name = Actions.DATASTORE_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'DATASTORE') + } +}) diff --git a/src/fireedge/src/client/features/One/group/actions.js b/src/fireedge/src/client/features/One/group/actions.js new file mode 100644 index 0000000000..deb5e37352 --- /dev/null +++ b/src/fireedge/src/client/features/One/group/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { groupService } from 'client/features/One/group/services' + +export const getGroup = createAction('group', groupService.getGroup) + +export const getGroups = createAction( + 'group/pool', + groupService.getGroups, + response => ({ groups: response }) +) diff --git a/src/fireedge/src/client/features/One/group/hooks.js b/src/fireedge/src/client/features/One/group/hooks.js new file mode 100644 index 0000000000..ee479a3c5c --- /dev/null +++ b/src/fireedge/src/client/features/One/group/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/group/actions' + +export const useGroup = () => ( + useSelector(state => state.one.groups) +) + +export const useGroupApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getGroup: id => unwrapDispatch(actions.getGroup({ id })), + getGroups: () => unwrapDispatch(actions.getGroups()) + } +} diff --git a/src/fireedge/src/client/features/One/group/services.js b/src/fireedge/src/client/features/One/group/services.js new file mode 100644 index 0000000000..50489e78ca --- /dev/null +++ b/src/fireedge/src/client/features/One/group/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/group' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const groupService = ({ + getGroup: ({ filter, id }) => { + const name = Actions.GROUP_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.GROUP ?? {} + }) + }, + getGroups: data => { + const name = Actions.GROUP_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'GROUP') + } +}) diff --git a/src/fireedge/src/client/features/One/hooks.js b/src/fireedge/src/client/features/One/hooks.js new file mode 100644 index 0000000000..1824036aba --- /dev/null +++ b/src/fireedge/src/client/features/One/hooks.js @@ -0,0 +1,20 @@ +import { useSelector, shallowEqual } from 'react-redux' + +export const useOne = () => ( + useSelector(state => state.one, shallowEqual) +) + +export * from 'client/features/One/application/hooks' +export * from 'client/features/One/applicationTemplate/hooks' +export * from 'client/features/One/cluster/hooks' +export * from 'client/features/One/datastore/hooks' +export * from 'client/features/One/group/hooks' +export * from 'client/features/One/host/hooks' +export * from 'client/features/One/marketApp/hooks' +export * from 'client/features/One/provider/hooks' +export * from 'client/features/One/provision/hooks' +export * from 'client/features/One/user/hooks' +export * from 'client/features/One/vm/hooks' +export * from 'client/features/One/vmTemplate/hooks' +export * from 'client/features/One/vnetwork/hooks' +export * from 'client/features/One/vnetworkTemplate/hooks' diff --git a/src/fireedge/src/client/features/One/host/actions.js b/src/fireedge/src/client/features/One/host/actions.js new file mode 100644 index 0000000000..d87f383db5 --- /dev/null +++ b/src/fireedge/src/client/features/One/host/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { hostService } from 'client/features/One/host/services' + +export const getHost = createAction('host', hostService.getHost) + +export const getHosts = createAction( + 'host/pool', + hostService.getHosts, + response => ({ hosts: response }) +) diff --git a/src/fireedge/src/client/features/One/host/hooks.js b/src/fireedge/src/client/features/One/host/hooks.js new file mode 100644 index 0000000000..db989edbf5 --- /dev/null +++ b/src/fireedge/src/client/features/One/host/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/host/actions' + +export const useHost = () => ( + useSelector(state => state.one.hosts) +) + +export const useHostApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getHost: id => unwrapDispatch(actions.getHost({ id })), + getHosts: () => unwrapDispatch(actions.getHosts()) + } +} diff --git a/src/fireedge/src/client/features/One/host/services.js b/src/fireedge/src/client/features/One/host/services.js new file mode 100644 index 0000000000..66360c1b23 --- /dev/null +++ b/src/fireedge/src/client/features/One/host/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/host' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const hostService = ({ + getHost: ({ filter, id }) => { + const name = Actions.HOST_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.HOST ?? {} + }) + }, + getHosts: data => { + const name = Actions.HOST_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'HOST') + } +}) diff --git a/src/fireedge/src/client/features/One/index.js b/src/fireedge/src/client/features/One/index.js new file mode 100644 index 0000000000..ba0efe5508 --- /dev/null +++ b/src/fireedge/src/client/features/One/index.js @@ -0,0 +1,2 @@ +export * from 'client/features/One/slice' +export * from 'client/features/One/hooks' diff --git a/src/fireedge/src/client/features/One/marketApp/actions.js b/src/fireedge/src/client/features/One/marketApp/actions.js new file mode 100644 index 0000000000..9d26eb001f --- /dev/null +++ b/src/fireedge/src/client/features/One/marketApp/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { marketAppService } from 'client/features/One/marketApp/services' + +export const getMarketApp = createAction('app', marketAppService.getMarketApp) + +export const getMarketApps = createAction( + 'app/pool', + marketAppService.getMarketApps, + response => ({ apps: response }) +) diff --git a/src/fireedge/src/client/features/One/marketApp/hooks.js b/src/fireedge/src/client/features/One/marketApp/hooks.js new file mode 100644 index 0000000000..3424ff00f0 --- /dev/null +++ b/src/fireedge/src/client/features/One/marketApp/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/marketApp/actions' + +export const useMarketApp = () => ( + useSelector(state => state.one.apps) +) + +export const useMarketAppApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getMarketApp: id => unwrapDispatch(actions.getMarketApp({ id })), + getMarketApps: () => unwrapDispatch(actions.getMarketApps()) + } +} diff --git a/src/fireedge/src/client/features/One/marketApp/services.js b/src/fireedge/src/client/features/One/marketApp/services.js new file mode 100644 index 0000000000..14f959fed9 --- /dev/null +++ b/src/fireedge/src/client/features/One/marketApp/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/marketapp' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const marketAppService = ({ + getMarketApp: ({ filter, id }) => { + const name = Actions.MARKETAPP_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.MARKETAPP ?? {} + }) + }, + getMarketApps: data => { + const name = Actions.MARKETAPP_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'MARKETPLACEAPP') + } +}) diff --git a/src/fireedge/src/client/features/One/provider/actions.js b/src/fireedge/src/client/features/One/provider/actions.js new file mode 100644 index 0000000000..b1fddb566b --- /dev/null +++ b/src/fireedge/src/client/features/One/provider/actions.js @@ -0,0 +1,15 @@ +import { createAction } from 'client/features/One/utils' +import { providerService } from 'client/features/One/provider/services' + +export const getProvider = createAction('provider', providerService.getProvider) + +export const getProviders = createAction( + 'provider/pool', + providerService.getProviders, + res => ({ providers: res }) +) + +export const getProviderConnection = createAction('provider', providerService.getProviderConnection) +export const createProvider = createAction('provider/create', providerService.createProvider) +export const updateProvider = createAction('provider/update', providerService.updateProvider) +export const deleteProvider = createAction('provider/delete', providerService.deleteProvider) diff --git a/src/fireedge/src/client/features/One/provider/hooks.js b/src/fireedge/src/client/features/One/provider/hooks.js new file mode 100644 index 0000000000..18c24dc572 --- /dev/null +++ b/src/fireedge/src/client/features/One/provider/hooks.js @@ -0,0 +1,27 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/provider/actions' + +export const useProvider = () => ( + useSelector(state => state.one.providers) +) + +export const useProviderApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getProvider: id => unwrapDispatch(actions.getProvider({ id })), + getProviders: () => dispatch(actions.getProviders()), + getProviderConnection: id => unwrapDispatch(actions.getProviderConnection({ id })), + createProvider: data => unwrapDispatch(actions.createProvider({ data })), + updateProvider: (id, data) => unwrapDispatch(actions.updateProvider({ id, data })), + deleteProvider: id => unwrapDispatch(actions.deleteProvider({ id })) + } +} diff --git a/src/fireedge/src/client/features/One/provider/services.js b/src/fireedge/src/client/features/One/provider/services.js new file mode 100644 index 0000000000..93d34f9335 --- /dev/null +++ b/src/fireedge/src/client/features/One/provider/services.js @@ -0,0 +1,55 @@ +import { PROVIDER } from 'server/routes/api/provision/string-routes' +import { httpCodes } from 'server/utils/constants' +import { RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const providerService = ({ + // -------------------------------------------- + // PROVIDERS REQUESTS + // -------------------------------------------- + + getProvider: ({ filter, id }) => RestClient + .get(`/api/${PROVIDER}/list/${id}`, { filter }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + getProviders: data => { + const command = { name: `${PROVIDER}.list`, params: {} } + return poolRequest(data, command, 'DOCUMENT') + }, + + getProviderConnection: ({ id }) => RestClient + .get(`/api/${PROVIDER}/connection/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + createProvider: ({ data = {} }) => RestClient + .post(`/api/${PROVIDER}/create`, data) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + updateProvider: ({ id, data = {} }) => RestClient + .put(`/api/${PROVIDER}/update/${id}`, data) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + deleteProvider: ({ id }) => RestClient + .delete(`/api/${PROVIDER}/delete/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }) +}) diff --git a/src/fireedge/src/client/features/One/provision/actions.js b/src/fireedge/src/client/features/One/provision/actions.js new file mode 100644 index 0000000000..b895ddc35a --- /dev/null +++ b/src/fireedge/src/client/features/One/provision/actions.js @@ -0,0 +1,31 @@ +import { createAction } from 'client/features/One/utils' +import { provisionService } from 'client/features/One/provision/services' + +export const getProvisionsTemplates = createAction( + 'provisions-template/pool', + provisionService.getProvisionsTemplates, + res => ({ provisionsTemplates: res }) +) + +export const createProvisionTemplate = createAction( + 'provisions-template/create', + provisionService.createProvisionTemplate +) + +export const getProvision = createAction('provision', provisionService.getProvision) + +export const getProvisions = createAction( + 'provision/pool', + provisionService.getProvisions, + res => ({ provisions: res }) +) + +export const createProvision = createAction('provision/create', provisionService.createProvision) +export const configureProvision = createAction('provision/configure', provisionService.configureProvision) +export const deleteProvision = createAction('provision/delete', provisionService.deleteProvision) +export const getProvisionLog = createAction('provision/log', provisionService.getProvisionLog) + +export const deleteDatastore = createAction('provision/datastore/delete', provisionService.deleteDatastore) +export const deleteVNetwork = createAction('provision/vnet/delete', provisionService.deleteVNetwork) +export const deleteHost = createAction('provision/host/delete', provisionService.deleteHost) +export const configureHost = createAction('provision/host/configure', provisionService.configureHost) diff --git a/src/fireedge/src/client/features/One/provision/hooks.js b/src/fireedge/src/client/features/One/provision/hooks.js new file mode 100644 index 0000000000..fc75033b12 --- /dev/null +++ b/src/fireedge/src/client/features/One/provision/hooks.js @@ -0,0 +1,39 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/provision/actions' + +export const useProvisionTemplate = () => ( + useSelector(state => state.one.provisionsTemplates) +) + +export const useProvision = () => ( + useSelector(state => state.one.provisions) +) + +export const useProvisionApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getProvisionsTemplates: () => unwrapDispatch(actions.getProvisionsTemplates()), + createProvisionTemplate: () => unwrapDispatch(actions.createProvisionTemplate()), + + getProvision: id => unwrapDispatch(actions.getProvision({ id })), + getProvisions: () => dispatch(actions.getProvisions()), + createProvision: data => unwrapDispatch(actions.createProvision({ data })), + configureProvision: id => unwrapDispatch(actions.configureProvision({ id })), + deleteProvision: id => unwrapDispatch(actions.deleteProvision({ id })), + getProvisionLog: id => unwrapDispatch(actions.getProvisionLog({ id })), + + deleteDatastore: id => unwrapDispatch(actions.deleteDatastore({ id })), + deleteVNetwork: id => unwrapDispatch(actions.deleteVNetwork({ id })), + deleteHost: id => unwrapDispatch(actions.deleteHost({ id })), + configureHost: id => unwrapDispatch(actions.configureHost({ id })) + } +} diff --git a/src/fireedge/src/client/features/One/provision/services.js b/src/fireedge/src/client/features/One/provision/services.js new file mode 100644 index 0000000000..aa85262dff --- /dev/null +++ b/src/fireedge/src/client/features/One/provision/services.js @@ -0,0 +1,121 @@ +import { PROVISION } from 'server/routes/api/provision/string-routes' +import { httpCodes } from 'server/utils/constants' +import { RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const provisionService = ({ + // -------------------------------------------- + // ALL PROVISION TEMPLATES REQUESTS + // -------------------------------------------- + + getProvisionsTemplates: ({ filter }) => RestClient + .get(`/api/${PROVISION}/defaults`, { data: { filter } }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? [] + }), + + createProvisionTemplate: ({ data = {} }) => + Promise.resolve().then(res => res?.data?.DOCUMENT ?? {}), + + // -------------------------------------------- + // PROVISIONS REQUESTS + // -------------------------------------------- + + getProvision: ({ filter, id }) => RestClient + .get(`/api/${PROVISION}/list/${id}`, { filter }) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.DOCUMENT ?? {} + }), + + getProvisions: data => { + const command = { name: `${PROVISION}.list`, params: {} } + return poolRequest(data, command, 'DOCUMENT') + }, + + createProvision: ({ data = {} }) => RestClient + .post(`/api/${PROVISION}/create`, data) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res?.data + throw res + } + + return res?.data + }), + + configureProvision: ({ id }) => RestClient + .put(`/api/${PROVISION}/configure/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res + throw res + } + + return res?.data ?? {} + }), + + deleteProvision: ({ id }) => RestClient + .delete(`/api/${PROVISION}/delete/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res + throw res + } + + return res?.data ?? {} + }), + + getProvisionLog: ({ id }) => RestClient + .get(`/api/${PROVISION}/log/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res + throw res + } + + return res?.data ?? {} + }), + + // -------------------------------------------- + // INFRASTRUCTURES REQUESTS + // -------------------------------------------- + + deleteDatastore: ({ id }) => RestClient + .delete(`/api/${PROVISION}/datastore/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + deleteVNetwork: ({ id }) => RestClient + .delete(`/api/${PROVISION}/network/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + deleteHost: ({ id }) => RestClient + .delete(`/api/${PROVISION}/host/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }), + + configureHost: ({ id }) => RestClient + .put(`/api/${PROVISION}/host/${id}`) + .then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) { + if (res?.id === httpCodes.accepted.id) return res + throw res + } + + return res?.data ?? {} + }) +}) diff --git a/src/fireedge/src/client/features/One/slice.js b/src/fireedge/src/client/features/One/slice.js new file mode 100644 index 0000000000..99291d492f --- /dev/null +++ b/src/fireedge/src/client/features/One/slice.js @@ -0,0 +1,59 @@ +import { createSlice } from '@reduxjs/toolkit' + +const initial = { + requests: {}, + + vms: [], + templates: [], + applications: [], + applicationsTemplates: [], + datastores: [], + virtualRouters: [], + vmGroups: [], + images: [], + files: [], + marketplaces: [], + apps: [], + vNetworks: [], + vNetworksTemplates: [], + securityGroups: [], + clusters: [], + hosts: [], + zones: [], + users: [], + groups: [], + vdc: [], + acl: [], + provisionsTemplates: [], + providers: [], + provisions: [] +} + +const { actions, reducer } = createSlice({ + name: 'pool', + initialState: initial, + extraReducers: builder => { + builder + .addCase('logout', () => initial) + .addMatcher( + ({ type }) => type.includes('/pool') && type.endsWith('/pending'), + (state, { meta, type }) => { + const pureType = type.replace('/pending', '') + + if (!state?.requests?.[pureType]) { + state.requests[pureType] = meta + } + } + ) + .addMatcher( + ({ type }) => type.includes('/pool') && type.endsWith('/fulfilled'), + (state, { payload, type }) => { + const { [type.replace('/fulfilled', '')]: _, ...requests } = state.requests + + return { ...state, requests, ...payload } + } + ) + } +}) + +export { actions, reducer } diff --git a/src/fireedge/src/client/features/One/user/actions.js b/src/fireedge/src/client/features/One/user/actions.js new file mode 100644 index 0000000000..86942c5d23 --- /dev/null +++ b/src/fireedge/src/client/features/One/user/actions.js @@ -0,0 +1,13 @@ +import { createAction } from 'client/features/One/utils' +import { userService } from 'client/features/One/user/services' + +export const changeGroup = createAction('user/change-group', userService.changeGroup) +export const getUser = createAction('user', userService.getUser) + +export const getUsers = createAction( + 'user/pool', + userService.getUsers, + response => ({ users: response }) +) + +export const updateUser = createAction('user/update', userService.updateUser) diff --git a/src/fireedge/src/client/features/One/user/hooks.js b/src/fireedge/src/client/features/One/user/hooks.js new file mode 100644 index 0000000000..ad407fc1bb --- /dev/null +++ b/src/fireedge/src/client/features/One/user/hooks.js @@ -0,0 +1,25 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/user/actions' + +export const useUser = () => ( + useSelector(state => state.one.users) +) + +export const useUserApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + changeGroup: data => unwrapDispatch(actions.changeGroup({ data })), + getUser: id => unwrapDispatch(actions.getUser({ id })), + getUsers: () => unwrapDispatch(actions.getUsers()), + updateUser: data => unwrapDispatch(actions.updateUser({ data })) + } +} diff --git a/src/fireedge/src/client/features/One/user/services.js b/src/fireedge/src/client/features/One/user/services.js new file mode 100644 index 0000000000..1b0ce39d85 --- /dev/null +++ b/src/fireedge/src/client/features/One/user/services.js @@ -0,0 +1,45 @@ +import { Actions, Commands } from 'server/utils/constants/commands/user' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const userService = ({ + getUser: ({ filter, id }) => { + const name = Actions.USER_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.USER ?? {} + }) + }, + getUsers: data => { + const name = Actions.USER_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'USER') + }, + changeGroup: ({ data }) => { + const name = Actions.USER_CHGRP + const { url, options } = requestParams(data, { name, ...Commands[name] }) + + return RestClient.put(url, options.data).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }) + }, + updateUser: ({ data }) => { + const name = Actions.USER_UPDATE + const { url, options } = requestParams(data, { name, ...Commands[name] }) + + return RestClient.put(url, options.data).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data ?? {} + }) + } +}) diff --git a/src/fireedge/src/client/features/One/utils.js b/src/fireedge/src/client/features/One/utils.js new file mode 100644 index 0000000000..cfb3113c9b --- /dev/null +++ b/src/fireedge/src/client/features/One/utils.js @@ -0,0 +1,37 @@ +import { createAsyncThunk } from '@reduxjs/toolkit' + +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' + +export const createAction = (type, service, wrapResult) => + createAsyncThunk(type, async (payload, { getState, rejectWithValue }) => { + try { + const { filterPool } = getState().auth + + const response = await service({ + ...payload, + filter: filterPool + }) + + return wrapResult ? wrapResult(response) : response + } catch (err) { + return rejectWithValue(typeof err === 'string' ? err : err?.response?.data) + } + }, { + condition: (_, { getState }) => { + const { requests } = getState().one + + return !requests[type] + } + }) + +export const poolRequest = async (data = {}, command, element) => { + const { filter, end, start } = data + const { url, options } = requestParams({ filter, end, start }, command) + + const response = await RestClient.get(url, { ...options }) + + if (!response?.id || response?.id !== httpCodes.ok.id) throw response + + return [response?.data?.[`${element}_POOL`]?.[element] ?? []].flat() +} diff --git a/src/fireedge/src/client/features/One/vm/actions.js b/src/fireedge/src/client/features/One/vm/actions.js new file mode 100644 index 0000000000..3e59a99525 --- /dev/null +++ b/src/fireedge/src/client/features/One/vm/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { vmService } from 'client/features/One/vm/services' + +export const getVm = createAction('vm', vmService.getVm) + +export const getVms = createAction( + 'vm/pool', + vmService.getVms, + response => ({ vms: response }) +) diff --git a/src/fireedge/src/client/features/One/vm/hooks.js b/src/fireedge/src/client/features/One/vm/hooks.js new file mode 100644 index 0000000000..d8cf3ff39d --- /dev/null +++ b/src/fireedge/src/client/features/One/vm/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/vm/actions' + +export const useVm = () => ( + useSelector(state => state.one.vms) +) + +export const useVmApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getVm: id => unwrapDispatch(actions.getVm({ id })), + getVms: () => unwrapDispatch(actions.getVms()) + } +} diff --git a/src/fireedge/src/client/features/One/vm/services.js b/src/fireedge/src/client/features/One/vm/services.js new file mode 100644 index 0000000000..b3655381c8 --- /dev/null +++ b/src/fireedge/src/client/features/One/vm/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/vm' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const vmService = ({ + getVm: ({ filter, id }) => { + const name = Actions.VM_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.VM ?? {} + }) + }, + getVms: data => { + const name = Actions.VM_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'VM') + } +}) diff --git a/src/fireedge/src/client/features/One/vmTemplate/actions.js b/src/fireedge/src/client/features/One/vmTemplate/actions.js new file mode 100644 index 0000000000..632c21a362 --- /dev/null +++ b/src/fireedge/src/client/features/One/vmTemplate/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { vmTemplateService } from 'client/features/One/vmTemplate/services' + +export const getVmTemplate = createAction('vm-template', vmTemplateService.getVmTemplate) + +export const getVmTemplates = createAction( + 'vm-template/pool', + vmTemplateService.getVmTemplates, + response => ({ templates: response }) +) diff --git a/src/fireedge/src/client/features/One/vmTemplate/hooks.js b/src/fireedge/src/client/features/One/vmTemplate/hooks.js new file mode 100644 index 0000000000..19d833afa8 --- /dev/null +++ b/src/fireedge/src/client/features/One/vmTemplate/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/vmTemplate/actions' + +export const useVmTemplate = () => ( + useSelector(state => state.one.templates) +) + +export const useVmTemplateApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getVmTemplate: id => unwrapDispatch(actions.getVmTemplate({ id })), + getVmTemplates: () => unwrapDispatch(actions.getVmTemplates()) + } +} diff --git a/src/fireedge/src/client/features/One/vmTemplate/services.js b/src/fireedge/src/client/features/One/vmTemplate/services.js new file mode 100644 index 0000000000..1035a4c327 --- /dev/null +++ b/src/fireedge/src/client/features/One/vmTemplate/services.js @@ -0,0 +1,19 @@ +import { Actions, Commands } from 'server/utils/constants/commands/template' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' + +export const vmTemplateService = ({ + getVNetwork: ({ filter, id }) => { + const name = Actions.TEMPLATE_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.VMTEMPLATE ?? {} + }) + } +}) diff --git a/src/fireedge/src/client/features/One/vnetwork/actions.js b/src/fireedge/src/client/features/One/vnetwork/actions.js new file mode 100644 index 0000000000..b5040c38ab --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetwork/actions.js @@ -0,0 +1,10 @@ +import { createAction } from 'client/features/One/utils' +import { vNetworkService } from 'client/features/One/vnetwork/services' + +export const getVNetwork = createAction('vnet', vNetworkService.getVNetwork) + +export const getVNetworks = createAction( + 'vnet/pool', + vNetworkService.getVNetworks, + response => ({ vNetworks: response }) +) diff --git a/src/fireedge/src/client/features/One/vnetwork/hooks.js b/src/fireedge/src/client/features/One/vnetwork/hooks.js new file mode 100644 index 0000000000..686dbb8b17 --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetwork/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/vnetwork/actions' + +export const useVNetwork = () => ( + useSelector(state => state.one.vNetworks) +) + +export const useVNetworkApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getVNetwork: id => unwrapDispatch(actions.getVNetwork({ id })), + getVNetworks: () => unwrapDispatch(actions.getVNetworks()) + } +} diff --git a/src/fireedge/src/client/features/One/vnetwork/services.js b/src/fireedge/src/client/features/One/vnetwork/services.js new file mode 100644 index 0000000000..79da9e2a0f --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetwork/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/vn' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const vNetworkService = ({ + getVNetwork: ({ filter, id }) => { + const name = Actions.VN_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.VNET ?? {} + }) + }, + getVNetworks: data => { + const name = Actions.VN_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'VNET') + } +}) diff --git a/src/fireedge/src/client/features/One/vnetworkTemplate/actions.js b/src/fireedge/src/client/features/One/vnetworkTemplate/actions.js new file mode 100644 index 0000000000..9668de9e32 --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetworkTemplate/actions.js @@ -0,0 +1,13 @@ +import { createAction } from 'client/features/One/utils' +import { vNetworkTemplateService } from 'client/features/One/vnetworkTemplate/services' + +export const getVNetworkTemplate = createAction( + 'vnet-template', + vNetworkTemplateService.getVNetworkTemplate +) + +export const getVNetworksTemplates = createAction( + 'vnet-template/pool', + vNetworkTemplateService.getVNetworksTemplates, + response => ({ vNetworksTemplates: response }) +) diff --git a/src/fireedge/src/client/features/One/vnetworkTemplate/hooks.js b/src/fireedge/src/client/features/One/vnetworkTemplate/hooks.js new file mode 100644 index 0000000000..62b1430106 --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetworkTemplate/hooks.js @@ -0,0 +1,23 @@ +import { useCallback } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { unwrapResult } from '@reduxjs/toolkit' + +import * as actions from 'client/features/One/vnetworkTemplate/actions' + +export const useVNetworkTemplate = () => ( + useSelector(state => state.one.vNetworksTemplates) +) + +export const useVNetworkTemplateApi = () => { + const dispatch = useDispatch() + + const unwrapDispatch = useCallback( + action => dispatch(action).then(unwrapResult) + , [dispatch] + ) + + return { + getVNetworkTemplate: id => unwrapDispatch(actions.getVNetworkTemplate({ id })), + getVNetworksTemplates: () => unwrapDispatch(actions.getVNetworksTemplates()) + } +} diff --git a/src/fireedge/src/client/features/One/vnetworkTemplate/services.js b/src/fireedge/src/client/features/One/vnetworkTemplate/services.js new file mode 100644 index 0000000000..065608acc2 --- /dev/null +++ b/src/fireedge/src/client/features/One/vnetworkTemplate/services.js @@ -0,0 +1,25 @@ +import { Actions, Commands } from 'server/utils/constants/commands/vntemplate' +import { httpCodes } from 'server/utils/constants' +import { requestParams, RestClient } from 'client/utils' +import { poolRequest } from 'client/features/One/utils' + +export const vNetworkTemplateService = ({ + getVNetworkTemplate: ({ filter, id }) => { + const name = Actions.VNTEMPLATE_INFO + const { url, options } = requestParams( + { filter, id }, + { name, ...Commands[name] } + ) + + return RestClient.get(url, options).then(res => { + if (!res?.id || res?.id !== httpCodes.ok.id) throw res + + return res?.data?.VNTEMPLATE ?? {} + }) + }, + getVNetworksTemplates: data => { + const name = Actions.VNTEMPLATE_POOL_INFO + const command = { name, ...Commands[name] } + return poolRequest(data, command, 'VNTEMPLATE') + } +}) diff --git a/src/fireedge/src/client/flow.js b/src/fireedge/src/client/flow.js index 21075c9188..edd78b1616 100644 --- a/src/fireedge/src/client/flow.js +++ b/src/fireedge/src/client/flow.js @@ -16,10 +16,12 @@ import * as React from 'react' import { hydrate, render } from 'react-dom' -import store from 'client/store' +import { createStore } from 'client/store' import App from 'client/apps/flow' -const mainDiv = document.getElementById('root') -const renderMethod = mainDiv && mainDiv.innerHTML !== '' ? hydrate : render +const { store } = createStore({ initState: window.REDUX_DATA }) + +const rootHTML = document.getElementById('root')?.innerHTML +const renderMethod = rootHTML !== '' ? hydrate : render renderMethod(, document.getElementById('root')) diff --git a/src/fireedge/src/client/hooks/index.js b/src/fireedge/src/client/hooks/index.js index fbc6d72638..8cd0f2304f 100644 --- a/src/fireedge/src/client/hooks/index.js +++ b/src/fireedge/src/client/hooks/index.js @@ -1,27 +1,19 @@ -import useApplication from 'client/hooks/useApplication' -import useAuth from 'client/hooks/useAuth' import useFetch from 'client/hooks/useFetch' import useFetchAll from 'client/hooks/useFetchAll' import useGeneral from 'client/hooks/useGeneral' import useList from 'client/hooks/useList' import useListForm from 'client/hooks/useListForm' import useNearScreen from 'client/hooks/useNearScreen' -import useOpennebula from 'client/hooks/useOpennebula' -import useProvision from 'client/hooks/useProvision' import useSearch from 'client/hooks/useSearch' import useSocket from 'client/hooks/useSocket' export { - useApplication, - useAuth, useFetch, useFetchAll, useGeneral, useList, useListForm, useNearScreen, - useOpennebula, - useProvision, useSearch, useSocket } diff --git a/src/fireedge/src/client/hooks/useApplication.js b/src/fireedge/src/client/hooks/useApplication.js deleted file mode 100644 index 815273556e..0000000000 --- a/src/fireedge/src/client/hooks/useApplication.js +++ /dev/null @@ -1,139 +0,0 @@ -import { useCallback } from 'react' -import { useSelector, useDispatch, shallowEqual } from 'react-redux' - -import { setApplications, setApplicationsTemplates } from 'client/actions/pool' -import { enqueueError, enqueueSuccess } from 'client/actions/general' - -import * as serviceFlow from 'client/services/flow' -import { filterBy } from 'client/utils' - -export default function useOpennebula () { - const dispatch = useDispatch() - const { - applications, - applicationsTemplates, - filterPool: filter - } = useSelector( - state => ({ - ...state?.Opennebula, - filterPool: state?.Authenticated?.filterPool - }), - shallowEqual - ) - - const getApplication = useCallback( - ({ id }) => - serviceFlow.getApplication({ id }).catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) application`)) - }), - [dispatch] - ) - - const getApplications = useCallback( - ({ end, start } = { end: -1, start: -1 }) => - serviceFlow - .getApplications({ filter, end, start }) - .then(doc => dispatch(setApplications(doc))) - .catch(err => { - dispatch(enqueueError(err ?? 'Error GET applications')) - }), - [dispatch, filter, applications] - ) - - const getApplicationTemplate = useCallback( - ({ id }) => - serviceFlow.getTemplate({ id }).catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) application template`)) - }), - [dispatch] - ) - - const getApplicationsTemplates = useCallback( - ({ end, start } = { end: -1, start: -1 }) => - serviceFlow - .getTemplates({ filter, end, start }) - .then(doc => { - dispatch(setApplicationsTemplates(doc)) - return doc - }) - .catch(err => { - dispatch(enqueueError(err ?? 'Error GET applications templates')) - }), - [dispatch, filter, applicationsTemplates] - ) - - const createApplicationTemplate = useCallback( - ({ data }) => - serviceFlow - .createTemplate({ data }) - .then(doc => { - dispatch( - setApplicationsTemplates( - filterBy([doc].concat(applicationsTemplates), 'ID') - ) - ) - dispatch(enqueueSuccess(`Template created - ID: ${doc.ID}`)) - return doc - }) - .catch(err => { - dispatch( - enqueueError(err?.message ?? 'Error CREATE application template') - ) - }), - [dispatch, applicationsTemplates] - ) - - const updateApplicationTemplate = useCallback( - ({ id, data }) => - serviceFlow - .updateTemplate({ id, data }) - .then(doc => { - dispatch( - setApplicationsTemplates( - filterBy([doc].concat(applicationsTemplates), 'ID') - ) - ) - dispatch(enqueueSuccess(`Template updated - ID: ${doc.ID}`)) - - return doc - }) - .catch(err => { - dispatch( - enqueueError(err?.message ?? 'Error UPDATE application template') - ) - }), - [dispatch] - ) - - const instantiateApplicationTemplate = useCallback( - ({ id, data, instances }) => { - const promises = [...new Array(instances)] - .map(() => serviceFlow.instantiateTemplate({ id, data })) - - return Promise.all(promises) - .then(docs => { - dispatch(enqueueSuccess(`Template instantiate - x${instances}`)) - return docs - }) - .catch(err => { - dispatch( - enqueueError(err?.message ?? 'Error INSTANTIATE application template') - ) - }) - } - , [dispatch] - ) - - return { - applications, - getApplication, - getApplications, - - applicationsTemplates, - getApplicationTemplate, - getApplicationsTemplates, - createApplicationTemplate, - updateApplicationTemplate, - instantiateApplicationTemplate - } -} diff --git a/src/fireedge/src/client/hooks/useAuth.js b/src/fireedge/src/client/hooks/useAuth.js deleted file mode 100644 index 7b0d6e40be..0000000000 --- a/src/fireedge/src/client/hooks/useAuth.js +++ /dev/null @@ -1,147 +0,0 @@ -import { useCallback, useEffect } from 'react' -import { useSelector, useDispatch, shallowEqual } from 'react-redux' - -import { T, JWT_NAME, FILTER_POOL, ONEADMIN_ID, TIME_HIDE_LOGO } from 'client/constants' -import { storage, findStorageData, removeStoreData, fakeDelay } from 'client/utils' - -import * as serviceAuth from 'client/services/auth' -import * as serviceOne from 'client/services/one' - -import { - startAuth, - selectFilterGroup, - updateSetting, - successAuth, - failureAuth, - logout as logoutRequest -} from 'client/actions/user' -import { setGroups } from 'client/actions/pool' -import { enqueueError, enqueueSuccess, closeSnackbar } from 'client/actions/general' - -const useAuth = () => { - const { - jwt, - error, - isLoginInProcess, - isLoading, - firstRender, - filterPool, - user: authUser, - settings - } = useSelector(state => state?.Authenticated, shallowEqual) - const dispatch = useDispatch() - - useEffect(() => { - const tokenStorage = findStorageData(JWT_NAME) - - if ((tokenStorage && jwt && tokenStorage !== jwt) || firstRender) { - fakeDelay(TIME_HIDE_LOGO).then(() => dispatch(successAuth({ jwt: tokenStorage }))) - } - }, [jwt, firstRender]) - - const login = useCallback( - ({ remember, ...user }) => { - dispatch(startAuth()) - - return serviceAuth - .login(user) - .then(data => { - const { id, token } = data - dispatch(successAuth()) - dispatch(closeSnackbar()) - - if (token) { - storage(JWT_NAME, token, remember) - dispatch( - successAuth({ - jwt: token, - user: { ID: id }, - isLoginInProcess: ONEADMIN_ID !== id // is not oneadmin - }) - ) - } - - return data - }) - .catch(err => { - dispatch(failureAuth({ error: err })) - }) - }, - [dispatch, JWT_NAME] - ) - - const logout = useCallback(() => { - removeStoreData([JWT_NAME]) - dispatch(logoutRequest()) - }, [dispatch, JWT_NAME]) - - const getAuthInfo = useCallback(() => { - dispatch(startAuth()) - - return serviceAuth - .getUser() - .then(user => dispatch(successAuth({ user }))) - .then(() => dispatch(updateSetting)) - .then(() => serviceOne.getGroups()) - .then(groups => dispatch(setGroups(groups))) - .catch(() => { - dispatch(logoutRequest()) - dispatch(failureAuth({ error: T.SessionExpired })) - }) - }, [dispatch, JWT_NAME, authUser]) - - const setPrimaryGroup = useCallback( - ({ group }) => { - if (group === FILTER_POOL.ALL_RESOURCES) { - dispatch(selectFilterGroup({ filterPool: FILTER_POOL.ALL_RESOURCES })) - } else { - dispatch(startAuth()) - - serviceOne - .changeGroup({ id: authUser.ID, group }) - .then(() => - dispatch( - selectFilterGroup({ - filterPool: FILTER_POOL.PRIMARY_GROUP_RESOURCES - }) - ) - ) - .then(getAuthInfo) - .catch(err => dispatch(failureAuth({ error: err }))) - } - }, - [dispatch, authUser] - ) - - const updateUser = useCallback( - ({ template }) => - serviceOne - .updateUser({ id: authUser.ID, template }) - .then(() => dispatch(enqueueSuccess(`User updated - ID: ${authUser.ID}`))) - .then(getAuthInfo) - .catch(err => { - dispatch(enqueueError(err ?? 'Error update user')) - throw err - }) - , [dispatch, authUser] - ) - - return { - login, - logout, - getAuthInfo, - setPrimaryGroup, - updateUser, - isLogged: !!jwt, - authUser, - settings, - isOneAdmin: authUser?.ID === ONEADMIN_ID, - isLoginInProcess, - isLoading, - firstRender, - error, - filterPool - } -} - -export default useAuth diff --git a/src/fireedge/src/client/hooks/useFetch.js b/src/fireedge/src/client/hooks/useFetch.js index cbb2c9b5ad..5a4c3f2763 100644 --- a/src/fireedge/src/client/hooks/useFetch.js +++ b/src/fireedge/src/client/hooks/useFetch.js @@ -13,7 +13,7 @@ const useRequest = request => { const doFetch = useCallback( debounce(payload => - request({ ...payload }) + request(payload) .then(response => { if (isMounted.current) { if (response !== undefined) { diff --git a/src/fireedge/src/client/hooks/useOpennebula.js b/src/fireedge/src/client/hooks/useOpennebula.js deleted file mode 100644 index 720b4f978f..0000000000 --- a/src/fireedge/src/client/hooks/useOpennebula.js +++ /dev/null @@ -1,235 +0,0 @@ -import { useCallback } from 'react' -import { useSelector, useDispatch, shallowEqual } from 'react-redux' - -import actions, { - startOneRequest, - failureOneRequest -} from 'client/actions/pool' - -import { filterBy } from 'client/utils' -import * as serviceOne from 'client/services/one' - -export default function useOpennebula () { - const dispatch = useDispatch() - const { - apps, - clusters, - datastores, - hosts, - groups, - users, - templates, - vNetworks, - vNetworksTemplates, - filterPool: filter - } = useSelector( - state => ({ - ...state?.Opennebula, - filterPool: state?.Authenticated?.filterPool - }), - shallowEqual - ) - - // -------------------------------------------- - // GROUPS REQUESTS - // -------------------------------------------- - - const getGroups = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getGroups({ filter }) - .then(data => dispatch(actions.setGroups(data))) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - // -------------------------------------------- - // USERS REQUESTS - // -------------------------------------------- - - const getUsers = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getUsers({ filter }) - .then(data => dispatch(actions.setUsers(data))) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - // -------------------------------------------- - // VIRTUAL NETWORKS REQUESTS - // -------------------------------------------- - - const getVNetworks = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getVNetworks({ filter }) - .then(data => dispatch(actions.setVNetworks(data))) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - const getVNetwork = useCallback( - ({ id }) => { - dispatch(startOneRequest()) - return serviceOne - .getVNetwork({ filter, id }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter] - ) - - // -------------------------------------------- - // VIRTUAL NETWORKS TEMPLATES REQUESTS - // -------------------------------------------- - - const getVNetworksTemplates = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getVNetworksTemplates({ filter }) - .then(data => dispatch(actions.setVNetworksTemplates(data))) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - // -------------------------------------------- - // VM TEMPLATES REQUESTS - // -------------------------------------------- - - const getTemplates = useCallback( - ({ end, start } = { end: -1, start: -1 }) => { - dispatch(startOneRequest()) - return serviceOne - .getTemplates({ filter, end, start }) - .then(data => - dispatch(actions.setTemplates(filterBy(templates.concat(data), 'ID'))) - ) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter, templates] - ) - - const getTemplate = useCallback( - ({ id }) => { - dispatch(startOneRequest()) - return serviceOne - .getTemplate({ filter, id }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter] - ) - - // -------------------------------------------- - // MARKETAPPS REQUESTS - // -------------------------------------------- - - const getMarketApps = useCallback( - ({ end, start } = { end: -1, start: -1 }) => { - dispatch(startOneRequest()) - return serviceOne - .getMarketApps({ filter, end, start }) - .then(data => - dispatch(actions.setApps(filterBy(apps.concat(data), 'ID'))) - ) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter, apps] - ) - - // -------------------------------------------- - // CLUSTERS REQUESTS - // -------------------------------------------- - - const getClusters = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getClusters({ filter }) - .then(data => { - dispatch(actions.setClusters(data)) - return data - }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - const getCluster = useCallback( - ({ id }) => { - dispatch(startOneRequest()) - return serviceOne - .getCluster({ filter, id }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter] - ) - - // -------------------------------------------- - // DATASTORES REQUESTS - // -------------------------------------------- - - const getDatastores = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getDatastores({ filter }) - .then(data => { - dispatch(actions.setDatastores(data)) - return data - }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - const getDatastore = useCallback( - ({ id }) => { - dispatch(startOneRequest()) - return serviceOne - .getDatastore({ filter, id }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter] - ) - - // -------------------------------------------- - // DATASTORES REQUESTS - // -------------------------------------------- - - const getHosts = useCallback(() => { - dispatch(startOneRequest()) - return serviceOne - .getHosts({ filter }) - .then(data => { - dispatch(actions.setHosts(data)) - return data - }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, [dispatch, filter]) - - const getHost = useCallback( - ({ id }) => { - dispatch(startOneRequest()) - return serviceOne - .getHost({ filter, id }) - .catch(err => dispatch(failureOneRequest({ error: err }))) - }, - [dispatch, filter] - ) - - return { - groups, - getGroups, - users, - getUsers, - vNetworks, - getVNetworks, - getVNetwork, - vNetworksTemplates, - getVNetworksTemplates, - templates, - getTemplates, - getTemplate, - apps, - getMarketApps, - clusters, - getClusters, - getCluster, - datastores, - getDatastores, - getDatastore, - hosts, - getHosts, - getHost - } -} diff --git a/src/fireedge/src/client/hooks/useProvision.js b/src/fireedge/src/client/hooks/useProvision.js deleted file mode 100644 index 0557c1731f..0000000000 --- a/src/fireedge/src/client/hooks/useProvision.js +++ /dev/null @@ -1,285 +0,0 @@ -import { useCallback } from 'react' -import { useSelector, useDispatch, shallowEqual } from 'react-redux' - -import { - setProviders, - setProvisions, - setProvisionsTemplates, - successOneRequest -} from 'client/actions/pool' - -import { enqueueError, enqueueSuccess, enqueueInfo } from 'client/actions/general' - -import * as serviceProvision from 'client/services/provision' - -export default function useProvision () { - const dispatch = useDispatch() - const { - providers, - provisionsTemplates, - provisions - } = useSelector(({ Opennebula }) => Opennebula, shallowEqual) - - // -------------------------------------------- - // ALL PROVISION TEMPLATES REQUESTS - // -------------------------------------------- - - const getProvisionsTemplates = useCallback( - () => - serviceProvision - .getProvisionsTemplates({}) - .then(doc => { - dispatch(setProvisionsTemplates(doc)) - return doc - }) - .catch(err => { - dispatch(enqueueError(err ?? 'Error GET templates')) - throw err - }) - , [dispatch] - ) - - const getProviderTemplateByDir = useCallback( - ({ provision, provider, name } = {}) => - provisionsTemplates - ?.[provision] - ?.providers - ?.[provider] - ?.find(provider => provider.name === name) - , [provisionsTemplates] - ) - - const getProvisionTemplateByDir = useCallback( - ({ provision, provider, name } = {}) => - provisionsTemplates - ?.[provision] - ?.provisions - ?.[provider] - ?.find(provisionTemplate => provisionTemplate.name === name) - , [provisionsTemplates] - ) - - // -------------------------------------------- - // PROVIDERS REQUESTS - // -------------------------------------------- - - const getProvider = useCallback( - ({ id } = {}) => - serviceProvision - .getProvider({ id }) - .then(doc => { - dispatch(successOneRequest()) - return doc - }) - .catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) provider`)) - throw err - }) - , [dispatch] - ) - - const getProviders = useCallback( - ({ end, start } = { end: -1, start: -1 }) => - serviceProvision - .getProviders({ end, start }) - .then(doc => { - dispatch(setProviders(doc)) - return doc - }) - .catch(err => { - dispatch(enqueueError(err ?? 'Error GET providers')) - return err - }) - , [dispatch] - ) - - const createProvider = useCallback( - ({ data }) => - serviceProvision - .createProvider({ data }) - .then(id => dispatch(enqueueSuccess(`Provider created - ID: ${id}`))) - .catch(err => dispatch(enqueueError(err ?? 'Error CREATE provider'))) - , [dispatch] - ) - - const updateProvider = useCallback( - ({ id, data }) => - serviceProvision - .updateProvider({ id, data }) - .then(() => dispatch(enqueueSuccess(`Provider updated - ID: ${id}`))) - .catch(err => dispatch(enqueueError(err ?? 'Error UPDATE provider'))) - , [dispatch] - ) - - const deleteProvider = useCallback( - ({ id }) => - serviceProvision - .deleteProvider({ id }) - .then(() => dispatch(enqueueSuccess(`Provider deleted - ID: ${id}`))) - .then(() => getProviders()) - .catch(err => dispatch(enqueueError(err ?? 'Error DELETE provider'))), - [dispatch] - ) - - const getProviderConnection = useCallback( - ({ id }) => - serviceProvision - .getProviderConnection({ id }) - .catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) provider connection`)) - throw err - }) - , [dispatch] - ) - - // -------------------------------------------- - // PROVISIONS REQUESTS - // -------------------------------------------- - - const getProvision = useCallback( - ({ id }) => - serviceProvision.getProvision({ id }).catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) provision`)) - }), - [dispatch] - ) - - const getProvisions = useCallback( - ({ end, start } = { end: -1, start: -1 }) => - serviceProvision - .getProvisions({ end, start }) - .then(doc => { - dispatch(setProvisions(doc)) - return doc - }) - .catch(err => { - dispatch(enqueueError(err?.message ?? 'Error GET provisions')) - return err - }), - [dispatch] - ) - - const createProvision = useCallback( - ({ data }) => - serviceProvision - .createProvision({ data }) - .then(doc => { - dispatch(enqueueInfo('Creating provision')) - return doc.data - }) - .catch(err => { - dispatch(enqueueError(err?.message ?? 'Error creating provision')) - }), - [dispatch] - ) - - const configureProvision = useCallback( - ({ id }) => - serviceProvision - .configureProvision({ id }) - .then(doc => { - dispatch(enqueueInfo(`Configuring provision - ID: ${id}`)) - return doc - }) - .catch(err => dispatch(enqueueError(err ?? 'Error configuring provision'))) - , [dispatch] - ) - - const deleteProvision = useCallback( - ({ id }) => - serviceProvision - .deleteProvision({ id }) - .then(() => dispatch(enqueueInfo(`Deleting provision - ID: ${id}`))) - .then(() => getProvisions()) - .catch(err => dispatch(enqueueError(err ?? 'Error deleting provision'))) - , [dispatch] - ) - - const getProvisionLog = useCallback( - ({ id }) => - serviceProvision.getProvisionLog({ id }).catch(err => { - dispatch(enqueueError(err ?? `Error GET (${id}) provision log`)) - }), - [dispatch] - ) - - // -------------------------------------------- - // INFRASTRUCTURES REQUESTS - // -------------------------------------------- - - const deleteDatastore = useCallback( - ({ id }) => - serviceProvision - .deleteDatastore({ id }) - .then(doc => { - dispatch(enqueueSuccess(`Datastore deleted - ID: ${id}`)) - return doc - }) - .catch(err => dispatch(enqueueError(err ?? 'Error DELETE datastore'))) - , [dispatch] - ) - - const deleteVNetwork = useCallback( - ({ id }) => - serviceProvision - .deleteVNetwork({ id }) - .then(doc => { - dispatch(enqueueSuccess(`VNetwork deleted - ID: ${id}`)) - return doc - }) - .catch(err => dispatch(enqueueError(err ?? 'Error DELETE network'))) - , [dispatch] - ) - - const deleteHost = useCallback( - ({ id }) => - serviceProvision - .deleteHost({ id }) - .then(doc => { - dispatch(enqueueSuccess(`Host deleted - ID: ${id}`)) - return doc - }) - .catch(err => dispatch(enqueueError(err ?? 'Error DELETE host'))) - , [dispatch] - ) - - const configureHost = useCallback( - ({ id }) => - serviceProvision - .configureHost({ id }) - .then(doc => { - dispatch(enqueueInfo(`Configuring host - ID: ${id}`)) - return doc - }) - .catch(err => dispatch(enqueueError(err ?? 'Error CONFIGURE host'))) - , [dispatch] - ) - - return { - getProvisionsTemplates, - getProviderTemplateByDir, - getProvisionTemplateByDir, - provisionsTemplates, - - providers, - getProvider, - getProviders, - createProvider, - updateProvider, - deleteProvider, - getProviderConnection, - - provisions, - getProvision, - getProvisions, - createProvision, - configureProvision, - deleteProvision, - getProvisionLog, - - deleteDatastore, - deleteVNetwork, - deleteHost, - configureHost - } -} diff --git a/src/fireedge/src/client/providers/muiProvider.js b/src/fireedge/src/client/providers/muiProvider.js index 219176b454..f673e474ae 100644 --- a/src/fireedge/src/client/providers/muiProvider.js +++ b/src/fireedge/src/client/providers/muiProvider.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import { CssBaseline, ThemeProvider, StylesProvider, useMediaQuery } from '@material-ui/core' import { createTheme, generateClassName } from 'client/theme' -import { useAuth } from 'client/hooks' +import { useAuth } from 'client/features/Auth' import { SCHEMES } from 'client/constants' const { DARK, LIGHT, SYSTEM } = SCHEMES diff --git a/src/fireedge/src/client/providers/socketProvider.js b/src/fireedge/src/client/providers/socketProvider.js index d4593be78f..ed3bd81dae 100644 --- a/src/fireedge/src/client/providers/socketProvider.js +++ b/src/fireedge/src/client/providers/socketProvider.js @@ -1,8 +1,11 @@ import React, { createContext, useEffect, useState } from 'react' -import { useSelector } from 'react-redux' import PropTypes from 'prop-types' +import { useSelector } from 'react-redux' -import * as serviceSocket from 'client/services/socket' +import io from 'socket.io-client' +import { WEBSOCKET_URL } from 'client/constants' + +const websocket = query => io({ path: WEBSOCKET_URL, query }) const CONNECT = 'connect' const DISCONNECT = 'disconnect' @@ -13,14 +16,14 @@ const SocketProvider = ({ children }) => { const [socket, setSocket] = useState({}) const [isConnected, setConnected] = useState(false) const { jwt, zone } = useSelector(state => ({ - zone: state?.General?.zone, - jwt: state?.Authenticated?.jwt + zone: state?.general?.zone, + jwt: state?.auth?.jwt })) useEffect(() => { if (!jwt) return - const client = serviceSocket.websocket({ token: jwt, zone }) + const client = websocket({ token: jwt, zone }) client.on(CONNECT, () => setConnected(true)) client.on(DISCONNECT, () => setConnected(false)) setSocket(client) diff --git a/src/fireedge/src/client/provision.js b/src/fireedge/src/client/provision.js index 6c41a559b6..22aca87b68 100644 --- a/src/fireedge/src/client/provision.js +++ b/src/fireedge/src/client/provision.js @@ -16,10 +16,12 @@ import * as React from 'react' import { hydrate, render } from 'react-dom' -import store from 'client/store' +import { createStore } from 'client/store' import App from 'client/apps/provision' -const mainDiv = document.getElementById('root') -const renderMethod = mainDiv && mainDiv.innerHTML !== '' ? hydrate : render +const { store } = createStore({ initState: window.REDUX_DATA }) + +const rootHTML = document.getElementById('root')?.innerHTML +const renderMethod = rootHTML !== '' ? hydrate : render renderMethod(, document.getElementById('root')) diff --git a/src/fireedge/src/client/router/common.js b/src/fireedge/src/client/router/common.js new file mode 100644 index 0000000000..b5bdc7997f --- /dev/null +++ b/src/fireedge/src/client/router/common.js @@ -0,0 +1,17 @@ +import loadable from '@loadable/component' + +const Login = loadable(() => import('client/containers/Login'), { ssr: false }) + +export const PATH = { + LOGIN: '/' +} + +export const ENDPOINTS = [ + { + label: 'Login', + path: PATH.LOGIN, + Component: Login + } +] + +export default { PATH, ENDPOINTS } diff --git a/src/fireedge/src/client/router/dev.js b/src/fireedge/src/client/router/dev.js index 8717f509a1..75a3a49373 100644 --- a/src/fireedge/src/client/router/dev.js +++ b/src/fireedge/src/client/router/dev.js @@ -1,9 +1,11 @@ -import { Ballot as BallotIcon } from '@material-ui/icons' +import { Ballot as BallotIcon, Computer as VmIcon } from '@material-ui/icons' +import loadable from '@loadable/component' -import TestApi from 'client/containers/TestApi' -import Webconsole from 'client/containers/Webconsole' +const TestApi = loadable(() => import('client/containers/TestApi'), { ssr: false }) +const WebConsole = loadable(() => import('client/containers/WebConsole'), { ssr: false }) export const PATH = { + VIRTUAL_MACHINES: '/vms', TEST_API: '/test-api', WEB_CONSOLE: '/webconsole' } @@ -12,20 +14,18 @@ export const ENDPOINTS = [ { label: 'Test API', path: PATH.TEST_API, - authenticated: true, devMode: true, sidebar: true, icon: BallotIcon, Component: TestApi }, { - label: 'Webconsole', + label: 'Web Console', path: PATH.WEB_CONSOLE, - authenticated: true, devMode: true, sidebar: true, icon: BallotIcon, - Component: Webconsole + Component: WebConsole } ] diff --git a/src/fireedge/src/client/router/index.js b/src/fireedge/src/client/router/index.js index a50ca1c7d6..c7f7879f3c 100644 --- a/src/fireedge/src/client/router/index.js +++ b/src/fireedge/src/client/router/index.js @@ -20,68 +20,59 @@ import { Redirect, Route, Switch } from 'react-router-dom' import { TransitionGroup } from 'react-transition-group' import devRoutes from 'client/router/dev' -import { InternalLayout, MainLayout } from 'client/components/HOC' +import commonRoutes from 'client/router/common' -const Router = React.memo(({ title, routes }) => { - const { ENDPOINTS, PATH } = React.useMemo(() => ({ - ...routes, - ...(process?.env?.NODE_ENV === 'development' && - { - PATH: { ...routes.PATH, ...devRoutes.PATH }, - ENDPOINTS: routes.ENDPOINTS.concat(devRoutes.ENDPOINTS) - } - ) - }), []) +import { ProtectedRoute, NoAuthRoute } from 'client/components/Route' +import { InternalLayout } from 'client/components/HOC' +import Sidebar from 'client/components/Sidebar' +import Notifier from 'client/components/Notifier' +import { isDevelopment } from 'client/utils' + +const Router = ({ routes }) => { + const ENDPOINTS = React.useMemo(() => [ + ...routes.ENDPOINTS, + ...(isDevelopment() ? devRoutes.ENDPOINTS : []) + ], []) return ( - - - - {ENDPOINTS?.map( - ({ path = '', authenticated = true, Component, ...route }, index) => - ( - authenticated ? ( - - - - ) : - )} - {...route} - /> - )} - } /> - - - + + + {ENDPOINTS?.map(({ Component, ...rest }, index, endpoints) => + + + + + + + + )} + {commonRoutes.ENDPOINTS?.map(({ Component, ...rest }, index) => + + + + )} + } /> + + ) -}) +} Router.propTypes = { - title: PropTypes.string, routes: PropTypes.shape({ PATH: PropTypes.object, ENDPOINTS: PropTypes.arrayOf( PropTypes.shape({ + Component: PropTypes.object.isRequired, + icon: PropTypes.object, label: PropTypes.string.isRequired, path: PropTypes.string.isRequired, - authenticated: PropTypes.bool.isRequired, - sidebar: PropTypes.bool, - icon: PropTypes.object, - Component: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.object - ]).isRequired + sidebar: PropTypes.bool }) ) }) } Router.defaultProps = { - title: undefined, routes: { PATH: {}, ENDPOINTS: [] diff --git a/src/fireedge/src/client/services/auth.js b/src/fireedge/src/client/services/auth.js deleted file mode 100644 index df4e3a37de..0000000000 --- a/src/fireedge/src/client/services/auth.js +++ /dev/null @@ -1,38 +0,0 @@ -import { httpCodes } from 'server/utils/constants' -import { JWT_NAME } from 'client/constants' -import { requestData, removeStoreData } from 'client/utils' - -export const login = user => - requestData('/api/auth/', { - data: user, - method: 'POST', - authenticate: false, - error: err => { - removeStoreData(JWT_NAME) - return err?.message - } - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data - }) - -export const getUser = () => - requestData('/api/user/info', { - error: err => { - removeStoreData(JWT_NAME) - return err?.message - } - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.USER ?? {} - }) - -export default { - login, - getUser -} diff --git a/src/fireedge/src/client/services/flow/application.js b/src/fireedge/src/client/services/flow/application.js deleted file mode 100644 index cccf5760ea..0000000000 --- a/src/fireedge/src/client/services/flow/application.js +++ /dev/null @@ -1,101 +0,0 @@ -import httpCodes from 'server/utils/constants/http-codes' -import { httpMethod } from 'server/utils/constants/defaults' -import { - SERVICE, - SERVICE_TEMPLATE -} from 'server/routes/api/oneflow/string-routes' - -import { requestData } from 'client/utils' - -const { GET, POST, PUT } = httpMethod - -export const getApplication = ({ id }) => - requestData(`/api/${SERVICE}/list/${id}`, { - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.DOCUMENT ?? {} - }) - -export const getApplications = ({ filter }) => - requestData(`/api/${SERVICE}/list`, { - data: { filter }, - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.DOCUMENT_POOL?.DOCUMENT ?? []].flat() - }) - -export const getTemplate = ({ id }) => - requestData(`/api/${SERVICE_TEMPLATE}/list/${id}`, { - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.DOCUMENT ?? {} - }) - -export const getTemplates = ({ filter }) => - requestData(`/api/${SERVICE_TEMPLATE}/list`, { - data: { filter }, - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.DOCUMENT_POOL?.DOCUMENT ?? []].flat() - }) - -export const createTemplate = ({ data = {} }) => - requestData(`/api/${SERVICE_TEMPLATE}/create`, { - data, - method: POST - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - if (!res?.data?.DOCUMENT?.ID) throw new Error('Error') - - return res?.data?.DOCUMENT ?? {} - }) - -export const updateTemplate = ({ id, data = {} }) => - requestData(`/api/${SERVICE_TEMPLATE}/update/${id}`, { - data, - method: PUT - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - if (!res?.data?.DOCUMENT?.ID) throw new Error('Error') - - return res?.data?.DOCUMENT ?? {} - }) - -export const instantiateTemplate = ({ id, data = {} }) => - requestData(`/api/${SERVICE_TEMPLATE}/action/${id}`, { - data: { - action: { - perform: 'instantiate', - params: { merge_template: data } - } - }, - method: POST - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - if (!res?.data?.DOCUMENT?.ID) throw new Error('Error') - - return res?.data?.DOCUMENT ?? {} - }) - -export default { - getApplication, - getApplications, - - getTemplate, - getTemplates, - createTemplate, - updateTemplate, - instantiateTemplate -} diff --git a/src/fireedge/src/client/services/flow/index.js b/src/fireedge/src/client/services/flow/index.js deleted file mode 100644 index 8f634f69ff..0000000000 --- a/src/fireedge/src/client/services/flow/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from 'client/services/flow/application' diff --git a/src/fireedge/src/client/services/one/cluster.js b/src/fireedge/src/client/services/one/cluster.js deleted file mode 100644 index 5303b8c4d7..0000000000 --- a/src/fireedge/src/client/services/one/cluster.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/cluster' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getCluster = ({ filter, id }) => { - const name = Actions.CLUSTER_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.CLUSTER ?? {} - }) -} diff --git a/src/fireedge/src/client/services/one/datastore.js b/src/fireedge/src/client/services/one/datastore.js deleted file mode 100644 index 4d0bab0eb0..0000000000 --- a/src/fireedge/src/client/services/one/datastore.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/datastore' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getDatastore = ({ filter, id }) => { - const name = Actions.DATASTORE_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.DATASTORE ?? {} - }) -} diff --git a/src/fireedge/src/client/services/one/host.js b/src/fireedge/src/client/services/one/host.js deleted file mode 100644 index 71d16c0c22..0000000000 --- a/src/fireedge/src/client/services/one/host.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/host' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getHost = ({ filter, id }) => { - const name = Actions.HOST_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.HOST ?? {} - }) -} diff --git a/src/fireedge/src/client/services/one/index.js b/src/fireedge/src/client/services/one/index.js deleted file mode 100644 index 5a147edb29..0000000000 --- a/src/fireedge/src/client/services/one/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export * from 'client/services/one/user' -export * from 'client/services/one/cluster' -export * from 'client/services/one/datastore' -export * from 'client/services/one/host' -export * from 'client/services/one/vmTemplate' -export * from 'client/services/one/vNetwork' -export * from 'client/services/one/vNetTemplate' -export * from 'client/services/one/pool' diff --git a/src/fireedge/src/client/services/one/pool.js b/src/fireedge/src/client/services/one/pool.js deleted file mode 100644 index d8ac4f5913..0000000000 --- a/src/fireedge/src/client/services/one/pool.js +++ /dev/null @@ -1,149 +0,0 @@ -import Cluster from 'server/utils/constants/commands/cluster' -import Datastore from 'server/utils/constants/commands/datastore' -import Host from 'server/utils/constants/commands/host' -import Group from 'server/utils/constants/commands/group' -import MarketApp from 'server/utils/constants/commands/marketapp' -import Template from 'server/utils/constants/commands/template' -import User from 'server/utils/constants/commands/user' -import VNet from 'server/utils/constants/commands/vn' -import VNetTemplate from 'server/utils/constants/commands/vntemplate' - -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getUsers = ({ filter } = {}) => { - const name = User.Actions.USER_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...User.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.USER_POOL?.USER ?? []].flat() - }) -} - -export const getGroups = ({ filter } = {}) => { - const name = Group.Actions.GROUP_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...Group.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.GROUP_POOL?.GROUP ?? []].flat() - }) -} - -export const getVNetworks = ({ filter } = {}) => { - const name = VNet.Actions.VN_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...VNet.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.VNET_POOL?.VNET ?? []].flat() - }) -} - -export const getVNetworksTemplates = ({ filter } = {}) => { - const name = VNetTemplate.Actions.VNTEMPLATE_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...VNetTemplate.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.VNTEMPLATE_POOL?.VNTEMPLATE ?? []].flat() - }) -} - -export const getTemplates = ({ filter, end, start } = {}) => { - const name = Template.Actions.TEMPLATE_POOL_INFO - const { url, options } = requestParams( - { filter, end, start }, - { name, ...Template.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.VMTEMPLATE_POOL?.VMTEMPLATE ?? []].flat() - }) -} - -export const getMarketApps = ({ filter, end, start } = {}) => { - const name = MarketApp.Actions.MARKETAPP_POOL_INFO - const { url, options } = requestParams( - { filter, end, start }, - { name, ...MarketApp.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.MARKETPLACEAPP_POOL?.MARKETPLACEAPP ?? []].flat() - }) -} - -export const getClusters = ({ filter } = {}) => { - const name = Cluster.Actions.CLUSTER_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...Cluster.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.CLUSTER_POOL?.CLUSTER ?? []].flat() - }) -} - -export const getDatastores = ({ filter } = {}) => { - const name = Datastore.Actions.DATASTORE_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...Datastore.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.DATASTORE_POOL?.DATASTORE ?? []].flat() - }) -} - -export const getHosts = ({ filter } = {}) => { - const name = Host.Actions.HOST_POOL_INFO - const { url, options } = requestParams( - { filter }, - { name, ...Host.Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.HOST_POOL?.HOST ?? []].flat() - }) -} - -export default { - getUsers, - getGroups, - getVNetworks, - getVNetworksTemplates, - getTemplates, - getMarketApps, - getClusters, - getDatastores -} diff --git a/src/fireedge/src/client/services/one/user.js b/src/fireedge/src/client/services/one/user.js deleted file mode 100644 index 20793c667c..0000000000 --- a/src/fireedge/src/client/services/one/user.js +++ /dev/null @@ -1,43 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/user' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getUser = ({ filter, id }) => { - const name = Actions.USER_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.USER ?? {} - }) -} - -export const changeGroup = values => { - const name = Actions.USER_CHGRP - const { url, options } = requestParams(values, { name, ...Commands[name] }) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) -} - -export const updateUser = values => { - const name = Actions.USER_UPDATE - const { url, options } = requestParams(values, { name, ...Commands[name] }) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) -} - -export default { - changeGroup -} diff --git a/src/fireedge/src/client/services/one/vNetTemplate.js b/src/fireedge/src/client/services/one/vNetTemplate.js deleted file mode 100644 index 3f99778163..0000000000 --- a/src/fireedge/src/client/services/one/vNetTemplate.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/vntemplate' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getVNetworkTemplate = ({ filter, id }) => { - const name = Actions.VNTEMPLATE_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.VNTEMPLATE ?? {} - }) -} diff --git a/src/fireedge/src/client/services/one/vNetwork.js b/src/fireedge/src/client/services/one/vNetwork.js deleted file mode 100644 index 198aa3aad0..0000000000 --- a/src/fireedge/src/client/services/one/vNetwork.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/vn' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getVNetwork = ({ filter, id }) => { - const name = Actions.VN_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.VNET ?? {} - }) -} diff --git a/src/fireedge/src/client/services/one/vmTemplate.js b/src/fireedge/src/client/services/one/vmTemplate.js deleted file mode 100644 index 2c8ef5312d..0000000000 --- a/src/fireedge/src/client/services/one/vmTemplate.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Actions, Commands } from 'server/utils/constants/commands/template' -import httpCodes from 'server/utils/constants/http-codes' -import { requestData, requestParams } from 'client/utils' - -export const getTemplate = ({ filter, id }) => { - const name = Actions.TEMPLATE_INFO - const { url, options } = requestParams( - { filter, id }, - { name, ...Commands[name] } - ) - - return requestData(url, options).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.VMTEMPLATE ?? {} - }) -} diff --git a/src/fireedge/src/client/services/provision/index.js b/src/fireedge/src/client/services/provision/index.js deleted file mode 100644 index cdf81cd617..0000000000 --- a/src/fireedge/src/client/services/provision/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from 'client/services/provision/provider' -export * from 'client/services/provision/provision' diff --git a/src/fireedge/src/client/services/provision/provider.js b/src/fireedge/src/client/services/provision/provider.js deleted file mode 100644 index 21c9ce9525..0000000000 --- a/src/fireedge/src/client/services/provision/provider.js +++ /dev/null @@ -1,77 +0,0 @@ -import httpCodes from 'server/utils/constants/http-codes' -import { httpMethod } from 'server/utils/constants/defaults' -import { PROVIDER } from 'server/routes/api/provision/string-routes' -import { requestData } from 'client/utils' - -const { GET, POST, PUT, DELETE } = httpMethod - -export const getProvider = ({ id }) => - requestData(`/api/${PROVIDER}/list/${id}`, { - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.DOCUMENT ?? {} - }) - -export const getProviders = ({ filter }) => - requestData(`/api/${PROVIDER}/list`, { - data: { filter }, - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.DOCUMENT_POOL?.DOCUMENT ?? []].flat() - }) - -export const createProvider = ({ data = {} }) => - requestData(`/api/${PROVIDER}/create`, { - data, - method: POST, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const updateProvider = ({ id, data = {} }) => - requestData(`/api/${PROVIDER}/update/${id}`, { - data, - method: PUT, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const deleteProvider = ({ id }) => - requestData(`/api/${PROVIDER}/delete/${id}`, { - method: DELETE, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const getProviderConnection = ({ id }) => - requestData(`/api/${PROVIDER}/connection/${id}`, { - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export default { - getProvider, - getProviders, - createProvider, - updateProvider, - deleteProvider, - getProviderConnection -} diff --git a/src/fireedge/src/client/services/provision/provision.js b/src/fireedge/src/client/services/provision/provision.js deleted file mode 100644 index 6f24bfa772..0000000000 --- a/src/fireedge/src/client/services/provision/provision.js +++ /dev/null @@ -1,164 +0,0 @@ -import httpCodes from 'server/utils/constants/http-codes' -import { httpMethod } from 'server/utils/constants/defaults' -import { PROVISION } from 'server/routes/api/provision/string-routes' -import { requestData } from 'client/utils' - -const { GET, POST, PUT, DELETE } = httpMethod - -// -------------------------------------------- -// ALL PROVISION TEMPLATES REQUESTS -// -------------------------------------------- - -export const getProvisionsTemplates = ({ filter }) => - requestData(`/api/${PROVISION}/defaults`, { - data: { filter }, - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? [] - }) - -export const createProvisionTemplate = ({ data = {} }) => - Promise.resolve().then(res => res?.data?.DOCUMENT ?? {}) - -// -------------------------------------------- -// PROVISIONS REQUESTS -// -------------------------------------------- - -export const getProvision = ({ id }) => - requestData(`/api/${PROVISION}/list/${id}`, { - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data?.DOCUMENT ?? {} - }) - -export const getProvisions = ({ filter }) => - requestData(`/api/${PROVISION}/list`, { - data: { filter }, - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return [res?.data?.DOCUMENT_POOL?.DOCUMENT ?? []].flat() - }) - -export const createProvision = ({ data = {} }) => - requestData(`/api/${PROVISION}/create`, { - data, - method: POST, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data ?? {} - }) - -export const configureProvision = ({ id }) => - requestData(`/api/${PROVISION}/configure/${id}`, { - method: PUT, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data ?? {} - }) - -export const deleteProvision = ({ id }) => - requestData(`/api/${PROVISION}/delete/${id}`, { - method: DELETE, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data ?? {} - }) - -export const getProvisionLog = ({ id }) => - requestData(`/api/${PROVISION}/log/${id}`, { - method: GET, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data ?? [] - }) - -// -------------------------------------------- -// INFRASTRUCTURES REQUESTS -// -------------------------------------------- - -export const deleteDatastore = ({ id }) => - requestData(`/api/${PROVISION}/datastore/${id}`, { - method: DELETE, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const deleteVNetwork = ({ id }) => - requestData(`/api/${PROVISION}/network/${id}`, { - method: DELETE, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const deleteHost = ({ id }) => - requestData(`/api/${PROVISION}/host/${id}`, { - method: DELETE, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) throw res - - return res?.data ?? {} - }) - -export const configureHost = ({ id }) => - requestData(`/api/${PROVISION}/host/${id}`, { - method: PUT, - error: err => err?.message - }).then(res => { - if (!res?.id || res?.id !== httpCodes.ok.id) { - if (res?.id === httpCodes.accepted.id) return res - throw res - } - - return res?.data ?? {} - }) - -export default { - getProvisionsTemplates, - - getProvision, - getProvisions, - createProvision, - deleteProvision, - getProvisionLog, - - deleteDatastore, - deleteVNetwork, - deleteHost, - configureHost -} diff --git a/src/fireedge/src/client/services/socket.js b/src/fireedge/src/client/services/socket.js deleted file mode 100644 index 6db93053de..0000000000 --- a/src/fireedge/src/client/services/socket.js +++ /dev/null @@ -1,9 +0,0 @@ -import io from 'socket.io-client' -import { WEBSOCKET_URL } from 'client/constants' - -export const websocket = query => io({ - path: WEBSOCKET_URL, - query -}) - -export default { websocket } diff --git a/src/fireedge/src/client/store.js b/src/fireedge/src/client/store.js index a143d04e01..fd56ae3d28 100644 --- a/src/fireedge/src/client/store.js +++ b/src/fireedge/src/client/store.js @@ -1,25 +1,32 @@ -import root from 'window-or-global' -import { createStore, compose, applyMiddleware } from 'redux' +import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit' + import thunkMiddleware from 'redux-thunk' -import rootReducer from 'client/reducers' -const preloadedState = root.__PRELOADED_STATE__ +import * as General from 'client/features/General' +import * as Auth from 'client/features/Auth' +import * as One from 'client/features/One' -delete root.__PRELOADED_STATE__ +import { isDevelopment } from 'client/utils' -const composeEnhancer = - (root && root.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose +export const createStore = ({ initState = {}, services }) => { + const middleware = getDefaultMiddleware({ + immutableCheck: true, + serializableCheck: false, + thunk: false + }) -// The store now has the ability to accept thunk functions in `dispatch` -const store = createStore( - rootReducer(), - preloadedState, - composeEnhancer(applyMiddleware(thunkMiddleware)) -) + middleware.push(thunkMiddleware.withExtraArgument({ services })) -const element = document.getElementById('preloadState') -if (element) { - element.remove() + const store = configureStore({ + reducer: { + general: General.reducer, + auth: Auth.reducer, + one: One.reducer + }, + devTools: isDevelopment(), + middleware, + preloadedState: initState + }) + + return { store } } - -export default store diff --git a/src/fireedge/src/client/utils/environments.js b/src/fireedge/src/client/utils/environments.js new file mode 100644 index 0000000000..5bf69feb8a --- /dev/null +++ b/src/fireedge/src/client/utils/environments.js @@ -0,0 +1,14 @@ +const MODE = { + development: 'development', + production: 'production' +} + +const isBackend = () => typeof window === 'undefined' + +const isProduction = () => process.env.NODE_ENV === 'production' + +const isDevelopment = () => process.env.NODE_ENV === 'development' + +export default MODE[process.env.NODE_ENV] + +export { isProduction, isDevelopment, isBackend } diff --git a/src/fireedge/src/client/utils/index.js b/src/fireedge/src/client/utils/index.js index dc2423011f..f039f4ce4b 100644 --- a/src/fireedge/src/client/utils/index.js +++ b/src/fireedge/src/client/utils/index.js @@ -13,10 +13,11 @@ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ -export * from 'client/utils/utils' -export * from 'client/utils/request' +export * from 'client/utils/environments' export * from 'client/utils/helpers' -export * from 'client/utils/polyfills' -export * from 'client/utils/schema' export * from 'client/utils/merge' export * from 'client/utils/parser' +export * from 'client/utils/request' +export * from 'client/utils/rest' +export * from 'client/utils/schema' +export * from 'client/utils/storage' diff --git a/src/fireedge/src/client/utils/polyfills.js b/src/fireedge/src/client/utils/polyfills.js deleted file mode 100644 index 5ae136a8be..0000000000 --- a/src/fireedge/src/client/utils/polyfills.js +++ /dev/null @@ -1,2 +0,0 @@ -export const isInteger = value => - typeof value === 'number' && isFinite(value) && Math.floor(value) === value diff --git a/src/fireedge/src/client/utils/rest.js b/src/fireedge/src/client/utils/rest.js new file mode 100644 index 0000000000..e1e9238696 --- /dev/null +++ b/src/fireedge/src/client/utils/rest.js @@ -0,0 +1,93 @@ +import axios from 'axios' + +import { httpCodes } from 'server/utils/constants' +import { messageTerminal } from 'server/utils/general' + +import { findStorageData, isDevelopment } from 'client/utils' +import { JWT_NAME, APP_URL } from 'client/constants' + +const http = axios.create({ baseURL: APP_URL }) + +http.interceptors.request.use((config) => { + const token = findStorageData(JWT_NAME) + token && (config.headers.Authorization = `Bearer ${token}`) + + return { + ...config, + withCredentials: true, + validateStatus: status => + Object.values(httpCodes).some(({ id }) => id === status) + } +}) + +http.interceptors.response.use( + response => { + if (response?.data && response?.status < httpCodes.badRequest.id) { + return typeof response === 'string' + ? response.data.json() + : response.data + } + + const error = response?.data?.message ?? response?.statusText + + if (response.status === 401) { + const configErrorParser = { + color: 'red', + type: error, + message: 'Error request: %s' + } + + isDevelopment() && messageTerminal(configErrorParser) + } + + return Promise.reject(error) + }, + error => { + console.log('error interceptor', error) + return error + } +) + +export const RestClient = { + get: (url, options) => { + const headers = { + credentials: 'include' + } + + return http.get(url, { headers, ...options }) + }, + + post: (url, body, options) => { + const headers = { + 'Content-Type': 'application/json' + } + + if (options && typeof options.headers === 'object') { + Object.assign(headers, options.headers) + } + + return http.post(url, body, { headers }) + }, + + put: (url, body, options) => { + const headers = { + 'Content-Type': 'application/json' + } + + if (options && typeof options.headers === 'object') { + Object.assign(headers, options.headers) + } + + return http.put(url, body, { headers }) + }, + + delete: (url, options) => { + const headers = {} + + if (options && typeof options.headers === 'object') { + Object.assign(headers, options.headers) + } + + return http.delete(url, { headers }) + } +} diff --git a/src/fireedge/src/client/utils/storage.js b/src/fireedge/src/client/utils/storage.js new file mode 100644 index 0000000000..fd9cc41695 --- /dev/null +++ b/src/fireedge/src/client/utils/storage.js @@ -0,0 +1,41 @@ +/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ +/* not use this file except in compliance with the License. You may obtain */ +/* a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/* -------------------------------------------------------------------------- */ + +import root from 'window-or-global' + +export const storage = (name = '', data = '', keepData = false) => { + if (name && data) { + keepData + ? root?.localStorage?.setItem(name, data) + : root?.sessionStorage?.setItem(name, data) + } +} + +export const removeStoreData = (items = []) => { + const itemsToRemove = !Array.isArray(items) ? [items] : items + + itemsToRemove.forEach(item => { + root?.localStorage?.removeItem(item) + root?.sessionStorage?.removeItem(item) + }) +} + +export const findStorageData = (name = '') => { + if (name && root?.localStorage?.getItem(name)) { + return root.localStorage.getItem(name) + } else if (name && root?.sessionStorage?.getItem(name)) { + return root.sessionStorage.getItem(name) + } else return false +} diff --git a/src/fireedge/src/client/utils/utils.js b/src/fireedge/src/client/utils/utils.js deleted file mode 100644 index 36b45633cd..0000000000 --- a/src/fireedge/src/client/utils/utils.js +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -import axios from 'axios' -import root from 'window-or-global' - -import { JWT_NAME } from 'client/constants' -import { messageTerminal } from 'server/utils/general' -import { httpCodes } from 'server/utils/constants' -import { defaultAppName } from 'server/utils/constants/defaults' - -const defaultData = { - data: {}, - json: true, - baseURL: root?.location?.origin?.concat(`/${defaultAppName}`) ?? '', - method: 'GET', - authenticate: true, - onUploadProgress: null, - error: err => err -} - -export const storage = (name = '', data = '', keepData = false) => { - if (name && data) { - keepData - ? root?.localStorage?.setItem(name, data) - : root?.sessionStorage?.setItem(name, data) - } -} - -export const removeStoreData = (items = []) => { - const itemsToRemove = !Array.isArray(items) ? [items] : items - - itemsToRemove.forEach(item => { - root?.localStorage?.removeItem(item) - root?.sessionStorage?.removeItem(item) - }) -} - -export const findStorageData = (name = '') => { - if (name && root?.localStorage.getItem(name)) { - return root.localStorage.getItem(name) - } else if (name && root?.sessionStorage.getItem(name)) { - return root.sessionStorage.getItem(name) - } else return false -} - -export const requestData = (url = '', data = {}) => { - const params = { ...defaultData, ...data } - const config = { - url, - method: params.method, - baseURL: params.baseURL, - headers: {}, - validateStatus: status => - Object.values(httpCodes).some(({ id }) => id === status), - ...params?.config - } - - if (params.json) { - config.headers['Content-Type'] = 'application/json' - } - - if (params.data && params.method.toUpperCase() !== 'GET') { - config.data = params.data - } - - if (typeof params.onUploadProgress === 'function') { - config.onUploadProgress = params.onUploadProgress - } - - if (params.authenticate === true && findStorageData(JWT_NAME)) { - config.headers.Authorization = `Bearer ${findStorageData(JWT_NAME)}` - } - - return axios - .request(config) - .then(response => { - if (response?.data && response?.status < httpCodes.badRequest.id) { - return params.json && typeof response === 'string' - ? response.data.json() - : response.data - } - throw new Error(response?.data?.message ?? response?.statusText) - }) - .catch(err => { - const configErrorParser = { - color: 'red', - type: err.message, - message: 'Error request: %s' - } - - process?.env?.NODE_ENV === 'development' && - messageTerminal(configErrorParser) - - return params.error(err) - }) -} diff --git a/src/fireedge/webpack.config.dev.client.js b/src/fireedge/webpack.config.dev.client.js index 366ed83e0d..8f5e3bde3c 100644 --- a/src/fireedge/webpack.config.dev.client.js +++ b/src/fireedge/webpack.config.dev.client.js @@ -2,45 +2,47 @@ const path = require('path') const webpack = require('webpack') const { defaultWebpackMode, defaultAppName } = require('./src/server/utils/constants/defaults') -const js = { - test: /\.js$/, - loader: 'babel-loader', - include: path.resolve(__dirname, 'src', 'client'), - options: { - babelrc: true, - plugins: ['react-hot-loader/babel'] - } -} const appName = defaultAppName ? `/${defaultAppName}` : '' -const bundle = () => { - const devPathFile = path.resolve(__dirname, 'src', 'client', 'dev', 'index.js') - const plugins = [ + +/** @type {import('webpack').Configuration} */ +module.exports = { + mode: defaultWebpackMode, + entry: [ + 'webpack-hot-middleware/client', + path.resolve(__dirname, 'src/client/dev/index.js') + ], + output: { + filename: 'bundle.dev.js', + path: path.resolve(__dirname, 'dist'), + publicPath: `${appName}/client` + }, + module: { + rules: [ + { + test: /\.js$/, + include: path.resolve(__dirname, 'src/client'), + use: [ + { + loader: 'babel-loader', + options: { + babelrc: true, + plugins: ['react-hot-loader/babel'] + } + } + ] + } + ] + }, + resolve: { + extensions: ['.js'] + }, + plugins: [ new webpack.HotModuleReplacementPlugin(), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify(defaultWebpackMode) } }) - ] - return { - mode: defaultWebpackMode, - entry: [ - 'react-hot-loader/patch', - 'webpack-hot-middleware/client', - devPathFile - ], - target: 'web', - output: { - path: devPathFile, - filename: 'bundle.dev.js', - publicPath: `${appName}/client` - }, - plugins, - module: { - rules: [js] - }, - devtool: 'inline-source-map' - } + ], + devtool: 'inline-source-map' } - -module.exports = bundle()