From ada6fb630b8eaaa42e0139e10d16477482816e07 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Tue, 31 Aug 2021 14:46:19 +0200 Subject: [PATCH] F OpenNebula/one#5422: Add vm detail tab forms (#1422) --- src/fireedge/.babelrc | 5 +- src/fireedge/.eslintrc | 2 + src/fireedge/etc/sunstone/admin/vm-tab.yaml | 1 + .../etc/sunstone/sunstone-server.conf | 14 + src/fireedge/package-lock.json | 2734 +++++++++-------- src/fireedge/package.json | 30 +- .../src/client/apps/provision/_app.js | 8 +- .../src/client/apps/provision/index.js | 16 +- src/fireedge/src/client/apps/sunstone/_app.js | 11 +- .../src/client/apps/sunstone/index.js | 18 +- .../src/client/components/Alerts/Error.js | 1 - .../client/components/AutoScrollBox/index.js | 2 +- .../components/Cards/ApplicationCard.js | 2 +- .../Cards/ApplicationNetworkCard.js | 2 +- .../Cards/ApplicationTemplateCard.js | 2 +- .../client/components/Cards/ClusterCard.js | 2 +- .../client/components/Cards/DatastoreCard.js | 2 +- .../src/client/components/Cards/EmptyCard.js | 2 +- .../src/client/components/Cards/HostCard.js | 2 +- .../client/components/Cards/NetworkCard.js | 2 +- .../src/client/components/Cards/PolicyCard.js | 2 +- .../client/components/Cards/ProvisionCard.js | 2 +- .../components/Cards/ProvisionTemplateCard.js | 2 +- .../components/Cards/SelectCard/Action.js | 7 +- .../components/Cards/SelectCard/SelectCard.js | 2 +- .../src/client/components/Cards/TierCard.js | 2 +- .../components/Cards/VirtualMachineCard.js | 2 +- .../src/client/components/Cards/WavesCard.js | 4 +- .../client/components/Charts/CircleChart.js | 14 +- .../src/client/components/Charts/SingleBar.js | 12 +- .../src/client/components/DebugLog/filters.js | 2 +- .../src/client/components/DebugLog/index.js | 2 +- .../src/client/components/DebugLog/message.js | 2 +- .../client/components/DebugLog/messagelist.js | 1 - .../components/Dialogs/DialogConfirmation.js | 46 +- .../client/components/Dialogs/DialogForm.js | 8 +- .../components/Dialogs/DialogRequest.js | 2 +- .../src/client/components/Fab/index.js | 4 +- .../src/client/components/Footer/index.js | 2 +- .../FormControl/AutocompleteController.js | 2 +- .../FormControl/CheckboxController.js | 2 +- .../components/FormControl/ErrorHelper.js | 2 +- .../components/FormControl/FileController.js | 4 +- .../components/FormControl/InputCode.js | 99 +- .../FormControl/PasswordController.js | 2 +- .../FormControl/SelectController.js | 20 +- .../FormControl/SliderController.js | 2 +- .../components/FormControl/SubmitButton.js | 116 +- .../components/FormControl/TextController.js | 19 +- .../components/FormControl/TimeController.js | 87 + .../client/components/FormControl/index.js | 21 +- .../components/FormStepper/MobileStepper.js | 5 +- .../client/components/FormStepper/Stepper.js | 5 +- .../client/components/FormStepper/index.js | 2 +- .../components/Forms/ButtonToTriggerForm.js | 99 +- .../client/components/Forms/FormWithSchema.js | 46 +- .../ImageSteps/AdvancedOptions/index.js | 2 +- .../ImageSteps/ImagesTable/index.js | 2 +- .../VolatileSteps/AdvancedOptions/index.js | 2 +- .../VolatileSteps/BasicConfiguration/index.js | 2 +- .../Steps/AdvancedOptions/index.js | 2 +- .../Steps/NetworksTable/index.js | 2 +- .../Forms/Vm/CreateDiskSnapshotForm/index.js | 27 + .../Forms/Vm/CreateDiskSnapshotForm/schema.js | 37 + .../Vm/CreateSchedActionForm/CommonSchema.js | 186 ++ .../PunctualForm/index.js | 27 + .../PunctualForm/schema.js | 254 ++ .../RelativeForm/index.js | 27 + .../RelativeForm/schema.js | 97 + .../Forms/Vm/CreateSchedActionForm/index.js | 22 + .../Forms/Vm/CreateSnapshotForm/index.js | 25 + .../Forms/Vm/CreateSnapshotForm/schema.js | 37 + .../Forms/Vm/ResizeCapacityForm/index.js | 7 - .../Forms/Vm/ResizeDiskForm/index.js | 25 + .../Forms/Vm/ResizeDiskForm/schema.js | 39 + .../Forms/Vm/SaveAsDiskForm/index.js | 25 + .../Forms/Vm/SaveAsDiskForm/schema.js | 37 + .../src/client/components/Forms/Vm/index.js | 13 +- .../src/client/components/Forms/index.js | 6 +- .../components/HOC/InternalLayout/index.js | 4 +- .../src/client/components/HOC/Translate.js | 2 +- .../src/client/components/Header/Group.js | 14 +- .../src/client/components/Header/Popover.js | 6 +- .../src/client/components/Header/User.js | 10 +- .../src/client/components/Header/View.js | 18 +- .../src/client/components/Header/Zone.js | 2 +- .../src/client/components/Header/index.js | 1 - .../src/client/components/Icons/docker.js | 4 +- .../src/client/components/Icons/opennebula.js | 2 +- .../src/client/components/Image/index.js | 4 +- .../client/components/List/ListCards/index.js | 3 +- .../components/List/ListHeader/index.js | 6 +- .../components/List/ListHeader/styles.js | 6 +- .../components/List/ListInfiniteScroll.js | 2 +- .../client/components/List/ListVirtualized.js | 12 +- .../client/components/LoadingScreen/index.js | 4 +- .../src/client/components/Notifier/index.js | 2 +- .../client/components/NumberEasing/index.js | 6 +- .../client/components/Route/NoAuthRoute.js | 4 +- .../client/components/Route/ProtectedRoute.js | 4 +- .../src/client/components/Search/index.js | 1 - .../components/Sidebar/SidebarCollapseItem.js | 20 +- .../client/components/Sidebar/SidebarLink.js | 7 +- .../src/client/components/Sidebar/index.js | 2 +- .../src/client/components/Sidebar/styles.js | 5 +- .../src/client/components/SpeedDial/index.js | 6 +- .../src/client/components/SplitPane/index.js | 15 +- .../src/client/components/Status/Badge.js | 2 +- .../src/client/components/Status/Chip.js | 2 +- .../src/client/components/Status/Circle.js | 2 - .../Status/LinearProgressWithLabel.js | 2 +- .../components/Tables/Clusters/index.js | 4 +- .../client/components/Tables/Clusters/row.js | 1 - .../components/Tables/Datastores/index.js | 4 +- .../components/Tables/Datastores/row.js | 1 - .../Tables/Enhanced/Utils/CategoryFilter.js | 10 +- .../Tables/Enhanced/Utils/GlobalFilter.js | 14 +- .../Enhanced/Utils/GlobalSelectedRows.js | 6 +- .../Tables/Enhanced/Utils/GlobalSort.js | 16 +- .../Tables/Enhanced/Utils/LabelFilter.js | 10 +- .../components/Tables/Enhanced/filters.js | 8 +- .../components/Tables/Enhanced/index.js | 6 +- .../components/Tables/Enhanced/pagination.js | 4 +- .../client/components/Tables/Enhanced/row.js | 4 +- .../components/Tables/Enhanced/toolbar.js | 5 +- .../client/components/Tables/Groups/index.js | 4 +- .../client/components/Tables/Groups/row.js | 1 - .../client/components/Tables/Hosts/detail.js | 2 +- .../client/components/Tables/Hosts/index.js | 4 +- .../src/client/components/Tables/Hosts/row.js | 1 - .../client/components/Tables/Images/detail.js | 2 +- .../client/components/Tables/Images/index.js | 4 +- .../client/components/Tables/Images/row.js | 1 - .../Tables/MarketplaceApps/index.js | 4 +- .../components/Tables/MarketplaceApps/row.js | 1 - .../components/Tables/Marketplaces/index.js | 4 +- .../components/Tables/Marketplaces/row.js | 1 - .../components/Tables/Skeleton/index.js | 4 +- .../client/components/Tables/Users/index.js | 4 +- .../src/client/components/Tables/Users/row.js | 1 - .../Tables/VNetworkTemplates/index.js | 4 +- .../Tables/VNetworkTemplates/row.js | 1 - .../components/Tables/VNetworks/index.js | 4 +- .../client/components/Tables/VNetworks/row.js | 1 - .../components/Tables/VRouters/index.js | 4 +- .../client/components/Tables/VRouters/row.js | 1 - .../components/Tables/Virtualized/header.js | 6 +- .../components/Tables/Virtualized/index.js | 6 +- .../components/Tables/Virtualized/row.js | 4 +- .../components/Tables/Virtualized/toolbar.js | 1 - .../components/Tables/VmTemplates/detail.js | 2 +- .../components/Tables/VmTemplates/index.js | 4 +- .../components/Tables/VmTemplates/row.js | 1 - .../src/client/components/Tables/Vms/index.js | 6 +- .../client/components/Tables/Vms/multiple.js | 1 - .../src/client/components/Tables/Vms/row.js | 1 - .../client/components/Tables/Zones/index.js | 4 +- .../src/client/components/Tables/Zones/row.js | 1 - .../src/client/components/Tables/styles.js | 1 - .../Tabs/Common/Attribute/Actions.js | 16 +- .../Tabs/Common/Attribute/Attribute.js | 43 +- .../Tabs/Common/Attribute/Inputs.js | 28 +- .../Tabs/Common/AttributeCreateForm.js | 49 +- .../components/Tabs/Common/AttributePanel.js | 4 +- .../src/client/components/Tabs/Common/List.js | 9 +- .../components/Tabs/Common/Ownership.js | 4 +- .../components/Tabs/Common/Permissions.js | 4 +- .../src/client/components/Tabs/TabProvider.js | 4 +- .../components/Tabs/Vm/Capacity/index.js | 6 +- .../Tabs/Vm/Capacity/information.js | 17 +- .../components/Tabs/Vm/Configuration.js | 4 +- .../client/components/Tabs/Vm/Info/index.js | 4 +- .../components/Tabs/Vm/Info/information.js | 1 - .../src/client/components/Tabs/Vm/Log.js | 1 - .../client/components/Tabs/Vm/Network/Item.js | 41 +- .../client/components/Tabs/Vm/Network/List.js | 10 +- .../components/Tabs/Vm/Network/index.js | 24 +- .../components/Tabs/Vm/Placement/Item.js | 1 - .../components/Tabs/Vm/Placement/List.js | 1 - .../components/Tabs/Vm/Placement/index.js | 7 +- .../Tabs/Vm/SchedActions/Actions.js | 242 ++ .../components/Tabs/Vm/SchedActions/Item.js | 59 +- .../components/Tabs/Vm/SchedActions/List.js | 9 +- .../components/Tabs/Vm/SchedActions/index.js | 57 +- .../components/Tabs/Vm/Snapshot/Actions.js | 88 + .../components/Tabs/Vm/Snapshot/Item.js | 18 +- .../components/Tabs/Vm/Snapshot/List.js | 1 - .../components/Tabs/Vm/Snapshot/index.js | 56 +- .../components/Tabs/Vm/Storage/Actions.js | 260 ++ .../client/components/Tabs/Vm/Storage/Item.js | 49 +- .../client/components/Tabs/Vm/Storage/List.js | 1 - .../components/Tabs/Vm/Storage/SubItem.js | 101 + .../components/Tabs/Vm/Storage/index.js | 21 +- .../src/client/components/Tabs/Vm/index.js | 10 +- .../src/client/components/Tabs/index.js | 2 +- .../components/Typography/DevTypography.js | 2 +- .../Typography/TypographyWithPoint.js | 1 - .../Widgets/TotalProviders/index.js | 12 +- .../Widgets/TotalProvisionInfrastructures.js | 8 +- .../Widgets/TotalProvisionsByState/index.js | 8 +- .../Widgets/TotalSunstoneResources.js | 7 +- src/fireedge/src/client/constants/index.js | 15 +- .../src/client/constants/translates.js | 29 +- src/fireedge/src/client/constants/vm.js | 26 +- .../DialogInfo/dialog.js | 1 - .../ApplicationsInstances/DialogInfo/index.js | 2 +- .../ApplicationsInstances/DialogInfo/info.js | 2 +- .../ApplicationsInstances/DialogInfo/tiers.js | 1 - .../containers/ApplicationsInstances/index.js | 2 +- .../Create/Steps/BasicConfiguration/index.js | 2 +- .../Form/Create/Steps/Clusters/index.js | 2 +- .../Form/Create/Steps/Networking/index.js | 2 +- .../Create/Steps/Tiers/Flow/CustomNode.js | 4 +- .../Form/Create/Steps/Tiers/Flow/index.js | 4 +- .../Tiers/Steps/BasicConfiguration/index.js | 2 +- .../Steps/Tiers/Steps/Networks/index.js | 2 +- .../Steps/Tiers/Steps/Policies/index.js | 2 +- .../Steps/Tiers/Steps/Template/List/Docker.js | 52 +- .../Tiers/Steps/Template/List/MarketApps.js | 2 +- .../Tiers/Steps/Template/List/Templates.js | 2 +- .../Steps/Tiers/Steps/Template/index.js | 2 +- .../Form/Create/Steps/Tiers/index.js | 2 +- .../Form/Create/index.js | 8 +- .../Deploy/Steps/BasicConfiguration/index.js | 2 +- .../Form/Deploy/Steps/Networking/index.js | 2 +- .../Form/Deploy/Steps/Tiers/index.js | 2 +- .../Form/Deploy/index.js | 2 +- .../containers/ApplicationsTemplates/index.js | 2 +- .../src/client/containers/Clusters/index.js | 5 +- .../containers/Dashboard/Provision/index.js | 4 +- .../containers/Dashboard/Sunstone/index.js | 4 +- .../src/client/containers/Datastores/index.js | 5 +- .../src/client/containers/Groups/index.js | 5 +- .../src/client/containers/Hosts/index.js | 5 +- .../src/client/containers/Images/index.js | 6 +- .../src/client/containers/Login/Form.js | 4 +- .../src/client/containers/Login/index.js | 10 +- .../src/client/containers/Login/schema.js | 12 +- .../containers/MarketplaceApps/index.js | 5 +- .../client/containers/Marketplaces/index.js | 5 +- .../containers/Providers/Form/Create.js | 2 +- .../Steps/BasicConfiguration/index.js | 2 +- .../ProviderForm/Steps/Connection/index.js | 2 +- .../Form/ProviderForm/Steps/Template/index.js | 8 +- .../Providers/Form/ProviderForm/index.js | 3 +- .../containers/Providers/Sections/info.js | 2 +- .../src/client/containers/Providers/index.js | 2 +- .../Provisions/DialogInfo/datastores.js | 2 +- .../containers/Provisions/DialogInfo/hosts.js | 2 +- .../containers/Provisions/DialogInfo/index.js | 2 +- .../containers/Provisions/DialogInfo/info.js | 2 +- .../containers/Provisions/DialogInfo/log.js | 8 +- .../Provisions/DialogInfo/networks.js | 2 +- .../containers/Provisions/Form/Create.js | 2 +- .../Steps/BasicConfiguration/index.js | 2 +- .../Form/ProvisionForm/Steps/Inputs/index.js | 2 +- .../ProvisionForm/Steps/Provider/index.js | 4 +- .../ProvisionForm/Steps/Template/index.js | 8 +- .../Provisions/Form/ProvisionForm/index.js | 3 +- .../src/client/containers/Provisions/index.js | 2 +- .../src/client/containers/Settings/index.js | 27 +- .../client/containers/TestApi/ResponseForm.js | 6 +- .../src/client/containers/TestApi/index.js | 10 +- .../src/client/containers/Users/index.js | 5 +- .../containers/VNetworkTemplates/index.js | 9 +- .../containers/VirtualMachines/index.js | 4 +- .../containers/VirtualNetworks/index.js | 9 +- .../client/containers/VirtualRouters/index.js | 5 +- .../client/containers/VmTemplates/index.js | 5 +- .../src/client/containers/Zones/index.js | 5 +- src/fireedge/src/client/dev/_app.js | 4 +- src/fireedge/src/client/dev/index.js | 11 - .../src/client/features/Auth/actions.js | 23 +- .../src/client/features/Auth/actionsView.js | 14 +- .../src/client/features/Auth/hooks.js | 8 +- .../src/client/features/Auth/index.js | 3 - .../src/client/features/Auth/services.js | 2 +- .../src/client/features/Auth/slice.js | 3 +- .../src/client/features/One/user/hooks.js | 4 +- .../src/client/features/One/user/services.js | 21 +- .../src/client/features/One/vm/actions.js | 13 + .../src/client/features/One/vm/hooks.js | 25 +- .../src/client/features/One/vm/services.js | 342 ++- src/fireedge/src/client/models/Helper.js | 18 + .../src/client/models/VirtualMachine.js | 38 +- .../src/client/providers/muiProvider.js | 8 +- .../src/client/providers/notistackProvider.js | 1 - .../src/client/providers/socketProvider.js | 2 +- src/fireedge/src/client/provision.js | 1 - src/fireedge/src/client/router/index.js | 10 +- src/fireedge/src/client/store/reducers.js | 6 +- src/fireedge/src/client/sunstone.js | 1 - src/fireedge/src/client/theme/index.js | 2 +- src/fireedge/src/client/utils/helpers.js | 14 +- src/fireedge/src/server/index.js | 33 +- .../src/server/routes/entrypoints/App.js | 2 - .../server/routes/websockets/hooks/index.js | 4 +- .../server/utils/constants/commands/user.js | 2 +- .../src/server/utils/constants/commands/vm.js | 2 +- src/fireedge/webpack.config.dev.client.js | 110 +- 300 files changed, 4739 insertions(+), 2447 deletions(-) create mode 100644 src/fireedge/src/client/components/FormControl/TimeController.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/schema.js create mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js create mode 100644 src/fireedge/src/client/components/Tabs/Vm/Snapshot/Actions.js create mode 100644 src/fireedge/src/client/components/Tabs/Vm/Storage/Actions.js create mode 100644 src/fireedge/src/client/components/Tabs/Vm/Storage/SubItem.js diff --git a/src/fireedge/.babelrc b/src/fireedge/.babelrc index 11958b43d5..c0661f208b 100644 --- a/src/fireedge/.babelrc +++ b/src/fireedge/.babelrc @@ -1,4 +1,5 @@ { + "sourceType": "unambiguous", "presets": [ [ "@babel/preset-env", @@ -12,7 +13,9 @@ } } ], - "@babel/preset-react" + ["@babel/preset-react", { + "runtime": "automatic" + }] ], "plugins": [ ["module-resolver", { diff --git a/src/fireedge/.eslintrc b/src/fireedge/.eslintrc index 05266d4a5e..077bd9aee0 100644 --- a/src/fireedge/.eslintrc +++ b/src/fireedge/.eslintrc @@ -21,6 +21,8 @@ "import/no-extraneous-dependencies": ["error", { "devDependencies": ["*.js"] }], + "react/jsx-uses-react": "off", + "react/react-in-jsx-scope": "off", "default-case": 0, "jsdoc/require-jsdoc": ["error", { "publicOnly": true, diff --git a/src/fireedge/etc/sunstone/admin/vm-tab.yaml b/src/fireedge/etc/sunstone/admin/vm-tab.yaml index fec2b227cc..7b80886f6a 100644 --- a/src/fireedge/etc/sunstone/admin/vm-tab.yaml +++ b/src/fireedge/etc/sunstone/admin/vm-tab.yaml @@ -130,6 +130,7 @@ info-tabs: enabled: true not_on: - vcenter + - firecracker network: enabled: true diff --git a/src/fireedge/etc/sunstone/sunstone-server.conf b/src/fireedge/etc/sunstone/sunstone-server.conf index e69de29bb2..f8ed510063 100644 --- a/src/fireedge/etc/sunstone/sunstone-server.conf +++ b/src/fireedge/etc/sunstone/sunstone-server.conf @@ -0,0 +1,14 @@ +# this display button and clock icon in table of vm +:leases: + suspend: + time: "+1209600" + color: "#000000" + warning: + time: "-86400" + color: "#085aef" + terminate: + time: "+1209600" + color: "#e1ef08" + warning: + time: "-86400" + color: "#ef2808" \ No newline at end of file diff --git a/src/fireedge/package-lock.json b/src/fireedge/package-lock.json index 68e39664c8..69e56a3695 100644 --- a/src/fireedge/package-lock.json +++ b/src/fireedge/package-lock.json @@ -18,13 +18,13 @@ "@babel/plugin-proposal-optional-chaining": "7.12.13", "@babel/preset-env": "7.12.13", "@babel/preset-react": "7.12.13", - "@hookform/resolvers": "0.1.1", + "@hookform/resolvers": "1.3.7", "@loadable/babel-plugin": "5.13.2", - "@loadable/component": "5.14.1", - "@loadable/server": "5.14.2", - "@loadable/webpack-plugin": "5.15.0", - "@material-ui/core": "4.11.0", - "@material-ui/lab": "4.0.0-alpha.58", + "@loadable/component": "5.15.0", + "@loadable/server": "5.15.1", + "@loadable/webpack-plugin": "5.15.1", + "@material-ui/core": "4.12.3", + "@material-ui/lab": "4.0.0-alpha.60", "@reduxjs/toolkit": "1.5.1", "ace-builds": "1.4.12", "atob": "2.1.2", @@ -32,7 +32,6 @@ "babel-eslint": "10.1.0", "babel-loader": "8.2.1", "babel-plugin-module-resolver": "4.0.0", - "babel-preset-react-hmre": "1.1.1", "btoa": "1.2.1", "clsx": "1.1.1", "compression": "1.7.4", @@ -59,20 +58,20 @@ "luxon": "1.25.0", "marked": "2.0.0", "morgan": "1.10.0", - "notistack": "1.0.9", + "notistack": "1.0.10", "opennebula-guacamole": "1.0.0", "path": "0.12.7", "process": "0.11.10", "prop-types": "15.7.2", "qrcode": "1.4.4", - "react": "16.14.0", - "react-ace": "9.1.4", - "react-dom": "16.13.1", - "react-flow-renderer": "5.11.1", - "react-hook-form": "6.8.6", + "react": "17.0.2", + "react-ace": "9.2.1", + "react-dom": "17.0.2", + "react-flow-renderer": "9.6.0", + "react-hook-form": "6.12.0", "react-json-pretty": "2.2.0", "react-minimal-pie-chart": "8.2.0", - "react-redux": "7.2.1", + "react-redux": "7.2.4", "react-router": "5.2.0", "react-router-dom": "5.2.0", "react-table": "7.7.0", @@ -103,6 +102,7 @@ "zeromq": "5.2.0" }, "devDependencies": { + "@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.3", "cross-env": "7.0.2", "eslint": "7.11.0", "eslint-config-prettier": "6.11.0", @@ -119,7 +119,7 @@ "eslint-plugin-standard": "4.0.1", "opennebula-generatepotfile": "1.0.0", "opennebula-potojson": "1.0.0", - "react-hot-loader": "4.13.0", + "react-refresh": "0.10.0", "webpack-dev-middleware": "5.0.0", "webpack-hot-middleware": "2.25.0" }, @@ -167,9 +167,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz", - "integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", "engines": { "node": ">=6.9.0" } @@ -204,11 +204,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.8.tgz", - "integrity": "sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", + "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", "dependencies": { - "@babel/types": "^7.14.8", + "@babel/types": "^7.15.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -240,11 +240,11 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz", - "integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", + "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", "dependencies": { - "@babel/compat-data": "^7.14.5", + "@babel/compat-data": "^7.15.0", "@babel/helper-validator-option": "^7.14.5", "browserslist": "^4.16.6", "semver": "^6.3.0" @@ -265,15 +265,15 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.8.tgz", - "integrity": "sha512-bpYvH8zJBWzeqi1o+co8qOrw+EXzQ/0c74gVmY205AWXy9nifHrOg77y+1zwxX5lXE7Icq4sPlSQ4O2kWBrteQ==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", + "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.14.7", + "@babel/helper-member-expression-to-functions": "^7.15.0", "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", "@babel/helper-split-export-declaration": "^7.14.5" }, "engines": { @@ -345,11 +345,11 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz", - "integrity": "sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", + "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", "dependencies": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.0" }, "engines": { "node": ">=6.9.0" @@ -367,18 +367,18 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz", - "integrity": "sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", + "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", "dependencies": { "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", "@babel/helper-simple-access": "^7.14.8", "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.8", + "@babel/helper-validator-identifier": "^7.14.9", "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.8", - "@babel/types": "^7.14.8" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" }, "engines": { "node": ">=6.9.0" @@ -417,14 +417,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz", - "integrity": "sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", + "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.15.0", "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" }, "engines": { "node": ">=6.9.0" @@ -464,9 +464,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz", - "integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", "engines": { "node": ">=6.9.0" } @@ -494,13 +494,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.8.tgz", - "integrity": "sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", + "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", "dependencies": { "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.8", - "@babel/types": "^7.14.8" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" }, "engines": { "node": ">=6.9.0" @@ -540,9 +540,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.8.tgz", - "integrity": "sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -551,9 +551,9 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz", - "integrity": "sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", + "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-remap-async-to-generator": "^7.14.5", @@ -930,9 +930,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz", - "integrity": "sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -944,9 +944,9 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz", - "integrity": "sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", + "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-function-name": "^7.14.5", @@ -1109,13 +1109,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz", - "integrity": "sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", + "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-module-transforms": "^7.15.0", "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.5", + "@babel/helper-simple-access": "^7.14.8", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1159,9 +1159,9 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz", - "integrity": "sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.14.5" }, @@ -1230,9 +1230,9 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.5.tgz", - "integrity": "sha512-07aqY1ChoPgIxsuDviptRpVkWCSbXWmzQqcgy65C6YSFOfPFvb/DX3bBRHh7pCd/PMEEYHYWUTSVkCbkVainYQ==", + "version": "7.15.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", + "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -1244,15 +1244,15 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.5.tgz", - "integrity": "sha512-7RylxNeDnxc1OleDm0F5Q/BSL+whYRbOAR+bwgCxIr0L32v7UFh/pz1DLMZideAUxKT6eMoS2zQH6fyODLEi8Q==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", + "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-module-imports": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/types": "^7.14.9" }, "engines": { "node": ">=6.9.0" @@ -1525,9 +1525,9 @@ } }, "node_modules/@babel/register": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.14.5.tgz", - "integrity": "sha512-TjJpGz/aDjFGWsItRBQMOFTrmTI9tr79CHOK+KIvLeCkbxuOAk2M5QHjvruIMGoo9OuccMh5euplPzc5FjAKGg==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz", + "integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==", "dependencies": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", @@ -1543,9 +1543,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.8.tgz", - "integrity": "sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -1567,17 +1567,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.8.tgz", - "integrity": "sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", + "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", "dependencies": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.14.8", + "@babel/generator": "^7.15.0", "@babel/helper-function-name": "^7.14.5", "@babel/helper-hoist-variables": "^7.14.5", "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.14.8", - "@babel/types": "^7.14.8", + "@babel/parser": "^7.15.0", + "@babel/types": "^7.15.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1586,11 +1586,11 @@ } }, "node_modules/@babel/types": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.8.tgz", - "integrity": "sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", "dependencies": { - "@babel/helper-validator-identifier": "^7.14.8", + "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1634,6 +1634,15 @@ "node": ">=10.0.0" } }, + "node_modules/@es-joy/jsdoccomment/node_modules/jsdoc-type-pratt-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.0.4.tgz", + "integrity": "sha512-jzmW9gokeq9+bHPDR1nCeidMyFUikdZlbOhKzh9+/nJqB75XhpNKec1/UuxW5c4+O+Pi31Gc/dCboyfSm/pSpQ==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", @@ -1669,9 +1678,9 @@ } }, "node_modules/@hookform/resolvers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-0.1.1.tgz", - "integrity": "sha512-IKWcvDG82D0N+3ZjMSbdHul6TgL2Dd68aXyijLvc1mUCzBChvQwS6YDsXRrc9WuIjUPb9nluaVIIrmg3V1JMGQ==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-1.3.7.tgz", + "integrity": "sha512-gC06h1hky7gM31UO4Y7DrUQjgZyNIKA3s0/TxXbdeurwhOj07l8Zx8Pomjt93ANOKoZOU2rcHKaZtrEJx1w7tg==", "peerDependencies": { "react-hook-form": ">=6.6.0" } @@ -1695,9 +1704,9 @@ } }, "node_modules/@loadable/component": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@loadable/component/-/component-5.14.1.tgz", - "integrity": "sha512-UQBZfZrp1FLTf8RNhljXNHFNY4QhAA1L2+GOEeABBFre9TD0aFyQh3Sai5QxcOfy+FTbjIfti5iHaNRR7yUzEQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@loadable/component/-/component-5.15.0.tgz", + "integrity": "sha512-g63rQzypPOZi0BeGsK4ST2MYhsFR+i7bhL8k/McUoWDNMDuTTdUlQ2GACKxqh5sI/dNC/6nVoPrycMnSylnAgQ==", "dependencies": { "@babel/runtime": "^7.7.7", "hoist-non-react-statics": "^3.3.1", @@ -1715,9 +1724,9 @@ } }, "node_modules/@loadable/server": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/@loadable/server/-/server-5.14.2.tgz", - "integrity": "sha512-2CkcmHx5PUEBn8evIvHPyOncMtWMNTu68ON1rnyAJnd+2MCq+eWMPKIR8DAdJYf56iVArBOBI0nyo3N+6laCPw==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@loadable/server/-/server-5.15.1.tgz", + "integrity": "sha512-LdwzskjMtCMDJoz73JhbkBzTfaopx8U/Bfb0uKkqTxrsjH0uC+h4+cPo5mqKYyHz/dwPRf7aJsvQNcLQZdKHHw==", "dependencies": { "lodash": "^4.17.15" }, @@ -1734,9 +1743,9 @@ } }, "node_modules/@loadable/webpack-plugin": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@loadable/webpack-plugin/-/webpack-plugin-5.15.0.tgz", - "integrity": "sha512-6eKaEqjGiMuMiazzVopbyMHrUflUkTOd29nUHaUmmbdo6FTGo+VqdBZ4Y1dvkEaa/b6NjkPTKbLdVmZvHVx2jg==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@loadable/webpack-plugin/-/webpack-plugin-5.15.1.tgz", + "integrity": "sha512-DqGJmazsh9XEG4CtMbaR+Ay+6+iw3NvzYqzqVIb7nsTi7UB38gEQJkT/enXdCkMZhLNSYL2HAr4rbFerhfyL2Q==", "dependencies": { "make-dir": "^3.0.2" }, @@ -1774,21 +1783,21 @@ } }, "node_modules/@material-ui/core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.11.0.tgz", - "integrity": "sha512-bYo9uIub8wGhZySHqLQ833zi4ZML+XCBE1XwJ8EuUVSpTWWG57Pm+YugQToJNFsEyiKFhPh8DPD0bgupz8n01g==", + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.3.tgz", + "integrity": "sha512-sdpgI/PL56QVsEJldwEe4FFaFTLUqN+rd7sSZiRCdx2E/C7z5yK0y/khAWVBH24tXwto7I1hCzNWfJGZIYJKnw==", "dependencies": { "@babel/runtime": "^7.4.4", - "@material-ui/styles": "^4.10.0", - "@material-ui/system": "^4.9.14", - "@material-ui/types": "^5.1.0", - "@material-ui/utils": "^4.10.2", + "@material-ui/styles": "^4.11.4", + "@material-ui/system": "^4.12.1", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.2", "@types/react-transition-group": "^4.2.0", "clsx": "^1.0.4", "hoist-non-react-statics": "^3.3.2", "popper.js": "1.16.1-lts", "prop-types": "^15.7.2", - "react-is": "^16.8.0", + "react-is": "^16.8.0 || ^17.0.0", "react-transition-group": "^4.4.0" }, "engines": { @@ -1799,9 +1808,9 @@ "url": "https://opencollective.com/material-ui" }, "peerDependencies": { - "@types/react": "^16.8.6", - "react": "^16.8.0", - "react-dom": "^16.8.0" + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -1810,9 +1819,9 @@ } }, "node_modules/@material-ui/lab": { - "version": "4.0.0-alpha.58", - "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.58.tgz", - "integrity": "sha512-GKHlJqLxUeHH3L3dGQ48ZavYrqGOTXkFkiEiuYMAnAvXAZP4rhMIqeHOPXSUQan4Bd8QnafDcpovOSLnadDmKw==", + "version": "4.0.0-alpha.60", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.60.tgz", + "integrity": "sha512-fadlYsPJF+0fx2lRuyqAuJj7hAS1tLDdIEEdov5jlrpb5pp4b+mRDUqQTUxi4inRZHS1bEXpU8QWUhO6xX88aA==", "dependencies": { "@babel/runtime": "^7.4.4", "@material-ui/utils": "^4.11.2", @@ -1824,7 +1833,7 @@ "node": ">=8.0.0" }, "peerDependencies": { - "@material-ui/core": "^4.9.10", + "@material-ui/core": "^4.12.1", "@types/react": "^16.8.6 || ^17.0.0", "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0" @@ -1984,6 +1993,63 @@ "node": ">= 8" } }, + "node_modules/@pmmmwh/react-refresh-webpack-plugin": { + "version": "0.5.0-rc.3", + "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.0-rc.3.tgz", + "integrity": "sha512-ORUoyHX15P3VNjVp3Y27wnxRCBAZdTwLlg4gn8Igq3jvyXnUAAR4PQxIq4vHo0h7eTLvgOGEKCedRMIwlzYC5g==", + "dev": true, + "dependencies": { + "ansi-html": "^0.0.7", + "core-js-pure": "^3.8.1", + "error-stack-parser": "^2.0.6", + "html-entities": "^2.1.0", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">= 10.13" + }, + "peerDependencies": { + "@types/webpack": "4.x || 5.x", + "react-refresh": "^0.10.0", + "sockjs-client": "^1.4.0", + "type-fest": "1.x", + "webpack": ">=4.43.0 <6.0.0", + "webpack-dev-server": "3.x || >=4.0.0-beta.0", + "webpack-hot-middleware": "2.x", + "webpack-plugin-serve": "0.x || 1.x" + }, + "peerDependenciesMeta": { + "@types/webpack": { + "optional": true + }, + "sockjs-client": { + "optional": true + }, + "type-fest": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + }, + "webpack-hot-middleware": { + "optional": true + }, + "webpack-plugin-serve": { + "optional": true + } + } + }, + "node_modules/@pmmmwh/react-refresh-webpack-plugin/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/@reach/observe-rect": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", @@ -2015,6 +2081,228 @@ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" }, + "node_modules/@types/d3": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-6.7.5.tgz", + "integrity": "sha512-TUZ6zuT/KIvbHSv81kwAiO5gG5aTuoiLGnWR/KxHJ15Idy/xmGUXaaF5zMG+UMIsndcGlSHTmrvwRgdvZlNKaA==", + "dependencies": { + "@types/d3-array": "^2", + "@types/d3-axis": "^2", + "@types/d3-brush": "^2", + "@types/d3-chord": "^2", + "@types/d3-color": "^2", + "@types/d3-contour": "^2", + "@types/d3-delaunay": "^5", + "@types/d3-dispatch": "^2", + "@types/d3-drag": "^2", + "@types/d3-dsv": "^2", + "@types/d3-ease": "^2", + "@types/d3-fetch": "^2", + "@types/d3-force": "^2", + "@types/d3-format": "^2", + "@types/d3-geo": "^2", + "@types/d3-hierarchy": "^2", + "@types/d3-interpolate": "^2", + "@types/d3-path": "^2", + "@types/d3-polygon": "^2", + "@types/d3-quadtree": "^2", + "@types/d3-random": "^2", + "@types/d3-scale": "^3", + "@types/d3-scale-chromatic": "^2", + "@types/d3-selection": "^2", + "@types/d3-shape": "^2", + "@types/d3-time": "^2", + "@types/d3-time-format": "^3", + "@types/d3-timer": "^2", + "@types/d3-transition": "^2", + "@types/d3-zoom": "^2" + } + }, + "node_modules/@types/d3-array": { + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-2.12.3.tgz", + "integrity": "sha512-hN879HLPTVqZV3FQEXy7ptt083UXwguNbnxdTGzVW4y4KjX5uyNKljrQixZcSJfLyFirbpUokxpXtvR+N5+KIg==" + }, + "node_modules/@types/d3-axis": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-2.1.3.tgz", + "integrity": "sha512-QjXjwZ0xzyrW2ndkmkb09ErgWDEYtbLBKGui73QLMFm3woqWpxptfD5Y7vqQdybMcu7WEbjZ5q+w2w5+uh2IjA==", + "dependencies": { + "@types/d3-selection": "^2" + } + }, + "node_modules/@types/d3-brush": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-2.1.2.tgz", + "integrity": "sha512-DnZmjdK1ycX1CMiW9r5E3xSf1tL+bp3yob1ON8bf0xB0/odfmGXeYOTafU+2SmU1F0/dvcqaO4SMjw62onOu6A==", + "dependencies": { + "@types/d3-selection": "^2" + } + }, + "node_modules/@types/d3-chord": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-2.0.3.tgz", + "integrity": "sha512-koIqSNQLPRQPXt7c55hgRF6Lr9Ps72r1+Biv55jdYR+SHJ463MsB2lp4ktzttFNmrQw/9yWthf/OmSUj5dNXKw==" + }, + "node_modules/@types/d3-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.3.tgz", + "integrity": "sha512-+0EtEjBfKEDtH9Rk3u3kLOUXM5F+iZK+WvASPb0MhIZl8J8NUvGeZRwKCXl+P3HkYx5TdU4YtcibpqHkSR9n7w==" + }, + "node_modules/@types/d3-contour": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-2.0.4.tgz", + "integrity": "sha512-WMac1xV/mXAgkgr5dUvzsBV5OrgNZDBDpJk9s3v2SadTqGgDRirKABb2Ek2H1pFlYVH4Oly9XJGnuzxKDduqWA==", + "dependencies": { + "@types/d3-array": "^2", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-5.3.1.tgz", + "integrity": "sha512-F6itHi2DxdatHil1rJ2yEFUNhejj8+0Acd55LZ6Ggwbdoks0+DxVY2cawNj16sjCBiWvubVlh6eBMVsYRNGLew==" + }, + "node_modules/@types/d3-dispatch": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-2.0.1.tgz", + "integrity": "sha512-eT2K8uG3rXkmRiCpPn0rNrekuSLdBfV83vbTvfZliA5K7dbeaqWS/CBHtJ9SQoF8aDTsWSY4A0RU67U/HcKdJQ==" + }, + "node_modules/@types/d3-drag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-2.0.2.tgz", + "integrity": "sha512-m9USoFaTgVw2mmE7vLjWTApT9dMxMlql/dl3Gj503x+1a2n6K455iDWydqy2dfCpkUBCoF82yRGDgcSk9FUEyQ==", + "dependencies": { + "@types/d3-selection": "^2" + } + }, + "node_modules/@types/d3-dsv": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-2.0.2.tgz", + "integrity": "sha512-T4aL2ZzaILkLGKbxssipYVRs8334PSR9FQzTGftZbc3jIPGkiXXS7qUCh8/q8UWFzxBZQ92dvR0v7+AM9wL2PA==" + }, + "node_modules/@types/d3-ease": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-2.0.1.tgz", + "integrity": "sha512-Af1ftZXv82ktPCk1+Vxe7f+VSfxDsQ1mwwakDl17+UzI/ii3vsDIAzaBDDSEQd2Cg9BYPTSx8wXH8rJNDuSjeg==" + }, + "node_modules/@types/d3-fetch": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-2.0.2.tgz", + "integrity": "sha512-sllsCSWrNdSvzOJWN5RnxkmtvW9pCttONGajSxHX9FUQ9kOkGE391xlz6VDBdZxLnpwjp3I+mipbwsaCjq4m5A==", + "dependencies": { + "@types/d3-dsv": "^2" + } + }, + "node_modules/@types/d3-force": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-2.1.4.tgz", + "integrity": "sha512-1XVRc2QbeUSL1FRVE53Irdz7jY+drTwESHIMVirCwkAAMB/yVC8ezAfx/1Alq0t0uOnphoyhRle1ht5CuPgSJQ==" + }, + "node_modules/@types/d3-format": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-2.0.2.tgz", + "integrity": "sha512-OhQPuTeeMhD9A0Ksqo4q1S9Z1Q57O/t4tTPBxBQxRB4IERnxeoEYLPe72fA/GYpPSUrfKZVOgLHidkxwbzLdJA==" + }, + "node_modules/@types/d3-geo": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-2.0.3.tgz", + "integrity": "sha512-kFwLEMXq1mGJ2Eho7KrOUYvLcc2YTDeKj+kTFt87JlEbRQ0rgo8ZENNb5vTYmZrJ2xL/vVM5M7yqVZGOPH2JFg==", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-2.0.2.tgz", + "integrity": "sha512-6PlBRwbjUPPt0ZFq/HTUyOAdOF3p73EUYots74lHMUyAVtdFSOS/hAeNXtEIM9i7qRDntuIblXxHGUMb9MuNRA==" + }, + "node_modules/@types/d3-interpolate": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-2.0.2.tgz", + "integrity": "sha512-lElyqlUfIPyWG/cD475vl6msPL4aMU7eJvx1//Q177L8mdXoVPFl1djIESF2FKnc0NyaHvQlJpWwKJYwAhUoCw==", + "dependencies": { + "@types/d3-color": "^2" + } + }, + "node_modules/@types/d3-path": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-2.0.1.tgz", + "integrity": "sha512-6K8LaFlztlhZO7mwsZg7ClRsdLg3FJRzIIi6SZXDWmmSJc2x8dd2VkESbLXdk3p8cuvz71f36S0y8Zv2AxqvQw==" + }, + "node_modules/@types/d3-polygon": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-2.0.1.tgz", + "integrity": "sha512-X3XTIwBxlzRIWe4yaD1KsmcfItjSPLTGL04QDyP08jyHDVsnz3+NZJMwtD4vCaTAVpGSjbqS+jrBo8cO2V/xMA==" + }, + "node_modules/@types/d3-quadtree": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-2.0.2.tgz", + "integrity": "sha512-KgWL4jlz8QJJZX01E4HKXJ9FLU94RTuObsAYqsPp8YOAcYDmEgJIQJ+ojZcnKUAnrUb78ik8JBKWas5XZPqJnQ==" + }, + "node_modules/@types/d3-random": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-2.2.1.tgz", + "integrity": "sha512-5vvxn6//poNeOxt1ZwC7QU//dG9QqABjy1T7fP/xmFHY95GnaOw3yABf29hiu5SR1Oo34XcpyHFbzod+vemQjA==" + }, + "node_modules/@types/d3-scale": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-3.3.2.tgz", + "integrity": "sha512-gGqr7x1ost9px3FvIfUMi5XA/F/yAf4UkUDtdQhpH92XCT0Oa7zkkRzY61gPVJq+DxpHn/btouw5ohWkbBsCzQ==", + "dependencies": { + "@types/d3-time": "^2" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-2.0.1.tgz", + "integrity": "sha512-3EuZlbPu+pvclZcb1DhlymTWT2W+lYsRKBjvkH2ojDbCWDYavifqu1vYX9WGzlPgCgcS4Alhk1+zapXbGEGylQ==" + }, + "node_modules/@types/d3-selection": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-2.0.1.tgz", + "integrity": "sha512-3mhtPnGE+c71rl/T5HMy+ykg7migAZ4T6gzU0HxpgBFKcasBrSnwRbYV1/UZR6o5fkpySxhWxAhd7yhjj8jL7g==" + }, + "node_modules/@types/d3-shape": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-2.1.3.tgz", + "integrity": "sha512-HAhCel3wP93kh4/rq+7atLdybcESZ5bRHDEZUojClyZWsRuEMo3A52NGYJSh48SxfxEU6RZIVbZL2YFZ2OAlzQ==", + "dependencies": { + "@types/d3-path": "^2" + } + }, + "node_modules/@types/d3-time": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-2.1.1.tgz", + "integrity": "sha512-9MVYlmIgmRR31C5b4FVSWtuMmBHh2mOWQYfl7XAYOa8dsnb7iEmUmRSWSFgXFtkjxO65d7hTUHQC+RhR/9IWFg==" + }, + "node_modules/@types/d3-time-format": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-3.0.1.tgz", + "integrity": "sha512-5GIimz5IqaRsdnxs4YlyTZPwAMfALu/wA4jqSiuqgdbCxUZ2WjrnwANqOtoBJQgeaUTdYNfALJO0Yb0YrDqduA==" + }, + "node_modules/@types/d3-timer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.1.tgz", + "integrity": "sha512-TF8aoF5cHcLO7W7403blM7L1T+6NF3XMyN3fxyUolq2uOcFeicG/khQg/dGxiCJWoAcmYulYN7LYSRKO54IXaA==" + }, + "node_modules/@types/d3-transition": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-2.0.2.tgz", + "integrity": "sha512-376TICEykdXOEA9uUIYpjshEkxfGwCPnkHUl8+6gphzKbf5NMnUhKT7wR59Yxrd9wtJ/rmE3SVLx6/8w4eY6Zg==", + "dependencies": { + "@types/d3-selection": "^2" + } + }, + "node_modules/@types/d3-zoom": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-2.0.3.tgz", + "integrity": "sha512-9X9uDYKk2U8w775OHj36s9Q7GkNAnJKGw6+sbkP5DpHSjELwKvTGzEK6+IISYfLpJRL/V3mRXMhgDnnJ5LkwJg==", + "dependencies": { + "@types/d3-interpolate": "^2", + "@types/d3-selection": "^2" + } + }, "node_modules/@types/eslint": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", @@ -2038,6 +2326,20 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==" }, + "node_modules/@types/geojson": { + "version": "7946.0.8", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", + "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" + }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/http-proxy": { "version": "1.17.7", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", @@ -2047,19 +2349,25 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", - "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.171", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.171.tgz", - "integrity": "sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg==" + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==" }, "node_modules/@types/node": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.1.tgz", - "integrity": "sha512-UW7cbLqf/Wu5XH2RKKY1cHwUNLicIDRLMraYKz+HHAerJ0ZffUEk+fMnd8qU2JaS6cAy0r8tsaf7yqHASf/Y0Q==" + "version": "16.7.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.8.tgz", + "integrity": "sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg==" }, "node_modules/@types/prop-types": { "version": "15.7.4", @@ -2067,15 +2375,26 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "node_modules/@types/react": { - "version": "17.0.15", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz", - "integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==", + "version": "17.0.19", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.19.tgz", + "integrity": "sha512-sX1HisdB1/ZESixMTGnMxH9TDe8Sk709734fEQZzCV/4lSu9kJCPbo2PbTRoZM+53Pp0P10hYVyReUueGwUi4A==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", "csstype": "^3.0.2" } }, + "node_modules/@types/react-redux": { + "version": "7.1.18", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.18.tgz", + "integrity": "sha512-9iwAsPyJ9DLTRH+OFeIrm9cAbIj1i2ANL3sKQFATqnPWRbg+jEFXyZOKHiQK/N86pNRXbb4HRxAxo0SIX1XwzQ==", + "dependencies": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.2.tgz", @@ -2246,9 +2565,9 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", - "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.2.tgz", + "integrity": "sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==", "peerDependencies": { "webpack-cli": "4.x.x" }, @@ -2258,17 +2577,6 @@ } } }, - "node_modules/@welldone-software/why-did-you-render": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-4.3.2.tgz", - "integrity": "sha512-pzaFmUUH+FjbsDgcMB1xNPncIaxibvo0FLbGySLIh+v+7Bp5pqSJFO6zlqo4orPLm3nAdYEgL2vrlj8befoypg==", - "dependencies": { - "lodash": "^4" - }, - "peerDependencies": { - "react": ">=16.13" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -2596,9 +2904,9 @@ } }, "node_modules/async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", + "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" }, "node_modules/async-each": { "version": "1.0.3", @@ -2672,6 +2980,47 @@ "webpack": ">=2" } }, + "node_modules/babel-loader/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/babel-loader/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/babel-loader/node_modules/schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dependencies": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -2695,25 +3044,6 @@ "node": ">= 8.0.0" } }, - "node_modules/babel-plugin-react-transform": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz", - "integrity": "sha1-UVu/qZaJOYEULZCx+bFjXeKZUQk=", - "dependencies": { - "lodash": "^4.6.1" - } - }, - "node_modules/babel-preset-react-hmre": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/babel-preset-react-hmre/-/babel-preset-react-hmre-1.1.1.tgz", - "integrity": "sha1-0hbmDLW41Mhz4Z7Q9U6v8UN7xJI=", - "dependencies": { - "babel-plugin-react-transform": "^2.0.2", - "react-transform-catch-errors": "^1.0.2", - "react-transform-hmr": "^1.0.3", - "redbox-react": "^1.2.2" - } - }, "node_modules/backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -3059,15 +3389,15 @@ } }, "node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "version": "4.16.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", + "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", + "caniuse-lite": "^1.0.30001251", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.811", "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "node-releases": "^1.1.75" }, "bin": { "browserslist": "cli.js" @@ -3127,9 +3457,9 @@ "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/buffer-xor": { "version": "1.0.3", @@ -3200,9 +3530,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001247", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001247.tgz", - "integrity": "sha512-4rS7co+7+AoOSPRPOPUt5/GdaqZc0EsUpWk66ofE3HJTAajUK2Ss2VwoNzVN69ghg8lYYlh0an0Iy4LIHHo9UQ==", + "version": "1.0.30001252", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", + "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/browserslist" @@ -3455,14 +3785,9 @@ } }, "node_modules/classcat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/classcat/-/classcat-4.1.0.tgz", - "integrity": "sha512-RA8O5oCi1I1CF6rR4cRBROh8MtZzM4w7xKLm0jd+S6UN2G4FIto+9DVOeFc46JEZFN5PVe/EZWLQO1VU/AUH4A==" - }, - "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/classcat/-/classcat-5.0.3.tgz", + "integrity": "sha512-6dK2ke4VEJZOFx2ZfdDAl5OhEL8lvkl6EHF92IfRePfHxQTqir5NlcNVUv+2idjDqCX2NDc8m8YSAI5NI975ZQ==" }, "node_modules/cliui": { "version": "5.0.0", @@ -3567,9 +3892,9 @@ } }, "node_modules/colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" }, "node_modules/colors": { "version": "1.4.0", @@ -3771,23 +4096,6 @@ "node": ">=10.13.0" } }, - "node_modules/copy-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/core-js": { "version": "3.15.2", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.15.2.tgz", @@ -3799,11 +4107,11 @@ } }, "node_modules/core-js-compat": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.15.2.tgz", - "integrity": "sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ==", + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.4.tgz", + "integrity": "sha512-IzCSomxRdahCYb6G3HiN6pl3JCiM0NMunRcNa1pIeC7g17Vd6Ue3AT9anQiENPIm/svThUVer1pIbLMDERIsFw==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.16.8", "semver": "7.0.0" }, "funding": { @@ -3819,6 +4127,17 @@ "semver": "bin/semver.js" } }, + "node_modules/core-js-pure": { + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.16.4.tgz", + "integrity": "sha512-bY1K3/1Jy9D8Jd12eoeVahNXHLfHFb4TXWI8SQ4y8bImR9qDPmGITBAfmcffTkgUvbJn87r8dILOTWW5kZzkgA==", + "dev": true, + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -4024,11 +4343,6 @@ "lodash": "^4.17.15" } }, - "node_modules/debounce": { - "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.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -4212,11 +4526,6 @@ "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", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" - }, "node_modules/domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -4232,33 +4541,6 @@ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==" }, - "node_modules/easy-peasy": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/easy-peasy/-/easy-peasy-3.3.1.tgz", - "integrity": "sha512-c1M6xrMQyOl3JCwUdZCMcAMAuKQAxG76n2OydBTpvCPS7OSK7ZVseJL96KeCB3fpvKEvIQC8h8nShObtVPrzaA==", - "dependencies": { - "debounce": "^1.2.0", - "immer-peasy": "3.1.3", - "is-plain-object": "^3.0.0", - "memoizerific": "^1.11.3", - "prop-types": "^15.6.2", - "redux": "^4.0.5", - "redux-thunk": "^2.3.0", - "symbol-observable": "^1.2.0", - "ts-toolbelt": "^6.1.6" - }, - "peerDependencies": { - "react": "^16.8.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": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -4273,9 +4555,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "node_modules/electron-to-chromium": { - "version": "1.3.786", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.786.tgz", - "integrity": "sha512-AmvbLBj3hepRk8v/DHrFF8gINxOFfDbrn6Ts3PcK46/FBdQb5OMmpamSpZQXSkfi77FfBzYtQtAk+00LCLYMVw==" + "version": "1.3.824", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.824.tgz", + "integrity": "sha512-Fk+5aD0HDi9i9ZKt9n2VPOZO1dQy7PV++hz2wJ/KIn+CvVfu4fny39squHtyVDPuHNuoJGAZIbuReEklqYIqfA==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -4386,9 +4668,9 @@ } }, "node_modules/engine.io-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz", - "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.3.tgz", + "integrity": "sha512-xEAAY0msNnESNPc00e19y5heTPX4y/TJ36gr8t1voOaNmTojP9b3oK3BbJLFufW2XFPQaaijpFewm2g2Um3uqA==", "dependencies": { "base64-arraybuffer": "0.1.4" }, @@ -4470,17 +4752,18 @@ } }, "node_modules/error-stack-parser": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", - "integrity": "sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "dev": true, "dependencies": { - "stackframe": "^0.3.1" + "stackframe": "^1.1.1" } }, "node_modules/es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -4488,11 +4771,12 @@ "get-intrinsic": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", "is-callable": "^1.2.3", "is-negative-zero": "^2.0.1", "is-regex": "^1.1.3", "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -4642,30 +4926,24 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "dependencies": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/eslint-import-resolver-webpack": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.0.tgz", @@ -4704,9 +4982,9 @@ "dev": true }, "node_modules/eslint-module-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", - "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", "dev": true, "dependencies": { "debug": "^3.2.7", @@ -5012,9 +5290,9 @@ } }, "node_modules/eslint/node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5563,9 +5841,9 @@ "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" }, "node_modules/fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "dependencies": { "reusify": "^1.0.4" } @@ -5776,9 +6054,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", + "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==", "funding": [ { "type": "individual", @@ -6053,15 +6331,6 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, - "node_modules/global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dependencies": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -6106,9 +6375,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, "node_modules/graphlib": { "version": "2.1.8", @@ -6161,6 +6430,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -6321,9 +6604,9 @@ "dev": true }, "node_modules/html-entities": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", - "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz", + "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==", "dev": true }, "node_modules/http": { @@ -6514,11 +6797,6 @@ "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", - "integrity": "sha512-WzoZ96A93jOmcDOLNChMWAqy+ZU8vEYQx2DcKjgo7P5SToiJs+GL+5yQbWzH8X02Lhvv6xrGgVNa1xbki66Eow==" - }, "node_modules/immutable": { "version": "4.0.0-rc.12", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz", @@ -6652,7 +6930,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -6703,9 +6980,12 @@ "dev": true }, "node_modules/is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6723,11 +7003,12 @@ } }, "node_modules/is-boolean-object": { - "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==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6743,9 +7024,9 @@ "optional": true }, "node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "engines": { "node": ">= 0.4" }, @@ -6754,9 +7035,9 @@ } }, "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", "dependencies": { "has": "^1.0.3" }, @@ -6777,9 +7058,12 @@ } }, "node_modules/is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -6866,9 +7150,12 @@ } }, "node_modules/is-number-object": { - "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==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -6900,12 +7187,12 @@ } }, "node_modules/is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6915,17 +7202,23 @@ } }, "node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -6975,9 +7268,9 @@ } }, "node_modules/jest-worker": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", - "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "version": "27.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.1.0.tgz", + "integrity": "sha512-mO4PHb2QWLn9yRXGp7rkvXLAYuxwhq1ZYUo0LoDhg8wqvv4QizP1ZWEJOeolgbEgAWZLIEU0wsku8J+lGWfBhg==", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -7027,9 +7320,9 @@ } }, "node_modules/jsdoc-type-pratt-parser": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.0.4.tgz", - "integrity": "sha512-jzmW9gokeq9+bHPDR1nCeidMyFUikdZlbOhKzh9+/nJqB75XhpNKec1/UuxW5c4+O+Pi31Gc/dCboyfSm/pSpQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.1.1.tgz", + "integrity": "sha512-uelRmpghNwPBuZScwgBG/OzodaFk5RbO5xaivBdsAY70icWfShwZ7PCMO0x1zSkOa8T1FzHThmrdoyg/0AwV5g==", "dev": true, "engines": { "node": ">=12.0.0" @@ -7308,27 +7601,16 @@ } }, "node_modules/loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", - "json5": "^1.0.1" + "json5": "^2.1.2" }, "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/loader-utils/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" + "node": ">=8.9.0" } }, "node_modules/locate-path": { @@ -7482,11 +7764,6 @@ "node": ">=0.10.0" } }, - "node_modules/map-or-similar": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", - "integrity": "sha1-beJlMXSt+12e3DPGnT6Sobdvrwg=" - }, "node_modules/map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -7566,14 +7843,6 @@ "node": ">= 4.0.0" } }, - "node_modules/memoizerific": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", - "integrity": "sha1-fIekZGREwy11Q4VwkF8tvRsagFo=", - "dependencies": { - "map-or-similar": "^1.5.0" - } - }, "node_modules/memory-fs": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", @@ -7686,19 +7955,19 @@ } }, "node_modules/mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", "dependencies": { - "mime-db": "1.48.0" + "mime-db": "1.49.0" }, "engines": { "node": ">= 0.6" @@ -7723,14 +7992,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dependencies": { - "dom-walk": "^0.1.0" - } - }, "node_modules/mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -7855,9 +8116,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" }, "node_modules/nanoclone": { "version": "0.2.1", @@ -7991,9 +8252,9 @@ } }, "node_modules/node-releases": { - "version": "1.1.73", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", - "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==" + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==" }, "node_modules/noop-logger": { "version": "0.1.1", @@ -8021,9 +8282,9 @@ } }, "node_modules/notistack": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.9.tgz", - "integrity": "sha512-Dal2HtTpWrdYCZ3t0HhJt47NJZwVSPee36WzORRbqUkFR0k9pxFszxBuPSWshBLwF6Av8s86XPP+ED5zRz0CGw==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.10.tgz", + "integrity": "sha512-z0y4jJaVtOoH3kc3GtNUlhNTY+5LE04QDeLVujX3VPhhzg67zw055mZjrBF+nzpv3V9aiPNph1EgRU4+t8kQTQ==", "dependencies": { "clsx": "^1.1.0", "hoist-non-react-statics": "^3.3.0" @@ -9024,22 +9285,21 @@ } }, "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "object-assign": "^4.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-ace": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.1.4.tgz", - "integrity": "sha512-4DBWvElbVR3WhsA2HhQ524K9Yoa/J/sjuBV9NUZ+yar3Q4BGJRTnhY6pM0INffH1IkBZHKIOyz34XHjc7RNTpw==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.2.1.tgz", + "integrity": "sha512-2arIeMER/W6/h+QGHs0YJ0pEJo5AmBOUs/R72Poa6eXSOSTpJPp/WkwD/KE7BgNy9vZ7YjlbqA+2ZcoVf6AjsQ==", "dependencies": { "ace-builds": "^1.4.6", "diff-match-patch": "^1.0.4", @@ -9048,100 +9308,63 @@ "prop-types": "^15.7.2" }, "peerDependencies": { - "react": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0", - "react-dom": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" + "react": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0", + "react-dom": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0" } }, - "node_modules/react-deep-force-update": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz", - "integrity": "sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA==" - }, "node_modules/react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" + "scheduler": "^0.20.2" }, "peerDependencies": { - "react": "^16.13.1" + "react": "17.0.2" } }, "node_modules/react-draggable": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.4.3.tgz", - "integrity": "sha512-jV4TE59MBuWm7gb6Ns3Q1mxX8Azffb7oTtDtBgFkxRvhDp38YAARmRplrj0+XGkhOJB5XziArX+4HUUABtyZ0w==", + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.4.4.tgz", + "integrity": "sha512-6e0WdcNLwpBx/YIDpoyd2Xb04PB0elrDrulKUgdrIlwuYvxh5Ok9M+F8cljm8kPXXs43PmMzek9RrB1b7mLMqA==", "dependencies": { - "classnames": "^2.2.5", + "clsx": "^1.1.1", "prop-types": "^15.6.0" + }, + "peerDependencies": { + "react": ">= 16.3.0", + "react-dom": ">= 16.3.0" } }, "node_modules/react-flow-renderer": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/react-flow-renderer/-/react-flow-renderer-5.11.1.tgz", - "integrity": "sha512-KLTSXjhengEPSm5LPk3amnglmL352GoTR21/0efoNfBW12Pzb3shb2U1sVr9vAEpGar+13Ny/sg0wtXA1uz/9g==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/react-flow-renderer/-/react-flow-renderer-9.6.0.tgz", + "integrity": "sha512-uV0uVxaBJl++B0VGKVMr5dKaPfiRpq1IpicwTPY4xZYFrmKTipdGAoCM/SlH02UDcI886SSypdvrh4UXQA4xnQ==", "dependencies": { - "@welldone-software/why-did-you-render": "^4.3.2", - "classcat": "^4.1.0", + "@babel/runtime": "^7.14.0", + "@types/d3": "^6.7.0", + "@types/react-redux": "^7.1.16", + "classcat": "^5.0.3", "d3-selection": "^2.0.0", "d3-zoom": "^2.0.0", - "easy-peasy": "^3.3.1", "fast-deep-equal": "^3.1.3", "react-draggable": "^4.4.3", - "resize-observer": "^1.0.0" + "react-redux": "^7.2.4", + "redux": "^4.1.0" }, "peerDependencies": { - "react": "^16.13.1" + "react": "16 || 17", + "react-dom": "16 || 17" } }, "node_modules/react-hook-form": { - "version": "6.8.6", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.8.6.tgz", - "integrity": "sha512-ZCp7Y+IrlsQma08uy3H6l/qF7dZWqAWMkZ4vVbHVfh1EHjsO1SwU7aYVHgJSQpriHtEdGszCW8NS/aujGsLk0g==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.12.0.tgz", + "integrity": "sha512-5eSuWVra5f4dMSllJ6qrlkh7I/KrXd3bJen8Jsp2Ig2+3qOyeOl83cTsvDxo0KsSctsmvJBaZIwuPZRtklOc4A==", "peerDependencies": { - "react": "^16.8.0" - } - }, - "node_modules/react-hot-loader": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.13.0.tgz", - "integrity": "sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA==", - "dev": true, - "dependencies": { - "fast-levenshtein": "^2.0.6", - "global": "^4.3.0", - "hoist-non-react-statics": "^3.3.0", - "loader-utils": "^1.1.0", - "prop-types": "^15.6.1", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.1.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "@types/react": "^15.0.0 || ^16.0.0 || ^17.0.0 ", - "react": "^15.0.0 || ^16.0.0 || ^17.0.0 ", - "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 " - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-hot-loader/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" + "react": "^16.8.0 || ^17" } }, "node_modules/react-is": { @@ -9161,12 +9384,6 @@ "react-dom": ">=15.0" } }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", - "dev": true - }, "node_modules/react-minimal-pie-chart": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/react-minimal-pie-chart/-/react-minimal-pie-chart-8.2.0.tgz", @@ -9176,29 +9393,20 @@ "react-dom": "^16.8.0 || ^17.0.0" } }, - "node_modules/react-proxy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-1.1.8.tgz", - "integrity": "sha1-nb/Z2SdSjDqp9ETkVYw3gwq4wmo=", - "dependencies": { - "lodash": "^4.6.1", - "react-deep-force-update": "^1.0.0" - } - }, "node_modules/react-redux": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.1.tgz", - "integrity": "sha512-T+VfD/bvgGTUA74iW9d2i5THrDQWbweXP0AVNI8tNd1Rk5ch1rnMiJkDD67ejw7YBKM4+REvcvqRuWJb7BLuEg==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz", + "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==", "dependencies": { - "@babel/runtime": "^7.5.5", - "hoist-non-react-statics": "^3.3.0", + "@babel/runtime": "^7.12.1", + "@types/react-redux": "^7.1.16", + "hoist-non-react-statics": "^3.3.2", "loose-envify": "^1.4.0", "prop-types": "^15.7.2", - "react-is": "^16.9.0" + "react-is": "^16.13.1" }, "peerDependencies": { - "react": "^16.8.3", - "redux": "^2.0.0 || ^3.0.0 || ^4.0.0-0" + "react": "^16.8.3 || ^17" }, "peerDependenciesMeta": { "react-dom": { @@ -9209,6 +9417,15 @@ } } }, + "node_modules/react-refresh": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.10.0.tgz", + "integrity": "sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-router": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", @@ -9271,20 +9488,6 @@ "react": "^16.8.3 || ^17.0.0-0" } }, - "node_modules/react-transform-catch-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/react-transform-catch-errors/-/react-transform-catch-errors-1.0.2.tgz", - "integrity": "sha1-G01KdulycYlvwW/jCGx5PsiKnus=" - }, - "node_modules/react-transform-hmr": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz", - "integrity": "sha1-4aQL0Krvxy6N/Xp82gmvhQZjl7s=", - "dependencies": { - "global": "^4.3.0", - "react-proxy": "^1.1.7" - } - }, "node_modules/react-transition-group": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz", @@ -9409,21 +9612,6 @@ "node": ">= 0.10" } }, - "node_modules/redbox-react": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/redbox-react/-/redbox-react-1.6.0.tgz", - "integrity": "sha512-mLjM5eYR41yOp5YKHpd3syFeGq6B4Wj5vZr64nbLvTZW5ZLff4LYk7VE4ITpVxkZpCY6OZuqh0HiP3A3uEaCpg==", - "dependencies": { - "error-stack-parser": "^1.3.6", - "object-assign": "^4.0.1", - "prop-types": "^15.5.4", - "sourcemapped-stacktrace": "^1.1.6" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0", - "react-dom": "^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0" - } - }, "node_modules/redux": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", @@ -9627,11 +9815,6 @@ "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" }, - "node_modules/resize-observer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/resize-observer/-/resize-observer-1.0.2.tgz", - "integrity": "sha512-X0lHFNsxItpBRIRsdwOTkl/VguTaLGx7Gz9xoTGix9ObBN3jRYq9J/rSIuYDrey8AdU3IkfgIMpCeVSEW1QS0Q==" - }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -9772,25 +9955,25 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" }, "engines": { - "node": ">= 8.9.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", @@ -9923,12 +10106,6 @@ "node": ">=8" } }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -9952,7 +10129,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -10217,9 +10393,9 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.1.tgz", - "integrity": "sha512-8cVkRxI8Nt2wadkY6u60Y4rpW3ejA1rxgcK2JuyIhmF+RMNpTy1QRtkHIDUOf3B4HlQwakMsWbKftMv/71VMmw==" + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz", + "integrity": "sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg==" }, "node_modules/socket.io-client": { "version": "4.1.2", @@ -10300,22 +10476,6 @@ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "optional": true }, - "node_modules/sourcemapped-stacktrace": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.11.tgz", - "integrity": "sha512-O0pcWjJqzQFVsisPlPXuNawJHHg9N9UgpJ/aDmvi9+vnS3x1C0NhwkVFzzZ1VN0Xo+bekyweoqYvBw5ZBKiNnQ==", - "dependencies": { - "source-map": "0.5.6" - } - }, - "node_modules/sourcemapped-stacktrace/node_modules/source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -10343,9 +10503,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", "dev": true }, "node_modules/speakeasy": { @@ -10410,9 +10570,10 @@ } }, "node_modules/stackframe": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", - "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", + "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==", + "dev": true }, "node_modules/static-extend": { "version": "0.1.2", @@ -10693,14 +10854,6 @@ "node": ">=4" } }, - "node_modules/symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -10764,9 +10917,9 @@ } }, "node_modules/terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", + "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -10802,23 +10955,6 @@ "webpack": "^5.1.0" } }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/terser-webpack-plugin/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10997,22 +11133,30 @@ "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, - "node_modules/ts-toolbelt": { - "version": "6.15.5", - "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", - "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" - }, "node_modules/tsconfig-paths": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", - "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", + "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", "dev": true, "dependencies": { - "json5": "^2.2.0", + "@types/json5": "^0.0.29", + "json5": "^1.0.1", "minimist": "^1.2.0", "strip-bom": "^3.0.0" } }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -11483,24 +11627,6 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-hot-middleware": { "version": "2.25.0", "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.0.tgz", @@ -11522,6 +11648,12 @@ "node": ">=0.10.0" } }, + "node_modules/webpack-hot-middleware/node_modules/html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, "node_modules/webpack-hot-middleware/node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -11594,23 +11726,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack/node_modules/tapable": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", @@ -11778,36 +11893,6 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/worker-loader/node_modules/loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/worker-loader/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", @@ -11865,6 +11950,14 @@ "ultron": "1.0.x" } }, + "node_modules/xmlbuilder": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", + "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=", + "engines": { + "node": ">=4.0" + } + }, "node_modules/xmlrpc": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.2.tgz", @@ -11878,14 +11971,6 @@ "npm": ">=1.0.0" } }, - "node_modules/xmlrpc/node_modules/xmlbuilder": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", - "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -12060,9 +12145,9 @@ } }, "@babel/compat-data": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz", - "integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==" + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==" }, "@babel/core": { "version": "7.12.13", @@ -12087,11 +12172,11 @@ } }, "@babel/generator": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.8.tgz", - "integrity": "sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", + "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", "requires": { - "@babel/types": "^7.14.8", + "@babel/types": "^7.15.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -12114,11 +12199,11 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz", - "integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", + "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", "requires": { - "@babel/compat-data": "^7.14.5", + "@babel/compat-data": "^7.15.0", "@babel/helper-validator-option": "^7.14.5", "browserslist": "^4.16.6", "semver": "^6.3.0" @@ -12132,15 +12217,15 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.8.tgz", - "integrity": "sha512-bpYvH8zJBWzeqi1o+co8qOrw+EXzQ/0c74gVmY205AWXy9nifHrOg77y+1zwxX5lXE7Icq4sPlSQ4O2kWBrteQ==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", + "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", "requires": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-function-name": "^7.14.5", - "@babel/helper-member-expression-to-functions": "^7.14.7", + "@babel/helper-member-expression-to-functions": "^7.15.0", "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", "@babel/helper-split-export-declaration": "^7.14.5" } }, @@ -12188,11 +12273,11 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz", - "integrity": "sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", + "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", "requires": { - "@babel/types": "^7.14.5" + "@babel/types": "^7.15.0" } }, "@babel/helper-module-imports": { @@ -12204,18 +12289,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.8.tgz", - "integrity": "sha512-RyE+NFOjXn5A9YU1dkpeBaduagTlZ0+fccnIcAGbv1KGUlReBj7utF7oEth8IdIBQPcux0DDgW5MFBH2xu9KcA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", + "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", "requires": { "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", "@babel/helper-simple-access": "^7.14.8", "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.8", + "@babel/helper-validator-identifier": "^7.14.9", "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.8", - "@babel/types": "^7.14.8" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/helper-optimise-call-expression": { @@ -12242,14 +12327,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz", - "integrity": "sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", + "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.15.0", "@babel/helper-optimise-call-expression": "^7.14.5", - "@babel/traverse": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/helper-simple-access": { @@ -12277,9 +12362,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz", - "integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==" + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" }, "@babel/helper-validator-option": { "version": "7.14.5", @@ -12298,13 +12383,13 @@ } }, "@babel/helpers": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.8.tgz", - "integrity": "sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", + "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", "requires": { "@babel/template": "^7.14.5", - "@babel/traverse": "^7.14.8", - "@babel/types": "^7.14.8" + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/highlight": { @@ -12332,14 +12417,14 @@ } }, "@babel/parser": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.8.tgz", - "integrity": "sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA==" + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz", - "integrity": "sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", + "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", "requires": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-remap-async-to-generator": "^7.14.5", @@ -12587,17 +12672,17 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz", - "integrity": "sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", "requires": { "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-classes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz", - "integrity": "sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", + "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", "requires": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-function-name": "^7.14.5", @@ -12694,13 +12779,13 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz", - "integrity": "sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", + "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", "requires": { - "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-module-transforms": "^7.15.0", "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.14.5", + "@babel/helper-simple-access": "^7.14.8", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -12726,9 +12811,9 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz", - "integrity": "sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", "requires": { "@babel/helper-create-regexp-features-plugin": "^7.14.5" } @@ -12767,23 +12852,23 @@ } }, "@babel/plugin-transform-react-display-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.5.tgz", - "integrity": "sha512-07aqY1ChoPgIxsuDviptRpVkWCSbXWmzQqcgy65C6YSFOfPFvb/DX3bBRHh7pCd/PMEEYHYWUTSVkCbkVainYQ==", + "version": "7.15.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", + "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", "requires": { "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.5.tgz", - "integrity": "sha512-7RylxNeDnxc1OleDm0F5Q/BSL+whYRbOAR+bwgCxIr0L32v7UFh/pz1DLMZideAUxKT6eMoS2zQH6fyODLEi8Q==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", + "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", "requires": { "@babel/helper-annotate-as-pure": "^7.14.5", "@babel/helper-module-imports": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.5" + "@babel/types": "^7.14.9" } }, "@babel/plugin-transform-react-jsx-development": { @@ -12975,9 +13060,9 @@ } }, "@babel/register": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.14.5.tgz", - "integrity": "sha512-TjJpGz/aDjFGWsItRBQMOFTrmTI9tr79CHOK+KIvLeCkbxuOAk2M5QHjvruIMGoo9OuccMh5euplPzc5FjAKGg==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz", + "integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==", "requires": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", @@ -12987,9 +13072,9 @@ } }, "@babel/runtime": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.8.tgz", - "integrity": "sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -13005,27 +13090,27 @@ } }, "@babel/traverse": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.8.tgz", - "integrity": "sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", + "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", "requires": { "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.14.8", + "@babel/generator": "^7.15.0", "@babel/helper-function-name": "^7.14.5", "@babel/helper-hoist-variables": "^7.14.5", "@babel/helper-split-export-declaration": "^7.14.5", - "@babel/parser": "^7.14.8", - "@babel/types": "^7.14.8", + "@babel/parser": "^7.15.0", + "@babel/types": "^7.15.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.8.tgz", - "integrity": "sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", "requires": { - "@babel/helper-validator-identifier": "^7.14.8", + "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" } }, @@ -13058,6 +13143,14 @@ "comment-parser": "^1.1.5", "esquery": "^1.4.0", "jsdoc-type-pratt-parser": "1.0.4" + }, + "dependencies": { + "jsdoc-type-pratt-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.0.4.tgz", + "integrity": "sha512-jzmW9gokeq9+bHPDR1nCeidMyFUikdZlbOhKzh9+/nJqB75XhpNKec1/UuxW5c4+O+Pi31Gc/dCboyfSm/pSpQ==", + "dev": true + } } }, "@eslint/eslintrc": { @@ -13088,9 +13181,9 @@ } }, "@hookform/resolvers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-0.1.1.tgz", - "integrity": "sha512-IKWcvDG82D0N+3ZjMSbdHul6TgL2Dd68aXyijLvc1mUCzBChvQwS6YDsXRrc9WuIjUPb9nluaVIIrmg3V1JMGQ==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-1.3.7.tgz", + "integrity": "sha512-gC06h1hky7gM31UO4Y7DrUQjgZyNIKA3s0/TxXbdeurwhOj07l8Zx8Pomjt93ANOKoZOU2rcHKaZtrEJx1w7tg==", "requires": {} }, "@loadable/babel-plugin": { @@ -13102,9 +13195,9 @@ } }, "@loadable/component": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/@loadable/component/-/component-5.14.1.tgz", - "integrity": "sha512-UQBZfZrp1FLTf8RNhljXNHFNY4QhAA1L2+GOEeABBFre9TD0aFyQh3Sai5QxcOfy+FTbjIfti5iHaNRR7yUzEQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/@loadable/component/-/component-5.15.0.tgz", + "integrity": "sha512-g63rQzypPOZi0BeGsK4ST2MYhsFR+i7bhL8k/McUoWDNMDuTTdUlQ2GACKxqh5sI/dNC/6nVoPrycMnSylnAgQ==", "requires": { "@babel/runtime": "^7.7.7", "hoist-non-react-statics": "^3.3.1", @@ -13112,17 +13205,17 @@ } }, "@loadable/server": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/@loadable/server/-/server-5.14.2.tgz", - "integrity": "sha512-2CkcmHx5PUEBn8evIvHPyOncMtWMNTu68ON1rnyAJnd+2MCq+eWMPKIR8DAdJYf56iVArBOBI0nyo3N+6laCPw==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@loadable/server/-/server-5.15.1.tgz", + "integrity": "sha512-LdwzskjMtCMDJoz73JhbkBzTfaopx8U/Bfb0uKkqTxrsjH0uC+h4+cPo5mqKYyHz/dwPRf7aJsvQNcLQZdKHHw==", "requires": { "lodash": "^4.17.15" } }, "@loadable/webpack-plugin": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@loadable/webpack-plugin/-/webpack-plugin-5.15.0.tgz", - "integrity": "sha512-6eKaEqjGiMuMiazzVopbyMHrUflUkTOd29nUHaUmmbdo6FTGo+VqdBZ4Y1dvkEaa/b6NjkPTKbLdVmZvHVx2jg==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@loadable/webpack-plugin/-/webpack-plugin-5.15.1.tgz", + "integrity": "sha512-DqGJmazsh9XEG4CtMbaR+Ay+6+iw3NvzYqzqVIb7nsTi7UB38gEQJkT/enXdCkMZhLNSYL2HAr4rbFerhfyL2Q==", "requires": { "make-dir": "^3.0.2" }, @@ -13143,28 +13236,28 @@ } }, "@material-ui/core": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.11.0.tgz", - "integrity": "sha512-bYo9uIub8wGhZySHqLQ833zi4ZML+XCBE1XwJ8EuUVSpTWWG57Pm+YugQToJNFsEyiKFhPh8DPD0bgupz8n01g==", + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.3.tgz", + "integrity": "sha512-sdpgI/PL56QVsEJldwEe4FFaFTLUqN+rd7sSZiRCdx2E/C7z5yK0y/khAWVBH24tXwto7I1hCzNWfJGZIYJKnw==", "requires": { "@babel/runtime": "^7.4.4", - "@material-ui/styles": "^4.10.0", - "@material-ui/system": "^4.9.14", - "@material-ui/types": "^5.1.0", - "@material-ui/utils": "^4.10.2", + "@material-ui/styles": "^4.11.4", + "@material-ui/system": "^4.12.1", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.2", "@types/react-transition-group": "^4.2.0", "clsx": "^1.0.4", "hoist-non-react-statics": "^3.3.2", "popper.js": "1.16.1-lts", "prop-types": "^15.7.2", - "react-is": "^16.8.0", + "react-is": "^16.8.0 || ^17.0.0", "react-transition-group": "^4.4.0" } }, "@material-ui/lab": { - "version": "4.0.0-alpha.58", - "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.58.tgz", - "integrity": "sha512-GKHlJqLxUeHH3L3dGQ48ZavYrqGOTXkFkiEiuYMAnAvXAZP4rhMIqeHOPXSUQan4Bd8QnafDcpovOSLnadDmKw==", + "version": "4.0.0-alpha.60", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.60.tgz", + "integrity": "sha512-fadlYsPJF+0fx2lRuyqAuJj7hAS1tLDdIEEdov5jlrpb5pp4b+mRDUqQTUxi4inRZHS1bEXpU8QWUhO6xX88aA==", "requires": { "@babel/runtime": "^7.4.4", "@material-ui/utils": "^4.11.2", @@ -13265,6 +13358,29 @@ "fastq": "^1.6.0" } }, + "@pmmmwh/react-refresh-webpack-plugin": { + "version": "0.5.0-rc.3", + "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.0-rc.3.tgz", + "integrity": "sha512-ORUoyHX15P3VNjVp3Y27wnxRCBAZdTwLlg4gn8Igq3jvyXnUAAR4PQxIq4vHo0h7eTLvgOGEKCedRMIwlzYC5g==", + "dev": true, + "requires": { + "ansi-html": "^0.0.7", + "core-js-pure": "^3.8.1", + "error-stack-parser": "^2.0.6", + "html-entities": "^2.1.0", + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, "@reach/observe-rect": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", @@ -13296,6 +13412,228 @@ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" }, + "@types/d3": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-6.7.5.tgz", + "integrity": "sha512-TUZ6zuT/KIvbHSv81kwAiO5gG5aTuoiLGnWR/KxHJ15Idy/xmGUXaaF5zMG+UMIsndcGlSHTmrvwRgdvZlNKaA==", + "requires": { + "@types/d3-array": "^2", + "@types/d3-axis": "^2", + "@types/d3-brush": "^2", + "@types/d3-chord": "^2", + "@types/d3-color": "^2", + "@types/d3-contour": "^2", + "@types/d3-delaunay": "^5", + "@types/d3-dispatch": "^2", + "@types/d3-drag": "^2", + "@types/d3-dsv": "^2", + "@types/d3-ease": "^2", + "@types/d3-fetch": "^2", + "@types/d3-force": "^2", + "@types/d3-format": "^2", + "@types/d3-geo": "^2", + "@types/d3-hierarchy": "^2", + "@types/d3-interpolate": "^2", + "@types/d3-path": "^2", + "@types/d3-polygon": "^2", + "@types/d3-quadtree": "^2", + "@types/d3-random": "^2", + "@types/d3-scale": "^3", + "@types/d3-scale-chromatic": "^2", + "@types/d3-selection": "^2", + "@types/d3-shape": "^2", + "@types/d3-time": "^2", + "@types/d3-time-format": "^3", + "@types/d3-timer": "^2", + "@types/d3-transition": "^2", + "@types/d3-zoom": "^2" + } + }, + "@types/d3-array": { + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-2.12.3.tgz", + "integrity": "sha512-hN879HLPTVqZV3FQEXy7ptt083UXwguNbnxdTGzVW4y4KjX5uyNKljrQixZcSJfLyFirbpUokxpXtvR+N5+KIg==" + }, + "@types/d3-axis": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-2.1.3.tgz", + "integrity": "sha512-QjXjwZ0xzyrW2ndkmkb09ErgWDEYtbLBKGui73QLMFm3woqWpxptfD5Y7vqQdybMcu7WEbjZ5q+w2w5+uh2IjA==", + "requires": { + "@types/d3-selection": "^2" + } + }, + "@types/d3-brush": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-2.1.2.tgz", + "integrity": "sha512-DnZmjdK1ycX1CMiW9r5E3xSf1tL+bp3yob1ON8bf0xB0/odfmGXeYOTafU+2SmU1F0/dvcqaO4SMjw62onOu6A==", + "requires": { + "@types/d3-selection": "^2" + } + }, + "@types/d3-chord": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-2.0.3.tgz", + "integrity": "sha512-koIqSNQLPRQPXt7c55hgRF6Lr9Ps72r1+Biv55jdYR+SHJ463MsB2lp4ktzttFNmrQw/9yWthf/OmSUj5dNXKw==" + }, + "@types/d3-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.3.tgz", + "integrity": "sha512-+0EtEjBfKEDtH9Rk3u3kLOUXM5F+iZK+WvASPb0MhIZl8J8NUvGeZRwKCXl+P3HkYx5TdU4YtcibpqHkSR9n7w==" + }, + "@types/d3-contour": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-2.0.4.tgz", + "integrity": "sha512-WMac1xV/mXAgkgr5dUvzsBV5OrgNZDBDpJk9s3v2SadTqGgDRirKABb2Ek2H1pFlYVH4Oly9XJGnuzxKDduqWA==", + "requires": { + "@types/d3-array": "^2", + "@types/geojson": "*" + } + }, + "@types/d3-delaunay": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-5.3.1.tgz", + "integrity": "sha512-F6itHi2DxdatHil1rJ2yEFUNhejj8+0Acd55LZ6Ggwbdoks0+DxVY2cawNj16sjCBiWvubVlh6eBMVsYRNGLew==" + }, + "@types/d3-dispatch": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-2.0.1.tgz", + "integrity": "sha512-eT2K8uG3rXkmRiCpPn0rNrekuSLdBfV83vbTvfZliA5K7dbeaqWS/CBHtJ9SQoF8aDTsWSY4A0RU67U/HcKdJQ==" + }, + "@types/d3-drag": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-2.0.2.tgz", + "integrity": "sha512-m9USoFaTgVw2mmE7vLjWTApT9dMxMlql/dl3Gj503x+1a2n6K455iDWydqy2dfCpkUBCoF82yRGDgcSk9FUEyQ==", + "requires": { + "@types/d3-selection": "^2" + } + }, + "@types/d3-dsv": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-2.0.2.tgz", + "integrity": "sha512-T4aL2ZzaILkLGKbxssipYVRs8334PSR9FQzTGftZbc3jIPGkiXXS7qUCh8/q8UWFzxBZQ92dvR0v7+AM9wL2PA==" + }, + "@types/d3-ease": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-2.0.1.tgz", + "integrity": "sha512-Af1ftZXv82ktPCk1+Vxe7f+VSfxDsQ1mwwakDl17+UzI/ii3vsDIAzaBDDSEQd2Cg9BYPTSx8wXH8rJNDuSjeg==" + }, + "@types/d3-fetch": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-2.0.2.tgz", + "integrity": "sha512-sllsCSWrNdSvzOJWN5RnxkmtvW9pCttONGajSxHX9FUQ9kOkGE391xlz6VDBdZxLnpwjp3I+mipbwsaCjq4m5A==", + "requires": { + "@types/d3-dsv": "^2" + } + }, + "@types/d3-force": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-2.1.4.tgz", + "integrity": "sha512-1XVRc2QbeUSL1FRVE53Irdz7jY+drTwESHIMVirCwkAAMB/yVC8ezAfx/1Alq0t0uOnphoyhRle1ht5CuPgSJQ==" + }, + "@types/d3-format": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-2.0.2.tgz", + "integrity": "sha512-OhQPuTeeMhD9A0Ksqo4q1S9Z1Q57O/t4tTPBxBQxRB4IERnxeoEYLPe72fA/GYpPSUrfKZVOgLHidkxwbzLdJA==" + }, + "@types/d3-geo": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-2.0.3.tgz", + "integrity": "sha512-kFwLEMXq1mGJ2Eho7KrOUYvLcc2YTDeKj+kTFt87JlEbRQ0rgo8ZENNb5vTYmZrJ2xL/vVM5M7yqVZGOPH2JFg==", + "requires": { + "@types/geojson": "*" + } + }, + "@types/d3-hierarchy": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-2.0.2.tgz", + "integrity": "sha512-6PlBRwbjUPPt0ZFq/HTUyOAdOF3p73EUYots74lHMUyAVtdFSOS/hAeNXtEIM9i7qRDntuIblXxHGUMb9MuNRA==" + }, + "@types/d3-interpolate": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-2.0.2.tgz", + "integrity": "sha512-lElyqlUfIPyWG/cD475vl6msPL4aMU7eJvx1//Q177L8mdXoVPFl1djIESF2FKnc0NyaHvQlJpWwKJYwAhUoCw==", + "requires": { + "@types/d3-color": "^2" + } + }, + "@types/d3-path": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-2.0.1.tgz", + "integrity": "sha512-6K8LaFlztlhZO7mwsZg7ClRsdLg3FJRzIIi6SZXDWmmSJc2x8dd2VkESbLXdk3p8cuvz71f36S0y8Zv2AxqvQw==" + }, + "@types/d3-polygon": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-2.0.1.tgz", + "integrity": "sha512-X3XTIwBxlzRIWe4yaD1KsmcfItjSPLTGL04QDyP08jyHDVsnz3+NZJMwtD4vCaTAVpGSjbqS+jrBo8cO2V/xMA==" + }, + "@types/d3-quadtree": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-2.0.2.tgz", + "integrity": "sha512-KgWL4jlz8QJJZX01E4HKXJ9FLU94RTuObsAYqsPp8YOAcYDmEgJIQJ+ojZcnKUAnrUb78ik8JBKWas5XZPqJnQ==" + }, + "@types/d3-random": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-2.2.1.tgz", + "integrity": "sha512-5vvxn6//poNeOxt1ZwC7QU//dG9QqABjy1T7fP/xmFHY95GnaOw3yABf29hiu5SR1Oo34XcpyHFbzod+vemQjA==" + }, + "@types/d3-scale": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-3.3.2.tgz", + "integrity": "sha512-gGqr7x1ost9px3FvIfUMi5XA/F/yAf4UkUDtdQhpH92XCT0Oa7zkkRzY61gPVJq+DxpHn/btouw5ohWkbBsCzQ==", + "requires": { + "@types/d3-time": "^2" + } + }, + "@types/d3-scale-chromatic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-2.0.1.tgz", + "integrity": "sha512-3EuZlbPu+pvclZcb1DhlymTWT2W+lYsRKBjvkH2ojDbCWDYavifqu1vYX9WGzlPgCgcS4Alhk1+zapXbGEGylQ==" + }, + "@types/d3-selection": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-2.0.1.tgz", + "integrity": "sha512-3mhtPnGE+c71rl/T5HMy+ykg7migAZ4T6gzU0HxpgBFKcasBrSnwRbYV1/UZR6o5fkpySxhWxAhd7yhjj8jL7g==" + }, + "@types/d3-shape": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-2.1.3.tgz", + "integrity": "sha512-HAhCel3wP93kh4/rq+7atLdybcESZ5bRHDEZUojClyZWsRuEMo3A52NGYJSh48SxfxEU6RZIVbZL2YFZ2OAlzQ==", + "requires": { + "@types/d3-path": "^2" + } + }, + "@types/d3-time": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-2.1.1.tgz", + "integrity": "sha512-9MVYlmIgmRR31C5b4FVSWtuMmBHh2mOWQYfl7XAYOa8dsnb7iEmUmRSWSFgXFtkjxO65d7hTUHQC+RhR/9IWFg==" + }, + "@types/d3-time-format": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-3.0.1.tgz", + "integrity": "sha512-5GIimz5IqaRsdnxs4YlyTZPwAMfALu/wA4jqSiuqgdbCxUZ2WjrnwANqOtoBJQgeaUTdYNfALJO0Yb0YrDqduA==" + }, + "@types/d3-timer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.1.tgz", + "integrity": "sha512-TF8aoF5cHcLO7W7403blM7L1T+6NF3XMyN3fxyUolq2uOcFeicG/khQg/dGxiCJWoAcmYulYN7LYSRKO54IXaA==" + }, + "@types/d3-transition": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-2.0.2.tgz", + "integrity": "sha512-376TICEykdXOEA9uUIYpjshEkxfGwCPnkHUl8+6gphzKbf5NMnUhKT7wR59Yxrd9wtJ/rmE3SVLx6/8w4eY6Zg==", + "requires": { + "@types/d3-selection": "^2" + } + }, + "@types/d3-zoom": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-2.0.3.tgz", + "integrity": "sha512-9X9uDYKk2U8w775OHj36s9Q7GkNAnJKGw6+sbkP5DpHSjELwKvTGzEK6+IISYfLpJRL/V3mRXMhgDnnJ5LkwJg==", + "requires": { + "@types/d3-interpolate": "^2", + "@types/d3-selection": "^2" + } + }, "@types/eslint": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", @@ -13319,6 +13657,20 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==" }, + "@types/geojson": { + "version": "7946.0.8", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", + "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" + }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "@types/http-proxy": { "version": "1.17.7", "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", @@ -13328,19 +13680,25 @@ } }, "@types/json-schema": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz", - "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true }, "@types/lodash": { - "version": "4.14.171", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.171.tgz", - "integrity": "sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg==" + "version": "4.14.172", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.172.tgz", + "integrity": "sha512-/BHF5HAx3em7/KkzVKm3LrsD6HZAXuXO1AJZQ3cRRBZj4oHZDviWPYu0aEplAqDFNHZPW6d3G7KN+ONcCCC7pw==" }, "@types/node": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.1.tgz", - "integrity": "sha512-UW7cbLqf/Wu5XH2RKKY1cHwUNLicIDRLMraYKz+HHAerJ0ZffUEk+fMnd8qU2JaS6cAy0r8tsaf7yqHASf/Y0Q==" + "version": "16.7.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.8.tgz", + "integrity": "sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg==" }, "@types/prop-types": { "version": "15.7.4", @@ -13348,9 +13706,9 @@ "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" }, "@types/react": { - "version": "17.0.15", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.15.tgz", - "integrity": "sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==", + "version": "17.0.19", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.19.tgz", + "integrity": "sha512-sX1HisdB1/ZESixMTGnMxH9TDe8Sk709734fEQZzCV/4lSu9kJCPbo2PbTRoZM+53Pp0P10hYVyReUueGwUi4A==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -13364,6 +13722,17 @@ } } }, + "@types/react-redux": { + "version": "7.1.18", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.18.tgz", + "integrity": "sha512-9iwAsPyJ9DLTRH+OFeIrm9cAbIj1i2ANL3sKQFATqnPWRbg+jEFXyZOKHiQK/N86pNRXbb4HRxAxo0SIX1XwzQ==", + "requires": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, "@types/react-transition-group": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.2.tgz", @@ -13523,19 +13892,11 @@ } }, "@webpack-cli/serve": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", - "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.2.tgz", + "integrity": "sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==", "requires": {} }, - "@welldone-software/why-did-you-render": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-4.3.2.tgz", - "integrity": "sha512-pzaFmUUH+FjbsDgcMB1xNPncIaxibvo0FLbGySLIh+v+7Bp5pqSJFO6zlqo4orPLm3nAdYEgL2vrlj8befoypg==", - "requires": { - "lodash": "^4" - } - }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -13797,9 +14158,9 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" }, "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", + "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" }, "async-each": { "version": "1.0.3", @@ -13848,6 +14209,36 @@ "make-dir": "^2.1.0", "pify": "^4.0.1", "schema-utils": "^2.6.5" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + } } }, "babel-plugin-dynamic-import-node": { @@ -13870,25 +14261,6 @@ "resolve": "^1.13.1" } }, - "babel-plugin-react-transform": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz", - "integrity": "sha1-UVu/qZaJOYEULZCx+bFjXeKZUQk=", - "requires": { - "lodash": "^4.6.1" - } - }, - "babel-preset-react-hmre": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/babel-preset-react-hmre/-/babel-preset-react-hmre-1.1.1.tgz", - "integrity": "sha1-0hbmDLW41Mhz4Z7Q9U6v8UN7xJI=", - "requires": { - "babel-plugin-react-transform": "^2.0.2", - "react-transform-catch-errors": "^1.0.2", - "react-transform-hmr": "^1.0.3", - "redbox-react": "^1.2.2" - } - }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -14164,15 +14536,15 @@ } }, "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "version": "4.16.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", + "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", + "caniuse-lite": "^1.0.30001251", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.811", "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "node-releases": "^1.1.75" } }, "btoa": { @@ -14216,9 +14588,9 @@ "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "buffer-xor": { "version": "1.0.3", @@ -14274,9 +14646,9 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { - "version": "1.0.30001247", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001247.tgz", - "integrity": "sha512-4rS7co+7+AoOSPRPOPUt5/GdaqZc0EsUpWk66ofE3HJTAajUK2Ss2VwoNzVN69ghg8lYYlh0an0Iy4LIHHo9UQ==" + "version": "1.0.30001252", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", + "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==" }, "chalk": { "version": "2.4.2", @@ -14474,14 +14846,9 @@ } }, "classcat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/classcat/-/classcat-4.1.0.tgz", - "integrity": "sha512-RA8O5oCi1I1CF6rR4cRBROh8MtZzM4w7xKLm0jd+S6UN2G4FIto+9DVOeFc46JEZFN5PVe/EZWLQO1VU/AUH4A==" - }, - "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/classcat/-/classcat-5.0.3.tgz", + "integrity": "sha512-6dK2ke4VEJZOFx2ZfdDAl5OhEL8lvkl6EHF92IfRePfHxQTqir5NlcNVUv+2idjDqCX2NDc8m8YSAI5NI975ZQ==" }, "cliui": { "version": "5.0.0", @@ -14570,9 +14937,9 @@ } }, "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" }, "colors": { "version": "1.4.0", @@ -14732,16 +15099,6 @@ "requires": { "is-glob": "^4.0.1" } - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } } } }, @@ -14751,11 +15108,11 @@ "integrity": "sha512-tKs41J7NJVuaya8DxIOCnl8QuPHx5/ZVbFo1oKgVl1qHFBBrDctzQGtuLjPpRdNTWmKPH6oEvgN/MUID+l485Q==" }, "core-js-compat": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.15.2.tgz", - "integrity": "sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ==", + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.4.tgz", + "integrity": "sha512-IzCSomxRdahCYb6G3HiN6pl3JCiM0NMunRcNa1pIeC7g17Vd6Ue3AT9anQiENPIm/svThUVer1pIbLMDERIsFw==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.16.8", "semver": "7.0.0" }, "dependencies": { @@ -14766,6 +15123,12 @@ } } }, + "core-js-pure": { + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.16.4.tgz", + "integrity": "sha512-bY1K3/1Jy9D8Jd12eoeVahNXHLfHFb4TXWI8SQ4y8bImR9qDPmGITBAfmcffTkgUvbJn87r8dILOTWW5kZzkgA==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -14952,11 +15315,6 @@ "lodash": "^4.17.15" } }, - "debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" - }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -15103,11 +15461,6 @@ } } }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" - }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -15119,29 +15472,6 @@ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==" }, - "easy-peasy": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/easy-peasy/-/easy-peasy-3.3.1.tgz", - "integrity": "sha512-c1M6xrMQyOl3JCwUdZCMcAMAuKQAxG76n2OydBTpvCPS7OSK7ZVseJL96KeCB3fpvKEvIQC8h8nShObtVPrzaA==", - "requires": { - "debounce": "^1.2.0", - "immer-peasy": "3.1.3", - "is-plain-object": "^3.0.0", - "memoizerific": "^1.11.3", - "prop-types": "^15.6.2", - "redux": "^4.0.5", - "redux-thunk": "^2.3.0", - "symbol-observable": "^1.2.0", - "ts-toolbelt": "^6.1.6" - }, - "dependencies": { - "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==" - } - } - }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -15156,9 +15486,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.786", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.786.tgz", - "integrity": "sha512-AmvbLBj3hepRk8v/DHrFF8gINxOFfDbrn6Ts3PcK46/FBdQb5OMmpamSpZQXSkfi77FfBzYtQtAk+00LCLYMVw==" + "version": "1.3.824", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.824.tgz", + "integrity": "sha512-Fk+5aD0HDi9i9ZKt9n2VPOZO1dQy7PV++hz2wJ/KIn+CvVfu4fny39squHtyVDPuHNuoJGAZIbuReEklqYIqfA==" }, "elliptic": { "version": "6.5.4", @@ -15263,9 +15593,9 @@ } }, "engine.io-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz", - "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.3.tgz", + "integrity": "sha512-xEAAY0msNnESNPc00e19y5heTPX4y/TJ36gr8t1voOaNmTojP9b3oK3BbJLFufW2XFPQaaijpFewm2g2Um3uqA==", "requires": { "base64-arraybuffer": "0.1.4" } @@ -15304,17 +15634,18 @@ } }, "error-stack-parser": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", - "integrity": "sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "dev": true, "requires": { - "stackframe": "^0.3.1" + "stackframe": "^1.1.1" } }, "es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -15322,11 +15653,12 @@ "get-intrinsic": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", "is-callable": "^1.2.3", "is-negative-zero": "^2.0.1", "is-regex": "^1.1.3", "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -15417,9 +15749,9 @@ } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -15498,29 +15830,23 @@ "requires": {} }, "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -15560,9 +15886,9 @@ } }, "eslint-module-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", - "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", "dev": true, "requires": { "debug": "^3.2.7", @@ -16156,9 +16482,9 @@ "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" }, "fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "requires": { "reusify": "^1.0.4" } @@ -16332,9 +16658,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "follow-redirects": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==" + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", + "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==" }, "for-in": { "version": "1.0.2", @@ -16530,15 +16856,6 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, - "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "requires": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -16570,9 +16887,9 @@ } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, "graphlib": { "version": "2.1.8", @@ -16610,6 +16927,14 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -16739,9 +17064,9 @@ "dev": true }, "html-entities": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", - "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz", + "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==", "dev": true }, "http": { @@ -16882,11 +17207,6 @@ "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", - "integrity": "sha512-WzoZ96A93jOmcDOLNChMWAqy+ZU8vEYQx2DcKjgo7P5SToiJs+GL+5yQbWzH8X02Lhvv6xrGgVNa1xbki66Eow==" - }, "immutable": { "version": "4.0.0-rc.12", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz", @@ -16986,7 +17306,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, "requires": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -17025,9 +17344,12 @@ "dev": true }, "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } }, "is-binary-path": { "version": "1.0.1", @@ -17039,11 +17361,12 @@ } }, "is-boolean-object": { - "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==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "requires": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-buffer": { @@ -17053,14 +17376,14 @@ "optional": true }, "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, "is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", "requires": { "has": "^1.0.3" } @@ -17075,9 +17398,12 @@ } }, "is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-descriptor": { "version": "1.0.2", @@ -17145,9 +17471,12 @@ } }, "is-number-object": { - "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==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-plain-object": { "version": "2.0.4", @@ -17158,23 +17487,26 @@ } }, "is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "requires": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" } }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" }, "is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-symbol": { "version": "1.0.4", @@ -17206,9 +17538,9 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "jest-worker": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", - "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "version": "27.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.1.0.tgz", + "integrity": "sha512-mO4PHb2QWLn9yRXGp7rkvXLAYuxwhq1ZYUo0LoDhg8wqvv4QizP1ZWEJOeolgbEgAWZLIEU0wsku8J+lGWfBhg==", "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -17245,9 +17577,9 @@ } }, "jsdoc-type-pratt-parser": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.0.4.tgz", - "integrity": "sha512-jzmW9gokeq9+bHPDR1nCeidMyFUikdZlbOhKzh9+/nJqB75XhpNKec1/UuxW5c4+O+Pi31Gc/dCboyfSm/pSpQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.1.1.tgz", + "integrity": "sha512-uelRmpghNwPBuZScwgBG/OzodaFk5RbO5xaivBdsAY70icWfShwZ7PCMO0x1zSkOa8T1FzHThmrdoyg/0AwV5g==", "dev": true }, "jsesc": { @@ -17480,23 +17812,13 @@ "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==" }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - } + "json5": "^2.1.2" } }, "locate-path": { @@ -17629,11 +17951,6 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "optional": true }, - "map-or-similar": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/map-or-similar/-/map-or-similar-1.5.0.tgz", - "integrity": "sha1-beJlMXSt+12e3DPGnT6Sobdvrwg=" - }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -17691,14 +18008,6 @@ "fs-monkey": "1.0.3" } }, - "memoizerific": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/memoizerific/-/memoizerific-1.11.3.tgz", - "integrity": "sha1-fIekZGREwy11Q4VwkF8tvRsagFo=", - "requires": { - "map-or-similar": "^1.5.0" - } - }, "memory-fs": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", @@ -17791,16 +18100,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" }, "mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", "requires": { - "mime-db": "1.48.0" + "mime-db": "1.49.0" } }, "mimic-fn": { @@ -17813,14 +18122,6 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, "mini-create-react-context": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", @@ -17927,9 +18228,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" }, "nanoclone": { "version": "0.2.1", @@ -18050,9 +18351,9 @@ "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=" }, "node-releases": { - "version": "1.1.73", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", - "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==" + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==" }, "noop-logger": { "version": "0.1.1", @@ -18077,9 +18378,9 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "notistack": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.9.tgz", - "integrity": "sha512-Dal2HtTpWrdYCZ3t0HhJt47NJZwVSPee36WzORRbqUkFR0k9pxFszxBuPSWshBLwF6Av8s86XPP+ED5zRz0CGw==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.10.tgz", + "integrity": "sha512-z0y4jJaVtOoH3kc3GtNUlhNTY+5LE04QDeLVujX3VPhhzg67zw055mZjrBF+nzpv3V9aiPNph1EgRU4+t8kQTQ==", "requires": { "clsx": "^1.1.0", "hoist-non-react-statics": "^3.3.0" @@ -18832,19 +19133,18 @@ } }, "react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "requires": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "object-assign": "^4.1.1" } }, "react-ace": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.1.4.tgz", - "integrity": "sha512-4DBWvElbVR3WhsA2HhQ524K9Yoa/J/sjuBV9NUZ+yar3Q4BGJRTnhY6pM0INffH1IkBZHKIOyz34XHjc7RNTpw==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-9.2.1.tgz", + "integrity": "sha512-2arIeMER/W6/h+QGHs0YJ0pEJo5AmBOUs/R72Poa6eXSOSTpJPp/WkwD/KE7BgNy9vZ7YjlbqA+2ZcoVf6AjsQ==", "requires": { "ace-builds": "^1.4.6", "diff-match-patch": "^1.0.4", @@ -18853,76 +19153,48 @@ "prop-types": "^15.7.2" } }, - "react-deep-force-update": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz", - "integrity": "sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA==" - }, "react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" + "scheduler": "^0.20.2" } }, "react-draggable": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.4.3.tgz", - "integrity": "sha512-jV4TE59MBuWm7gb6Ns3Q1mxX8Azffb7oTtDtBgFkxRvhDp38YAARmRplrj0+XGkhOJB5XziArX+4HUUABtyZ0w==", + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/react-draggable/-/react-draggable-4.4.4.tgz", + "integrity": "sha512-6e0WdcNLwpBx/YIDpoyd2Xb04PB0elrDrulKUgdrIlwuYvxh5Ok9M+F8cljm8kPXXs43PmMzek9RrB1b7mLMqA==", "requires": { - "classnames": "^2.2.5", + "clsx": "^1.1.1", "prop-types": "^15.6.0" } }, "react-flow-renderer": { - "version": "5.11.1", - "resolved": "https://registry.npmjs.org/react-flow-renderer/-/react-flow-renderer-5.11.1.tgz", - "integrity": "sha512-KLTSXjhengEPSm5LPk3amnglmL352GoTR21/0efoNfBW12Pzb3shb2U1sVr9vAEpGar+13Ny/sg0wtXA1uz/9g==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/react-flow-renderer/-/react-flow-renderer-9.6.0.tgz", + "integrity": "sha512-uV0uVxaBJl++B0VGKVMr5dKaPfiRpq1IpicwTPY4xZYFrmKTipdGAoCM/SlH02UDcI886SSypdvrh4UXQA4xnQ==", "requires": { - "@welldone-software/why-did-you-render": "^4.3.2", - "classcat": "^4.1.0", + "@babel/runtime": "^7.14.0", + "@types/d3": "^6.7.0", + "@types/react-redux": "^7.1.16", + "classcat": "^5.0.3", "d3-selection": "^2.0.0", "d3-zoom": "^2.0.0", - "easy-peasy": "^3.3.1", "fast-deep-equal": "^3.1.3", "react-draggable": "^4.4.3", - "resize-observer": "^1.0.0" + "react-redux": "^7.2.4", + "redux": "^4.1.0" } }, "react-hook-form": { - "version": "6.8.6", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.8.6.tgz", - "integrity": "sha512-ZCp7Y+IrlsQma08uy3H6l/qF7dZWqAWMkZ4vVbHVfh1EHjsO1SwU7aYVHgJSQpriHtEdGszCW8NS/aujGsLk0g==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-6.12.0.tgz", + "integrity": "sha512-5eSuWVra5f4dMSllJ6qrlkh7I/KrXd3bJen8Jsp2Ig2+3qOyeOl83cTsvDxo0KsSctsmvJBaZIwuPZRtklOc4A==", "requires": {} }, - "react-hot-loader": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.13.0.tgz", - "integrity": "sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA==", - "dev": true, - "requires": { - "fast-levenshtein": "^2.0.6", - "global": "^4.3.0", - "hoist-non-react-statics": "^3.3.0", - "loader-utils": "^1.1.0", - "prop-types": "^15.6.1", - "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.1.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -18936,39 +19208,31 @@ "prop-types": "^15.6.2" } }, - "react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", - "dev": true - }, "react-minimal-pie-chart": { "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==", "requires": {} }, - "react-proxy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-1.1.8.tgz", - "integrity": "sha1-nb/Z2SdSjDqp9ETkVYw3gwq4wmo=", - "requires": { - "lodash": "^4.6.1", - "react-deep-force-update": "^1.0.0" - } - }, "react-redux": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.1.tgz", - "integrity": "sha512-T+VfD/bvgGTUA74iW9d2i5THrDQWbweXP0AVNI8tNd1Rk5ch1rnMiJkDD67ejw7YBKM4+REvcvqRuWJb7BLuEg==", + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz", + "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==", "requires": { - "@babel/runtime": "^7.5.5", - "hoist-non-react-statics": "^3.3.0", + "@babel/runtime": "^7.12.1", + "@types/react-redux": "^7.1.16", + "hoist-non-react-statics": "^3.3.2", "loose-envify": "^1.4.0", "prop-types": "^15.7.2", - "react-is": "^16.9.0" + "react-is": "^16.13.1" } }, + "react-refresh": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.10.0.tgz", + "integrity": "sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==", + "dev": true + }, "react-router": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", @@ -19021,20 +19285,6 @@ "integrity": "sha512-jBlj70iBwOTvvImsU9t01LjFjy4sXEtclBovl3mTiqjz23Reu0DKnRza4zlLtOPACx6j2/7MrQIthIK1Wi+LIA==", "requires": {} }, - "react-transform-catch-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/react-transform-catch-errors/-/react-transform-catch-errors-1.0.2.tgz", - "integrity": "sha1-G01KdulycYlvwW/jCGx5PsiKnus=" - }, - "react-transform-hmr": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz", - "integrity": "sha1-4aQL0Krvxy6N/Xp82gmvhQZjl7s=", - "requires": { - "global": "^4.3.0", - "react-proxy": "^1.1.7" - } - }, "react-transition-group": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz", @@ -19135,17 +19385,6 @@ "resolve": "^1.9.0" } }, - "redbox-react": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/redbox-react/-/redbox-react-1.6.0.tgz", - "integrity": "sha512-mLjM5eYR41yOp5YKHpd3syFeGq6B4Wj5vZr64nbLvTZW5ZLff4LYk7VE4ITpVxkZpCY6OZuqh0HiP3A3uEaCpg==", - "requires": { - "error-stack-parser": "^1.3.6", - "object-assign": "^4.0.1", - "prop-types": "^15.5.4", - "sourcemapped-stacktrace": "^1.1.6" - } - }, "redux": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", @@ -19308,11 +19547,6 @@ "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" }, - "resize-observer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/resize-observer/-/resize-observer-1.0.2.tgz", - "integrity": "sha512-X0lHFNsxItpBRIRsdwOTkl/VguTaLGx7Gz9xoTGix9ObBN3jRYq9J/rSIuYDrey8AdU3IkfgIMpCeVSEW1QS0Q==" - }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -19415,21 +19649,21 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } }, @@ -19545,12 +19779,6 @@ "kind-of": "^6.0.2" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -19568,7 +19796,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, "requires": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -19783,9 +20010,9 @@ } }, "socket.io-adapter": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.1.tgz", - "integrity": "sha512-8cVkRxI8Nt2wadkY6u60Y4rpW3ejA1rxgcK2JuyIhmF+RMNpTy1QRtkHIDUOf3B4HlQwakMsWbKftMv/71VMmw==" + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz", + "integrity": "sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg==" }, "socket.io-client": { "version": "4.1.2", @@ -19856,21 +20083,6 @@ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "optional": true }, - "sourcemapped-stacktrace": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.11.tgz", - "integrity": "sha512-O0pcWjJqzQFVsisPlPXuNawJHHg9N9UgpJ/aDmvi9+vnS3x1C0NhwkVFzzZ1VN0Xo+bekyweoqYvBw5ZBKiNnQ==", - "requires": { - "source-map": "0.5.6" - }, - "dependencies": { - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" - } - } - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -19898,9 +20110,9 @@ } }, "spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", "dev": true }, "speakeasy": { @@ -19952,9 +20164,10 @@ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, "stackframe": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", - "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", + "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==", + "dev": true }, "static-extend": { "version": "0.1.2", @@ -20168,11 +20381,6 @@ "has-flag": "^3.0.0" } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, "table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -20226,9 +20434,9 @@ } }, "terser": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", - "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", + "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -20260,16 +20468,6 @@ "terser": "^5.7.0" }, "dependencies": { - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -20409,20 +20607,27 @@ "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, - "ts-toolbelt": { - "version": "6.15.5", - "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", - "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" - }, "tsconfig-paths": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", - "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", + "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", "dev": true, "requires": { - "json5": "^2.2.0", + "@types/json5": "^0.0.29", + "json5": "^1.0.1", "minimist": "^1.2.0", "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } } }, "tty-browserify": { @@ -20744,16 +20949,6 @@ "tapable": "^2.2.0" } }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, "tapable": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", @@ -20805,19 +21000,6 @@ "mime-types": "^2.1.31", "range-parser": "^1.2.1", "schema-utils": "^3.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } } }, "webpack-hot-middleware": { @@ -20838,6 +21020,12 @@ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, + "html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -21000,28 +21188,6 @@ "requires": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } } }, "wrap-ansi": { @@ -21071,6 +21237,11 @@ "ultron": "1.0.x" } }, + "xmlbuilder": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", + "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=" + }, "xmlrpc": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.2.tgz", @@ -21078,13 +21249,6 @@ "requires": { "sax": "1.2.x", "xmlbuilder": "8.2.x" - }, - "dependencies": { - "xmlbuilder": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", - "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=" - } } }, "xtend": { diff --git a/src/fireedge/package.json b/src/fireedge/package.json index fc5b229606..8ffe8d688f 100644 --- a/src/fireedge/package.json +++ b/src/fireedge/package.json @@ -30,6 +30,7 @@ "vms" ], "devDependencies": { + "@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.3", "cross-env": "7.0.2", "eslint": "7.11.0", "eslint-config-prettier": "6.11.0", @@ -46,7 +47,7 @@ "eslint-plugin-standard": "4.0.1", "opennebula-generatepotfile": "1.0.0", "opennebula-potojson": "1.0.0", - "react-hot-loader": "4.13.0", + "react-refresh": "0.10.0", "webpack-dev-middleware": "5.0.0", "webpack-hot-middleware": "2.25.0" }, @@ -60,13 +61,13 @@ "@babel/plugin-proposal-optional-chaining": "7.12.13", "@babel/preset-env": "7.12.13", "@babel/preset-react": "7.12.13", - "@hookform/resolvers": "0.1.1", + "@hookform/resolvers": "1.3.7", "@loadable/babel-plugin": "5.13.2", - "@loadable/component": "5.14.1", - "@loadable/server": "5.14.2", - "@loadable/webpack-plugin": "5.15.0", - "@material-ui/core": "4.11.0", - "@material-ui/lab": "4.0.0-alpha.58", + "@loadable/component": "5.15.0", + "@loadable/server": "5.15.1", + "@loadable/webpack-plugin": "5.15.1", + "@material-ui/core": "4.12.3", + "@material-ui/lab": "4.0.0-alpha.60", "@reduxjs/toolkit": "1.5.1", "ace-builds": "1.4.12", "atob": "2.1.2", @@ -74,7 +75,6 @@ "babel-eslint": "10.1.0", "babel-loader": "8.2.1", "babel-plugin-module-resolver": "4.0.0", - "babel-preset-react-hmre": "1.1.1", "btoa": "1.2.1", "clsx": "1.1.1", "compression": "1.7.4", @@ -101,20 +101,20 @@ "luxon": "1.25.0", "marked": "2.0.0", "morgan": "1.10.0", - "notistack": "1.0.9", + "notistack": "1.0.10", "opennebula-guacamole": "1.0.0", "path": "0.12.7", "process": "0.11.10", "prop-types": "15.7.2", "qrcode": "1.4.4", - "react": "16.14.0", - "react-ace": "9.1.4", - "react-dom": "16.13.1", - "react-flow-renderer": "5.11.1", - "react-hook-form": "6.8.6", + "react": "17.0.2", + "react-ace": "9.2.1", + "react-dom": "17.0.2", + "react-flow-renderer": "9.6.0", + "react-hook-form": "6.12.0", "react-json-pretty": "2.2.0", "react-minimal-pie-chart": "8.2.0", - "react-redux": "7.2.1", + "react-redux": "7.2.4", "react-router": "5.2.0", "react-router-dom": "5.2.0", "react-table": "7.7.0", diff --git a/src/fireedge/src/client/apps/provision/_app.js b/src/fireedge/src/client/apps/provision/_app.js index abfdfee543..356c9cb9fd 100644 --- a/src/fireedge/src/client/apps/provision/_app.js +++ b/src/fireedge/src/client/apps/provision/_app.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useEffect, useMemo, JSXElementConstructor } from 'react' import Router from 'client/router' import { ENDPOINTS, PATH } from 'client/apps/provision/routes' @@ -34,7 +34,7 @@ const APP_NAME = _APPS.provision.name /** * Provision App component. * - * @returns {React.JSXElementConstructor} App rendered. + * @returns {JSXElementConstructor} App rendered. */ const ProvisionApp = () => { const { isLogged, jwt, firstRender } = useAuth() @@ -44,7 +44,7 @@ const ProvisionApp = () => { const { getProvisionsTemplates } = useProvisionApi() const { changeTitle } = useGeneralApi() - React.useEffect(() => { + useEffect(() => { (async () => { try { if (jwt) { @@ -58,7 +58,7 @@ const ProvisionApp = () => { })() }, [jwt]) - const endpoints = React.useMemo(() => [ + const endpoints = useMemo(() => [ ...ENDPOINTS, ...(isDevelopment() ? DEV_ENDPOINTS : []) ], []) diff --git a/src/fireedge/src/client/apps/provision/index.js b/src/fireedge/src/client/apps/provision/index.js index 53fbc98d74..933fd88921 100644 --- a/src/fireedge/src/client/apps/provision/index.js +++ b/src/fireedge/src/client/apps/provision/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { StaticRouter, BrowserRouter } from 'react-router-dom' @@ -36,9 +36,9 @@ const APP_NAME = _APPS.provision.name * @param {Store} props.store - Redux store * @param {string|object} props.location - The URL the server received * @param {object} props.context - Context object contains the results of the render - * @returns {React.JSXElementConstructor} Provision App + * @returns {JSXElementConstructor} Provision App */ -const Provision = ({ store, location, context }) => ( +const Provision = ({ store = {}, location = '', context = {} }) => ( @@ -64,14 +64,8 @@ const Provision = ({ store, location, context }) => ( Provision.propTypes = { location: PropTypes.string, - context: PropTypes.shape({}), - store: PropTypes.shape({}) -} - -Provision.defaultProps = { - location: '', - context: {}, - store: {} + context: PropTypes.object, + store: PropTypes.object } Provision.displayName = 'ProvisionApp' diff --git a/src/fireedge/src/client/apps/sunstone/_app.js b/src/fireedge/src/client/apps/sunstone/_app.js index a78e2190e4..669b1d1b03 100644 --- a/src/fireedge/src/client/apps/sunstone/_app.js +++ b/src/fireedge/src/client/apps/sunstone/_app.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useEffect, useMemo, JSXElementConstructor } from 'react' import Router from 'client/router' import { ENDPOINTS, PATH, getEndpointsByView } from 'client/apps/sunstone/routes' @@ -34,20 +34,21 @@ const APP_NAME = _APPS.sunstone.name /** * Sunstone App component. * - * @returns {React.JSXElementConstructor} App rendered. + * @returns {JSXElementConstructor} App rendered. */ const SunstoneApp = () => { const { isLogged, jwt, firstRender, view, views } = useAuth() - const { getAuthUser, logout, getSunstoneViews } = useAuthApi() + const { getAuthUser, logout, getSunstoneViews, getSunstoneConfig } = useAuthApi() const { changeTitle } = useGeneralApi() - React.useEffect(() => { + useEffect(() => { (async () => { try { if (jwt) { changeTitle(APP_NAME) getAuthUser() await getSunstoneViews() + await getSunstoneConfig() } } catch { logout() @@ -55,7 +56,7 @@ const SunstoneApp = () => { })() }, [jwt]) - const endpoints = React.useMemo(() => [ + const endpoints = useMemo(() => [ ...ENDPOINTS, ...(view ? getEndpointsByView(views?.[view], ONE_ENDPOINTS) : []), ...(isDevelopment() ? DEV_ENDPOINTS : []) diff --git a/src/fireedge/src/client/apps/sunstone/index.js b/src/fireedge/src/client/apps/sunstone/index.js index a802be1851..90d805469e 100644 --- a/src/fireedge/src/client/apps/sunstone/index.js +++ b/src/fireedge/src/client/apps/sunstone/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { StaticRouter, BrowserRouter } from 'react-router-dom' @@ -35,9 +35,9 @@ const APP_NAME = _APPS.sunstone.name * @param {Store} props.store - Redux store * @param {string|object} props.location - The URL the server received * @param {object} props.context - Context object contains the results of the render - * @returns {React.JSXElementConstructor} Sunstone App + * @returns {JSXElementConstructor} Sunstone App */ -const Provision = ({ store, location, context }) => ( +const Sunstone = ({ store = {}, location = '', context = {} }) => ( @@ -59,18 +59,12 @@ const Provision = ({ store, location, context }) => ( ) -Provision.propTypes = { +Sunstone.propTypes = { location: PropTypes.string, context: PropTypes.shape({}), store: PropTypes.shape({}) } -Provision.defaultProps = { - location: '', - context: {}, - store: {} -} +Sunstone.displayName = 'SunstoneApp' -Provision.displayName = 'SunstoneApp' - -export default Provision +export default Sunstone diff --git a/src/fireedge/src/client/components/Alerts/Error.js b/src/fireedge/src/client/components/Alerts/Error.js index 302196a007..5c4f16bc42 100644 --- a/src/fireedge/src/client/components/Alerts/Error.js +++ b/src/fireedge/src/client/components/Alerts/Error.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/AutoScrollBox/index.js b/src/fireedge/src/client/components/AutoScrollBox/index.js index e874de5afb..658b77b66c 100644 --- a/src/fireedge/src/client/components/AutoScrollBox/index.js +++ b/src/fireedge/src/client/components/AutoScrollBox/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useEffect, useRef, useState } from 'react' +import { memo, useEffect, useRef, useState } from 'react' import PropTypes from 'prop-types' import { makeStyles, Chip, Slide } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/ApplicationCard.js b/src/fireedge/src/client/components/Cards/ApplicationCard.js index 42b88eec10..c8f6fab814 100644 --- a/src/fireedge/src/client/components/Cards/ApplicationCard.js +++ b/src/fireedge/src/client/components/Cards/ApplicationCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { diff --git a/src/fireedge/src/client/components/Cards/ApplicationNetworkCard.js b/src/fireedge/src/client/components/Cards/ApplicationNetworkCard.js index e8a1467c59..6f12dae505 100644 --- a/src/fireedge/src/client/components/Cards/ApplicationNetworkCard.js +++ b/src/fireedge/src/client/components/Cards/ApplicationNetworkCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { Button, CardActions } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/ApplicationTemplateCard.js b/src/fireedge/src/client/components/Cards/ApplicationTemplateCard.js index 8c9be69eb9..023ba9a375 100644 --- a/src/fireedge/src/client/components/Cards/ApplicationTemplateCard.js +++ b/src/fireedge/src/client/components/Cards/ApplicationTemplateCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { diff --git a/src/fireedge/src/client/components/Cards/ClusterCard.js b/src/fireedge/src/client/components/Cards/ClusterCard.js index a1e724e84a..51ceaa39c1 100644 --- a/src/fireedge/src/client/components/Cards/ClusterCard.js +++ b/src/fireedge/src/client/components/Cards/ClusterCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Badge, Box, CardContent } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/DatastoreCard.js b/src/fireedge/src/client/components/Cards/DatastoreCard.js index 1373b55507..e8286d0855 100644 --- a/src/fireedge/src/client/components/Cards/DatastoreCard.js +++ b/src/fireedge/src/client/components/Cards/DatastoreCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/EmptyCard.js b/src/fireedge/src/client/components/Cards/EmptyCard.js index 8ce3f2f7a5..9e85ed70ba 100644 --- a/src/fireedge/src/client/components/Cards/EmptyCard.js +++ b/src/fireedge/src/client/components/Cards/EmptyCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { Card, CardHeader, Fade, makeStyles } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/HostCard.js b/src/fireedge/src/client/components/Cards/HostCard.js index 297ab0444e..bbba0fa698 100644 --- a/src/fireedge/src/client/components/Cards/HostCard.js +++ b/src/fireedge/src/client/components/Cards/HostCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/NetworkCard.js b/src/fireedge/src/client/components/Cards/NetworkCard.js index ce0dee5a83..bfa89e53fe 100644 --- a/src/fireedge/src/client/components/Cards/NetworkCard.js +++ b/src/fireedge/src/client/components/Cards/NetworkCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { NetworkAlt as NetworkIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Cards/PolicyCard.js b/src/fireedge/src/client/components/Cards/PolicyCard.js index 9063dcf65a..7418934a1d 100644 --- a/src/fireedge/src/client/components/Cards/PolicyCard.js +++ b/src/fireedge/src/client/components/Cards/PolicyCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Card, CardContent, Button, CardActions } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/ProvisionCard.js b/src/fireedge/src/client/components/Cards/ProvisionCard.js index 9b6d9a4569..5c5e4a38f6 100644 --- a/src/fireedge/src/client/components/Cards/ProvisionCard.js +++ b/src/fireedge/src/client/components/Cards/ProvisionCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useMemo } from 'react' +import { memo, useMemo } from 'react' import PropTypes from 'prop-types' import { Db as ProviderIcon, Cloud as ProvisionIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Cards/ProvisionTemplateCard.js b/src/fireedge/src/client/components/Cards/ProvisionTemplateCard.js index 7d1bb87f8b..37c6ee631d 100644 --- a/src/fireedge/src/client/components/Cards/ProvisionTemplateCard.js +++ b/src/fireedge/src/client/components/Cards/ProvisionTemplateCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useMemo } from 'react' +import { memo, useMemo } from 'react' import PropTypes from 'prop-types' import { Db as ProviderIcon, SettingsCloud as ProvisionIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Cards/SelectCard/Action.js b/src/fireedge/src/client/components/Cards/SelectCard/Action.js index c37865504a..869b0c72d8 100644 --- a/src/fireedge/src/client/components/Cards/SelectCard/Action.js +++ b/src/fireedge/src/client/components/Cards/SelectCard/Action.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import useFetch from 'client/hooks/useFetch' @@ -22,7 +22,6 @@ import { SubmitButton } from 'client/components/FormControl' const Action = memo(({ cy, handleClick, - icon, stopPropagation, ...props }) => { @@ -33,9 +32,7 @@ const Action = memo(({ return ( { stopPropagation && evt?.stopPropagation?.() fetchRequest() @@ -49,7 +46,7 @@ const Action = memo(({ Action.propTypes = { cy: PropTypes.string, handleClick: PropTypes.func.isRequired, - icon: PropTypes.node.isRequired, + icon: PropTypes.node, stopPropagation: PropTypes.bool } diff --git a/src/fireedge/src/client/components/Cards/SelectCard/SelectCard.js b/src/fireedge/src/client/components/Cards/SelectCard/SelectCard.js index 9437ba45f3..5f5c3a4626 100644 --- a/src/fireedge/src/client/components/Cards/SelectCard/SelectCard.js +++ b/src/fireedge/src/client/components/Cards/SelectCard/SelectCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/components/Cards/TierCard.js b/src/fireedge/src/client/components/Cards/TierCard.js index 334ff5a790..a7c09f4165 100644 --- a/src/fireedge/src/client/components/Cards/TierCard.js +++ b/src/fireedge/src/client/components/Cards/TierCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { Button, CardActions, Badge } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Cards/VirtualMachineCard.js b/src/fireedge/src/client/components/Cards/VirtualMachineCard.js index 3b295288d4..090b846c4d 100644 --- a/src/fireedge/src/client/components/Cards/VirtualMachineCard.js +++ b/src/fireedge/src/client/components/Cards/VirtualMachineCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { ViewGrid as VmIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Cards/WavesCard.js b/src/fireedge/src/client/components/Cards/WavesCard.js index 246eebda09..143e5fb16d 100644 --- a/src/fireedge/src/client/components/Cards/WavesCard.js +++ b/src/fireedge/src/client/components/Cards/WavesCard.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -76,7 +76,7 @@ const useStyles = makeStyles(theme => { } }) -const WavesCard = React.memo(({ text, value, bgColor, icon: Icon }) => { +const WavesCard = memo(({ text, value, bgColor, icon: Icon }) => { const classes = useStyles({ bgColor }) return ( diff --git a/src/fireedge/src/client/components/Charts/CircleChart.js b/src/fireedge/src/client/components/Charts/CircleChart.js index 2b7712e256..ad644828ce 100644 --- a/src/fireedge/src/client/components/Charts/CircleChart.js +++ b/src/fireedge/src/client/components/Charts/CircleChart.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo, useState, useEffect, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { Box, CircularProgress, Typography } from '@material-ui/core' @@ -24,12 +24,12 @@ import NumberEasing from 'client/components/NumberEasing' * * @param {object} props - Props * @param {string} props.color - Color of component: primary, secondary or inherit - * @returns {React.JSXElementConstructor} Circular progress bar component + * @returns {JSXElementConstructor} Circular progress bar component */ -const Circle = React.memo(({ color = 'secondary' }) => { - const [progress, setProgress] = React.useState(0) +const Circle = memo(({ color = 'secondary' }) => { + const [progress, setProgress] = useState(0) - React.useEffect(() => { + useEffect(() => { const timer = setInterval(() => { setProgress(prevProgress => { const nextProgress = prevProgress + 2 @@ -65,9 +65,9 @@ Circle.displayName = 'Circle' * @param {object} props - Props * @param {string} props.label - Text in the middle * @param {object} props.labelProps - Props of text - * @returns {React.JSXElementConstructor} Circular chart component + * @returns {JSXElementConstructor} Circular chart component */ -const CircleChart = React.memo(({ label, labelProps }) => ( +const CircleChart = memo(({ label, labelProps }) => ( diff --git a/src/fireedge/src/client/components/Charts/SingleBar.js b/src/fireedge/src/client/components/Charts/SingleBar.js index f901198854..9b0f3f23d1 100644 --- a/src/fireedge/src/client/components/Charts/SingleBar.js +++ b/src/fireedge/src/client/components/Charts/SingleBar.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { makeStyles, Tooltip } from '@material-ui/core' @@ -48,9 +48,9 @@ const useStyles = makeStyles(theme => ({ * @param {{ name: string, color: string }[]} props.legend - Legend * @param {number[]} props.data - Chart data * @param {number} props.total - Total value of chart, equals to 100% of bar - * @returns {React.JSXElementConstructor} Chart bar component + * @returns {JSXElementConstructor} Chart bar component */ -const SingleBar = ({ legend, data, total }) => { +const SingleBar = ({ legend, data, total = 0 }) => { const fragments = data.map(data => Math.floor(data * 10 / (total || 1))) const classes = useStyles({ fragments }) @@ -101,12 +101,6 @@ SingleBar.propTypes = { total: PropTypes.number } -SingleBar.defaultProps = { - legend: undefined, - data: undefined, - total: 0 -} - SingleBar.displayName = 'SingleBar' export default SingleBar diff --git a/src/fireedge/src/client/components/DebugLog/filters.js b/src/fireedge/src/client/components/DebugLog/filters.js index e72f1d306d..03a2406cbf 100644 --- a/src/fireedge/src/client/components/DebugLog/filters.js +++ b/src/fireedge/src/client/components/DebugLog/filters.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Paper, Divider } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/DebugLog/index.js b/src/fireedge/src/client/components/DebugLog/index.js index 271b408caf..22b5f7daae 100644 --- a/src/fireedge/src/client/components/DebugLog/index.js +++ b/src/fireedge/src/client/components/DebugLog/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { useEffect, useState, memo } from 'react' +import { useEffect, useState, memo } from 'react' import PropTypes from 'prop-types' import { makeStyles } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/DebugLog/message.js b/src/fireedge/src/client/components/DebugLog/message.js index ab65170fc5..de78998520 100644 --- a/src/fireedge/src/client/components/DebugLog/message.js +++ b/src/fireedge/src/client/components/DebugLog/message.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useState } from 'react' +import { memo, useState } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/components/DebugLog/messagelist.js b/src/fireedge/src/client/components/DebugLog/messagelist.js index 7b0e7d72ad..b1edb7a5da 100644 --- a/src/fireedge/src/client/components/DebugLog/messagelist.js +++ b/src/fireedge/src/client/components/DebugLog/messagelist.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import Message from 'client/components/DebugLog/message' diff --git a/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js b/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js index 7f5707b0f5..235c48887f 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js +++ b/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { @@ -71,8 +71,14 @@ const DialogConfirmation = memo( >
- {Tr(title)} - {subheader && {Tr(subheader)}} + + {typeof title === 'string' ? Tr(title) : title} + + {subheader && ( + + {typeof subheader === 'string' ? Tr(subheader) : subheader} + + )}
{handleCancel && ( )}
- - {children} - + {children && ( + + {children} + + )} {handleAccept && ( @@ -106,19 +114,19 @@ const DialogConfirmation = memo( ) export const DialogPropTypes = { - open: PropTypes.bool.isRequired, - title: PropTypes.string.isRequired, - subheader: PropTypes.string, - contentProps: PropTypes.objectOf(PropTypes.any), - handleAccept: PropTypes.func, - acceptButtonProps: PropTypes.objectOf(PropTypes.any), - handleCancel: PropTypes.func, - cancelButtonProps: PropTypes.objectOf(PropTypes.any), - handleEntering: PropTypes.func, - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), + open: PropTypes.bool, + title: PropTypes.oneOfType([ + PropTypes.string, PropTypes.node - ]) + ]).isRequired, + subheader: PropTypes.string, + contentProps: PropTypes.object, + handleAccept: PropTypes.func, + acceptButtonProps: PropTypes.object, + handleCancel: PropTypes.func, + cancelButtonProps: PropTypes.object, + handleEntering: PropTypes.func, + children: PropTypes.any } DialogConfirmation.propTypes = DialogPropTypes diff --git a/src/fireedge/src/client/components/Dialogs/DialogForm.js b/src/fireedge/src/client/components/Dialogs/DialogForm.js index 17e41c2f60..86d0dbf87e 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogForm.js +++ b/src/fireedge/src/client/components/Dialogs/DialogForm.js @@ -14,13 +14,12 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' import { makeStyles } from '@material-ui/core' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import DialogConfirmation, { DialogPropTypes } from 'client/components/Dialogs/DialogConfirmation' @@ -63,6 +62,9 @@ const DialogForm = ({ values, resolver, handleSubmit, dialogProps, children }) = acceptButtonProps={{ isSubmitting: methods.formState.isSubmitting }} + cancelButtonProps={{ + disabled: methods.formState.isSubmitting + }} {...dialogProps} > @@ -79,7 +81,7 @@ DialogForm.propTypes = { ]), resolver: PropTypes.func.isRequired, handleSubmit: PropTypes.func, - dialogProps: DialogPropTypes, + dialogProps: PropTypes.shape(DialogPropTypes), children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node, diff --git a/src/fireedge/src/client/components/Dialogs/DialogRequest.js b/src/fireedge/src/client/components/Dialogs/DialogRequest.js index 93ad088b49..2a9b68c0a0 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogRequest.js +++ b/src/fireedge/src/client/components/Dialogs/DialogRequest.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/components/Fab/index.js b/src/fireedge/src/client/components/Fab/index.js index 3121f23ce5..a8594022a6 100644 --- a/src/fireedge/src/client/components/Fab/index.js +++ b/src/fireedge/src/client/components/Fab/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -29,7 +29,7 @@ const useStyles = makeStyles(theme => ({ } })) -const FloatingActionButton = React.memo( +const FloatingActionButton = memo( ({ icon, className, ...props }) => { const classes = useStyles() diff --git a/src/fireedge/src/client/components/Footer/index.js b/src/fireedge/src/client/components/Footer/index.js index 9ead3d0ead..5a48ef103a 100644 --- a/src/fireedge/src/client/components/Footer/index.js +++ b/src/fireedge/src/client/components/Footer/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import { Box, Link, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/FormControl/AutocompleteController.js b/src/fireedge/src/client/components/FormControl/AutocompleteController.js index c89a1b8dd1..9383b73d2e 100644 --- a/src/fireedge/src/client/components/FormControl/AutocompleteController.js +++ b/src/fireedge/src/client/components/FormControl/AutocompleteController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { TextField, Chip } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/FormControl/CheckboxController.js b/src/fireedge/src/client/components/FormControl/CheckboxController.js index ac232b8118..6339941e59 100644 --- a/src/fireedge/src/client/components/FormControl/CheckboxController.js +++ b/src/fireedge/src/client/components/FormControl/CheckboxController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { diff --git a/src/fireedge/src/client/components/FormControl/ErrorHelper.js b/src/fireedge/src/client/components/FormControl/ErrorHelper.js index f38115dd9e..30729879f5 100644 --- a/src/fireedge/src/client/components/FormControl/ErrorHelper.js +++ b/src/fireedge/src/client/components/FormControl/ErrorHelper.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import { string } from 'prop-types' import { Box, makeStyles, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/FormControl/FileController.js b/src/fireedge/src/client/components/FormControl/FileController.js index c5b8f5ac58..5a8093bad1 100644 --- a/src/fireedge/src/client/components/FormControl/FileController.js +++ b/src/fireedge/src/client/components/FormControl/FileController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useState, useRef, useEffect } from 'react' +import { memo, useState, useRef, useEffect, ChangeEvent } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -78,7 +78,7 @@ const FileController = memo( /** * Handle change to validate the files. * - * @param {React.ChangeEvent} event - Change event object + * @param {ChangeEvent} event - Change event object */ const handleChange = async event => { try { diff --git a/src/fireedge/src/client/components/FormControl/InputCode.js b/src/fireedge/src/client/components/FormControl/InputCode.js index 5595503477..378e942372 100644 --- a/src/fireedge/src/client/components/FormControl/InputCode.js +++ b/src/fireedge/src/client/components/FormControl/InputCode.js @@ -14,53 +14,80 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' -import { Box } from '@material-ui/core' -import AceEditor from 'react-ace' +import { useEffect, useState } from 'react' import PropTypes from 'prop-types' -import 'ace-builds/src-noconflict/mode-json' -import 'ace-builds/src-noconflict/theme-github' +import loadable from '@loadable/component' -const InputCode = ({ code, language, ...props }) => { - const handleChange = newValue => { - console.log('change', newValue) - } +const Ace = loadable.lib(() => import('react-ace'), { ssr: false }) - return ( - - - - ) +const WrapperToLoadMode = ({ children, mode }) => { + const [loading, setLoading] = useState(true) + + useEffect(() => { + const load = async () => { + await import(`ace-builds/src-noconflict/mode-${mode}`) + await import('ace-builds/src-noconflict/theme-github') + + setLoading(false) + } + + load() + + return () => { + // remove all styles when component will be unmounted + document + .querySelectorAll('[id^=ace]') + .forEach(child => child.parentNode.removeChild(child)) + } + }, []) + + return loading ? null : children } +const InputCode = ({ code, mode, ...props }) => ( + + {({ default: Editor }) => ( + + + + )} + +) + InputCode.propTypes = { code: PropTypes.string, - language: PropTypes.string + mode: PropTypes.oneOf([ + 'json', + 'apache_conf', + 'css', + 'dockerfile', + 'markdown', + 'xml' + ]) } InputCode.defaultProps = { code: '', - language: 'json' + mode: 'json' } export default InputCode diff --git a/src/fireedge/src/client/components/FormControl/PasswordController.js b/src/fireedge/src/client/components/FormControl/PasswordController.js index 385cec0bc7..83f2583c7b 100644 --- a/src/fireedge/src/client/components/FormControl/PasswordController.js +++ b/src/fireedge/src/client/components/FormControl/PasswordController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useState, useCallback } from 'react' +import { memo, useState, useCallback } from 'react' import PropTypes from 'prop-types' import { InputAdornment, IconButton } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/FormControl/SelectController.js b/src/fireedge/src/client/components/FormControl/SelectController.js index 1c72f83b62..ed15cf91d2 100644 --- a/src/fireedge/src/client/components/FormControl/SelectController.js +++ b/src/fireedge/src/client/components/FormControl/SelectController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { TextField } from '@material-ui/core' @@ -32,7 +32,22 @@ const SelectController = memo( { + const { options } = event.target + const newValue = [] + + for (let i = 0, l = options.length; i < l; i += 1) { + if (options[i].selected) { + newValue.push(options[i].value) + } + } + + onChange(newValue) + } + : onChange + } color='secondary' select fullWidth @@ -55,6 +70,7 @@ const SelectController = memo( )} name={name} control={control} + multiple={multiple} /> ) }, diff --git a/src/fireedge/src/client/components/FormControl/SliderController.js b/src/fireedge/src/client/components/FormControl/SliderController.js index a9951093a5..025ef31895 100644 --- a/src/fireedge/src/client/components/FormControl/SliderController.js +++ b/src/fireedge/src/client/components/FormControl/SliderController.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { Typography, TextField, Slider, FormHelperText, Grid } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/FormControl/SubmitButton.js b/src/fireedge/src/client/components/FormControl/SubmitButton.js index b942a8f19d..2bb8dafdf5 100644 --- a/src/fireedge/src/client/components/FormControl/SubmitButton.js +++ b/src/fireedge/src/client/components/FormControl/SubmitButton.js @@ -13,13 +13,20 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { forwardRef, memo } from 'react' import PropTypes from 'prop-types' - -import { makeStyles, CircularProgress, Button, IconButton } from '@material-ui/core' import clsx from 'clsx' -import { Tr } from 'client/components/HOC' +import { + makeStyles, + CircularProgress, + Button, + IconButton, + Tooltip, + Typography +} from '@material-ui/core' + +import { Tr, ConditionalWrap } from 'client/components/HOC' import { T } from 'client/constants' const useStyles = makeStyles(theme => ({ @@ -34,37 +41,60 @@ const useStyles = makeStyles(theme => ({ } })) -const ButtonComponent = ({ icon, children, ...props }) => icon ? ( - {children} -) : ( - -) - -ButtonComponent.propTypes = { - icon: PropTypes.bool, - children: PropTypes.any -} - -const SubmitButton = React.memo( - ({ isSubmitting, disabled, label, icon, color, size, className, ...props }) => { - const classes = useStyles() - - return ( - + icon ? ( + {children} + ) : ( + + ) +) + +const TooltipComponent = ({ tooltip, tooltipProps, children }) => ( + ( + {tooltip}} + {...tooltipProps} + >{wrapperChildren} + )} + > + {children} + +) + +const SubmitButton = memo( + ({ isSubmitting, disabled, label, icon, className, ...props }) => { + const classes = useStyles() + + return ( + + + {isSubmitting && } + {!isSubmitting && (icon ?? label ?? Tr(T.Submit))} + + ) }, (prev, next) => @@ -74,9 +104,13 @@ const SubmitButton = React.memo( prev.onClick === next.onClick ) -SubmitButton.propTypes = { - icon: PropTypes.bool, +export const SubmitButtonPropTypes = { + children: PropTypes.any, + icon: PropTypes.node, + endicon: PropTypes.node, label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), + tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), + tooltipProps: PropTypes.object, isSubmitting: PropTypes.bool, disabled: PropTypes.bool, className: PropTypes.string, @@ -84,13 +118,11 @@ SubmitButton.propTypes = { size: PropTypes.oneOf(['large', 'medium', 'small']) } -SubmitButton.defaultProps = { - icon: false, - label: undefined, - isSubmitting: false, - disabled: false, - className: undefined, - color: 'default' -} +TooltipComponent.propTypes = SubmitButtonPropTypes +SubmitButton.propTypes = SubmitButtonPropTypes +ButtonComponent.propTypes = SubmitButtonPropTypes + +ButtonComponent.displayName = 'SubmitButtonComponent' +SubmitButton.displayName = 'SubmitButton' export default SubmitButton diff --git a/src/fireedge/src/client/components/FormControl/TextController.js b/src/fireedge/src/client/components/FormControl/TextController.js index 38d12991e8..f391310d0c 100644 --- a/src/fireedge/src/client/components/FormControl/TextController.js +++ b/src/fireedge/src/client/components/FormControl/TextController.js @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { TextField } from '@material-ui/core' import { Controller } from 'react-hook-form' -import { Tr } from 'client/components/HOC' import { ErrorHelper } from 'client/components/FormControl' +import { Tr } from 'client/components/HOC' const TextController = memo( ({ control, cy, type, multiline, name, label, error, fieldProps }) => ( @@ -35,7 +35,7 @@ const TextController = memo( variant='outlined' margin='dense' {...(label && { label: Tr(label) })} - inputProps={{ 'data-cy': cy }} + inputProps={{ 'data-cy': cy, ...fieldProps }} error={Boolean(error)} helperText={Boolean(error) && } FormHelperTextProps={{ 'data-cy': `${cy}-error` }} @@ -48,7 +48,9 @@ const TextController = memo( /> ), (prevProps, nextProps) => - prevProps.error === nextProps.error && prevProps.type === nextProps.type + prevProps.error === nextProps.error && + prevProps.type === nextProps.type && + prevProps.label === nextProps.label ) TextController.propTypes = { @@ -62,7 +64,14 @@ TextController.propTypes = { PropTypes.bool, PropTypes.objectOf(PropTypes.any) ]), - fieldProps: PropTypes.object + fieldProps: PropTypes.object, + formContext: PropTypes.shape({ + setValue: PropTypes.func, + setError: PropTypes.func, + clearErrors: PropTypes.func, + watch: PropTypes.func, + register: PropTypes.func + }) } TextController.defaultProps = { diff --git a/src/fireedge/src/client/components/FormControl/TimeController.js b/src/fireedge/src/client/components/FormControl/TimeController.js new file mode 100644 index 0000000000..3e1be834ae --- /dev/null +++ b/src/fireedge/src/client/components/FormControl/TimeController.js @@ -0,0 +1,87 @@ +/* ------------------------------------------------------------------------- * + * 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 { memo } from 'react' +import PropTypes from 'prop-types' + +import { TextField } from '@material-ui/core' +import { Controller } from 'react-hook-form' + +import { Tr } from 'client/components/HOC' +import { ErrorHelper } from 'client/components/FormControl' + +const TimeController = memo( + ({ control, cy, name, type, label, error, fieldProps }) => ( + + } + FormHelperTextProps={{ 'data-cy': `${cy}-error` }} + /> + } + name={name} + control={control} + /> + ), + (prevProps, nextProps) => + prevProps.error === nextProps.error && + prevProps.label === nextProps.label +) + +TimeController.propTypes = { + control: PropTypes.object, + cy: PropTypes.string, + multiline: PropTypes.bool, + name: PropTypes.string.isRequired, + label: PropTypes.string, + type: PropTypes.string, + error: PropTypes.oneOfType([ + PropTypes.bool, + PropTypes.objectOf(PropTypes.any) + ]), + fieldProps: PropTypes.object, + formContext: PropTypes.shape({ + setValue: PropTypes.func, + setError: PropTypes.func, + clearErrors: PropTypes.func, + watch: PropTypes.func, + register: PropTypes.func + }) +} + +TimeController.defaultProps = { + control: {}, + cy: 'cy', + name: '', + label: '', + type: 'datetime-local', + error: false, + fieldProps: undefined +} + +TimeController.displayName = 'TimeController' + +export default TimeController diff --git a/src/fireedge/src/client/components/FormControl/index.js b/src/fireedge/src/client/components/FormControl/index.js index 761f0ac09b..fc6a24d9e4 100644 --- a/src/fireedge/src/client/components/FormControl/index.js +++ b/src/fireedge/src/client/components/FormControl/index.js @@ -13,28 +13,31 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import TextController from 'client/components/FormControl/TextController' +import AutocompleteController from 'client/components/FormControl/AutocompleteController' +import CheckboxController from 'client/components/FormControl/CheckboxController' +import FileController from 'client/components/FormControl/FileController' import PasswordController from 'client/components/FormControl/PasswordController' import SelectController from 'client/components/FormControl/SelectController' import SliderController from 'client/components/FormControl/SliderController' -import CheckboxController from 'client/components/FormControl/CheckboxController' -import AutocompleteController from 'client/components/FormControl/AutocompleteController' -import FileController from 'client/components/FormControl/FileController' +import TextController from 'client/components/FormControl/TextController' +import TimeController from 'client/components/FormControl/TimeController' -import SubmitButton from 'client/components/FormControl/SubmitButton' +import SubmitButton, { SubmitButtonPropTypes } from 'client/components/FormControl/SubmitButton' import InputCode from 'client/components/FormControl/InputCode' import ErrorHelper from 'client/components/FormControl/ErrorHelper' export { - TextController, + AutocompleteController, + CheckboxController, + FileController, PasswordController, SelectController, SliderController, - CheckboxController, - AutocompleteController, - FileController, + TextController, + TimeController, SubmitButton, + SubmitButtonPropTypes, InputCode, ErrorHelper } diff --git a/src/fireedge/src/client/components/FormStepper/MobileStepper.js b/src/fireedge/src/client/components/FormStepper/MobileStepper.js index f2565ec72e..ed1c63f521 100644 --- a/src/fireedge/src/client/components/FormStepper/MobileStepper.js +++ b/src/fireedge/src/client/components/FormStepper/MobileStepper.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Button, MobileStepper, Typography, Box } from '@material-ui/core' -import { makeStyles, fade } from '@material-ui/core/styles' +import { makeStyles, alpha } from '@material-ui/core/styles' import { NavArrowLeft as PreviousIcon, NavArrowRight as NextIcon @@ -31,7 +30,7 @@ const useStyles = makeStyles(theme => ({ root: { position: 'sticky', top: -15, - background: fade(theme.palette.primary.light, 0.65), + background: alpha(theme.palette.primary.light, 0.65), zIndex: theme.zIndex.mobileStepper, margin: theme.spacing(2, 0) }, diff --git a/src/fireedge/src/client/components/FormStepper/Stepper.js b/src/fireedge/src/client/components/FormStepper/Stepper.js index cd37498e33..f03dafae81 100644 --- a/src/fireedge/src/client/components/FormStepper/Stepper.js +++ b/src/fireedge/src/client/components/FormStepper/Stepper.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { @@ -26,7 +25,7 @@ import { Typography, StepButton } from '@material-ui/core' -import { makeStyles, fade } from '@material-ui/core/styles' +import { makeStyles, alpha } from '@material-ui/core/styles' import { SubmitButton } from 'client/components/FormControl' import { Tr } from 'client/components/HOC' @@ -37,7 +36,7 @@ const useStyles = makeStyles(theme => ({ position: 'sticky', top: -15, minHeight: 100, - background: fade(theme.palette.background.paper, 0.95), + background: alpha(theme.palette.background.paper, 0.95), zIndex: theme.zIndex.mobileStepper }, icon: { diff --git a/src/fireedge/src/client/components/FormStepper/index.js b/src/fireedge/src/client/components/FormStepper/index.js index 400764ce2c..b6a8f236b8 100644 --- a/src/fireedge/src/client/components/FormStepper/index.js +++ b/src/fireedge/src/client/components/FormStepper/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useMemo, useCallback, useEffect } from 'react' +import { useState, useMemo, useCallback, useEffect } from 'react' import PropTypes from 'prop-types' import { useFormContext } from 'react-hook-form' diff --git a/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js b/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js index 835bb351f0..8b941ee940 100644 --- a/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js +++ b/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useState } from 'react' import PropTypes from 'prop-types' import { - Button, ClickAwayListener, Grow, Paper, @@ -29,27 +28,43 @@ import { import { NavArrowDown } from 'iconoir-react' import { useDialog } from 'client/hooks' -import { DialogForm } from 'client/components/Dialogs' -import { FormWithSchema } from 'client/components/Forms' +import { DialogConfirmation, DialogForm, DialogPropTypes } from 'client/components/Dialogs' +import { SubmitButton, SubmitButtonPropTypes } from 'client/components/FormControl' +import FormWithSchema from 'client/components/Forms/FormWithSchema' import FormStepper from 'client/components/FormStepper' import { Translate } from 'client/components/HOC' -const ButtonToTriggerForm = ({ buttonProps = {}, title, options = [] }) => { +const ButtonToTriggerForm = ({ + buttonProps = {}, + isConfirmDialog = false, + dialogProps = {}, + options = [] +}) => { + const buttonId = buttonProps['data-cy'] ?? 'main-button-form' const isGroupButton = options.length > 1 - const [anchorEl, setAnchorEl] = React.useState(null) + const [anchorEl, setAnchorEl] = useState(null) const open = Boolean(anchorEl) const { display, show, hide, values: Form } = useDialog() - const { steps, defaultValues, resolver, fields, onSubmit: handleSubmit } = Form ?? {} + const { + steps, + defaultValues, + resolver, + fields, + onSubmit: handleSubmit + } = Form ?? {} const handleTriggerSubmit = async formData => { - await handleSubmit?.(formData) - hide() + try { + await handleSubmit?.(formData) + } finally { + hide() + } } - const openDialogForm = ({ form = {}, onSubmit }) => { - show({ ...form, onSubmit }) + const openDialogForm = ({ form = {}, ...rest }) => { + show({ ...form, ...rest }) handleClose() } @@ -58,29 +73,24 @@ const ButtonToTriggerForm = ({ buttonProps = {}, title, options = [] }) => { return ( <> - + /> {isGroupButton && ( {({ TransitionProps }) => ( @@ -105,26 +115,39 @@ const ButtonToTriggerForm = ({ buttonProps = {}, title, options = [] }) => { )} {display && ( - - {steps ? ( - - ) : ( - - )} - + isConfirmDialog ? ( + + ) : ( + + {steps ? ( + + ) : ( + + )} + + ) )} ) } ButtonToTriggerForm.propTypes = { - buttonProps: PropTypes.object, - title: PropTypes.string, + buttonProps: PropTypes.shape(SubmitButtonPropTypes), + dialogProps: PropTypes.shape(DialogPropTypes), + isConfirmDialog: PropTypes.bool, options: PropTypes.arrayOf( PropTypes.shape({ cy: PropTypes.string, @@ -135,6 +158,6 @@ ButtonToTriggerForm.propTypes = { handleSubmit: PropTypes.func } -ButtonToTriggerForm.displayName = 'VmStorageTab' +ButtonToTriggerForm.displayName = 'ButtonToTriggerForm' export default ButtonToTriggerForm diff --git a/src/fireedge/src/client/components/Forms/FormWithSchema.js b/src/fireedge/src/client/components/Forms/FormWithSchema.js index 7da488381a..c7222a54ad 100644 --- a/src/fireedge/src/client/components/Forms/FormWithSchema.js +++ b/src/fireedge/src/client/components/Forms/FormWithSchema.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { createElement } from 'react' import PropTypes from 'prop-types' import { Box, Grid } from '@material-ui/core' @@ -31,11 +31,12 @@ const InputController = { [INPUT_TYPES.SLIDER]: FC.SliderController, [INPUT_TYPES.CHECKBOX]: FC.CheckboxController, [INPUT_TYPES.AUTOCOMPLETE]: FC.AutocompleteController, - [INPUT_TYPES.FILE]: FC.FileController + [INPUT_TYPES.FILE]: FC.FileController, + [INPUT_TYPES.TIME]: FC.TimeController } const HiddenInput = ({ isHidden, children }) => - isHidden ? {children} : children + isHidden ? {children} : children const FormWithSchema = ({ id, cy, fields }) => { const { control, errors, ...formContext } = useFormContext() @@ -43,37 +44,44 @@ const FormWithSchema = ({ id, cy, fields }) => { return ( {fields?.map?.( - ({ name, type, htmlType, values, dependOf, grid, ...restOfProps }) => { + ({ dependOf, ...props }) => { + let valueOfDependField = null + if (dependOf) { + const nameOfDependField = id + ? Array.isArray(dependOf) ? dependOf.map(d => `${id}.${d}`) : `${id}.${dependOf}` + : dependOf + + valueOfDependField = useWatch({ control, name: nameOfDependField }) + } + + const { name, type, htmlType, grid, ...fieldProps } = Object + .entries(props) + .reduce((field, property) => { + const [key, value] = property + const finalValue = typeof value === 'function' ? value(valueOfDependField) : value + + return { ...field, [key]: finalValue } + }, {}) + const dataCy = `${cy}-${name}` const inputName = id ? `${id}.${name}` : name const inputError = get(errors, inputName) ?? false - const dependValue = dependOf - ? useWatch({ control, name: id ? `${id}.${dependOf}` : dependOf }) - : null - - const htmlTypeValue = typeof htmlType === 'function' - ? htmlType(dependValue) - : htmlType - - const isHidden = htmlTypeValue === INPUT_TYPES.HIDDEN + const isHidden = htmlType === INPUT_TYPES.HIDDEN return ( InputController[type] && ( - {React.createElement(InputController[type], { + {createElement(InputController[type], { control, cy: dataCy, error: inputError, formContext, name: inputName, - type: htmlTypeValue, - values: typeof values === 'function' - ? values(dependValue) - : values, - ...restOfProps + type: htmlType, + ...fieldProps })} diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/AdvancedOptions/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/AdvancedOptions/index.js index 142a7272b5..6031663888 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/AdvancedOptions/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/AdvancedOptions/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/ImagesTable/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/ImagesTable/index.js index 2bf04e64fa..a78626e2bb 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/ImagesTable/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/ImageSteps/ImagesTable/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import { useListForm } from 'client/hooks' import { ImagesTable } from 'client/components/Tables' diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/AdvancedOptions/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/AdvancedOptions/index.js index 32351a53e0..bbf54c4813 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/AdvancedOptions/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/AdvancedOptions/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/BasicConfiguration/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/BasicConfiguration/index.js index 5fafc4b18f..c62bc31cc5 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/VolatileSteps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/AdvancedOptions/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/AdvancedOptions/index.js index 4f0e20eacb..d7f0582ca8 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/AdvancedOptions/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/AdvancedOptions/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/NetworksTable/index.js b/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/NetworksTable/index.js index 9d070408e3..c6dee13e09 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/NetworksTable/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/AttachNicForm/Steps/NetworksTable/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import { useListForm } from 'client/hooks' import { VNetworksTable } from 'client/components/Tables' diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/index.js new file mode 100644 index 0000000000..ab42d446d4 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/index.js @@ -0,0 +1,27 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/CreateDiskSnapshotForm/schema' + +const CreateDiskSnapshotForm = ({ snapshot } = {}) => { + return { + resolver: () => SCHEMA, + defaultValues: SCHEMA.cast(snapshot, { stripUnknown: true }), + fields: FIELDS + } +} + +export default CreateDiskSnapshotForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/schema.js new file mode 100644 index 0000000000..1b0ace1324 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateDiskSnapshotForm/schema.js @@ -0,0 +1,37 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' +import { INPUT_TYPES } from 'client/constants' +import { getValidationFromFields } from 'client/utils' + +const NAME = { + name: 'NAME', + label: 'Name', + type: INPUT_TYPES.TEXT, + tooltip: 'Name for the snapshot.', + validation: yup + .string() + .trim() + .notRequired() + .default('') +} + +export const FIELDS = [ + NAME +] + +export const SCHEMA = yup.object(getValidationFromFields(FIELDS)) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js new file mode 100644 index 0000000000..3bcd32bce9 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js @@ -0,0 +1,186 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' + +import { INPUT_TYPES, VM_ACTIONS, VM_ACTIONS_WITH_SCHEDULE } from 'client/constants' +import { getValidationFromFields, capitalize, clearString } from 'client/utils' +import { getSnapshotList, getDisks } from 'client/models/VirtualMachine' + +const ARGS_TYPES = { + DISK_ID: 'DISK_ID', + NAME: 'NAME', + SNAPSHOT_ID: 'SNAPSHOT_ID' +} + +const SCHED_ACTION_OPTIONS = VM_ACTIONS_WITH_SCHEDULE + .map(action => ({ + text: capitalize(clearString(action)), + value: action + })) + +const ARGS_BY_ACTION = action => { + const { DISK_ID, NAME, SNAPSHOT_ID } = ARGS_TYPES + + return { + [VM_ACTIONS.SNAPSHOT_DISK_CREATE]: [DISK_ID, NAME], + [VM_ACTIONS.SNAPSHOT_DISK_REVERT]: [DISK_ID, SNAPSHOT_ID], + [VM_ACTIONS.SNAPSHOT_DISK_DELETE]: [DISK_ID, SNAPSHOT_ID], + [VM_ACTIONS.SNAPSHOT_CREATE]: [NAME], + [VM_ACTIONS.SNAPSHOT_REVERT]: [SNAPSHOT_ID], + [VM_ACTIONS.SNAPSHOT_DELETE]: [SNAPSHOT_ID] + }[action] +} + +export const ACTION_FIELD = { + name: 'ACTION', + label: 'Action', + type: INPUT_TYPES.SELECT, + values: SCHED_ACTION_OPTIONS, + validation: yup + .string() + .trim() + .required('Action field is required') + .default(SCHED_ACTION_OPTIONS[0]?.value), + grid: { xs: 12 } +} + +export const ARGS_DISK_ID_FIELD = vm => { + const diskOptions = getDisks(vm) + .map(({ DISK_ID, IMAGE }) => ({ text: IMAGE, value: DISK_ID })) + + return { + name: ARGS_TYPES.DISK_ID, + label: 'Disk', + type: INPUT_TYPES.SELECT, + dependOf: ACTION_FIELD.name, + htmlType: action => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.DISK_ID) + ? undefined + : INPUT_TYPES.HIDDEN, + values: diskOptions, + validation: yup + .string() + .trim() + .when( + ACTION_FIELD.name, + (action, schema) => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.DISK_ID) + ? schema + : schema.strip() + ) + .notRequired() + .default(() => diskOptions[0]?.value) + } +} + +export const ARGS_NAME_FIELD = () => ({ + name: ARGS_TYPES.NAME, + label: 'Snapshot name', + type: INPUT_TYPES.TEXT, + dependOf: ACTION_FIELD.name, + htmlType: action => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.NAME) + ? undefined + : INPUT_TYPES.HIDDEN, + validation: yup + .string() + .trim() + .when( + ACTION_FIELD.name, + (action, schema) => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.NAME) + ? schema + : schema.strip() + ) + .notRequired() + .default(undefined) +}) + +export const ARGS_SNAPSHOT_ID_FIELD = vm => { + const snapshotOptions = getSnapshotList(vm) + .map(({ SNAPSHOT_ID, NAME }) => ({ text: NAME, value: SNAPSHOT_ID })) + + return { + name: ARGS_TYPES.SNAPSHOT_ID, + label: 'Snapshot', + type: INPUT_TYPES.SELECT, + dependOf: ACTION_FIELD.name, + htmlType: action => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.SNAPSHOT_ID) + ? undefined + : INPUT_TYPES.HIDDEN, + values: snapshotOptions, + validation: yup + .string() + .trim() + .when( + ACTION_FIELD.name, + (action, schema) => ARGS_BY_ACTION(action)?.includes(ARGS_TYPES.SNAPSHOT_ID) + ? schema + : schema.strip() + ) + .notRequired() + .default(() => snapshotOptions[0]?.value) + } +} + +export const COMMON_FIELDS = vm => [ + ACTION_FIELD, + ARGS_DISK_ID_FIELD, + ARGS_NAME_FIELD, + ARGS_SNAPSHOT_ID_FIELD +].map(field => typeof field === 'function' ? field(vm) : field) + +export const COMMON_SCHEMA = vm => yup + .object(getValidationFromFields(COMMON_FIELDS(vm))) + .transform(value => { + const { + ARGS, + [ACTION_FIELD.name]: ACTION, + [ARGS_TYPES.NAME]: NAME, + [ARGS_TYPES.SNAPSHOT_ID]: SNAPSHOT_ID, + [ARGS_TYPES.DISK_ID]: DISK_ID, + ...rest + } = value + + let argsValues = {} + + if (ARGS) { + // IMPORTANT - String data from ARGS has strict order: DISK_ID,NAME,SNAPSHOT_ID + const splittedArgs = ARGS.split(',') + + argsValues = { + [VM_ACTIONS.SNAPSHOT_DISK_CREATE]: + { DISK_ID: splittedArgs[0], NAME: splittedArgs[1] }, + [VM_ACTIONS.SNAPSHOT_DISK_REVERT]: + { DISK_ID: splittedArgs[0], SNAPSHOT_ID: splittedArgs[1] }, + [VM_ACTIONS.SNAPSHOT_DISK_DELETE]: + { DISK_ID: splittedArgs[0], SNAPSHOT_ID: splittedArgs[1] }, + [VM_ACTIONS.SNAPSHOT_CREATE]: + { NAME: splittedArgs[0] }, + [VM_ACTIONS.SNAPSHOT_REVERT]: + { SNAPSHOT_ID: splittedArgs[0] }, + [VM_ACTIONS.SNAPSHOT_DELETE]: + { SNAPSHOT_ID: splittedArgs[0] } + }[ACTION] + } else { + // Transform to send form data + const argsAsString = Object.entries({ DISK_ID, NAME, SNAPSHOT_ID }) + .map(([name, val]) => ARGS_BY_ACTION(ACTION)?.includes(name) && val) + .filter(Boolean) + .join(',') + + argsValues = { ARGS: argsAsString } + } + + return { ...rest, ACTION, ...argsValues } + }) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js new file mode 100644 index 0000000000..abcfd983ec --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js @@ -0,0 +1,27 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema' + +const PunctualForm = ({ vm, schedule } = {}) => ({ + resolver: () => SCHEMA(vm), + defaultValues: schedule + ? SCHEMA(vm).cast(schedule, { stripUnknown: true }) + : SCHEMA(vm).default(), + fields: FIELDS(vm) +}) + +export default PunctualForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js new file mode 100644 index 0000000000..f8bd182165 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js @@ -0,0 +1,254 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' +import { DateTime } from 'luxon' + +import { T, INPUT_TYPES } from 'client/constants' +import { getValidationFromFields, capitalize } from 'client/utils' +import { timeFromMilliseconds } from 'client/models/Helper' +import { COMMON_FIELDS, COMMON_SCHEMA } from 'client/components/Forms/Vm/CreateSchedActionForm/CommonSchema' + +const ISO_FORMAT = "yyyy-MM-dd'T'HH:mm" +const ISO_REG = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/ +const MONTH_DAYS_REG = /^(3[01]|[12][0-9]|[1-9])(,(3[01]|[12][0-9]|[1-9]))*$/ +const YEAR_DAYS_REG = /^(36[0-5]|3[0-5]\d|[12]\d{2}|[0-9]\d?)(,(36[0-5]|3[0-5]\d|[12]\d{2}|[1-9]\d?))*$/ +const HOURS_REG = /^(16[0-8]|1[01][0-9]|[1-9]?[0-9])$/ + +const REPEAT_VALUES = { + WEEKLY: '0', + MONTHLY: '1', + YEARLY: '2', + HOURLY: '3' +} + +const END_TYPE_VALUES = { + NEVER: '0', + REPETITION: '1', + DATE: '2' +} + +const REPEAT_OPTIONS = Object.entries(REPEAT_VALUES) + .map(([text, value]) => ({ text: capitalize(text), value })) + +const END_TYPE_OPTIONS = Object.entries(END_TYPE_VALUES) + .map(([text, value]) => ({ text: capitalize(text), value })) + +const isoDateValidation = nameInput => yup + .string() + .trim() + .default(() => DateTime.local().toFormat(ISO_FORMAT)) + .matches( + ISO_REG, + { message: `${nameInput} should be a date with ISO format: yyyy-MM-ddTHH:mm` } + ) + .transform((value, originalValue) => { + if (value.length < 10 || (isNaN(value) && value.match(ISO_REG) === null)) { + return value + } + + const newValue = isNaN(originalValue) + ? DateTime.fromISO(originalValue) + : timeFromMilliseconds(originalValue) + + return newValue.isValid ? newValue.toFormat(ISO_FORMAT) : originalValue + }) + +const PERIODIC_FIELD = { + name: 'PERIODIC', + label: 'Periodic', + type: INPUT_TYPES.CHECKBOX, + validation: yup + .boolean() + .default(false), + grid: { md: 12 } +} + +const TIME_FIELD = { + name: 'TIME', + label: 'Time', + type: INPUT_TYPES.TIME, + validation: yup + .string() + .required('Time field is required') + .concat(isoDateValidation('Time')) +} + +const REPEAT_FIELD = { + name: 'REPEAT', + label: 'Periodicity', + type: INPUT_TYPES.SELECT, + dependOf: PERIODIC_FIELD.name, + htmlType: isPeriodic => !isPeriodic ? INPUT_TYPES.HIDDEN : undefined, + values: REPEAT_OPTIONS, + validation: yup + .string() + .trim() + .when( + PERIODIC_FIELD.name, + (isPeriodic, schema) => isPeriodic ? schema : schema.strip() + ) + .notRequired() + .default(REPEAT_OPTIONS[0].value) +} + +const DAYS_FIELD = { + name: 'DAYS', + dependOf: [PERIODIC_FIELD.name, REPEAT_FIELD.name], + multiple: (dependValues = {}) => { + const { [REPEAT_FIELD.name]: repeat } = dependValues + + return REPEAT_VALUES.WEEKLY === repeat + }, + type: (dependValues = {}) => { + const { [REPEAT_FIELD.name]: repeat } = dependValues + + return REPEAT_VALUES.WEEKLY === repeat ? INPUT_TYPES.SELECT : INPUT_TYPES.TEXT + }, + label: (dependValues = {}) => { + const { [REPEAT_FIELD.name]: repeat } = dependValues + + return { + [REPEAT_VALUES.WEEKLY]: 'Days of week', + [REPEAT_VALUES.MONTHLY]: 'Days of month', + [REPEAT_VALUES.YEARLY]: 'Days of year', + [REPEAT_VALUES.HOURLY]: "Each 'x' hours" + }[repeat] + }, + values: [ + { text: T.Sunday, value: '0' }, + { text: T.Monday, value: '1' }, + { text: T.Tuesday, value: '2' }, + { text: T.Wednesday, value: '3' }, + { text: T.Thursday, value: '4' }, + { text: T.Friday, value: '5' }, + { text: T.Saturday, value: '6' } + ], + htmlType: (dependValues = {}) => { + const { [PERIODIC_FIELD.name]: periodic, [REPEAT_FIELD.name]: repeat } = dependValues + + if (!periodic) return INPUT_TYPES.HIDDEN + + return REPEAT_VALUES.HOURLY === repeat ? 'number' : undefined + }, + validation: yup + .string() + .default(undefined) + .when( + REPEAT_FIELD.name, + (repeatType, schema) => ({ + [REPEAT_VALUES.WEEKLY]: schema + .transform(value => Array.isArray(value) ? value.join(',') : value) + .required('Days field is required: between 0 (Sunday) and 6 (Saturday)'), + [REPEAT_VALUES.MONTHLY]: schema + .trim() + .matches(MONTH_DAYS_REG, { message: 'Days should be between 1 and 31' }) + .required('Days field is required: between 1 and 31'), + [REPEAT_VALUES.YEARLY]: schema + .trim() + .matches(YEAR_DAYS_REG, { message: 'Days should be between 0 and 365' }) + .required('Days field is required: between 0 and 365'), + [REPEAT_VALUES.HOURLY]: schema + .trim() + .matches(HOURS_REG, { message: 'Hours should be between 0 and 168' }) + .required('Hours field is required: between 0 and 168') + }[repeatType]) + ), + fieldProps: { min: 0, max: 168, step: 1 } +} + +const END_TYPE_FIELD = { + name: 'END_TYPE', + label: 'End type', + type: INPUT_TYPES.SELECT, + dependOf: PERIODIC_FIELD.name, + htmlType: isPeriodic => !isPeriodic ? INPUT_TYPES.HIDDEN : undefined, + values: END_TYPE_OPTIONS, + validation: yup + .string() + .trim() + .when( + PERIODIC_FIELD.name, + (isPeriodic, schema) => isPeriodic ? schema : schema.strip() + ) + .notRequired() + .default(END_TYPE_OPTIONS[0].value) +} + +const END_VALUE_FIELD = { + name: 'END_VALUE', + label: 'When you want that the action finishes', + dependOf: [PERIODIC_FIELD.name, END_TYPE_FIELD.name], + type: (dependValues = {}) => { + const { [END_TYPE_FIELD.name]: endType } = dependValues + + return endType === END_TYPE_VALUES.DATE ? INPUT_TYPES.TIME : INPUT_TYPES.TEXT + }, + htmlType: (dependValues = {}) => { + const { [PERIODIC_FIELD.name]: isPeriodic, [END_TYPE_FIELD.name]: endType } = dependValues + + if (!isPeriodic) return INPUT_TYPES.HIDDEN + + return { + [END_TYPE_VALUES.NEVER]: INPUT_TYPES.HIDDEN, + [END_TYPE_VALUES.REPETITION]: 'number', + [END_TYPE_VALUES.DATE]: 'datetime-local' + }[endType] + }, + validation: yup + .string() + .trim() + .default(undefined) + .when( + PERIODIC_FIELD.name, + (isPeriodic, schema) => isPeriodic ? schema : schema.strip() + ) + .when( + END_TYPE_FIELD.name, + (endType, schema) => ({ + [END_TYPE_VALUES.NEVER]: schema.strip(), + [END_TYPE_VALUES.REPETITION]: schema + .required('Number of repetitions is required'), + [END_TYPE_VALUES.DATE]: schema + .concat(isoDateValidation('Date')) + .required('Date to finish the action is required') + }[endType]) + ) +} + +export const FIELDS = vm => [ + ...COMMON_FIELDS(vm), + TIME_FIELD, + PERIODIC_FIELD, + REPEAT_FIELD, + DAYS_FIELD, + END_TYPE_FIELD, + END_VALUE_FIELD +] + +export const SCHEMA = vm => yup + .object(getValidationFromFields(FIELDS(vm))) + .concat(COMMON_SCHEMA(vm)) + .transform(value => { + const { [DAYS_FIELD.name]: DAYS, [REPEAT_FIELD.name]: REPEAT, ...rest } = value + + return { + ...rest, + [DAYS_FIELD.name]: DAYS, + [REPEAT_FIELD.name]: REPEAT, + [PERIODIC_FIELD.name]: !!(DAYS || REPEAT) + } + }) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js new file mode 100644 index 0000000000..5a66a2139b --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js @@ -0,0 +1,27 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema' + +const RelativeForm = ({ vm, schedule } = {}) => ({ + resolver: () => SCHEMA(vm), + defaultValues: schedule + ? SCHEMA(vm).cast(schedule, { stripUnknown: true }) + : SCHEMA(vm).default(), + fields: FIELDS(vm) +}) + +export default RelativeForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js new file mode 100644 index 0000000000..103a81c75c --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js @@ -0,0 +1,97 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' + +import { INPUT_TYPES } from 'client/constants' +import { getValidationFromFields, capitalize } from 'client/utils' +import { COMMON_FIELDS, COMMON_SCHEMA } from 'client/components/Forms/Vm/CreateSchedActionForm/CommonSchema' + +const PERIOD_TYPES = { + YEARS: 'years', + MONTHS: 'months', + WEEKS: 'weeks', + DAYS: 'days', + HOURS: 'hours', + MINUTES: 'minutes' +} + +const PERIOD_OPTIONS = Object.entries(PERIOD_TYPES) + .map(([text, value]) => ({ text: capitalize(text), value })) + +const TIME_FIELD = { + name: 'TIME', + label: 'Time after the VM is instantiated', + type: INPUT_TYPES.TEXT, + htmlType: 'number', + validation: yup + .number() + .typeError('Time value must be a number') + .required('Time field is required') + .positive() + .default(undefined) +} + +const PERIOD_FIELD = { + name: 'PERIOD', + label: 'Period type', + type: INPUT_TYPES.SELECT, + values: PERIOD_OPTIONS, + validation: yup + .string() + .trim() + .notRequired() + .default(PERIOD_OPTIONS[0].value) +} + +export const FIELDS = vm => [ + ...COMMON_FIELDS(vm), + TIME_FIELD, + PERIOD_FIELD +] + +export const SCHEMA = vm => yup + .object(getValidationFromFields(FIELDS(vm))) + .concat(COMMON_SCHEMA(vm)) + .transform(value => { + const { [PERIOD_FIELD.name]: PERIOD, [TIME_FIELD.name]: TIME, ...rest } = value + + if (String(TIME).includes('+')) { + const allPeriods = { + [PERIOD_TYPES.YEARS]: TIME / 365 / 24 / 3600, + [PERIOD_TYPES.MONTHS]: TIME / 30 / 24 / 3600, + [PERIOD_TYPES.WEEKS]: TIME / 7 / 24 / 3600, + [PERIOD_TYPES.DAYS]: TIME / 24 / 3600, + [PERIOD_TYPES.HOURS]: TIME / 3600, + [PERIOD_TYPES.MINUTES]: TIME / 60 + } + + const [period, time] = Object.entries(allPeriods).find(([_, time]) => time >= 1) + + return { ...rest, [PERIOD_FIELD.name]: period, [TIME_FIELD.name]: time } + } + + const timeInMilliseconds = { + [PERIOD_TYPES.YEARS]: TIME * 365 * 24 * 3600, + [PERIOD_TYPES.MONTHS]: TIME * 30 * 24 * 3600, + [PERIOD_TYPES.WEEKS]: TIME * 7 * 24 * 3600, + [PERIOD_TYPES.DAYS]: TIME * 24 * 3600, + [PERIOD_TYPES.HOURS]: TIME * 3600, + [PERIOD_TYPES.MINUTES]: TIME * 60 + }[PERIOD] + + return { ...rest, [TIME_FIELD.name]: timeInMilliseconds } + }) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js new file mode 100644 index 0000000000..92fd361456 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js @@ -0,0 +1,22 @@ +/* ------------------------------------------------------------------------- * + * 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 PunctualForm from 'client/components/Forms/Vm/CreateSchedActionForm/PunctualForm' +import RelativeForm from 'client/components/Forms/Vm/CreateSchedActionForm/RelativeForm' + +export { + PunctualForm, + RelativeForm +} diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/index.js new file mode 100644 index 0000000000..6e2d06dbaa --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/index.js @@ -0,0 +1,25 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/CreateSnapshotForm/schema' + +const CreateSnapshotForm = () => ({ + resolver: () => SCHEMA, + defaultValues: SCHEMA.default(), + fields: FIELDS +}) + +export default CreateSnapshotForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/schema.js new file mode 100644 index 0000000000..2e93a3c9db --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSnapshotForm/schema.js @@ -0,0 +1,37 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' +import { INPUT_TYPES } from 'client/constants' +import { getValidationFromFields } from 'client/utils' + +const NAME = { + name: 'NAME', + label: 'Snapshot name', + type: INPUT_TYPES.TEXT, + tooltip: 'The new snapshot name. It can be empty.', + validation: yup + .string() + .trim() + .notRequired() + .default('') +} + +export const FIELDS = [ + NAME +] + +export const SCHEMA = yup.object(getValidationFromFields(FIELDS)) diff --git a/src/fireedge/src/client/components/Forms/Vm/ResizeCapacityForm/index.js b/src/fireedge/src/client/components/Forms/Vm/ResizeCapacityForm/index.js index eb069034fe..ec69d2bcfe 100644 --- a/src/fireedge/src/client/components/Forms/Vm/ResizeCapacityForm/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/ResizeCapacityForm/index.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import PropTypes from 'prop-types' import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/ResizeCapacityForm/schema' const ResizeCapacityForm = ({ vm } = {}) => { @@ -27,10 +26,4 @@ const ResizeCapacityForm = ({ vm } = {}) => { } } -ResizeCapacityForm.propTypes = { - vm: PropTypes.object -} - -ResizeCapacityForm.displayName = 'ResizeCapacityForm' - export default ResizeCapacityForm diff --git a/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/index.js b/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/index.js new file mode 100644 index 0000000000..9d75e35c90 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/index.js @@ -0,0 +1,25 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/ResizeDiskForm/schema' + +const ResizeDiskForm = ({ disk } = {}) => ({ + resolver: () => SCHEMA, + defaultValues: SCHEMA.cast(disk, { stripUnknown: true }), + fields: FIELDS +}) + +export default ResizeDiskForm diff --git a/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/schema.js new file mode 100644 index 0000000000..b87ce19c28 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/ResizeDiskForm/schema.js @@ -0,0 +1,39 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' +import { INPUT_TYPES } from 'client/constants' +import { getValidationFromFields } from 'client/utils' + +const SIZE = { + name: 'SIZE', + label: 'New size', + type: INPUT_TYPES.TEXT, + htmlType: 'number', + tooltip: 'The new size string', + validation: yup + .number() + .typeError('Size value must be a number') + .required('Size field is required') + .positive() + .default(undefined) +} + +export const FIELDS = [ + SIZE +] + +export const SCHEMA = yup.object(getValidationFromFields(FIELDS)) diff --git a/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/index.js b/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/index.js new file mode 100644 index 0000000000..a0541a1cad --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/index.js @@ -0,0 +1,25 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { SCHEMA, FIELDS } from 'client/components/Forms/Vm/SaveAsDiskForm/schema' + +const SaveAsDiskForm = () => ({ + resolver: () => SCHEMA, + defaultValues: SCHEMA.default(), + fields: FIELDS +}) + +export default SaveAsDiskForm diff --git a/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/schema.js new file mode 100644 index 0000000000..2751256c64 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/SaveAsDiskForm/schema.js @@ -0,0 +1,37 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import * as yup from 'yup' +import { INPUT_TYPES } from 'client/constants' +import { getValidationFromFields } from 'client/utils' + +const NAME = { + name: 'NAME', + label: 'New Image name', + type: INPUT_TYPES.TEXT, + tooltip: 'Name for the new Image where the disk will be saved.', + validation: yup + .string() + .trim() + .required('Name field is required') + .default('') +} + +export const FIELDS = [ + NAME +] + +export const SCHEMA = yup.object(getValidationFromFields(FIELDS)) diff --git a/src/fireedge/src/client/components/Forms/Vm/index.js b/src/fireedge/src/client/components/Forms/Vm/index.js index 45105c6858..7cc7ec6b60 100644 --- a/src/fireedge/src/client/components/Forms/Vm/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/index.js @@ -13,11 +13,20 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import ResizeCapacityForm from 'client/components/Forms/Vm/ResizeCapacityForm' import AttachNicForm from 'client/components/Forms/Vm/AttachNicForm' +import CreateDiskSnapshotForm from 'client/components/Forms/Vm/CreateDiskSnapshotForm' +import CreateSnapshotForm from 'client/components/Forms/Vm/CreateSnapshotForm' +import ResizeCapacityForm from 'client/components/Forms/Vm/ResizeCapacityForm' +import ResizeDiskForm from 'client/components/Forms/Vm/ResizeDiskForm' +import SaveAsDiskForm from 'client/components/Forms/Vm/SaveAsDiskForm' export * from 'client/components/Forms/Vm/AttachDiskForm' +export * from 'client/components/Forms/Vm/CreateSchedActionForm' export { AttachNicForm, - ResizeCapacityForm + CreateDiskSnapshotForm, + CreateSnapshotForm, + ResizeCapacityForm, + ResizeDiskForm, + SaveAsDiskForm } diff --git a/src/fireedge/src/client/components/Forms/index.js b/src/fireedge/src/client/components/Forms/index.js index f26028f3d0..02ff74a94c 100644 --- a/src/fireedge/src/client/components/Forms/index.js +++ b/src/fireedge/src/client/components/Forms/index.js @@ -13,6 +13,10 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' import FormWithSchema from 'client/components/Forms/FormWithSchema' -export { FormWithSchema } +export { + ButtonToTriggerForm, + FormWithSchema +} diff --git a/src/fireedge/src/client/components/HOC/InternalLayout/index.js b/src/fireedge/src/client/components/HOC/InternalLayout/index.js index 7c27f410c5..b70264ded9 100644 --- a/src/fireedge/src/client/components/HOC/InternalLayout/index.js +++ b/src/fireedge/src/client/components/HOC/InternalLayout/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useRef } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -28,7 +28,7 @@ import internalStyles from 'client/components/HOC/InternalLayout/styles' const InternalLayout = ({ children }) => { const classes = internalStyles() - const container = React.useRef() + const container = useRef() const { isFixMenu } = useGeneral() return ( diff --git a/src/fireedge/src/client/components/HOC/Translate.js b/src/fireedge/src/client/components/HOC/Translate.js index 7afae85045..0d4e004a0c 100644 --- a/src/fireedge/src/client/components/HOC/Translate.js +++ b/src/fireedge/src/client/components/HOC/Translate.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useContext, useState, useEffect, createContext } from 'react' +import { useContext, useState, useEffect, createContext } from 'react' import PropTypes from 'prop-types' import root from 'window-or-global' import { sprintf } from 'sprintf-js' diff --git a/src/fireedge/src/client/components/Header/Group.js b/src/fireedge/src/client/components/Header/Group.js index ddac8fc55e..9e34e9bbea 100644 --- a/src/fireedge/src/client/components/Header/Group.js +++ b/src/fireedge/src/client/components/Header/Group.js @@ -14,8 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' - import { Button } from '@material-ui/core' import { Group as GroupIcon, VerifiedBadge as SelectIcon } from 'iconoir-react' @@ -33,10 +31,6 @@ const Group = () => { const { user, groups, filterPool } = useAuth() const { changeGroup } = useAuthApi() - const handleChangeGroup = group => { - group && changeGroup({ id: user.ID, group }) - } - const renderResult = ({ ID, NAME }, handleClose) => { const isSelected = (filterPool === ALL_RESOURCES && ALL_RESOURCES === ID) || @@ -44,11 +38,11 @@ const Group = () => { return ( ) - const viewNames = React.useMemo(() => Object.keys(views), [view]) + const viewNames = useMemo(() => Object.keys(views), [view]) return ( { +const DockerLogo = memo(({ viewBox, width, height, color, ...props }) => { return ( { const [error, setError] = useState(INITIAL_STATE) diff --git a/src/fireedge/src/client/components/List/ListCards/index.js b/src/fireedge/src/client/components/List/ListCards/index.js index ba89cd49ef..1d0f25b571 100644 --- a/src/fireedge/src/client/components/List/ListCards/index.js +++ b/src/fireedge/src/client/components/List/ListCards/index.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React from 'react' import PropTypes from 'prop-types' import { CSSTransition, TransitionGroup } from 'react-transition-group' @@ -74,7 +73,7 @@ const ListCards = ({ return ( {!!(hasReloadButton || reloadButtonProps) && ( - } {...reloadButtonProps} /> + } {...reloadButtonProps} /> )} {title && ( @@ -54,7 +54,7 @@ const ListHeader = memo(({ {!!(hasAddButton || addButtonProps) && ( - } {...addButtonProps} /> + } {...addButtonProps} /> )} {!!(hasSearch || searchProps) && ( diff --git a/src/fireedge/src/client/components/List/ListHeader/styles.js b/src/fireedge/src/client/components/List/ListHeader/styles.js index 4219d89595..7276b962f4 100644 --- a/src/fireedge/src/client/components/List/ListHeader/styles.js +++ b/src/fireedge/src/client/components/List/ListHeader/styles.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import { makeStyles, fade } from '@material-ui/core' +import { makeStyles, alpha } from '@material-ui/core' export default makeStyles(theme => ({ root: { @@ -54,9 +54,9 @@ export default makeStyles(theme => ({ search: { position: 'relative', borderRadius: theme.shape.borderRadius, - backgroundColor: fade(theme.palette.primary.dark, 0.15), + backgroundColor: alpha(theme.palette.primary.dark, 0.15), '&:hover': { - backgroundColor: fade(theme.palette.primary.dark, 0.25) + backgroundColor: alpha(theme.palette.primary.dark, 0.25) }, margin: theme.spacing(1, 0), width: '100%', diff --git a/src/fireedge/src/client/components/List/ListInfiniteScroll.js b/src/fireedge/src/client/components/List/ListInfiniteScroll.js index 5dc2dcd0af..ad06377345 100644 --- a/src/fireedge/src/client/components/List/ListInfiniteScroll.js +++ b/src/fireedge/src/client/components/List/ListInfiniteScroll.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useRef, useEffect, useCallback, createRef } from 'react' +import { useRef, useEffect, useCallback, createRef } from 'react' import PropTypes from 'prop-types' import { debounce, LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/List/ListVirtualized.js b/src/fireedge/src/client/components/List/ListVirtualized.js index 45e22df59e..8e2898de00 100644 --- a/src/fireedge/src/client/components/List/ListVirtualized.js +++ b/src/fireedge/src/client/components/List/ListVirtualized.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useRef, useCallback, useEffect } from 'react' import PropTypes from 'prop-types' import { useVirtual } from 'react-virtual' @@ -59,7 +59,7 @@ const ListVirtualized = ({ const classes = useStyles() // OBSERVER - const loaderRef = React.useRef() + const loaderRef = useRef() const { isNearScreen } = useNearScreen({ distance: '100px', externalRef: isLoading ? null : loaderRef, @@ -67,18 +67,18 @@ const ListVirtualized = ({ }) // VIRTUALIZER - const parentRef = React.useRef() + const parentRef = useRef() const rowVirtualizer = useVirtual({ size: data.length, parentRef, overscan: 20, - estimateSize: React.useCallback(() => 40, []), + estimateSize: useCallback(() => 40, []), keyExtractor: index => data[index]?.id }) - const debounceHandleNextPage = React.useCallback(debounce(fetchMore, 200), []) + const debounceHandleNextPage = useCallback(debounce(fetchMore, 200), []) - React.useEffect(() => { + useEffect(() => { if (isNearScreen && !canFetchMore) debounceHandleNextPage() }, [isNearScreen, canFetchMore, debounceHandleNextPage]) diff --git a/src/fireedge/src/client/components/LoadingScreen/index.js b/src/fireedge/src/client/components/LoadingScreen/index.js index 984c610e71..1783de793d 100644 --- a/src/fireedge/src/client/components/LoadingScreen/index.js +++ b/src/fireedge/src/client/components/LoadingScreen/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import { makeStyles, Box } from '@material-ui/core' import { OpenNebulaLogo } from 'client/components/Icons' @@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({ /** * Component with OpenNebula logo as spinner in full width and height. * - * @returns {React.JSXElementConstructor} Container with logo inside + * @returns {JSXElementConstructor} Container with logo inside */ const LoadingScreen = () => { const classes = useStyles() diff --git a/src/fireedge/src/client/components/Notifier/index.js b/src/fireedge/src/client/components/Notifier/index.js index 3771d73787..4ba3acdd94 100644 --- a/src/fireedge/src/client/components/Notifier/index.js +++ b/src/fireedge/src/client/components/Notifier/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { useSnackbar } from 'notistack' diff --git a/src/fireedge/src/client/components/NumberEasing/index.js b/src/fireedge/src/client/components/NumberEasing/index.js index c39a079d54..16a8bd9edb 100644 --- a/src/fireedge/src/client/components/NumberEasing/index.js +++ b/src/fireedge/src/client/components/NumberEasing/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useState, useEffect } from 'react' import PropTypes from 'prop-types' /** @@ -25,9 +25,9 @@ import PropTypes from 'prop-types' * @returns {string} Returns a count number */ const NumberEasing = ({ value = '0', speed = 200 }) => { - const [count, setCount] = React.useState('0') + const [count, setCount] = useState('0') - React.useEffect(() => { + useEffect(() => { let start = 0 const end = parseInt(String(value).substring(0, 3)) diff --git a/src/fireedge/src/client/components/Route/NoAuthRoute.js b/src/fireedge/src/client/components/Route/NoAuthRoute.js index cfca90fb90..4b1534cdb0 100644 --- a/src/fireedge/src/client/components/Route/NoAuthRoute.js +++ b/src/fireedge/src/client/components/Route/NoAuthRoute.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { Redirect, Route } from 'react-router-dom' @@ -23,7 +23,7 @@ import { useAuth } from 'client/features/Auth' * Public route. * * @param {object} props - Route props - * @param {React.JSXElementConstructor} props.redirectWhenAuth + * @param {JSXElementConstructor} props.redirectWhenAuth * - Route to redirect in case of user is authenticated * @returns {Redirect|Route} * - If current user is authenticated, then redirect to private route diff --git a/src/fireedge/src/client/components/Route/ProtectedRoute.js b/src/fireedge/src/client/components/Route/ProtectedRoute.js index 390d2046fc..619409eb71 100644 --- a/src/fireedge/src/client/components/Route/ProtectedRoute.js +++ b/src/fireedge/src/client/components/Route/ProtectedRoute.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useEffect } from 'react' import { Redirect, Route } from 'react-router-dom' import { useAuth, useAuthApi } from 'client/features/Auth' @@ -29,7 +29,7 @@ const ProtectedRoute = props => { const { isLogged, jwt } = useAuth() const { getAuthUser } = useAuthApi() - React.useEffect(() => { + useEffect(() => { jwt && getAuthUser() }, []) diff --git a/src/fireedge/src/client/components/Search/index.js b/src/fireedge/src/client/components/Search/index.js index 88021a215b..2088ae36bc 100644 --- a/src/fireedge/src/client/components/Search/index.js +++ b/src/fireedge/src/client/components/Search/index.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { TextField, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Sidebar/SidebarCollapseItem.js b/src/fireedge/src/client/components/Sidebar/SidebarCollapseItem.js index d63d977839..29157d70da 100644 --- a/src/fireedge/src/client/components/Sidebar/SidebarCollapseItem.js +++ b/src/fireedge/src/client/components/Sidebar/SidebarCollapseItem.js @@ -14,8 +14,9 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState } from 'react' +import { useEffect, useState } from 'react' import PropTypes from 'prop-types' +import { useLocation } from 'react-router-dom' import clsx from 'clsx' import { @@ -27,7 +28,11 @@ import { ListItemIcon, useMediaQuery } from '@material-ui/core' -import { NavArrowRight as CollapseIcon, NavArrowDown as ExpandMoreIcon } from 'iconoir-react' + +import { + Minus as CollapseIcon, + Plus as ExpandMoreIcon +} from 'iconoir-react' import { useGeneral } from 'client/features/General' import SidebarLink from 'client/components/Sidebar/SidebarLink' @@ -35,12 +40,21 @@ import sidebarStyles from 'client/components/Sidebar/styles' const SidebarCollapseItem = ({ label, routes, icon: Icon }) => { const classes = sidebarStyles() + const { pathname } = useLocation() const { isFixMenu } = useGeneral() - const [expanded, setExpanded] = useState(false) const isUpLg = useMediaQuery(theme => theme.breakpoints.up('lg')) + const [expanded, setExpanded] = useState(() => false) + const handleExpand = () => setExpanded(!expanded) + useEffect(() => { + if (isFixMenu && !expanded) { + const hasRouteSelected = routes.some(({ path }) => pathname === path) + hasRouteSelected && setExpanded(true) + } + }, [isFixMenu]) + return ( <> diff --git a/src/fireedge/src/client/components/Sidebar/SidebarLink.js b/src/fireedge/src/client/components/Sidebar/SidebarLink.js index 862ee0ad0d..c23087344e 100644 --- a/src/fireedge/src/client/components/Sidebar/SidebarLink.js +++ b/src/fireedge/src/client/components/Sidebar/SidebarLink.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { useHistory, useLocation } from 'react-router-dom' import clsx from 'clsx' @@ -63,7 +62,11 @@ const SidebarLink = ({ label, path, icon: Icon, devMode, isSubItem }) => { : label} + primary={ + devMode ? ( + + ) : label + } /> ) diff --git a/src/fireedge/src/client/components/Sidebar/index.js b/src/fireedge/src/client/components/Sidebar/index.js index 47fa601a58..0d84f6377e 100644 --- a/src/fireedge/src/client/components/Sidebar/index.js +++ b/src/fireedge/src/client/components/Sidebar/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useMemo } from 'react' +import { useMemo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/components/Sidebar/styles.js b/src/fireedge/src/client/components/Sidebar/styles.js index 9df5d38d03..6ad49cb03b 100644 --- a/src/fireedge/src/client/components/Sidebar/styles.js +++ b/src/fireedge/src/client/components/Sidebar/styles.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import { makeStyles } from '@material-ui/core' +import { makeStyles, alpha } from '@material-ui/core' import { sidebar, toolbar } from 'client/theme/defaults' export default makeStyles(theme => ({ @@ -148,7 +148,6 @@ export default makeStyles(theme => ({ }, itemSelected: { color: theme.palette.text.primary, - backgroundColor: theme.palette.primary.light, - '&:hover': { backgroundColor: theme.palette.primary.light } + backgroundColor: `${alpha(theme.palette.secondary.main, 0.60)} !important` } })) diff --git a/src/fireedge/src/client/components/SpeedDial/index.js b/src/fireedge/src/client/components/SpeedDial/index.js index 78faa92d1a..36b5db0b39 100644 --- a/src/fireedge/src/client/components/SpeedDial/index.js +++ b/src/fireedge/src/client/components/SpeedDial/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useState, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { SpeedDial as MSpeedDial, SpeedDialIcon, SpeedDialAction } from '@material-ui/lab' @@ -43,11 +43,11 @@ const useStyles = makeStyles(theme => ({ * name: string, * icon: object, * handleClick: Function}[]} props.actions - List of actions - * @returns {React.JSXElementConstructor} SpeedDial component + * @returns {JSXElementConstructor} SpeedDial component */ const SpeedDial = ({ hidden = false, actions = [] }) => { const classes = useStyles() - const [open, setOpen] = React.useState(false) + const [open, setOpen] = useState(false) const handleClose = () => { setOpen(false) diff --git a/src/fireedge/src/client/components/SplitPane/index.js b/src/fireedge/src/client/components/SplitPane/index.js index fdb6c7bf9c..1695000be9 100644 --- a/src/fireedge/src/client/components/SplitPane/index.js +++ b/src/fireedge/src/client/components/SplitPane/index.js @@ -14,9 +14,8 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useState, createRef, useRef, useEffect } from 'react' import PropTypes from 'prop-types' - import { makeStyles, Divider } from '@material-ui/core' const useStyles = makeStyles(theme => ({ @@ -54,11 +53,11 @@ const useStyles = makeStyles(theme => ({ const SplitPane = ({ children, containerProps }) => { const classes = useStyles() - const [topHeight, setTopHeight] = React.useState(null) + const [topHeight, setTopHeight] = useState(null) - const splitPaneRef = React.createRef() - const topRef = React.createRef() - const separatorYPosition = React.useRef(null) + const splitPaneRef = createRef() + const topRef = createRef() + const separatorYPosition = useRef(null) const onMouseDown = event => { separatorYPosition.current = event?.touches?.[0]?.clientY ?? event.clientY @@ -89,7 +88,7 @@ const SplitPane = ({ children, containerProps }) => { separatorYPosition.current = null } - React.useEffect(() => { + useEffect(() => { document.addEventListener('mousemove', onMouseMove) document.addEventListener('mouseup', onMouseUp) // on mobile device @@ -105,7 +104,7 @@ const SplitPane = ({ children, containerProps }) => { } }) - React.useEffect(() => { + useEffect(() => { if (!topHeight && children[1]) { setTopHeight(document.body.clientHeight / 2) topRef.current.style.flex = 'none' diff --git a/src/fireedge/src/client/components/Status/Badge.js b/src/fireedge/src/client/components/Status/Badge.js index c5d9ef174f..502ffe0f39 100644 --- a/src/fireedge/src/client/components/Status/Badge.js +++ b/src/fireedge/src/client/components/Status/Badge.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Badge } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Status/Chip.js b/src/fireedge/src/client/components/Status/Chip.js index eff48169f6..07a249145f 100644 --- a/src/fireedge/src/client/components/Status/Chip.js +++ b/src/fireedge/src/client/components/Status/Chip.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography, lighten, darken } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Status/Circle.js b/src/fireedge/src/client/components/Status/Circle.js index dae9e20868..038c49a115 100644 --- a/src/fireedge/src/client/components/Status/Circle.js +++ b/src/fireedge/src/client/components/Status/Circle.js @@ -14,9 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' - import { Tooltip, Typography } from '@material-ui/core' const StatusCircle = ({ color, tooltip, size }) => ( diff --git a/src/fireedge/src/client/components/Status/LinearProgressWithLabel.js b/src/fireedge/src/client/components/Status/LinearProgressWithLabel.js index 1fadd76d40..7b1211ded1 100644 --- a/src/fireedge/src/client/components/Status/LinearProgressWithLabel.js +++ b/src/fireedge/src/client/components/Status/LinearProgressWithLabel.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' diff --git a/src/fireedge/src/client/components/Tables/Clusters/index.js b/src/fireedge/src/client/components/Tables/Clusters/index.js index c7d7ae198a..5d4c6d759e 100644 --- a/src/fireedge/src/client/components/Tables/Clusters/index.js +++ b/src/fireedge/src/client/components/Tables/Clusters/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect, useMemo } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -25,7 +25,7 @@ import ClusterColumns from 'client/components/Tables/Clusters/columns' import ClusterRow from 'client/components/Tables/Clusters/row' const ClustersTable = () => { - const columns = React.useMemo(() => ClusterColumns, []) + const columns = useMemo(() => ClusterColumns, []) const clusters = useCluster() const { getClusters } = useClusterApi() diff --git a/src/fireedge/src/client/components/Tables/Clusters/row.js b/src/fireedge/src/client/components/Tables/Clusters/row.js index f0a5383649..e40754a007 100644 --- a/src/fireedge/src/client/components/Tables/Clusters/row.js +++ b/src/fireedge/src/client/components/Tables/Clusters/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { HardDrive, NetworkAlt, Folder, Cloud } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Datastores/index.js b/src/fireedge/src/client/components/Tables/Datastores/index.js index d6c547688b..f40bdac17a 100644 --- a/src/fireedge/src/client/components/Tables/Datastores/index.js +++ b/src/fireedge/src/client/components/Tables/Datastores/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect, useMemo } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -25,7 +25,7 @@ import DatastoreColumns from 'client/components/Tables/Datastores/columns' import DatastoreRow from 'client/components/Tables/Datastores/row' const DatastoresTable = () => { - const columns = React.useMemo(() => DatastoreColumns, []) + const columns = useMemo(() => DatastoreColumns, []) const datastores = useDatastore() const { getDatastores } = useDatastoreApi() diff --git a/src/fireedge/src/client/components/Tables/Datastores/row.js b/src/fireedge/src/client/components/Tables/Datastores/row.js index 896ee4a187..7b762bf66b 100644 --- a/src/fireedge/src/client/components/Tables/Datastores/row.js +++ b/src/fireedge/src/client/components/Tables/Datastores/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, Lock, Cloud, Server } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Enhanced/Utils/CategoryFilter.js b/src/fireedge/src/client/components/Tables/Enhanced/Utils/CategoryFilter.js index a018fa873b..ca46d990a2 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/Utils/CategoryFilter.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/Utils/CategoryFilter.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useEffect, useMemo, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { List, ListSubheader, ListItem, Typography, IconButton } from '@material-ui/core' @@ -30,7 +30,7 @@ import { Tr } from 'client/components/HOC' * @param {UseFiltersInstanceProps} props.column - Column to filter by * @param {string} [props.accessorOption] - Name of property option * @param {boolean} [props.multiple] - If `true`, can be more than one filter - * @returns {React.JSXElementConstructor} Component JSX + * @returns {JSXElementConstructor} Component JSX */ const CategoryFilter = ({ title, column, accessorOption, multiple = false }) => { const { @@ -40,10 +40,10 @@ const CategoryFilter = ({ title, column, accessorOption, multiple = false }) => filterValue = multiple ? [] : undefined } = column - React.useEffect(() => () => setFilter(undefined), []) + useEffect(() => () => setFilter(undefined), []) // Calculate the options for filtering using the preFilteredRows - const options = React.useMemo(() => { + const options = useMemo(() => { const options = {} preFilteredRows?.forEach(row => { @@ -68,7 +68,7 @@ const CategoryFilter = ({ title, column, accessorOption, multiple = false }) => const handleClear = () => setFilter(multiple ? [] : undefined) - const isFiltered = React.useMemo(() => ( + const isFiltered = useMemo(() => ( multiple ? filterValue?.length > 0 : filterValue !== undefined ), [filterValue]) diff --git a/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalFilter.js b/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalFilter.js index 35bd907068..b90af763ae 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalFilter.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalFilter.js @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor, useState, useCallback } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' -import { makeStyles, fade, debounce, InputBase } from '@material-ui/core' +import { makeStyles, alpha, debounce, InputBase } from '@material-ui/core' import { Search as SearchIcon } from 'iconoir-react' import { UseGlobalFiltersInstanceProps, UseGlobalFiltersState } from 'react-table' @@ -25,9 +25,9 @@ const useStyles = makeStyles(({ spacing, palette, shape, breakpoints }) => ({ search: { position: 'relative', borderRadius: shape.borderRadius, - backgroundColor: fade(palette.divider, 0.15), + backgroundColor: alpha(palette.divider, 0.15), '&:hover': { - backgroundColor: fade(palette.divider, 0.25) + backgroundColor: alpha(palette.divider, 0.25) }, width: '100%', [breakpoints.up('sm')]: { @@ -60,7 +60,7 @@ const useStyles = makeStyles(({ spacing, palette, shape, breakpoints }) => ({ * @param {object} props - Props * @param {string} props.className - Class to wrapper root * @param {UseGlobalFiltersInstanceProps} props.useTableProps - Table props - * @returns {React.JSXElementConstructor} Component JSX + * @returns {JSXElementConstructor} Component JSX */ const GlobalFilter = ({ useTableProps, className }) => { const classes = useStyles() @@ -70,9 +70,9 @@ const GlobalFilter = ({ useTableProps, className }) => { /** @type {UseGlobalFiltersState} */ const { globalFilter } = state - const [value, setValue] = React.useState(() => globalFilter) + const [value, setValue] = useState(() => globalFilter) - const handleChange = React.useCallback( + const handleChange = useCallback( // Set undefined to remove the filter entirely debounce(value => { setGlobalFilter(value || undefined) }, 200) ) diff --git a/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalSelectedRows.js b/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalSelectedRows.js index 694cd69d30..732e1a174c 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalSelectedRows.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/Utils/GlobalSelectedRows.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { useMemo, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { TableProps } from 'react-table' @@ -33,7 +33,7 @@ const useStyles = makeStyles({ * * @param {object} props - Props * @param {TableProps} props.useTableProps - Table props - * @returns {React.JSXElementConstructor} Component JSX + * @returns {JSXElementConstructor} Component JSX */ const GlobalSelectedRows = ({ useTableProps }) => { const classes = useStyles() @@ -43,7 +43,7 @@ const GlobalSelectedRows = ({ useTableProps }) => { return (
- {React.useMemo(() => + {useMemo(() => selectedRows?.map(({ original, id, toggleRowSelected }) => ( { const classes = useStyles() @@ -53,9 +51,9 @@ const GlobalSort = ({ useTableProps }) => { /** @type {UseSortByState} */ const { sortBy } = state - React.useEffect(() => () => setSortBy([]), []) + useEffect(() => () => setSortBy([]), []) - const headersNotSorted = React.useMemo(() => + const headersNotSorted = useMemo(() => headers.filter(({ isSorted, canSort, isVisible }) => !isSorted && canSort && isVisible ), [sortBy.length]) @@ -74,7 +72,7 @@ const GlobalSort = ({ useTableProps }) => { return (
- {React.useMemo(() => ( + {useMemo(() => ( } @@ -109,7 +107,7 @@ const GlobalSort = ({ useTableProps }) => { ), [headersNotSorted.length])} - {React.useMemo(() => sortBy?.map(({ name, id, desc }) => ( + {useMemo(() => sortBy?.map(({ name, id, desc }) => ( : } diff --git a/src/fireedge/src/client/components/Tables/Enhanced/Utils/LabelFilter.js b/src/fireedge/src/client/components/Tables/Enhanced/Utils/LabelFilter.js index d3494140c0..cb870566cb 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/Utils/LabelFilter.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/Utils/LabelFilter.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useEffect, useMemo } from 'react' import PropTypes from 'prop-types' import { Cancel } from 'iconoir-react' @@ -62,9 +62,9 @@ const LabelFilter = ({ title, column }) => { /** @type {UseFiltersInstanceProps} */ const { setFilter, id, preFilteredRows, filterValue = [] } = column - React.useEffect(() => () => setFilter([]), []) + useEffect(() => () => setFilter([]), []) - const labels = React.useMemo(() => { + const labels = useMemo(() => { const labels = new Set() preFilteredRows?.forEach(row => { @@ -76,7 +76,7 @@ const LabelFilter = ({ title, column }) => { return [...labels.values()] }, [id, preFilteredRows]) - const tree = React.useMemo(() => buildTree(labels), [labels]) + const tree = useMemo(() => buildTree(labels), [labels]) const handleSelect = value => setFilter([...filterValue, value]) @@ -86,7 +86,7 @@ const LabelFilter = ({ title, column }) => { const handleClear = () => setFilter(undefined) - const isFiltered = React.useMemo(() => ( + const isFiltered = useMemo(() => ( filterValue?.length > 0 ), [filterValue]) diff --git a/src/fireedge/src/client/components/Tables/Enhanced/filters.js b/src/fireedge/src/client/components/Tables/Enhanced/filters.js index c1edc52e39..d0814f4808 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/filters.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/filters.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useMemo, Fragment } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -54,13 +54,13 @@ const Filters = ({ onlyGlobalSearch, useTableProps }) => { /** @type {UseTableInstanceProps} */ const { rows, columns } = useTableProps - const filters = React.useMemo(() => ( + const filters = useMemo(() => ( columns .filter(({ canFilter }) => canFilter) .map((column, idx) => column.canFilter ? ( - + {column.render('Filter')} - + ) : null) ), [rows]) diff --git a/src/fireedge/src/client/components/Tables/Enhanced/index.js b/src/fireedge/src/client/components/Tables/Enhanced/index.js index dcb239fb65..ac0cc97b42 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/index.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useMemo } from 'react' import PropTypes from 'prop-types' import { InfoEmpty } from 'iconoir-react' @@ -59,11 +59,11 @@ const EnhancedTable = ({ const isFetching = isLoading && data === undefined - const defaultColumn = React.useMemo(() => ({ + const defaultColumn = useMemo(() => ({ disableFilters: true }), []) - const sortTypes = React.useMemo(() => ({ + const sortTypes = useMemo(() => ({ length: (rowA, rowB, columnId, desc) => desc ? rowB.values[columnId].length - rowA.values[columnId].length : rowA.values[columnId].length - rowB.values[columnId].length diff --git a/src/fireedge/src/client/components/Tables/Enhanced/pagination.js b/src/fireedge/src/client/components/Tables/Enhanced/pagination.js index a04a2e95ee..8d249391ce 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/pagination.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/pagination.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React from 'react' +import { useMemo } from 'react' import PropTypes from 'prop-types' import { Button } from '@material-ui/core' @@ -32,7 +32,7 @@ const Pagination = ({ /** @type {UsePaginationState} */ const { pageIndex, pageSize } = useTableProps.state - const pageCount = React.useMemo(() => Math.ceil(count / pageSize), [count]) + const pageCount = useMemo(() => Math.ceil(count / pageSize), [count]) const handleBackButtonClick = () => { handleChangePage(pageIndex - 1) diff --git a/src/fireedge/src/client/components/Tables/Enhanced/row.js b/src/fireedge/src/client/components/Tables/Enhanced/row.js index a8e260f63d..bf2b05e249 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/row.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/row.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useCallback } from 'react' import PropTypes from 'prop-types' import { Row as RowType } from 'react-table' @@ -22,7 +22,7 @@ const Row = ({ row, handleClick }) => { /** @type {RowType} */ const { getRowProps, cells, isSelected } = row - const renderCell = React.useCallback(cell => ( + const renderCell = useCallback(cell => (
{cell.render('Cell')}
diff --git a/src/fireedge/src/client/components/Tables/Enhanced/toolbar.js b/src/fireedge/src/client/components/Tables/Enhanced/toolbar.js index 3c24fd02c5..00f43cc5e2 100644 --- a/src/fireedge/src/client/components/Tables/Enhanced/toolbar.js +++ b/src/fireedge/src/client/components/Tables/Enhanced/toolbar.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { makeStyles, useMediaQuery } from '@material-ui/core' @@ -34,11 +33,11 @@ const Toolbar = ({ onlyGlobalSelectedRows = false, useTableProps = {} }) => { const classes = useToolbarStyles() const isMobile = useMediaQuery(theme => theme.breakpoints.down('sm')) - if (isMobile || onlyGlobalSelectedRows) { + if (onlyGlobalSelectedRows) { return } - return ( + return isMobile ? null : (
diff --git a/src/fireedge/src/client/components/Tables/Groups/index.js b/src/fireedge/src/client/components/Tables/Groups/index.js index 0fe6322f57..513816d198 100644 --- a/src/fireedge/src/client/components/Tables/Groups/index.js +++ b/src/fireedge/src/client/components/Tables/Groups/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useGroup, useGroupApi } from 'client/features/One' @@ -24,7 +24,7 @@ import GroupColumns from 'client/components/Tables/Groups/columns' import GroupRow from 'client/components/Tables/Groups/row' const GroupsTable = () => { - const columns = React.useMemo(() => GroupColumns, []) + const columns = useMemo(() => GroupColumns, []) const groups = useGroup() const { getGroups } = useGroupApi() diff --git a/src/fireedge/src/client/components/Tables/Groups/row.js b/src/fireedge/src/client/components/Tables/Groups/row.js index 28ff3cfd62..192ec86b8f 100644 --- a/src/fireedge/src/client/components/Tables/Groups/row.js +++ b/src/fireedge/src/client/components/Tables/Groups/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Group } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Hosts/detail.js b/src/fireedge/src/client/components/Tables/Hosts/detail.js index d30a69a0f5..1ea27a3a29 100644 --- a/src/fireedge/src/client/components/Tables/Hosts/detail.js +++ b/src/fireedge/src/client/components/Tables/Hosts/detail.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Tables/Hosts/index.js b/src/fireedge/src/client/components/Tables/Hosts/index.js index 3c8c6da221..f21cce9e4f 100644 --- a/src/fireedge/src/client/components/Tables/Hosts/index.js +++ b/src/fireedge/src/client/components/Tables/Hosts/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -26,7 +26,7 @@ import HostRow from 'client/components/Tables/Hosts/row' import HostDetail from 'client/components/Tables/Hosts/detail' const HostsTable = () => { - const columns = React.useMemo(() => HostColumns, []) + const columns = useMemo(() => HostColumns, []) const hosts = useHost() const { getHosts } = useHostApi() diff --git a/src/fireedge/src/client/components/Tables/Hosts/row.js b/src/fireedge/src/client/components/Tables/Hosts/row.js index 8ec81aa263..00743f99f1 100644 --- a/src/fireedge/src/client/components/Tables/Hosts/row.js +++ b/src/fireedge/src/client/components/Tables/Hosts/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Server, ModernTv } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Images/detail.js b/src/fireedge/src/client/components/Tables/Images/detail.js index 65d9d6cc80..1988517133 100644 --- a/src/fireedge/src/client/components/Tables/Images/detail.js +++ b/src/fireedge/src/client/components/Tables/Images/detail.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Tables/Images/index.js b/src/fireedge/src/client/components/Tables/Images/index.js index 0eaecb29d6..c785fececb 100644 --- a/src/fireedge/src/client/components/Tables/Images/index.js +++ b/src/fireedge/src/client/components/Tables/Images/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -25,7 +25,7 @@ import ImageColumns from 'client/components/Tables/Images/columns' import ImageRow from 'client/components/Tables/Images/row' const ImagesTable = props => { - const columns = React.useMemo(() => ImageColumns, []) + const columns = useMemo(() => ImageColumns, []) const images = useImage() const { getImages } = useImageApi() diff --git a/src/fireedge/src/client/components/Tables/Images/row.js b/src/fireedge/src/client/components/Tables/Images/row.js index af7413b69e..fc43ee1e93 100644 --- a/src/fireedge/src/client/components/Tables/Images/row.js +++ b/src/fireedge/src/client/components/Tables/Images/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Lock, User, Group, Folder, ModernTv } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/MarketplaceApps/index.js b/src/fireedge/src/client/components/Tables/MarketplaceApps/index.js index 7ec882eecd..9a0831ce34 100644 --- a/src/fireedge/src/client/components/Tables/MarketplaceApps/index.js +++ b/src/fireedge/src/client/components/Tables/MarketplaceApps/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -25,7 +25,7 @@ import MarketplaceAppColumns from 'client/components/Tables/MarketplaceApps/colu import MarketplaceAppRow from 'client/components/Tables/MarketplaceApps/row' const MarketplaceAppsTable = () => { - const columns = React.useMemo(() => MarketplaceAppColumns, []) + const columns = useMemo(() => MarketplaceAppColumns, []) const marketplaceApps = useMarketplaceApp() const { getMarketplaceApps } = useMarketplaceAppApi() diff --git a/src/fireedge/src/client/components/Tables/MarketplaceApps/row.js b/src/fireedge/src/client/components/Tables/MarketplaceApps/row.js index 7d1853b8b4..845aba7a6d 100644 --- a/src/fireedge/src/client/components/Tables/MarketplaceApps/row.js +++ b/src/fireedge/src/client/components/Tables/MarketplaceApps/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Lock, User, Group, Cart } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Marketplaces/index.js b/src/fireedge/src/client/components/Tables/Marketplaces/index.js index 6080e76e54..1a3bfcd95e 100644 --- a/src/fireedge/src/client/components/Tables/Marketplaces/index.js +++ b/src/fireedge/src/client/components/Tables/Marketplaces/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -25,7 +25,7 @@ import MarketplaceColumns from 'client/components/Tables/Marketplaces/columns' import MarketplaceRow from 'client/components/Tables/Marketplaces/row' const MarketplacesTable = () => { - const columns = React.useMemo(() => MarketplaceColumns, []) + const columns = useMemo(() => MarketplaceColumns, []) const marketplaces = useMarketplace() const { getMarketplaces } = useMarketplaceApi() diff --git a/src/fireedge/src/client/components/Tables/Marketplaces/row.js b/src/fireedge/src/client/components/Tables/Marketplaces/row.js index 28b8d8369b..7691f984cc 100644 --- a/src/fireedge/src/client/components/Tables/Marketplaces/row.js +++ b/src/fireedge/src/client/components/Tables/Marketplaces/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, CloudDownload } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Skeleton/index.js b/src/fireedge/src/client/components/Tables/Skeleton/index.js index 86809eff7a..efad3cc5f3 100644 --- a/src/fireedge/src/client/components/Tables/Skeleton/index.js +++ b/src/fireedge/src/client/components/Tables/Skeleton/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import { Skeleton } from '@material-ui/lab' import { useMediaQuery, Card } from '@material-ui/core' @@ -21,7 +21,7 @@ import { useMediaQuery, Card } from '@material-ui/core' import EnhancedTableStyles from 'client/components/Tables/Enhanced/styles' import { rowStyles } from 'client/components/Tables/styles' -const SkeletonTable = React.memo(() => { +const SkeletonTable = memo(() => { const isMobile = useMediaQuery(theme => theme.breakpoints.down('sm')) const classes = EnhancedTableStyles() const rowClasses = rowStyles() diff --git a/src/fireedge/src/client/components/Tables/Users/index.js b/src/fireedge/src/client/components/Tables/Users/index.js index 3432c15d5b..e7740a1cb2 100644 --- a/src/fireedge/src/client/components/Tables/Users/index.js +++ b/src/fireedge/src/client/components/Tables/Users/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useUser, useUserApi } from 'client/features/One' @@ -24,7 +24,7 @@ import UserColumns from 'client/components/Tables/Users/columns' import UserRow from 'client/components/Tables/Users/row' const UsersTable = () => { - const columns = React.useMemo(() => UserColumns, []) + const columns = useMemo(() => UserColumns, []) const users = useUser() const { getUsers } = useUserApi() diff --git a/src/fireedge/src/client/components/Tables/Users/row.js b/src/fireedge/src/client/components/Tables/Users/row.js index fef8123b00..5f8ec08ef3 100644 --- a/src/fireedge/src/client/components/Tables/Users/row.js +++ b/src/fireedge/src/client/components/Tables/Users/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Group, Lock, LockKey } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/index.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/index.js index dea03ca3b9..6e8972af8c 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/index.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useVNetworkTemplate, useVNetworkTemplateApi } from 'client/features/One' @@ -24,7 +24,7 @@ import VNetworkTemplateColumns from 'client/components/Tables/VNetworkTemplates/ import VNetworkTemplateRow from 'client/components/Tables/VNetworkTemplates/row' const VNetworkTemplatesTable = () => { - const columns = React.useMemo(() => VNetworkTemplateColumns, []) + const columns = useMemo(() => VNetworkTemplateColumns, []) const vNetworkTemplates = useVNetworkTemplate() const { getVNetworkTemplates } = useVNetworkTemplateApi() diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js index a5ff6369c7..cc79bd8568 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, Lock, Cloud } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/VNetworks/index.js b/src/fireedge/src/client/components/Tables/VNetworks/index.js index aa72a69816..235beaecdb 100644 --- a/src/fireedge/src/client/components/Tables/VNetworks/index.js +++ b/src/fireedge/src/client/components/Tables/VNetworks/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useVNetwork, useVNetworkApi } from 'client/features/One' @@ -24,7 +24,7 @@ import VNetworkColumns from 'client/components/Tables/VNetworks/columns' import VNetworkRow from 'client/components/Tables/VNetworks/row' const VNetworksTable = props => { - const columns = React.useMemo(() => VNetworkColumns, []) + const columns = useMemo(() => VNetworkColumns, []) const vNetworks = useVNetwork() const { getVNetworks } = useVNetworkApi() diff --git a/src/fireedge/src/client/components/Tables/VNetworks/row.js b/src/fireedge/src/client/components/Tables/VNetworks/row.js index 9f96f02a16..05990d53bb 100644 --- a/src/fireedge/src/client/components/Tables/VNetworks/row.js +++ b/src/fireedge/src/client/components/Tables/VNetworks/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, Lock, Server, Cloud } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/VRouters/index.js b/src/fireedge/src/client/components/Tables/VRouters/index.js index b65b8071dc..ced5d201d5 100644 --- a/src/fireedge/src/client/components/Tables/VRouters/index.js +++ b/src/fireedge/src/client/components/Tables/VRouters/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useVRouter, useVRouterApi } from 'client/features/One' @@ -24,7 +24,7 @@ import VRouterColumns from 'client/components/Tables/VRouters/columns' import VRouterRow from 'client/components/Tables/VRouters/row' const VRoutersTable = () => { - const columns = React.useMemo(() => VRouterColumns, []) + const columns = useMemo(() => VRouterColumns, []) const vRouters = useVRouter() const { getVRouters } = useVRouterApi() diff --git a/src/fireedge/src/client/components/Tables/VRouters/row.js b/src/fireedge/src/client/components/Tables/VRouters/row.js index 1236225006..308ad09521 100644 --- a/src/fireedge/src/client/components/Tables/VRouters/row.js +++ b/src/fireedge/src/client/components/Tables/VRouters/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, EmptyPage, ModernTv } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Virtualized/header.js b/src/fireedge/src/client/components/Tables/Virtualized/header.js index 43263d83ea..692833d9ba 100644 --- a/src/fireedge/src/client/components/Tables/Virtualized/header.js +++ b/src/fireedge/src/client/components/Tables/Virtualized/header.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useCallback } from 'react' import PropTypes from 'prop-types' import { UseTableInstanceProps } from 'react-table' @@ -22,13 +22,13 @@ const Header = ({ useTableProps }) => { /** @type {UseTableInstanceProps} */ const { headerGroups } = useTableProps - const renderHeaderColumn = React.useCallback(column => ( + const renderHeaderColumn = useCallback(column => (
{column.render('Header')}
), []) - const renderHeaderGroup = React.useCallback(headerGroup => ( + const renderHeaderGroup = useCallback(headerGroup => (
{headerGroup.headers.map(renderHeaderColumn)}
diff --git a/src/fireedge/src/client/components/Tables/Virtualized/index.js b/src/fireedge/src/client/components/Tables/Virtualized/index.js index 1578f122af..7ba26cd990 100644 --- a/src/fireedge/src/client/components/Tables/Virtualized/index.js +++ b/src/fireedge/src/client/components/Tables/Virtualized/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { memo, useMemo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Box, CircularProgress } from '@material-ui/core' @@ -81,7 +81,7 @@ const useStyles = makeStyles(theme => ({ } })) -const DefaultCell = React.memo(({ value }) => value ?? '--') +const DefaultCell = memo(({ value }) => value ?? '--') DefaultCell.propTypes = { value: PropTypes.any } DefaultCell.displayName = 'DefaultCell' @@ -94,7 +94,7 @@ const VirtualizedTable = ({ }) => { const classes = useStyles() - const defaultColumn = React.useMemo(() => ({ + const defaultColumn = useMemo(() => ({ // Filter: DefaultFilter, Cell: DefaultCell }), []) diff --git a/src/fireedge/src/client/components/Tables/Virtualized/row.js b/src/fireedge/src/client/components/Tables/Virtualized/row.js index 972910d6c0..ab7ba50805 100644 --- a/src/fireedge/src/client/components/Tables/Virtualized/row.js +++ b/src/fireedge/src/client/components/Tables/Virtualized/row.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useCallback } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -50,7 +50,7 @@ const Row = ({ virtualRow, useTableProps }) => { prepareRow(row) - const renderCell = React.useCallback(cell => ( + const renderCell = useCallback(cell => ( {cell.render('Cell')} diff --git a/src/fireedge/src/client/components/Tables/Virtualized/toolbar.js b/src/fireedge/src/client/components/Tables/Virtualized/toolbar.js index d4862ac6bd..c9f6ec3949 100644 --- a/src/fireedge/src/client/components/Tables/Virtualized/toolbar.js +++ b/src/fireedge/src/client/components/Tables/Virtualized/toolbar.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { makeStyles, Button } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Tables/VmTemplates/detail.js b/src/fireedge/src/client/components/Tables/VmTemplates/detail.js index 815f1cd95d..8a28881074 100644 --- a/src/fireedge/src/client/components/Tables/VmTemplates/detail.js +++ b/src/fireedge/src/client/components/Tables/VmTemplates/detail.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Tables/VmTemplates/index.js b/src/fireedge/src/client/components/Tables/VmTemplates/index.js index 6f69117129..716b9576fa 100644 --- a/src/fireedge/src/client/components/Tables/VmTemplates/index.js +++ b/src/fireedge/src/client/components/Tables/VmTemplates/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useVmTemplate, useVmTemplateApi } from 'client/features/One' @@ -25,7 +25,7 @@ import VmTemplateRow from 'client/components/Tables/VmTemplates/row' import VmTemplateDetail from 'client/components/Tables/VmTemplates/detail' const VmTemplatesTable = () => { - const columns = React.useMemo(() => VmTemplateColumns, []) + const columns = useMemo(() => VmTemplateColumns, []) const vmTemplates = useVmTemplate() const { getVmTemplates } = useVmTemplateApi() diff --git a/src/fireedge/src/client/components/Tables/VmTemplates/row.js b/src/fireedge/src/client/components/Tables/VmTemplates/row.js index 0adc432071..db62a56aa4 100644 --- a/src/fireedge/src/client/components/Tables/VmTemplates/row.js +++ b/src/fireedge/src/client/components/Tables/VmTemplates/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, Lock } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Vms/index.js b/src/fireedge/src/client/components/Tables/Vms/index.js index 48fa9fcf8a..50bc53aaa8 100644 --- a/src/fireedge/src/client/components/Tables/Vms/index.js +++ b/src/fireedge/src/client/components/Tables/Vms/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useMemo, useEffect } from 'react' import { useAuth } from 'client/features/Auth' import { useFetch } from 'client/hooks' @@ -33,7 +33,7 @@ const VmsTable = props => { const { getVms } = useVmApi() const { view, getResourceView, filterPool } = useAuth() - const columns = React.useMemo(() => createColumns({ + const columns = useMemo(() => createColumns({ filters: getResourceView('VM')?.filters, columns: VmColumns }), [view]) @@ -41,7 +41,7 @@ const VmsTable = props => { const { status, data, fetchRequest, loading, reloading, error, STATUS } = useFetch(getVms) const { INIT, PENDING } = STATUS - React.useEffect(() => { + useEffect(() => { const requests = { INIT: () => fetchRequest({ start: INITIAL_ELEMENT, diff --git a/src/fireedge/src/client/components/Tables/Vms/multiple.js b/src/fireedge/src/client/components/Tables/Vms/multiple.js index 83892340ce..11e3dac63f 100644 --- a/src/fireedge/src/client/components/Tables/Vms/multiple.js +++ b/src/fireedge/src/client/components/Tables/Vms/multiple.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Tooltip, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Tables/Vms/row.js b/src/fireedge/src/client/components/Tables/Vms/row.js index 65738d2852..c033fb7113 100644 --- a/src/fireedge/src/client/components/Tables/Vms/row.js +++ b/src/fireedge/src/client/components/Tables/Vms/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { User, Group, Lock, HardDrive } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/Zones/index.js b/src/fireedge/src/client/components/Tables/Zones/index.js index cc3157dd6e..a059c8fcf1 100644 --- a/src/fireedge/src/client/components/Tables/Zones/index.js +++ b/src/fireedge/src/client/components/Tables/Zones/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useMemo, useEffect } from 'react' import { useFetch } from 'client/hooks' import { useZone, useZoneApi } from 'client/features/One' @@ -24,7 +24,7 @@ import ZoneColumns from 'client/components/Tables/Zones/columns' import ZoneRow from 'client/components/Tables/Zones/row' const ZonesTable = () => { - const columns = React.useMemo(() => ZoneColumns, []) + const columns = useMemo(() => ZoneColumns, []) const zones = useZone() const { getZones } = useZoneApi() diff --git a/src/fireedge/src/client/components/Tables/Zones/row.js b/src/fireedge/src/client/components/Tables/Zones/row.js index fea1c058f3..70bdaf23a0 100644 --- a/src/fireedge/src/client/components/Tables/Zones/row.js +++ b/src/fireedge/src/client/components/Tables/Zones/row.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { ShieldCheck } from 'iconoir-react' diff --git a/src/fireedge/src/client/components/Tables/styles.js b/src/fireedge/src/client/components/Tables/styles.js index bd2658f419..107fcc0c09 100644 --- a/src/fireedge/src/client/components/Tables/styles.js +++ b/src/fireedge/src/client/components/Tables/styles.js @@ -72,5 +72,4 @@ export const rowStyles = makeStyles( flexShrink: 0 } }) - ) diff --git a/src/fireedge/src/client/components/Tabs/Common/Attribute/Actions.js b/src/fireedge/src/client/components/Tabs/Common/Attribute/Actions.js index 5c9b87b9f8..0210419d0f 100644 --- a/src/fireedge/src/client/components/Tabs/Common/Attribute/Actions.js +++ b/src/fireedge/src/client/components/Tabs/Common/Attribute/Actions.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { @@ -38,13 +38,13 @@ const getAttributeCy = (action, attr) => `${action}-${stringToCamelCase(attr.toL * @typedef {object} ActionButtonProps * @property {string} action - Action name * @property {string} name - Attribute name - * @property {React.FunctionComponent} icon - Icon + * @property {JSXElementConstructor} icon - Icon * @property {Function} handleClick - Click event */ /** * @param {ActionButtonProps} props - Action button props - * @returns {React.JSXElementConstructor} Action button with props + * @returns {JSXElementConstructor} Action button with props */ const ActionButton = ({ action, name, icon: Icon, handleClick, ...props }) => ( /** * @param {ActionButtonProps} props - Action button props - * @returns {React.JSXElementConstructor} Action button with props + * @returns {JSXElementConstructor} Action button with props */ const Edit = props => /** * @param {ActionButtonProps} props - Action button props - * @returns {React.JSXElementConstructor} Action button with props + * @returns {JSXElementConstructor} Action button with props */ const Delete = props => /** * @param {ActionButtonProps} props - Action button props - * @returns {React.JSXElementConstructor} Action button with props + * @returns {JSXElementConstructor} Action button with props */ const Accept = props => /** * @param {ActionButtonProps} props - Action button props - * @returns {React.JSXElementConstructor} Action button with props + * @returns {JSXElementConstructor} Action button with props */ const Cancel = props => diff --git a/src/fireedge/src/client/components/Tabs/Common/Attribute/Attribute.js b/src/fireedge/src/client/components/Tabs/Common/Attribute/Attribute.js index 246227ddf7..9ccac4cbee 100644 --- a/src/fireedge/src/client/components/Tabs/Common/Attribute/Attribute.js +++ b/src/fireedge/src/client/components/Tabs/Common/Attribute/Attribute.js @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo, useMemo, useState, createRef } from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography } from '@material-ui/core' import { useDialog } from 'client/hooks' import { DialogConfirmation } from 'client/components/Dialogs' -import { Tr } from 'client/components/HOC' - import { Actions, Inputs } from 'client/components/Tabs/Common/Attribute' +import { Tr, Translate } from 'client/components/HOC' +import { T } from 'client/constants' + const useStyles = makeStyles({ wrapper: { display: 'flex', @@ -39,7 +40,7 @@ const useStyles = makeStyles({ }) }) -const Attribute = React.memo(({ +const Attribute = memo(({ canDelete, canEdit, handleEdit, @@ -50,22 +51,20 @@ const Attribute = React.memo(({ value, valueInOptionList }) => { - const numberOfParents = React.useMemo(() => path.split('.').length - 1, [path]) + const numberOfParents = useMemo(() => path.split('.').length - 1, [path]) const classes = useStyles({ numberOfParents }) - const [isEditing, setIsEditing] = React.useState(() => false) - const [options, setOptions] = React.useState(() => []) + const [isEditing, setIsEditing] = useState(() => false) + const [options, setOptions] = useState(() => []) const { display, show, hide } = useDialog() - const inputRef = React.createRef() + const inputRef = createRef() const handleEditAttribute = async () => { await handleEdit?.(inputRef.current.value, path) setIsEditing(false) } - const handleCancel = () => { - setIsEditing(false) - } + const handleCancel = () => setIsEditing(false) const handleActiveEditForm = async () => { const response = await handleGetOptionList?.() ?? [] @@ -78,8 +77,11 @@ const Attribute = React.memo(({ } const handleDeleteAttribute = async () => { - await handleDelete?.(path) - hide() + try { + await handleDelete?.(path) + } finally { + hide() + } } return ( @@ -93,11 +95,14 @@ const Attribute = React.memo(({ {handleGetOptionList ? ( ) : ( - + )} @@ -122,11 +127,13 @@ const Attribute = React.memo(({ {display && ( } handleAccept={handleDeleteAttribute} handleCancel={hide} > -

Are you sure?

+

+ +

)}
@@ -144,7 +151,7 @@ export const AttributePropTypes = { value: PropTypes.oneOfType([ PropTypes.string, PropTypes.object - ]).isRequired, + ]), path: PropTypes.string, valueInOptionList: PropTypes.string } diff --git a/src/fireedge/src/client/components/Tabs/Common/Attribute/Inputs.js b/src/fireedge/src/client/components/Tabs/Common/Attribute/Inputs.js index 8848d4c083..ca12e3aa00 100644 --- a/src/fireedge/src/client/components/Tabs/Common/Attribute/Inputs.js +++ b/src/fireedge/src/client/components/Tabs/Common/Attribute/Inputs.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { forwardRef, useState, ForwardedRef, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { makeStyles, TextField } from '@material-ui/core' @@ -21,7 +21,7 @@ import { Actions } from 'client/components/Tabs/Common/Attribute' /** * @typedef {object} Option - * @property {string|number|React.JSXElementConstructor} text - Options text to show + * @property {string|number|JSXElementConstructor} text - Options text to show * @property {string|number} value - Option value */ @@ -38,15 +38,15 @@ const useStyles = makeStyles({ } }) -const Select = React.forwardRef( +const Select = forwardRef( /** * @param {InputProps} props - Props - * @param {React.ForwardedRef} ref - Forward reference - * @returns {React.JSXElementConstructor} Select field + * @param {ForwardedRef} ref - Forward reference + * @returns {JSXElementConstructor} Select field */ - ({ name = '', value = '', options }, ref) => { + ({ name = '', initialValue = '', options }, ref) => { const classes = useStyles() - const [newValue, setNewValue] = React.useState(() => value) + const [newValue, setNewValue] = useState(() => initialValue) const handleChange = event => setNewValue(event.target.value) @@ -75,14 +75,14 @@ const Select = React.forwardRef( } ) -const Text = React.forwardRef( +const Text = forwardRef( /** * @param {InputProps} props - Props - * @param {React.ForwardedRef} ref - Forward reference - * @returns {React.JSXElementConstructor} Text field + * @param {ForwardedRef} ref - Forward reference + * @returns {JSXElementConstructor} Text field */ - ({ name = '', value = '' }, ref) => { - const [newValue, setNewValue] = React.useState(() => value) + ({ name = '', initialValue = '', ...props }, ref) => { + const [newValue, setNewValue] = useState(() => initialValue) const handleChange = event => setNewValue(event.target.value) @@ -97,6 +97,8 @@ const Text = React.forwardRef( onChange={handleChange} value={newValue} variant='outlined' + name={name} + {...props} /> ) } @@ -104,7 +106,7 @@ const Text = React.forwardRef( const InputPropTypes = { name: PropTypes.string, - value: PropTypes.string, + initialValue: PropTypes.string, options: PropTypes.arrayOf( PropTypes.shape({ text: PropTypes.string.isRequired, diff --git a/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js b/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js index d5c1692710..ee63f3230c 100644 --- a/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js +++ b/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js @@ -13,12 +13,13 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo, useMemo } from 'react' import PropTypes from 'prop-types' import { makeStyles } from '@material-ui/core' +import { useForm, Controller } from 'react-hook-form' import { Actions, Inputs } from 'client/components/Tabs/Common/Attribute' -import { generateKey, fakeDelay } from 'client/utils' +import { generateKey } from 'client/utils' const useStyles = makeStyles({ wrapper: { @@ -30,40 +31,50 @@ const useStyles = makeStyles({ } }) -const AttributeCreateForm = React.memo(({ handleAdd }) => { +const AttributeCreateForm = memo(({ handleAdd }) => { const classes = useStyles() - const inputNameRef = React.createRef() - const inputValueRef = React.createRef() + const key = useMemo(() => generateKey(), []) + const nameInputKey = useMemo(() => `name-${key}`, [key]) + const valueInputKey = useMemo(() => `value-${key}`, [key]) - const key = React.useMemo(() => generateKey(), []) + const { handleSubmit, reset, control, formState } = useForm({ + defaultValues: { [nameInputKey]: '', [valueInputKey]: '' } + }) - const handleCreateAttribute = async () => { - inputNameRef.current.disabled = true - inputValueRef.current.disabled = true + const handleCreateAttribute = async data => { + const { [nameInputKey]: name, [valueInputKey]: value } = data - await fakeDelay(2000) await handleAdd?.( - inputValueRef.current.value, - inputNameRef.current.value + String(name).toUpperCase(), + String(value).toUpperCase() ) - inputNameRef.current.disabled = false - inputValueRef.current.disabled = false - inputNameRef.current.value = '' - inputValueRef.current.value = '' + reset() } return ( <> {/* NAME ATTRIBUTE */} - + + + } + /> {/* VALUE ATTRIBUTE */}
- + + + } + />
diff --git a/src/fireedge/src/client/components/Tabs/Common/AttributePanel.js b/src/fireedge/src/client/components/Tabs/Common/AttributePanel.js index 6d15adc4d4..78adaf745c 100644 --- a/src/fireedge/src/client/components/Tabs/Common/AttributePanel.js +++ b/src/fireedge/src/client/components/Tabs/Common/AttributePanel.js @@ -28,7 +28,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles } from '@material-ui/core' @@ -56,7 +56,7 @@ const useStyles = makeStyles({ } }) -const AttributePanel = React.memo(({ +const AttributePanel = memo(({ title, attributes = {}, handleEdit, diff --git a/src/fireedge/src/client/components/Tabs/Common/List.js b/src/fireedge/src/client/components/Tabs/Common/List.js index 69ef4b2915..e621f733dd 100644 --- a/src/fireedge/src/client/components/Tabs/Common/List.js +++ b/src/fireedge/src/client/components/Tabs/Common/List.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { Fragment, isValidElement } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' @@ -54,12 +54,11 @@ const AttributeList = ({ const renderList = (attribute, parentPath = false) => { const { name, value } = attribute - const isParent = typeof value === 'object' && !React.isValidElement(value) + const isParent = typeof value === 'object' && !isValidElement(value) return ( - <> + @@ -79,7 +78,7 @@ const AttributeList = ({ })} )} - + ) } diff --git a/src/fireedge/src/client/components/Tabs/Common/Ownership.js b/src/fireedge/src/client/components/Tabs/Common/Ownership.js index 8ef7d7168a..248d02f121 100644 --- a/src/fireedge/src/client/components/Tabs/Common/Ownership.js +++ b/src/fireedge/src/client/components/Tabs/Common/Ownership.js @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { useUserApi, useGroupApi, RESOURCES } from 'client/features/One' import { List } from 'client/components/Tabs/Common' import { T, SERVERADMIN_ID, ACTIONS } from 'client/constants' -const Ownership = React.memo(({ +const Ownership = memo(({ actions, groupId, groupName, diff --git a/src/fireedge/src/client/components/Tabs/Common/Permissions.js b/src/fireedge/src/client/components/Tabs/Common/Permissions.js index 85dc40f512..9b7d0965d0 100644 --- a/src/fireedge/src/client/components/Tabs/Common/Permissions.js +++ b/src/fireedge/src/client/components/Tabs/Common/Permissions.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, List, ListItem, Typography, Paper } from '@material-ui/core' @@ -43,7 +43,7 @@ const useStyles = makeStyles(theme => ({ } })) -const Permissions = React.memo(({ handleEdit, actions, ...permissions }) => { +const Permissions = memo(({ handleEdit, actions, ...permissions }) => { const classes = useStyles() const handleChange = async (name, value) => { diff --git a/src/fireedge/src/client/components/Tabs/TabProvider.js b/src/fireedge/src/client/components/Tabs/TabProvider.js index e5285c977e..b6e3082a5f 100644 --- a/src/fireedge/src/client/components/Tabs/TabProvider.js +++ b/src/fireedge/src/client/components/Tabs/TabProvider.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { createContext, useState } from 'react' +import { useEffect, createContext, useState } from 'react' import PropTypes from 'prop-types' export const TabContext = createContext(null) @@ -23,7 +23,7 @@ const TabProvider = ({ initialState = {}, children }) => { const [information, setTabInformation] = useState(() => initialState) const { data } = initialState - React.useEffect(() => { + useEffect(() => { data && setTabInformation(prev => ({ ...prev, data })) }, [data]) diff --git a/src/fireedge/src/client/components/Tabs/Vm/Capacity/index.js b/src/fireedge/src/client/components/Tabs/Vm/Capacity/index.js index e05cea7127..d7e51db7ee 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Capacity/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Capacity/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' import { useVmApi } from 'client/features/One' @@ -24,10 +24,10 @@ import InformationPanel from 'client/components/Tabs/Vm/Capacity/information' import * as VirtualMachine from 'client/models/VirtualMachine' import * as Helper from 'client/models/Helper' -const VmCapacityTab = ({ tabProps: { actions = [] } = {} }) => { +const VmCapacityTab = ({ tabProps: { actions } = {} }) => { const { resize } = useVmApi() - const { handleRefetch, data: vm = {} } = React.useContext(TabContext) + const { handleRefetch, data: vm = {} } = useContext(TabContext) const { ID } = vm const hypervisor = VirtualMachine.getHypervisor(vm) diff --git a/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js b/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js index b7b1f1b10d..d657b14722 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Capacity/information.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { Paper, Typography } from '@material-ui/core' @@ -70,10 +69,18 @@ const InformationPanel = ({ actions, vm = {}, handleResizeCapacity }) => {
{actions?.includes?.(VM_ACTIONS.RESIZE_CAPACITY) && ( )}
diff --git a/src/fireedge/src/client/components/Tabs/Vm/Configuration.js b/src/fireedge/src/client/components/Tabs/Vm/Configuration.js index 3a54db7c0d..926d7a6a5f 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Configuration.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Configuration.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import { Accordion, AccordionSummary, AccordionDetails } from '@material-ui/core' import { TabContext } from 'client/components/Tabs/TabProvider' @@ -22,7 +22,7 @@ import { TabContext } from 'client/components/Tabs/TabProvider' const NavArrowDown = {'>'} const VmConfigurationTab = () => { - const { data: vm = {} } = React.useContext(TabContext) + const { data: vm = {} } = useContext(TabContext) const { TEMPLATE, USER_TEMPLATE } = vm return ( diff --git a/src/fireedge/src/client/components/Tabs/Vm/Info/index.js b/src/fireedge/src/client/components/Tabs/Vm/Info/index.js index bc652a2dcd..72df0613ad 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Info/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Info/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' import { useVmApi } from 'client/features/One' @@ -45,7 +45,7 @@ const VmInfoTab = ({ tabProps = {} }) => { } = tabProps const { changeOwnership, changePermissions, rename, updateUserTemplate } = useVmApi() - const { handleRefetch, data: vm = {} } = React.useContext(TabContext) + const { handleRefetch, data: vm = {} } = useContext(TabContext) const { ID, UNAME, UID, GNAME, GID, PERMISSIONS, USER_TEMPLATE, MONITORING } = vm const handleChangeOwnership = async newOwnership => { diff --git a/src/fireedge/src/client/components/Tabs/Vm/Info/information.js b/src/fireedge/src/client/components/Tabs/Vm/Info/information.js index 538691d167..71a80130c4 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Info/information.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Info/information.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { StatusChip } from 'client/components/Status' diff --git a/src/fireedge/src/client/components/Tabs/Vm/Log.js b/src/fireedge/src/client/components/Tabs/Vm/Log.js index a9ce63f861..e28ec322d2 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Log.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Log.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' const VmLogTab = data => { return ( diff --git a/src/fireedge/src/client/components/Tabs/Vm/Network/Item.js b/src/fireedge/src/client/components/Tabs/Vm/Network/Item.js index a5b1350472..9cee06f79b 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Network/Item.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Network/Item.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useMemo, useContext } from 'react' import PropTypes from 'prop-types' import { Trash } from 'iconoir-react' @@ -36,7 +36,7 @@ import { Action } from 'client/components/Cards/SelectCard' import { DialogConfirmation } from 'client/components/Dialogs' import Multiple from 'client/components/Tables/Vms/multiple' -import { Tr } from 'client/components/HOC' +import { Tr, Translate } from 'client/components/HOC' import { T, VM_ACTIONS } from 'client/constants' const AccordionSummary = withStyles({ @@ -93,21 +93,19 @@ const NetworkItem = ({ nic = {}, actions }) => { const { display, show, hide, values } = useDialog() const { detachNic } = useVmApi() - - const { handleRefetch, data: vm } = React.useContext(TabContext) - const { ID: vmId } = vm + const { handleRefetch, data: vm } = useContext(TabContext) const { NIC_ID, NETWORK = '-', BRIDGE, IP, MAC, PCI_ID, ALIAS, SECURITY_GROUPS } = nic - const hasDetails = React.useMemo( + const hasDetails = useMemo( () => !!ALIAS.length || !!SECURITY_GROUPS?.length, [ALIAS?.length, SECURITY_GROUPS?.length] ) const handleDetach = async () => { - const response = values?.id && await detachNic(vmId, values.id) + const response = values?.id !== undefined && await detachNic(vm.ID, values.id) - String(response) === String(vmId) && await handleRefetch?.(vmId) + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) hide() } @@ -156,7 +154,9 @@ const NetworkItem = ({ nic = {}, actions }) => { ))} {!!SECURITY_GROUPS?.length && ( - {Tr(T.SecurityGroups)} + + + {SECURITY_GROUPS ?.map(({ ID, NAME, PROTOCOL, RULE_TYPE, ICMP_TYPE, RANGE, NETWORK_ID }, idx) => ( @@ -167,7 +167,13 @@ const NetworkItem = ({ nic = {}, actions }) => {
@@ -180,16 +186,17 @@ const NetworkItem = ({ nic = {}, actions }) => { {display && ( + } handleAccept={handleDetach} handleCancel={hide} > -

{` - ${Tr(T.Detach)} - ${Tr(values?.isAlias ? T.Alias : T.NIC)} - #${values?.id} - `}

-

{Tr(T.DoYouWantProceed)}

+

+ +

)} diff --git a/src/fireedge/src/client/components/Tabs/Vm/Network/List.js b/src/fireedge/src/client/components/Tabs/Vm/Network/List.js index aceab21d8f..a924f2ca68 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Network/List.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Network/List.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import NetworkItem from 'client/components/Tabs/Vm/Network/Item' @@ -26,9 +25,12 @@ const NetworkList = ({ nics, actions }) => ( gap: '1em', paddingBlock: '0.8em' }}> - {nics.map((nic, idx) => ( - - ))} + {nics.map(nic => { + const { IP, MAC } = nic + const key = IP ?? MAC + + return + })} ) diff --git a/src/fireedge/src/client/components/Tabs/Vm/Network/index.js b/src/fireedge/src/client/components/Tabs/Vm/Network/index.js index 1d26952839..79ab2499e8 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Network/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Network/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' import { useVmApi } from 'client/features/One' @@ -23,17 +23,17 @@ import { TabContext } from 'client/components/Tabs/TabProvider' import NetworkList from 'client/components/Tabs/Vm/Network/List' import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' import { AttachNicForm } from 'client/components/Forms/Vm' +import { Tr } from 'client/components/HOC' import * as VirtualMachine from 'client/models/VirtualMachine' import * as Helper from 'client/models/Helper' import { mapUserInputs } from 'client/utils' import { T, VM_ACTIONS } from 'client/constants' -const VmNetworkTab = ({ tabProps = {} }) => { +const VmNetworkTab = ({ tabProps: { actions } = {} }) => { const { attachNic } = useVmApi() - const { handleRefetch, data: vm } = React.useContext(TabContext) - const { actions = [] } = tabProps + const { handleRefetch, data: vm } = useContext(TabContext) const nics = VirtualMachine.getNics(vm, { groupAlias: true, @@ -46,22 +46,28 @@ const VmNetworkTab = ({ tabProps = {} }) => { const handleAttachNic = async ({ network, advanced }) => { const networkSelected = network?.[0] const isAlias = !!advanced?.PARENT?.length - const root = { ...networkSelected, ...mapUserInputs(advanced) } + const newNic = { ...networkSelected, ...mapUserInputs(advanced) } const template = Helper.jsonToXml({ - [isAlias ? 'NIC_ALIAS' : 'NIC']: root + [isAlias ? 'NIC_ALIAS' : 'NIC']: newNic }) const response = await attachNic(vm.ID, template) - String(response) === String(vm.ID) && await handleRefetch?.() + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) } return ( <> {actionsAvailable?.includes?.(VM_ACTIONS.ATTACH_NIC) && ( { - const { data: vm } = React.useContext(TabContext) - const { actions = [] } = tabProps +const VmPlacementTab = ({ tabProps: { actions } = {} }) => { + const { data: vm } = useContext(TabContext) const records = VirtualMachine.getHistoryRecords(vm) diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js new file mode 100644 index 0000000000..bd45c0c86d --- /dev/null +++ b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js @@ -0,0 +1,242 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { memo, useContext } from 'react' +import PropTypes from 'prop-types' + +import { Trash, Edit, ClockOutline } from 'iconoir-react' + +import { useAuth } from 'client/features/Auth' +import { useVmApi } from 'client/features/One' +import { TabContext } from 'client/components/Tabs/TabProvider' +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' +import { PunctualForm, RelativeForm } from 'client/components/Forms/Vm' +import * as Helper from 'client/models/Helper' + +import { Tr, Translate } from 'client/components/HOC' +import { T, VM_ACTIONS } from 'client/constants' + +const mapToSchedAction = formData => { + const { PERIOD, TIME: time, END_VALUE, END_TYPE, ...restOfData } = formData + + const newSchedAction = { + SCHED_ACTION: { + TIME: PERIOD ? `+${time}` : Helper.isoDateToMilliseconds(time), + END_TYPE, + ...restOfData + } + } + + if (END_VALUE) { + newSchedAction.SCHED_ACTION.END_VALUE = END_TYPE === '1' + ? END_VALUE + : Helper.isoDateToMilliseconds(END_VALUE) + } + + return Helper.jsonToXml(newSchedAction) +} + +const CreateSchedAction = memo(() => { + const { addScheduledAction } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const handleCreateSchedAction = async formData => { + const template = mapToSchedAction(formData) + + const data = { template } + const response = await addScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) + } + + return ( + + ) +}) + +const UpdateSchedAction = memo(({ schedule, name }) => { + const { ID, TIME } = schedule + const isRelative = String(TIME).includes('+') + const { updateScheduledAction } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const handleUpdate = async formData => { + const template = mapToSchedAction(formData) + + const data = { id_sched: ID, template } + const response = await updateScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) + } + + return ( + , + tooltip: + }} + dialogProps={{ + title: `${Tr([T.ActionOverSomething, [T.Update, T.ScheduledAction]])}: ${name}` + }} + options={[{ + form: isRelative + ? RelativeForm({ schedule, vm }) + : PunctualForm({ schedule, vm }), + onSubmit: handleUpdate + }]} + /> + ) +}) + +const DeleteSchedAction = memo(({ schedule, name }) => { + const { ID } = schedule + const { deleteScheduledAction } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const handleDelete = async () => { + const data = { id_sched: ID } + const response = await deleteScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) + } + + return ( + , + tooltip: + }} + dialogProps={{ + title: `${Tr(T.Delete)} ${Tr(T.ScheduledAction)}: ${name}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleDelete }]} + /> + ) +}) + +const CharterAction = memo(() => { + const { config } = useAuth() + const { addScheduledAction } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const leases = Object.entries(config?.leases ?? {}) + + const handleCreateCharter = async () => { + const schedActions = leases + .map(([action, { time, warning: { time: warningTime } = {} } = {}]) => ({ + PERIOD: true, + TIME: +time, + ACTION: action, + ...(warningTime && { WARNING: warningTime }) + })) + + const response = await Promise.all( + schedActions.map(schedAction => { + const data = { template: mapToSchedAction(schedAction) } + return addScheduledAction(vm.ID, data) + }) + ) + + response.some(res => String(res) === String(vm?.ID)) && await handleRefetch?.(vm.ID) + } + + return ( + , + tooltip: Tr(T.Charter) + }} + dialogProps={{ + title: Tr(T.ScheduledAction), + children: ( + <> + {leases.map(([action, { time } = {}], idx) => { + const allPeriods = { + years: time / 365 / 24 / 3600, + months: time / 30 / 24 / 3600, + weeks: time / 7 / 24 / 3600, + days: time / 24 / 3600, + hours: time / 3600, + minutes: time / 60 + } + + const [period, parsedTime] = Object + .entries(allPeriods) + .find(([_, time]) => time >= 1) + + return ( +

+ {`${action} - ${parsedTime} ${period}`} +

+ ) + })} +
+

{Tr(T.DoYouWantProceed)}

+ + ) + }} + options={[{ onSubmit: handleCreateCharter }]} + /> + ) +}) + +const ActionPropTypes = { + schedule: PropTypes.object, + name: PropTypes.string +} + +CreateSchedAction.propTypes = {} +CreateSchedAction.displayName = 'CreateSchedActionButton' +UpdateSchedAction.propTypes = ActionPropTypes +UpdateSchedAction.displayName = 'UpdateSchedActionButton' +DeleteSchedAction.propTypes = ActionPropTypes +DeleteSchedAction.displayName = 'DeleteSchedActionButton' +CharterAction.propTypes = ActionPropTypes +CharterAction.displayName = 'CharterActionButton' + +export { + CharterAction, + CreateSchedAction, + DeleteSchedAction, + UpdateSchedAction +} diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js index 2f1b888c8c..abe7c44923 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js +++ b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js @@ -14,41 +14,43 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' - -import { Edit, Trash, WarningTriangleOutline } from 'iconoir-react' +import { WarningTriangleOutline as WarningIcon } from 'iconoir-react' import { useTheme, Typography, Paper } from '@material-ui/core' -// import { useVmApi } from 'client/features/One' -import { Action } from 'client/components/Cards/SelectCard' +import { TabContext } from 'client/components/Tabs/TabProvider' +import * as Actions from 'client/components/Tabs/Vm/SchedActions/Actions' import { StatusChip } from 'client/components/Status' import { rowStyles } from 'client/components/Tables/styles' +import { Tr } from 'client/components/HOC' import * as VirtualMachine from 'client/models/VirtualMachine' -import * as Helper from 'client/models/Helper' -import { VM_ACTIONS } from 'client/constants' +import { timeFromMilliseconds } from 'client/models/Helper' +import { capitalize, clearString } from 'client/utils' +import { T, VM_ACTIONS } from 'client/constants' -const SchedulingItem = ({ vmStartTime, schedule, actions = [] }) => { +const SchedulingItem = ({ schedule, actions = [] }) => { const classes = rowStyles() const { palette } = useTheme() + const { data: vm } = useContext(TabContext) + const vmStartTime = +vm?.STIME const { ID, ACTION, TIME, MESSAGE, DONE, WARNING } = schedule + const titleAction = `#${ID} ${capitalize(clearString(ACTION))}` const isRelative = String(TIME).includes('+') - const time = Helper.timeFromMilliseconds( - isRelative ? (+vmStartTime + +TIME) : +TIME + const time = timeFromMilliseconds( + isRelative ? (vmStartTime + +TIME) : +TIME ) - const doneTime = Helper.timeFromMilliseconds(+DONE) + const doneTime = timeFromMilliseconds(+DONE) const now = Math.round(Date.now() / 1000) - const isWarning = WARNING && (now - +vmStartTime) > +WARNING + const isWarning = WARNING && (now - vmStartTime) > +WARNING - const labels = [...new Set([ - Helper.stringToBoolean(MESSAGE) - ])].filter(Boolean) + const labels = [...new Set([MESSAGE])].filter(Boolean) const { repeat, end } = VirtualMachine.periodicityToString(schedule) @@ -57,7 +59,7 @@ const SchedulingItem = ({ vmStartTime, schedule, actions = [] }) => {
- {`#${ID} ${ACTION}`} + {titleAction} {!!labels.length && ( @@ -68,38 +70,28 @@ const SchedulingItem = ({ vmStartTime, schedule, actions = [] }) => { )}
- {repeat && {repeat}} - {end && {`| ${end}`}} + {repeat && {`${repeat} |`}} + {end && {`${end} |`}} {DONE && ( - {`| done ${doneTime.toRelative()}`} + {`${Tr(T.Done)} ${doneTime.toRelative()} |`} )} - {`| ${time.toRelative()}`} + {`${time.toRelative()}`} - {isWarning && ( - - )} + {isWarning && }
{!!actions.length && (
{actions?.includes?.(VM_ACTIONS.SCHED_ACTION_UPDATE) && ( - } - handleClick={() => undefined} - /> + )} {actions?.includes?.(VM_ACTIONS.SCHED_ACTION_DELETE) && ( - } - handleClick={() => undefined} - /> + )}
)} @@ -108,7 +100,6 @@ const SchedulingItem = ({ vmStartTime, schedule, actions = [] }) => { } SchedulingItem.propTypes = { - vmStartTime: PropTypes.string.isRequired, schedule: PropTypes.object.isRequired, actions: PropTypes.arrayOf(PropTypes.string) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js index eb33ceb61e..a6611252a4 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js +++ b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js @@ -14,17 +14,15 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import SchedulingItem from 'client/components/Tabs/Vm/SchedActions/Item' -const SchedulingList = ({ vmStartTime, scheduling, actions }) => ( +const SchedulingList = ({ scheduling, actions }) => (
- {scheduling.map((schedule, idx) => ( + {scheduling.map(schedule => ( @@ -33,7 +31,6 @@ const SchedulingList = ({ vmStartTime, scheduling, actions }) => ( ) SchedulingList.propTypes = { - vmStartTime: PropTypes.string, scheduling: PropTypes.array, actions: PropTypes.arrayOf(PropTypes.string) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js index 2d57335d50..ade9324ee5 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js @@ -14,71 +14,36 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' -import { ClockOutline } from 'iconoir-react' -import { Button } from '@material-ui/core' - -import { useDialog } from 'client/hooks' +import { useAuth } from 'client/features/Auth' import { TabContext } from 'client/components/Tabs/TabProvider' -import { DialogConfirmation } from 'client/components/Dialogs' +import { CreateSchedAction, CharterAction } from 'client/components/Tabs/Vm/SchedActions/Actions' import SchedulingList from 'client/components/Tabs/Vm/SchedActions/List' -import { SubmitButton } from 'client/components/FormControl' -import { Tr } from 'client/components/HOC' import * as VirtualMachine from 'client/models/VirtualMachine' import * as Helper from 'client/models/Helper' -import { T, VM_ACTIONS } from 'client/constants' +import { VM_ACTIONS } from 'client/constants' -const VmSchedulingTab = ({ tabProps = {} }) => { - const { display, show, hide } = useDialog() - const { data: vm } = React.useContext(TabContext) - const { actions = [] } = tabProps +const VmSchedulingTab = ({ tabProps: { actions } = {} }) => { + const { config } = useAuth() + const { data: vm } = useContext(TabContext) const scheduling = VirtualMachine.getScheduleActions(vm) - const hypervisor = VirtualMachine.getHypervisor(vm) const actionsAvailable = Helper.getActionsAvailable(actions, hypervisor) return ( <> {actionsAvailable?.includes?.(VM_ACTIONS.SCHED_ACTION_CREATE) && ( - + )} - {actionsAvailable?.includes?.(VM_ACTIONS.CHARTER_CREATE) && ( - } - onClick={show} - /> + {actionsAvailable?.includes?.(VM_ACTIONS.CHARTER_CREATE) && config?.leases && ( + )} - - - {display && ( - -

TODO: should define in view yaml ??

-
- )} + ) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Actions.js b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Actions.js new file mode 100644 index 0000000000..84ef0eebc0 --- /dev/null +++ b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Actions.js @@ -0,0 +1,88 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { memo, useContext } from 'react' +import PropTypes from 'prop-types' + +import { Trash, UndoAction } from 'iconoir-react' + +import { useVmApi } from 'client/features/One' +import { TabContext } from 'client/components/Tabs/TabProvider' +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' + +import { Tr } from 'client/components/HOC' +import { T, VM_ACTIONS } from 'client/constants' + +const RevertAction = memo(({ snapshot }) => { + const { SNAPSHOT_ID, NAME } = snapshot + const { revertSnapshot } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleRevert = async () => await revertSnapshot(vm.ID, SNAPSHOT_ID) + + return ( + + }} + dialogProps={{ + title: `${Tr(T.Revert)}: #${SNAPSHOT_ID} - ${NAME}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleRevert }]} + /> + ) +}) + +const DeleteAction = memo(({ snapshot }) => { + const { SNAPSHOT_ID, NAME } = snapshot + const { deleteSnapshot } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleDelete = async () => await deleteSnapshot(vm.ID, SNAPSHOT_ID) + + return ( + + }} + dialogProps={{ + title: `${Tr(T.Delete)}: #${SNAPSHOT_ID} - ${NAME}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleDelete }]} + /> + ) +}) + +const ActionPropTypes = { + snapshot: PropTypes.object, + name: PropTypes.string +} + +RevertAction.propTypes = ActionPropTypes +RevertAction.displayName = 'RevertActionButton' +DeleteAction.propTypes = ActionPropTypes +DeleteAction.displayName = 'DeleteActionButton' + +export { + DeleteAction, + RevertAction +} diff --git a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Item.js b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Item.js index 3cb652aa40..2d0ac4b114 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Item.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/Item.js @@ -14,14 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' - -import { Trash, UndoAction } from 'iconoir-react' import { Typography, Paper } from '@material-ui/core' -// import { useVmApi } from 'client/features/One' -import { Action } from 'client/components/Cards/SelectCard' +import * as Actions from 'client/components/Tabs/Vm/Snapshot/Actions' import { rowStyles } from 'client/components/Tables/styles' import * as Helper from 'client/models/Helper' @@ -52,18 +48,10 @@ const SnapshotItem = ({ snapshot, actions = [] }) => { {!!actions.length && (
{actions?.includes?.(VM_ACTIONS.SNAPSHOT_REVERT) && ( - } - handleClick={() => undefined} - /> + )} {actions?.includes?.(VM_ACTIONS.SNAPSHOT_DELETE) && ( - } - handleClick={() => undefined} - /> + )}
)} diff --git a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/List.js b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/List.js index cc9349fe82..992bd1ec57 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/List.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/List.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import SnapshotItem from 'client/components/Tabs/Vm/Snapshot/Item' diff --git a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js index 241b980d61..62bdc5a817 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Snapshot/index.js @@ -14,55 +14,55 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' -import { Button } from '@material-ui/core' -import { useDialog } from 'client/hooks' +import { useVmApi } from 'client/features/One' import { TabContext } from 'client/components/Tabs/TabProvider' -import { DialogConfirmation } from 'client/components/Dialogs' + import SnapshotList from 'client/components/Tabs/Vm/Snapshot/List' +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' +import { CreateSnapshotForm } from 'client/components/Forms/Vm' import { Tr } from 'client/components/HOC' import * as VirtualMachine from 'client/models/VirtualMachine' import * as Helper from 'client/models/Helper' import { T, VM_ACTIONS } from 'client/constants' -const VmSnapshotTab = ({ tabProps = {} }) => { - const { display, show, hide } = useDialog() - const { data: vm } = React.useContext(TabContext) - const { actions = [] } = tabProps +const VmSnapshotTab = ({ tabProps: { actions } = {} }) => { + const { createSnapshot } = useVmApi() + + const { data: vm = {} } = useContext(TabContext) const snapshots = VirtualMachine.getSnapshotList(vm) - const hypervisor = VirtualMachine.getHypervisor(vm) const actionsAvailable = Helper.getActionsAvailable(actions, hypervisor) + const handleSnapshotCreate = async ({ NAME } = {}) => { + const data = { name: NAME } + await createSnapshot(vm.ID, data) + } + return ( <> {actionsAvailable?.includes?.(VM_ACTIONS.SNAPSHOT_CREATE) && ( - + )} - - {display && ( - -

TODO: should define in view yaml ??

-
- )} ) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/Storage/Actions.js b/src/fireedge/src/client/components/Tabs/Vm/Storage/Actions.js new file mode 100644 index 0000000000..c76fba7adf --- /dev/null +++ b/src/fireedge/src/client/components/Tabs/Vm/Storage/Actions.js @@ -0,0 +1,260 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import { memo, useContext } from 'react' +import PropTypes from 'prop-types' + +import { Trash, Edit, UndoAction, SaveActionFloppy, Camera, Expand } from 'iconoir-react' + +import { useVmApi } from 'client/features/One' +import { TabContext } from 'client/components/Tabs/TabProvider' +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' +import { SaveAsDiskForm, CreateDiskSnapshotForm, ResizeDiskForm } from 'client/components/Forms/Vm' + +import { Tr } from 'client/components/HOC' +import { T, VM_ACTIONS } from 'client/constants' + +const DetachAction = memo(({ disk, name: imageName }) => { + const { DISK_ID } = disk + const { detachDisk } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleDetach = async () => await detachDisk(vm.ID, DISK_ID) + + return ( + , + tooltip: Tr(T.Detach) + }} + dialogProps={{ + title: `${Tr(T.Detach)}: #${DISK_ID} - ${imageName}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleDetach }]} + /> + ) +}) + +const SaveAsAction = memo(({ disk, snapshot, name: imageName }) => { + const { DISK_ID: diskId } = disk + const { ID: snapshotId, NAME: snapshotName } = snapshot ?? {} + + const { saveAsDisk } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const handleSaveAs = async ({ NAME } = {}) => { + const data = { disk: diskId, name: NAME, snapshot: snapshotId } + const response = await saveAsDisk(vm.ID, data) + + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) + } + + return ( + , + tooltip: Tr(T.SaveAs) + }} + dialogProps={{ + title: snapshot + ? `${Tr(T.SaveAs)} ${Tr(T.Image)}: #${snapshotId} - ${snapshotName}` + : `${Tr(T.SaveAs)} ${Tr(T.Image)}: #${diskId} - ${imageName}` + }} + options={[{ + form: SaveAsDiskForm(), + onSubmit: handleSaveAs + }]} + /> + ) +}) + +const ResizeAction = memo(({ disk, name: imageName }) => { + const { DISK_ID } = disk + const { resizeDisk } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleResize = async ({ SIZE } = {}) => { + const data = { disk: DISK_ID, size: SIZE } + await resizeDisk(vm.ID, data) + } + + return ( + , + tooltip: Tr(T.Resize) + }} + dialogProps={{ + title: `${Tr(T.Resize)}: #${DISK_ID} - ${imageName}` + }} + options={[{ + form: ResizeDiskForm({ disk }), + onSubmit: handleResize + }]} + /> + ) +}) + +const SnapshotCreateAction = memo(({ disk, name: imageName }) => { + const { DISK_ID } = disk + const { createDiskSnapshot } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleSnapshotCreate = async ({ NAME } = {}) => { + const data = { disk: DISK_ID, name: NAME } + await createDiskSnapshot(vm.ID, data) + } + + return ( + , + tooltip: Tr(T.TakeSnapshot) + }} + dialogProps={{ + title: `${Tr(T.TakeSnapshot)}: #${DISK_ID} - ${imageName}` + }} + options={[{ + form: CreateDiskSnapshotForm(), + onSubmit: handleSnapshotCreate + }]} + /> + ) +}) + +const SnapshotRenameAction = memo(({ disk, snapshot }) => { + const { DISK_ID } = disk + const { ID, NAME = '' } = snapshot + const { renameDiskSnapshot } = useVmApi() + const { handleRefetch, data: vm } = useContext(TabContext) + + const handleRename = async ({ NAME: newName } = {}) => { + const data = { disk: DISK_ID, snapshot: ID, name: newName } + const response = await renameDiskSnapshot(vm.ID, data) + + String(response) === String(vm.ID) && await handleRefetch?.(vm.ID) + } + + return ( + , + tooltip: Tr(T.Edit) + }} + dialogProps={{ + title: `${Tr(T.Rename)}: #${ID} - ${NAME}` + }} + options={[{ + form: CreateDiskSnapshotForm({ snapshot }), + onSubmit: handleRename + }]} + /> + ) +}) + +const SnapshotRevertAction = memo(({ disk, snapshot }) => { + const { DISK_ID } = disk + const { ID, NAME = T.Snapshot } = snapshot + const { revertDiskSnapshot } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleRevert = async () => { + const data = { disk: DISK_ID, snapshot: ID } + await revertDiskSnapshot(vm.ID, data) + } + + return ( + , + tooltip: Tr(T.Revert) + }} + dialogProps={{ + title: `${Tr(T.Revert)}: #${ID} - ${NAME}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleRevert }]} + /> + ) +}) + +const SnapshotDeleteAction = memo(({ disk, snapshot }) => { + const { DISK_ID } = disk + const { ID, NAME = T.Snapshot } = snapshot + const { deleteDiskSnapshot } = useVmApi() + const { data: vm } = useContext(TabContext) + + const handleDelete = async () => { + const data = { disk: DISK_ID, snapshot: ID } + await deleteDiskSnapshot(vm.ID, data) + } + + return ( + , + tooltip: Tr(T.Delete) + }} + dialogProps={{ + title: `${Tr(T.Delete)}: #${ID} - ${NAME}`, + children:

{Tr(T.DoYouWantProceed)}

+ }} + options={[{ onSubmit: handleDelete }]} + /> + ) +}) + +const ActionPropTypes = { + disk: PropTypes.object, + snapshot: PropTypes.object, + name: PropTypes.string +} + +DetachAction.propTypes = ActionPropTypes +DetachAction.displayName = 'DetachActionButton' +SaveAsAction.propTypes = ActionPropTypes +SaveAsAction.displayName = 'SaveAsActionButton' +ResizeAction.propTypes = ActionPropTypes +ResizeAction.displayName = 'ResizeActionButton' +SnapshotCreateAction.propTypes = ActionPropTypes +SnapshotCreateAction.displayName = 'SnapshotCreateActionButton' +SnapshotRenameAction.propTypes = ActionPropTypes +SnapshotRenameAction.displayName = 'SnapshotRenameActionButton' +SnapshotRevertAction.propTypes = ActionPropTypes +SnapshotRevertAction.displayName = 'SnapshotRevertActionButton' +SnapshotDeleteAction.propTypes = ActionPropTypes +SnapshotDeleteAction.displayName = 'SnapshotDeleteActionButton' + +export { + DetachAction, + SaveAsAction, + ResizeAction, + SnapshotCreateAction, + SnapshotDeleteAction, + SnapshotRenameAction, + SnapshotRevertAction +} diff --git a/src/fireedge/src/client/components/Tabs/Vm/Storage/Item.js b/src/fireedge/src/client/components/Tabs/Vm/Storage/Item.js index 3b33bde93a..aa236c3282 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Storage/Item.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Storage/Item.js @@ -14,17 +14,13 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' -import { - DatabaseSettings, Folder, ModernTv, - Trash, SaveActionFloppy, Camera, Expand -} from 'iconoir-react' +import { DatabaseSettings, Folder, ModernTv } from 'iconoir-react' import { Typography, Paper } from '@material-ui/core' -// import { useVmApi } from 'client/features/One' -import { Action } from 'client/components/Cards/SelectCard' +import * as Actions from 'client/components/Tabs/Vm/Storage/Actions' +import StorageSubItem from 'client/components/Tabs/Vm/Storage/SubItem' import { StatusChip } from 'client/components/Status' import { rowStyles } from 'client/components/Tables/styles' @@ -49,7 +45,8 @@ const StorageItem = ({ disk, actions = [] }) => { PERSISTENT, SAVE, CLONE, - IS_CONTEXT + IS_CONTEXT, + SNAPSHOTS } = disk const size = +SIZE ? prettyBytes(+SIZE, 'MB') : '-' @@ -109,35 +106,31 @@ const StorageItem = ({ disk, actions = [] }) => { {!IS_CONTEXT && !!actions.length && (
{actions?.includes?.(VM_ACTIONS.DISK_SAVEAS) && isImage && ( - } - handleClick={() => undefined} - /> + )} {actions?.includes?.(VM_ACTIONS.SNAPSHOT_DISK_CREATE) && isImage && ( - } - handleClick={() => undefined} - /> + )} {actions?.includes?.(VM_ACTIONS.RESIZE_DISK) && ( - } - handleClick={() => undefined} - /> + )} {actions?.includes?.(VM_ACTIONS.DETACH_DISK) && ( - } - handleClick={() => undefined} - /> + )}
)} + {SNAPSHOTS && ( +
+ {SNAPSHOTS?.map(snapshot => ( + + ))} +
+ )} ) } diff --git a/src/fireedge/src/client/components/Tabs/Vm/Storage/List.js b/src/fireedge/src/client/components/Tabs/Vm/Storage/List.js index 78efdd4560..886d344552 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Storage/List.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Storage/List.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import StorageItem from 'client/components/Tabs/Vm/Storage/Item' diff --git a/src/fireedge/src/client/components/Tabs/Vm/Storage/SubItem.js b/src/fireedge/src/client/components/Tabs/Vm/Storage/SubItem.js new file mode 100644 index 0000000000..80fd8639f5 --- /dev/null +++ b/src/fireedge/src/client/components/Tabs/Vm/Storage/SubItem.js @@ -0,0 +1,101 @@ +/* ------------------------------------------------------------------------- * + * 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. * + * ------------------------------------------------------------------------- */ +/* eslint-disable jsdoc/require-jsdoc */ +import PropTypes from 'prop-types' +import { ModernTv } from 'iconoir-react' +import { Typography, Paper } from '@material-ui/core' + +import * as Actions from 'client/components/Tabs/Vm/Storage/Actions' +import { StatusChip } from 'client/components/Status' +import { rowStyles } from 'client/components/Tables/styles' +import { Tr } from 'client/components/HOC' + +import * as Helper from 'client/models/Helper' +import { prettyBytes } from 'client/utils' +import { T, VM_ACTIONS } from 'client/constants' + +const StorageSubItem = ({ disk, snapshot = {}, actions = [] }) => { + const classes = rowStyles() + + const isImage = disk?.IMAGE_ID !== undefined + + const { + ID, + NAME, + ACTIVE, + DATE, + SIZE: SNAPSHOT_SIZE, + MONITOR_SIZE: SNAPSHOT_MONITOR_SIZE + } = snapshot + + const isActive = Helper.stringToBoolean(ACTIVE) + const time = Helper.timeFromMilliseconds(+DATE) + const timeAgo = `created ${time.toRelative()}` + + const size = +SNAPSHOT_SIZE ? prettyBytes(+SNAPSHOT_SIZE, 'MB') : '-' + const monitorSize = +SNAPSHOT_MONITOR_SIZE + ? prettyBytes(+SNAPSHOT_MONITOR_SIZE, 'MB') + : '-' + + return ( + +
+
+ {NAME} + + {isActive && } + + +
+
+ + {`#${ID} ${timeAgo}`} + + + + {` ${monitorSize}/${size}`} + +
+
+ {!!actions.length && ( +
+ {actions?.includes?.(VM_ACTIONS.DISK_SAVEAS) && isImage && ( + + )} + {actions?.includes?.(VM_ACTIONS.SNAPSHOT_DISK_RENAME) && ( + + )} + {actions?.includes?.(VM_ACTIONS.SNAPSHOT_DISK_REVERT) && ( + + )} + {actions?.includes?.(VM_ACTIONS.SNAPSHOT_DISK_DELETE) && ( + + )} +
+ )} +
+ ) +} + +StorageSubItem.propTypes = { + disk: PropTypes.object.isRequired, + snapshot: PropTypes.object.isRequired, + actions: PropTypes.arrayOf(PropTypes.string) +} + +StorageSubItem.displayName = 'StorageSubItem' + +export default StorageSubItem diff --git a/src/fireedge/src/client/components/Tabs/Vm/Storage/index.js b/src/fireedge/src/client/components/Tabs/Vm/Storage/index.js index e3ff073f52..a7eeebdee8 100644 --- a/src/fireedge/src/client/components/Tabs/Vm/Storage/index.js +++ b/src/fireedge/src/client/components/Tabs/Vm/Storage/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useContext } from 'react' import PropTypes from 'prop-types' import { useVmApi } from 'client/features/One' @@ -23,16 +23,16 @@ import { TabContext } from 'client/components/Tabs/TabProvider' import StorageList from 'client/components/Tabs/Vm/Storage/List' import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' import { ImageSteps, VolatileSteps } from 'client/components/Forms/Vm' +import { Tr } from 'client/components/HOC' import * as VirtualMachine from 'client/models/VirtualMachine' import * as Helper from 'client/models/Helper' import { T, VM_ACTIONS } from 'client/constants' -const VmStorageTab = ({ tabProps: { actions = [] } = {} }) => { +const VmStorageTab = ({ tabProps: { actions } = {} }) => { const { attachDisk } = useVmApi() - const { handleRefetch, data: vm = {} } = React.useContext(TabContext) - const { ID } = vm + const { data: vm = {} } = useContext(TabContext) const disks = VirtualMachine.getDisks(vm) const hypervisor = VirtualMachine.getHypervisor(vm) @@ -44,16 +44,21 @@ const VmStorageTab = ({ tabProps: { actions = [] } = {} }) => { const template = Helper.jsonToXml({ DISK: root }) - const response = await attachDisk(ID, template) - String(response) === String(ID) && await handleRefetch?.() + await attachDisk(vm.ID, template) } return ( <> {actionsAvailable?.includes?.(VM_ACTIONS.ATTACH_DISK) && ( ({ storage: Storage }[tabName]) -const VmTabs = React.memo(({ id }) => { +const VmTabs = memo(({ id }) => { const { getHooksSocket } = useSocket() const { getVm } = useVmApi() @@ -61,14 +61,14 @@ const VmTabs = React.memo(({ id }) => { const handleRefetch = () => fetchRequest(id, { reload: true }) - const [tabsAvailable, setTabs] = React.useState(() => []) + const [tabsAvailable, setTabs] = useState(() => []) const { view, getResourceView } = useAuth() - React.useEffect(() => { + useEffect(() => { fetchRequest(id) }, [id]) - React.useEffect(() => { + useEffect(() => { const infoTabs = getResourceView('VM')?.['info-tabs'] ?? {} setTabs(() => Object.entries(infoTabs) diff --git a/src/fireedge/src/client/components/Tabs/index.js b/src/fireedge/src/client/components/Tabs/index.js index 82a0561c83..9385ae1d01 100644 --- a/src/fireedge/src/client/components/Tabs/index.js +++ b/src/fireedge/src/client/components/Tabs/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useMemo } from 'react' +import { useState, useMemo } from 'react' import PropTypes from 'prop-types' import { Tabs as MTabs, Tab as MTab } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Typography/DevTypography.js b/src/fireedge/src/client/components/Typography/DevTypography.js index d40d8252be..ddcddabb47 100644 --- a/src/fireedge/src/client/components/Typography/DevTypography.js +++ b/src/fireedge/src/client/components/Typography/DevTypography.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography, Chip } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Typography/TypographyWithPoint.js b/src/fireedge/src/client/components/Typography/TypographyWithPoint.js index 7cedab4a68..e5bc1ee909 100644 --- a/src/fireedge/src/client/components/Typography/TypographyWithPoint.js +++ b/src/fireedge/src/client/components/Typography/TypographyWithPoint.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { makeStyles, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/components/Widgets/TotalProviders/index.js b/src/fireedge/src/client/components/Widgets/TotalProviders/index.js index 501be9376c..f662159b03 100644 --- a/src/fireedge/src/client/components/Widgets/TotalProviders/index.js +++ b/src/fireedge/src/client/components/Widgets/TotalProviders/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useMemo } from 'react' import { PieChart } from 'react-minimal-pie-chart' import { Typography, Paper } from '@material-ui/core' @@ -31,9 +31,9 @@ const TotalProviders = () => { const classes = useStyles() const { providers } = useOne() - const totalProviders = React.useMemo(() => providers.length, [providers.length]) + const totalProviders = useMemo(() => providers.length, [providers.length]) - const chartData = React.useMemo(() => { + const chartData = useMemo(() => { const groups = groupBy(providers, 'TEMPLATE.PLAIN.provider') return Object.values(PROVIDERS_TYPES).map(({ id, name, color }) => ({ @@ -43,7 +43,7 @@ const TotalProviders = () => { })) }, [totalProviders]) - const title = React.useMemo(() => ( + const title = useMemo(() => (
@@ -55,7 +55,7 @@ const TotalProviders = () => {
), [classes, totalProviders]) - const legend = React.useMemo(() => ( + const legend = useMemo(() => (
{chartData?.map(({ title: titleLegend, value, color }) => @@ -68,7 +68,7 @@ const TotalProviders = () => {
), [classes, chartData]) - const chart = React.useMemo(() => ( + const chart = useMemo(() => ( { const classes = useStyles() const provisions = useProvision() - const provisionsByProvider = React.useMemo(() => + const provisionsByProvider = useMemo(() => provisions ?.map(provision => ({ provider: get(provision, 'TEMPLATE.BODY.provider'), @@ -53,7 +53,7 @@ const TotalProvisionInfrastructures = () => { })) , [provisions]) - const totals = React.useMemo(() => + const totals = useMemo(() => provisionsByProvider?.reduce((total, { clusters, hosts, datastores, networks }) => ({ clusters: clusters + total.clusters, hosts: hosts + total.hosts, @@ -62,7 +62,7 @@ const TotalProvisionInfrastructures = () => { }), { clusters: 0, hosts: 0, datastores: 0, networks: 0 }) , [provisionsByProvider]) - return React.useMemo(() => ( + return useMemo(() => (
{ const classes = useStyles() const { provisions } = useOne() - const chartData = React.useMemo(() => { + const chartData = useMemo(() => { const groups = groupBy(provisions, 'TEMPLATE.BODY.state') return PROVISIONS_STATES.map((_, stateIndex) => @@ -40,7 +40,7 @@ const TotalProvisionsByState = () => { const totalProvisions = provisions.length - const title = React.useMemo(() => ( + const title = useMemo(() => (
@@ -52,7 +52,7 @@ const TotalProvisionsByState = () => {
), [classes, totalProvisions]) - return React.useMemo(() => ( + return useMemo(() => ( { const classes = useStyles() + const { [RESOURCES.user]: users = [], [RESOURCES.group]: groups = [], @@ -47,7 +48,7 @@ const TotalProvisionInfrastructures = ({ isLoading }) => { [RESOURCES.vn]: vNetworks = [] } = useOne() - return React.useMemo(() => ( + return useMemo(() => (
{ )}
- ), [users?.length, isLoading]) + ), [users?.length, isLoading, classes]) } TotalProvisionInfrastructures.displayName = 'TotalProvisionInfrastructures' diff --git a/src/fireedge/src/client/constants/index.js b/src/fireedge/src/client/constants/index.js index 84e2fc4882..76b560c364 100644 --- a/src/fireedge/src/client/constants/index.js +++ b/src/fireedge/src/client/constants/index.js @@ -56,14 +56,15 @@ export const FILTER_POOL = { } export const INPUT_TYPES = { - TEXT: 'text', - PASSWORD: 'password', - HIDDEN: 'hidden', - SELECT: 'select', - CHECKBOX: 'checkbox', - SLIDER: 'slider', AUTOCOMPLETE: 'autocomplete', - FILE: 'file' + CHECKBOX: 'checkbox', + FILE: 'file', + TIME: 'time', + HIDDEN: 'hidden', + PASSWORD: 'password', + SELECT: 'select', + SLIDER: 'slider', + TEXT: 'text' } export const DEBUG_LEVEL = { diff --git a/src/fireedge/src/client/constants/translates.js b/src/fireedge/src/client/constants/translates.js index 9ead41bb28..e1816d16a8 100644 --- a/src/fireedge/src/client/constants/translates.js +++ b/src/fireedge/src/client/constants/translates.js @@ -26,17 +26,29 @@ module.exports = { /* actions */ Accept: 'Accept', + Active: 'Active', + AddAction: 'Add action', + Attach: 'Attach', BackToList: 'Back to %s list', Cancel: 'Cancel', Clone: 'Clone', Configuration: 'Configuration', Delete: 'Delete', + DeleteSomething: 'Delete %s', Deploy: 'Deploy', + Detach: 'Detach', + DetachSomething: 'Detach %s', + Done: 'Done', Edit: 'Edit', Finish: 'Finish', Info: 'Info', Remove: 'Remove', + Rename: 'Rename', + Resize: 'Resize', + ResizeCapacity: 'Resize capacity', + Revert: 'Revert', Save: 'Save', + SaveAs: 'Save as', Search: 'Search', Select: 'Select', SelectGroup: 'Select a group', @@ -46,13 +58,10 @@ module.exports = { SignIn: 'Sign In', SignOut: 'Sign Out', Submit: 'Submit', - Resize: 'Resize', - ResizeCapacity: 'Resize capacity', - AttachDisk: 'Attach disk', - AttachNic: 'Attach nic', - Detach: 'Detach', + Take: 'Take', TakeSnapshot: 'Take snapshot', - AddAction: 'Add action', + TakeSnapshotOf: 'Take snapshot of %s', + Update: 'Update', /* questions */ Yes: 'Yes', @@ -60,6 +69,8 @@ module.exports = { DoYouWantProceed: 'Do you want proceed?', /* Scheduling */ + ScheduledAction: 'Scheduled action', + Charter: 'Charter', Mon: 'Mon', Monday: 'Monday', Tue: 'Tue', @@ -93,6 +104,7 @@ module.exports = { /* errors */ SessionExpired: 'Sorry, your session has expired', + SomethingWrong: 'Something go wrong', CannotConnectOneFlow: 'Cannot connect to OneFlow server', CannotConnectOneProvision: 'Cannot connect to OneProvision server', ErrorOneProvisionGUI: 'FireEdge is not correctly configured to operate the OneProvision GUI', @@ -219,6 +231,8 @@ module.exports = { Ownership: 'Ownership', Owner: 'Owner', Other: 'Other', + Primary: 'Primary', + Secondary: 'Secondary', /* instances schema */ IP: 'IP', @@ -242,7 +256,10 @@ module.exports = { CostCpu: 'Cost / CPU', CostMByte: 'Cost / MByte', /* VM schema - storage */ + Disk: 'Disk', Volatile: 'Volatile', + Snapshot: 'Snapshot', + DiskSnapshot: 'Disk snapshot', /* VM schema - network */ NIC: 'NIC', Alias: 'Alias', diff --git a/src/fireedge/src/client/constants/vm.js b/src/fireedge/src/client/constants/vm.js index 08746a4dd2..a4f403011a 100644 --- a/src/fireedge/src/client/constants/vm.js +++ b/src/fireedge/src/client/constants/vm.js @@ -478,6 +478,7 @@ export const VM_ACTIONS = { ATTACH_DISK: 'attach_disk', DETACH_DISK: 'detach_disk', SNAPSHOT_DISK_CREATE: 'snapshot_disk_create', + SNAPSHOT_DISK_RENAME: 'snapshot_disk_rename', SNAPSHOT_DISK_REVERT: 'snapshot_disk_revert', SNAPSHOT_DISK_DELETE: 'snapshot_disk_delete', RESIZE_DISK: 'resize_disk', @@ -502,7 +503,7 @@ export const VM_ACTIONS = { UPDATE_CONF: 'update_configuration' } -/** @enum {string} Hypervisors */ +/** @enum {string} Hypervisors */ export const HYPERVISORS = { kvm: 'kvm', vcenter: 'vcenter', @@ -510,6 +511,29 @@ export const HYPERVISORS = { lxc: 'lxc' } +/** @type {string} Actions that can be scheduled */ +export const VM_ACTIONS_WITH_SCHEDULE = [ + VM_ACTIONS.TERMINATE, + VM_ACTIONS.TERMINATE_HARD, + VM_ACTIONS.UNDEPLOY, + VM_ACTIONS.UNDEPLOY_HARD, + VM_ACTIONS.HOLD, + VM_ACTIONS.RELEASE, + VM_ACTIONS.STOP, + VM_ACTIONS.SUSPEND, + VM_ACTIONS.RESUME, + VM_ACTIONS.REBOOT, + VM_ACTIONS.REBOOT_HARD, + VM_ACTIONS.POWEROFF, + VM_ACTIONS.POWEROFF_HARD, + VM_ACTIONS.SNAPSHOT_DISK_CREATE, + VM_ACTIONS.SNAPSHOT_DISK_REVERT, + VM_ACTIONS.SNAPSHOT_DISK_DELETE, + VM_ACTIONS.SNAPSHOT_CREATE, + VM_ACTIONS.SNAPSHOT_REVERT, + VM_ACTIONS.SNAPSHOT_DELETE +] + /** * @enum {( * 'none' | diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/dialog.js b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/dialog.js index aac48943bf..0feb105838 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/dialog.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/dialog.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/index.js b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/index.js index 94a3f987cc..a2e18ef738 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/index.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useMemo } from 'react' +import { useState, useMemo } from 'react' import PropTypes from 'prop-types' import { diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/info.js b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/info.js index 6c8ea637e0..05f89ff744 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/info.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/info.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/tiers.js b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/tiers.js index 9605cb547c..3d97d9b452 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/tiers.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/DialogInfo/tiers.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { ListCards } from 'client/components/List' diff --git a/src/fireedge/src/client/containers/ApplicationsInstances/index.js b/src/fireedge/src/client/containers/ApplicationsInstances/index.js index 36285f05e8..39521b277a 100644 --- a/src/fireedge/src/client/containers/ApplicationsInstances/index.js +++ b/src/fireedge/src/client/containers/ApplicationsInstances/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { Container, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/BasicConfiguration/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/BasicConfiguration/index.js index 7665a0f434..55b1c51499 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' 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 6ae62d8ddb..82c23eb4d2 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 @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useCallback } from 'react' +import { useEffect, useCallback } from 'react' import { useListForm, useFetch } from 'client/hooks' import { useCluster, useClusterApi } from 'client/features/One' 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 04f9557966..3e0fd10b9e 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 @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useEffect, useCallback } from 'react' +import { useState, useEffect, useCallback } from 'react' import { useWatch } from 'react-hook-form' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/CustomNode.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/CustomNode.js index bf523463d6..2bab4182f2 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/CustomNode.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/CustomNode.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useCallback } from 'react' +import { memo, useCallback, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { @@ -31,7 +31,7 @@ import { TierCard } from 'client/components/Cards' * @param {object} props - Props * @param {object} props.data - Node values * @param {Function} props.selected - If `true`, the node is selected - * @returns {React.JSXElementConstructor} Node component + * @returns {JSXElementConstructor} Node component */ const CustomNode = memo(({ data, selected }) => { const { tier, handleEdit } = data diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/index.js index 7695b0c778..395da5a0c1 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Flow/index.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useEffect, useMemo } from 'react' +import { memo, useEffect, useMemo, JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { makeStyles } from '@material-ui/core' @@ -57,7 +57,7 @@ const useStyles = makeStyles(() => ({ * @param {Function} props.handleCreate - Create a new Node * @param {Function} props.handleEdit - Edit a current Node * @param {Function} props.handleSetData - Set new list of nodes - * @returns {React.JSXElementConstructor} ReactFlow component + * @returns {JSXElementConstructor} ReactFlow component */ const Flow = memo(({ dataFields, handleCreate, handleEdit, handleSetData }) => { const { watch } = useFormContext() diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/BasicConfiguration/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/BasicConfiguration/index.js index 67d48dfa2b..cc3e3e2c71 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' import { T } from 'client/constants' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Networks/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Networks/index.js index f4375fc187..7afe6e0837 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Networks/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Networks/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useContext } from 'react' +import { useCallback, useContext } from 'react' import { useListForm } from 'client/hooks' import { ListCards } from 'client/components/List' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Policies/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Policies/index.js index 8dae28d1ce..eb8651c250 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Policies/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Policies/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useState, useMemo } from 'react' +import { useCallback, useState, useMemo } from 'react' import { useFormContext } from 'react-hook-form' import { useTheme, Box, Tab, Tabs, Fab, AppBar } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Docker.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Docker.js index 55553c8a06..5f959dfe11 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Docker.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/List/Docker.js @@ -14,47 +14,23 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' -import AceEditor from 'react-ace' -import 'ace-builds/src-noconflict/mode-dockerfile' -import 'ace-builds/src-noconflict/theme-github' +import { InputCode } from 'client/components/FormControl' -const DockerFile = ({ backButton, handleSetData, currentValue, ...props }) => { - const handleChange = newValue => { - handleSetData(newValue) - } - - return ( - <> -
- {backButton} -

Docker file

-
- - - ) -} +const DockerFile = ({ backButton, handleSetData, currentValue }) => ( + <> +
+ {backButton} +

Docker file

+
+ handleSetData(newValue)} + /> + +) DockerFile.propTypes = { backButton: PropTypes.node, 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 7cbe40a819..4249905853 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 @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { useMarketplaceApp, useMarketplaceAppApi } from 'client/features/One' 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 11ce22d79a..80cd4eaea9 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 @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { useVmTemplate, useVmTemplateApi } from 'client/features/One' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/index.js index 3997318c50..6c16fb3257 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/Steps/Template/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useState, useEffect, useMemo } from 'react' +import { useCallback, useState, useEffect, useMemo } from 'react' import { makeStyles, IconButton, Button, Fade } from '@material-ui/core' import { diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/index.js index 4f07819806..664061670d 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/Steps/Tiers/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { +import { useEffect, useState, useCallback, 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 6d62a7f399..1f44fb5ed2 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Create/index.js @@ -14,12 +14,12 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import { Redirect, useHistory, useParams } from 'react-router-dom' import { LinearProgress, Container } from '@material-ui/core' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import FormStepper from 'client/components/FormStepper' import Steps from 'client/containers/ApplicationsTemplates/Form/Create/Steps' @@ -90,8 +90,4 @@ function ApplicationsTemplatesCreateForm () { ) } -ApplicationsTemplatesCreateForm.propTypes = {} - -ApplicationsTemplatesCreateForm.defaultProps = {} - export default ApplicationsTemplatesCreateForm diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/BasicConfiguration/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/BasicConfiguration/index.js index 7665a0f434..55b1c51499 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' 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 c1a42ec03e..52baa28c01 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 @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useCallback } from 'react' +import { useEffect, useCallback } from 'react' import { Divider, Paper, Typography } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Tiers/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Tiers/index.js index 41a0222bfe..72323d007e 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Tiers/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/Steps/Tiers/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useMemo, useCallback, useState } from 'react' +import { useMemo, useCallback, useState } from 'react' import { useFormContext } from 'react-hook-form' import { useTheme, AppBar, Tabs, Tab } from '@material-ui/core' 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 e654d6e2c7..c170432d5f 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/Form/Deploy/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useMemo, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import PropTypes from 'prop-types' import { makeStyles, CircularProgress, Backdrop } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js index fcb9ab1b27..14a6c85fb4 100644 --- a/src/fireedge/src/client/containers/ApplicationsTemplates/index.js +++ b/src/fireedge/src/client/containers/ApplicationsTemplates/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { useHistory } from 'react-router-dom' import { Container, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Clusters/index.js b/src/fireedge/src/client/containers/Clusters/index.js index 72f8c721c1..14ef763e78 100644 --- a/src/fireedge/src/client/containers/Clusters/index.js +++ b/src/fireedge/src/client/containers/Clusters/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { ClustersTable } from 'client/components/Tables' function Clusters () { return ( @@ -30,7 +29,7 @@ function Clusters () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Dashboard/Provision/index.js b/src/fireedge/src/client/containers/Dashboard/Provision/index.js index 79a41c8db2..d4f024a514 100644 --- a/src/fireedge/src/client/containers/Dashboard/Provision/index.js +++ b/src/fireedge/src/client/containers/Dashboard/Provision/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useEffect } from 'react' import clsx from 'clsx' import { Container, Box, Grid } from '@material-ui/core' @@ -31,7 +31,7 @@ function Dashboard () { const classes = dashboardStyles({ disableanimations }) - React.useEffect(() => { + useEffect(() => { getProviders() getProvisions() }, []) diff --git a/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js b/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js index ff791bf3dc..aaac931164 100644 --- a/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js +++ b/src/fireedge/src/client/containers/Dashboard/Sunstone/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useEffect } from 'react' import clsx from 'clsx' import { Container, Box, Grid } from '@material-ui/core' @@ -39,7 +39,7 @@ function Dashboard () { const withoutAnimations = String(disableanimations).toUpperCase() === 'YES' - React.useEffect(() => { + useEffect(() => { fetchRequestAll([ getUsers(), getImages(), diff --git a/src/fireedge/src/client/containers/Datastores/index.js b/src/fireedge/src/client/containers/Datastores/index.js index 5f21f8ff86..c982d5d0bc 100644 --- a/src/fireedge/src/client/containers/Datastores/index.js +++ b/src/fireedge/src/client/containers/Datastores/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { DatastoresTable } from 'client/components/Tables' function Datastores () { return ( @@ -30,7 +29,7 @@ function Datastores () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Groups/index.js b/src/fireedge/src/client/containers/Groups/index.js index ceabd30bc6..b72fb0600e 100644 --- a/src/fireedge/src/client/containers/Groups/index.js +++ b/src/fireedge/src/client/containers/Groups/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { GroupsTable } from 'client/components/Tables' function Groups () { return ( @@ -30,7 +29,7 @@ function Groups () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Hosts/index.js b/src/fireedge/src/client/containers/Hosts/index.js index 9885081254..169a448cbc 100644 --- a/src/fireedge/src/client/containers/Hosts/index.js +++ b/src/fireedge/src/client/containers/Hosts/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { HostsTable } from 'client/components/Tables' function Hosts () { return ( @@ -30,7 +29,7 @@ function Hosts () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Images/index.js b/src/fireedge/src/client/containers/Images/index.js index 838719a275..097397d284 100644 --- a/src/fireedge/src/client/containers/Images/index.js +++ b/src/fireedge/src/client/containers/Images/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useState, useMemo } from 'react' import { Container, Box } from '@material-ui/core' @@ -23,9 +23,9 @@ import Detail from 'client/components/Tables/Images/detail' import SplitPane from 'client/components/SplitPane' function Images () { - const [selectedRows, onSelectedRowsChange] = React.useState() + const [selectedRows, onSelectedRowsChange] = useState() - const selectedRowIds = React.useMemo( + const selectedRowIds = useMemo( () => selectedRows?.map(row => row.id), [selectedRows] ) diff --git a/src/fireedge/src/client/containers/Login/Form.js b/src/fireedge/src/client/containers/Login/Form.js index cb7b8d43e0..c8ff640159 100644 --- a/src/fireedge/src/client/containers/Login/Form.js +++ b/src/fireedge/src/client/containers/Login/Form.js @@ -14,13 +14,13 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' import { Box, Button, Slide } from '@material-ui/core' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import loginStyles from 'client/containers/Login/styles' diff --git a/src/fireedge/src/client/containers/Login/index.js b/src/fireedge/src/client/containers/Login/index.js index 9781093f5e..72578d8e80 100644 --- a/src/fireedge/src/client/containers/Login/index.js +++ b/src/fireedge/src/client/containers/Login/index.js @@ -14,14 +14,16 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ +import { useMemo, useState } from 'react' import { Box, Container, LinearProgress, Paper, useMediaQuery } from '@material-ui/core' -import { OpenNebulaLogo } from 'client/components/Icons' + +import { useAuth, useAuthApi } from 'client/features/Auth' +import { useFetch } from 'client/hooks' + import Form from 'client/containers/Login/Form' import * as FORMS from 'client/containers/Login/schema' import loginStyles from 'client/containers/Login/styles' -import { useAuth, useAuthApi } from 'client/features/Auth' -import { useFetch } from 'client/hooks' -import React, { useMemo, useState } from 'react' +import { OpenNebulaLogo } from 'client/components/Icons' const STEPS = { USER_FORM: 0, diff --git a/src/fireedge/src/client/containers/Login/schema.js b/src/fireedge/src/client/containers/Login/schema.js index 2805355fcd..0e328712ad 100644 --- a/src/fireedge/src/client/containers/Login/schema.js +++ b/src/fireedge/src/client/containers/Login/schema.js @@ -14,13 +14,11 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' - -import { VerifiedBadge as SelectIcon } from 'iconoir-react' import * as yup from 'yup' import { useAuth } from 'client/features/Auth' import { getValidationFromFields } from 'client/utils' +import { Tr } from 'client/components/HOC' import { T, INPUT_TYPES, FILTER_POOL } from 'client/constants' export const USERNAME = { @@ -95,14 +93,10 @@ export const GROUP = { const sortedGroupsById = groups?.sort((a, b) => a.ID - b.ID) const formatGroups = sortedGroupsById.map(({ ID, NAME }) => { - const markAsPrimary = user?.GID === ID ? ( - - - - ) : null + const isPrimary = user?.GID === ID ? `(${Tr(T.Primary)})` : '' return { - text: <>{`${ID} - ${String(NAME)}`}{markAsPrimary}, + text: `${ID} - ${NAME} ${isPrimary}`, value: String(ID) } }) diff --git a/src/fireedge/src/client/containers/MarketplaceApps/index.js b/src/fireedge/src/client/containers/MarketplaceApps/index.js index bd0f14b664..eef1f793ed 100644 --- a/src/fireedge/src/client/containers/MarketplaceApps/index.js +++ b/src/fireedge/src/client/containers/MarketplaceApps/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { MarketplaceAppsTable } from 'client/components/Tables' function MarketplaceApps () { return ( @@ -30,7 +29,7 @@ function MarketplaceApps () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Marketplaces/index.js b/src/fireedge/src/client/containers/Marketplaces/index.js index 0201fdda6b..178887ac8b 100644 --- a/src/fireedge/src/client/containers/Marketplaces/index.js +++ b/src/fireedge/src/client/containers/Marketplaces/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { MarketplacesTable } from 'client/components/Tables' function Marketplaces () { return ( @@ -30,7 +29,7 @@ function Marketplaces () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Providers/Form/Create.js b/src/fireedge/src/client/containers/Providers/Form/Create.js index 39c35b8e3c..5161655c3e 100644 --- a/src/fireedge/src/client/containers/Providers/Form/Create.js +++ b/src/fireedge/src/client/containers/Providers/Form/Create.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { Redirect, useParams } from 'react-router' import { Container, LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/BasicConfiguration/index.js b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/BasicConfiguration/index.js index 2803cd9d45..73e04c15c0 100644 --- a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' import { T } from 'client/constants' diff --git a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Connection/index.js b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Connection/index.js index 74c16910a1..6b9cbda4d7 100644 --- a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Connection/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Connection/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import { useFormContext } from 'react-hook-form' import FormWithSchema from 'client/components/Forms/FormWithSchema' diff --git a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Template/index.js b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Template/index.js index 893a6f5bb9..f5c1e379b6 100644 --- a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Template/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/Steps/Template/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useEffect, useMemo } from 'react' +import { useState, useCallback, useEffect, useMemo } from 'react' import { Divider, Select, Breadcrumbs, InputLabel, FormControl } from '@material-ui/core' import { NavArrowRight } from 'iconoir-react' import Marked from 'marked' @@ -44,11 +44,11 @@ const Template = () => ({ const templateSelected = data?.[0] - const [provisionSelected, setProvision] = React.useState( + const [provisionSelected, setProvision] = useState( () => templateSelected?.plain?.provision_type ) - const [providerSelected, setProvider] = React.useState( + const [providerSelected, setProvider] = useState( () => templateSelected?.provider ) @@ -171,7 +171,7 @@ const Template = () => ({ {/* -- DESCRIPTION -- */} - {React.useMemo(() => provisionDescription && ( + {useMemo(() => provisionDescription && ( ), [provisionDescription])} diff --git a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/index.js b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/index.js index 356f1918ef..04c80cfbe9 100644 --- a/src/fireedge/src/client/containers/Providers/Form/ProviderForm/index.js +++ b/src/fireedge/src/client/containers/Providers/Form/ProviderForm/index.js @@ -14,12 +14,11 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { useHistory } from 'react-router' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import FormStepper from 'client/components/FormStepper' import Steps from 'client/containers/Providers/Form/ProviderForm/Steps' diff --git a/src/fireedge/src/client/containers/Providers/Sections/info.js b/src/fireedge/src/client/containers/Providers/Sections/info.js index 19a62a94e2..726d23be04 100644 --- a/src/fireedge/src/client/containers/Providers/Sections/info.js +++ b/src/fireedge/src/client/containers/Providers/Sections/info.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useState } from 'react' +import { memo, useState } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/containers/Providers/index.js b/src/fireedge/src/client/containers/Providers/index.js index 95fd1d0bf9..e5176a0f38 100644 --- a/src/fireedge/src/client/containers/Providers/index.js +++ b/src/fireedge/src/client/containers/Providers/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' import { useHistory } from 'react-router-dom' import { useTheme, Container, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js index ec44cebcbc..2fd56b554c 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/datastores.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useEffect } from 'react' +import { memo, useEffect } from 'react' import PropTypes from 'prop-types' import { Trash as DeleteIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js index f8977448df..cba257cfa4 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/hosts.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useEffect } from 'react' +import { memo, useEffect } from 'react' import PropTypes from 'prop-types' import { Trash as DeleteIcon, Settings as ConfigureIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js index a8f24f02ae..cf423e7bd9 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useMemo } from 'react' +import { useState, useMemo } from 'react' import PropTypes from 'prop-types' import { AppBar, Tabs, Tab, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js index e471b61dce..42a46aad15 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/info.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo } from 'react' +import { memo } from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js index 9febea0f94..e37bce4613 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/log.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { memo, useEffect, useMemo } from 'react' import PropTypes from 'prop-types' import { LinearProgress } from '@material-ui/core' @@ -22,7 +22,7 @@ import { useFetch, useSocket } from 'client/hooks' import { useProvisionApi } from 'client/features/One' import DebugLog, { LogUtils } from 'client/components/DebugLog' -const Log = React.memo(({ hidden, data: { ID } }) => { +const Log = memo(({ hidden, data: { ID } }) => { const { getProvisionSocket } = useSocket() const { getProvisionLog } = useProvisionApi() @@ -32,11 +32,11 @@ const Log = React.memo(({ hidden, data: { ID } }) => { loading } = useFetch(getProvisionLog) - React.useEffect(() => { + useEffect(() => { (!log && !hidden) && fetchRequest(ID) }, [hidden]) - const parsedLog = React.useMemo(() => + const parsedLog = useMemo(() => log ?.map(entry => { try { return JSON.parse(entry) } catch { return entry } diff --git a/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js b/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js index 212b53aa0a..d6f60ee2da 100644 --- a/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js +++ b/src/fireedge/src/client/containers/Provisions/DialogInfo/networks.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import React, { memo, useEffect } from 'react' +import { memo, useEffect } from 'react' import PropTypes from 'prop-types' import { Trash as DeleteIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/containers/Provisions/Form/Create.js b/src/fireedge/src/client/containers/Provisions/Form/Create.js index 996badb500..c43f3e788e 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/Create.js +++ b/src/fireedge/src/client/containers/Provisions/Form/Create.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useEffect, useState, memo } from 'react' +import { useEffect, useState, memo } from 'react' import { Redirect, useHistory } from 'react-router' import { NavArrowLeft as ArrowBackIcon } from 'iconoir-react' diff --git a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/BasicConfiguration/index.js b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/BasicConfiguration/index.js index b25fb09900..1fa85ccca6 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/BasicConfiguration/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/BasicConfiguration/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import FormWithSchema from 'client/components/Forms/FormWithSchema' import { T } from 'client/constants' diff --git a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Inputs/index.js b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Inputs/index.js index 0c2314843f..4287079288 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Inputs/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Inputs/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import { useFormContext } from 'react-hook-form' import { LinearProgress } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Provider/index.js b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Provider/index.js index f84c3bd830..fe8d22708f 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Provider/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Provider/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback } from 'react' +import { useCallback, useMemo } from 'react' import { useWatch } from 'react-hook-form' import { useListForm } from 'client/hooks' @@ -38,7 +38,7 @@ const Provider = () => ({ const provisionTemplate = useWatch({ name: TEMPLATE_ID }) const provisionTemplateSelected = provisionTemplate?.[0] ?? {} - const providersByTypeAndService = React.useMemo(() => + const providersByTypeAndService = useMemo(() => providers.filter(({ TEMPLATE: { PLAIN = {} } = {} }) => PLAIN.provider === provisionTemplateSelected.provider && PLAIN.provision_type === provisionTemplateSelected.provision_type diff --git a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Template/index.js b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Template/index.js index ffcaed9ec3..b10235955d 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Template/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/Steps/Template/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useCallback, useEffect, useMemo } from 'react' +import { useState, useCallback, useEffect, useMemo } from 'react' import { Divider, Select, Breadcrumbs, InputLabel, FormControl } from '@material-ui/core' import { NavArrowRight } from 'iconoir-react' import Marked from 'marked' @@ -43,11 +43,11 @@ const Template = () => ({ const templateSelected = data?.[0] - const [provisionSelected, setProvision] = React.useState( + const [provisionSelected, setProvision] = useState( () => templateSelected?.provision_type ) - const [providerSelected, setProvider] = React.useState( + const [providerSelected, setProvider] = useState( () => templateSelected?.provider ) @@ -174,7 +174,7 @@ const Template = () => ({ {/* -- DESCRIPTION -- */} - {React.useMemo(() => provisionDescription && ( + {useMemo(() => provisionDescription && ( ), [provisionDescription])} diff --git a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/index.js b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/index.js index 76b40e11bd..c84b5c26ea 100644 --- a/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/index.js +++ b/src/fireedge/src/client/containers/Provisions/Form/ProvisionForm/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import FormStepper from 'client/components/FormStepper' import Steps from 'client/containers/Provisions/Form/ProvisionForm/Steps' diff --git a/src/fireedge/src/client/containers/Provisions/index.js b/src/fireedge/src/client/containers/Provisions/index.js index fee4556cf9..277eb443cf 100644 --- a/src/fireedge/src/client/containers/Provisions/index.js +++ b/src/fireedge/src/client/containers/Provisions/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { useState, useEffect, createElement } from 'react' +import { useState, useEffect, createElement } from 'react' import { useHistory } from 'react-router-dom' import { useTheme, Container, Box } from '@material-ui/core' diff --git a/src/fireedge/src/client/containers/Settings/index.js b/src/fireedge/src/client/containers/Settings/index.js index 4011e77635..18ff2d3608 100644 --- a/src/fireedge/src/client/containers/Settings/index.js +++ b/src/fireedge/src/client/containers/Settings/index.js @@ -14,23 +14,25 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useEffect } from 'react' import { makeStyles, Container, Paper, Box, Typography } from '@material-ui/core' import { useForm, FormProvider } from 'react-hook-form' -import { yupResolver } from '@hookform/resolvers' +import { yupResolver } from '@hookform/resolvers/yup' import FormWithSchema from 'client/components/Forms/FormWithSchema' import SubmitButton from 'client/components/FormControl/SubmitButton' import { useAuth, useAuthApi } from 'client/features/Auth' import { useUserApi } from 'client/features/One' +import { useGeneralApi } from 'client/features/General' import { Tr } from 'client/components/HOC' import { T } from 'client/constants' import { FORM_FIELDS, FORM_SCHEMA } from 'client/containers/Settings/schema' import { mapUserInputs } from 'client/utils' +import * as Helper from 'client/models/Helper' const useStyles = makeStyles(theme => ({ header: { @@ -60,6 +62,7 @@ const Settings = () => { const { user, settings } = useAuth() const { getAuthUser } = useAuthApi() const { updateUser } = useUserApi() + const { enqueueError } = useGeneralApi() const { handleSubmit, setError, reset, formState, ...methods } = useForm({ reValidateMode: 'onSubmit', @@ -67,23 +70,22 @@ const Settings = () => { resolver: yupResolver(FORM_SCHEMA) }) - React.useEffect(() => { - // set user settings values + useEffect(() => { reset( FORM_SCHEMA.cast(settings), { isSubmitted: false, error: false } ) }, [settings]) - const onSubmit = dataForm => { - const inputs = mapUserInputs(dataForm) + const onSubmit = async dataForm => { + try { + const inputs = mapUserInputs(dataForm) + const template = Helper.jsonToXml({ FIREEDGE: inputs }) - const values = Object.entries(inputs) - .map(([key, value]) => `\n ${String(key).toUpperCase()} = "${value}"`) - .join(',') - - return updateUser({ id: user.ID, template: `FIREEDGE = [${values}]\n` }) - .then(getAuthUser) + await updateUser(user.ID, { template }).then(getAuthUser) + } catch { + enqueueError(Tr(T.SomethingWrong)) + } } return ( @@ -110,6 +112,7 @@ const Settings = () => { data-cy='settings-submit-button' label={Tr(T.Save)} onClick={handleSubmit} + disabled={!formState.isDirty} isSubmitting={formState.isSubmitting} />
diff --git a/src/fireedge/src/client/containers/TestApi/ResponseForm.js b/src/fireedge/src/client/containers/TestApi/ResponseForm.js index dce9ed48d2..13b1c5720e 100644 --- a/src/fireedge/src/client/containers/TestApi/ResponseForm.js +++ b/src/fireedge/src/client/containers/TestApi/ResponseForm.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import { string, func, shape, object } from 'prop-types' import { useForm, Controller } from 'react-hook-form' @@ -29,7 +29,7 @@ import { RestClient, requestConfig } from 'client/utils' * @param {string} props.command.name - Name of command * @param {('GET'|'POST'|'DELETE'|'PUT')} props.command.httpMethod - Http method * @param {object} props.command.params - Parameters for the action - * @returns {React.JSXElementConstructor} Form with command parameters + * @returns {JSXElementConstructor} Form with command parameters */ const ResponseForm = ({ handleChangeResponse, @@ -59,7 +59,7 @@ const ResponseForm = ({ - + + + diff --git a/src/fireedge/src/client/containers/Users/index.js b/src/fireedge/src/client/containers/Users/index.js index 7a023d0795..a8a0122921 100644 --- a/src/fireedge/src/client/containers/Users/index.js +++ b/src/fireedge/src/client/containers/Users/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { UsersTable } from 'client/components/Tables' function Users () { return ( @@ -30,7 +29,7 @@ function Users () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/VNetworkTemplates/index.js b/src/fireedge/src/client/containers/VNetworkTemplates/index.js index f5c84cc380..ff37fe7918 100644 --- a/src/fireedge/src/client/containers/VNetworkTemplates/index.js +++ b/src/fireedge/src/client/containers/VNetworkTemplates/index.js @@ -14,13 +14,12 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { VNetworkTemplatesTable } from 'client/components/Tables' -function VirtualMachines () { +function VNetworkTemplates () { return ( - + ) } -export default VirtualMachines +export default VNetworkTemplates diff --git a/src/fireedge/src/client/containers/VirtualMachines/index.js b/src/fireedge/src/client/containers/VirtualMachines/index.js index 8266be02ea..29d7d13438 100644 --- a/src/fireedge/src/client/containers/VirtualMachines/index.js +++ b/src/fireedge/src/client/containers/VirtualMachines/index.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useState } from 'react' import { Container, Box } from '@material-ui/core' @@ -23,7 +23,7 @@ import VmTabs from 'client/components/Tabs/Vm' import SplitPane from 'client/components/SplitPane' function VirtualMachines () { - const [selectedRows, onSelectedRowsChange] = React.useState([]) + const [selectedRows, onSelectedRowsChange] = useState([]) const getRowIds = () => JSON.stringify(selectedRows?.map(row => row.id).join(', '), null, 2) diff --git a/src/fireedge/src/client/containers/VirtualNetworks/index.js b/src/fireedge/src/client/containers/VirtualNetworks/index.js index 18e58671a8..a3c54e6ecd 100644 --- a/src/fireedge/src/client/containers/VirtualNetworks/index.js +++ b/src/fireedge/src/client/containers/VirtualNetworks/index.js @@ -14,13 +14,12 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { VNetworksTable } from 'client/components/Tables' -function VirtualMachines () { +function VirtualNetworks () { return ( - + ) } -export default VirtualMachines +export default VirtualNetworks diff --git a/src/fireedge/src/client/containers/VirtualRouters/index.js b/src/fireedge/src/client/containers/VirtualRouters/index.js index 1e452f87db..bc23647d48 100644 --- a/src/fireedge/src/client/containers/VirtualRouters/index.js +++ b/src/fireedge/src/client/containers/VirtualRouters/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { VRoutersTable } from 'client/components/Tables' function VirtualRouters () { return ( @@ -30,7 +29,7 @@ function VirtualRouters () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/VmTemplates/index.js b/src/fireedge/src/client/containers/VmTemplates/index.js index 16225e5356..0f53934a24 100644 --- a/src/fireedge/src/client/containers/VmTemplates/index.js +++ b/src/fireedge/src/client/containers/VmTemplates/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { VmTemplatesTable } from 'client/components/Tables' function VmTemplates () { return ( @@ -30,7 +29,7 @@ function VmTemplates () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/containers/Zones/index.js b/src/fireedge/src/client/containers/Zones/index.js index b30d5ac584..652cbc4b2e 100644 --- a/src/fireedge/src/client/containers/Zones/index.js +++ b/src/fireedge/src/client/containers/Zones/index.js @@ -14,11 +14,10 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import { Container, Box } from '@material-ui/core' -import * as Tables from 'client/components/Tables' +import { ZonesTable } from 'client/components/Tables' function Zones () { return ( @@ -30,7 +29,7 @@ function Zones () { flexDirection='column' component={Container} > - + ) } diff --git a/src/fireedge/src/client/dev/_app.js b/src/fireedge/src/client/dev/_app.js index 4da13d4b42..d53c7c379f 100644 --- a/src/fireedge/src/client/dev/_app.js +++ b/src/fireedge/src/client/dev/_app.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import SunstoneApp from 'client/apps/sunstone' import ProvisionApp from 'client/apps/provision' @@ -25,7 +25,7 @@ import { _APPS, APPS } from 'client/constants' * Render App by url: http:///fireedge/. * * @param {object} props - Props from server - * @returns {React.JSXElementConstructor} Returns App + * @returns {JSXElementConstructor} Returns App */ const DevelopmentApp = props => { let appName = '' diff --git a/src/fireedge/src/client/dev/index.js b/src/fireedge/src/client/dev/index.js index 384ca70db8..e7ba9075e9 100644 --- a/src/fireedge/src/client/dev/index.js +++ b/src/fireedge/src/client/dev/index.js @@ -13,22 +13,11 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' import { render } from 'react-dom' import { createStore } from 'client/store' -import rootReducer from 'client/store/reducers' import App from 'client/dev/_app' const { store } = createStore({ initState: window.REDUX_DATA }) render(, document.getElementById('root')) - -if (process.env.NODE_ENV === 'development' && module.hot) { - module.hot.accept('./_app', () => { - const SyncApp = require('./_app').default - render(, document.getElementById('root')) - }) - - module.hot.accept('../store/reducers', () => store.replaceReducer(rootReducer)) -} diff --git a/src/fireedge/src/client/features/Auth/actions.js b/src/fireedge/src/client/features/Auth/actions.js index 34e692462a..f780d5e27c 100644 --- a/src/fireedge/src/client/features/Auth/actions.js +++ b/src/fireedge/src/client/features/Auth/actions.js @@ -15,13 +15,17 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { createAction, createAsyncThunk } from '@reduxjs/toolkit' -import { FILTER_POOL, JWT_NAME, ONEADMIN_ID, T } from 'client/constants' + import { authService } from 'client/features/Auth/services' import { dismissSnackbar } from 'client/features/General/actions' + +import { RESOURCES } from 'client/features/One' import { getGroups } from 'client/features/One/group/actions' import { userService } from 'client/features/One/user/services' -import { removeStoreData, storage } from 'client/utils' + import { httpCodes } from 'server/utils/constants' +import { removeStoreData, storage } from 'client/utils' +import { FILTER_POOL, JWT_NAME, ONEADMIN_ID, T } from 'client/constants' export const login = createAsyncThunk( 'auth/login', @@ -56,14 +60,20 @@ export const getUser = createAsyncThunk( 'auth/user', async (_, { dispatch, getState }) => { try { - const user = await authService.getUser() - await dispatch(getGroups()) + const { auth = {}, one: { [RESOURCES.group]: groups } = {} } = getState() + const user = await authService.getUser() const isOneAdmin = user?.ID === ONEADMIN_ID const userSettings = user?.TEMPLATE?.FIREEDGE ?? {} + const userGroupIds = [user?.GROUPS?.ID].flat() + if (!groups.some(group => userGroupIds.includes(group?.ID))) { + await dispatch(getGroups()) + } + + // Merge user settings with the existing one const settings = { - ...getState().auth?.settings, + ...auth?.settings, ...Object.entries(userSettings).reduce((res, [key, value]) => ({ ...res, [String(key).toLowerCase()]: value }) , {}) @@ -103,9 +113,10 @@ export const changeGroup = createAsyncThunk( const { user } = getState().auth const data = { id: user?.ID, group } - await userService.changeGroup({ data }) + await userService.changeGroup(data) dispatch(changeFilter(FILTER_POOL.PRIMARY_GROUP_RESOURCES)) + return { user: { ...user, diff --git a/src/fireedge/src/client/features/Auth/actionsView.js b/src/fireedge/src/client/features/Auth/actionsView.js index 79bbf9e6bd..aa6797c9d5 100644 --- a/src/fireedge/src/client/features/Auth/actionsView.js +++ b/src/fireedge/src/client/features/Auth/actionsView.js @@ -27,7 +27,6 @@ export const getSunstoneViews = createAsyncThunk( async (_, { dispatch }) => { try { const views = await authService.getSunstoneViews() ?? {} - // const config = await authService.getSunstoneConfig() ?? {} return { views, @@ -39,6 +38,19 @@ export const getSunstoneViews = createAsyncThunk( } ) +export const getSunstoneConfig = createAsyncThunk( + 'sunstone/config', + async (_, { dispatch }) => { + try { + const config = await authService.getSunstoneConfig() ?? {} + + return { config } + } catch (error) { + status === httpCodes.unauthorized.id && dispatch(logout(T.SessionExpired)) + } + } +) + export const changeView = createAction( 'sunstone/change-view', view => ({ payload: { view } }) diff --git a/src/fireedge/src/client/features/Auth/hooks.js b/src/fireedge/src/client/features/Auth/hooks.js index b47ac138ea..c1399e6868 100644 --- a/src/fireedge/src/client/features/Auth/hooks.js +++ b/src/fireedge/src/client/features/Auth/hooks.js @@ -18,21 +18,22 @@ import { useCallback } from 'react' import { useDispatch, useSelector, shallowEqual } from 'react-redux' import { unwrapResult } from '@reduxjs/toolkit' +import { RESOURCES } from 'client/features/One' import * as actions from 'client/features/Auth/actions' import * as actionsView from 'client/features/Auth/actionsView' export const useAuth = () => { const auth = useSelector(state => state.auth, shallowEqual) - const groups = useSelector(state => state.one.groups, shallowEqual) + const groups = useSelector(state => state.one[RESOURCES.group], shallowEqual) - const { user, jwt, view, views } = auth + const { user, jwt, view, views, isLoginInProgress } = auth const userGroups = [user?.GROUPS?.ID] .flat() .map(id => groups.find(({ ID }) => ID === id)) .filter(Boolean) - const isLogged = !!jwt && !!userGroups?.length + const isLogged = !!jwt && !!userGroups?.length && !isLoginInProgress /** * Looking for resource view of user authenticated. @@ -67,6 +68,7 @@ export const useAuthApi = () => { logout: () => dispatch(actions.logout()), getSunstoneViews: () => unwrapDispatch(actionsView.getSunstoneViews()), + getSunstoneConfig: () => unwrapDispatch(actionsView.getSunstoneConfig()), changeView: data => dispatch(actionsView.changeView(data)) } } diff --git a/src/fireedge/src/client/features/Auth/index.js b/src/fireedge/src/client/features/Auth/index.js index 31309efcdb..05d439c04d 100644 --- a/src/fireedge/src/client/features/Auth/index.js +++ b/src/fireedge/src/client/features/Auth/index.js @@ -13,7 +13,4 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -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 index 9f13f34fd0..b1c66cfb27 100644 --- a/src/fireedge/src/client/features/Auth/services.js +++ b/src/fireedge/src/client/features/Auth/services.js @@ -63,7 +63,7 @@ export const authService = ({ * @throws Fails when response isn't code 200 */ getSunstoneConfig: async () => { - const res = await RestClient.request({ url: '/api/user/config' }) + const res = await RestClient.request({ url: '/api/sunstone/config' }) if (!res?.id || res?.id !== httpCodes.ok.id) throw res diff --git a/src/fireedge/src/client/features/Auth/slice.js b/src/fireedge/src/client/features/Auth/slice.js index 77027bacf7..7044adb985 100644 --- a/src/fireedge/src/client/features/Auth/slice.js +++ b/src/fireedge/src/client/features/Auth/slice.js @@ -16,7 +16,7 @@ import { createSlice } from '@reduxjs/toolkit' import { login, getUser, logout, changeFilter, changeGroup } from 'client/features/Auth/actions' -import { getSunstoneViews, changeView } from 'client/features/Auth/actionsView' +import { getSunstoneViews, getSunstoneConfig, changeView } from 'client/features/Auth/actionsView' import { JWT_NAME, FILTER_POOL, DEFAULT_SCHEME, DEFAULT_LANGUAGE } from 'client/constants' import { isBackend } from 'client/utils' @@ -56,6 +56,7 @@ const { actions, reducer } = createSlice({ changeGroup.fulfilled.type, // sunstone views getSunstoneViews.fulfilled.type, + getSunstoneConfig.fulfilled.type, changeView.type ].includes(type) }, diff --git a/src/fireedge/src/client/features/One/user/hooks.js b/src/fireedge/src/client/features/One/user/hooks.js index ae0b2b8b16..21f112d039 100644 --- a/src/fireedge/src/client/features/One/user/hooks.js +++ b/src/fireedge/src/client/features/One/user/hooks.js @@ -34,9 +34,9 @@ export const useUserApi = () => { ) return { - changeGroup: data => unwrapDispatch(actions.changeGroup({ data })), getUser: id => unwrapDispatch(actions.getUser({ id })), getUsers: () => unwrapDispatch(actions.getUsers()), - updateUser: data => unwrapDispatch(actions.updateUser({ data })) + changeGroup: data => unwrapDispatch(actions.changeGroup(data)), + updateUser: (id, data) => unwrapDispatch(actions.updateUser({ id, ...data })) } } diff --git a/src/fireedge/src/client/features/One/user/services.js b/src/fireedge/src/client/features/One/user/services.js index 56fa142f2c..87e1e38a69 100644 --- a/src/fireedge/src/client/features/One/user/services.js +++ b/src/fireedge/src/client/features/One/user/services.js @@ -61,13 +61,13 @@ export const userService = ({ * * @param {object} params - Request parameters * @param {object} params.data - Form data - * @returns {object} Object of document updated + * @returns {number} User id * @throws Fails when response isn't code 200 */ - changeGroup: async ({ data }) => { + changeGroup: async params => { const name = Actions.USER_CHGRP const command = { name, ...Commands[name] } - const config = requestConfig(data, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -80,16 +80,21 @@ export const userService = ({ * Replaces the user template contents. * * @param {object} params - Request parameters - * @param {object} params.data - Form data - * @returns {object} Object of document updated + * @param {string|number} params.id - User id + * @param {string} params.template - The new user template contents + * @param {0|1} params.replace + * - Update type: + * ``0``: Replace the whole template. + * ``1``: Merge new template with the existing one. + * @returns {number} User id * @throws Fails when response isn't code 200 */ - updateUser: ({ data }) => { + updateUser: async params => { const name = Actions.USER_UPDATE const command = { name, ...Commands[name] } - const config = requestConfig(data, command) + const config = requestConfig(params, command) - const res = RestClient.request(config) + const res = await RestClient.request(config) if (!res?.id || res?.id !== httpCodes.ok.id) throw res diff --git a/src/fireedge/src/client/features/One/vm/actions.js b/src/fireedge/src/client/features/One/vm/actions.js index c0108f56a0..3e0ec28c5b 100644 --- a/src/fireedge/src/client/features/One/vm/actions.js +++ b/src/fireedge/src/client/features/One/vm/actions.js @@ -46,5 +46,18 @@ export const resize = createAction('vm/resize', vmService.resize) export const changePermissions = createAction('vm/chmod', vmService.changePermissions) export const changeOwnership = createAction('vm/chown', vmService.changeOwnership) export const attachDisk = createAction('vm/attach/disk', vmService.attachDisk) +export const detachDisk = createAction('vm/detach/disk', vmService.detachDisk) +export const saveAsDisk = createAction('vm/saveas/disk', vmService.saveAsDisk) +export const resizeDisk = createAction('vm/resize/disk', vmService.resizeDisk) +export const createDiskSnapshot = createAction('vm/create/disk-snapshot', vmService.createDiskSnapshot) +export const renameDiskSnapshot = createAction('vm/rename/disk-snapshot', vmService.renameDiskSnapshot) +export const revertDiskSnapshot = createAction('vm/revert/disk-snapshot', vmService.revertDiskSnapshot) +export const deleteDiskSnapshot = createAction('vm/delete/disk-snapshot', vmService.deleteDiskSnapshot) export const attachNic = createAction('vm/attach/nic', vmService.attachNic) export const detachNic = createAction('vm/detach/nic', vmService.detachNic) +export const createSnapshot = createAction('vm/create/snapshot', vmService.createSnapshot) +export const revertSnapshot = createAction('vm/revert/snapshot', vmService.revertSnapshot) +export const deleteSnapshot = createAction('vm/delete/snapshot', vmService.deleteSnapshot) +export const addScheduledAction = createAction('vm/add/scheduled-action', vmService.addScheduledAction) +export const updateScheduledAction = createAction('vm/update/scheduled-action', vmService.updateScheduledAction) +export const deleteScheduledAction = createAction('vm/delete/scheduled-action', vmService.deleteScheduledAction) diff --git a/src/fireedge/src/client/features/One/vm/hooks.js b/src/fireedge/src/client/features/One/vm/hooks.js index 42af70ab0d..a066554c56 100644 --- a/src/fireedge/src/client/features/One/vm/hooks.js +++ b/src/fireedge/src/client/features/One/vm/hooks.js @@ -45,7 +45,30 @@ export const useVmApi = () => { changeOwnership: (id, ownership) => unwrapDispatch(actions.changeOwnership({ id, ownership })), attachDisk: (id, template) => unwrapDispatch(actions.attachDisk({ id, template })), + detachDisk: (id, disk) => unwrapDispatch(actions.detachDisk({ id, disk })), + saveAsDisk: (id, data) => unwrapDispatch(actions.saveAsDisk({ id, ...data })), + resizeDisk: (id, data) => unwrapDispatch(actions.resizeDisk({ id, ...data })), + createDiskSnapshot: (id, data) => + unwrapDispatch(actions.createDiskSnapshot({ id, ...data })), + renameDiskSnapshot: (id, data) => + unwrapDispatch(actions.renameDiskSnapshot({ id, ...data })), + revertDiskSnapshot: (id, data) => + unwrapDispatch(actions.revertDiskSnapshot({ id, ...data })), + deleteDiskSnapshot: (id, data) => + unwrapDispatch(actions.deleteDiskSnapshot({ id, ...data })), attachNic: (id, template) => unwrapDispatch(actions.attachNic({ id, template })), - detachNic: (id, nic) => unwrapDispatch(actions.detachNic({ id, nic })) + detachNic: (id, nic) => unwrapDispatch(actions.detachNic({ id, nic })), + createSnapshot: (id, data) => + unwrapDispatch(actions.createSnapshot({ id, ...data })), + revertSnapshot: (id, snapshot) => + unwrapDispatch(actions.revertSnapshot({ id, snapshot })), + deleteSnapshot: (id, snapshot) => + unwrapDispatch(actions.deleteSnapshot({ id, snapshot })), + addScheduledAction: (id, data) => + unwrapDispatch(actions.addScheduledAction({ id, ...data })), + updateScheduledAction: (id, data) => + unwrapDispatch(actions.updateScheduledAction({ id, ...data })), + deleteScheduledAction: (id, data) => + unwrapDispatch(actions.deleteScheduledAction({ id, ...data })) } } diff --git a/src/fireedge/src/client/features/One/vm/services.js b/src/fireedge/src/client/features/One/vm/services.js index 632dcab107..8bb9f584fd 100644 --- a/src/fireedge/src/client/features/One/vm/services.js +++ b/src/fireedge/src/client/features/One/vm/services.js @@ -21,15 +21,15 @@ export const vmService = ({ /** * Retrieves information for the virtual machine. * - * @param {object} data - Request parameters - * @param {string} data.id - User id + * @param {object} params - Request parameters + * @param {string} params.id - User id * @returns {object} Get user identified by id * @throws Fails when response isn't code 200 */ - getVm: async ({ id }) => { + getVm: async params => { const name = Actions.VM_INFO const command = { name, ...Commands[name] } - const config = requestConfig({ id }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -42,18 +42,18 @@ export const vmService = ({ * Retrieves information for all or part of * the VMs in the pool. * - * @param {object} data - Request params - * @param {string} data.filter - Filter flag - * @param {number} data.start - Range start ID - * @param {number} data.end - Range end ID - * @param {string|number} data.state - Filter state + * @param {object} params - Request parameters + * @param {string} params.filter - Filter flag + * @param {number} params.start - Range start ID + * @param {number} params.end - Range end ID + * @param {string|number} params.state - Filter state * @returns {Array} List of VMs * @throws Fails when response isn't code 200 */ - getVms: async ({ filter, start, end, state }) => { + getVms: async params => { const name = Actions.VM_POOL_INFO const command = { name, ...Commands[name] } - const config = requestConfig({ filter, start, end, state }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -87,10 +87,10 @@ export const vmService = ({ * @returns {Response} Response * @throws Fails when response isn't code 200 */ - actionVm: async ({ id, action }) => { + actionVm: async params => { const name = Actions.VM_ACTION const command = { name, ...Commands[name] } - const config = requestConfig({ id, action }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -108,10 +108,10 @@ export const vmService = ({ * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - rename: async ({ id, name: newName }) => { + rename: async params => { const name = Actions.VM_RENAME const command = { name, ...Commands[name] } - const config = requestConfig({ id, name: newName }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -131,10 +131,10 @@ export const vmService = ({ * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - resize: async ({ id, template, enforce }) => { + resize: async params => { const name = Actions.VM_RESIZE const command = { name, ...Commands[name] } - const config = requestConfig({ id, template, enforce }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -148,18 +148,18 @@ export const vmService = ({ * * @param {object} params - Request parameters * @param {string|number} params.id - Virtual machine id - * @param {string} params.template - The new user template contents. - * @param {0|1} params.replace - - * Update type: + * @param {string} params.template - The new user template contents + * @param {0|1} params.replace + * - Update type: * ``0``: Replace the whole template. * ``1``: Merge new template with the existing one. * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - updateUserTemplate: async ({ id, template, replace }) => { + updateUserTemplate: async params => { const name = Actions.VM_UPDATE const command = { name, ...Commands[name] } - const config = requestConfig({ id, template, replace }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -230,10 +230,169 @@ export const vmService = ({ * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - attachDisk: async ({ id, template }) => { + attachDisk: async params => { const name = Actions.VM_DISK_ATTACH const command = { name, ...Commands[name] } - const config = requestConfig({ id, template }, command) + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Detaches a disk from a virtual machine. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + detachDisk: async params => { + const name = Actions.VM_DISK_DETACH + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Sets the disk to be saved in the given image. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string} params.name - Name for the new Image + * @param {string} params.type - Type for the new Image. + * If it is an empty string, then the default one will be used + * @param {string|number} params.snapshot - Id of the snapshot to export. + * If -1 the current image state will be used. + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + saveAsDisk: async params => { + const name = Actions.VM_DISK_SAVEAS + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Resizes a disk of a virtual machine. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string} params.size - The new size string + * - Options to perform action + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + resizeDisk: async params => { + const name = Actions.VM_DISK_RESIZE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Takes a new snapshot of the disk image. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string} params.description - Description for the snapshot + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + createDiskSnapshot: async params => { + const name = Actions.VM_DISK_SNAP_CREATE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Renames a disk snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string|number} params.snapshot - Snapshot id + * @param {string} params.name - New snapshot name + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + renameDiskSnapshot: async params => { + const name = Actions.VM_DISK_SNAP_RENAME + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Reverts disk state to a previously taken snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string|number} params.snapshot - Snapshot id + * @returns {number} The snapshot id used + * @throws Fails when response isn't code 200 + */ + revertDiskSnapshot: async params => { + const name = Actions.VM_DISK_SNAP_REVERT + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Deletes a disk snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.disk - Disk id + * @param {string|number} params.snapshot - Snapshot id + * @returns {number} The id of the snapshot deleted + * @throws Fails when response isn't code 200 + */ + deleteDiskSnapshot: async params => { + const name = Actions.VM_DISK_SNAP_DELETE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -252,10 +411,10 @@ export const vmService = ({ * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - attachNic: async ({ id, template }) => { + attachNic: async params => { const name = Actions.VM_NIC_ATTACH const command = { name, ...Commands[name] } - const config = requestConfig({ id, template }, command) + const config = requestConfig(params, command) const res = await RestClient.request(config) @@ -273,10 +432,137 @@ export const vmService = ({ * @returns {number} Virtual machine id * @throws Fails when response isn't code 200 */ - detachNic: async ({ id, nic }) => { + detachNic: async params => { const name = Actions.VM_NIC_DETACH const command = { name, ...Commands[name] } - const config = requestConfig({ id, nic }, command) + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Creates a new virtual machine snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string} params.name - The new snapshot name + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + createSnapshot: async params => { + const name = Actions.VM_SNAP_CREATE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Reverts a virtual machine to a snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.snapshot - The snapshot id + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + revertSnapshot: async params => { + const name = Actions.VM_SNAP_REVERT + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Deletes a virtual machine snapshot. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string|number} params.snapshot - The snapshot id + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + deleteSnapshot: async params => { + const name = Actions.VM_SNAP_DELETE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Add scheduled action to VM. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string} params.template - Template containing the new scheduled action + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + addScheduledAction: async params => { + const name = Actions.VM_SCHED_ADD + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Update scheduled VM action. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string} params.id_sched - The ID of the scheduled action + * @param {string} params.template - Template containing the updated scheduled action + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + updateScheduledAction: async params => { + const name = Actions.VM_SCHED_UPDATE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) + + const res = await RestClient.request(config) + + if (!res?.id || res?.id !== httpCodes.ok.id) throw res?.data + + return res?.data + }, + + /** + * Delete scheduled action from VM. + * + * @param {object} params - Request parameters + * @param {string|number} params.id - Virtual machine id + * @param {string} params.id_sched - The ID of the scheduled action + * @returns {number} Virtual machine id + * @throws Fails when response isn't code 200 + */ + deleteScheduledAction: async params => { + const name = Actions.VM_SCHED_DELETE + const command = { name, ...Commands[name] } + const config = requestConfig(params, command) const res = await RestClient.request(config) diff --git a/src/fireedge/src/client/models/Helper.js b/src/fireedge/src/client/models/Helper.js index 7884b012f7..0736279e8b 100644 --- a/src/fireedge/src/client/models/Helper.js +++ b/src/fireedge/src/client/models/Helper.js @@ -64,6 +64,24 @@ export const timeToString = time => export const timeFromMilliseconds = time => DateTime.fromMillis(+time * 1000) +/** + * Returns the epoch milliseconds of the date. + * + * @param {number|string} date - Date + * @returns {number} - Total milliseconds. + */ +export const dateToMilliseconds = date => + DateTime.fromJSDate(date).toMillis() / 1000 + +/** + * Returns the epoch milliseconds of the date. + * + * @param {number|string} date - Date + * @returns {number} - Total milliseconds. + */ +export const isoDateToMilliseconds = date => + DateTime.fromISO(date).toMillis() / 1000 + /** * Get the diff from two times and it converts them * into string with format: ``dd hh mm ss``. diff --git a/src/fireedge/src/client/models/VirtualMachine.js b/src/fireedge/src/client/models/VirtualMachine.js index 27a7f99db1..b91f020334 100644 --- a/src/fireedge/src/client/models/VirtualMachine.js +++ b/src/fireedge/src/client/models/VirtualMachine.js @@ -96,10 +96,34 @@ export const getState = vm => { * @returns {Array} List of disks from resource */ export const getDisks = vm => { - const { TEMPLATE = {}, MONITORING = {} } = vm ?? {} + const { TEMPLATE = {}, MONITORING = {}, SNAPSHOTS = {} } = vm ?? {} + const diskSnapshots = [SNAPSHOTS].flat().filter(Boolean) const { DISK, CONTEXT } = TEMPLATE - const { DISK_SIZE = [] } = MONITORING + const monitoringDiskSize = [MONITORING?.DISK_SIZE].flat().filter(Boolean) + const monitoringSnapshotSize = [MONITORING?.SNAPSHOT_SIZE].flat().filter(Boolean) + + const addExtraData = disk => { + const diskSnapshot = diskSnapshots + .find(({ DISK_ID }) => DISK_ID === disk.DISK_ID)?.SNAPSHOT || [] + + const snapshotsWithMonitoringData = [diskSnapshot] + .flat() + .map(snapshot => ({ + ...snapshot, + MONITOR_SIZE: monitoringSnapshotSize + .find(({ DISK_ID }) => DISK_ID === disk.DISK_ID)?.SIZE || '-' + })) + + const diskSizeFromMonitoring = monitoringDiskSize + .find(({ ID }) => ID === disk.DISK_ID)?.SIZE || '-' + + return { + ...disk, + SNAPSHOTS: snapshotsWithMonitoringData, + MONITOR_SIZE: diskSizeFromMonitoring + } + } const contextDisk = CONTEXT && !isVCenter(vm) && { ...CONTEXT, @@ -112,18 +136,10 @@ export const getDisks = vm => { SAVE_AS: '-' } - const addMonitoringData = disk => ({ - ...disk, - // get monitoring data - MONITOR_SIZE: [DISK_SIZE ?? []] - ?.flat() - ?.find(({ ID }) => ID === disk.DISK_ID)?.SIZE || '-' - }) - return [DISK, contextDisk] .flat() .filter(Boolean) - .map(addMonitoringData) + .map(addExtraData) } /** diff --git a/src/fireedge/src/client/providers/muiProvider.js b/src/fireedge/src/client/providers/muiProvider.js index e747136beb..1bc2b3235c 100644 --- a/src/fireedge/src/client/providers/muiProvider.js +++ b/src/fireedge/src/client/providers/muiProvider.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { CssBaseline, ThemeProvider, StylesProvider, useMediaQuery } from '@material-ui/core' @@ -35,16 +35,16 @@ const MuiProvider = ({ theme: appTheme, children }) => { return createTheme(appTheme(newScheme)) } - const [muitheme, setTheme] = React.useState(changeScheme) + const [muitheme, setTheme] = useState(changeScheme) - React.useEffect(() => { + useEffect(() => { const jssStyles = document.querySelector('#jss-server-side') if (jssStyles) { jssStyles.parentElement.removeChild(jssStyles) } }, []) - React.useEffect(() => { + useEffect(() => { setTheme(changeScheme) }, [scheme, prefersDarkMode]) diff --git a/src/fireedge/src/client/providers/notistackProvider.js b/src/fireedge/src/client/providers/notistackProvider.js index 8adb137b38..119292c435 100644 --- a/src/fireedge/src/client/providers/notistackProvider.js +++ b/src/fireedge/src/client/providers/notistackProvider.js @@ -14,7 +14,6 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' import PropTypes from 'prop-types' import { SnackbarProvider } from 'notistack' diff --git a/src/fireedge/src/client/providers/socketProvider.js b/src/fireedge/src/client/providers/socketProvider.js index e04be583ac..7dd6dd5f22 100644 --- a/src/fireedge/src/client/providers/socketProvider.js +++ b/src/fireedge/src/client/providers/socketProvider.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import React, { createContext, useEffect, useState } from 'react' +import { createContext, useEffect, useState } from 'react' import PropTypes from 'prop-types' import socketIO from 'socket.io-client' diff --git a/src/fireedge/src/client/provision.js b/src/fireedge/src/client/provision.js index 92ca85b62c..fffad58c19 100644 --- a/src/fireedge/src/client/provision.js +++ b/src/fireedge/src/client/provision.js @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' import { hydrate, render } from 'react-dom' import { createStore } from 'client/store' diff --git a/src/fireedge/src/client/router/index.js b/src/fireedge/src/client/router/index.js index b61b9abe97..1fc6c89b23 100644 --- a/src/fireedge/src/client/router/index.js +++ b/src/fireedge/src/client/router/index.js @@ -13,8 +13,7 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import * as React from 'react' +import { JSXElementConstructor } from 'react' import PropTypes from 'prop-types' import { Redirect, Route, Switch } from 'react-router-dom' @@ -37,6 +36,13 @@ const renderRoute = ({ Component, ...rest }, index) => ( ) +/** + * @param {object} props - Props + * @param {string} props.redirectWhenAuth + * - Pathname to redirect when user isn authenticated + * @param {object[]} props.endpoints - App endpoints + * @returns {JSXElementConstructor} Router + */ const Router = ({ redirectWhenAuth, endpoints }) => ( diff --git a/src/fireedge/src/client/store/reducers.js b/src/fireedge/src/client/store/reducers.js index 5df0acb4c2..abddfb8e1e 100644 --- a/src/fireedge/src/client/store/reducers.js +++ b/src/fireedge/src/client/store/reducers.js @@ -14,9 +14,9 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ const { combineReducers } = require('redux') -const General = require('client/features/General') -const Auth = require('client/features/Auth') -const One = require('client/features/One') +const Auth = require('client/features/Auth/slice') +const General = require('client/features/General/slice') +const One = require('client/features/One/slice') const rootReducer = combineReducers({ general: General.reducer, diff --git a/src/fireedge/src/client/sunstone.js b/src/fireedge/src/client/sunstone.js index 590a6df47b..771f40ed9c 100644 --- a/src/fireedge/src/client/sunstone.js +++ b/src/fireedge/src/client/sunstone.js @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import * as React from 'react' import { hydrate, render } from 'react-dom' import { createStore } from 'client/store' diff --git a/src/fireedge/src/client/theme/index.js b/src/fireedge/src/client/theme/index.js index 14075085ba..8f1b83655d 100644 --- a/src/fireedge/src/client/theme/index.js +++ b/src/fireedge/src/client/theme/index.js @@ -15,7 +15,7 @@ * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ import { - createMuiTheme, + createTheme as createMuiTheme, responsiveFontSizes, createGenerateClassName } from '@material-ui/core' diff --git a/src/fireedge/src/client/utils/helpers.js b/src/fireedge/src/client/utils/helpers.js index e3d4c474f5..6271ae4600 100644 --- a/src/fireedge/src/client/utils/helpers.js +++ b/src/fireedge/src/client/utils/helpers.js @@ -96,7 +96,19 @@ export const addOpacityToColor = (color, opacity) => { * @returns {string} The word capitalized */ export const capitalize = ([firstLetter, ...restOfWord]) => - firstLetter.toUpperCase() + restOfWord.join('') + firstLetter.toUpperCase() + restOfWord.map(s => s.toLowerCase()).join('') + +/** + * Clear an string of special characters. + * + * @param {string} s - String + * @example permissions_panel => 'permissions panel' + * @returns {string} String with clear format + */ +export const clearString = s => s.replace( + /([-_][a-z])/ig, + $1 => $1.toUpperCase().replace(/[-_]/g, ' ') +) /** * Converts an string to camel case. diff --git a/src/fireedge/src/server/index.js b/src/fireedge/src/server/index.js index 71a9761eb5..f8bfc926e2 100644 --- a/src/fireedge/src/server/index.js +++ b/src/fireedge/src/server/index.js @@ -68,25 +68,24 @@ const port = appConfig.port || defaultPort if (env && env.NODE_ENV && env.NODE_ENV === defaultWebpackMode) { try { - // eslint-disable-next-line import/no-extraneous-dependencies - const webpackHotMiddleware = require('webpack-hot-middleware') - // eslint-disable-next-line import/no-extraneous-dependencies - const webpackDevMiddleware = require('webpack-dev-middleware') const webpackConfig = require('../../webpack.config.dev.client') const compiler = webpack(webpackConfig) - app.use(webpackDevMiddleware(compiler, { - serverSideRender: true, - publicPath: webpackConfig.output.publicPath, - stats: { - assets: false, - colors: true, - version: false, - hash: false, - timings: false, - chunks: false, - chunkModules: false - } - })).use(webpackHotMiddleware(compiler)) + + app.use( + // eslint-disable-next-line import/no-extraneous-dependencies + require('webpack-dev-middleware')(compiler, { + publicPath: webpackConfig.output.publicPath + }) + ) + + app.use( + // eslint-disable-next-line import/no-extraneous-dependencies + require('webpack-hot-middleware')(compiler, { + log: false, + path: '/__webpack_hmr', + heartbeat: 10 * 1000 + }) + ) } catch (error) { if (error) { messageTerminal({ diff --git a/src/fireedge/src/server/routes/entrypoints/App.js b/src/fireedge/src/server/routes/entrypoints/App.js index 3dde78010c..27c8812722 100644 --- a/src/fireedge/src/server/routes/entrypoints/App.js +++ b/src/fireedge/src/server/routes/entrypoints/App.js @@ -13,8 +13,6 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ - -const React = require('react') const { Router } = require('express') const { env } = require('process') const { renderToString } = require('react-dom/server') diff --git a/src/fireedge/src/server/routes/websockets/hooks/index.js b/src/fireedge/src/server/routes/websockets/hooks/index.js index ca830a5576..502612ee60 100644 --- a/src/fireedge/src/server/routes/websockets/hooks/index.js +++ b/src/fireedge/src/server/routes/websockets/hooks/index.js @@ -17,13 +17,13 @@ const atob = require('atob') const { socket: socketZeroMQ } = require('zeromq') const { messageTerminal } = require('server/utils/general') +const { xml2json } = require('server/utils/opennebula') const { middlewareValidateAuthWebsocket, middlewareValidateResourceForHookConnection, getResourceDataForRequest, getDataZone, - getQueryData, - xml2json + getQueryData } = require('server/utils/server') /** diff --git a/src/fireedge/src/server/utils/constants/commands/user.js b/src/fireedge/src/server/utils/constants/commands/user.js index 6397a50517..e627374add 100644 --- a/src/fireedge/src/server/utils/constants/commands/user.js +++ b/src/fireedge/src/server/utils/constants/commands/user.js @@ -134,7 +134,7 @@ module.exports = { from: postBody, default: '' }, - update: { + replace: { from: postBody, default: 1 } diff --git a/src/fireedge/src/server/utils/constants/commands/vm.js b/src/fireedge/src/server/utils/constants/commands/vm.js index bfa2dc1e6f..01a1db5e7c 100644 --- a/src/fireedge/src/server/utils/constants/commands/vm.js +++ b/src/fireedge/src/server/utils/constants/commands/vm.js @@ -218,7 +218,7 @@ module.exports = { from: postBody, default: 0 }, - description: { + name: { from: postBody, default: '' } diff --git a/src/fireedge/webpack.config.dev.client.js b/src/fireedge/webpack.config.dev.client.js index a387e9b650..6718e277f9 100644 --- a/src/fireedge/webpack.config.dev.client.js +++ b/src/fireedge/webpack.config.dev.client.js @@ -14,58 +14,72 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ -const path = require('path') -const webpack = require('webpack') -const TimeFixPlugin = require('time-fix-plugin') -const { defaultWebpackMode, defaultAppName } = require('./src/server/utils/constants/defaults') +const getDevConfiguration = () => { + try { + const path = require('path') + const webpack = require('webpack') + const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin') + const TimeFixPlugin = require('time-fix-plugin') -const appName = defaultAppName ? `/${defaultAppName}` : '' + const { defaultWebpackMode, defaultAppName } = require('./src/server/utils/constants/defaults') -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: [ + const appName = defaultAppName ? `/${defaultAppName}` : '' + + /** @type {webpack.Configuration} */ + return { + 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: [ { - loader: 'babel-loader', - options: { - babelrc: true, - plugins: ['react-hot-loader/babel'] - } + test: /\.js$/, + include: path.resolve(__dirname, 'src/client'), + use: [ + { + loader: 'babel-loader', + options: { + babelrc: true, + plugins: ['react-refresh/babel'] + } + } + ] } ] - } - ] - }, - resolve: { - extensions: ['.js'], - alias: { - process: 'process/browser' + }, + resolve: { + extensions: ['.js'], + alias: { + process: 'process/browser' + } + }, + plugins: [ + new TimeFixPlugin(), + new webpack.HotModuleReplacementPlugin(), + ReactRefreshPlugin && new ReactRefreshPlugin({ + overlay: { + sockIntegration: 'whm' + } + }), + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: JSON.stringify(defaultWebpackMode) + } + }), + new webpack.ProvidePlugin({ + process: 'process/browser' + }) + ], + devtool: 'inline-source-map' } - }, - plugins: [ - new TimeFixPlugin(), - new webpack.HotModuleReplacementPlugin(), - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: JSON.stringify(defaultWebpackMode) - } - }), - new webpack.ProvidePlugin({ - process: 'process/browser' - }) - ], - devtool: 'inline-source-map' + } catch (e) { console.log('Error in webpack dev configuration: ', e) } } + +module.exports = getDevConfiguration()