From a41261374d0e69b71825f85cdb3f3ac7ce9bfdc2 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Fri, 17 Dec 2021 15:20:44 +0100 Subject: [PATCH] F #5637: Refactor scheduled actions (#1675) (cherry picked from commit 00dcdba88e64724f971d65a70393653f4655e9c2) --- src/fireedge/package-lock.json | 1298 +++++++++-------- .../components/Buttons/ScheduleAction.js | 216 +++ .../Vm/AttachDiskForm => Buttons}/index.js | 4 +- .../components/Cards/ScheduleActionCard.js | 125 ++ .../src/client/components/Cards/index.js | 2 + .../client/components/Dialogs/DialogForm.js | 25 +- .../FormControl/SelectController.js | 12 +- .../components/FormControl/TextController.js | 2 +- .../components/Forms/ButtonToTriggerForm.js | 67 +- .../Forms/Vm/CreateCharterForm/index.js | 111 ++ .../Forms/Vm/CreateCharterForm/schema.js | 101 ++ .../Vm/CreateSchedActionForm/CommonSchema.js | 170 --- .../PunctualForm/index.js | 52 - .../PunctualForm/schema.js | 266 ---- .../RelativeForm/index.js | 35 - .../RelativeForm/schema.js | 102 -- .../Forms/Vm/CreateSchedActionForm/fields.js | 474 ++++++ .../Forms/Vm/CreateSchedActionForm/index.js | 56 +- .../Forms/Vm/CreateSchedActionForm/schema.js | 117 ++ .../src/client/components/Forms/Vm/index.js | 167 ++- .../ExtraConfiguration/scheduleAction.js | 123 +- .../client/components/Tabs/Vm/SchedActions.js | 178 +++ .../Tabs/Vm/SchedActions/Actions.js | 239 --- .../components/Tabs/Vm/SchedActions/Item.js | 103 -- .../components/Tabs/Vm/SchedActions/List.js | 36 - .../components/Tabs/Vm/SchedActions/index.js | 69 - .../src/client/components/Timer/index.js | 96 ++ .../src/client/constants/translates.js | 23 + src/fireedge/src/client/constants/vm.js | 17 + src/fireedge/src/client/models/Helper.js | 23 +- src/fireedge/src/client/models/Scheduler.js | 286 ++++ .../src/client/models/VirtualMachine.js | 45 +- src/fireedge/src/client/utils/schema.js | 16 +- 33 files changed, 2754 insertions(+), 1902 deletions(-) create mode 100644 src/fireedge/src/client/components/Buttons/ScheduleAction.js rename src/fireedge/src/client/components/{Forms/Vm/AttachDiskForm => Buttons}/index.js (85%) create mode 100644 src/fireedge/src/client/components/Cards/ScheduleActionCard.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/index.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/schema.js delete mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js delete mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js delete mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js delete mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js delete mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/fields.js create mode 100644 src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/schema.js create mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions.js delete mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js delete mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js delete mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js delete mode 100644 src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js create mode 100644 src/fireedge/src/client/components/Timer/index.js create mode 100644 src/fireedge/src/client/models/Scheduler.js diff --git a/src/fireedge/package-lock.json b/src/fireedge/package-lock.json index 093a650c16..b9d163ab9f 100644 --- a/src/fireedge/package-lock.json +++ b/src/fireedge/package-lock.json @@ -221,9 +221,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dependencies": { "@babel/types": "^7.16.0", "jsesc": "^2.5.1", @@ -245,9 +245,9 @@ } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.0.tgz", - "integrity": "sha512-9KuleLT0e77wFUku6TUkqZzCEymBdtuQQ27MhEKzf9UOOJu3cYj98kyaDAzxpC7lV6DGiZFuC8XqDsq8/Kl6aQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.5.tgz", + "integrity": "sha512-3JEA9G5dmmnIWdzaT9d0NmFRgYnWUThLsDaL7982H0XqqWr56lRrsmwheXFMjR+TMl7QMBb6mzy9kvgr1lRLUA==", "dependencies": { "@babel/helper-explode-assignable-expression": "^7.16.0", "@babel/types": "^7.16.0" @@ -274,15 +274,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz", - "integrity": "sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.5.tgz", + "integrity": "sha512-NEohnYA7mkB8L5JhU7BLwcBdU3j83IziR9aseMueWGeAjblbul3zzb8UvJ3a1zuBiqCMObzCJHFqKIQE6hTVmg==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0" }, "engines": { @@ -325,6 +326,17 @@ "@babel/core": "^7.4.0-0" } }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", + "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", + "dependencies": { + "@babel/types": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-explode-assignable-expression": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", @@ -372,9 +384,9 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.5.tgz", + "integrity": "sha512-7fecSXq7ZrLE+TWshbGT+HyCLkxloWNhTbU2QM1NTI/tDqyf0oZiMcEfYtDuUDCo528EOlt39G1rftea4bRZIw==", "dependencies": { "@babel/types": "^7.16.0" }, @@ -394,17 +406,17 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", + "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", "dependencies": { + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", "@babel/helper-simple-access": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", "@babel/helper-validator-identifier": "^7.15.7", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -423,20 +435,20 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", + "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz", - "integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.5.tgz", + "integrity": "sha512-X+aAJldyxrOmN9v3FKp+Hu1NO69VWgYgDGq6YDykwRPzxs5f2N+X988CBXS7EQahDU+Vpet5QYMqLk+nsp+Qxw==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-wrap-function": "^7.16.0", + "@babel/helper-wrap-function": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -444,13 +456,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.5.tgz", + "integrity": "sha512-ao3seGVa/FZCMCCNDuBcqnBFSbdr8N2EW35mzojx3TwfIbdPmNK+JV6+2d5bR0Z71W5ocLnQp9en/cTF7pBJiQ==", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -507,13 +520,13 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.0.tgz", - "integrity": "sha512-VVMGzYY3vkWgCJML+qVLvGIam902mJW0FvT7Avj1zEe0Gn7D93aWdLblYARTxEw+6DhZmtzhBM2zv0ekE5zg1g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.5.tgz", + "integrity": "sha512-2J2pmLBqUqVdJw78U0KPNdeE2qeuIyKoG4mKV7wAq3mc4jJG282UgjZw4ZYDnqiWQuS3Y3IYdF/AQ6CpyBV3VA==", "dependencies": { "@babel/helper-function-name": "^7.16.0", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -521,12 +534,12 @@ } }, "node_modules/@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", + "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", "dependencies": { "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -569,9 +582,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "bin": { "parser": "bin/babel-parser.js" }, @@ -596,11 +609,11 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz", - "integrity": "sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.5.tgz", + "integrity": "sha512-kzdHgnaXRonttiTfKYnSVafbWngPPr2qKw9BWYBESl91W54e+9R5pP70LtWxV56g0f05f/SQrwHYkfvbwcdQ/A==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, @@ -612,12 +625,12 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz", - "integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.5.tgz", + "integrity": "sha512-C/FX+3HNLV6sz7AqbTQqEo1L9/kfrKjxcVtgyBCmvIgOjvuBVUWooDoi7trsLxOzCEo5FccjRvKHkfDsJFZlfA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.4", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -643,12 +656,12 @@ } }, "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.0.tgz", - "integrity": "sha512-mAy3sdcY9sKAkf3lQbDiv3olOfiLqI51c9DR9b19uMoR2Z6r5pmGl7dfNFqEvqOyqbf1ta4lknK4gc5PJn3mfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.5.tgz", + "integrity": "sha512-EEFzuLZcm/rNJ8Q5krK+FRKdVkd6FjfzT9tuSZql9sQn64K0hHA2KLJ0DqVot9/iV6+SsuadC5yI39zWnm+nmQ==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -659,11 +672,11 @@ } }, "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.0.tgz", - "integrity": "sha512-QGSA6ExWk95jFQgwz5GQ2Dr95cf7eI7TKutIXXTb7B1gCLTCz5hTjFTQGfLFBBiC5WSNi7udNwWsqbbMh1c4yQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.5.tgz", + "integrity": "sha512-P05/SJZTTvHz79LNYTF8ff5xXge0kk5sIIWAypcWgX4BTRUgyHc8wRxJ/Hk+mU0KXldgOOslKaeqnhthcDJCJQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -674,11 +687,11 @@ } }, "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.0.tgz", - "integrity": "sha512-CjI4nxM/D+5wCnhD11MHB1AwRSAYeDT+h8gCdcVJZ/OK7+wRzFsf7PFPWVpVpNRkHMmMkQWAHpTq+15IXQ1diA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.5.tgz", + "integrity": "sha512-i+sltzEShH1vsVydvNaTRsgvq2vZsfyrd7K7vPLUU/KgS0D5yZMe6uipM0+izminnkKrEfdUnz7CxMRb6oHZWw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -689,11 +702,11 @@ } }, "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.0.tgz", - "integrity": "sha512-kouIPuiv8mSi5JkEhzApg5Gn6hFyKPnlkO0a9YSzqRurH8wYzSlf6RJdzluAsbqecdW5pBvDJDfyDIUR/vLxvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.5.tgz", + "integrity": "sha512-QQJueTFa0y9E4qHANqIvMsuxM/qcLQmKttBACtPCQzGUEizsXDACGonlPiSwynHfOa3vNw0FPMVvQzbuXwh4SQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -704,11 +717,11 @@ } }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.0.tgz", - "integrity": "sha512-pbW0fE30sVTYXXm9lpVQQ/Vc+iTeQKiXlaNRZPPN2A2VdlWyAtsUrsQ3xydSlDW00TFMK7a8m3cDTkBF5WnV3Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.5.tgz", + "integrity": "sha512-xqibl7ISO2vjuQM+MzR3rkd0zfNWltk7n9QhaD8ghMmMceVguYrNDt7MikRyj4J4v3QehpnrU8RYLnC7z/gZLA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -734,11 +747,11 @@ } }, "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.0.tgz", - "integrity": "sha512-FAhE2I6mjispy+vwwd6xWPyEx3NYFS13pikDBWUAFGZvq6POGs5eNchw8+1CYoEgBl9n11I3NkzD7ghn25PQ9Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.5.tgz", + "integrity": "sha512-DvB9l/TcsCRvsIV9v4jxR/jVP45cslTVC0PMVHvaJhhNuhn2Y1SOhCSFlPK777qLB5wb8rVDaNoqMTyOqtY5Iw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -767,11 +780,11 @@ } }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.0.tgz", - "integrity": "sha512-kicDo0A/5J0nrsCPbn89mTG3Bm4XgYi0CZtvex9Oyw7gGZE3HXGD0zpQNH+mo+tEfbo8wbmMvJftOwpmPy7aVw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.5.tgz", + "integrity": "sha512-ihCMxY1Iljmx4bWy/PIMJGXN4NS4oUj1MKynwO07kiKms23pNvIn1DMB92DNB2R0EA882sw0VXIelYGdtF7xEQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -798,12 +811,12 @@ } }, "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.0.tgz", - "integrity": "sha512-IvHmcTHDFztQGnn6aWq4t12QaBXTKr1whF/dgp9kz84X6GUcwq9utj7z2wFCUfeOup/QKnOlt2k0zxkGFx9ubg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.5.tgz", + "integrity": "sha512-+yFMO4BGT3sgzXo+lrq7orX5mAZt57DwUK6seqII6AcJnJOIhBJ8pzKH47/ql/d426uQ7YhN8DpUFirQzqYSUA==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -813,13 +826,13 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.0.tgz", - "integrity": "sha512-3jQUr/HBbMVZmi72LpjQwlZ55i1queL8KcDTQEkAHihttJnAPrcvG9ZNXIfsd2ugpizZo595egYV6xy+pv4Ofw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.5.tgz", + "integrity": "sha512-+YGh5Wbw0NH3y/E5YMu6ci5qTDmAEVNoZ3I54aB6nVEOZ5BQ7QJlwKq5pYVucQilMByGn/bvX0af+uNaPRCabA==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -830,12 +843,12 @@ } }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.0.tgz", - "integrity": "sha512-ti7IdM54NXv29cA4+bNNKEMS4jLMCbJgl+Drv+FgYy0erJLAxNAIXcNjNjrRZEcWq0xJHsNVwQezskMFpF8N9g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.5.tgz", + "integrity": "sha512-s5sKtlKQyFSatt781HQwv1hoM5BQ9qRH30r+dK56OLDsHmV74mzwJNX7R1yMuE7VZKG5O6q/gmOGSAO6ikTudg==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=4" @@ -914,11 +927,11 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz", - "integrity": "sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.5.tgz", + "integrity": "sha512-42OGssv9NPk4QHKVgIHlzeLgPOW5rGgfV5jzG90AhcXXIv6hu/eqj63w4VgvRxdvZY3AlYeDgPiSJ3BqAd1Y6Q==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1022,11 +1035,11 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.0.tgz", - "integrity": "sha512-vIFb5250Rbh7roWARvCLvIJ/PtAU5Lhv7BtZ1u24COwpI9Ypjsh+bZcKk6rlIyalK+r0jOc1XQ8I4ovNxNrWrA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.5.tgz", + "integrity": "sha512-8bTHiiZyMOyfZFULjsCnYOWG059FVMes0iljEHSfARhNgFfpsqE92OrCffv3veSw9rwMkYcFe9bj0ZoXU2IGtQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1036,13 +1049,13 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.0.tgz", - "integrity": "sha512-PbIr7G9kR8tdH6g8Wouir5uVjklETk91GMVSUq+VaOgiinbCkBP6Q7NN/suM/QutZkMJMvcyAriogcYAdhg8Gw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.5.tgz", + "integrity": "sha512-TMXgfioJnkXU+XRoj7P2ED7rUm5jbnDWwlCuFVTpQboMfbSya5WrmubNBAMlk7KXvywpo8rd8WuYZkis1o2H8w==", "dependencies": { "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1052,11 +1065,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.0.tgz", - "integrity": "sha512-V14As3haUOP4ZWrLJ3VVx5rCnrYhMSHN/jX7z6FAt5hjRkLsb0snPCmJwSOML5oxkKO4FNoNv7V5hw/y2bjuvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.5.tgz", + "integrity": "sha512-BxmIyKLjUGksJ99+hJyL/HIxLIGnLKtw772zYDER7UuycDZ+Xvzs98ZQw6NGgM2ss4/hlFAaGiZmMNKvValEjw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1066,11 +1079,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.0.tgz", - "integrity": "sha512-27n3l67/R3UrXfizlvHGuTwsRIFyce3D/6a37GRxn28iyTPvNXaW4XvznexRh1zUNLPjbLL22Id0XQElV94ruw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.5.tgz", + "integrity": "sha512-JxjSPNZSiOtmxjX7PBRBeRJTUKTyJ607YUYeT0QJCNdsedOe+/rXITjP08eG8xUpsLfPirgzdCFN+h0w6RI+pQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1080,15 +1093,16 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.0.tgz", - "integrity": "sha512-HUxMvy6GtAdd+GKBNYDWCIA776byUQH8zjnfjxwT1P1ARv/wFu8eBDpmXQcLS/IwRtrxIReGiplOwMeyO7nsDQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.5.tgz", + "integrity": "sha512-DzJ1vYf/7TaCYy57J3SJ9rV+JEuvmlnvvyvYKFbk5u46oQbBvuB9/0w+YsVsxkOv8zVWKpDmUoj4T5ILHoXevA==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0", "globals": "^11.1.0" }, @@ -1100,11 +1114,11 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.0.tgz", - "integrity": "sha512-63l1dRXday6S8V3WFY5mXJwcRAnPYxvFfTlt67bwV1rTyVTM5zrp0DBBb13Kl7+ehkCVwIZPumPpFP/4u70+Tw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.5.tgz", + "integrity": "sha512-n1+O7xtU5lSLraRzX88CNcpl7vtGdPakKzww74bVwpAIRgz9JVLJJpOLb0uYqcOaXVM0TL6X0RVeIJGD2CnCkg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1114,11 +1128,11 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.0.tgz", - "integrity": "sha512-Q7tBUwjxLTsHEoqktemHBMtb3NYwyJPTJdM+wDwb0g8PZ3kQUIzNvwD5lPaqW/p54TXBc/MXZu9Jr7tbUEUM8Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.5.tgz", + "integrity": "sha512-GuRVAsjq+c9YPK6NeTkRLWyQskDC099XkBSVO+6QzbnOnH2d/4mBVXYStaPrZD3dFRfg00I6BFJ9Atsjfs8mlg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1128,12 +1142,12 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.0.tgz", - "integrity": "sha512-FXlDZfQeLILfJlC6I1qyEwcHK5UpRCFkaoVyA1nk9A1L1Yu583YO4un2KsLBsu3IJb4CUbctZks8tD9xPQubLw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.5.tgz", + "integrity": "sha512-iQiEMt8Q4/5aRGHpGVK2Zc7a6mx7qEAO7qehgSug3SDImnuMzgmm/wtJALXaz25zUj1PmnNHtShjFgk4PDx4nw==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1143,11 +1157,11 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.0.tgz", - "integrity": "sha512-LIe2kcHKAZOJDNxujvmp6z3mfN6V9lJxubU4fJIGoQCkKe3Ec2OcbdlYP+vW++4MpxwG0d1wSDOJtQW5kLnkZQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.5.tgz", + "integrity": "sha512-81tijpDg2a6I1Yhj4aWY1l3O1J4Cg/Pd7LfvuaH2VVInAkXtzibz9+zSPdUM1WvuUi128ksstAP0hM5w48vQgg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1157,12 +1171,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.0.tgz", - "integrity": "sha512-OwYEvzFI38hXklsrbNivzpO3fh87skzx8Pnqi4LoSYeav0xHlueSoCJrSgTPfnbyzopo5b3YVAJkFIcUpK2wsw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.5.tgz", + "integrity": "sha512-12rba2HwemQPa7BLIKCzm1pT2/RuQHtSFHdNl41cFiC6oi4tcrp7gjB07pxQvFpcADojQywSjblQth6gJyE6CA==", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1172,11 +1186,11 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.0.tgz", - "integrity": "sha512-5QKUw2kO+GVmKr2wMYSATCTTnHyscl6sxFRAY+rvN7h7WB0lcG0o4NoV6ZQU32OZGVsYUsfLGgPQpDFdkfjlJQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.5.tgz", + "integrity": "sha512-+DpCAJFPAvViR17PIMi9x2AE34dll5wNlXO43wagAX2YcRGgEVHCNFC4azG85b4YyyFarvkc/iD5NPrz4Oneqw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1186,12 +1200,12 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.0.tgz", - "integrity": "sha512-lBzMle9jcOXtSOXUpc7tvvTpENu/NuekNJVova5lCCWCV9/U1ho2HH2y0p6mBg8fPm/syEAbfaaemYGOHCY3mg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.5.tgz", + "integrity": "sha512-Fuec/KPSpVLbGo6z1RPw4EE1X+z9gZk1uQmnYy7v4xr4TO9p41v1AoUuXEtyqAI7H+xNJYSICzRqZBhDEkd3kQ==", "dependencies": { "@babel/helper-function-name": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1201,11 +1215,11 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.0.tgz", - "integrity": "sha512-gQDlsSF1iv9RU04clgXqRjrPyyoJMTclFt3K1cjLmTKikc0s/6vE3hlDeEVC71wLTRu72Fq7650kABrdTc2wMQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.5.tgz", + "integrity": "sha512-B1j9C/IfvshnPcklsc93AVLTrNVa69iSqztylZH6qnmiAsDDOmmjEYqOm3Ts2lGSgTSywnBNiqC949VdD0/gfw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1215,11 +1229,11 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.0.tgz", - "integrity": "sha512-WRpw5HL4Jhnxw8QARzRvwojp9MIE7Tdk3ez6vRyUk1MwgjJN0aNpRoXainLR5SgxmoXx/vsXGZ6OthP6t/RbUg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.5.tgz", + "integrity": "sha512-d57i3vPHWgIde/9Y8W/xSFUndhvhZN5Wu2TjRrN1MVz5KzdUihKnfDVlfP1U7mS5DNj/WHHhaE4/tTi4hIyHwQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1229,12 +1243,12 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.0.tgz", - "integrity": "sha512-rWFhWbCJ9Wdmzln1NmSCqn7P0RAD+ogXG/bd9Kg5c7PKWkJtkiXmYsMBeXjDlzHpVTJ4I/hnjs45zX4dEv81xw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.5.tgz", + "integrity": "sha512-oHI15S/hdJuSCfnwIz+4lm6wu/wBn7oJ8+QrkzPPwSFGXk8kgdI/AIKcbR/XnD1nQVMg/i6eNaXpszbGuwYDRQ==", "dependencies": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -1245,12 +1259,12 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz", - "integrity": "sha512-Dzi+NWqyEotgzk/sb7kgQPJQf7AJkQBWsVp1N6JWc1lBVo0vkElUnGdr1PzUBmfsCCN5OOFya3RtpeHk15oLKQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.5.tgz", + "integrity": "sha512-ABhUkxvoQyqhCWyb8xXtfwqNMJD7tx+irIRnUh6lmyFud7Jln1WzONXKlax1fg/ey178EXbs4bSGNd6PngO+SQ==", "dependencies": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-simple-access": "^7.16.0", "babel-plugin-dynamic-import-node": "^2.3.3" }, @@ -1262,13 +1276,13 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.0.tgz", - "integrity": "sha512-yuGBaHS3lF1m/5R+6fjIke64ii5luRUg97N2wr+z1sF0V+sNSXPxXDdEEL/iYLszsN5VKxVB1IPfEqhzVpiqvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.5.tgz", + "integrity": "sha512-53gmLdScNN28XpjEVIm7LbWnD/b/TpbwKbLk6KV4KqC9WyU6rq1jnNmVG6UgAdQZVVGZVoik3DqHNxk4/EvrjA==", "dependencies": { "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-validator-identifier": "^7.15.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, @@ -1280,12 +1294,12 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.0.tgz", - "integrity": "sha512-nx4f6no57himWiHhxDM5pjwhae5vLpTK2zCnDH8+wNLJy0TVER/LJRHl2bkt6w9Aad2sPD5iNNoUpY3X9sTGDg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.5.tgz", + "integrity": "sha512-qTFnpxHMoenNHkS3VoWRdwrcJ3FhX567GvDA3hRZKF0Dj8Fmg0UzySZp3AP2mShl/bzcywb/UWAMQIjA1bhXvw==", "dependencies": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1295,9 +1309,9 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.0.tgz", - "integrity": "sha512-LogN88uO+7EhxWc8WZuQ8vxdSyVGxhkh8WTC3tzlT8LccMuQdA81e9SGV6zY7kY2LjDhhDOFdQVxdGwPyBCnvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.5.tgz", + "integrity": "sha512-/wqGDgvFUeKELW6ex6QB7dLVRkd5ehjw34tpXu1nhKC0sFfmaLabIswnpf8JgDyV2NeDmZiwoOb0rAmxciNfjA==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.16.0" }, @@ -1309,11 +1323,11 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.0.tgz", - "integrity": "sha512-fhjrDEYv2DBsGN/P6rlqakwRwIp7rBGLPbrKxwh7oVt5NNkIhZVOY2GRV+ULLsQri1bDqwDWnU3vhlmx5B2aCw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.5.tgz", + "integrity": "sha512-ZaIrnXF08ZC8jnKR4/5g7YakGVL6go6V9ql6Jl3ecO8PQaQqFE74CuM384kezju7Z9nGCCA20BqZaR1tJ/WvHg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1323,12 +1337,12 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.0.tgz", - "integrity": "sha512-fds+puedQHn4cPLshoHcR1DTMN0q1V9ou0mUjm8whx9pGcNvDrVVrgw+KJzzCaiTdaYhldtrUps8DWVMgrSEyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.5.tgz", + "integrity": "sha512-tded+yZEXuxt9Jdtkc1RraW1zMF/GalVxaVVxh41IYwirdRgyAxxxCKZ9XB7LxZqmsjfjALxupNE1MIz9KH+Zg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1338,11 +1352,11 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.3.tgz", - "integrity": "sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.5.tgz", + "integrity": "sha512-B3O6AL5oPop1jAVg8CV+haeUte9oFuY85zu0jwnRNZZi3tVAbJriu5tag/oaO2kGaQM/7q7aGPBlTI5/sr9enA==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1352,11 +1366,11 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.0.tgz", - "integrity": "sha512-XLldD4V8+pOqX2hwfWhgwXzGdnDOThxaNTgqagOcpBgIxbUvpgU2FMvo5E1RyHbk756WYgdbS0T8y0Cj9FKkWQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.5.tgz", + "integrity": "sha512-+IRcVW71VdF9pEH/2R/Apab4a19LVvdVsr/gEeotH00vSDVlKD+XgfSIw+cgGWsjDB/ziqGv/pGoQZBIiQVXHg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1366,11 +1380,11 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.0.tgz", - "integrity": "sha512-FJFdJAqaCpndL+pIf0aeD/qlQwT7QXOvR6Cc8JPvNhKJBi2zc/DPc4g05Y3fbD/0iWAMQFGij4+Xw+4L/BMpTg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.5.tgz", + "integrity": "sha512-dHYCOnzSsXFz8UcdNQIHGvg94qPL/teF7CCiCEMRxmA1G2p5Mq4JnKVowCDxYfiQ9D7RstaAp9kwaSI+sXbnhw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1380,14 +1394,14 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz", - "integrity": "sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.5.tgz", + "integrity": "sha512-+arLIz1d7kmwX0fKxTxbnoeG85ONSnLpvdODa4P3pc1sS7CV1hfmtYWufkW/oYsPnkDrEeQFxhUWcFnrXW7jQQ==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.16.0", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/plugin-syntax-jsx": "^7.16.5", "@babel/types": "^7.16.0" }, "engines": { @@ -1398,11 +1412,11 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.0.tgz", - "integrity": "sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.5.tgz", + "integrity": "sha512-uQSLacMZSGLCxOw20dzo1dmLlKkd+DsayoV54q3MHXhbqgPzoiGerZQgNPl/Ro8/OcXV2ugfnkx+rxdS0sN5Uw==", "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.16.0" + "@babel/plugin-transform-react-jsx": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1412,12 +1426,12 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.0.tgz", - "integrity": "sha512-NC/Bj2MG+t8Ef5Pdpo34Ay74X4Rt804h5y81PwOpfPtmAK3i6CizmQqwyBQzIepz1Yt8wNr2Z2L7Lu3qBMfZMA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.5.tgz", + "integrity": "sha512-0nYU30hCxnCVCbRjSy9ahlhWZ2Sn6khbY4FqR91W+2RbSqkWEbVu2gXh45EqNy4Bq7sRU+H4i0/6YKwOSzh16A==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1427,9 +1441,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.0.tgz", - "integrity": "sha512-JAvGxgKuwS2PihiSFaDrp94XOzzTUeDeOQlcKzVAyaPap7BnZXK/lvMDiubkPTdotPKOIZq9xWXWnggUMYiExg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.5.tgz", + "integrity": "sha512-2z+it2eVWU8TtQQRauvGUqZwLy4+7rTfo6wO4npr+fvvN1SW30ZF3O/ZRCNmTuu4F5MIP8OJhXAhRV5QMJOuYg==", "dependencies": { "regenerator-transform": "^0.14.2" }, @@ -1441,11 +1455,11 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.0.tgz", - "integrity": "sha512-Dgs8NNCehHSvXdhEhln8u/TtJxfVwGYCgP2OOr5Z3Ar+B+zXicEOKNTyc+eca2cuEOMtjW6m9P9ijOt8QdqWkg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.5.tgz", + "integrity": "sha512-aIB16u8lNcf7drkhXJRoggOxSTUAuihTSTfAcpynowGJOZiGf+Yvi7RuTwFzVYSYPmWyARsPqUGoZWWWxLiknw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1455,11 +1469,11 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.0.tgz", - "integrity": "sha512-iVb1mTcD8fuhSv3k99+5tlXu5N0v8/DPm2mO3WACLG6al1CGZH7v09HJyUb1TtYl/Z+KrM6pHSIJdZxP5A+xow==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.5.tgz", + "integrity": "sha512-ZbuWVcY+MAXJuuW7qDoCwoxDUNClfZxoo7/4swVbOW1s/qYLOMHlm9YRWMsxMFuLs44eXsv4op1vAaBaBaDMVg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1469,11 +1483,11 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.0.tgz", - "integrity": "sha512-Ao4MSYRaLAQczZVp9/7E7QHsCuK92yHRrmVNRe/SlEJjhzivq0BSn8mEraimL8wizHZ3fuaHxKH0iwzI13GyGg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.5.tgz", + "integrity": "sha512-5d6l/cnG7Lw4tGHEoga4xSkYp1euP7LAtrah1h1PgJ3JY7yNsjybsxQAnVK4JbtReZ/8z6ASVmd3QhYYKLaKZw==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" }, "engines": { @@ -1484,11 +1498,11 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.0.tgz", - "integrity": "sha512-/ntT2NljR9foobKk4E/YyOSwcGUXtYWv5tinMK/3RkypyNBNdhHUaq6Orw5DWq9ZcNlS03BIlEALFeQgeVAo4Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.5.tgz", + "integrity": "sha512-usYsuO1ID2LXxzuUxifgWtJemP7wL2uZtyrTVM4PKqsmJycdS4U4mGovL5xXkfUheds10Dd2PjoQLXw6zCsCbg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1498,11 +1512,11 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.0.tgz", - "integrity": "sha512-Rd4Ic89hA/f7xUSJQk5PnC+4so50vBoBfxjdQAdvngwidM8jYIBVxBZ/sARxD4e0yMXRbJVDrYf7dyRtIIKT6Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.5.tgz", + "integrity": "sha512-gnyKy9RyFhkovex4BjKWL3BVYzUDG6zC0gba7VMLbQoDuqMfJ1SDXs8k/XK41Mmt1Hyp4qNAvGFb9hKzdCqBRQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1512,11 +1526,11 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.0.tgz", - "integrity": "sha512-++V2L8Bdf4vcaHi2raILnptTBjGEFxn5315YU+e8+EqXIucA+q349qWngCLpUYqqv233suJ6NOienIVUpS9cqg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.5.tgz", + "integrity": "sha512-ldxCkW180qbrvyCVDzAUZqB0TAeF8W/vGJoRcaf75awm6By+PxfJKvuqVAnq8N9wz5Xa6mSpM19OfVKKVmGHSQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1526,11 +1540,11 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz", - "integrity": "sha512-VFi4dhgJM7Bpk8lRc5CMaRGlKZ29W9C3geZjt9beuzSUrlJxsNwX7ReLwaL6WEvsOf2EQkyIJEPtF8EXjB/g2A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.5.tgz", + "integrity": "sha512-shiCBHTIIChGLdyojsKQjoAyB8MBwat25lKM7MJjbe1hE0bgIppD+LX9afr41lLHOhqceqeWl4FkLp+Bgn9o1Q==", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1540,12 +1554,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.0.tgz", - "integrity": "sha512-jHLK4LxhHjvCeZDWyA9c+P9XH1sOxRd1RO9xMtDVRAOND/PczPqizEtVdx4TQF/wyPaewqpT+tgQFYMnN/P94A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.5.tgz", + "integrity": "sha512-GTJ4IW012tiPEMMubd7sD07iU9O/LOo8Q/oU4xNhcaq0Xn8+6TcUQaHtC8YxySo1T+ErQ8RaWogIEeFhKGNPzw==", "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -1675,9 +1689,9 @@ } }, "node_modules/@babel/register": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.0.tgz", - "integrity": "sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.5.tgz", + "integrity": "sha512-NpluD+cToBiZiDsG3y9rtIcqDyivsahpaM9csfyfiq1qQWduSmihUZ+ruIqqSDGjZKZMJfgAElo9x2YWlOQuRw==", "dependencies": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", @@ -1693,9 +1707,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -1704,9 +1718,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.3.tgz", - "integrity": "sha512-IAdDC7T0+wEB4y2gbIL0uOXEYpiZEeuFUTVbdGq+UwCcF35T/tS8KrmMomEwEc5wBbyfH3PJVpTSUqrhPDXFcQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.5.tgz", + "integrity": "sha512-F1pMwvTiUNSAM8mc45kccMQxj31x3y3P+tA/X8hKNWp3/hUsxdGxZ3D3H8JIkxtfA8qGkaBTKvcmvStaYseAFw==", "dev": true, "dependencies": { "core-js-pure": "^3.19.0", @@ -1730,16 +1744,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dependencies": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -2289,13 +2304,13 @@ } }, "node_modules/@mui/lab/node_modules/@mui/system": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.3.tgz", - "integrity": "sha512-YvkjmqgOruZgr+IkueRns99gl3MmnNs8BhnlZosYMLzKz/1lY0JqVBFqUh4sGVbD0UEKFwdk8H31itG5OIPChA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.4.tgz", + "integrity": "sha512-08WrDLzmY0/ag5wSzT0Qf2DkuPHdqkWbDUOIVs0VIkaq8tRH+EtnnLxuqyf8WLcytJZIcKcoLQDLWqbFivZ9lA==", "dependencies": { "@babel/runtime": "^7.16.3", "@mui/private-theming": "^5.2.3", - "@mui/styled-engine": "^5.2.0", + "@mui/styled-engine": "^5.2.4", "@mui/types": "^7.1.0", "@mui/utils": "^5.2.3", "clsx": "^1.1.1", @@ -2438,9 +2453,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.2.0.tgz", - "integrity": "sha512-NZ4pWYQcM5wreUfiXRd7IMFRF+Nq1vMzsIdXtXNjgctJTKHunrofasoBqv+cqevO+hqT75ezSbNHyaXzOXp6Mg==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.2.4.tgz", + "integrity": "sha512-tlilkVsAR+MeWIPILzj1uGjiy5tKONZgblXY49LECUNF7u7aTDszqmv0hRG+1IAZjNts+ox8XAlldPNfj+OKvA==", "dependencies": { "@babel/runtime": "^7.16.3", "@emotion/cache": "^11.6.0", @@ -2451,7 +2466,7 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/material-ui" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@emotion/react": "^11.4.1", @@ -2967,9 +2982,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.2.tgz", + "integrity": "sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==", "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -2995,9 +3010,9 @@ } }, "node_modules/@types/http-proxy": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", - "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", + "version": "1.17.8", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz", + "integrity": "sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==", "dependencies": { "@types/node": "*" } @@ -3019,9 +3034,9 @@ "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==" }, "node_modules/@types/node": { - "version": "16.11.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz", - "integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==" + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", + "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -4080,12 +4095,12 @@ } }, "node_modules/browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dependencies": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -4213,9 +4228,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001286", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", - "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==", + "version": "1.0.30001287", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001287.tgz", + "integrity": "sha512-4udbs9bc0hfNrcje++AxBuc6PfLNHwh3PO9kbwnfCQWyqtlzg3py0YgFu8jyRTTo85VAz4U+VLxSlID09vNtWA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/browserslist" @@ -4617,11 +4632,11 @@ } }, "node_modules/core-js-compat": { - "version": "3.19.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.19.3.tgz", - "integrity": "sha512-59tYzuWgEEVU9r+SRgceIGXSSUn47JknoiXW6Oq7RW8QHjXWz3/vp8pa7dbtuVu40sewz3OP3JmQEcDdztrLhA==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.0.tgz", + "integrity": "sha512-relrah5h+sslXssTTOkvqcC/6RURifB0W5yhYBdBkaPYa5/2KBMiog3XiD+s3TwEHWxInWVv4Jx2/Lw0vng+IQ==", "dependencies": { - "browserslist": "^4.18.1", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "funding": { @@ -4638,9 +4653,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.19.3", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.3.tgz", - "integrity": "sha512-N3JruInmCyt7EJj5mAq3csCgGYgiSqu7p7TQp2KOztr180/OAIxyIvL1FCjzgmQk/t3Yniua50Fsak7FShI9lA==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.0.tgz", + "integrity": "sha512-qsrbIwWSEEYOM7z616jAVgwhuDDtPLwZSpUsU3vyUkHYqKTf/uwOJBZg2V7lMurYWkpVlaVOxBrfX0Q3ppvjfg==", "dev": true, "hasInstallScript": true, "funding": { @@ -5159,9 +5174,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "node_modules/electron-to-chromium": { - "version": "1.4.16", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", - "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==" + "version": "1.4.23", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.23.tgz", + "integrity": "sha512-q3tB59Api3+DMbLnDPkW/UBHBO7KTGcF+rDCeb0GAGyqFj562s6y+c/2tDKTS/y5lbC+JOvT4MSUALJLPqlcSA==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -7793,9 +7808,9 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "node_modules/jest-worker": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz", - "integrity": "sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", + "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -12240,11 +12255,12 @@ } }, "node_modules/winston-transport": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", - "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.1.tgz", + "integrity": "sha512-ciZRlU4CSjHqHe8RQG1iPxKMRVwv6ZJ0RC7DxStKWd0KjpAhPDy5gVYSCpIUq+5CUsP+IyNOTZy1X0tO2QZqjg==", "dependencies": { - "readable-stream": "^2.3.7", + "logform": "^2.2.0", + "readable-stream": "^3.4.0", "triple-beam": "^1.2.0" }, "engines": { @@ -12252,25 +12268,16 @@ } }, "node_modules/winston-transport/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/winston-transport/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/winston/node_modules/readable-stream": { @@ -12560,9 +12567,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "requires": { "@babel/types": "^7.16.0", "jsesc": "^2.5.1", @@ -12578,9 +12585,9 @@ } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.0.tgz", - "integrity": "sha512-9KuleLT0e77wFUku6TUkqZzCEymBdtuQQ27MhEKzf9UOOJu3cYj98kyaDAzxpC7lV6DGiZFuC8XqDsq8/Kl6aQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.5.tgz", + "integrity": "sha512-3JEA9G5dmmnIWdzaT9d0NmFRgYnWUThLsDaL7982H0XqqWr56lRrsmwheXFMjR+TMl7QMBb6mzy9kvgr1lRLUA==", "requires": { "@babel/helper-explode-assignable-expression": "^7.16.0", "@babel/types": "^7.16.0" @@ -12598,15 +12605,16 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz", - "integrity": "sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.5.tgz", + "integrity": "sha512-NEohnYA7mkB8L5JhU7BLwcBdU3j83IziR9aseMueWGeAjblbul3zzb8UvJ3a1zuBiqCMObzCJHFqKIQE6hTVmg==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0" } }, @@ -12634,6 +12642,14 @@ "semver": "^6.1.2" } }, + "@babel/helper-environment-visitor": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", + "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", + "requires": { + "@babel/types": "^7.16.0" + } + }, "@babel/helper-explode-assignable-expression": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", @@ -12669,9 +12685,9 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.5.tgz", + "integrity": "sha512-7fecSXq7ZrLE+TWshbGT+HyCLkxloWNhTbU2QM1NTI/tDqyf0oZiMcEfYtDuUDCo528EOlt39G1rftea4bRZIw==", "requires": { "@babel/types": "^7.16.0" } @@ -12685,17 +12701,17 @@ } }, "@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", + "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", "requires": { + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", "@babel/helper-simple-access": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", "@babel/helper-validator-identifier": "^7.15.7", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" } }, @@ -12708,28 +12724,29 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==" + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", + "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz", - "integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.5.tgz", + "integrity": "sha512-X+aAJldyxrOmN9v3FKp+Hu1NO69VWgYgDGq6YDykwRPzxs5f2N+X988CBXS7EQahDU+Vpet5QYMqLk+nsp+Qxw==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-wrap-function": "^7.16.0", + "@babel/helper-wrap-function": "^7.16.5", "@babel/types": "^7.16.0" } }, "@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.5.tgz", + "integrity": "sha512-ao3seGVa/FZCMCCNDuBcqnBFSbdr8N2EW35mzojx3TwfIbdPmNK+JV6+2d5bR0Z71W5ocLnQp9en/cTF7pBJiQ==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" } }, @@ -12768,23 +12785,23 @@ "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==" }, "@babel/helper-wrap-function": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.0.tgz", - "integrity": "sha512-VVMGzYY3vkWgCJML+qVLvGIam902mJW0FvT7Avj1zEe0Gn7D93aWdLblYARTxEw+6DhZmtzhBM2zv0ekE5zg1g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.5.tgz", + "integrity": "sha512-2J2pmLBqUqVdJw78U0KPNdeE2qeuIyKoG4mKV7wAq3mc4jJG282UgjZw4ZYDnqiWQuS3Y3IYdF/AQ6CpyBV3VA==", "requires": { "@babel/helper-function-name": "^7.16.0", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" } }, "@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", + "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", "requires": { "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" } }, @@ -12812,9 +12829,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==" + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==" }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.16.0", @@ -12827,11 +12844,11 @@ }, "dependencies": { "@babel/plugin-proposal-optional-chaining": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz", - "integrity": "sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.5.tgz", + "integrity": "sha512-kzdHgnaXRonttiTfKYnSVafbWngPPr2qKw9BWYBESl91W54e+9R5pP70LtWxV56g0f05f/SQrwHYkfvbwcdQ/A==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } @@ -12839,12 +12856,12 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz", - "integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.5.tgz", + "integrity": "sha512-C/FX+3HNLV6sz7AqbTQqEo1L9/kfrKjxcVtgyBCmvIgOjvuBVUWooDoi7trsLxOzCEo5FccjRvKHkfDsJFZlfA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.4", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -12858,48 +12875,48 @@ } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.0.tgz", - "integrity": "sha512-mAy3sdcY9sKAkf3lQbDiv3olOfiLqI51c9DR9b19uMoR2Z6r5pmGl7dfNFqEvqOyqbf1ta4lknK4gc5PJn3mfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.5.tgz", + "integrity": "sha512-EEFzuLZcm/rNJ8Q5krK+FRKdVkd6FjfzT9tuSZql9sQn64K0hHA2KLJ0DqVot9/iV6+SsuadC5yI39zWnm+nmQ==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.0.tgz", - "integrity": "sha512-QGSA6ExWk95jFQgwz5GQ2Dr95cf7eI7TKutIXXTb7B1gCLTCz5hTjFTQGfLFBBiC5WSNi7udNwWsqbbMh1c4yQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.5.tgz", + "integrity": "sha512-P05/SJZTTvHz79LNYTF8ff5xXge0kk5sIIWAypcWgX4BTRUgyHc8wRxJ/Hk+mU0KXldgOOslKaeqnhthcDJCJQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.0.tgz", - "integrity": "sha512-CjI4nxM/D+5wCnhD11MHB1AwRSAYeDT+h8gCdcVJZ/OK7+wRzFsf7PFPWVpVpNRkHMmMkQWAHpTq+15IXQ1diA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.5.tgz", + "integrity": "sha512-i+sltzEShH1vsVydvNaTRsgvq2vZsfyrd7K7vPLUU/KgS0D5yZMe6uipM0+izminnkKrEfdUnz7CxMRb6oHZWw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.0.tgz", - "integrity": "sha512-kouIPuiv8mSi5JkEhzApg5Gn6hFyKPnlkO0a9YSzqRurH8wYzSlf6RJdzluAsbqecdW5pBvDJDfyDIUR/vLxvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.5.tgz", + "integrity": "sha512-QQJueTFa0y9E4qHANqIvMsuxM/qcLQmKttBACtPCQzGUEizsXDACGonlPiSwynHfOa3vNw0FPMVvQzbuXwh4SQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.0.tgz", - "integrity": "sha512-pbW0fE30sVTYXXm9lpVQQ/Vc+iTeQKiXlaNRZPPN2A2VdlWyAtsUrsQ3xydSlDW00TFMK7a8m3cDTkBF5WnV3Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.5.tgz", + "integrity": "sha512-xqibl7ISO2vjuQM+MzR3rkd0zfNWltk7n9QhaD8ghMmMceVguYrNDt7MikRyj4J4v3QehpnrU8RYLnC7z/gZLA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, @@ -12913,11 +12930,11 @@ } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.0.tgz", - "integrity": "sha512-FAhE2I6mjispy+vwwd6xWPyEx3NYFS13pikDBWUAFGZvq6POGs5eNchw8+1CYoEgBl9n11I3NkzD7ghn25PQ9Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.5.tgz", + "integrity": "sha512-DvB9l/TcsCRvsIV9v4jxR/jVP45cslTVC0PMVHvaJhhNuhn2Y1SOhCSFlPK777qLB5wb8rVDaNoqMTyOqtY5Iw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, @@ -12934,11 +12951,11 @@ } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.0.tgz", - "integrity": "sha512-kicDo0A/5J0nrsCPbn89mTG3Bm4XgYi0CZtvex9Oyw7gGZE3HXGD0zpQNH+mo+tEfbo8wbmMvJftOwpmPy7aVw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.5.tgz", + "integrity": "sha512-ihCMxY1Iljmx4bWy/PIMJGXN4NS4oUj1MKynwO07kiKms23pNvIn1DMB92DNB2R0EA882sw0VXIelYGdtF7xEQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, @@ -12953,32 +12970,32 @@ } }, "@babel/plugin-proposal-private-methods": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.0.tgz", - "integrity": "sha512-IvHmcTHDFztQGnn6aWq4t12QaBXTKr1whF/dgp9kz84X6GUcwq9utj7z2wFCUfeOup/QKnOlt2k0zxkGFx9ubg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.5.tgz", + "integrity": "sha512-+yFMO4BGT3sgzXo+lrq7orX5mAZt57DwUK6seqII6AcJnJOIhBJ8pzKH47/ql/d426uQ7YhN8DpUFirQzqYSUA==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.0.tgz", - "integrity": "sha512-3jQUr/HBbMVZmi72LpjQwlZ55i1queL8KcDTQEkAHihttJnAPrcvG9ZNXIfsd2ugpizZo595egYV6xy+pv4Ofw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.5.tgz", + "integrity": "sha512-+YGh5Wbw0NH3y/E5YMu6ci5qTDmAEVNoZ3I54aB6nVEOZ5BQ7QJlwKq5pYVucQilMByGn/bvX0af+uNaPRCabA==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.0.tgz", - "integrity": "sha512-ti7IdM54NXv29cA4+bNNKEMS4jLMCbJgl+Drv+FgYy0erJLAxNAIXcNjNjrRZEcWq0xJHsNVwQezskMFpF8N9g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.5.tgz", + "integrity": "sha512-s5sKtlKQyFSatt781HQwv1hoM5BQ9qRH30r+dK56OLDsHmV74mzwJNX7R1yMuE7VZKG5O6q/gmOGSAO6ikTudg==", "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-syntax-async-generators": { @@ -13030,11 +13047,11 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz", - "integrity": "sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.5.tgz", + "integrity": "sha512-42OGssv9NPk4QHKVgIHlzeLgPOW5rGgfV5jzG90AhcXXIv6hu/eqj63w4VgvRxdvZY3AlYeDgPiSJ3BqAd1Y6Q==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -13102,320 +13119,321 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.0.tgz", - "integrity": "sha512-vIFb5250Rbh7roWARvCLvIJ/PtAU5Lhv7BtZ1u24COwpI9Ypjsh+bZcKk6rlIyalK+r0jOc1XQ8I4ovNxNrWrA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.5.tgz", + "integrity": "sha512-8bTHiiZyMOyfZFULjsCnYOWG059FVMes0iljEHSfARhNgFfpsqE92OrCffv3veSw9rwMkYcFe9bj0ZoXU2IGtQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.0.tgz", - "integrity": "sha512-PbIr7G9kR8tdH6g8Wouir5uVjklETk91GMVSUq+VaOgiinbCkBP6Q7NN/suM/QutZkMJMvcyAriogcYAdhg8Gw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.5.tgz", + "integrity": "sha512-TMXgfioJnkXU+XRoj7P2ED7rUm5jbnDWwlCuFVTpQboMfbSya5WrmubNBAMlk7KXvywpo8rd8WuYZkis1o2H8w==", "requires": { "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.0.tgz", - "integrity": "sha512-V14As3haUOP4ZWrLJ3VVx5rCnrYhMSHN/jX7z6FAt5hjRkLsb0snPCmJwSOML5oxkKO4FNoNv7V5hw/y2bjuvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.5.tgz", + "integrity": "sha512-BxmIyKLjUGksJ99+hJyL/HIxLIGnLKtw772zYDER7UuycDZ+Xvzs98ZQw6NGgM2ss4/hlFAaGiZmMNKvValEjw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.0.tgz", - "integrity": "sha512-27n3l67/R3UrXfizlvHGuTwsRIFyce3D/6a37GRxn28iyTPvNXaW4XvznexRh1zUNLPjbLL22Id0XQElV94ruw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.5.tgz", + "integrity": "sha512-JxjSPNZSiOtmxjX7PBRBeRJTUKTyJ607YUYeT0QJCNdsedOe+/rXITjP08eG8xUpsLfPirgzdCFN+h0w6RI+pQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-classes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.0.tgz", - "integrity": "sha512-HUxMvy6GtAdd+GKBNYDWCIA776byUQH8zjnfjxwT1P1ARv/wFu8eBDpmXQcLS/IwRtrxIReGiplOwMeyO7nsDQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.5.tgz", + "integrity": "sha512-DzJ1vYf/7TaCYy57J3SJ9rV+JEuvmlnvvyvYKFbk5u46oQbBvuB9/0w+YsVsxkOv8zVWKpDmUoj4T5ILHoXevA==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.0.tgz", - "integrity": "sha512-63l1dRXday6S8V3WFY5mXJwcRAnPYxvFfTlt67bwV1rTyVTM5zrp0DBBb13Kl7+ehkCVwIZPumPpFP/4u70+Tw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.5.tgz", + "integrity": "sha512-n1+O7xtU5lSLraRzX88CNcpl7vtGdPakKzww74bVwpAIRgz9JVLJJpOLb0uYqcOaXVM0TL6X0RVeIJGD2CnCkg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.0.tgz", - "integrity": "sha512-Q7tBUwjxLTsHEoqktemHBMtb3NYwyJPTJdM+wDwb0g8PZ3kQUIzNvwD5lPaqW/p54TXBc/MXZu9Jr7tbUEUM8Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.5.tgz", + "integrity": "sha512-GuRVAsjq+c9YPK6NeTkRLWyQskDC099XkBSVO+6QzbnOnH2d/4mBVXYStaPrZD3dFRfg00I6BFJ9Atsjfs8mlg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.0.tgz", - "integrity": "sha512-FXlDZfQeLILfJlC6I1qyEwcHK5UpRCFkaoVyA1nk9A1L1Yu583YO4un2KsLBsu3IJb4CUbctZks8tD9xPQubLw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.5.tgz", + "integrity": "sha512-iQiEMt8Q4/5aRGHpGVK2Zc7a6mx7qEAO7qehgSug3SDImnuMzgmm/wtJALXaz25zUj1PmnNHtShjFgk4PDx4nw==", "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.0.tgz", - "integrity": "sha512-LIe2kcHKAZOJDNxujvmp6z3mfN6V9lJxubU4fJIGoQCkKe3Ec2OcbdlYP+vW++4MpxwG0d1wSDOJtQW5kLnkZQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.5.tgz", + "integrity": "sha512-81tijpDg2a6I1Yhj4aWY1l3O1J4Cg/Pd7LfvuaH2VVInAkXtzibz9+zSPdUM1WvuUi128ksstAP0hM5w48vQgg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.0.tgz", - "integrity": "sha512-OwYEvzFI38hXklsrbNivzpO3fh87skzx8Pnqi4LoSYeav0xHlueSoCJrSgTPfnbyzopo5b3YVAJkFIcUpK2wsw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.5.tgz", + "integrity": "sha512-12rba2HwemQPa7BLIKCzm1pT2/RuQHtSFHdNl41cFiC6oi4tcrp7gjB07pxQvFpcADojQywSjblQth6gJyE6CA==", "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-for-of": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.0.tgz", - "integrity": "sha512-5QKUw2kO+GVmKr2wMYSATCTTnHyscl6sxFRAY+rvN7h7WB0lcG0o4NoV6ZQU32OZGVsYUsfLGgPQpDFdkfjlJQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.5.tgz", + "integrity": "sha512-+DpCAJFPAvViR17PIMi9x2AE34dll5wNlXO43wagAX2YcRGgEVHCNFC4azG85b4YyyFarvkc/iD5NPrz4Oneqw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.0.tgz", - "integrity": "sha512-lBzMle9jcOXtSOXUpc7tvvTpENu/NuekNJVova5lCCWCV9/U1ho2HH2y0p6mBg8fPm/syEAbfaaemYGOHCY3mg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.5.tgz", + "integrity": "sha512-Fuec/KPSpVLbGo6z1RPw4EE1X+z9gZk1uQmnYy7v4xr4TO9p41v1AoUuXEtyqAI7H+xNJYSICzRqZBhDEkd3kQ==", "requires": { "@babel/helper-function-name": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.0.tgz", - "integrity": "sha512-gQDlsSF1iv9RU04clgXqRjrPyyoJMTclFt3K1cjLmTKikc0s/6vE3hlDeEVC71wLTRu72Fq7650kABrdTc2wMQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.5.tgz", + "integrity": "sha512-B1j9C/IfvshnPcklsc93AVLTrNVa69iSqztylZH6qnmiAsDDOmmjEYqOm3Ts2lGSgTSywnBNiqC949VdD0/gfw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.0.tgz", - "integrity": "sha512-WRpw5HL4Jhnxw8QARzRvwojp9MIE7Tdk3ez6vRyUk1MwgjJN0aNpRoXainLR5SgxmoXx/vsXGZ6OthP6t/RbUg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.5.tgz", + "integrity": "sha512-d57i3vPHWgIde/9Y8W/xSFUndhvhZN5Wu2TjRrN1MVz5KzdUihKnfDVlfP1U7mS5DNj/WHHhaE4/tTi4hIyHwQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.0.tgz", - "integrity": "sha512-rWFhWbCJ9Wdmzln1NmSCqn7P0RAD+ogXG/bd9Kg5c7PKWkJtkiXmYsMBeXjDlzHpVTJ4I/hnjs45zX4dEv81xw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.5.tgz", + "integrity": "sha512-oHI15S/hdJuSCfnwIz+4lm6wu/wBn7oJ8+QrkzPPwSFGXk8kgdI/AIKcbR/XnD1nQVMg/i6eNaXpszbGuwYDRQ==", "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz", - "integrity": "sha512-Dzi+NWqyEotgzk/sb7kgQPJQf7AJkQBWsVp1N6JWc1lBVo0vkElUnGdr1PzUBmfsCCN5OOFya3RtpeHk15oLKQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.5.tgz", + "integrity": "sha512-ABhUkxvoQyqhCWyb8xXtfwqNMJD7tx+irIRnUh6lmyFud7Jln1WzONXKlax1fg/ey178EXbs4bSGNd6PngO+SQ==", "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-simple-access": "^7.16.0", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.0.tgz", - "integrity": "sha512-yuGBaHS3lF1m/5R+6fjIke64ii5luRUg97N2wr+z1sF0V+sNSXPxXDdEEL/iYLszsN5VKxVB1IPfEqhzVpiqvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.5.tgz", + "integrity": "sha512-53gmLdScNN28XpjEVIm7LbWnD/b/TpbwKbLk6KV4KqC9WyU6rq1jnNmVG6UgAdQZVVGZVoik3DqHNxk4/EvrjA==", "requires": { "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-validator-identifier": "^7.15.7", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.0.tgz", - "integrity": "sha512-nx4f6no57himWiHhxDM5pjwhae5vLpTK2zCnDH8+wNLJy0TVER/LJRHl2bkt6w9Aad2sPD5iNNoUpY3X9sTGDg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.5.tgz", + "integrity": "sha512-qTFnpxHMoenNHkS3VoWRdwrcJ3FhX567GvDA3hRZKF0Dj8Fmg0UzySZp3AP2mShl/bzcywb/UWAMQIjA1bhXvw==", "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.0.tgz", - "integrity": "sha512-LogN88uO+7EhxWc8WZuQ8vxdSyVGxhkh8WTC3tzlT8LccMuQdA81e9SGV6zY7kY2LjDhhDOFdQVxdGwPyBCnvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.5.tgz", + "integrity": "sha512-/wqGDgvFUeKELW6ex6QB7dLVRkd5ehjw34tpXu1nhKC0sFfmaLabIswnpf8JgDyV2NeDmZiwoOb0rAmxciNfjA==", "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0" } }, "@babel/plugin-transform-new-target": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.0.tgz", - "integrity": "sha512-fhjrDEYv2DBsGN/P6rlqakwRwIp7rBGLPbrKxwh7oVt5NNkIhZVOY2GRV+ULLsQri1bDqwDWnU3vhlmx5B2aCw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.5.tgz", + "integrity": "sha512-ZaIrnXF08ZC8jnKR4/5g7YakGVL6go6V9ql6Jl3ecO8PQaQqFE74CuM384kezju7Z9nGCCA20BqZaR1tJ/WvHg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-object-super": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.0.tgz", - "integrity": "sha512-fds+puedQHn4cPLshoHcR1DTMN0q1V9ou0mUjm8whx9pGcNvDrVVrgw+KJzzCaiTdaYhldtrUps8DWVMgrSEyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.5.tgz", + "integrity": "sha512-tded+yZEXuxt9Jdtkc1RraW1zMF/GalVxaVVxh41IYwirdRgyAxxxCKZ9XB7LxZqmsjfjALxupNE1MIz9KH+Zg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5" } }, "@babel/plugin-transform-parameters": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.3.tgz", - "integrity": "sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.5.tgz", + "integrity": "sha512-B3O6AL5oPop1jAVg8CV+haeUte9oFuY85zu0jwnRNZZi3tVAbJriu5tag/oaO2kGaQM/7q7aGPBlTI5/sr9enA==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.0.tgz", - "integrity": "sha512-XLldD4V8+pOqX2hwfWhgwXzGdnDOThxaNTgqagOcpBgIxbUvpgU2FMvo5E1RyHbk756WYgdbS0T8y0Cj9FKkWQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.5.tgz", + "integrity": "sha512-+IRcVW71VdF9pEH/2R/Apab4a19LVvdVsr/gEeotH00vSDVlKD+XgfSIw+cgGWsjDB/ziqGv/pGoQZBIiQVXHg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-react-display-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.0.tgz", - "integrity": "sha512-FJFdJAqaCpndL+pIf0aeD/qlQwT7QXOvR6Cc8JPvNhKJBi2zc/DPc4g05Y3fbD/0iWAMQFGij4+Xw+4L/BMpTg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.5.tgz", + "integrity": "sha512-dHYCOnzSsXFz8UcdNQIHGvg94qPL/teF7CCiCEMRxmA1G2p5Mq4JnKVowCDxYfiQ9D7RstaAp9kwaSI+sXbnhw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz", - "integrity": "sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.5.tgz", + "integrity": "sha512-+arLIz1d7kmwX0fKxTxbnoeG85ONSnLpvdODa4P3pc1sS7CV1hfmtYWufkW/oYsPnkDrEeQFxhUWcFnrXW7jQQ==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.16.0", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/plugin-syntax-jsx": "^7.16.5", "@babel/types": "^7.16.0" } }, "@babel/plugin-transform-react-jsx-development": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.0.tgz", - "integrity": "sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.5.tgz", + "integrity": "sha512-uQSLacMZSGLCxOw20dzo1dmLlKkd+DsayoV54q3MHXhbqgPzoiGerZQgNPl/Ro8/OcXV2ugfnkx+rxdS0sN5Uw==", "requires": { - "@babel/plugin-transform-react-jsx": "^7.16.0" + "@babel/plugin-transform-react-jsx": "^7.16.5" } }, "@babel/plugin-transform-react-pure-annotations": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.0.tgz", - "integrity": "sha512-NC/Bj2MG+t8Ef5Pdpo34Ay74X4Rt804h5y81PwOpfPtmAK3i6CizmQqwyBQzIepz1Yt8wNr2Z2L7Lu3qBMfZMA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.5.tgz", + "integrity": "sha512-0nYU30hCxnCVCbRjSy9ahlhWZ2Sn6khbY4FqR91W+2RbSqkWEbVu2gXh45EqNy4Bq7sRU+H4i0/6YKwOSzh16A==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-regenerator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.0.tgz", - "integrity": "sha512-JAvGxgKuwS2PihiSFaDrp94XOzzTUeDeOQlcKzVAyaPap7BnZXK/lvMDiubkPTdotPKOIZq9xWXWnggUMYiExg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.5.tgz", + "integrity": "sha512-2z+it2eVWU8TtQQRauvGUqZwLy4+7rTfo6wO4npr+fvvN1SW30ZF3O/ZRCNmTuu4F5MIP8OJhXAhRV5QMJOuYg==", "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.0.tgz", - "integrity": "sha512-Dgs8NNCehHSvXdhEhln8u/TtJxfVwGYCgP2OOr5Z3Ar+B+zXicEOKNTyc+eca2cuEOMtjW6m9P9ijOt8QdqWkg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.5.tgz", + "integrity": "sha512-aIB16u8lNcf7drkhXJRoggOxSTUAuihTSTfAcpynowGJOZiGf+Yvi7RuTwFzVYSYPmWyARsPqUGoZWWWxLiknw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.0.tgz", - "integrity": "sha512-iVb1mTcD8fuhSv3k99+5tlXu5N0v8/DPm2mO3WACLG6al1CGZH7v09HJyUb1TtYl/Z+KrM6pHSIJdZxP5A+xow==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.5.tgz", + "integrity": "sha512-ZbuWVcY+MAXJuuW7qDoCwoxDUNClfZxoo7/4swVbOW1s/qYLOMHlm9YRWMsxMFuLs44eXsv4op1vAaBaBaDMVg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-spread": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.0.tgz", - "integrity": "sha512-Ao4MSYRaLAQczZVp9/7E7QHsCuK92yHRrmVNRe/SlEJjhzivq0BSn8mEraimL8wizHZ3fuaHxKH0iwzI13GyGg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.5.tgz", + "integrity": "sha512-5d6l/cnG7Lw4tGHEoga4xSkYp1euP7LAtrah1h1PgJ3JY7yNsjybsxQAnVK4JbtReZ/8z6ASVmd3QhYYKLaKZw==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.0.tgz", - "integrity": "sha512-/ntT2NljR9foobKk4E/YyOSwcGUXtYWv5tinMK/3RkypyNBNdhHUaq6Orw5DWq9ZcNlS03BIlEALFeQgeVAo4Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.5.tgz", + "integrity": "sha512-usYsuO1ID2LXxzuUxifgWtJemP7wL2uZtyrTVM4PKqsmJycdS4U4mGovL5xXkfUheds10Dd2PjoQLXw6zCsCbg==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-template-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.0.tgz", - "integrity": "sha512-Rd4Ic89hA/f7xUSJQk5PnC+4so50vBoBfxjdQAdvngwidM8jYIBVxBZ/sARxD4e0yMXRbJVDrYf7dyRtIIKT6Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.5.tgz", + "integrity": "sha512-gnyKy9RyFhkovex4BjKWL3BVYzUDG6zC0gba7VMLbQoDuqMfJ1SDXs8k/XK41Mmt1Hyp4qNAvGFb9hKzdCqBRQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.0.tgz", - "integrity": "sha512-++V2L8Bdf4vcaHi2raILnptTBjGEFxn5315YU+e8+EqXIucA+q349qWngCLpUYqqv233suJ6NOienIVUpS9cqg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.5.tgz", + "integrity": "sha512-ldxCkW180qbrvyCVDzAUZqB0TAeF8W/vGJoRcaf75awm6By+PxfJKvuqVAnq8N9wz5Xa6mSpM19OfVKKVmGHSQ==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz", - "integrity": "sha512-VFi4dhgJM7Bpk8lRc5CMaRGlKZ29W9C3geZjt9beuzSUrlJxsNwX7ReLwaL6WEvsOf2EQkyIJEPtF8EXjB/g2A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.5.tgz", + "integrity": "sha512-shiCBHTIIChGLdyojsKQjoAyB8MBwat25lKM7MJjbe1hE0bgIppD+LX9afr41lLHOhqceqeWl4FkLp+Bgn9o1Q==", "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.0.tgz", - "integrity": "sha512-jHLK4LxhHjvCeZDWyA9c+P9XH1sOxRd1RO9xMtDVRAOND/PczPqizEtVdx4TQF/wyPaewqpT+tgQFYMnN/P94A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.5.tgz", + "integrity": "sha512-GTJ4IW012tiPEMMubd7sD07iU9O/LOo8Q/oU4xNhcaq0Xn8+6TcUQaHtC8YxySo1T+ErQ8RaWogIEeFhKGNPzw==", "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/preset-env": { @@ -13524,9 +13542,9 @@ } }, "@babel/register": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.0.tgz", - "integrity": "sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.16.5.tgz", + "integrity": "sha512-NpluD+cToBiZiDsG3y9rtIcqDyivsahpaM9csfyfiq1qQWduSmihUZ+ruIqqSDGjZKZMJfgAElo9x2YWlOQuRw==", "requires": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", @@ -13536,17 +13554,17 @@ } }, "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/runtime-corejs3": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.3.tgz", - "integrity": "sha512-IAdDC7T0+wEB4y2gbIL0uOXEYpiZEeuFUTVbdGq+UwCcF35T/tS8KrmMomEwEc5wBbyfH3PJVpTSUqrhPDXFcQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.5.tgz", + "integrity": "sha512-F1pMwvTiUNSAM8mc45kccMQxj31x3y3P+tA/X8hKNWp3/hUsxdGxZ3D3H8JIkxtfA8qGkaBTKvcmvStaYseAFw==", "dev": true, "requires": { "core-js-pure": "^3.19.0", @@ -13564,16 +13582,17 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -13929,13 +13948,13 @@ }, "dependencies": { "@mui/system": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.3.tgz", - "integrity": "sha512-YvkjmqgOruZgr+IkueRns99gl3MmnNs8BhnlZosYMLzKz/1lY0JqVBFqUh4sGVbD0UEKFwdk8H31itG5OIPChA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.2.4.tgz", + "integrity": "sha512-08WrDLzmY0/ag5wSzT0Qf2DkuPHdqkWbDUOIVs0VIkaq8tRH+EtnnLxuqyf8WLcytJZIcKcoLQDLWqbFivZ9lA==", "requires": { "@babel/runtime": "^7.16.3", "@mui/private-theming": "^5.2.3", - "@mui/styled-engine": "^5.2.0", + "@mui/styled-engine": "^5.2.4", "@mui/types": "^7.1.0", "@mui/utils": "^5.2.3", "clsx": "^1.1.1", @@ -14009,9 +14028,9 @@ } }, "@mui/styled-engine": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.2.0.tgz", - "integrity": "sha512-NZ4pWYQcM5wreUfiXRd7IMFRF+Nq1vMzsIdXtXNjgctJTKHunrofasoBqv+cqevO+hqT75ezSbNHyaXzOXp6Mg==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.2.4.tgz", + "integrity": "sha512-tlilkVsAR+MeWIPILzj1uGjiy5tKONZgblXY49LECUNF7u7aTDszqmv0hRG+1IAZjNts+ox8XAlldPNfj+OKvA==", "requires": { "@babel/runtime": "^7.16.3", "@emotion/cache": "^11.6.0", @@ -14404,9 +14423,9 @@ } }, "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.2.tgz", + "integrity": "sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==", "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -14432,9 +14451,9 @@ } }, "@types/http-proxy": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz", - "integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==", + "version": "1.17.8", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz", + "integrity": "sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==", "requires": { "@types/node": "*" } @@ -14456,9 +14475,9 @@ "integrity": "sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==" }, "@types/node": { - "version": "16.11.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz", - "integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==" + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", + "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" }, "@types/parse-json": { "version": "4.0.0", @@ -15336,12 +15355,12 @@ } }, "browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "requires": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -15438,9 +15457,9 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { - "version": "1.0.30001286", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", - "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==" + "version": "1.0.30001287", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001287.tgz", + "integrity": "sha512-4udbs9bc0hfNrcje++AxBuc6PfLNHwh3PO9kbwnfCQWyqtlzg3py0YgFu8jyRTTo85VAz4U+VLxSlID09vNtWA==" }, "caseless": { "version": "0.12.0", @@ -15775,11 +15794,11 @@ "integrity": "sha512-vJlUi/7YdlCZeL6fXvWNaLUPh/id12WXj3MbkMw5uOyF0PfWPBNOCNbs53YqgrvtujLNlt9JQpruyIKkUZ+PKA==" }, "core-js-compat": { - "version": "3.19.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.19.3.tgz", - "integrity": "sha512-59tYzuWgEEVU9r+SRgceIGXSSUn47JknoiXW6Oq7RW8QHjXWz3/vp8pa7dbtuVu40sewz3OP3JmQEcDdztrLhA==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.0.tgz", + "integrity": "sha512-relrah5h+sslXssTTOkvqcC/6RURifB0W5yhYBdBkaPYa5/2KBMiog3XiD+s3TwEHWxInWVv4Jx2/Lw0vng+IQ==", "requires": { - "browserslist": "^4.18.1", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "dependencies": { @@ -15791,9 +15810,9 @@ } }, "core-js-pure": { - "version": "3.19.3", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.3.tgz", - "integrity": "sha512-N3JruInmCyt7EJj5mAq3csCgGYgiSqu7p7TQp2KOztr180/OAIxyIvL1FCjzgmQk/t3Yniua50Fsak7FShI9lA==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.0.tgz", + "integrity": "sha512-qsrbIwWSEEYOM7z616jAVgwhuDDtPLwZSpUsU3vyUkHYqKTf/uwOJBZg2V7lMurYWkpVlaVOxBrfX0Q3ppvjfg==", "dev": true }, "core-util-is": { @@ -16219,9 +16238,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.4.16", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.16.tgz", - "integrity": "sha512-BQb7FgYwnu6haWLU63/CdVW+9xhmHls3RCQUFiV4lvw3wimEHTVcUk2hkuZo76QhR8nnDdfZE7evJIZqijwPdA==" + "version": "1.4.23", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.23.tgz", + "integrity": "sha512-q3tB59Api3+DMbLnDPkW/UBHBO7KTGcF+rDCeb0GAGyqFj562s6y+c/2tDKTS/y5lbC+JOvT4MSUALJLPqlcSA==" }, "elliptic": { "version": "6.5.4", @@ -18177,9 +18196,9 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "jest-worker": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.4.tgz", - "integrity": "sha512-jfwxYJvfua1b1XkyuyPh01ATmgg4e5fPM/muLmhy9Qc6dmiwacQB0MLHaU6IjEsv/+nAixHGxTn8WllA27Pn0w==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", + "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -21667,34 +21686,23 @@ } }, "winston-transport": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", - "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.1.tgz", + "integrity": "sha512-ciZRlU4CSjHqHe8RQG1iPxKMRVwv6ZJ0RC7DxStKWd0KjpAhPDy5gVYSCpIUq+5CUsP+IyNOTZy1X0tO2QZqjg==", "requires": { - "readable-stream": "^2.3.7", + "logform": "^2.2.0", + "readable-stream": "^3.4.0", "triple-beam": "^1.2.0" }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } diff --git a/src/fireedge/src/client/components/Buttons/ScheduleAction.js b/src/fireedge/src/client/components/Buttons/ScheduleAction.js new file mode 100644 index 0000000000..aa52fc39bf --- /dev/null +++ b/src/fireedge/src/client/components/Buttons/ScheduleAction.js @@ -0,0 +1,216 @@ +/* ------------------------------------------------------------------------- * + * 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, useMemo, ReactElement } from 'react' +import PropTypes from 'prop-types' + +import { Trash, Edit, ClockOutline } from 'iconoir-react' + +import { useAuth } from 'client/features/Auth' +import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' +import { + CreateCharterForm, + CreateRelativeCharterForm, + CreateSchedActionForm, + CreateRelativeSchedActionForm, +} from 'client/components/Forms/Vm' + +import { Tr, Translate } from 'client/components/HOC' +import { ScheduledAction } from 'client/models/Scheduler' +import { sentenceCase } from 'client/utils' +import { T, VM_ACTIONS, VM_ACTIONS_IN_CHARTER } from 'client/constants' + +/** + * Returns a button to trigger form to create a scheduled action. + * + * @param {object} props - Props + * @param {object} props.vm - Vm resource + * @param {boolean} [props.relative] - Applies to the form relative format + * @param {function():Promise} props.onSubmit - Submit function + * @returns {ReactElement} Button + */ +const CreateSchedButton = memo(({ vm, relative, onSubmit }) => ( + + relative + ? CreateRelativeSchedActionForm(vm) + : CreateSchedActionForm(vm), + onSubmit, + }, + ]} + /> +)) + +/** + * Returns a button to trigger form to update a scheduled action. + * + * @param {object} props - Props + * @param {object} props.vm - Vm resource + * @param {ScheduledAction} props.schedule - Schedule action + * @param {boolean} [props.relative] - Applies to the form relative format + * @param {function():Promise} props.onSubmit - Submit function + * @returns {ReactElement} Button + */ +const UpdateSchedButton = memo(({ vm, schedule, relative, onSubmit }) => { + const { ID, ACTION } = schedule + const titleAction = `#${ID} ${sentenceCase(ACTION)}` + + return ( + , + tooltip: , + }} + options={[ + { + dialogProps: { + title: ( + + ), + dataCy: 'modal-sched-actions', + }, + form: () => + relative + ? CreateRelativeSchedActionForm(vm, schedule) + : CreateSchedActionForm(vm, schedule), + onSubmit, + }, + ]} + /> + ) +}) + +/** + * Returns a button to trigger modal to delete a scheduled action. + * + * @param {object} props - Props + * @param {ScheduledAction} props.schedule - Schedule action + * @param {function():Promise} props.onSubmit - Submit function + * @returns {ReactElement} Button + */ +const DeleteSchedButton = memo(({ onSubmit, schedule }) => { + const { ID, ACTION } = schedule + const titleAction = `#${ID} ${sentenceCase(ACTION)}` + + return ( + , + tooltip: , + }} + options={[ + { + isConfirmDialog: true, + dialogProps: { + title: ( + + ), + children:

