From 27ac08635cc18f2e96d6a64357510120041ccdf8 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Thu, 12 Sep 2024 10:10:17 +0200 Subject: [PATCH 01/16] feat: add dashboard and briefing button on map --- .env.dev.defaults | 1 + .env.infra.example | 1 + .env.test.defaults | 1 + frontend/.env.frontend.example | 1 + frontend/package-lock.json | 681 ++++++++---------- frontend/package.json | 4 +- frontend/src/components/style.ts | 20 + frontend/src/domain/entities/map/constants.ts | 1 + frontend/src/domain/shared_slices/Global.ts | 7 + frontend/src/env.d.ts | 1 + .../features/Account/components/Account.tsx | 7 +- .../components}/ControlUnitListButton.tsx | 17 +- .../ControlUnitListDialog/index.tsx | 10 +- .../components/DashboardMapButton.tsx | 58 ++ .../components/EditInterestPoint.tsx | 5 +- .../components/InterestPointMapButton.tsx | 9 +- .../components/RightMenu/ButtonWrapper.tsx | 39 - .../ReportingsButton/SearchReportings.tsx | 52 +- .../components/ReportingsButton/index.tsx | 5 +- .../SearchSemaphores.tsx | 5 +- .../SearchSemaphoreButton/index.tsx | 7 +- .../measurements/MeasurementMapButton.tsx | 9 +- .../features/missions/MissionForm/utils.ts | 4 + .../missions/MissionsButton/index.tsx | 64 +- frontend/src/pages/HomePage.tsx | 78 +- 25 files changed, 545 insertions(+), 542 deletions(-) rename frontend/src/features/{MainWindow/components/RightMenu => ControlUnit/components}/ControlUnitListButton.tsx (64%) create mode 100644 frontend/src/features/Dashboard/components/DashboardMapButton.tsx delete mode 100644 frontend/src/features/MainWindow/components/RightMenu/ButtonWrapper.tsx diff --git a/.env.dev.defaults b/.env.dev.defaults index ac493174d..86956d654 100644 --- a/.env.dev.defaults +++ b/.env.dev.defaults @@ -96,6 +96,7 @@ FRONTEND_MISSION_FORM_AUTO_UPDATE=true FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED=true FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED=true FRONTEND_REPORTING_FORM_AUTO_UPDATE=true +FRONTEND_DASHBOARD_ENABLED=true ################################################################################ # Version diff --git a/.env.infra.example b/.env.infra.example index 2b89548e7..222b25a6b 100644 --- a/.env.infra.example +++ b/.env.infra.example @@ -95,6 +95,7 @@ FRONTEND_MISSION_FORM_AUTO_UPDATE= FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED= FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED= FRONTEND_REPORTING_FORM_AUTO_UPDATE= +FRONTEND_DASHBOARD_ENABLED= ################################################################################ # Version diff --git a/.env.test.defaults b/.env.test.defaults index b2a27c94d..4105dc58c 100644 --- a/.env.test.defaults +++ b/.env.test.defaults @@ -89,6 +89,7 @@ FRONTEND_MISSION_FORM_AUTO_UPDATE=true FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED=true FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED=true FRONTEND_REPORTING_FORM_AUTO_UPDATE=true +FRONTEND_DASHBOARD_ENABLED=true ################################################################################ # Version diff --git a/frontend/.env.frontend.example b/frontend/.env.frontend.example index 0c0a63d4a..665b0e0f0 100644 --- a/frontend/.env.frontend.example +++ b/frontend/.env.frontend.example @@ -35,6 +35,7 @@ FRONTEND_MISSION_FORM_AUTO_UPDATE= FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED= FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED= FRONTEND_REPORTING_FORM_AUTO_UPDATE= +FRONTEND_DASHBOARD_ENABLED= ################################################################################ # Version diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b1ea0ee3a..4acb58062 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,14 +9,14 @@ "version": "0.1.0", "license": "AGPL-3.0", "dependencies": { - "@mtes-mct/monitor-ui": "21.2.0", + "@mtes-mct/monitor-ui": "22.1.0", "@reduxjs/toolkit": "2.0.0", "@rsuite/responsive-nav": "5.0.2", "@sentry/browser": "7.73.0", "@sentry/react": "7.73.0", "@sentry/tracing": "7.114.0", "@svgr/webpack": "8.1.0", - "@tanstack/react-table": "8.20.1", + "@tanstack/react-table": "8.20.5", "@tanstack/react-virtual": "beta", "classnames": "2.5.1", "dayjs": "1.11.12", @@ -149,9 +149,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz", - "integrity": "sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", + "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", "engines": { "node": ">=6.9.0" } @@ -186,11 +186,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", - "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dependencies": { - "@babel/types": "^7.25.0", + "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -238,16 +238,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.0.tgz", - "integrity": "sha512-GYM6BxeQsETc9mnct+nIIpf63SAyzvyYN7UB/IlTyd+MBg06afFGp0mIeUqGyWgS2mxad6vqbMrHVlaL3m70sQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", + "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-member-expression-to-functions": "^7.24.8", "@babel/helper-optimise-call-expression": "^7.24.7", "@babel/helper-replace-supers": "^7.25.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/traverse": "^7.25.0", + "@babel/traverse": "^7.25.4", "semver": "^6.3.1" }, "engines": { @@ -442,12 +442,12 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", - "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", + "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", "dependencies": { "@babel/template": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/types": "^7.25.6" }, "engines": { "node": ">=6.9.0" @@ -532,11 +532,11 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.3.tgz", - "integrity": "sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dependencies": { - "@babel/types": "^7.25.2" + "@babel/types": "^7.25.6" }, "bin": { "parser": "bin/babel-parser.js" @@ -700,11 +700,11 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", - "integrity": "sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.6.tgz", + "integrity": "sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -714,11 +714,11 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", - "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -858,11 +858,11 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", + "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -901,14 +901,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.0.tgz", - "integrity": "sha512-uaIi2FdqzjpAMvVqvB51S42oC2JEVgh0LDsGfZVDysWE8LrJtQC2jvKmOqEYThKyB7bDEb7BP1GYWDm7tABA0Q==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.4.tgz", + "integrity": "sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg==", "dependencies": { "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-remap-async-to-generator": "^7.25.0", "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/traverse": "^7.25.0" + "@babel/traverse": "^7.25.4" }, "engines": { "node": ">=6.9.0" @@ -962,12 +962,12 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", - "integrity": "sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz", + "integrity": "sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.4", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -993,15 +993,15 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.0.tgz", - "integrity": "sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.4.tgz", + "integrity": "sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg==", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-compilation-targets": "^7.25.2", "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-replace-supers": "^7.25.0", - "@babel/traverse": "^7.25.0", + "@babel/traverse": "^7.25.4", "globals": "^11.1.0" }, "engines": { @@ -1418,12 +1418,12 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", - "integrity": "sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz", + "integrity": "sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.4", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1731,12 +1731,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", - "integrity": "sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.4.tgz", + "integrity": "sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA==", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.2", + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1746,11 +1746,11 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.3.tgz", - "integrity": "sha512-QsYW7UeAaXvLPX9tdVliMJE7MD7M6MLYVTovRTIwhoYQVFHR1rM4wO8wqAezYi3/BpSD+NzVCZ69R6smWiIi8g==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.4.tgz", + "integrity": "sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw==", "dependencies": { - "@babel/compat-data": "^7.25.2", + "@babel/compat-data": "^7.25.4", "@babel/helper-compilation-targets": "^7.25.2", "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-validator-option": "^7.24.8", @@ -1779,13 +1779,13 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.24.7", - "@babel/plugin-transform-async-generator-functions": "^7.25.0", + "@babel/plugin-transform-async-generator-functions": "^7.25.4", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoped-functions": "^7.24.7", "@babel/plugin-transform-block-scoping": "^7.25.0", - "@babel/plugin-transform-class-properties": "^7.24.7", + "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.25.0", + "@babel/plugin-transform-classes": "^7.25.4", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-dotall-regex": "^7.24.7", @@ -1813,7 +1813,7 @@ "@babel/plugin-transform-optional-catch-binding": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.8", "@babel/plugin-transform-parameters": "^7.24.7", - "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.25.4", "@babel/plugin-transform-private-property-in-object": "^7.24.7", "@babel/plugin-transform-property-literals": "^7.24.7", "@babel/plugin-transform-regenerator": "^7.24.7", @@ -1826,10 +1826,10 @@ "@babel/plugin-transform-unicode-escapes": "^7.24.7", "@babel/plugin-transform-unicode-property-regex": "^7.24.7", "@babel/plugin-transform-unicode-regex": "^7.24.7", - "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.4", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.10", - "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-corejs3": "^0.10.6", "babel-plugin-polyfill-regenerator": "^0.6.1", "core-js-compat": "^3.37.1", "semver": "^6.3.1" @@ -1897,9 +1897,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", - "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", + "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1908,9 +1908,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.25.0.tgz", - "integrity": "sha512-BOehWE7MgQ8W8Qn0CQnMtg2tHPHPulcS/5AVpFvs2KCK1ET+0WqZqPvnpRpFN81gYoFopdIEJX9Sgjw3ZBccPg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.25.6.tgz", + "integrity": "sha512-Gz0Nrobx8szge6kQQ5Z5MX9L3ObqNwCQY1PSwSNzreFL7aHGxv8Fp2j3ETV6/wWdbiV+mW6OSm8oQhg3Tcsniw==", "dependencies": { "core-js-pure": "^3.30.2", "regenerator-runtime": "^0.14.0" @@ -1933,15 +1933,15 @@ } }, "node_modules/@babel/traverse": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.3.tgz", - "integrity": "sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.0", - "@babel/parser": "^7.25.3", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", "@babel/template": "^7.25.0", - "@babel/types": "^7.25.2", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1950,9 +1950,9 @@ } }, "node_modules/@babel/types": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.2.tgz", - "integrity": "sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dependencies": { "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", @@ -1977,9 +1977,9 @@ } }, "node_modules/@cypress/request": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", - "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.5.tgz", + "integrity": "sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA==", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -1987,14 +1987,14 @@ "combined-stream": "~1.0.6", "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "http-signature": "~1.3.6", + "form-data": "~4.0.0", + "http-signature": "~1.4.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "6.10.4", + "qs": "6.13.0", "safe-buffer": "^5.1.2", "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", @@ -2668,9 +2668,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "engines": { "node": ">=12" }, @@ -3658,15 +3658,15 @@ "integrity": "sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA==" }, "node_modules/@mtes-mct/monitor-ui": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/@mtes-mct/monitor-ui/-/monitor-ui-21.2.0.tgz", - "integrity": "sha512-tJJ7XiHis3bOBlsOacNSTFF0WEN/YfwqKna9vgKyDcP6E3VFkt5TtEbs3FoH50853AGx//S4nSH3/+hy8nIwjA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@mtes-mct/monitor-ui/-/monitor-ui-22.1.0.tgz", + "integrity": "sha512-ox/BzwALdDH0L/TcvJ8N/d27kC5jZ5vdr69zhhyiFsIE1t2H6bn/W1+QjaIkKRcYqa/NNEHBHQccxmC4C8/M/g==", "dependencies": { - "@babel/runtime": "7.25.0", - "@tanstack/react-table": "8.20.1", + "@babel/runtime": "7.25.6", + "@tanstack/react-table": "8.20.5", "@tanstack/react-virtual": "beta", "prop-types": "15.8.1", - "tslib": "2.6.3" + "tslib": "2.7.0" }, "engines": { "node": ">=20" @@ -3783,6 +3783,12 @@ "node": ">=10" } }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/@puppeteer/browsers/node_modules/semver": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", @@ -3858,9 +3864,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.0.tgz", - "integrity": "sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz", + "integrity": "sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==", "cpu": [ "arm" ], @@ -3871,9 +3877,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.0.tgz", - "integrity": "sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz", + "integrity": "sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==", "cpu": [ "arm64" ], @@ -3884,9 +3890,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.0.tgz", - "integrity": "sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz", + "integrity": "sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==", "cpu": [ "arm64" ], @@ -3897,9 +3903,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.0.tgz", - "integrity": "sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz", + "integrity": "sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==", "cpu": [ "x64" ], @@ -3910,9 +3916,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.0.tgz", - "integrity": "sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz", + "integrity": "sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==", "cpu": [ "arm" ], @@ -3923,9 +3929,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.0.tgz", - "integrity": "sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz", + "integrity": "sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==", "cpu": [ "arm" ], @@ -3936,9 +3942,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.0.tgz", - "integrity": "sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz", + "integrity": "sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==", "cpu": [ "arm64" ], @@ -3949,9 +3955,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.0.tgz", - "integrity": "sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz", + "integrity": "sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==", "cpu": [ "arm64" ], @@ -3962,9 +3968,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.0.tgz", - "integrity": "sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz", + "integrity": "sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==", "cpu": [ "ppc64" ], @@ -3975,9 +3981,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.0.tgz", - "integrity": "sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz", + "integrity": "sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==", "cpu": [ "riscv64" ], @@ -3988,9 +3994,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.0.tgz", - "integrity": "sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz", + "integrity": "sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==", "cpu": [ "s390x" ], @@ -4001,9 +4007,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.0.tgz", - "integrity": "sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz", + "integrity": "sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==", "cpu": [ "x64" ], @@ -4014,9 +4020,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.0.tgz", - "integrity": "sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz", + "integrity": "sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==", "cpu": [ "x64" ], @@ -4027,9 +4033,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.0.tgz", - "integrity": "sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz", + "integrity": "sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==", "cpu": [ "arm64" ], @@ -4040,9 +4046,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.0.tgz", - "integrity": "sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz", + "integrity": "sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==", "cpu": [ "ia32" ], @@ -4053,9 +4059,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz", - "integrity": "sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz", + "integrity": "sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==", "cpu": [ "x64" ], @@ -4745,11 +4751,11 @@ } }, "node_modules/@tanstack/react-table": { - "version": "8.20.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.20.1.tgz", - "integrity": "sha512-PJK+07qbengObe5l7c8vCdtefXm8cyR4i078acWrHbdm8JKw1ES7YpmOtVt9ALUVEEFAHscdVpGRhRgikgFMbQ==", + "version": "8.20.5", + "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.20.5.tgz", + "integrity": "sha512-WEHopKw3znbUZ61s9i0+i9g8drmDo6asTWbrQh8Us63DAk/M0FkmIqERew6P71HI75ksZ2Pxyuf4vvKh9rAkiA==", "dependencies": { - "@tanstack/table-core": "8.20.1" + "@tanstack/table-core": "8.20.5" }, "engines": { "node": ">=12" @@ -4780,9 +4786,9 @@ } }, "node_modules/@tanstack/table-core": { - "version": "8.20.1", - "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.20.1.tgz", - "integrity": "sha512-5Ly5TIRHnWH7vSDell9B/OVyV380qqIJVg7H7R7jU4fPEmOD4smqAX7VRflpYI09srWR8aj5OLD2Ccs1pI5mTg==", + "version": "8.20.5", + "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.20.5.tgz", + "integrity": "sha512-P9dF7XbibHph2PFRz8gfBKEXEY/HJPOhym8CHmjF8y3q5mWpKx9xtZapXQUWCgkqvsK0R46Azuz+VaxD4Xl+Tg==", "engines": { "node": ">=12" }, @@ -4873,9 +4879,9 @@ } }, "node_modules/@types/chai": { - "version": "4.3.17", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.17.tgz", - "integrity": "sha512-zmZ21EWzR71B4Sscphjief5djsLre50M6lI622OSySTmn9DB3j+C3kWroHfBQWXbOBwbgg/M8CG/hUxDLIloow==" + "version": "4.3.19", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.19.tgz", + "integrity": "sha512-2hHHvQBVE2FiSK4eN0Br6snX9MtolHaTo/batnLjlGRhoQzlCL61iVpxoqO7SfFyOw+P/pwv+0zNHzKoGWz9Cw==" }, "node_modules/@types/estree": { "version": "1.0.5", @@ -5589,9 +5595,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, "dependencies": { "acorn": "^8.11.0" @@ -5980,9 +5986,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -6021,9 +6027,9 @@ } }, "node_modules/aws4": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.1.tgz", - "integrity": "sha512-u5w79Rd7SU4JaIlA/zFqG+gOiuq25q5VLyZ8E+ijJeILuTxVzZgp2CaGw/UTw6pXYN9XMO9yiqj/nEHmhTG5CA==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" }, "node_modules/axe-core": { "version": "4.10.0", @@ -6262,9 +6268,9 @@ "optional": true }, "node_modules/bare-fs": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.1.tgz", - "integrity": "sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.4.tgz", + "integrity": "sha512-7YyxitZEq0ey5loOF5gdo1fZQFF7290GziT+VbAJ+JbYTJYaPZwuEz2r/Nq23sm4fjyTgUf2uJI2gkT3xAuSYA==", "dev": true, "optional": true, "dependencies": { @@ -6274,9 +6280,9 @@ } }, "node_modules/bare-os": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.0.tgz", - "integrity": "sha512-v8DTT08AS/G0F9xrhyLtepoo9EJBJ85FRSMbu1pQUlAf6A8T0tEEQGMVObWeqpjhSPXsE0VGlluFBJu2fdoTNg==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.3.tgz", + "integrity": "sha512-FjkNiU3AwTQNQkcxFOmDcCfoN1LjjtU+ofGJh5DymZZLTqdw2i/CzV7G0h3snvh6G8jrWtdmNSgZPH4L2VOAsQ==", "dev": true, "optional": true }, @@ -6291,13 +6297,14 @@ } }, "node_modules/bare-stream": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.1.3.tgz", - "integrity": "sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", + "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", "dev": true, "optional": true, "dependencies": { - "streamx": "^2.18.0" + "b4a": "^1.6.6", + "streamx": "^2.20.0" } }, "node_modules/base64-arraybuffer": { @@ -6362,18 +6369,6 @@ "node": "*" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -6606,9 +6601,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001651", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", - "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "version": "1.0.30001660", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz", + "integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==", "funding": [ { "type": "opencollective", @@ -6696,42 +6691,6 @@ "node": ">= 0.8.0" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/chrome-trace-event": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", @@ -6769,9 +6728,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==" }, "node_modules/classnames": { "version": "2.5.1", @@ -7032,9 +6991,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.38.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz", - "integrity": "sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==", + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", + "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", "dependencies": { "browserslist": "^4.23.3" }, @@ -7044,9 +7003,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.38.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.38.0.tgz", - "integrity": "sha512-8balb/HAXo06aHP58mZMtXgD8vcnXz9tUDePgqBgJgKdmTlMt+jw3ujqniuBDQXMvTzxnMpxHFeuSM3g1jWQuQ==", + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.38.1.tgz", + "integrity": "sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -7258,9 +7217,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cypress": { - "version": "13.14.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.14.1.tgz", - "integrity": "sha512-Wo+byPmjps66hACEH5udhXINEiN3qS3jWNGRzJOjrRJF3D0+YrcP2LVB1T7oYaVQM/S+eanqEvBWYc8cf7Vcbg==", + "version": "13.14.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.14.2.tgz", + "integrity": "sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA==", "hasInstallScript": true, "dependencies": { "@cypress/request": "^3.0.1", @@ -7568,11 +7527,11 @@ "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -7940,9 +7899,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.11", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.11.tgz", - "integrity": "sha512-R1CccCDYqndR25CaXFd6hp/u9RaaMcftMkphmvuepXr5b1vfLkRml6aWVeBhXJ7rbevHkKEMJtz8XqPf7ffmew==" + "version": "1.5.20", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.20.tgz", + "integrity": "sha512-74mdl6Fs1HHzK9SUX4CKFxAtAe3nUns48y79TskHNAG6fGOlLfyKA4j855x+0b5u8rWJIrlaG9tcTPstMlwjIw==" }, "node_modules/emittery": { "version": "0.13.1", @@ -8376,9 +8335,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "engines": { "node": ">=6" } @@ -8617,9 +8576,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz", + "integrity": "sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -9803,9 +9762,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { @@ -9866,16 +9825,16 @@ } }, "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.12" + "node": ">= 6" } }, "node_modules/formik": { @@ -10089,9 +10048,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", - "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dev": true, "peer": true, "dependencies": { @@ -10495,13 +10454,13 @@ } }, "node_modules/http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", - "sshpk": "^1.14.1" + "sshpk": "^1.18.0" }, "engines": { "node": ">=0.10" @@ -10846,18 +10805,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -10936,9 +10883,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dependencies": { "hasown": "^2.0.2" }, @@ -12203,20 +12150,6 @@ } } }, - "node_modules/jsdom/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -12467,9 +12400,9 @@ } }, "node_modules/lint-staged/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -12534,9 +12467,9 @@ } }, "node_modules/lint-staged/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", "dev": true }, "node_modules/lint-staged/node_modules/execa": { @@ -13345,9 +13278,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nanoclone": { "version": "0.2.1", @@ -14016,9 +13949,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", - "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", "dev": true, "engines": { "node": "20 || >=22" @@ -14208,9 +14141,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.45", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz", + "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==", "dev": true, "funding": [ { @@ -14460,9 +14393,9 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -14571,11 +14504,11 @@ ] }, "node_modules/qs": { - "version": "6.10.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", - "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -14962,18 +14895,6 @@ "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", @@ -15358,9 +15279,9 @@ } }, "node_modules/rollup": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.0.tgz", - "integrity": "sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.3.tgz", + "integrity": "sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -15373,22 +15294,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.0", - "@rollup/rollup-android-arm64": "4.21.0", - "@rollup/rollup-darwin-arm64": "4.21.0", - "@rollup/rollup-darwin-x64": "4.21.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.0", - "@rollup/rollup-linux-arm-musleabihf": "4.21.0", - "@rollup/rollup-linux-arm64-gnu": "4.21.0", - "@rollup/rollup-linux-arm64-musl": "4.21.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.0", - "@rollup/rollup-linux-riscv64-gnu": "4.21.0", - "@rollup/rollup-linux-s390x-gnu": "4.21.0", - "@rollup/rollup-linux-x64-gnu": "4.21.0", - "@rollup/rollup-linux-x64-musl": "4.21.0", - "@rollup/rollup-win32-arm64-msvc": "4.21.0", - "@rollup/rollup-win32-ia32-msvc": "4.21.0", - "@rollup/rollup-win32-x64-msvc": "4.21.0", + "@rollup/rollup-android-arm-eabi": "4.21.3", + "@rollup/rollup-android-arm64": "4.21.3", + "@rollup/rollup-darwin-arm64": "4.21.3", + "@rollup/rollup-darwin-x64": "4.21.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.21.3", + "@rollup/rollup-linux-arm-musleabihf": "4.21.3", + "@rollup/rollup-linux-arm64-gnu": "4.21.3", + "@rollup/rollup-linux-arm64-musl": "4.21.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3", + "@rollup/rollup-linux-riscv64-gnu": "4.21.3", + "@rollup/rollup-linux-s390x-gnu": "4.21.3", + "@rollup/rollup-linux-x64-gnu": "4.21.3", + "@rollup/rollup-linux-x64-musl": "4.21.3", + "@rollup/rollup-win32-arm64-msvc": "4.21.3", + "@rollup/rollup-win32-ia32-msvc": "4.21.3", + "@rollup/rollup-win32-x64-msvc": "4.21.3", "fsevents": "~2.3.2" } }, @@ -15420,15 +15341,15 @@ } }, "node_modules/rsuite-table": { - "version": "5.18.3", - "resolved": "https://registry.npmjs.org/rsuite-table/-/rsuite-table-5.18.3.tgz", - "integrity": "sha512-Rua79XndYY+UdCUpBuH1Ew5qa54y6zLZ0RNRnudKgamksrV1j+rUhcCsA03a5ZY+b8DXTwct4V/Q6K9q/cJT5w==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/rsuite-table/-/rsuite-table-5.19.1.tgz", + "integrity": "sha512-PsG+z3GfwywDvPVEjZYVZcel0M6zOBAx2HKTgYLfct/yAzXJWPgW/eVuv9+8KmkcKzAh03UVYQdB88Gp7+RlGg==", "dependencies": { "@babel/runtime": "^7.12.5", "@juggle/resize-observer": "^3.3.1", "@rsuite/icons": "^1.0.0", "classnames": "^2.3.1", - "dom-lib": "^3.1.3", + "dom-lib": "^3.3.1", "lodash": "^4.17.21", "react-is": "^17.0.2" }, @@ -15948,9 +15869,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "engines": { "node": ">=0.10.0" } @@ -16048,9 +15969,9 @@ } }, "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.0.tgz", + "integrity": "sha512-ZGd1LhDeGFucr1CUCTBOS58ZhEendd0ttpGT3usTvosS4ntIwKN9LJFp+OeCSprsCPL14BXVRZlHGRY1V9PVzQ==", "dev": true, "dependencies": { "fast-fifo": "^1.3.2", @@ -16499,9 +16420,9 @@ } }, "node_modules/terser": { - "version": "5.31.6", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", - "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.32.0.tgz", + "integrity": "sha512-v3Gtw3IzpBJ0ugkxEX8U0W6+TnPKRRCWGh1jC/iM/e3Ki5+qvO1L1EAZ56bZasc64aXHwRHNIQEzm6//i5cemQ==", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -16838,9 +16759,9 @@ } }, "node_modules/tsconfck": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.1.tgz", - "integrity": "sha512-00eoI6WY57SvZEVjm13stEVE90VkEdJAFGgpFLTsZbJyW/LwFQ7uQxJHWpZ2hzSWgCPKc9AnBnNP+0X7o3hAmQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.3.tgz", + "integrity": "sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==", "dev": true, "bin": { "tsconfck": "bin/tsconfck.js" @@ -16891,9 +16812,9 @@ } }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -17256,18 +17177,24 @@ } }, "node_modules/unplugin": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.12.2.tgz", - "integrity": "sha512-bEqQxeC7rxtxPZ3M5V4Djcc4lQqKPgGe3mAWZvxcSmX5jhGxll19NliaRzQSQPrk4xJZSGniK3puLWpRuZN7VQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.14.1.tgz", + "integrity": "sha512-lBlHbfSFPToDYp9pjXlUEFVxYLaue9f9T1HC+4OHlmj+HnMDdz9oZY+erXfoCe/5V/7gKUSY2jpXPb9S7f0f/w==", "dev": true, "dependencies": { "acorn": "^8.12.1", - "chokidar": "^3.6.0", - "webpack-sources": "^3.2.3", "webpack-virtual-modules": "^0.6.2" }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "webpack-sources": "^3" + }, + "peerDependenciesMeta": { + "webpack-sources": { + "optional": true + } } }, "node_modules/untildify": { @@ -17843,9 +17770,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "engines": { "node": ">=12" }, @@ -18023,9 +17950,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/yaml": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", - "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", "dev": true, "bin": { "yaml": "bin.mjs" diff --git a/frontend/package.json b/frontend/package.json index d1f9bac90..6dd91c8d2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,14 +25,14 @@ "test:unit:watch": "npm run test:unit -- --watch" }, "dependencies": { - "@mtes-mct/monitor-ui": "21.2.0", + "@mtes-mct/monitor-ui": "22.1.0", "@reduxjs/toolkit": "2.0.0", "@rsuite/responsive-nav": "5.0.2", "@sentry/browser": "7.73.0", "@sentry/react": "7.73.0", "@sentry/tracing": "7.114.0", "@svgr/webpack": "8.1.0", - "@tanstack/react-table": "8.20.1", + "@tanstack/react-table": "8.20.5", "@tanstack/react-virtual": "beta", "classnames": "2.5.1", "dayjs": "1.11.12", diff --git a/frontend/src/components/style.ts b/frontend/src/components/style.ts index 8971cc8e9..bdc6586bc 100644 --- a/frontend/src/components/style.ts +++ b/frontend/src/components/style.ts @@ -1,3 +1,4 @@ +import { Button, MapMenuDialog } from '@mtes-mct/monitor-ui' import styled from 'styled-components' export const Italic = styled.div` @@ -7,3 +8,22 @@ export const Italic = styled.div` export const Bold = styled.span` font-weight: 700; ` + +export const StyledMapMenuDialogContainer = styled(MapMenuDialog.Container)` + position: absolute; + transform: translateX(-100%); + margin-left: -6px; + display: block; +` + +// TODO delete when Monitor-ui component have good padding +export const DialogButton = styled(Button)` + padding: 4px 12px; +` + +export const DialogSeparator = styled.div` + height: 1px; + border-top: 1px solid ${p => p.theme.color.gainsboro}; + margin-left: -12px; + margin-right: -12px; +` diff --git a/frontend/src/domain/entities/map/constants.ts b/frontend/src/domain/entities/map/constants.ts index 142481dd1..22fea61e0 100644 --- a/frontend/src/domain/entities/map/constants.ts +++ b/frontend/src/domain/entities/map/constants.ts @@ -45,6 +45,7 @@ export enum DistanceUnit { } export enum MapToolType { + DASHBOARD = 'DASHBOARD', FILTERS = 'FILTERS', INTEREST_POINT = 'INTEREST_POINT', MEASUREMENT = 'MEASUREMENT', diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index 4c0f12f1a..be59ded67 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -42,6 +42,7 @@ type GlobalStateType = { displayLocateOnMap: boolean displayMeasurement: boolean displayInterestPoint: boolean + displayDashboard: boolean displaySearchSemaphoreButton: boolean displayReportingsButton: boolean displayRightMenuControlUnitListButton: boolean @@ -76,6 +77,8 @@ type GlobalStateType = { displayStationLayer: boolean + isDashboardDialogVisible: boolean + isLayersSidebarVisible: boolean isMapToolVisible?: MapToolType @@ -97,6 +100,7 @@ const initialState: GlobalStateType = { displayLocateOnMap: true, displayMeasurement: true, displayInterestPoint: true, + displayDashboard: true, displaySearchSemaphoreButton: true, displayReportingsButton: true, displayRightMenuControlUnitListButton: true, @@ -135,6 +139,8 @@ const initialState: GlobalStateType = { displayStationLayer: false, + isDashboardDialogVisible: false, + isMapToolVisible: undefined, healthcheckTextWarning: undefined, @@ -164,6 +170,7 @@ const globalSlice = createSlice({ state.isSearchSemaphoreVisible = false state.isSearchMissionsVisible = false state.isMapToolVisible = undefined + state.isDashboardDialogVisible = false }, removeOverlayStroke(state) { diff --git a/frontend/src/env.d.ts b/frontend/src/env.d.ts index 925e6c5b0..119de152a 100644 --- a/frontend/src/env.d.ts +++ b/frontend/src/env.d.ts @@ -2,6 +2,7 @@ /// interface ImportMetaEnv { + readonly FRONTEND_DASHBOARD_ENABLED: string readonly FRONTEND_GEOSERVER_NAMESPACE: string readonly FRONTEND_GEOSERVER_REMOTE_URL: string readonly FRONTEND_GOOGLEMAPS_API_KEY: string diff --git a/frontend/src/features/Account/components/Account.tsx b/frontend/src/features/Account/components/Account.tsx index 0f6a67c44..acc3efdd5 100644 --- a/frontend/src/features/Account/components/Account.tsx +++ b/frontend/src/features/Account/components/Account.tsx @@ -1,5 +1,4 @@ import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' -import { ButtonWrapper } from '@features/MainWindow/components/RightMenu/ButtonWrapper' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' import { Accent, Button, Icon, MapMenuDialog, Size } from '@mtes-mct/monitor-ui' @@ -8,8 +7,6 @@ import { globalActions } from 'domain/shared_slices/Global' import { useAuth } from 'react-oidc-context' import styled from 'styled-components' -const MARGIN_TOP = 388 - export function Account() { const dispatch = useAppDispatch() const isAccountVisible = useAppSelector(state => state.global.isAccountDialogVisible) @@ -30,7 +27,7 @@ export function Account() { } return ( - + <> {isAccountVisible && ( @@ -57,7 +54,7 @@ export function Account() { size={Size.LARGE} title="Mon compte" /> - + ) } diff --git a/frontend/src/features/MainWindow/components/RightMenu/ControlUnitListButton.tsx b/frontend/src/features/ControlUnit/components/ControlUnitListButton.tsx similarity index 64% rename from frontend/src/features/MainWindow/components/RightMenu/ControlUnitListButton.tsx rename to frontend/src/features/ControlUnit/components/ControlUnitListButton.tsx index a93500a34..0df8bf7cc 100644 --- a/frontend/src/features/MainWindow/components/RightMenu/ControlUnitListButton.tsx +++ b/frontend/src/features/ControlUnit/components/ControlUnitListButton.tsx @@ -1,13 +1,12 @@ import { Icon, Size } from '@mtes-mct/monitor-ui' import { useCallback } from 'react' -import { ButtonWrapper } from './ButtonWrapper' -import { globalActions } from '../../../../domain/shared_slices/Global' -import { reduceReportingFormOnMap } from '../../../../domain/use_cases/reporting/reduceReportingFormOnMap' -import { useAppDispatch } from '../../../../hooks/useAppDispatch' -import { useAppSelector } from '../../../../hooks/useAppSelector' -import { MenuWithCloseButton } from '../../../commonStyles/map/MenuWithCloseButton' -import { ControlUnitListDialog } from '../../../ControlUnit/components/ControlUnitListDialog' +import { ControlUnitListDialog } from './ControlUnitListDialog' +import { globalActions } from '../../../domain/shared_slices/Global' +import { reduceReportingFormOnMap } from '../../../domain/use_cases/reporting/reduceReportingFormOnMap' +import { useAppDispatch } from '../../../hooks/useAppDispatch' +import { useAppSelector } from '../../../hooks/useAppSelector' +import { MenuWithCloseButton } from '../../commonStyles/map/MenuWithCloseButton' export function ControlUnitListButton() { const dispatch = useAppDispatch() @@ -20,7 +19,7 @@ export function ControlUnitListButton() { }, [dispatch, isControlUnitListDialogVisible]) return ( - + <> {/* TODO The right menu should be a full `MainWindow` feature component by itself. */} {/* We should positition related dialogs independantly, not include them here. */} {isControlUnitListDialogVisible && } @@ -32,6 +31,6 @@ export function ControlUnitListButton() { size={Size.LARGE} title="Liste des unités de contrôle" /> - + ) } diff --git a/frontend/src/features/ControlUnit/components/ControlUnitListDialog/index.tsx b/frontend/src/features/ControlUnit/components/ControlUnitListDialog/index.tsx index 986df7031..360b90b03 100644 --- a/frontend/src/features/ControlUnit/components/ControlUnitListDialog/index.tsx +++ b/frontend/src/features/ControlUnit/components/ControlUnitListDialog/index.tsx @@ -1,3 +1,4 @@ +import { StyledMapMenuDialogContainer } from '@components/style' import { Accent, Icon, MapMenuDialog } from '@mtes-mct/monitor-ui' import { useCallback, useMemo } from 'react' @@ -46,7 +47,7 @@ export function ControlUnitListDialog({ onClose }: ControlUnitListDialogProps) { }, [dispatch, displayBaseLayer]) return ( - + Unités de contrôle @@ -63,11 +64,6 @@ export function ControlUnitListDialog({ onClose }: ControlUnitListDialogProps) { {filteredControlUnits && filteredControlUnits.map(controlUnit => )} - {/* - - */} - + ) } diff --git a/frontend/src/features/Dashboard/components/DashboardMapButton.tsx b/frontend/src/features/Dashboard/components/DashboardMapButton.tsx new file mode 100644 index 000000000..b65e34608 --- /dev/null +++ b/frontend/src/features/Dashboard/components/DashboardMapButton.tsx @@ -0,0 +1,58 @@ +import { DialogButton, DialogSeparator, StyledMapMenuDialogContainer } from '@components/style' +import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' +import { useAppDispatch } from '@hooks/useAppDispatch' +import { useAppSelector } from '@hooks/useAppSelector' +import { Accent, Button, Icon, MapMenuDialog, Size } from '@mtes-mct/monitor-ui' +import { globalActions, setDisplayedItems } from 'domain/shared_slices/Global' +import { reduceReportingFormOnMap } from 'domain/use_cases/reporting/reduceReportingFormOnMap' +import styled from 'styled-components' + +export function DashboardMapButton() { + const dispatch = useAppDispatch() + const isDashboardDialogVisible = useAppSelector(state => state.global.isDashboardDialogVisible) + + const toggleDashboardDialog = e => { + e.preventDefault() + dispatch(globalActions.hideSideButtons()) + dispatch( + setDisplayedItems({ + isDashboardDialogVisible: !isDashboardDialogVisible + }) + ) + dispatch(reduceReportingFormOnMap()) + } + + return ( + <> + {isDashboardDialogVisible && ( + + + + Briefs pour les unités + + + + + {}}> + Voir les briefs déjà créés + + + + )} + + + ) +} + +const StyledTitle = styled(MapMenuDialog.Title)` + margin: auto; +` diff --git a/frontend/src/features/InterestPoint/components/EditInterestPoint.tsx b/frontend/src/features/InterestPoint/components/EditInterestPoint.tsx index 0c2d18941..7a5d7959a 100644 --- a/frontend/src/features/InterestPoint/components/EditInterestPoint.tsx +++ b/frontend/src/features/InterestPoint/components/EditInterestPoint.tsx @@ -1,3 +1,4 @@ +import { StyledMapMenuDialogContainer } from '@components/style' import { SetCoordinates } from '@features/coordinates/SetCoordinates' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' @@ -117,7 +118,7 @@ export function EditInterestPoint({ cancel, close }: EditInterestPointProps) { } return ( - + @@ -165,7 +166,7 @@ export function EditInterestPoint({ cancel, close }: EditInterestPointProps) { Annuler - + ) } diff --git a/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx b/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx index 6ab17080e..4c6c67960 100644 --- a/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx +++ b/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx @@ -9,14 +9,13 @@ import { import { Icon, Size } from '@mtes-mct/monitor-ui' import { closeAllOverlays } from 'domain/use_cases/map/closeAllOverlays' import { reduceReportingFormOnMap } from 'domain/use_cases/reporting/reduceReportingFormOnMap' -import { useCallback, useEffect, useMemo, useRef } from 'react' +import { useCallback, useEffect, useMemo } from 'react' import { MapToolType } from '../../../domain/entities/map/constants' import { globalActions, setDisplayedItems } from '../../../domain/shared_slices/Global' import { useAppDispatch } from '../../../hooks/useAppDispatch' import { useAppSelector } from '../../../hooks/useAppSelector' import { useEscapeKey } from '../../../hooks/useEscapeKey' -import { ButtonWrapper } from '../../MainWindow/components/RightMenu/ButtonWrapper' export function InterestPointMapButton() { const dispatch = useAppDispatch() @@ -24,8 +23,6 @@ export function InterestPointMapButton() { const isOpen = useMemo(() => isMapToolVisible === MapToolType.INTEREST_POINT, [isMapToolVisible]) - const wrapperRef = useRef(null) - useEffect(() => { if (isOpen) { dispatch(startDrawingInterestPoint()) @@ -66,7 +63,7 @@ export function InterestPointMapButton() { }, [close, dispatch, isOpen]) return ( - + <> {isOpen && } - + ) } diff --git a/frontend/src/features/MainWindow/components/RightMenu/ButtonWrapper.tsx b/frontend/src/features/MainWindow/components/RightMenu/ButtonWrapper.tsx deleted file mode 100644 index c71e44a22..000000000 --- a/frontend/src/features/MainWindow/components/RightMenu/ButtonWrapper.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { forwardRef } from 'react' -import styled from 'styled-components' - -import { useAppSelector } from '../../../../hooks/useAppSelector' - -type ButtonWrapperProps = { - children: React.ReactNode - topPosition: number -} -export function ButtonWrapperWithRef({ children, topPosition }: ButtonWrapperProps, ref: React.Ref) { - const hasFullHeightRightDialogOpen = useAppSelector(state => state.mainWindow.hasFullHeightRightDialogOpen) - const isRightMenuOpened = useAppSelector(state => state.mainWindow.isRightMenuOpened) - - return ( - - {children} - - ) -} - -const Wrapper = styled.div<{ - $hasFullHeightRightDialogOpen: boolean - $isRightMenuOpened: boolean - $topPosition: number -}>` - display: flex; - justify-content: flex-end; - position: absolute; - right: ${p => (!p.$hasFullHeightRightDialogOpen || p.$isRightMenuOpened ? 10 : 0)}px; - top: ${p => p.$topPosition}px; - transition: right 0.3s ease-out; -` - -export const ButtonWrapper = forwardRef(ButtonWrapperWithRef) diff --git a/frontend/src/features/Reportings/components/ReportingsButton/SearchReportings.tsx b/frontend/src/features/Reportings/components/ReportingsButton/SearchReportings.tsx index e4d8175d1..a451ce8f4 100644 --- a/frontend/src/features/Reportings/components/ReportingsButton/SearchReportings.tsx +++ b/frontend/src/features/Reportings/components/ReportingsButton/SearchReportings.tsx @@ -1,3 +1,4 @@ +import { StyledMapMenuDialogContainer } from '@components/style' import { ReportingFilterContext, ReportingsFilters } from '@features/Reportings/Filters' import { sideWindowActions } from '@features/SideWindow/slice' import { useAppDispatch } from '@hooks/useAppDispatch' @@ -7,7 +8,6 @@ import { sideWindowPaths } from 'domain/entities/sideWindow' import { ReportingContext, setDisplayedItems } from 'domain/shared_slices/Global' import { closeAllOverlays } from 'domain/use_cases/map/closeAllOverlays' import { addReporting } from 'domain/use_cases/reporting/addReporting' -import styled from 'styled-components' export function SearchReportings() { const dispatch = useAppDispatch() @@ -32,33 +32,27 @@ export function SearchReportings() { } return ( - - - - - Signalements - - - - - - - - - - - + + + + Signalements + + + + + + + + + + ) } - -const StyledContainer = styled.div` - display: flex; -` diff --git a/frontend/src/features/Reportings/components/ReportingsButton/index.tsx b/frontend/src/features/Reportings/components/ReportingsButton/index.tsx index a5138ba82..1dd8f9d0e 100644 --- a/frontend/src/features/Reportings/components/ReportingsButton/index.tsx +++ b/frontend/src/features/Reportings/components/ReportingsButton/index.tsx @@ -1,5 +1,4 @@ import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' -import { ButtonWrapper } from '@features/MainWindow/components/RightMenu/ButtonWrapper' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' import { Icon, Size } from '@mtes-mct/monitor-ui' @@ -19,7 +18,7 @@ export function ReportingsButton() { } return ( - + <> {isSearchReportingsVisible && } - + ) } diff --git a/frontend/src/features/Semaphore/components/SearchSemaphoreButton/SearchSemaphores.tsx b/frontend/src/features/Semaphore/components/SearchSemaphoreButton/SearchSemaphores.tsx index d7dc84be5..69546075c 100644 --- a/frontend/src/features/Semaphore/components/SearchSemaphoreButton/SearchSemaphores.tsx +++ b/frontend/src/features/Semaphore/components/SearchSemaphoreButton/SearchSemaphores.tsx @@ -1,4 +1,5 @@ import { useGetSemaphoresQuery } from '@api/semaphoresAPI' +import { StyledMapMenuDialogContainer } from '@components/style' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' import { Accent, CustomSearch, Icon, MapMenuDialog, OPENLAYERS_PROJECTION, Search, Size } from '@mtes-mct/monitor-ui' @@ -79,7 +80,7 @@ export function SearchSemaphores() { } return ( - + Sémaphores @@ -116,7 +117,7 @@ export function SearchSemaphores() { ))} )} - + ) } diff --git a/frontend/src/features/Semaphore/components/SearchSemaphoreButton/index.tsx b/frontend/src/features/Semaphore/components/SearchSemaphoreButton/index.tsx index fa8fe3061..f5bc45637 100644 --- a/frontend/src/features/Semaphore/components/SearchSemaphoreButton/index.tsx +++ b/frontend/src/features/Semaphore/components/SearchSemaphoreButton/index.tsx @@ -1,5 +1,4 @@ import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' -import { ButtonWrapper } from '@features/MainWindow/components/RightMenu/ButtonWrapper' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' import { Icon, Size } from '@mtes-mct/monitor-ui' @@ -8,7 +7,7 @@ import { reduceReportingFormOnMap } from 'domain/use_cases/reporting/reduceRepor import { SearchSemaphores } from './SearchSemaphores' -export function SearchSemaphoreButton({ isSuperUser }: { isSuperUser: boolean | undefined }) { +export function SearchSemaphoreButton() { const dispatch = useAppDispatch() const isSearchSemaphoreVisible = useAppSelector(state => state.global.isSearchSemaphoreVisible) @@ -19,7 +18,7 @@ export function SearchSemaphoreButton({ isSuperUser }: { isSuperUser: boolean | } return ( - + <> {isSearchSemaphoreVisible && } - + ) } diff --git a/frontend/src/features/map/tools/measurements/MeasurementMapButton.tsx b/frontend/src/features/map/tools/measurements/MeasurementMapButton.tsx index a14b27d1a..0c8731308 100644 --- a/frontend/src/features/map/tools/measurements/MeasurementMapButton.tsx +++ b/frontend/src/features/map/tools/measurements/MeasurementMapButton.tsx @@ -13,7 +13,6 @@ import { useAppSelector } from '../../../../hooks/useAppSelector' import { useClickOutsideWhenOpenedAndExecute } from '../../../../hooks/useClickOutsideWhenOpenedAndExecute' import { useEscapeKey } from '../../../../hooks/useEscapeKey' import { MapComponentStyle } from '../../../commonStyles/MapComponent.style' -import { ButtonWrapper } from '../../../MainWindow/components/RightMenu/ButtonWrapper' import { MapToolButton } from '../MapToolButton' export function MeasurementMapButton() { @@ -72,18 +71,17 @@ export function MeasurementMapButton() { }, [dispatch, measurementTypeToAdd]) return ( - + <> - + - + ) } @@ -123,7 +121,6 @@ const MeasurementOptions = styled(MapComponentStyle)<{ opacity: ${p => (p.isOpen ? '1' : '0')}; position: absolute; right: 10px; - top: 0; transition: all 0.5s; width: 175px; ` diff --git a/frontend/src/features/missions/MissionForm/utils.ts b/frontend/src/features/missions/MissionForm/utils.ts index 90fe9e29b..3390e303e 100644 --- a/frontend/src/features/missions/MissionForm/utils.ts +++ b/frontend/src/features/missions/MissionForm/utils.ts @@ -20,6 +20,10 @@ export const isMissionAutoUpdateEnabled = () => isCypress() ? window.Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE') === 'true' : import.meta.env.FRONTEND_MISSION_FORM_AUTO_UPDATE === 'true' +export const isDashboardEnabled = () => + isCypress() + ? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true' + : import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true' /** * should a Formik `onChange` event trigger `saveMission`. diff --git a/frontend/src/features/missions/MissionsButton/index.tsx b/frontend/src/features/missions/MissionsButton/index.tsx index 935f68d0c..59baa0e2a 100644 --- a/frontend/src/features/missions/MissionsButton/index.tsx +++ b/frontend/src/features/missions/MissionsButton/index.tsx @@ -1,17 +1,15 @@ -import { Accent, Button, Icon, MapMenuDialog, Size } from '@mtes-mct/monitor-ui' +import { DialogButton, DialogSeparator, StyledMapMenuDialogContainer } from '@components/style' +import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' +import { SideWindowStatus, sideWindowActions } from '@features/SideWindow/slice' +import { useAppDispatch } from '@hooks/useAppDispatch' +import { useAppSelector } from '@hooks/useAppSelector' +import { Accent, Icon, MapMenuDialog, Size } from '@mtes-mct/monitor-ui' +import { isMissionOrMissionsPage } from '@utils/routes' +import { sideWindowPaths } from 'domain/entities/sideWindow' +import { globalActions, setDisplayedItems } from 'domain/shared_slices/Global' +import { addMission } from 'domain/use_cases/missions/addMission' +import { reduceReportingFormOnMap } from 'domain/use_cases/reporting/reduceReportingFormOnMap' import { useMemo } from 'react' -import styled from 'styled-components' - -import { sideWindowPaths } from '../../../domain/entities/sideWindow' -import { setDisplayedItems } from '../../../domain/shared_slices/Global' -import { addMission } from '../../../domain/use_cases/missions/addMission' -import { reduceReportingFormOnMap } from '../../../domain/use_cases/reporting/reduceReportingFormOnMap' -import { useAppDispatch } from '../../../hooks/useAppDispatch' -import { useAppSelector } from '../../../hooks/useAppSelector' -import { isMissionOrMissionsPage } from '../../../utils/routes' -import { MenuWithCloseButton } from '../../commonStyles/map/MenuWithCloseButton' -import { ButtonWrapper } from '../../MainWindow/components/RightMenu/ButtonWrapper' -import { sideWindowActions, SideWindowStatus } from '../../SideWindow/slice' export function MissionsMenu() { const dispatch = useAppDispatch() @@ -34,14 +32,10 @@ export function MissionsMenu() { const toggleMissionsMenu = e => { e.preventDefault() + dispatch(globalActions.hideSideButtons()) dispatch( setDisplayedItems({ - isControlUnitDialogVisible: false, - isControlUnitListDialogVisible: false, - isMapToolVisible: undefined, - isSearchMissionsVisible: !isSearchMissionsVisible, - isSearchReportingsVisible: false, - isSearchSemaphoreVisible: false + isSearchMissionsVisible: !isSearchMissionsVisible }) ) dispatch(reduceReportingFormOnMap()) @@ -51,9 +45,9 @@ export function MissionsMenu() { } return ( - + <> {isSearchMissionsVisible && ( - + Missions et contrôles @@ -64,15 +58,15 @@ export function MissionsMenu() { /> - + Ajouter une nouvelle mission - - - + + + Voir la vue détaillée des missions - + - + )} - + ) } - -// TODO delete when Monitor-ui component have good padding -const StyledButton = styled(Button)` - padding: 4px 12px; -` - -const StyledSeparator = styled.div` - height: 1px; - border-top: 1px solid ${p => p.theme.color.gainsboro}; - margin-left: -12px; - margin-right: -12px; -` diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 93c351a8a..13ba85fcd 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -1,4 +1,5 @@ import { Account } from '@features/Account/components/Account' +import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' import { BannerStack } from '@features/MainWindow/components/BannerStack' import { AttachMissionToReportingModal } from '@features/Reportings/components/ReportingForm/AttachMission/AttachMissionToReportingModal' import { REPORTING_EVENT_UNSYNCHRONIZED_PROPERTIES } from '@features/Reportings/components/ReportingForm/constants' @@ -16,11 +17,11 @@ import styled from 'styled-components' import { ReportingContext } from '../domain/shared_slices/Global' import { ControlUnitDialog } from '../features/ControlUnit/components/ControlUnitDialog' +import { ControlUnitListButton } from '../features/ControlUnit/components/ControlUnitListButton' import { Healthcheck } from '../features/healthcheck/Healthcheck' import { InterestPointMapButton } from '../features/InterestPoint/components/InterestPointMapButton' import { LayersSidebar } from '../features/layersSelector' import { LocateOnMap } from '../features/LocateOnMap' -import { ControlUnitListButton } from '../features/MainWindow/components/RightMenu/ControlUnitListButton' import { Map } from '../features/map' import { DrawModal } from '../features/map/draw/DrawModal' import { RightMenuOnHoverArea } from '../features/map/shared/RightMenuOnHoverArea' @@ -45,6 +46,7 @@ export function HomePage() { const displayMissionMenuButton = useAppSelector(state => state.global.displayMissionMenuButton) const displayReportingsButton = useAppSelector(state => state.global.displayReportingsButton) const displayAccountButton = useAppSelector(state => state.global.displayAccountButton) + const displayDashboard = useAppSelector(state => state.global.displayDashboard) const isRightMenuControlUnitListButtonVisible = useAppSelector( state => state.global.displayRightMenuControlUnitListButton ) @@ -53,6 +55,8 @@ export function HomePage() { const selectedMissions = useAppSelector(state => state.missionForms.missions) const reportings = useAppSelector(state => state.reporting.reportings) + const hasFullHeightRightDialogOpen = useAppSelector(state => state.mainWindow.hasFullHeightRightDialogOpen) + const isRightMenuOpened = useAppSelector(state => state.mainWindow.isRightMenuOpened) const reportingEvent = useListenReportingEventUpdates() const hasAtLeastOneMissionFormDirty = useMemo( @@ -108,15 +112,50 @@ export function HomePage() { {displayLocateOnMap && } {isControlUnitDialogVisible && isSuperUser && } - {displayMissionMenuButton && isSuperUser && } - {displayReportingsButton && isSuperUser && } - {displaySearchSemaphoreButton && } - {isRightMenuControlUnitListButtonVisible && isSuperUser && } - - {displayMeasurement && isSuperUser && } - {displayInterestPoint && isSuperUser && } - {displayAccountButton && } - + + {displayMissionMenuButton && isSuperUser && ( +
+ +
+ )} + {displayReportingsButton && isSuperUser && ( +
+ +
+ )} + {displaySearchSemaphoreButton && ( +
+ +
+ )} + {isRightMenuControlUnitListButtonVisible && isSuperUser && ( +
+ +
+ )} + {displayDashboard && isSuperUser && ( +
+ +
+ )} + + + {displayMeasurement && isSuperUser && } + {displayInterestPoint && isSuperUser && ( +
+ +
+ )} + {displayAccountButton && ( +
+ +
+ )} +
+
@@ -134,3 +173,22 @@ const Wrapper = styled.div` overflow-y: hidden; overflow-x: hidden; ` +const ButtonsWrapper = styled.div<{ + $hasFullHeightRightDialogOpen: boolean + $isRightMenuOpened: boolean +}>` + position: absolute; + display: flex; + flex-direction: column; + row-gap: 8px; + top: 82px; + right: ${p => (!p.$hasFullHeightRightDialogOpen || p.$isRightMenuOpened ? 10 : 0)}px; + transition: right 0.3s ease-out; +` + +const ToolButtons = styled.div` + margin-top: 24px; + display: flex; + flex-direction: column; + row-gap: 8px; +` From 8e21e463d805721383cb3fdae9b62d09b809a8d5 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Thu, 12 Sep 2024 10:20:33 +0200 Subject: [PATCH 02/16] feat: add feature flipping --- frontend/src/domain/shared_slices/Global.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index be59ded67..978ce7762 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -1,6 +1,7 @@ // TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice. // TODO "Map" feature should have its own slice where we would transfer the related `display...` props. +import { isDashboardEnabled } from '@features/missions/MissionForm/utils' import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit' import type { MapToolType } from '../entities/map/constants' @@ -100,7 +101,7 @@ const initialState: GlobalStateType = { displayLocateOnMap: true, displayMeasurement: true, displayInterestPoint: true, - displayDashboard: true, + displayDashboard: true && isDashboardEnabled(), displaySearchSemaphoreButton: true, displayReportingsButton: true, displayRightMenuControlUnitListButton: true, From 50d5cd74a7160d07df52399f7d0a2e7de18767cb Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Thu, 12 Sep 2024 17:12:10 +0200 Subject: [PATCH 03/16] tech: update package.lock --- frontend/package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 4acb58062..8f3952fc1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -14943,9 +14943,9 @@ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", - "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", "dependencies": { "regenerate": "^1.4.2" }, @@ -15969,9 +15969,9 @@ } }, "node_modules/streamx": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.0.tgz", - "integrity": "sha512-ZGd1LhDeGFucr1CUCTBOS58ZhEendd0ttpGT3usTvosS4ntIwKN9LJFp+OeCSprsCPL14BXVRZlHGRY1V9PVzQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.1.tgz", + "integrity": "sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==", "dev": true, "dependencies": { "fast-fifo": "^1.3.2", @@ -16544,9 +16544,9 @@ } }, "node_modules/text-decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.1.tgz", - "integrity": "sha512-8zll7REEv4GDD3x4/0pW+ppIxSNs7H1J10IKFZsuOMscumCdM2a+toDGLPA3T+1+fLBql4zbt5z83GEQGGV5VA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", + "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", "dev": true, "dependencies": { "b4a": "^1.6.4" @@ -17023,9 +17023,9 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "engines": { "node": ">=4" } @@ -17043,9 +17043,9 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", "engines": { "node": ">=4" } From 68a09ff22dc4b4420c9a5a7207af9de306e7be66 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Thu, 12 Sep 2024 17:22:36 +0200 Subject: [PATCH 04/16] refacto: Create component Menu --- frontend/src/components/Menu.tsx | 95 ++++++++++++++++++++++++++++++++ frontend/src/pages/HomePage.tsx | 88 ++--------------------------- 2 files changed, 100 insertions(+), 83 deletions(-) create mode 100644 frontend/src/components/Menu.tsx diff --git a/frontend/src/components/Menu.tsx b/frontend/src/components/Menu.tsx new file mode 100644 index 000000000..2fd305886 --- /dev/null +++ b/frontend/src/components/Menu.tsx @@ -0,0 +1,95 @@ +import { Account } from '@features/Account/components/Account' +import { ControlUnitListButton } from '@features/ControlUnit/components/ControlUnitListButton' +import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' +import { InterestPointMapButton } from '@features/InterestPoint/components/InterestPointMapButton' +import { MeasurementMapButton } from '@features/map/tools/measurements/MeasurementMapButton' +import { MissionsMenu } from '@features/missions/MissionsButton' +import { ReportingsButton } from '@features/Reportings/components/ReportingsButton' +import { SearchSemaphoreButton } from '@features/Semaphore/components/SearchSemaphoreButton' +import { useAppSelector } from '@hooks/useAppSelector' +import styled from 'styled-components' + +type MenuProps = { + isSuperUser: boolean +} + +export function Menu({ isSuperUser }: MenuProps) { + const displaySearchSemaphoreButton = useAppSelector(state => state.global.displaySearchSemaphoreButton) + + const displayInterestPoint = useAppSelector(state => state.global.displayInterestPoint) + const displayMeasurement = useAppSelector(state => state.global.displayMeasurement) + const displayMissionMenuButton = useAppSelector(state => state.global.displayMissionMenuButton) + const displayReportingsButton = useAppSelector(state => state.global.displayReportingsButton) + const displayAccountButton = useAppSelector(state => state.global.displayAccountButton) + const displayDashboard = useAppSelector(state => state.global.displayDashboard) + const isRightMenuControlUnitListButtonVisible = useAppSelector( + state => state.global.displayRightMenuControlUnitListButton + ) + const hasFullHeightRightDialogOpen = useAppSelector(state => state.mainWindow.hasFullHeightRightDialogOpen) + const isRightMenuOpened = useAppSelector(state => state.mainWindow.isRightMenuOpened) + + return ( + + {displayMissionMenuButton && isSuperUser && ( +
  • + +
  • + )} + {displayReportingsButton && isSuperUser && ( +
  • + +
  • + )} + {displaySearchSemaphoreButton && ( +
  • + +
  • + )} + {isRightMenuControlUnitListButtonVisible && isSuperUser && ( +
  • + +
  • + )} + {displayDashboard && isSuperUser && ( +
  • + +
  • + )} + + + {displayMeasurement && isSuperUser && } + {displayInterestPoint && isSuperUser && ( +
    + +
    + )} + {displayAccountButton && ( +
    + +
    + )} +
    +
    + ) +} + +const ButtonsWrapper = styled.menu<{ + $hasFullHeightRightDialogOpen: boolean + $isRightMenuOpened: boolean +}>` + position: absolute; + display: flex; + flex-direction: column; + row-gap: 8px; + top: 82px; + right: ${p => (!p.$hasFullHeightRightDialogOpen || p.$isRightMenuOpened ? 10 : 0)}px; + transition: right 0.3s ease-out; + list-style: none; +` + +const ToolButtons = styled.div` + margin-top: 24px; + display: flex; + flex-direction: column; + row-gap: 8px; +` diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 13ba85fcd..8f44a35fd 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -1,11 +1,8 @@ -import { Account } from '@features/Account/components/Account' -import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' +import { Menu } from '@components/Menu' import { BannerStack } from '@features/MainWindow/components/BannerStack' import { AttachMissionToReportingModal } from '@features/Reportings/components/ReportingForm/AttachMission/AttachMissionToReportingModal' import { REPORTING_EVENT_UNSYNCHRONIZED_PROPERTIES } from '@features/Reportings/components/ReportingForm/constants' import { useListenReportingEventUpdates } from '@features/Reportings/components/ReportingForm/hooks/useListenReportingEventUpdates' -import { ReportingsButton } from '@features/Reportings/components/ReportingsButton' -import { SearchSemaphoreButton } from '@features/Semaphore/components/SearchSemaphoreButton' import { useAppDispatch } from '@hooks/useAppDispatch' import { useGetCurrentUserAuthorizationQueryOverride } from '@hooks/useGetCurrentUserAuthorizationQueryOverride' import { reportingActions } from 'domain/shared_slices/reporting' @@ -17,17 +14,13 @@ import styled from 'styled-components' import { ReportingContext } from '../domain/shared_slices/Global' import { ControlUnitDialog } from '../features/ControlUnit/components/ControlUnitDialog' -import { ControlUnitListButton } from '../features/ControlUnit/components/ControlUnitListButton' import { Healthcheck } from '../features/healthcheck/Healthcheck' -import { InterestPointMapButton } from '../features/InterestPoint/components/InterestPointMapButton' import { LayersSidebar } from '../features/layersSelector' import { LocateOnMap } from '../features/LocateOnMap' import { Map } from '../features/map' import { DrawModal } from '../features/map/draw/DrawModal' import { RightMenuOnHoverArea } from '../features/map/shared/RightMenuOnHoverArea' -import { MeasurementMapButton } from '../features/map/tools/measurements/MeasurementMapButton' import { AttachReportingToMissionModal } from '../features/missions/MissionForm/AttachReporting/AttachReportingToMissionModal' -import { MissionsMenu } from '../features/missions/MissionsButton' import { Reportings } from '../features/Reportings' import { SideWindowLauncher } from '../features/SideWindow/SideWindowLauncher' import { useAppSelector } from '../hooks/useAppSelector' @@ -40,23 +33,13 @@ export function HomePage() { const isSuperUser = useMemo(() => user?.isSuperUser, [user]) const displayDrawModal = useAppSelector(state => state.global.displayDrawModal) - const displayInterestPoint = useAppSelector(state => state.global.displayInterestPoint) const displayLocateOnMap = useAppSelector(state => state.global.displayLocateOnMap) - const displayMeasurement = useAppSelector(state => state.global.displayMeasurement) - const displayMissionMenuButton = useAppSelector(state => state.global.displayMissionMenuButton) - const displayReportingsButton = useAppSelector(state => state.global.displayReportingsButton) - const displayAccountButton = useAppSelector(state => state.global.displayAccountButton) - const displayDashboard = useAppSelector(state => state.global.displayDashboard) - const isRightMenuControlUnitListButtonVisible = useAppSelector( - state => state.global.displayRightMenuControlUnitListButton - ) - const displaySearchSemaphoreButton = useAppSelector(state => state.global.displaySearchSemaphoreButton) + const isControlUnitDialogVisible = useAppSelector(state => state.global.isControlUnitDialogVisible) const selectedMissions = useAppSelector(state => state.missionForms.missions) const reportings = useAppSelector(state => state.reporting.reportings) - const hasFullHeightRightDialogOpen = useAppSelector(state => state.mainWindow.hasFullHeightRightDialogOpen) - const isRightMenuOpened = useAppSelector(state => state.mainWindow.isRightMenuOpened) + const reportingEvent = useListenReportingEventUpdates() const hasAtLeastOneMissionFormDirty = useMemo( @@ -112,50 +95,8 @@ export function HomePage() { {displayLocateOnMap && } {isControlUnitDialogVisible && isSuperUser && } - - {displayMissionMenuButton && isSuperUser && ( -
    - -
    - )} - {displayReportingsButton && isSuperUser && ( -
    - -
    - )} - {displaySearchSemaphoreButton && ( -
    - -
    - )} - {isRightMenuControlUnitListButtonVisible && isSuperUser && ( -
    - -
    - )} - {displayDashboard && isSuperUser && ( -
    - -
    - )} - - - {displayMeasurement && isSuperUser && } - {displayInterestPoint && isSuperUser && ( -
    - -
    - )} - {displayAccountButton && ( -
    - -
    - )} -
    -
    + + @@ -173,22 +114,3 @@ const Wrapper = styled.div` overflow-y: hidden; overflow-x: hidden; ` -const ButtonsWrapper = styled.div<{ - $hasFullHeightRightDialogOpen: boolean - $isRightMenuOpened: boolean -}>` - position: absolute; - display: flex; - flex-direction: column; - row-gap: 8px; - top: 82px; - right: ${p => (!p.$hasFullHeightRightDialogOpen || p.$isRightMenuOpened ? 10 : 0)}px; - transition: right 0.3s ease-out; -` - -const ToolButtons = styled.div` - margin-top: 24px; - display: flex; - flex-direction: column; - row-gap: 8px; -` From 17b35d02230f4b0c54344ae35fc2076038be9414 Mon Sep 17 00:00:00 2001 From: Claire Dagan Date: Fri, 13 Sep 2024 09:36:26 +0200 Subject: [PATCH 05/16] [Tech] add FRONTEND_DASHBOARD_ENABLED in docker-compose --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9d11c0d4c..d263f7314 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,7 @@ services: - FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED=${FRONTEND_MISSION_FORM_AUTO_SAVE_ENABLED} - FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED=${FRONTEND_REPORTING_FORM_AUTO_SAVE_ENABLED} - FRONTEND_REPORTING_FORM_AUTO_UPDATE=${FRONTEND_REPORTING_FORM_AUTO_UPDATE} + - FRONTEND_DASHBOARD_ENABLED=${FRONTEND_DASHBOARD_ENABLED} - FRONTEND_OIDC_AUTHORITY=${MONITORENV_OIDC_ISSUER_URI} - FRONTEND_OIDC_CLIENT_ID=${MONITORENV_OIDC_CLIENT_ID} - FRONTEND_OIDC_ENABLED=${MONITORENV_OIDC_ENABLED} From c531371027b66d32c4a9c7dccf29025fef29c482 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Mon, 16 Sep 2024 08:17:54 +0200 Subject: [PATCH 06/16] review: claire's review --- frontend/src/domain/entities/map/constants.ts | 5 +---- frontend/src/domain/shared_slices/Global.ts | 2 +- frontend/src/features/Dashboard/utils.ts | 6 ++++++ frontend/src/features/missions/MissionForm/utils.ts | 4 ---- 4 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 frontend/src/features/Dashboard/utils.ts diff --git a/frontend/src/domain/entities/map/constants.ts b/frontend/src/domain/entities/map/constants.ts index 22fea61e0..9d3875220 100644 --- a/frontend/src/domain/entities/map/constants.ts +++ b/frontend/src/domain/entities/map/constants.ts @@ -45,13 +45,10 @@ export enum DistanceUnit { } export enum MapToolType { - DASHBOARD = 'DASHBOARD', FILTERS = 'FILTERS', INTEREST_POINT = 'INTEREST_POINT', MEASUREMENT = 'MEASUREMENT', - MEASUREMENT_MENU = 'MEASUREMENT_MENU', - VESSEL_LABELS = 'VESSEL_LABELS', - VESSEL_VISIBILITY = 'VESSEL_VISIBILITY' + MEASUREMENT_MENU = 'MEASUREMENT_MENU' } export enum OLGeometryType { diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index 978ce7762..bc12e8005 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -1,7 +1,7 @@ // TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice. // TODO "Map" feature should have its own slice where we would transfer the related `display...` props. -import { isDashboardEnabled } from '@features/missions/MissionForm/utils' +import { isDashboardEnabled } from '@features/Dashboard/utils' import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit' import type { MapToolType } from '../entities/map/constants' diff --git a/frontend/src/features/Dashboard/utils.ts b/frontend/src/features/Dashboard/utils.ts new file mode 100644 index 000000000..938b65cca --- /dev/null +++ b/frontend/src/features/Dashboard/utils.ts @@ -0,0 +1,6 @@ +import { isCypress } from '@utils/isCypress' + +export const isDashboardEnabled = () => + isCypress() + ? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true' + : import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true' diff --git a/frontend/src/features/missions/MissionForm/utils.ts b/frontend/src/features/missions/MissionForm/utils.ts index 3390e303e..90fe9e29b 100644 --- a/frontend/src/features/missions/MissionForm/utils.ts +++ b/frontend/src/features/missions/MissionForm/utils.ts @@ -20,10 +20,6 @@ export const isMissionAutoUpdateEnabled = () => isCypress() ? window.Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE') === 'true' : import.meta.env.FRONTEND_MISSION_FORM_AUTO_UPDATE === 'true' -export const isDashboardEnabled = () => - isCypress() - ? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true' - : import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true' /** * should a Formik `onChange` event trigger `saveMission`. From 0aab31d72c0f598c9dec385eccf9afeab9a9a540 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Tue, 17 Sep 2024 09:14:20 +0200 Subject: [PATCH 07/16] review: fix account button and html semantic --- frontend/src/components/Menu.tsx | 35 +++++++++++-------- .../features/Account/components/Account.tsx | 10 ++---- .../components/InterestPointMapButton.tsx | 12 ++----- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/Menu.tsx b/frontend/src/components/Menu.tsx index 2fd305886..4c3f39bc7 100644 --- a/frontend/src/components/Menu.tsx +++ b/frontend/src/components/Menu.tsx @@ -56,19 +56,21 @@ export function Menu({ isSuperUser }: MenuProps) { )} - - {displayMeasurement && isSuperUser && } - {displayInterestPoint && isSuperUser && ( -
    - -
    - )} - {displayAccountButton && ( -
    - -
    - )} -
    + + + {displayMeasurement && isSuperUser && } + {displayInterestPoint && isSuperUser && ( +
  • + +
  • + )} + {displayAccountButton && ( +
  • + +
  • + )} +
    +
    ) } @@ -87,9 +89,14 @@ const ButtonsWrapper = styled.menu<{ list-style: none; ` -const ToolButtons = styled.div` +const ToolWrapper = styled.li` margin-top: 24px; +` + +const ToolButtons = styled.ul` display: flex; flex-direction: column; row-gap: 8px; + list-style: none; + padding: 0; ` diff --git a/frontend/src/features/Account/components/Account.tsx b/frontend/src/features/Account/components/Account.tsx index acc3efdd5..5a1acddc4 100644 --- a/frontend/src/features/Account/components/Account.tsx +++ b/frontend/src/features/Account/components/Account.tsx @@ -1,3 +1,4 @@ +import { StyledMapMenuDialogContainer } from '@components/style' import { MenuWithCloseButton } from '@features/commonStyles/map/MenuWithCloseButton' import { useAppDispatch } from '@hooks/useAppDispatch' import { useAppSelector } from '@hooks/useAppSelector' @@ -5,7 +6,6 @@ import { Accent, Button, Icon, MapMenuDialog, Size } from '@mtes-mct/monitor-ui' import { getOIDCConfig } from 'auth/getOIDCConfig' import { globalActions } from 'domain/shared_slices/Global' import { useAuth } from 'react-oidc-context' -import styled from 'styled-components' export function Account() { const dispatch = useAppDispatch() @@ -29,7 +29,7 @@ export function Account() { return ( <> {isAccountVisible && ( - + Déconnexion @@ -43,7 +43,7 @@ export function Account() { )} - + )} ) } - -const StyledContainer = styled(MapMenuDialog.Container)` - margin-right: unset; -` diff --git a/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx b/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx index 4c6c67960..1750e69d5 100644 --- a/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx +++ b/frontend/src/features/InterestPoint/components/InterestPointMapButton.tsx @@ -12,7 +12,7 @@ import { reduceReportingFormOnMap } from 'domain/use_cases/reporting/reduceRepor import { useCallback, useEffect, useMemo } from 'react' import { MapToolType } from '../../../domain/entities/map/constants' -import { globalActions, setDisplayedItems } from '../../../domain/shared_slices/Global' +import { globalActions } from '../../../domain/shared_slices/Global' import { useAppDispatch } from '../../../hooks/useAppDispatch' import { useAppSelector } from '../../../hooks/useAppSelector' import { useEscapeKey } from '../../../hooks/useEscapeKey' @@ -45,15 +45,7 @@ export function InterestPointMapButton() { const toggleInterestPointMenu = useCallback(() => { if (!isOpen) { - dispatch( - setDisplayedItems({ - isControlUnitDialogVisible: false, - isControlUnitListDialogVisible: false, - isSearchMissionsVisible: false, - isSearchReportingsVisible: false, - isSearchSemaphoreVisible: false - }) - ) + dispatch(globalActions.hideSideButtons()) dispatch(reduceReportingFormOnMap()) dispatch(globalActions.setIsMapToolVisible(MapToolType.INTEREST_POINT)) dispatch(closeAllOverlays()) From d16635acdafb0a565d3fa4e84e8efe8a6f193c01 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Tue, 17 Sep 2024 16:46:14 +0200 Subject: [PATCH 08/16] tech: fix cypress env variable --- frontend/cypress/e2e/utils/visitSideWindow.ts | 1 + frontend/src/features/Dashboard/utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/utils/visitSideWindow.ts b/frontend/cypress/e2e/utils/visitSideWindow.ts index 284c321fc..c473fd048 100644 --- a/frontend/cypress/e2e/utils/visitSideWindow.ts +++ b/frontend/cypress/e2e/utils/visitSideWindow.ts @@ -9,6 +9,7 @@ export function visitSideWindow(isAutoSaveEnabled = 'true') { Cypress.env('CYPRESS_MISSION_FORM_AUTO_SAVE_ENABLED', isAutoSaveEnabled) Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE', 'true') Cypress.env('CYPRESS_REPORTING_FORM_AUTO_SAVE_ENABLED', 'true') + Cypress.env('CYPRESS_FRONTEND_DASHBOARD_ENABLED', 'true') } }) } diff --git a/frontend/src/features/Dashboard/utils.ts b/frontend/src/features/Dashboard/utils.ts index 938b65cca..7c028040c 100644 --- a/frontend/src/features/Dashboard/utils.ts +++ b/frontend/src/features/Dashboard/utils.ts @@ -2,5 +2,5 @@ import { isCypress } from '@utils/isCypress' export const isDashboardEnabled = () => isCypress() - ? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true' + ? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD_ENABLED') === 'true' : import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true' From afddaedc281071b3f0ab78c081dd8b20791def07 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Tue, 17 Sep 2024 20:04:58 +0200 Subject: [PATCH 09/16] fix: test e2e --- .../cypress/e2e/side_window/mission_form/mission_zone.spec.ts | 1 + frontend/cypress/e2e/utils/visitSideWindow.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts b/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts index 9c5bba188..e452ab0b9 100644 --- a/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts +++ b/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts @@ -31,6 +31,7 @@ context('Side Window > Mission Form > Mission zone', () => { onBeforeLoad: () => { Cypress.env('CYPRESS_MISSION_FORM_AUTO_SAVE_ENABLED', 'true') Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE', 'true') + Cypress.env('CYPRESS_FRONTEND_DASHBOARD_ENABLED', 'true') } }) diff --git a/frontend/cypress/e2e/utils/visitSideWindow.ts b/frontend/cypress/e2e/utils/visitSideWindow.ts index c473fd048..284c321fc 100644 --- a/frontend/cypress/e2e/utils/visitSideWindow.ts +++ b/frontend/cypress/e2e/utils/visitSideWindow.ts @@ -9,7 +9,6 @@ export function visitSideWindow(isAutoSaveEnabled = 'true') { Cypress.env('CYPRESS_MISSION_FORM_AUTO_SAVE_ENABLED', isAutoSaveEnabled) Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE', 'true') Cypress.env('CYPRESS_REPORTING_FORM_AUTO_SAVE_ENABLED', 'true') - Cypress.env('CYPRESS_FRONTEND_DASHBOARD_ENABLED', 'true') } }) } From 1c8d5608087aba4ce7ffd4b3daeb76633b8898ec Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 14:21:01 +0200 Subject: [PATCH 10/16] fix: test e2e --- .../cypress/e2e/side_window/mission_form/mission_zone.spec.ts | 1 - frontend/src/domain/shared_slices/Global.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts b/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts index e452ab0b9..9c5bba188 100644 --- a/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts +++ b/frontend/cypress/e2e/side_window/mission_form/mission_zone.spec.ts @@ -31,7 +31,6 @@ context('Side Window > Mission Form > Mission zone', () => { onBeforeLoad: () => { Cypress.env('CYPRESS_MISSION_FORM_AUTO_SAVE_ENABLED', 'true') Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE', 'true') - Cypress.env('CYPRESS_FRONTEND_DASHBOARD_ENABLED', 'true') } }) diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index bc12e8005..be59ded67 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -1,7 +1,6 @@ // TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice. // TODO "Map" feature should have its own slice where we would transfer the related `display...` props. -import { isDashboardEnabled } from '@features/Dashboard/utils' import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit' import type { MapToolType } from '../entities/map/constants' @@ -101,7 +100,7 @@ const initialState: GlobalStateType = { displayLocateOnMap: true, displayMeasurement: true, displayInterestPoint: true, - displayDashboard: true && isDashboardEnabled(), + displayDashboard: true, displaySearchSemaphoreButton: true, displayReportingsButton: true, displayRightMenuControlUnitListButton: true, From 58374da044fa0e8fc2f5d5dd72f0a20a7f0e9986 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 14:44:12 +0200 Subject: [PATCH 11/16] fix: test e2e --- frontend/src/components/Menu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Menu.tsx b/frontend/src/components/Menu.tsx index 4c3f39bc7..b93949c3e 100644 --- a/frontend/src/components/Menu.tsx +++ b/frontend/src/components/Menu.tsx @@ -1,6 +1,7 @@ import { Account } from '@features/Account/components/Account' import { ControlUnitListButton } from '@features/ControlUnit/components/ControlUnitListButton' import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' +import { isDashboardEnabled } from '@features/Dashboard/utils' import { InterestPointMapButton } from '@features/InterestPoint/components/InterestPointMapButton' import { MeasurementMapButton } from '@features/map/tools/measurements/MeasurementMapButton' import { MissionsMenu } from '@features/missions/MissionsButton' @@ -50,7 +51,7 @@ export function Menu({ isSuperUser }: MenuProps) { )} - {displayDashboard && isSuperUser && ( + {displayDashboard && isDashboardEnabled() && isSuperUser && (
  • From 761f54b4afb42a863737b70a09cfb5a4e08a15ca Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 15:05:42 +0200 Subject: [PATCH 12/16] fix: test e2e --- frontend/cypress/support/e2e.ts | 4 +--- frontend/src/components/Menu.tsx | 3 +-- frontend/src/domain/shared_slices/Global.ts | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index c8b09431c..d6c511b71 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -47,8 +47,6 @@ beforeEach(() => { // so that we can detect when the browser app is running in Cypress. // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests cy.session('cypress', () => { - cy.window().then(window => { - window.localStorage.setItem('IS_CYPRESS', 'true') - }) + window.localStorage.setItem('IS_CYPRESS', 'true') }) }) diff --git a/frontend/src/components/Menu.tsx b/frontend/src/components/Menu.tsx index b93949c3e..4c3f39bc7 100644 --- a/frontend/src/components/Menu.tsx +++ b/frontend/src/components/Menu.tsx @@ -1,7 +1,6 @@ import { Account } from '@features/Account/components/Account' import { ControlUnitListButton } from '@features/ControlUnit/components/ControlUnitListButton' import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' -import { isDashboardEnabled } from '@features/Dashboard/utils' import { InterestPointMapButton } from '@features/InterestPoint/components/InterestPointMapButton' import { MeasurementMapButton } from '@features/map/tools/measurements/MeasurementMapButton' import { MissionsMenu } from '@features/missions/MissionsButton' @@ -51,7 +50,7 @@ export function Menu({ isSuperUser }: MenuProps) { )} - {displayDashboard && isDashboardEnabled() && isSuperUser && ( + {displayDashboard && isSuperUser && (
  • diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index be59ded67..bc12e8005 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -1,6 +1,7 @@ // TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice. // TODO "Map" feature should have its own slice where we would transfer the related `display...` props. +import { isDashboardEnabled } from '@features/Dashboard/utils' import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit' import type { MapToolType } from '../entities/map/constants' @@ -100,7 +101,7 @@ const initialState: GlobalStateType = { displayLocateOnMap: true, displayMeasurement: true, displayInterestPoint: true, - displayDashboard: true, + displayDashboard: true && isDashboardEnabled(), displaySearchSemaphoreButton: true, displayReportingsButton: true, displayRightMenuControlUnitListButton: true, From f44d020ac3bf7ad801e07a4e153d91d1ab1ff66e Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 16:18:04 +0200 Subject: [PATCH 13/16] fix: add validate to e2e config --- frontend/cypress/support/e2e.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index d6c511b71..341f71dd0 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -46,7 +46,16 @@ beforeEach(() => { // We use a Cypress session to inject inject a Local Storage key // so that we can detect when the browser app is running in Cypress. // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests - cy.session('cypress', () => { - window.localStorage.setItem('IS_CYPRESS', 'true') - }) + cy.session( + 'cypress', + () => { + window.localStorage.setItem('IS_CYPRESS', 'true') + }, + // https://www.cypress.io/blog/mistake-when-using-cy-session-and-how-to-solve-it + { + validate() { + window.localStorage.getItem('IS_CYPRESS') === 'true' + } + } + ) }) From 9f91022bd3ad37f94aa81aae7fb9a506870f956b Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 16:44:14 +0200 Subject: [PATCH 14/16] fix: set before instead of beforeEach to e2e config --- frontend/cypress/support/e2e.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index 341f71dd0..93a0ce1b7 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -41,8 +41,8 @@ Cypress.on('uncaught:exception', err => { return undefined }) -// Run before each spec -beforeEach(() => { +// Run before spec +before(() => { // We use a Cypress session to inject inject a Local Storage key // so that we can detect when the browser app is running in Cypress. // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests From 2b66533a30d801fdfe427d9a9f8fe73dbfbbe4d9 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 17:39:17 +0200 Subject: [PATCH 15/16] fix: test delete test isolation --- frontend/config/cypress.config.ts | 3 ++- frontend/cypress/support/e2e.ts | 17 ++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/frontend/config/cypress.config.ts b/frontend/config/cypress.config.ts index d60c93173..9a4788c7a 100644 --- a/frontend/config/cypress.config.ts +++ b/frontend/config/cypress.config.ts @@ -17,7 +17,8 @@ export default defineConfig({ initCypressMousePositionPlugin(on) initPlugin(on, config) }, - specPattern: ['cypress/e2e/**/*.spec.ts'] + specPattern: ['cypress/e2e/**/*.spec.ts'], + testIsolation: false }, env: { 'cypress-plugin-snapshots': { diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index 93a0ce1b7..8c725db1b 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -41,21 +41,12 @@ Cypress.on('uncaught:exception', err => { return undefined }) -// Run before spec +// Run before each spec before(() => { // We use a Cypress session to inject inject a Local Storage key // so that we can detect when the browser app is running in Cypress. // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests - cy.session( - 'cypress', - () => { - window.localStorage.setItem('IS_CYPRESS', 'true') - }, - // https://www.cypress.io/blog/mistake-when-using-cy-session-and-how-to-solve-it - { - validate() { - window.localStorage.getItem('IS_CYPRESS') === 'true' - } - } - ) + cy.session('cypress', () => { + window.localStorage.setItem('IS_CYPRESS', 'true') + }) }) From 66e123961f51589f18cd44f13305068dabd9fefe Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 18 Sep 2024 18:06:29 +0200 Subject: [PATCH 16/16] fix: use window to detect if cypress is running instead of localstorage --- frontend/config/cypress.config.ts | 3 +- frontend/cypress/support/e2e.ts | 10 ----- .../src/utils/__tests__/isCypress.test.ts | 45 ------------------- frontend/src/utils/isCypress.ts | 8 +--- 4 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 frontend/src/utils/__tests__/isCypress.test.ts diff --git a/frontend/config/cypress.config.ts b/frontend/config/cypress.config.ts index 9a4788c7a..d60c93173 100644 --- a/frontend/config/cypress.config.ts +++ b/frontend/config/cypress.config.ts @@ -17,8 +17,7 @@ export default defineConfig({ initCypressMousePositionPlugin(on) initPlugin(on, config) }, - specPattern: ['cypress/e2e/**/*.spec.ts'], - testIsolation: false + specPattern: ['cypress/e2e/**/*.spec.ts'] }, env: { 'cypress-plugin-snapshots': { diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index 8c725db1b..3888375da 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -40,13 +40,3 @@ Cypress.on('uncaught:exception', err => { return undefined }) - -// Run before each spec -before(() => { - // We use a Cypress session to inject inject a Local Storage key - // so that we can detect when the browser app is running in Cypress. - // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests - cy.session('cypress', () => { - window.localStorage.setItem('IS_CYPRESS', 'true') - }) -}) diff --git a/frontend/src/utils/__tests__/isCypress.test.ts b/frontend/src/utils/__tests__/isCypress.test.ts deleted file mode 100644 index 8415d2cc9..000000000 --- a/frontend/src/utils/__tests__/isCypress.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { beforeAll, describe, expect } from '@jest/globals' - -import { isCypress } from '../isCypress' - -describe('isCypress()', () => { - const localStorageMock = (() => { - let store = {} - - return { - clear() { - store = {} - }, - getItem(key) { - return store[key] || null - }, - setItem(key, value) { - store[key] = value.toString() - } - } - })() - - beforeAll(() => { - Object.defineProperty(window, 'localStorage', { - value: localStorageMock - }) - }) - - afterEach(() => { - localStorageMock.clear() - }) - - it('should return TRUE when `IS_CYPRESS` LocalStorage key is "true"', () => { - localStorage.setItem('IS_CYPRESS', 'true') - - const result = isCypress() - - expect(result).toBe(true) - }) - - it('should return FALSE when `IS_CYPRESS` LocalStorage key is missing', () => { - const result = isCypress() - - expect(result).toBe(false) - }) -}) diff --git a/frontend/src/utils/isCypress.ts b/frontend/src/utils/isCypress.ts index 90e26e856..362ec75da 100644 --- a/frontend/src/utils/isCypress.ts +++ b/frontend/src/utils/isCypress.ts @@ -1,12 +1,8 @@ /** * Detects whether the browser app is running in Cypress. * - * @description - * We use a Cypress session to inject inject a Local Storage key - * so that we can detect when the browser app is running in Cypress. - * - * @see https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests + * @see https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress */ export function isCypress() { - return localStorage.getItem('IS_CYPRESS') === 'true' + return !!window.Cypress }