{Tr(T.DoYouWantProceed)}

, + }, + onSubmit, + }, + ]} + /> + ) +}) + +/** + * Returns a button to trigger form to create a charter. + * + * @param {object} props - Props + * @param {boolean} [props.relative] - Applies to the form relative format + * @param {function():Promise} props.onSubmit - Submit function + * @returns {ReactElement} Button + */ +const CharterButton = memo(({ relative, onSubmit }) => { + const { config } = useAuth() + + const leases = useMemo( + () => + // filters if exists in the VM actions for charters + Object.entries(config?.leases ?? {}).filter(([action]) => + VM_ACTIONS_IN_CHARTER.includes(action) + ), + [config.leases] + ) + + return ( + , + tooltip: , + disabled: leases.length <= 0, + }} + options={[ + { + dialogProps: { + title: T.ScheduledAction, + dataCy: 'modal-sched-actions', + }, + form: () => + relative + ? CreateRelativeCharterForm(leases, leases) + : CreateCharterForm(leases, leases), + onSubmit, + }, + ]} + /> + ) +}) + +const ButtonPropTypes = { + vm: PropTypes.object, + relative: PropTypes.bool, + onSubmit: PropTypes.func, + schedule: PropTypes.object, +} + +CreateSchedButton.propTypes = ButtonPropTypes +CreateSchedButton.displayName = 'CreateSchedButton' +UpdateSchedButton.propTypes = ButtonPropTypes +UpdateSchedButton.displayName = 'UpdateSchedButton' +DeleteSchedButton.propTypes = ButtonPropTypes +DeleteSchedButton.displayName = 'DeleteSchedButton' +CharterButton.propTypes = ButtonPropTypes +CharterButton.displayName = 'CharterButton' + +export { + CreateSchedButton, + DeleteSchedButton, + UpdateSchedButton, + CharterButton, +} diff --git a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/index.js b/src/fireedge/src/client/components/Buttons/index.js similarity index 85% rename from src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/index.js rename to src/fireedge/src/client/components/Buttons/index.js index d74812e6d7..8c7ccdd35d 100644 --- a/src/fireedge/src/client/components/Forms/Vm/AttachDiskForm/index.js +++ b/src/fireedge/src/client/components/Buttons/index.js @@ -13,7 +13,5 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import ImageSteps from 'client/components/Forms/Vm/AttachDiskForm/ImageSteps' -import VolatileSteps from 'client/components/Forms/Vm/AttachDiskForm/VolatileSteps' -export { ImageSteps, VolatileSteps } +export * from 'client/components/Buttons/ScheduleAction' diff --git a/src/fireedge/src/client/components/Cards/ScheduleActionCard.js b/src/fireedge/src/client/components/Cards/ScheduleActionCard.js new file mode 100644 index 0000000000..2194489f25 --- /dev/null +++ b/src/fireedge/src/client/components/Cards/ScheduleActionCard.js @@ -0,0 +1,125 @@ +/* ------------------------------------------------------------------------- * + * 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 { WarningTriangleOutline as WarningIcon } from 'iconoir-react' +import { useTheme, Typography, Paper, Stack } from '@mui/material' + +import Timer from 'client/components/Timer' +import { StatusChip } from 'client/components/Status' +import { UpdateSchedButton, DeleteSchedButton } from 'client/components/Buttons' +import { rowStyles } from 'client/components/Tables/styles' + +import { + isRelative, + getPeriodicityByTimeInSeconds, + getRepeatInformation, +} from 'client/models/Scheduler' +import { timeFromMilliseconds } from 'client/models/Helper' +import { sentenceCase } from 'client/utils' +import { T } from 'client/constants' + +const ScheduleActionCard = memo( + ({ vm, schedule, handleRemove, handleUpdate }) => { + const classes = rowStyles() + const { palette } = useTheme() + + const { ID, ACTION, TIME, MESSAGE, DONE, WARNING } = schedule + + const titleAction = `#${ID} ${sentenceCase(ACTION)}` + const timeIsRelative = isRelative(TIME) + + const time = timeIsRelative ? getPeriodicityByTimeInSeconds(TIME) : TIME + const formatTime = + !timeIsRelative && timeFromMilliseconds(+TIME).toFormat('ff') + const formatDoneTime = DONE && timeFromMilliseconds(+DONE).toFormat('ff') + + const { repeat, end } = getRepeatInformation(schedule) + + const noMore = !repeat && DONE + // const timeIsPast = new Date(+TIME * 1000) < new Date() + + return ( + +
+
+ {titleAction} + {MESSAGE && ( + + + + )} +
+ + {repeat && {repeat}} + {end && {end}} + {DONE && ( + + + + )} + {!noMore && ( + <> + + {timeIsRelative ? ( + {Object.values(time).join(' ')} + ) : ( + + + + )} + + {WARNING && } + + )} + +
+ {(handleUpdate || handleRemove) && ( +
+ {!noMore && handleUpdate && ( + + )} + {handleRemove && ( + + )} +
+ )} +
+ ) + } +) + +ScheduleActionCard.propTypes = { + vm: PropTypes.object, + schedule: PropTypes.object.isRequired, + handleRemove: PropTypes.func, + handleUpdate: PropTypes.func, +} + +ScheduleActionCard.displayName = 'ScheduleActionCard' + +export default ScheduleActionCard diff --git a/src/fireedge/src/client/components/Cards/index.js b/src/fireedge/src/client/components/Cards/index.js index 7ddffa2ddb..0219a1c8e9 100644 --- a/src/fireedge/src/client/components/Cards/index.js +++ b/src/fireedge/src/client/components/Cards/index.js @@ -24,6 +24,7 @@ import NetworkCard from 'client/components/Cards/NetworkCard' import PolicyCard from 'client/components/Cards/PolicyCard' import ProvisionCard from 'client/components/Cards/ProvisionCard' import ProvisionTemplateCard from 'client/components/Cards/ProvisionTemplateCard' +import ScheduleActionCard from 'client/components/Cards/ScheduleActionCard' import SelectCard from 'client/components/Cards/SelectCard' import TierCard from 'client/components/Cards/TierCard' import VirtualMachineCard from 'client/components/Cards/VirtualMachineCard' @@ -41,6 +42,7 @@ export { PolicyCard, ProvisionCard, ProvisionTemplateCard, + ScheduleActionCard, SelectCard, TierCard, VirtualMachineCard, diff --git a/src/fireedge/src/client/components/Dialogs/DialogForm.js b/src/fireedge/src/client/components/Dialogs/DialogForm.js index 7d9c674d3c..81324485ac 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogForm.js +++ b/src/fireedge/src/client/components/Dialogs/DialogForm.js @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ +import { useCallback, ReactElement } from 'react' import PropTypes from 'prop-types' +import { AnySchema } from 'yup' import clsx from 'clsx' import makeStyles from '@mui/styles/makeStyles' @@ -41,6 +42,17 @@ const useStyles = makeStyles((theme) => ({ }, })) +/** + * Creates dialog with a form inside. + * + * @param {object} props - Props + * @param {object} props.values - Default values + * @param {function():AnySchema} props.resolver - Resolver schema + * @param {function():Promise} props.handleSubmit - Submit function + * @param {object} props.dialogProps - Dialog props + * @param {ReactElement|ReactElement[]} props.children - Children element + * @returns {ReactElement} Dialog with form + */ const DialogForm = ({ values, resolver, @@ -63,9 +75,18 @@ const DialogForm = ({ resolver: yupResolver(resolver()), }) + const callbackSubmit = useCallback((formData) => { + const schemaData = resolver().cast(formData, { + context: formData, + isSubmit: true, + }) + + return handleSubmit(schemaData) + }) + return ( { - const defaultValue = multiple ? [values?.[0]?.value] : values?.[0]?.value + const firstValue = values?.[0]?.value ?? '' + const defaultValue = multiple ? [firstValue] : firstValue const { - field: { - ref, - value: optionSelected = defaultValue, - onChange, - ...inputProps - }, + field: { ref, value: optionSelected, onChange, ...inputProps }, fieldState: { error }, - } = useController({ name, control }) + } = useController({ name, control, defaultValue }) const needShrink = useMemo( () => diff --git a/src/fireedge/src/client/components/FormControl/TextController.js b/src/fireedge/src/client/components/FormControl/TextController.js index ca5b328d05..fa8b4d88b3 100644 --- a/src/fireedge/src/client/components/FormControl/TextController.js +++ b/src/fireedge/src/client/components/FormControl/TextController.js @@ -98,7 +98,7 @@ TextController.propTypes = { PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), - fieldProps: PropTypes.object, + fieldProps: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), } TextController.displayName = 'TextController' diff --git a/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js b/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js index c748124710..dc97988740 100644 --- a/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js +++ b/src/fireedge/src/client/components/Forms/ButtonToTriggerForm.js @@ -14,7 +14,7 @@ * limitations under the License. * * ------------------------------------------------------------------------- */ /* eslint-disable jsdoc/require-jsdoc */ -import { useState, useMemo } from 'react' +import { useState } from 'react' import PropTypes from 'prop-types' import { Grow, Menu, MenuItem, Typography, ListItemIcon } from '@mui/material' @@ -43,21 +43,18 @@ const ButtonToTriggerForm = ({ buttonProps = {}, options = [] }) => { const { display, show, hide, values: Form } = useDialog() const { onSubmit: handleSubmit, - form, + form: { + steps, + defaultValues, + resolver, + description, + fields, + transformBeforeSubmit, + } = {}, isConfirmDialog = false, dialogProps = {}, } = Form ?? {} - const formConfig = useMemo(() => form?.() ?? {}, [form]) - const { - steps, - defaultValues, - resolver, - description, - fields, - transformBeforeSubmit, - } = formConfig - const handleTriggerSubmit = async (formData) => { try { const data = transformBeforeSubmit?.(formData) ?? formData @@ -67,8 +64,10 @@ const ButtonToTriggerForm = ({ buttonProps = {}, options = [] }) => { } } - const openDialogForm = (formParams) => { - show(formParams) + const openDialogForm = async (formParams) => { + const formConfig = await formParams?.form?.() + + show({ ...formParams, form: formConfig }) handleClose() } @@ -129,25 +128,27 @@ const ButtonToTriggerForm = ({ buttonProps = {}, options = [] }) => { {...dialogProps} /> ) : ( - - {steps ? ( - - ) : ( - <> - {description} - - - )} - + resolver && ( + + {steps ? ( + + ) : ( + <> + {description} + + + )} + + ) ))} ) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/index.js new file mode 100644 index 0000000000..57133e0a76 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/index.js @@ -0,0 +1,111 @@ +/* ------------------------------------------------------------------------- * + * 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 { useMemo } from 'react' +import PropTypes from 'prop-types' +import { Stack, Typography, Divider } from '@mui/material' + +import { + timeToSecondsByPeriodicity, + transformChartersToSchedActions, + getFixedLeases, + getEditableLeases, +} from 'client/models/Scheduler' +import { createForm, sentenceCase } from 'client/utils' +import { + CHARTER_SCHEMA, + CHARTER_FIELDS, + RELATIVE_CHARTER_FIELDS, + RELATIVE_CHARTER_SCHEMA, +} from 'client/components/Forms/Vm/CreateCharterForm/schema' + +const FixedLeases = ({ leases }) => { + const fixedLeases = useMemo(() => getFixedLeases(leases), []) + + if (fixedLeases.length === 0) return null + + return ( + <> + + {transformChartersToSchedActions(fixedLeases, true)?.map((action) => { + const { ACTION, TIME, PERIOD, WARNING, WARNING_PERIOD } = action + + return ( + + + {`> ${sentenceCase(ACTION)} in ${TIME} ${PERIOD}`} + {WARNING && ` | Warning before ${WARNING} ${WARNING_PERIOD}`} + + + ) + })} + + + + ) +} + +FixedLeases.propTypes = { + leases: PropTypes.arrayOf( + PropTypes.shape({ + ACTION: PropTypes.string, + TIME: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + WARNING: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), + }) + ), +} + +const CreateCharterForm = createForm(CHARTER_SCHEMA, CHARTER_FIELDS, { + description: (leases) => , + transformInitialValue: (leases, schema) => { + const schedActions = transformChartersToSchedActions( + getEditableLeases(leases) + ) + + return schema.cast({ CHARTERS: schedActions }, { context: schedActions }) + }, + transformBeforeSubmit: (formData) => formData.CHARTERS, +}) + +const RelativeForm = createForm( + RELATIVE_CHARTER_SCHEMA, + RELATIVE_CHARTER_FIELDS, + { + description: (leases) => , + transformInitialValue: (leases, schema) => { + const schedActions = transformChartersToSchedActions( + getEditableLeases(leases), + true + ) + + return schema.cast({ CHARTERS: schedActions }, { context: schedActions }) + }, + transformBeforeSubmit: (formData) => + formData.CHARTERS?.map( + ({ TIME, PERIOD, WARNING, WARNING_PERIOD, ...lease }) => ({ + ...lease, + TIME: `+${timeToSecondsByPeriodicity(PERIOD, TIME)}`, + WARNING: `-${timeToSecondsByPeriodicity(WARNING_PERIOD, WARNING)}`, + }) + ), + } +) + +export { RelativeForm } + +export default CreateCharterForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/schema.js new file mode 100644 index 0000000000..aedbc89b6e --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateCharterForm/schema.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. * + * ------------------------------------------------------------------------- */ +import { array, object, ObjectSchema } from 'yup' + +import { + transformChartersToSchedActions, + getFixedLeases, + getEditableLeases, +} from 'client/models/Scheduler' +import { Field, getObjectSchemaFromFields } from 'client/utils' +import { + PUNCTUAL_FIELDS, + RELATIVE_FIELDS, +} from 'client/components/Forms/Vm/CreateSchedActionForm/fields' + +const punctualFields = [ + PUNCTUAL_FIELDS.ACTION_FIELD_FOR_CHARTERS, + PUNCTUAL_FIELDS.TIME_FIELD, +] +const relativeFields = [ + PUNCTUAL_FIELDS.ACTION_FIELD_FOR_CHARTERS, + RELATIVE_FIELDS.RELATIVE_TIME_FIELD, + RELATIVE_FIELDS.PERIOD_FIELD, +] + +/** + * @param {leases} leases - Leases from configuration yaml + * @param {Field[]} fields - Fields to map with charter index + * @returns {Field[]} Fields + */ +const mapFieldsWithIndex = (leases, fields) => + getEditableLeases(leases) + ?.map((_, idx) => + fields.map(({ name, ...field }) => ({ + ...field, + name: `CHARTERS.${idx}.${name}`, + })) + ) + .flat() + +/** + * @param {leases} leases - Leases from configuration yaml + * @param {Field[]} fields - Fields + * @param {boolean} [relative] + * - If `true`, the result will be transformed to relative times + * @returns {ObjectSchema} Charter schema + */ +const createCharterSchema = (leases, fields, relative = false) => + object({ + CHARTERS: array(getObjectSchemaFromFields(fields)) + .ensure() + .afterSubmit((values) => { + const fixedLeases = transformChartersToSchedActions( + getFixedLeases(leases), + relative + ) + + return [...values, ...fixedLeases] + }), + }) + +/** + * @param {object} leases - Leases from conf yaml + * @returns {Field[]} Punctual fields + */ +export const CHARTER_FIELDS = (leases) => + mapFieldsWithIndex(leases, punctualFields) + +/** + * @param {object} leases - Leases from conf yaml + * @returns {Field[]} Relative fields + */ +export const RELATIVE_CHARTER_FIELDS = (leases) => + mapFieldsWithIndex(leases, relativeFields) + +/** + * @param {object} leases - Leases from conf yaml + * @returns {ObjectSchema} Punctual Schema + */ +export const CHARTER_SCHEMA = (leases) => + createCharterSchema(leases, punctualFields) + +/** + * @param {object} leases - Leases from conf yaml + * @returns {ObjectSchema} Relative Schema + */ +export const RELATIVE_CHARTER_SCHEMA = (leases) => + createCharterSchema(leases, relativeFields, true) diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js deleted file mode 100644 index c61e01b3d5..0000000000 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/CommonSchema.js +++ /dev/null @@ -1,170 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import * as yup from 'yup' - -import { - INPUT_TYPES, - VM_ACTIONS, - VM_ACTIONS_WITH_SCHEDULE, -} from 'client/constants' -import { sentenceCase } from 'client/utils' -import { getSnapshotList, getDisks } from 'client/models/VirtualMachine' - -// ---------------------------------------------------------- -// Constants -// ---------------------------------------------------------- - -const ARGS_TYPES = { - DISK_ID: 'DISK_ID', - NAME: 'NAME', - SNAPSHOT_ID: 'SNAPSHOT_ID', -} - -const SCHED_ACTION_OPTIONS = VM_ACTIONS_WITH_SCHEDULE.map((action) => ({ - text: sentenceCase(action), - value: action, -})).sort() - -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] ?? [] - ) -} - -// ---------------------------------------------------------- -// Fields -// ---------------------------------------------------------- - -const createArgField = (type) => ({ - name: `ARGS.${type}`, - dependOf: ACTION_FIELD.name, - htmlType: (action) => - ARGS_BY_ACTION(action)?.includes(type) ? undefined : INPUT_TYPES.HIDDEN, -}) - -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 }, -} - -const ARGS_DISK_ID_FIELD = (vm) => { - const diskOptions = getDisks(vm).map(({ DISK_ID, IMAGE }) => ({ - text: IMAGE, - value: DISK_ID, - })) - - return { - ...createArgField(ARGS_TYPES.DISK_ID), - label: 'Disk', - type: INPUT_TYPES.SELECT, - values: [{ text: '', value: '' }].concat(diskOptions), - } -} - -const ARGS_NAME_FIELD = { - ...createArgField(ARGS_TYPES.NAME), - label: 'Snapshot name', - type: INPUT_TYPES.TEXT, -} - -const ARGS_SNAPSHOT_ID_FIELD = (vm) => { - const snapshotOptions = getSnapshotList(vm).map(({ SNAPSHOT_ID, NAME }) => ({ - text: NAME, - value: SNAPSHOT_ID, - })) - - return { - ...createArgField(ARGS_TYPES.SNAPSHOT_ID), - label: 'Snapshot', - type: INPUT_TYPES.SELECT, - values: [{ text: '', value: '' }].concat(snapshotOptions), - } -} - -export const COMMON_FIELDS = (vm) => - [ - ACTION_FIELD, - ARGS_DISK_ID_FIELD(vm), - ARGS_NAME_FIELD, - ARGS_SNAPSHOT_ID_FIELD(vm), - ].map((field) => (typeof field === 'function' ? field(vm) : field)) - -// ---------------------------------------------------------- -// Schema -// ---------------------------------------------------------- - -const transformStringToArgs = ({ ACTION, ARGS = {} }) => { - if (typeof ARGS !== 'string') return ARGS - - // IMPORTANT - String data from ARGS has strict order: DISK_ID, NAME, SNAPSHOT_ID - const [arg1, arg2] = ARGS.split(',') - - return ( - { - [VM_ACTIONS.SNAPSHOT_DISK_CREATE]: { DISK_ID: arg1, NAME: arg2 }, - [VM_ACTIONS.SNAPSHOT_DISK_REVERT]: { DISK_ID: arg1, SNAPSHOT_ID: arg2 }, - [VM_ACTIONS.SNAPSHOT_DISK_DELETE]: { DISK_ID: arg1, SNAPSHOT_ID: arg2 }, - [VM_ACTIONS.SNAPSHOT_CREATE]: { NAME: arg1 }, - [VM_ACTIONS.SNAPSHOT_REVERT]: { SNAPSHOT_ID: arg1 }, - [VM_ACTIONS.SNAPSHOT_DELETE]: { SNAPSHOT_ID: arg1 }, - }[ACTION] ?? {} - ) -} - -const createArgSchema = (field) => - yup - .string() - .trim() - .default(() => undefined) - .required(`${field} field is required`) - -const ARG_SCHEMAS = { - [ARGS_TYPES.DISK_ID]: createArgSchema('Disk'), - [ARGS_TYPES.NAME]: createArgSchema('Snapshot name'), - [ARGS_TYPES.SNAPSHOT_ID]: createArgSchema('Snapshot'), -} - -export const COMMON_SCHEMA = yup - .object({ - [ACTION_FIELD.name]: ACTION_FIELD.validation, - ARGS: yup - .object() - .default(() => undefined) - .when(ACTION_FIELD.name, (action, schema) => - ARGS_BY_ACTION(action) - .map((arg) => yup.object({ [arg]: ARG_SCHEMAS[arg] })) - .reduce((result, argSchema) => result.concat(argSchema), schema) - ), - }) - .transform((value) => ({ ...value, ARGS: transformStringToArgs(value) })) 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 deleted file mode 100644 index 047d2df464..0000000000 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/index.js +++ /dev/null @@ -1,52 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -import { isoDateToMilliseconds } from 'client/models/Helper' -import { createForm } from 'client/utils' -import { - SCHEMA, - FIELDS, -} from 'client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema' - -const PunctualForm = createForm(SCHEMA, FIELDS, { - transformBeforeSubmit: (formData) => { - const { - ARGS, - TIME: time, - END_VALUE, - END_TYPE, - PERIODIC: _, - ...restOfData - } = formData - const argValues = Object.values(ARGS) - - const newSchedAction = { - TIME: isoDateToMilliseconds(time), - END_TYPE, - ...restOfData, - } - - argValues.length && (newSchedAction.ARGS = argValues.join(',')) - - if (END_VALUE) { - newSchedAction.END_VALUE = - END_TYPE === '1' ? END_VALUE : isoDateToMilliseconds(END_VALUE) - } - - return newSchedAction - }, -}) - -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 deleted file mode 100644 index b49fea6b4f..0000000000 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/PunctualForm/schema.js +++ /dev/null @@ -1,266 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import * as yup from 'yup' -import { DateTime } from 'luxon' - -import { T, INPUT_TYPES } from 'client/constants' -import { getValidationFromFields, sentenceCase } 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: sentenceCase(text), - value, -})) - -const END_TYPE_OPTIONS = Object.entries(END_TYPE_VALUES).map( - ([text, value]) => ({ text: sentenceCase(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: 'Granularity of the action', - type: INPUT_TYPES.SELECT, - dependOf: PERIODIC_FIELD.name, - htmlType: (isPeriodic) => (!isPeriodic ? INPUT_TYPES.HIDDEN : undefined), - values: REPEAT_OPTIONS, - validation: yup - .string() - .trim() - .default(REPEAT_OPTIONS[0].value) - .when(PERIODIC_FIELD.name, (isPeriodic, schema) => - isPeriodic ? schema : schema.strip().notRequired() - ), -} - -const DAYS_FIELD = { - name: 'DAYS', - dependOf: [REPEAT_FIELD.name, PERIODIC_FIELD.name], - multiple: ([repeat] = []) => REPEAT_VALUES.WEEKLY === repeat, - type: ([repeat] = []) => - REPEAT_VALUES.WEEKLY === repeat ? INPUT_TYPES.SELECT : INPUT_TYPES.TEXT, - label: ([repeat] = []) => - ({ - [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: ([repeat, isPeriodic] = []) => { - if (!isPeriodic) return INPUT_TYPES.HIDDEN - if (repeat === REPEAT_VALUES.HOURLY) return 'number' - }, - 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] ?? schema) - ) - .when(PERIODIC_FIELD.name, (isPeriodic, schema) => - isPeriodic ? schema : schema.strip().notRequired() - ), - 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() - .default(END_TYPE_OPTIONS[0].value) - .when(PERIODIC_FIELD.name, (isPeriodic, schema) => - isPeriodic ? schema : schema.strip().notRequired() - ), -} - -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 || END_TYPE_VALUES.NEVER === endType) - return INPUT_TYPES.HIDDEN - - return { - [END_TYPE_VALUES.REPETITION]: 'number', - [END_TYPE_VALUES.DATE]: 'datetime-local', - }[endType] - }, - validation: yup - .string() - .trim() - .default(undefined) - .when( - END_TYPE_FIELD.name, - (endType, schema) => - ({ - [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] ?? schema) - ), -} - -export const PUNCTUAL_FIELDS = [ - TIME_FIELD, - PERIODIC_FIELD, - REPEAT_FIELD, - DAYS_FIELD, - END_TYPE_FIELD, - END_VALUE_FIELD, -] - -export const FIELDS = (vm) => [...COMMON_FIELDS(vm), ...PUNCTUAL_FIELDS] - -export const SCHEMA = yup - .object(getValidationFromFields(PUNCTUAL_FIELDS)) - .concat(COMMON_SCHEMA) - .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 deleted file mode 100644 index 4f3a4f15a8..0000000000 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -import { createForm } from 'client/utils' -import { - SCHEMA, - FIELDS, -} from 'client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema' - -const RelativeForm = createForm(SCHEMA, FIELDS, { - transformBeforeSubmit: (formData) => { - const { ARGS, TIME: time, PERIOD: _, ...restOfData } = formData - const argValues = Object.values(ARGS) - - const newSchedAction = { TIME: `+${time}`, ...restOfData } - - argValues.length && (newSchedAction.ARGS = argValues.join(',')) - - return newSchedAction - }, -}) - -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 deleted file mode 100644 index 4162b5df44..0000000000 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/RelativeForm/schema.js +++ /dev/null @@ -1,102 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import * as yup from 'yup' - -import { INPUT_TYPES } from 'client/constants' -import { getValidationFromFields, upperCaseFirst } 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: upperCaseFirst(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 RELATIVE_FIELDS = [TIME_FIELD, PERIOD_FIELD] - -export const FIELDS = (vm) => [...COMMON_FIELDS(vm), ...RELATIVE_FIELDS] - -export const SCHEMA = yup - .object(getValidationFromFields(RELATIVE_FIELDS)) - .concat(COMMON_SCHEMA) - .transform( - ({ [PERIOD_FIELD.name]: PERIOD, [TIME_FIELD.name]: TIME, ...rest }) => { - 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( - ([_, value]) => value >= 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/fields.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/fields.js new file mode 100644 index 0000000000..52b7598f3e --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/fields.js @@ -0,0 +1,474 @@ +/* ------------------------------------------------------------------------- * + * 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 { DateTime } from 'luxon' +import { ref, mixed, boolean, string, date, lazy, array, number } from 'yup' + +import { + T, + INPUT_TYPES, + VM_ACTIONS_IN_CHARTER, + VM_ACTIONS_WITH_SCHEDULE, +} from 'client/constants' +import { Field, sentenceCase, arrayToOptions } from 'client/utils' +import { + isRelative, + END_TYPE_VALUES, + REPEAT_VALUES, + ARGS_TYPES, + getRequiredArgsByAction, + PERIOD_TYPES, + getPeriodicityByTimeInSeconds, +} from 'client/models/Scheduler' +import { + isDate, + timeFromMilliseconds, + dateToMilliseconds, +} from 'client/models/Helper' +import { getSnapshotList, getDisks } from 'client/models/VirtualMachine' + +// -------------------------------------------------------- +// Constants +// -------------------------------------------------------- + +/** @type {RegExp} Regex to days of month (1-31) */ +const MONTH_DAYS_REG = /^(3[01]|[12][0-9]|[1-9])(,(3[01]|[12][0-9]|[1-9]))*$/ + +/** @type {RegExp} Regex to days of year (1-365) */ +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 DAYS_OF_WEEK = [ + T.Sunday, + T.Monday, + T.Tuesday, + T.Wednesday, + T.Thursday, + T.Friday, + T.Saturday, +] + +const getNow = () => DateTime.now() + +const getTomorrow = () => getNow().plus({ days: 1 }) + +const getTomorrowAtMidnight = () => + getTomorrow().set({ hour: 12, minute: 0, second: 0 }) + +const getNextWeek = () => getNow().plus({ weeks: 1 }) + +const parseDateString = (_, originalValue) => { + if (isDate(originalValue)) return originalValue // is JS Date + if (originalValue?.isValid) return originalValue.toJSDate() // is luxon DateTime + + const newValueInSeconds = isRelative(originalValue) + ? getPeriodicityByTimeInSeconds(originalValue)?.time + : originalValue + + return timeFromMilliseconds(newValueInSeconds).toJSDate() // is millisecond format +} + +// -------------------------------------------------------- +// Fields +// -------------------------------------------------------- + +const createArgField = (argName) => ({ + name: `ARGS.${argName}`, + dependOf: ACTION_FIELD.name, + htmlType: (action) => + !getRequiredArgsByAction(action)?.includes(argName) && INPUT_TYPES.HIDDEN, +}) + +/** @type {Field} Action name field */ +const ACTION_FIELD = { + name: 'ACTION', + label: T.Action, + type: INPUT_TYPES.SELECT, + values: arrayToOptions(VM_ACTIONS_WITH_SCHEDULE, { + addEmpty: false, + getText: (action) => sentenceCase(action), + }), + validation: string().trim().required(), + grid: { xs: 12 }, +} + +/** @type {Field} Action name field */ +const ACTION_FIELD_FOR_CHARTERS = { + ...ACTION_FIELD, + values: arrayToOptions(VM_ACTIONS_IN_CHARTER, { + addEmpty: false, + getText: (action) => sentenceCase(action), + }), +} + +/** + * @param {object} vm - Vm resource + * @returns {Field} Disk id field + */ +const ARGS_DISK_ID_FIELD = (vm) => ({ + ...createArgField(ARGS_TYPES.DISK_ID), + label: T.Disk, + type: INPUT_TYPES.SELECT, + values: arrayToOptions(getDisks(vm), { + getText: ({ IMAGE_ID, IMAGE, NAME } = {}) => { + const isVolatile = !IMAGE && !IMAGE_ID + + return isVolatile ? NAME : `${NAME}: ${IMAGE}` + }, + getValue: ({ DISK_ID } = {}) => DISK_ID, + }), +}) + +/** @type {Field} Snapshot name field */ +const ARGS_NAME_FIELD = { + ...createArgField(ARGS_TYPES.NAME), + label: T.SnapshotName, + type: INPUT_TYPES.TEXT, +} + +/** + * @param {object} vm - Vm resource + * @returns {Field} Snapshot id field + */ +const ARGS_SNAPSHOT_ID_FIELD = (vm) => ({ + ...createArgField(ARGS_TYPES.SNAPSHOT_ID), + label: T.Snapshot, + type: INPUT_TYPES.SELECT, + values: arrayToOptions(getSnapshotList(vm), { + getText: ({ NAME } = {}) => NAME, + getValue: ({ SNAPSHOT_ID } = {}) => SNAPSHOT_ID, + }), +}) + +/** @type {Field} Periodic field */ +const PERIODIC_FIELD = { + name: 'PERIODIC', + label: T.Periodic, + type: INPUT_TYPES.SWITCH, + validation: lazy((_, { context }) => + boolean().default( + () => !!(context?.[DAYS_FIELD.name] || context?.[REPEAT_FIELD.name]) + ) + ), + grid: { md: 12 }, +} + +/** @type {Field} Time field */ +const TIME_FIELD = { + name: 'TIME', + label: T.Time, + type: INPUT_TYPES.TIME, + validation: lazy(() => + date() + .min(getNow().toJSDate()) + .required() + .transform(parseDateString) + .afterSubmit(dateToMilliseconds) + ), + fieldProps: { + defaultValue: getTomorrowAtMidnight(), + minDateTime: getNow(), + }, +} + +// -------------------------------------------------------- +// Repeat fields +// -------------------------------------------------------- + +/** @type {Field} Granularity of action */ +const REPEAT_FIELD = { + name: 'REPEAT', + label: T.GranularityOfAction, + type: INPUT_TYPES.SELECT, + dependOf: PERIODIC_FIELD.name, + htmlType: (isPeriodic) => (!isPeriodic ? INPUT_TYPES.HIDDEN : undefined), + values: arrayToOptions(Object.keys(REPEAT_VALUES), { + addEmpty: false, + getText: (key) => sentenceCase(key), + getValue: (key) => REPEAT_VALUES[key], + }), + validation: string() + .trim() + .required() + .default(() => REPEAT_VALUES.WEEKLY) + .when(PERIODIC_FIELD.name, { + is: false, + then: (schema) => schema.strip().notRequired(), + }), +} + +/** @type {Field} Weekly field */ +const WEEKLY_FIELD = { + name: 'WEEKLY', + dependOf: [REPEAT_FIELD.name, PERIODIC_FIELD.name], + type: INPUT_TYPES.SELECT, + multiple: true, + label: T.DayOfWeek, + values: arrayToOptions(DAYS_OF_WEEK, { + addEmpty: false, + getValue: (_, index) => String(index), + }), + htmlType: ([repeatType, isPeriodic] = []) => + (!isPeriodic || repeatType !== REPEAT_VALUES.WEEKLY) && INPUT_TYPES.HIDDEN, + validation: lazy((_, { context }) => + array(string()) + .required(T.DaysBetween0_6) + .min(1) + .default(() => context?.[DAYS_FIELD.name]?.split?.(',') ?? []) + .when([PERIODIC_FIELD.name, REPEAT_FIELD.name], { + is: (isPeriodic, repeatType) => + !isPeriodic || repeatType !== REPEAT_VALUES.WEEKLY, + then: (schema) => schema.strip().notRequired(), + }) + .afterSubmit((value) => value?.join?.(',')) + ), +} + +/** @type {Field} Monthly field */ +const MONTHLY_FIELD = { + name: 'MONTHLY', + dependOf: [REPEAT_FIELD.name, PERIODIC_FIELD.name], + type: INPUT_TYPES.TEXT, + label: T.DayOfMonth, + htmlType: ([repeatType, isPeriodic] = []) => + (!isPeriodic || repeatType !== REPEAT_VALUES.MONTHLY) && INPUT_TYPES.HIDDEN, + validation: lazy((_, { context }) => + string() + .trim() + .matches(MONTH_DAYS_REG, { message: T.DaysBetween1_31 }) + .required() + .default(() => context?.[DAYS_FIELD.name]) + .when([PERIODIC_FIELD.name, REPEAT_FIELD.name], { + is: (isPeriodic, repeatType) => + !isPeriodic || repeatType !== REPEAT_VALUES.MONTHLY, + then: (schema) => schema.strip().notRequired(), + }) + ), +} + +/** @type {Field} Yearly field */ +const YEARLY_FIELD = { + name: 'YEARLY', + dependOf: [REPEAT_FIELD.name, PERIODIC_FIELD.name], + type: INPUT_TYPES.TEXT, + label: T.DayOfYear, + htmlType: ([repeatType, isPeriodic] = []) => + (!isPeriodic || repeatType !== REPEAT_VALUES.YEARLY) && INPUT_TYPES.HIDDEN, + validation: lazy((_, { context }) => + string() + .trim() + .matches(YEAR_DAYS_REG, { message: T.DaysBetween0_365 }) + .required() + .default(() => context?.[DAYS_FIELD.name]) + .when([PERIODIC_FIELD.name, REPEAT_FIELD.name], { + is: (isPeriodic, repeatType) => + !isPeriodic || repeatType !== REPEAT_VALUES.YEARLY, + then: (schema) => schema.strip().notRequired(), + }) + ), +} + +/** @type {Field} Hourly field */ +const HOURLY_FIELD = { + name: 'HOURLY', + dependOf: [REPEAT_FIELD.name, PERIODIC_FIELD.name], + type: INPUT_TYPES.TEXT, + label: T.EachXHours, + htmlType: ([repeatType, isPeriodic] = []) => + !isPeriodic || repeatType !== REPEAT_VALUES.HOURLY + ? INPUT_TYPES.HIDDEN + : 'number', + validation: lazy((_, { context }) => + number() + .min(0) + .max(168) + .integer() + .required() + .default(() => context?.[DAYS_FIELD.name]) + .when([PERIODIC_FIELD.name, REPEAT_FIELD.name], { + is: (isPeriodic, repeatType) => + !isPeriodic || repeatType !== REPEAT_VALUES.HOURLY, + then: (schema) => schema.strip().notRequired(), + }) + .afterSubmit((value) => `${value}`) + ), + fieldProps: { min: 0, max: 168, step: 1 }, +} + +/** + * This field is only used to transform the number of the days that + * the users wants execute the action: weekly, monthly, yearly or hourly + * + * ** Depends of {@link PERIODIC_FIELD} and {@link REPEAT_FIELD} fields ** + * + * @type {Field} Days field + */ +const DAYS_FIELD = { + name: 'DAYS', + validation: string().afterSubmit((_, { parent }) => { + const isPeriodic = !!parent?.[PERIODIC_FIELD.name] + const repeatType = parent?.[REPEAT_FIELD.name] + + if (!isPeriodic) return undefined + + const { WEEKLY, MONTHLY, YEARLY, HOURLY } = REPEAT_VALUES + + return { + [WEEKLY]: parent?.[WEEKLY_FIELD.name], + [MONTHLY]: parent?.[MONTHLY_FIELD.name], + [YEARLY]: parent?.[YEARLY_FIELD.name], + [HOURLY]: parent?.[HOURLY_FIELD.name], + }[repeatType] + }), +} + +// -------------------------------------------------------- +// End fields +// -------------------------------------------------------- + +/** @type {Field} End type field */ +const END_TYPE_FIELD = { + name: 'END_TYPE', + label: T.EndType, + type: INPUT_TYPES.SELECT, + dependOf: PERIODIC_FIELD.name, + htmlType: (isPeriodic) => !isPeriodic && INPUT_TYPES.HIDDEN, + values: arrayToOptions(Object.keys(END_TYPE_VALUES), { + addEmpty: false, + getText: (value) => sentenceCase(value), + getValue: (value) => END_TYPE_VALUES[value], + }), + validation: string() + .trim() + .required() + .default(() => END_TYPE_VALUES.NEVER) + .when(PERIODIC_FIELD.name, { + is: false, + then: (schema) => schema.strip().notRequired(), + }), +} + +/** @type {Field} End value field */ +const END_VALUE_FIELD = { + name: 'END_VALUE', + label: T.WhenYouWantThatTheActionFinishes, + dependOf: [PERIODIC_FIELD.name, END_TYPE_FIELD.name], + type: ([_, endType] = []) => + endType === END_TYPE_VALUES.DATE ? INPUT_TYPES.TIME : INPUT_TYPES.TEXT, + htmlType: ([isPeriodic, endType] = []) => + !isPeriodic || endType === END_TYPE_VALUES.NEVER + ? INPUT_TYPES.HIDDEN + : 'number', + validation: mixed().when( + END_TYPE_FIELD.name, + (endType) => + ({ + [END_TYPE_VALUES.NEVER]: string().strip(), + [END_TYPE_VALUES.REPETITION]: number().required().min(1).default(1), + [END_TYPE_VALUES.DATE]: lazy(() => + date() + .min(ref(TIME_FIELD.name)) + .required() + .transform(parseDateString) + .afterSubmit(dateToMilliseconds) + ), + }[endType]) + ), + fieldProps: ([_, endType] = []) => + endType === END_TYPE_VALUES.DATE && { defaultValue: getNextWeek() }, +} + +// -------------------------------------------------------- +// Relative fields +// -------------------------------------------------------- + +/** @type {Field} Relative time field */ +export const RELATIVE_TIME_FIELD = { + name: 'TIME', + label: T.TimeAfterTheVmIsInstantiated, + type: INPUT_TYPES.TEXT, + htmlType: 'number', + validation: number() + .required() + .positive() + .transform((value, originalValue) => + isRelative(originalValue) + ? getPeriodicityByTimeInSeconds(originalValue)?.time + : value + ), +} + +/** @type {Field} Periodicity type field */ +export const PERIOD_FIELD = { + name: 'PERIOD', + label: T.PeriodType, + type: INPUT_TYPES.SELECT, + values: arrayToOptions(Object.keys(PERIOD_TYPES), { + addEmpty: false, + getText: (key) => sentenceCase(key), + getValue: (key) => PERIOD_TYPES[key], + }), + validation: lazy((_, { context }) => + string() + .trim() + .required() + .default( + () => + getPeriodicityByTimeInSeconds(context?.[TIME_FIELD.name])?.period ?? + PERIOD_TYPES.YEARS + ) + ), +} + +/** + * Filters the types to discard absolute times. + * + * @see {@linkplain https://github.com/OpenNebula/one/issues/5673 Waiting support from scheduler} + * @type {Field} End types available to relative actions + */ +const END_TYPE_FIELD_WITHOUT_DATE = { + ...END_TYPE_FIELD, + values: END_TYPE_FIELD.values.filter( + ({ value }) => value !== END_TYPE_VALUES.DATE + ), +} + +// -------------------------------------------------------- +// Export +// -------------------------------------------------------- + +export const RELATIVE_FIELDS = { + RELATIVE_TIME_FIELD, + PERIOD_FIELD, + END_TYPE_FIELD_WITHOUT_DATE, +} + +export const PUNCTUAL_FIELDS = { + ACTION_FIELD, + ACTION_FIELD_FOR_CHARTERS, + TIME_FIELD, + ARGS_NAME_FIELD, + ARGS_DISK_ID_FIELD, + ARGS_SNAPSHOT_ID_FIELD, + PERIODIC_FIELD, + REPEAT_FIELD, + WEEKLY_FIELD, + MONTHLY_FIELD, + YEARLY_FIELD, + HOURLY_FIELD, + DAYS_FIELD, + END_TYPE_FIELD, + END_VALUE_FIELD, +} diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js index 264925f7d9..1c758e2348 100644 --- a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/index.js @@ -13,7 +13,57 @@ * 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' +import { + timeToSecondsByPeriodicity, + transformStringToArgsObject, +} from 'client/models/Scheduler' +import { createForm } from 'client/utils' -export { PunctualForm, RelativeForm } +import { + SCHED_SCHEMA, + SCHED_FIELDS, + RELATIVE_SCHED_SCHEMA, + RELATIVE_SCHED_FIELDS, +} from 'client/components/Forms/Vm/CreateSchedActionForm/schema' + +const commonTransformInitialValue = (scheduledAction, schema) => { + const dataToCast = { + ...scheduledAction, + // get action arguments from ARGS + ARGS: transformStringToArgsObject(scheduledAction), + } + + return schema.cast(dataToCast, { context: scheduledAction }) +} + +const commonTransformBeforeSubmit = (formData) => { + const { WEEKLY, MONTHLY, YEARLY, HOURLY, PERIODIC, ARGS, ...filteredData } = + formData + + // transform action arguments to string + const argValues = Object.values(ARGS ?? {})?.filter(Boolean) + argValues.length && (filteredData.ARGS = argValues.join(',')) + + return filteredData +} + +const CreateSchedActionForm = createForm(SCHED_SCHEMA, SCHED_FIELDS, { + transformInitialValue: commonTransformInitialValue, + transformBeforeSubmit: commonTransformBeforeSubmit, +}) + +const RelativeForm = createForm(RELATIVE_SCHED_SCHEMA, RELATIVE_SCHED_FIELDS, { + transformInitialValue: commonTransformInitialValue, + transformBeforeSubmit: (formData) => { + const { PERIOD, TIME, ...restData } = commonTransformBeforeSubmit(formData) + + return { + ...restData, + TIME: `+${timeToSecondsByPeriodicity(PERIOD, TIME)}`, + } + }, +}) + +export { RelativeForm } + +export default CreateSchedActionForm diff --git a/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/schema.js b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/schema.js new file mode 100644 index 0000000000..a4bf602d07 --- /dev/null +++ b/src/fireedge/src/client/components/Forms/Vm/CreateSchedActionForm/schema.js @@ -0,0 +1,117 @@ +/* ------------------------------------------------------------------------- * + * 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 { string, object, ObjectSchema } from 'yup' + +import { ARGS_TYPES, getRequiredArgsByAction } from 'client/models/Scheduler' +import { Field, getObjectSchemaFromFields } from 'client/utils' +import { + PUNCTUAL_FIELDS, + RELATIVE_FIELDS, +} from 'client/components/Forms/Vm/CreateSchedActionForm/fields' + +const { ACTION_FIELD } = PUNCTUAL_FIELDS + +const ARG_SCHEMA = string() + .trim() + .required() + .default(() => undefined) + +const ARG_SCHEMAS = { + [ARGS_TYPES.DISK_ID]: ARG_SCHEMA, + [ARGS_TYPES.NAME]: ARG_SCHEMA, + [ARGS_TYPES.SNAPSHOT_ID]: ARG_SCHEMA, +} + +/** + * @param {object} vm - Vm resource + * @returns {Field[]} Common fields + */ +const COMMON_FIELDS = (vm) => [ + PUNCTUAL_FIELDS.ARGS_NAME_FIELD, + PUNCTUAL_FIELDS.ARGS_DISK_ID_FIELD(vm), + PUNCTUAL_FIELDS.ARGS_SNAPSHOT_ID_FIELD(vm), + PUNCTUAL_FIELDS.PERIODIC_FIELD, + PUNCTUAL_FIELDS.REPEAT_FIELD, + PUNCTUAL_FIELDS.WEEKLY_FIELD, + PUNCTUAL_FIELDS.MONTHLY_FIELD, + PUNCTUAL_FIELDS.YEARLY_FIELD, + PUNCTUAL_FIELDS.HOURLY_FIELD, +] + +/** @type {ObjectSchema} Common schema with relative */ +const COMMON_SCHEMA = object({ + [ACTION_FIELD.name]: ACTION_FIELD.validation, + ARGS: object().when(ACTION_FIELD.name, (action) => + getRequiredArgsByAction(action) + .map((arg) => object({ [arg]: ARG_SCHEMAS[arg] })) + .reduce((result, argSchema) => result.concat(argSchema), object()) + ), +}) + +/** + * @param {object} vm - Vm resource + * @returns {Field[]} Fields + */ +export const SCHED_FIELDS = (vm) => [ + PUNCTUAL_FIELDS.ACTION_FIELD, + PUNCTUAL_FIELDS.TIME_FIELD, + ...COMMON_FIELDS(vm), + PUNCTUAL_FIELDS.END_TYPE_FIELD, + PUNCTUAL_FIELDS.END_VALUE_FIELD, +] + +/** @type {Field[]} Fields for relative actions */ +export const RELATIVE_SCHED_FIELDS = (vm) => [ + PUNCTUAL_FIELDS.ACTION_FIELD, + RELATIVE_FIELDS.RELATIVE_TIME_FIELD, + RELATIVE_FIELDS.PERIOD_FIELD, + ...COMMON_FIELDS(vm), + RELATIVE_FIELDS.END_TYPE_FIELD_WITHOUT_DATE, + PUNCTUAL_FIELDS.END_VALUE_FIELD, +] + +/** @type {ObjectSchema} Schema */ +export const SCHED_SCHEMA = COMMON_SCHEMA.concat( + getObjectSchemaFromFields([ + PUNCTUAL_FIELDS.TIME_FIELD, + PUNCTUAL_FIELDS.PERIODIC_FIELD, + PUNCTUAL_FIELDS.REPEAT_FIELD, + PUNCTUAL_FIELDS.WEEKLY_FIELD, + PUNCTUAL_FIELDS.MONTHLY_FIELD, + PUNCTUAL_FIELDS.YEARLY_FIELD, + PUNCTUAL_FIELDS.HOURLY_FIELD, + PUNCTUAL_FIELDS.DAYS_FIELD, + PUNCTUAL_FIELDS.END_TYPE_FIELD, + PUNCTUAL_FIELDS.END_VALUE_FIELD, + ]) +) + +/** @type {ObjectSchema} Relative Schema */ +export const RELATIVE_SCHED_SCHEMA = COMMON_SCHEMA.concat( + getObjectSchemaFromFields([ + RELATIVE_FIELDS.RELATIVE_TIME_FIELD, + RELATIVE_FIELDS.PERIOD_FIELD, + PUNCTUAL_FIELDS.PERIODIC_FIELD, + PUNCTUAL_FIELDS.REPEAT_FIELD, + PUNCTUAL_FIELDS.WEEKLY_FIELD, + PUNCTUAL_FIELDS.MONTHLY_FIELD, + PUNCTUAL_FIELDS.YEARLY_FIELD, + PUNCTUAL_FIELDS.HOURLY_FIELD, + PUNCTUAL_FIELDS.DAYS_FIELD, + RELATIVE_FIELDS.END_TYPE_FIELD_WITHOUT_DATE, + PUNCTUAL_FIELDS.END_VALUE_FIELD, + ]) +) diff --git a/src/fireedge/src/client/components/Forms/Vm/index.js b/src/fireedge/src/client/components/Forms/Vm/index.js index 2e3c0d7494..009453a7a6 100644 --- a/src/fireedge/src/client/components/Forms/Vm/index.js +++ b/src/fireedge/src/client/components/Forms/Vm/index.js @@ -13,30 +13,169 @@ * See the License for the specific language governing permissions and * * limitations under the License. * * ------------------------------------------------------------------------- */ -import AttachNicForm from 'client/components/Forms/Vm/AttachNicForm' -import ChangeUserForm from 'client/components/Forms/Vm/ChangeUserForm' -import ChangeGroupForm from 'client/components/Forms/Vm/ChangeGroupForm' -import CreateDiskSnapshotForm from 'client/components/Forms/Vm/CreateDiskSnapshotForm' -import CreateSnapshotForm from 'client/components/Forms/Vm/CreateSnapshotForm' -import MigrateForm from 'client/components/Forms/Vm/MigrateForm' -import RecoverForm from 'client/components/Forms/Vm/RecoverForm' -import ResizeCapacityForm from 'client/components/Forms/Vm/ResizeCapacityForm' -import ResizeDiskForm from 'client/components/Forms/Vm/ResizeDiskForm' -import SaveAsDiskForm from 'client/components/Forms/Vm/SaveAsDiskForm' -import SaveAsTemplateForm from 'client/components/Forms/Vm/SaveAsTemplateForm' -export * from 'client/components/Forms/Vm/AttachDiskForm' -export * from 'client/components/Forms/Vm/CreateSchedActionForm' +import loadable, { Options } from '@loadable/component' +import { CreateFormCallback, CreateStepsCallback } from 'client/utils/schema' + +/** + * @param {object} properties - Dynamic properties + * @param {string} properties.formPath - Form pathname + * @param {string} [properties.componentToLoad] - Load different component instead of default + * @param {Options} [properties.options] - Options + * @param {...any} args - Arguments + * @returns {CreateFormCallback|CreateStepsCallback} Resolved form + */ +const AsyncLoadForm = async (properties = {}, ...args) => { + const { formPath, componentToLoad = 'default', options } = properties + + const form = await loadable(() => import(`./${formPath}`), { + cacheKey: () => formPath, + ...options, + }).load() + + return form[componentToLoad]?.(...args) +} + +/** + * @param {...any} args - Arguments + * @returns {CreateStepsCallback} Asynchronous loaded form + */ +const ImageSteps = (...args) => + AsyncLoadForm({ formPath: 'AttachDiskForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateStepsCallback} Asynchronous loaded form + */ +const VolatileSteps = (...args) => + AsyncLoadForm({ formPath: 'AttachDiskForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const AttachNicForm = (...args) => + AsyncLoadForm({ formPath: 'AttachNicForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const ChangeUserForm = (...args) => + AsyncLoadForm({ formPath: 'ChangeUserForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const ChangeGroupForm = (...args) => + AsyncLoadForm({ formPath: 'ChangeGroupForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateDiskSnapshotForm = (...args) => + AsyncLoadForm({ formPath: 'CreateDiskSnapshotForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateSnapshotForm = (...args) => + AsyncLoadForm({ formPath: 'CreateSnapshotForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const MigrateForm = (...args) => + AsyncLoadForm({ formPath: 'MigrateForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const RecoverForm = (...args) => + AsyncLoadForm({ formPath: 'RecoverForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const ResizeCapacityForm = (...args) => + AsyncLoadForm({ formPath: 'ResizeCapacityForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const ResizeDiskForm = (...args) => + AsyncLoadForm({ formPath: 'ResizeDiskForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const SaveAsDiskForm = (...args) => + AsyncLoadForm({ formPath: 'SaveAsDiskForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const SaveAsTemplateForm = (...args) => + AsyncLoadForm({ formPath: 'SaveAsTemplateForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateSchedActionForm = (...args) => + AsyncLoadForm({ formPath: 'CreateSchedActionForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateRelativeSchedActionForm = (...args) => + AsyncLoadForm( + { formPath: 'CreateSchedActionForm', componentToLoad: 'RelativeForm' }, + ...args + ) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateCharterForm = (...args) => + AsyncLoadForm({ formPath: 'CreateCharterForm' }, ...args) + +/** + * @param {...any} args - Arguments + * @returns {CreateFormCallback} Asynchronous loaded form + */ +const CreateRelativeCharterForm = (...args) => + AsyncLoadForm( + { formPath: 'CreateCharterForm', componentToLoad: 'RelativeForm' }, + ...args + ) export { AttachNicForm, - ChangeUserForm, ChangeGroupForm, + ChangeUserForm, + CreateCharterForm, CreateDiskSnapshotForm, + CreateRelativeCharterForm, + CreateRelativeSchedActionForm, + CreateSchedActionForm, CreateSnapshotForm, + ImageSteps, MigrateForm, RecoverForm, ResizeCapacityForm, ResizeDiskForm, SaveAsDiskForm, SaveAsTemplateForm, + VolatileSteps, } diff --git a/src/fireedge/src/client/components/Forms/VmTemplate/CreateForm/Steps/ExtraConfiguration/scheduleAction.js b/src/fireedge/src/client/components/Forms/VmTemplate/CreateForm/Steps/ExtraConfiguration/scheduleAction.js index f19e3bdfb2..11fab28586 100644 --- a/src/fireedge/src/client/components/Forms/VmTemplate/CreateForm/Steps/ExtraConfiguration/scheduleAction.js +++ b/src/fireedge/src/client/components/Forms/VmTemplate/CreateForm/Steps/ExtraConfiguration/scheduleAction.js @@ -13,16 +13,12 @@ * 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 { Stack } from '@mui/material' -import { Calendar as ActionIcon, Edit, Trash } from 'iconoir-react' +import { Calendar as ActionIcon } from 'iconoir-react' import { useFieldArray } from 'react-hook-form' -import ButtonToTriggerForm from 'client/components/Forms/ButtonToTriggerForm' -import SelectCard, { Action } from 'client/components/Cards/SelectCard' -import { PunctualForm, RelativeForm } from 'client/components/Forms/Vm' -import { Translate } from 'client/components/HOC' +import { ScheduleActionCard } from 'client/components/Cards' +import { CreateSchedButton, CharterButton } from 'client/components/Buttons' import { STEP_ID as EXTRA_ID, @@ -43,42 +39,36 @@ const ScheduleAction = () => { append, } = useFieldArray({ name: `${EXTRA_ID}.${TAB_ID}`, + keyName: 'ID', }) + const handleCreateAction = (action) => { + append(mapNameFunction(action, scheduleActions.length)) + } + + const handleCreateCharter = (actions) => { + const mappedActions = actions?.map((action, idx) => + mapNameFunction(action, scheduleActions.length + idx) + ) + + append(mappedActions) + } + + const handleUpdateAction = (action, index) => { + update(index, mapNameFunction(action, index)) + } + + const handleRemoveAction = (index) => { + remove(index) + } + return ( <> - PunctualForm(), - onSubmit: (action) => - append(mapNameFunction(action, scheduleActions.length)), - }, - { - cy: 'add-sched-action-relative', - name: 'Relative action', - dialogProps: { - title: T.ScheduledAction, - dataCy: 'modal-sched-actions', - }, - form: () => RelativeForm(), - onSubmit: (action) => - append(mapNameFunction(action, scheduleActions.length)), - }, - ]} - /> + + + + + { gap="1em" mt="1em" > - {scheduleActions?.map((item, index) => { - const { id, NAME, ACTION, TIME } = item - const isRelative = String(TIME).includes('+') + {scheduleActions?.map((schedule, index) => { + const { ID, NAME } = schedule return ( - - remove(index)} - icon={} - /> - , - tooltip: , - }} - options={[ - { - dialogProps: { - title: ( - <> - - {`: ${NAME}`} - - ), - }, - form: () => - isRelative - ? RelativeForm(undefined, item) - : PunctualForm(undefined, item), - onSubmit: (updatedAction) => - update(index, mapNameFunction(updatedAction, index)), - }, - ]} - /> - - } + handleUpdateAction(newAction, index)} + handleRemove={() => handleRemoveAction(index)} /> ) })} @@ -136,13 +94,6 @@ const ScheduleAction = () => { ) } -ScheduleAction.propTypes = { - data: PropTypes.any, - setFormData: PropTypes.func, - hypervisor: PropTypes.string, - control: PropTypes.object, -} - /** @type {TabType} */ const TAB = { id: 'sched_action', diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions.js new file mode 100644 index 0000000000..c5c9fdd345 --- /dev/null +++ b/src/fireedge/src/client/components/Tabs/Vm/SchedActions.js @@ -0,0 +1,178 @@ +/* ------------------------------------------------------------------------- * + * 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 { ReactElement, useContext, useMemo } from 'react' +import PropTypes from 'prop-types' +import { Stack } from '@mui/material' + +import { useAuth } from 'client/features/Auth' +import { useVmApi } from 'client/features/One' +import { TabContext } from 'client/components/Tabs/TabProvider' +import ScheduleActionCard from 'client/components/Cards/ScheduleActionCard' +import { + CreateSchedButton, + CharterButton, +} from 'client/components/Buttons/ScheduleAction' + +import { + getScheduleActions, + getHypervisor, + isAvailableAction, +} from 'client/models/VirtualMachine' +import { getActionsAvailable, jsonToXml } from 'client/models/Helper' +import { VM_ACTIONS } from 'client/constants' + +const { + SCHED_ACTION_CREATE, + SCHED_ACTION_UPDATE, + SCHED_ACTION_DELETE, + CHARTER_CREATE, +} = VM_ACTIONS + +/** + * Renders the list of schedule action from a VM. + * + * @param {object} props - Props + * @param {object|boolean} props.tabProps - Tab properties + * @param {object} [props.tabProps.actions] - Actions from user view yaml + * @returns {ReactElement} List of schedule actions + */ +const VmSchedulingTab = ({ tabProps: { actions } = {} }) => { + const { config } = useAuth() + const { handleRefetch, data: vm } = useContext(TabContext) + + const { addScheduledAction, updateScheduledAction, deleteScheduledAction } = + useVmApi() + + const [scheduling, actionsAvailable] = useMemo(() => { + const hypervisor = getHypervisor(vm) + const actionsByHypervisor = getActionsAvailable(actions, hypervisor) + const actionsByState = actionsByHypervisor.filter( + (action) => !isAvailableAction(action)(vm) + ) + + return [getScheduleActions(vm), actionsByState] + }, [vm]) + + const iCreateEnabled = actionsAvailable?.includes?.(SCHED_ACTION_CREATE) + const isUpdateEnabled = actionsAvailable?.includes?.(SCHED_ACTION_UPDATE) + const isDeleteEnabled = actionsAvailable?.includes?.(SCHED_ACTION_DELETE) + const isCharterEnabled = + actionsAvailable?.includes?.(CHARTER_CREATE) && config?.leases + + /** + * Add new schedule action to VM. + * + * @param {object} formData - New schedule action + * @returns {Promise} - Add schedule action and refetch VM data + */ + const handleCreateSchedAction = async (formData) => { + const data = { template: jsonToXml({ SCHED_ACTION: formData }) } + const response = await addScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && (await handleRefetch?.(vm.ID)) + } + + /** + * Update schedule action to VM. + * + * @param {object} formData - Updated schedule action + * @param {string|number} id - Schedule action id + * @returns {Promise} - Update schedule action and refetch VM data + */ + const handleUpdate = async (formData, id) => { + const data = { + id_sched: id, + template: jsonToXml({ SCHED_ACTION: formData }), + } + + const response = await updateScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && (await handleRefetch?.(vm.ID)) + } + + /** + * Delete schedule action to VM. + * + * @param {string|number} id - Schedule action id + * @returns {Promise} - Delete schedule action and refetch VM data + */ + const handleRemove = async (id) => { + const data = { id_sched: id } + const response = await deleteScheduledAction(vm.ID, data) + + String(response) === String(vm.ID) && (await handleRefetch?.(vm.ID)) + } + + /** + * Add leases from sunstone-server.conf to VM. + * + * @param {object[]} formData - List of leases (schedule action) + * @returns {Promise} - Add schedule actions and refetch VM data + */ + const handleCreateCharter = async (formData) => { + const responses = await Promise.all( + formData.map((schedAction) => { + const data = { template: jsonToXml({ SCHED_ACTION: schedAction }) } + + return addScheduledAction(vm.ID, data) + }) + ) + + responses.some((response) => String(response) === String(vm?.ID)) && + (await handleRefetch?.(vm.ID)) + } + + return ( + <> + {(iCreateEnabled || isCharterEnabled) && ( + + {iCreateEnabled && ( + + )} + {isCharterEnabled && } + + )} + + + {scheduling.map((schedule) => { + const { ID, NAME } = schedule + + return ( + handleUpdate(newAction, ID), + })} + {...(isDeleteEnabled && { handleRemove: () => handleRemove(ID) })} + /> + ) + })} + + + ) +} + +VmSchedulingTab.propTypes = { + tabProps: PropTypes.shape({ + actions: PropTypes.object, + }), +} + +VmSchedulingTab.displayName = 'VmSchedulingTab' + +export default VmSchedulingTab diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js deleted file mode 100644 index 3dc0a7c5b0..0000000000 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Actions.js +++ /dev/null @@ -1,239 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* 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 CreateSchedAction = memo(() => { - const { addScheduledAction } = useVmApi() - const { handleRefetch, data: vm } = useContext(TabContext) - - const handleCreateSchedAction = async (formData) => { - const data = { template: Helper.jsonToXml({ SCHED_ACTION: formData }) } - const response = await addScheduledAction(vm.ID, data) - - String(response) === String(vm.ID) && (await handleRefetch?.(vm.ID)) - } - - return ( - PunctualForm(vm), - onSubmit: handleCreateSchedAction, - }, - { - cy: 'create-sched-action-relative', - name: 'Relative action', - dialogProps: { title: T.ScheduledAction }, - form: () => RelativeForm(vm), - onSubmit: handleCreateSchedAction, - }, - ]} - /> - ) -}) - -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 data = { - id_sched: ID, - template: Helper.jsonToXml({ SCHED_ACTION: formData }), - } - - const response = await updateScheduledAction(vm.ID, data) - - String(response) === String(vm.ID) && (await handleRefetch?.(vm.ID)) - } - - return ( - , - tooltip: , - }} - options={[ - { - dialogProps: { - title: , - }, - form: () => - isRelative - ? RelativeForm(vm, schedule) - : PunctualForm(vm, schedule), - 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: , - }} - options={[ - { - isConfirmDialog: true, - dialogProps: { - title: , - children:

{Tr(T.DoYouWantProceed)}

, - }, - 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 } = {} } = {}]) => ({ - TIME: `+${+time}`, - ACTION: action, - ...(warningTime && { WARNING: `-${+warningTime}` }), - }) - ) - - const response = await Promise.all( - schedActions.map((schedAction) => { - const data = { - template: Helper.jsonToXml({ SCHED_ACTION: schedAction }), - } - - return addScheduledAction(vm.ID, data) - }) - ) - - response.some((res) => String(res) === String(vm?.ID)) && - (await handleRefetch?.(vm.ID)) - } - - return ( - , - tooltip: , - }} - options={[ - { - isConfirmDialog: true, - 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( - ([_, value]) => value >= 1 - ) - - return ( -

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

- ) - })} -
-

{Tr(T.DoYouWantProceed)}

- - ), - }, - onSubmit: handleCreateCharter, - }, - ]} - /> - ) -}) - -const ActionPropTypes = { - schedule: PropTypes.object, - name: PropTypes.string, -} - -CreateSchedAction.propTypes = ActionPropTypes -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 deleted file mode 100644 index ebb0ecdb61..0000000000 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/Item.js +++ /dev/null @@ -1,103 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import { useContext } from 'react' -import PropTypes from 'prop-types' -import { WarningTriangleOutline as WarningIcon } from 'iconoir-react' -import { useTheme, Typography, Paper } from '@mui/material' - -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 { timeFromMilliseconds } from 'client/models/Helper' -import { sentenceCase } from 'client/utils' -import { T, VM_ACTIONS } from 'client/constants' - -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} ${sentenceCase(ACTION)}` - const isRelative = String(TIME).includes('+') - - const time = timeFromMilliseconds(isRelative ? vmStartTime + +TIME : +TIME) - - const doneTime = timeFromMilliseconds(+DONE) - - const now = Math.round(Date.now() / 1000) - const isWarning = WARNING && now - vmStartTime > +WARNING - - const labels = [...new Set([MESSAGE])].filter(Boolean) - - const { repeat, end } = VirtualMachine.periodicityToString(schedule) - - return ( - -
-
- {titleAction} - {!!labels.length && ( - - {labels.map((label) => ( - - ))} - - )} -
-
- {repeat && {`${repeat} |`}} - {end && {`${end} |`}} - {DONE && ( - - {`${Tr(T.Done)} ${doneTime.toRelative()} |`} - - )} - - {`${time.toRelative()}`} - {isWarning && } - -
-
- {!!actions.length && ( -
- {actions?.includes?.(VM_ACTIONS.SCHED_ACTION_UPDATE) && ( - - )} - {actions?.includes?.(VM_ACTIONS.SCHED_ACTION_DELETE) && ( - - )} -
- )} -
- ) -} - -SchedulingItem.propTypes = { - schedule: PropTypes.object.isRequired, - actions: PropTypes.arrayOf(PropTypes.string), -} - -SchedulingItem.displayName = 'SchedulingItem' - -export default SchedulingItem diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js deleted file mode 100644 index 96122799cd..0000000000 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/List.js +++ /dev/null @@ -1,36 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import PropTypes from 'prop-types' - -import SchedulingItem from 'client/components/Tabs/Vm/SchedActions/Item' - -const SchedulingList = ({ scheduling, actions }) => ( -
- {scheduling.map((schedule) => ( - - ))} -
-) - -SchedulingList.propTypes = { - scheduling: PropTypes.array, - actions: PropTypes.arrayOf(PropTypes.string), -} - -SchedulingList.displayName = 'SchedulingList' - -export default SchedulingList diff --git a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js b/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js deleted file mode 100644 index d64385f145..0000000000 --- a/src/fireedge/src/client/components/Tabs/Vm/SchedActions/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/* ------------------------------------------------------------------------- * - * Copyright 2002-2021, OpenNebula Project, OpenNebula Systems * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); you may * - * not use this file except in compliance with the License. You may obtain * - * a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * ------------------------------------------------------------------------- */ -/* eslint-disable jsdoc/require-jsdoc */ -import { useContext, useMemo } from 'react' -import PropTypes from 'prop-types' - -import { useAuth } from 'client/features/Auth' -import { TabContext } from 'client/components/Tabs/TabProvider' -import { - CreateSchedAction, - CharterAction, -} from 'client/components/Tabs/Vm/SchedActions/Actions' -import SchedulingList from 'client/components/Tabs/Vm/SchedActions/List' - -import { - getScheduleActions, - getHypervisor, - isAvailableAction, -} from 'client/models/VirtualMachine' -import { getActionsAvailable } from 'client/models/Helper' -import { VM_ACTIONS } from 'client/constants' - -const VmSchedulingTab = ({ tabProps: { actions } = {} }) => { - const { config } = useAuth() - const { data: vm } = useContext(TabContext) - - const [scheduling, actionsAvailable] = useMemo(() => { - const hypervisor = getHypervisor(vm) - const actionsByHypervisor = getActionsAvailable(actions, hypervisor) - const actionsByState = actionsByHypervisor.filter( - (action) => !isAvailableAction(action)(vm) - ) - - return [getScheduleActions(vm), actionsByState] - }, [vm]) - - return ( - <> - {actionsAvailable?.includes?.(VM_ACTIONS.SCHED_ACTION_CREATE) && ( - - )} - {actionsAvailable?.includes?.(VM_ACTIONS.CHARTER_CREATE) && - config?.leases && } - - - - ) -} - -VmSchedulingTab.propTypes = { - tabProps: PropTypes.object, -} - -VmSchedulingTab.displayName = 'VmSchedulingTab' - -export default VmSchedulingTab diff --git a/src/fireedge/src/client/components/Timer/index.js b/src/fireedge/src/client/components/Timer/index.js new file mode 100644 index 0000000000..0d45a6e417 --- /dev/null +++ b/src/fireedge/src/client/components/Timer/index.js @@ -0,0 +1,96 @@ +/* ------------------------------------------------------------------------- * + * 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 { ReactElement, useMemo, memo, useState, useEffect } from 'react' +import { DateTime } from 'luxon' + +import { Translate } from 'client/components/HOC' +import { timeFromMilliseconds } from 'client/models/Helper' + +const Timer = memo( + /** + * @param {object} config - Config + * @param {number|string|DateTime} config.initial - Initial time + * @param {boolean} [config.luxon] - If `true`, the time will be a parsed as luxon DateTime + * @param {number} [config.translateWord] - Add translate component to wrap the time + * @param {number} [config.interval] - Interval time to update the time + * @param {number} [config.finishAt] - Clear the interval once time is up (in ms) + * @returns {ReactElement} Relative DateTime + */ + ({ initial, luxon, translateWord, interval = 1000, finishAt }) => { + const [time, setTime] = useState('...') + + useEffect(() => { + const isLuxon = luxon || initial?.isValid + const initialValue = isLuxon ? initial : timeFromMilliseconds(+initial) + + const tick = setInterval(() => { + const newTime = initialValue.toRelative() + + console.log({ ms: initialValue.millisecond, finishAt }) + if (finishAt && initialValue.millisecond === finishAt) { + clearInterval(tick) + } + + newTime !== time && setTime(newTime) + }, interval) + + return () => { + clearInterval(tick) + } + }, []) + + if (translateWord) { + return + } + + return <>{time} + }, + (prev, next) => + prev.initial === next.initial && prev.translateWord === next.translateWord +) + +/* const Timer = memo(({ initial, luxon, translateWord, interval = 1000 }) => { + const ensuredInitial = useMemo(() => { + const isLuxon = luxon || initial?.isValid + const val = isLuxon ? initial : timeFromMilliseconds(+initial) + + return val.toRelative() + }, []) + + const [timer, setTimer] = useState(() => ensuredInitial) + + useEffect(() => { + const tick = setInterval(() => { + const newTimer = DateTime.local().toRelative() + + newTimer !== timer && setTimer(newTimer) + }, interval) + + return () => { + clearInterval(tick) + } + }, []) + + /* if (translateWord) { + return + } + + return <>{timer} +}) */ + +Timer.displayName = 'Timer' + +export default Timer diff --git a/src/fireedge/src/client/constants/translates.js b/src/fireedge/src/client/constants/translates.js index 2d232411b1..6165330db7 100644 --- a/src/fireedge/src/client/constants/translates.js +++ b/src/fireedge/src/client/constants/translates.js @@ -136,8 +136,14 @@ module.exports = { DoYouWantProceed: 'Do you want proceed?', /* Scheduling */ + Action: 'Action', ScheduledAction: 'Scheduled action', Charter: 'Charter', + PunctualAction: 'Punctual action', + RelativeAction: 'Relative action', + DoneAgo: 'Done %s', + NextInTime: 'Next in %s', + FirstTime: 'First time %s', Mon: 'Mon', Monday: 'Monday', Tue: 'Tue', @@ -155,9 +161,25 @@ module.exports = { Weekly: 'Weekly', Monthly: 'Monthly', Yearly: 'Yearly', + Hourly: 'Hourly', EachHours: 'Each %s hours', AfterTimes: 'After %s times', Today: 'Today', + Periodic: 'Periodic', + Time: 'Time', + TimeAfterTheVmIsInstantiated: 'Time after the VM is instantiated', + PeriodType: 'Period type', + GranularityOfAction: 'Granularity of the action', + DayOfWeek: 'Day of week', + DayOfMonth: 'Day of month', + DayOfYear: 'Day of year', + EachXHours: "Each 'x' hours", + EndType: 'End type', + DaysBetween0_6: 'Days should be between 0 (Sunday) and 6 (Saturday)', + DaysBetween1_31: 'Days should be between 1 and 31', + DaysBetween0_365: 'Days should be between 0 and 365', + HoursBetween0_168: 'Hours should be between 0 and 168', + WhenYouWantThatTheActionFinishes: 'When you want that the action finishes', /* dashboard */ InTotal: 'In Total', @@ -351,6 +373,7 @@ module.exports = { Volatile: 'Volatile', VolatileDisk: 'Volatile disk', Snapshot: 'Snapshot', + SnapshotName: 'Snapshot name', DiskSnapshot: 'Disk snapshot', /* VM schema - network */ NIC: 'NIC', diff --git a/src/fireedge/src/client/constants/vm.js b/src/fireedge/src/client/constants/vm.js index 0080af477e..fb890f965d 100644 --- a/src/fireedge/src/client/constants/vm.js +++ b/src/fireedge/src/client/constants/vm.js @@ -798,6 +798,23 @@ export const VM_ACTIONS_WITH_SCHEDULE = [ VM_ACTIONS.SNAPSHOT_DELETE, ] +/** @type {string[]} Actions that can be used in charter */ +export const VM_ACTIONS_IN_CHARTER = [ + 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, +] + /** * @enum {( * 'none' | diff --git a/src/fireedge/src/client/models/Helper.js b/src/fireedge/src/client/models/Helper.js index 298a7b76c2..d5b2083ee2 100644 --- a/src/fireedge/src/client/models/Helper.js +++ b/src/fireedge/src/client/models/Helper.js @@ -48,6 +48,25 @@ export const booleanToString = (bool) => (bool ? T.Yes : T.No) export const stringToBoolean = (str) => String(str).toLowerCase() === 'yes' || +str === 1 +/** + * Returns `true` if the given value is an instance of Date. + * + * @param {*} value - The value to check + * @returns {boolean} true if the given value is a date + * @example + * const result = isDate(new Date()) //=> true + * @example + * const result = isDate(new Date(NaN)) //=> true + * @example + * const result = isDate('2014-02-31') //=> false + * @example + * const result = isDate({}) //=> false + */ +export const isDate = (value) => + value instanceof Date || + (typeof value === 'object' && + Object.prototype.toString.call(value) === '[object Date]') + /** * Converts the time values into "mm/dd/yyyy, hh:mm:ss" format. * @@ -73,7 +92,7 @@ export const timeFromMilliseconds = (time) => DateTime.fromMillis(+time * 1000) * @returns {number} - Total milliseconds. */ export const dateToMilliseconds = (date) => - DateTime.fromJSDate(date).toMillis() / 1000 + Math.trunc(DateTime.fromJSDate(date).toMillis() / 1000) /** * Returns the epoch milliseconds of the date. @@ -82,7 +101,7 @@ export const dateToMilliseconds = (date) => * @returns {number} - Total milliseconds. */ export const isoDateToMilliseconds = (date) => - DateTime.fromISO(date).toMillis() / 1000 + Math.trunc(DateTime.fromISO(date).toMillis() / 1000) /** * Get the diff from two times and it converts them diff --git a/src/fireedge/src/client/models/Scheduler.js b/src/fireedge/src/client/models/Scheduler.js new file mode 100644 index 0000000000..1f3007df32 --- /dev/null +++ b/src/fireedge/src/client/models/Scheduler.js @@ -0,0 +1,286 @@ +/* ------------------------------------------------------------------------- * + * 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 { isDate, timeToString } from 'client/models/Helper' +import { Tr } from 'client/components/HOC' +import { T, VM_ACTIONS } from 'client/constants' + +const { + SNAPSHOT_DISK_CREATE, + SNAPSHOT_DISK_REVERT, + SNAPSHOT_DISK_DELETE, + SNAPSHOT_CREATE, + SNAPSHOT_REVERT, + SNAPSHOT_DELETE, +} = VM_ACTIONS + +/** + * @typedef ScheduledAction + * @property {string} ACTION - Action to execute + * @property {string} ID - Id + * @property {string} TIME - Time + * @property {string} [WARNING] - Warning time + * @property {string} [ARGS] - Arguments separated by comma + * @property {string} [DAYS] - Days that the users wants execute the action. + * List separated by comma. Depend of REPEAT: + * - weekly: 0 (Sunday) to 6 (Saturday) + * - monthly: 1 to 31 + * - yearly: 1 to 365 + * - hourly: each ‘x’ hours + * @property {'0'|'1'|'2'} [END_TYPE] - Way to end the repetition. Can be: + * - never: 0 + * - repetition: 1 + * - date: 2 + * @property {string} [END_VALUE] - End value + * @property {'0'|'1'|'2'|'3'} [REPEAT] - Type of repetition. Can be: + * - weekly: '0', + * - monthly: '1', + * - yearly: '2', + * - hourly: '3', + */ + +/** + * @typedef CharterOptions + * @property {boolean} [edit] - If `true`, the charter can be edited in form + * @property {number|string} execute_after_days - Days to execute the action + * @property {number|string} warn_before_days - Alert a time before the action (in days) + */ + +/** @enum {string} Values to end an action */ +export const END_TYPE_VALUES = { + NEVER: '0', + REPETITION: '1', + DATE: '2', +} + +/** @enum {string} Values to repeat an action */ +export const REPEAT_VALUES = { + WEEKLY: '0', + MONTHLY: '1', + YEARLY: '2', + HOURLY: '3', +} + +/** @enum {string} Argument attributes */ +export const ARGS_TYPES = { + DISK_ID: 'DISK_ID', + NAME: 'NAME', + SNAPSHOT_ID: 'SNAPSHOT_ID', +} + +/** @enum {string} Period type */ +export const PERIOD_TYPES = { + YEARS: 'years', + MONTHS: 'months', + WEEKS: 'weeks', + DAYS: 'days', + HOURS: 'hours', + MINUTES: 'minutes', +} + +/** + * Checks if time is relative. + * + * @param {string} time - Time to check + * @returns {boolean} Returns `true` if time contains plus or minus signs + */ +export const isRelative = (time) => + !isDate(time) && (String(time).includes('+') || String(time).includes('-')) + +/** + * Filters leases to get only those that cannot be edited. + * + * @param {[VM_ACTIONS, CharterOptions]} leases - Leases from configuration yaml + * @returns {[VM_ACTIONS, CharterOptions]} Fixed leases + */ +export const getFixedLeases = (leases) => + leases?.filter(([_, { edit } = {}]) => !edit) + +/** + * Filters leases to get only those that can be edited. + * + * @param {[VM_ACTIONS, CharterOptions]} leases - Leases from configuration yaml + * @returns {[VM_ACTIONS, CharterOptions]} Editable leases + */ +export const getEditableLeases = (leases) => + leases?.filter(([_, { edit } = {}]) => !!edit) + +/** + * Returns the periodicity of time in seconds. + * + * @param {number} seconds - Time in seconds + * @returns {{ period: PERIOD_TYPES, time: number }} - Periodicity and time + */ +export const getPeriodicityByTimeInSeconds = (seconds) => { + const allPeriods = { + [PERIOD_TYPES.YEARS]: seconds / 365 / 24 / 3600, + [PERIOD_TYPES.MONTHS]: seconds / 30 / 24 / 3600, + [PERIOD_TYPES.WEEKS]: seconds / 7 / 24 / 3600, + [PERIOD_TYPES.DAYS]: seconds / 24 / 3600, + [PERIOD_TYPES.HOURS]: seconds / 3600, + [PERIOD_TYPES.MINUTES]: seconds / 60, + } + + const [period, time] = Object.entries(allPeriods).find( + ([_, value]) => value >= 1 + ) + + return { period, time } +} + +/** + * Transform period time to seconds. + * + * @param {PERIOD_TYPES} period - Periodicity + * @param {number} time - Time in period format + * @returns {number} Time in seconds + */ +export const timeToSecondsByPeriodicity = (period, time) => + ({ + [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]) + +/** + * Returns information about the repetition of an action: periodicity and the end. + * + * @param {ScheduledAction} action - Schedule action + * @returns {{repeat: string|string[], end: string}} - Periodicity of the action. + */ +export const getRepeatInformation = (action) => { + const { REPEAT, DAYS = '', END_TYPE, END_VALUE = '' } = action ?? {} + + const daysOfWeek = [T.Sun, T.Mon, T.Tue, T.Wed, T.Thu, T.Fri, T.Sat] + const days = DAYS?.split(',')?.map((day) => Tr(daysOfWeek[day])) ?? [] + + const repeat = { + 0: `${Tr(T.Weekly)} ${days.join(',')}`, + 1: `${Tr(T.Monthly)} ${DAYS}`, + 2: `${Tr(T.Yearly)} ${DAYS}`, + 3: Tr([T.EachHours, DAYS]), + }[+REPEAT] + + const end = { + 0: Tr(T.None), + 1: Tr([T.AfterTimes, END_VALUE]), + 2: `${Tr(T.On)} ${timeToString(END_VALUE)}`, + }[+END_TYPE] + + return { repeat, end } +} + +/** + * Returns the arguments that action needs to execute. + * + * @param {string} action - Action will be executed + * @returns {ARGS_TYPES[]} Arguments + */ +export const getRequiredArgsByAction = (action) => { + const { DISK_ID, NAME, SNAPSHOT_ID } = ARGS_TYPES + + return ( + { + [SNAPSHOT_DISK_CREATE]: [DISK_ID, NAME], + [SNAPSHOT_DISK_REVERT]: [DISK_ID, SNAPSHOT_ID], + [SNAPSHOT_DISK_DELETE]: [DISK_ID, SNAPSHOT_ID], + [SNAPSHOT_CREATE]: [NAME], + [SNAPSHOT_REVERT]: [SNAPSHOT_ID], + [SNAPSHOT_DELETE]: [SNAPSHOT_ID], + }[action] ?? [] + ) +} + +/** + * Transforms the arguments from the scheduled action to object. + * + * @param {scheduledAction} [scheduledAction] - Schedule action + * @returns {object} Arguments in object format + */ +export const transformStringToArgsObject = ({ ACTION, ARGS = {} } = {}) => { + if (typeof ARGS !== 'string') return ARGS + + // IMPORTANT - String data from ARGS has strict order: DISK_ID, NAME, SNAPSHOT_ID + const [arg1, arg2] = ARGS.split(',') + const { DISK_ID, NAME, SNAPSHOT_ID } = ARGS_TYPES + + return ( + { + [SNAPSHOT_DISK_CREATE]: { [DISK_ID]: arg1, [NAME]: arg2 }, + [SNAPSHOT_DISK_REVERT]: { [DISK_ID]: arg1, [SNAPSHOT_ID]: arg2 }, + [SNAPSHOT_DISK_DELETE]: { [DISK_ID]: arg1, [SNAPSHOT_ID]: arg2 }, + [SNAPSHOT_CREATE]: { [NAME]: arg1 }, + [SNAPSHOT_REVERT]: { [SNAPSHOT_ID]: arg1 }, + [SNAPSHOT_DELETE]: { [SNAPSHOT_ID]: arg1 }, + }[ACTION] ?? {} + ) +} + +/** + * Returns the period type and time value from a charter options. + * + * @param {CharterOptions} options - Charter options + * @param {string} prefix - Prefix of period type + * @returns {[number, PERIOD_TYPES]} - Period type and time value + * @example ({ after_days: 5 }, 'after_') //=> [5, days] + * @example ({ before_hours: 16 }, 'before_') //=> [16, hours] + */ +const getTimeAndPeriodTypeFromCharter = (options, prefix) => { + const periodType = Object.values(PERIOD_TYPES).find( + (type) => options[`${prefix}${type}`] + ) + + return [options[`${prefix}${periodType}`], periodType] +} + +/** + * Transforms charter to schedule action. + * + * @param {[string, CharterOptions][]} charters - Charters from configuration yaml + * @param {boolean} relative - If `true`, returns times in relative format + * @returns {ScheduledAction[]} - Scheduled action + */ +export const transformChartersToSchedActions = (charters, relative = false) => { + const now = Math.round(Date.now() / 1000) + + return charters?.map(([action, options = {}] = []) => { + const [time, timePeriodType] = getTimeAndPeriodTypeFromCharter( + options, + 'execute_after_' + ) + + const [warn, warnPeriodType] = getTimeAndPeriodTypeFromCharter( + options, + 'warn_before_' + ) + + return relative + ? { + ACTION: action, + TIME: time, + WARNING: warn, + PERIOD: timePeriodType, + WARNING_PERIOD: warnPeriodType, + } + : { + ACTION: action, + TIME: now + timeToSecondsByPeriodicity(timePeriodType, time), + WARNING: now + timeToSecondsByPeriodicity(warnPeriodType, warn), + } + }) +} diff --git a/src/fireedge/src/client/models/VirtualMachine.js b/src/fireedge/src/client/models/VirtualMachine.js index 6a59f5e8f5..bf1bc4caea 100644 --- a/src/fireedge/src/client/models/VirtualMachine.js +++ b/src/fireedge/src/client/models/VirtualMachine.js @@ -17,8 +17,7 @@ import { getSecurityGroupsFromResource, prettySecurityGroup, } from 'client/models/SecurityGroup' -import { timeToString } from 'client/models/Helper' -import { Tr } from 'client/components/HOC' +import { isRelative } from 'client/models/Scheduler' import { STATES, @@ -28,7 +27,6 @@ import { NIC_ALIAS_IP_ATTRS, HISTORY_ACTIONS, HYPERVISORS, - T, StateInfo, } from 'client/constants' @@ -245,37 +243,22 @@ export const getSnapshotList = (vm) => { * @returns {Array} List of schedule actions from resource */ export const getScheduleActions = (vm) => { - const { TEMPLATE = {} } = vm ?? {} + const { STIME: vmStartTime, TEMPLATE = {} } = vm ?? {} + const now = Math.round(Date.now() / 1000) - return [TEMPLATE.SCHED_ACTION].filter(Boolean).flat() -} + return [TEMPLATE.SCHED_ACTION] + .filter(Boolean) + .flat() + .map((action) => { + const { TIME, WARNING } = action + const isRelativeTime = isRelative(TIME) + const isRelativeWarning = isRelative(WARNING) -/** - * Converts the periodicity of the action to string value. - * - * @param {object} scheduleAction - Schedule action - * @returns {{repeat: string|string[], end: string}} - Periodicity of the action. - */ -export const periodicityToString = (scheduleAction) => { - const { REPEAT, DAYS = '', END_TYPE, END_VALUE = '' } = scheduleAction ?? {} + const ensuredTime = isRelativeTime ? +TIME + +vmStartTime : +TIME + const ensuredWarn = isRelativeWarning && now > ensuredTime + +WARNING - const daysOfWeek = [T.Sun, T.Mon, T.Tue, T.Wed, T.Thu, T.Fri, T.Sat] - const days = DAYS?.split(',')?.map((day) => Tr(daysOfWeek[day])) ?? [] - - const repeat = { - 0: `${Tr(T.Weekly)} ${days.join(',')}`, - 1: `${Tr(T.Monthly)} ${DAYS}`, - 2: `${Tr(T.Yearly)} ${DAYS}`, - 3: Tr([T.EachHours, DAYS]), - }[+REPEAT] - - const end = { - 0: Tr(T.None), - 1: Tr([T.AfterTimes, END_VALUE]), - 2: `${Tr(T.On)} ${timeToString(END_VALUE)}`, - }[+END_TYPE] - - return { repeat, end } + return { ...action, TIME: ensuredTime, WARNING: ensuredWarn } + }) } /** diff --git a/src/fireedge/src/client/utils/schema.js b/src/fireedge/src/client/utils/schema.js index 54e8e18331..30a248a9a4 100644 --- a/src/fireedge/src/client/utils/schema.js +++ b/src/fireedge/src/client/utils/schema.js @@ -443,16 +443,28 @@ export const createForm = const defaultTransformInitialValue = (values) => schemaCallback.cast(values, { stripUnknown: true }) - const { transformInitialValue = defaultTransformInitialValue } = extraParams + const { + transformBeforeSubmit, + transformInitialValue = defaultTransformInitialValue, + ...restOfParams + } = extraParams const defaultValues = initialValues ? transformInitialValue(initialValues, schemaCallback) : schemaCallback.default() + const ensuredExtraParams = {} + for (const [name, param] of Object.entries(restOfParams)) { + const isFunction = typeof param === 'function' + + ensuredExtraParams[name] = isFunction ? param(props) : param + } + return { resolver: () => schemaCallback, fields: () => fieldsCallback, defaultValues, - ...extraParams, + transformBeforeSubmit, + ...ensuredExtraParams, } }