diff --git a/package-lock.json b/package-lock.json index bfdc7dbdcc..b2881422fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,17 +15,17 @@ "@types/dompurify": "^3.0.5", "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", - "axios": "^1.7.2", + "axios": "^1.7.7", "bourbon": "^7.3.0", "classnames": "^2.5.1", "date-fns": "^3.6.0", "dompurify": "^3.1.6", "font-awesome": "^4.7.0", "formik": "^2.4.6", - "http-proxy-middleware": "^2.0.6", - "i18next": "^23.11.5", + "http-proxy-middleware": "^3.0.1", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", - "i18next-http-backend": "^2.5.2", + "i18next-http-backend": "^2.6.1", "lodash": "^4.17.21", "moment": "^2.30.1", "moment-timezone": "^0.5.45", @@ -34,25 +34,25 @@ "react-datepicker": "^7.3.0", "react-dom": "^18.3.1", "react-hotkeys-hook": "^4.4.4", - "react-i18next": "^15.0.0", + "react-i18next": "^15.0.1", "react-icons": "^5.2.1", "react-redux": "^7.2.9", - "react-router-dom": "^6.24.0", + "react-router-dom": "^6.26.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", "redux-thunk": "^3.1.0", "reselect": "^5.1.1", - "styled-components": "^6.1.12", + "styled-components": "^6.1.13", "yup": "^1.4.0" }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.8.0", + "@eslint/js": "^9.9.1", "@redux-devtools/extension": "^3.3.0", "@types/lodash": "^4.17.7", - "@types/node": "^22.0.2", + "@types/node": "^22.5.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.14.1", @@ -62,11 +62,11 @@ "prop-types": "^15.8.1", "rollup-preserve-directives": "^1.1.1", "sass": "^1.77.8", - "typescript": "^5.5.2", + "typescript": "^5.5.4", "uuid": "^10.0.0", - "vite": "^5.3.5", + "vite": "^5.4.2", "vite-plugin-svgr": "^4.2.0", - "vite-tsconfig-paths": "^4.3.2", + "vite-tsconfig-paths": "^5.0.1", "vitest": "^2.0.5" } }, @@ -2856,9 +2856,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.8.0.tgz", - "integrity": "sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==", + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.1.tgz", + "integrity": "sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3480,9 +3480,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.0.tgz", - "integrity": "sha512-2D6XaHEVvkCn682XBnipbJjgZUU7xjLtA4dGJRBVUKpEaDYOZMENZoZjAOSb7qirxt5RupjzZxz4fK2FO+EFPw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.1.tgz", + "integrity": "sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg==", "engines": { "node": ">=14.0.0" } @@ -3516,9 +3516,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz", + "integrity": "sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==", "cpu": [ "arm" ], @@ -3529,9 +3529,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz", + "integrity": "sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==", "cpu": [ "arm64" ], @@ -3542,9 +3542,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz", + "integrity": "sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==", "cpu": [ "arm64" ], @@ -3555,9 +3555,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz", + "integrity": "sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==", "cpu": [ "x64" ], @@ -3568,9 +3568,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz", + "integrity": "sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==", "cpu": [ "arm" ], @@ -3581,9 +3581,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz", + "integrity": "sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==", "cpu": [ "arm" ], @@ -3594,9 +3594,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz", + "integrity": "sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==", "cpu": [ "arm64" ], @@ -3607,9 +3607,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz", + "integrity": "sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==", "cpu": [ "arm64" ], @@ -3620,9 +3620,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz", + "integrity": "sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==", "cpu": [ "ppc64" ], @@ -3633,9 +3633,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz", + "integrity": "sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==", "cpu": [ "riscv64" ], @@ -3646,9 +3646,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz", + "integrity": "sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==", "cpu": [ "s390x" ], @@ -3659,9 +3659,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", + "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", "cpu": [ "x64" ], @@ -3672,9 +3672,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz", + "integrity": "sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==", "cpu": [ "x64" ], @@ -3685,9 +3685,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz", + "integrity": "sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==", "cpu": [ "arm64" ], @@ -3698,9 +3698,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz", + "integrity": "sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==", "cpu": [ "ia32" ], @@ -3711,9 +3711,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz", + "integrity": "sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==", "cpu": [ "x64" ], @@ -4182,27 +4182,6 @@ "@swc/counter": "^0.1.3" } }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "optional": true, - "peer": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "optional": true, - "peer": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/dompurify": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", @@ -4217,32 +4196,6 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, - "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "optional": true, - "peer": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.34", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.34.tgz", - "integrity": "sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==", - "optional": true, - "peer": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, "node_modules/@types/history": { "version": "4.7.11", "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", @@ -4258,9 +4211,9 @@ } }, "node_modules/@types/http-proxy": { - "version": "1.17.14", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", - "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "version": "1.17.15", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", + "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==", "dependencies": { "@types/node": "*" } @@ -4285,19 +4238,12 @@ "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", "dev": true }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "optional": true, - "peer": true - }, "node_modules/@types/node": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", - "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", + "version": "22.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz", + "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==", "dependencies": { - "undici-types": "~6.11.1" + "undici-types": "~6.19.2" } }, "node_modules/@types/parse-json": { @@ -4310,20 +4256,6 @@ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "optional": true, - "peer": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "optional": true, - "peer": true - }, "node_modules/@types/react": { "version": "17.0.59", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.59.tgz", @@ -4401,28 +4333,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", - "optional": true, - "peer": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", - "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", - "optional": true, - "peer": true, - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, "node_modules/@types/stylis": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", @@ -5589,9 +5499,9 @@ } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -8179,26 +8089,19 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.1.tgz", + "integrity": "sha512-5TnsBzyqlWRdT525r198AR1kGc5zIIlZNBZdmP7BUILe3yI8gDgNMbxyQpW+tMBPZQln/1T6p6mCVb0oCVKaiw==", "dependencies": { - "@types/http-proxy": "^1.17.8", + "@types/http-proxy": "^1.17.15", + "debug": "^4.3.6", "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", + "is-glob": "^4.0.3", "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" + "micromatch": "^4.0.8" }, "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/human-signals": { @@ -8211,9 +8114,9 @@ } }, "node_modules/i18next": { - "version": "23.11.5", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.11.5.tgz", - "integrity": "sha512-41pvpVbW9rhZPk5xjCX2TPJi2861LEig/YRhUkY+1FQ2IQPS0bKUDYnEqY8XPPbB48h1uIwLnP9iiEfuSl20CA==", + "version": "23.14.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.14.0.tgz", + "integrity": "sha512-Y5GL4OdA8IU2geRrt2+Uc1iIhsjICdHZzT9tNwQ3TVqdNzgxHToGCKf/TPRP80vTCAP6svg2WbbJL+Gx5MFQVA==", "funding": [ { "type": "individual", @@ -8241,10 +8144,9 @@ } }, "node_modules/i18next-http-backend": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.5.2.tgz", - "integrity": "sha512-+K8HbDfrvc1/2X8jpb7RLhI9ZxBDpx3xogYkQwGKlWAUXLSEGXzgdt3EcUjLlBCdMwdQY+K+EUF6oh8oB6rwHw==", - "license": "MIT", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.6.1.tgz", + "integrity": "sha512-rCilMAnlEQNeKOZY1+x8wLM5IpYOj10guGvEpeC59tNjj6MMreLIjIW8D1RclhD3ifLwn6d/Y9HEM1RUE6DSog==", "dependencies": { "cross-fetch": "4.0.0" } @@ -9013,11 +8915,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -9690,9 +9592,9 @@ } }, "node_modules/react-i18next": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.0.tgz", - "integrity": "sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.1.tgz", + "integrity": "sha512-NwxLqNM6CLbeGA9xPsjits0EnXdKgCRSS6cgkgOdNcPXqL+1fYNl8fBg1wmnnHvFy812Bt4IWTPE9zjoPmFj3w==", "dependencies": { "@babel/runtime": "^7.24.8", "html-parse-stringify": "^3.0.1" @@ -9766,11 +9668,11 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/react-router": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.0.tgz", - "integrity": "sha512-sQrgJ5bXk7vbcC4BxQxeNa5UmboFm35we1AFK0VvQaz9g0LzxEIuLOhHIoZ8rnu9BO21ishGeL9no1WB76W/eg==", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.1.tgz", + "integrity": "sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ==", "dependencies": { - "@remix-run/router": "1.17.0" + "@remix-run/router": "1.19.1" }, "engines": { "node": ">=14.0.0" @@ -9780,12 +9682,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.0.tgz", - "integrity": "sha512-960sKuau6/yEwS8e+NVEidYQb1hNjAYM327gjEyXlc6r3Skf2vtwuJ2l7lssdegD2YjoKG5l8MsVyeTDlVeY8g==", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.1.tgz", + "integrity": "sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw==", "dependencies": { - "@remix-run/router": "1.17.0", - "react-router": "6.24.0" + "@remix-run/router": "1.19.1", + "react-router": "6.26.1" }, "engines": { "node": ">=14.0.0" @@ -10030,11 +9932,10 @@ } }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.2.tgz", + "integrity": "sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -10046,22 +9947,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.21.2", + "@rollup/rollup-android-arm64": "4.21.2", + "@rollup/rollup-darwin-arm64": "4.21.2", + "@rollup/rollup-darwin-x64": "4.21.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.21.2", + "@rollup/rollup-linux-arm-musleabihf": "4.21.2", + "@rollup/rollup-linux-arm64-gnu": "4.21.2", + "@rollup/rollup-linux-arm64-musl": "4.21.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.21.2", + "@rollup/rollup-linux-riscv64-gnu": "4.21.2", + "@rollup/rollup-linux-s390x-gnu": "4.21.2", + "@rollup/rollup-linux-x64-gnu": "4.21.2", + "@rollup/rollup-linux-x64-musl": "4.21.2", + "@rollup/rollup-win32-arm64-msvc": "4.21.2", + "@rollup/rollup-win32-ia32-msvc": "4.21.2", + "@rollup/rollup-win32-x64-msvc": "4.21.2", "fsevents": "~2.3.2" } }, @@ -10468,9 +10369,9 @@ } }, "node_modules/styled-components": { - "version": "6.1.12", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.12.tgz", - "integrity": "sha512-n/O4PzRPhbYI0k1vKKayfti3C/IGcPf+DqcrOB7O/ab9x4u/zjqraneT5N45+sIe87cxrCApXM8Bna7NYxwoTA==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.13.tgz", + "integrity": "sha512-M0+N2xSnAtwcVAQeFEsGWFFxXDftHUD7XrKla06QbpUMmbmtFBMMTcKWvFXtWxuD5qQkB8iU5gk6QASlx2ZRMw==", "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -10823,9 +10724,9 @@ } }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10852,9 +10753,9 @@ } }, "node_modules/undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", @@ -10984,14 +10885,14 @@ } }, "node_modules/vite": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.5.tgz", - "integrity": "sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz", + "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==", "dev": true, "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.39", - "rollup": "^4.13.0" + "postcss": "^8.4.41", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -11010,6 +10911,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -11027,6 +10929,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -11075,9 +10980,9 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", - "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.0.1.tgz", + "integrity": "sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -11114,9 +11019,9 @@ } }, "node_modules/vite/node_modules/postcss": { - "version": "8.4.40", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", - "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", + "version": "8.4.42", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.42.tgz", + "integrity": "sha512-hywKUQB9Ra4dR1mGhldy5Aj1X3MWDSIA1cEi+Uy0CjheLvP6Ual5RlwMCh8i/X121yEDLDIKBsrCQ8ba3FDMfQ==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index d594b30c43..28506e8e7b 100644 --- a/package.json +++ b/package.json @@ -12,17 +12,17 @@ "@types/dompurify": "^3.0.5", "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", - "axios": "^1.7.2", + "axios": "^1.7.7", "bourbon": "^7.3.0", "classnames": "^2.5.1", "date-fns": "^3.6.0", "dompurify": "^3.1.6", "font-awesome": "^4.7.0", "formik": "^2.4.6", - "http-proxy-middleware": "^2.0.6", - "i18next": "^23.11.5", + "http-proxy-middleware": "^3.0.1", + "i18next": "^23.14.0", "i18next-browser-languagedetector": "^8.0.0", - "i18next-http-backend": "^2.5.2", + "i18next-http-backend": "^2.6.1", "lodash": "^4.17.21", "moment": "^2.30.1", "moment-timezone": "^0.5.45", @@ -31,16 +31,16 @@ "react-datepicker": "^7.3.0", "react-dom": "^18.3.1", "react-hotkeys-hook": "^4.4.4", - "react-i18next": "^15.0.0", + "react-i18next": "^15.0.1", "react-icons": "^5.2.1", "react-redux": "^7.2.9", - "react-router-dom": "^6.24.0", + "react-router-dom": "^6.26.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", "redux-thunk": "^3.1.0", "reselect": "^5.1.1", - "styled-components": "^6.1.12", + "styled-components": "^6.1.13", "yup": "^1.4.0" }, "scripts": { @@ -64,10 +64,10 @@ "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.8.0", + "@eslint/js": "^9.9.1", "@redux-devtools/extension": "^3.3.0", "@types/lodash": "^4.17.7", - "@types/node": "^22.0.2", + "@types/node": "^22.5.1", "@types/react-dom": "^18.3.0", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.14.1", @@ -77,11 +77,11 @@ "prop-types": "^15.8.1", "rollup-preserve-directives": "^1.1.1", "sass": "^1.77.8", - "typescript": "^5.5.2", + "typescript": "^5.5.4", "uuid": "^10.0.0", - "vite": "^5.3.5", + "vite": "^5.4.2", "vite-plugin-svgr": "^4.2.0", - "vite-tsconfig-paths": "^4.3.2", + "vite-tsconfig-paths": "^5.0.1", "vitest": "^2.0.5" } } diff --git a/src/components/configuration/partials/ThemesActionsCell.tsx b/src/components/configuration/partials/ThemesActionsCell.tsx index e42bc9705a..87925b8fb9 100644 --- a/src/components/configuration/partials/ThemesActionsCell.tsx +++ b/src/components/configuration/partials/ThemesActionsCell.tsx @@ -9,15 +9,16 @@ import { import { getUserInformation } from "../../../selectors/userInfoSelectors"; import { hasAccess } from "../../../utils/utils"; import { useAppDispatch, useAppSelector } from "../../../store"; -import { deleteTheme } from "../../../slices/themeSlice"; +import { deleteTheme, ThemeDetailsType } from "../../../slices/themeSlice"; import { Tooltip } from "../../shared/Tooltip"; /** * This component renders the action cells of themes in the table view */ const ThemesActionsCell = ({ -// @ts-expect-error TS(7031): Binding element 'row' implicitly has an 'any' type... Remove this comment to see the full error message row, +}: { + row: ThemeDetailsType }) => { const { t } = useTranslation(); const dispatch = useAppDispatch(); @@ -61,7 +62,6 @@ const ThemesActionsCell = ({ {displayThemeDetails && ( )} diff --git a/src/components/configuration/partials/wizard/NewThemeWizard.tsx b/src/components/configuration/partials/wizard/NewThemeWizard.tsx index bfa72db1ae..7672ae5665 100644 --- a/src/components/configuration/partials/wizard/NewThemeWizard.tsx +++ b/src/components/configuration/partials/wizard/NewThemeWizard.tsx @@ -10,7 +10,7 @@ import { initialFormValuesNewThemes } from "../../../../configs/modalConfig"; import { usePageFunctions } from "../../../../hooks/wizardHooks"; import { NewThemeSchema } from "../../../../utils/validate"; import { useAppDispatch } from "../../../../store"; -import { postNewTheme } from "../../../../slices/themeSlice"; +import { postNewTheme, ThemeDetailsInitialValues } from "../../../../slices/themeSlice"; /** * This component manages the pages of the new theme wizard and the submission of values @@ -64,7 +64,7 @@ const NewThemeWizard: React.FC<{ // Validation schema of current page const currentValidationSchema = NewThemeSchema[page]; - const handleSubmit = (values: any) => { + const handleSubmit = (values: ThemeDetailsInitialValues) => { dispatch(postNewTheme(values)); close(); }; diff --git a/src/components/configuration/partials/wizard/ThemeDetails.tsx b/src/components/configuration/partials/wizard/ThemeDetails.tsx index a8528cbca1..36ca83a8c6 100644 --- a/src/components/configuration/partials/wizard/ThemeDetails.tsx +++ b/src/components/configuration/partials/wizard/ThemeDetails.tsx @@ -15,7 +15,7 @@ import ModalNavigation from "../../../shared/modals/ModalNavigation"; import { NewThemeSchema } from "../../../../utils/validate"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { updateThemeDetails } from "../../../../slices/themeDetailsSlice"; -import { ThemeDetailsType } from "../../../../slices/themeSlice"; +import { ThemeDetailsInitialValues } from "../../../../slices/themeSlice"; /** * This component manages the pages of the theme details @@ -86,7 +86,7 @@ const ThemeDetails : React.FC<{ const currentValidationSchema = NewThemeSchema[page]; // update theme - const handleSubmit = (values: ThemeDetailsType) => { + const handleSubmit = (values: ThemeDetailsInitialValues) => { dispatch(updateThemeDetails({id: themeDetails.id, values: values})); close(); }; diff --git a/src/components/configuration/partials/wizard/ThemeDetailsModal.tsx b/src/components/configuration/partials/wizard/ThemeDetailsModal.tsx index db8d9ca570..fe3e4a242e 100644 --- a/src/components/configuration/partials/wizard/ThemeDetailsModal.tsx +++ b/src/components/configuration/partials/wizard/ThemeDetailsModal.tsx @@ -6,10 +6,12 @@ import ThemeDetails from "./ThemeDetails"; * This component renders the modal for displaying theme details */ const ThemeDetailsModal = ({ - handleClose, - themeId, - themeName -}: any) => { + handleClose, + themeName +}: { + handleClose: () => void, + themeName: string +}) => { const { t } = useTranslation(); const close = () => { diff --git a/src/components/configuration/partials/wizard/WatermarkPage.tsx b/src/components/configuration/partials/wizard/WatermarkPage.tsx index db9efd0934..91d6f52a14 100644 --- a/src/components/configuration/partials/wizard/WatermarkPage.tsx +++ b/src/components/configuration/partials/wizard/WatermarkPage.tsx @@ -31,8 +31,7 @@ const WatermarkPage = ({ }) => { const { t } = useTranslation(); -// @ts-expect-error TS(7006): Parameter 'position' implicitly has an 'any' type. - const handleButtonClick = (position) => { + const handleButtonClick = (position: "topLeft" | "topRight" | "bottomLeft" | "bottomRight") => { formik.setFieldValue("watermarkPosition", position); }; diff --git a/src/components/events/partials/EventActionCell.tsx b/src/components/events/partials/EventActionCell.tsx index 0f0461dc44..0654b63cf2 100644 --- a/src/components/events/partials/EventActionCell.tsx +++ b/src/components/events/partials/EventActionCell.tsx @@ -39,8 +39,7 @@ const EventActionCell = ({ setDeleteConfirmation(false); }; -// @ts-expect-error TS(7006): Parameter 'id' implicitly has an 'any' type. - const deletingEvent = (id) => { + const deletingEvent = (id: string) => { dispatch(deleteEvent(id)); }; diff --git a/src/components/events/partials/EventsNotesCell.tsx b/src/components/events/partials/EventsNotesCell.tsx index 406cf5a180..3238f114dc 100644 --- a/src/components/events/partials/EventsNotesCell.tsx +++ b/src/components/events/partials/EventsNotesCell.tsx @@ -36,14 +36,14 @@ const EventsNotesCell = ({ }); } - const updateComment = (event: React.ChangeEvent, commentId: any) => { + const updateComment = (event: React.ChangeEvent, commentId: number) => { if (!event.target.value || !row.id || !commentId) { return; } dispatch(updateNewComment({eventId: row.id, commentId, commentText: event.target.value, commentReason: notesCommentReason})) } - const deleteComment = (event: React.FocusEvent, commentId: any) => { + const deleteComment = (event: React.FocusEvent, commentId: number) => { if (!row.id || !commentId) { return; } diff --git a/src/components/events/partials/EventsSeriesCell.tsx b/src/components/events/partials/EventsSeriesCell.tsx index ab7f437ef8..b946c17052 100644 --- a/src/components/events/partials/EventsSeriesCell.tsx +++ b/src/components/events/partials/EventsSeriesCell.tsx @@ -22,28 +22,31 @@ const EventsSeriesCell = ({ const filterMap = useAppSelector(state => getFilters(state)); // Filter with value of current cell -// @ts-expect-error TS(7006): Parameter 'series' implicitly has an 'any' type. - const addFilter = async (series) => { + const addFilter = async (seriesId: string) => { let filter = filterMap.find(({ name }) => name === "series"); if (!!filter) { - await dispatch(editFilterValue({filterName: filter.name, value: series.id})); + await dispatch(editFilterValue({filterName: filter.name, value: seriesId})); await dispatch(fetchEvents()); dispatch(loadEventsIntoTable()); } }; return ( - !!row.series && ( + !!row.series ? ( // Link template for series of event ) + : <> ); }; diff --git a/src/components/events/partials/EventsTechnicalDateCell.tsx b/src/components/events/partials/EventsTechnicalDateCell.tsx index bd38889305..2ac4b3132e 100644 --- a/src/components/events/partials/EventsTechnicalDateCell.tsx +++ b/src/components/events/partials/EventsTechnicalDateCell.tsx @@ -37,8 +37,7 @@ const EventsTechnicalDateCell = ({ diff --git a/src/components/events/partials/ModalTabsAndPages/DetailsExtendedMetadataTab.tsx b/src/components/events/partials/ModalTabsAndPages/DetailsExtendedMetadataTab.tsx index 73e84275bb..5a54353fde 100644 --- a/src/components/events/partials/ModalTabsAndPages/DetailsExtendedMetadataTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/DetailsExtendedMetadataTab.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Formik } from "formik"; +import { Formik, FormikProps } from "formik"; import { Field } from "../../../shared/Field"; import cn from "classnames"; import _ from "lodash"; @@ -13,8 +13,10 @@ import { parseValueForBooleanStrings, } from "../../../../utils/utils"; import { getMetadataCollectionFieldName } from "../../../../utils/resourceUtils"; -import { useAppSelector } from "../../../../store"; +import { useAppDispatch, useAppSelector } from "../../../../store"; import { MetadataCatalog } from "../../../../slices/eventSlice"; +import { AsyncThunk } from "@reduxjs/toolkit"; +import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk"; /** * This component renders metadata details of a certain event or series @@ -28,25 +30,29 @@ const DetailsExtendedMetadataTab = ({ resourceId: string, editAccessRole: string, metadata: MetadataCatalog[], - updateResource: (id: string, values: { [key: string]: any }, catalog: MetadataCatalog) => void, + updateResource: AsyncThunk //(id: string, values: { [key: string]: any }, catalog: MetadataCatalog) => void, }) => { const { t } = useTranslation(); + const dispatch = useAppDispatch(); const user = useAppSelector(state => getUserInformation(state)); const handleSubmit = (values: { [key: string]: any }, catalog: MetadataCatalog) => { - updateResource(resourceId, values, catalog); + dispatch(updateResource({id: resourceId, values, catalog})); }; // set current values of metadata fields as initial values const getInitialValues = (metadataCatalog: MetadataCatalog) => { - let initialValues = {}; + let initialValues: { [key: string]: any } = {}; // Transform metadata fields and their values provided by backend (saved in redux) if (!!metadataCatalog.fields && metadataCatalog.fields.length > 0) { metadataCatalog.fields.forEach((field) => { let value = parseValueForBooleanStrings(field.value); -// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message initialValues[field.id] = value; }); } @@ -54,8 +60,7 @@ const DetailsExtendedMetadataTab = ({ return initialValues; }; -// @ts-expect-error TS(7006): Parameter 'formik' implicitly has an 'any' type. - const checkValidity = (formik) => { + const checkValidity = (formik: FormikProps<{}>) => { if (formik.dirty && formik.isValid && hasAccess(editAccessRole, user)) { // check if user provided values differ from initial ones return !_.isEqual(formik.values, formik.initialValues); @@ -154,7 +159,7 @@ const DetailsExtendedMetadataTab = ({ diff --git a/src/components/events/partials/ModalTabsAndPages/DetailsMetadataTab.tsx b/src/components/events/partials/ModalTabsAndPages/DetailsMetadataTab.tsx index 39c3ffd502..179f2abd10 100644 --- a/src/components/events/partials/ModalTabsAndPages/DetailsMetadataTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/DetailsMetadataTab.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Formik } from "formik"; +import { Formik, FormikProps } from "formik"; import { Field } from "../../../shared/Field"; import cn from "classnames"; import _ from "lodash"; @@ -11,8 +11,10 @@ import RenderField from "../../../shared/wizard/RenderField"; import { getUserInformation } from "../../../../selectors/userInfoSelectors"; import { hasAccess } from "../../../../utils/utils"; import { getMetadataCollectionFieldName } from "../../../../utils/resourceUtils"; -import { useAppSelector } from "../../../../store"; +import { useAppDispatch, useAppSelector } from "../../../../store"; import { MetadataCatalog } from "../../../../slices/eventSlice"; +import { AsyncThunk } from "@reduxjs/toolkit"; +import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk"; /** * This component renders metadata details of a certain event or series @@ -25,22 +27,23 @@ const DetailsMetadataTab = ({ editAccessRole, }: { metadataFields: MetadataCatalog, - updateResource: (id: string, values: { [key: string]: any }) => void, + updateResource: AsyncThunk resourceId: string, header: string, editAccessRole: string, }) => { const { t } = useTranslation(); + const dispatch = useAppDispatch(); const user = useAppSelector(state => getUserInformation(state)); const handleSubmit = (values: { [key: string]: any }) => { - updateResource(resourceId, values); + dispatch(updateResource({id: resourceId, values})); }; // set current values of metadata fields as initial values const getInitialValues = () => { - let initialValues = {}; + let initialValues: { [key: string]: string | string[] } = {}; // Transform metadata fields and their values provided by backend (saved in redux) if ( @@ -49,7 +52,6 @@ const DetailsMetadataTab = ({ metadataFields.fields.length > 0 ) { metadataFields.fields.forEach((field) => { -// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message initialValues[field.id] = field.value; }); } @@ -57,8 +59,7 @@ const DetailsMetadataTab = ({ return initialValues; }; -// @ts-expect-error TS(7006): Parameter 'formik' implicitly has an 'any' type. - const checkValidity = (formik) => { + const checkValidity = (formik: FormikProps<{ [key: string]: string | string[] }>) => { if (formik.dirty && formik.isValid && hasAccess(editAccessRole, user)) { // check if user provided values differ from initial ones return !_.isEqual(formik.values, formik.initialValues); @@ -152,7 +153,7 @@ const DetailsMetadataTab = ({ diff --git a/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsEditPage.tsx b/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsEditPage.tsx index e825f7921a..a9b5f305ef 100644 --- a/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsEditPage.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsEditPage.tsx @@ -17,8 +17,8 @@ import { removeNotificationWizardForm } from "../../../../slices/notificationSli import { Event, EditedEvents, - checkForSchedulingConflicts, fetchScheduling, + Conflict, } from "../../../../slices/eventSlice"; import { Recording } from "../../../../slices/recordingSlice"; import lodash, { groupBy } from "lodash"; @@ -44,7 +44,7 @@ const EditScheduledEventsEditPage = ({ previousPage: (values: T) => void, setPageCompleted: (rec: Record) => void, inputDevices: Recording[], - conflictState: { conflicts: any, setConflicts: any }, + conflictState: { conflicts: Conflict[], setConflicts: (conflicts: Conflict[]) => void }, }) => { const { t } = useTranslation(); const dispatch = useAppDispatch(); @@ -52,11 +52,6 @@ const EditScheduledEventsEditPage = ({ const loading = useAppSelector(state => isLoadingScheduling(state)); const seriesOptions = useAppSelector(state => getSchedulingSeriesOptions(state)); - // TODO: Get rid of the wrappers when modernizing redux is done - const checkForSchedulingConflictsWrapper = async(events: any) => { - return dispatch(checkForSchedulingConflicts(events)); - } - const user = useAppSelector(state => getUserInformation(state)); useEffect(() => { @@ -140,9 +135,7 @@ const EditScheduledEventsEditPage = ({ {t("EVENTS.EVENTS.TABLE.START")} {t("EVENTS.EVENTS.TABLE.END")} -{/* @ts-expect-error TS(7006): Parameter 'conflict' implicitly has an 'any' type. */} {conflicts.map((conflict) => -// @ts-expect-error TS(7006): Parameter 'c' implicitly has an 'any' type. conflict.conflicts.map((c, key) => ( {conflict.eventId} @@ -543,7 +536,6 @@ const EditScheduledEventsEditPage = ({ await checkSchedulingConflicts( formik.values, setConflicts, - checkForSchedulingConflictsWrapper, dispatch ) ) { diff --git a/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsSummaryPage.tsx b/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsSummaryPage.tsx index cae9f0dd5f..4f8bf31aa3 100644 --- a/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsSummaryPage.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EditScheduledEventsSummaryPage.tsx @@ -25,7 +25,7 @@ const EditScheduledEventsSummaryPage = ({ const { t } = useTranslation(); // Changes applied to events - const [changes, setChanges] = useState([]); + const [changes, setChanges] = useState<{eventId: string, title: string, changes: { type: string, previous: string, next: string }[]}[]>([]); const seriesOptions = useAppSelector(state => getSchedulingSeriesOptions(state)); @@ -36,12 +36,11 @@ const EditScheduledEventsSummaryPage = ({ }, []); const checkForChanges = () => { - let changed = []; + let changed: {eventId: string, title: string, changes: { type: string, previous: string, next: string }[]}[] = []; // Loop through each event selected for editing and compare original values and changed values - for (let i = 0; i < formik.values.editedEvents.length; i++) { - let event = formik.values.editedEvents[i]; - let eventChanges : {eventId: string, title: string, changes: any[]}= { + for (const event of formik.values.editedEvents) { + let eventChanges : {eventId: string, title: string, changes: { type: string, previous: string, next: string }[]}= { eventId: event.eventId, title: event.title, changes: [], @@ -128,13 +127,11 @@ const EditScheduledEventsSummaryPage = ({ } // Set changes state -// @ts-expect-error TS(2345): Argument of type '{ eventId: any; title: any; chan... Remove this comment to see the full error message setChanges(changed); }; // Compare two values -// @ts-expect-error TS(7006): Parameter 'oldValue' implicitly has an 'any' type. - const isChanged = (oldValue, newValue) => { + const isChanged = (oldValue: string, newValue: string) => { return oldValue !== newValue; }; @@ -150,7 +147,6 @@ const EditScheduledEventsSummaryPage = ({
{t( "BULK_ACTIONS.EDIT_EVENTS.SUMMARY.SINGLE_EVENT_CAPTION", -// @ts-expect-error TS(2339): Property 'title' does not exist on type 'never'. { title: event.title } )}
@@ -171,7 +167,6 @@ const EditScheduledEventsSummaryPage = ({ {/* Add table row with old value and new one if something has changed */} -{/* @ts-expect-error TS(2339): Property 'changes' does not exist on type 'never'. */} {event.changes.map((row, key) => ( {t(row.type)} diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsAccessPolicyTab.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsAccessPolicyTab.tsx index 3ea781cc16..69a6e6a373 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsAccessPolicyTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsAccessPolicyTab.tsx @@ -1,13 +1,12 @@ import React from "react"; import { getPolicies } from "../../../../selectors/eventDetailsSelectors"; import ResourceDetailsAccessPolicyTab from "../../../shared/modals/ResourceDetailsAccessPolicyTab"; -import { useAppDispatch, useAppSelector } from "../../../../store"; +import { useAppSelector } from "../../../../store"; import { fetchAccessPolicies, fetchHasActiveTransactions, saveAccessPolicies, } from "../../../../slices/eventDetailsSlice"; -import { unwrapResult } from "@reduxjs/toolkit"; import { useTranslation } from "react-i18next"; /** @@ -25,18 +24,6 @@ const EventDetailsAccessPolicyTab = ({ setPolicyChanged: (value: boolean) => void, }) => { const { t } = useTranslation(); - const dispatch = useAppDispatch(); - - // TODO: Get rid of the wrappers when modernizing redux is done - const fetchAccessPoliciesWrapper = (eventId: any) => { - dispatch(fetchAccessPolicies(eventId)); - } - const fetchHasActiveTransactionsWrapper = async(eventId: any) => { - return await dispatch(fetchHasActiveTransactions(eventId)).then(unwrapResult); - } - const saveNewAccessPoliciesWrapper = (eventId: any, policies: any) => { - return dispatch(saveAccessPolicies({eventId, policies})); - } const policies = useAppSelector(state => getPolicies(state)); @@ -47,9 +34,9 @@ const EventDetailsAccessPolicyTab = ({ buttonText={"EVENTS.EVENTS.DETAILS.ACCESS.ACCESS_POLICY.LABEL"} saveButtonText={"SAVE"} policies={policies} - fetchAccessPolicies={fetchAccessPoliciesWrapper} - fetchHasActiveTransactions={fetchHasActiveTransactionsWrapper} - saveNewAccessPolicies={saveNewAccessPoliciesWrapper} + fetchAccessPolicies={fetchAccessPolicies} + fetchHasActiveTransactions={fetchHasActiveTransactions} + saveNewAccessPolicies={saveAccessPolicies} descriptionText={t("EVENTS.SERIES.NEW.ACCESS.ACCESS_POLICY.DESCRIPTION")} editAccessRole={"ROLE_UI_EVENTS_DETAILS_ACL_EDIT"} policyChanged={policyChanged} diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsAssetsAddAsset.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsAssetsAddAsset.tsx index 22b5f31ef8..634642a30c 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsAssetsAddAsset.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsAssetsAddAsset.tsx @@ -2,7 +2,7 @@ import React from "react"; import EventDetailsTabHierarchyNavigation from "./EventDetailsTabHierarchyNavigation"; import Notifications from "../../../shared/Notifications"; import { style_button_spacing } from "../../../../utils/eventDetailsUtils"; -import { Formik } from "formik"; +import { Formik, FormikProps } from "formik"; import { getAssetUploadOptions } from "../../../../selectors/eventSelectors"; import { translateOverrideFallback } from "../../../../utils/utils"; import { useAppDispatch, useAppSelector } from "../../../../store"; @@ -23,6 +23,8 @@ const EventDetailsAssetsAddAsset = ({ const uploadAssetOptions = useAppSelector(state => getAssetUploadOptions(state)); + const initialValues: { [key: string]: File } = {}; + // Get upload assets that are not of type track const uploadAssets = uploadAssetOptions.filter( (asset) => asset.type !== "track" @@ -32,17 +34,19 @@ const EventDetailsAssetsAddAsset = ({ dispatch(setModalAssetsTabHierarchy(subTabName)); }; -// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type. - function saveAssets(values) { + function saveAssets(values: { [key: string]: File }) { dispatch(updateAssets({values, eventId})); } -// @ts-expect-error TS(7006): Parameter 'e' implicitly has an 'any' type. - const handleChange = (e, formik, assetId) => { - if (e.target.files.length === 0) { - formik.setFieldValue(assetId, null); + const handleChange = (e: React.ChangeEvent, formik: FormikProps<{ [key: string]: File }>, assetId: string) => { + if (e.target.files) { + if (e.target.files.length === 0) { + formik.setFieldValue(assetId, null); + } else { + formik.setFieldValue(assetId, e.target.files[0]); + } } else { - formik.setFieldValue(assetId, e.target.files[0]); + console.warn("File event did not contain any files") } }; @@ -68,7 +72,7 @@ const EventDetailsAssetsAddAsset = ({
saveAssets(values)} > {(formik) => ( @@ -101,10 +105,8 @@ const EventDetailsAssetsAddAsset = ({ type="file" tabIndex={0} /> -{/* @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} {formik.values[asset.id] && ( -{/* @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message */} {formik.values[asset.id].name.substr( 0, 50 @@ -119,9 +121,10 @@ const EventDetailsAssetsAddAsset = ({ className="button-like-anchor remove" onClick={() => { formik.setFieldValue(asset.id, null); -// @ts-expect-error TS(2531): Object is possibly 'null'. - document.getElementById(asset.id).value = - ""; + const element = document.getElementById(asset.id) as HTMLInputElement; + if (element) { + element.value = ""; + } }} /> diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsCommentsTab.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsCommentsTab.tsx index 63e66145d5..d8c8ab4977 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsCommentsTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsCommentsTab.tsx @@ -16,6 +16,8 @@ import { saveCommentReply as saveNewCommentReply, deleteComment as deleteOneComment, deleteCommentReply, + Comment, + CommentReply, } from "../../../../slices/eventDetailsSlice"; import { renderValidDate } from "../../../../utils/dateUtils"; import { useTranslation } from "react-i18next"; @@ -44,8 +46,8 @@ const EventDetailsCommentsTab = ({ }, []); const [replyToComment, setReplyToComment] = useState(false); - const [replyCommentId, setReplyCommentId] = useState(null); - const [originalComment, setOriginalComment] = useState(null); + const [replyCommentId, setReplyCommentId] = useState(undefined); + const [originalComment, setOriginalComment] = useState(undefined); const [commentReplyText, setCommentReplyText] = useState(""); const [commentReplyIsResolved, setCommentReplyIsResolved] = useState(false); @@ -54,8 +56,7 @@ const EventDetailsCommentsTab = ({ const user = useAppSelector(state => getUserInformation(state)); -// @ts-expect-error TS(7006): Parameter 'commentText' implicitly has an 'any' ty... Remove this comment to see the full error message - const saveComment = (commentText, commentReason) => { + const saveComment = (commentText: string, commentReason: string) => { dispatch(saveNewComment({eventId, commentText, commentReason})).then((successful) => { if (successful) { dispatch(fetchComments(eventId)); @@ -65,8 +66,7 @@ const EventDetailsCommentsTab = ({ }); }; -// @ts-expect-error TS(7006): Parameter 'comment' implicitly has an 'any' type. - const replyTo = (comment, key) => { + const replyTo = (comment: Comment, key: number) => { setReplyToComment(true); setReplyCommentId(key); setOriginalComment(comment); @@ -74,14 +74,13 @@ const EventDetailsCommentsTab = ({ const exitReplyMode = () => { setReplyToComment(false); - setReplyCommentId(null); - setOriginalComment(null); + setReplyCommentId(undefined); + setOriginalComment(undefined); setCommentReplyText(""); setCommentReplyIsResolved(false); }; -// @ts-expect-error TS(7006): Parameter 'originalComment' implicitly has an 'any... Remove this comment to see the full error message - const saveReply = (originalComment, reply, isResolved) => { + const saveReply = (originalComment: Comment, reply: string, isResolved: boolean) => { dispatch(saveNewCommentReply({eventId, commentId: originalComment.id, replyText: reply, commentResolved: isResolved})).then( (success) => { if (success) { @@ -92,8 +91,7 @@ const EventDetailsCommentsTab = ({ ); }; -// @ts-expect-error TS(7006): Parameter 'comment' implicitly has an 'any' type. - const deleteComment = (comment) => { + const deleteComment = (comment: Comment) => { dispatch(deleteOneComment({eventId, commentId: comment.id})).then((success) => { if (success) { dispatch(fetchComments(eventId)); @@ -101,8 +99,7 @@ const EventDetailsCommentsTab = ({ }); }; -// @ts-expect-error TS(7006): Parameter 'comment' implicitly has an 'any' type. - const deleteReply = (comment, reply) => { + const deleteReply = (comment: Comment, reply: CommentReply) => { dispatch(deleteCommentReply({eventId, commentId: comment.id, replyId: reply.id})).then((success) => { if (success) { dispatch(fetchComments(eventId)); @@ -211,8 +208,7 @@ const EventDetailsCommentsTab = ({ ) && ( diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsSchedulingTab.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsSchedulingTab.tsx index e33516fa31..20e243e498 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsSchedulingTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsSchedulingTab.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from "react"; import cn from "classnames"; import _ from "lodash"; import { DatePicker } from "@mui/x-date-pickers/DatePicker"; -import { Formik } from "formik"; +import { Formik, FormikErrors, FormikProps } from "formik"; import { Field } from "../../../shared/Field"; import Notifications from "../../../shared/Notifications"; import { @@ -42,6 +42,7 @@ import { useAppDispatch, useAppSelector } from "../../../../store"; import { checkConflicts, saveSchedulingInfo, + SchedulingInfo, } from "../../../../slices/eventDetailsSlice"; import { removeNotificationWizardForm, @@ -68,8 +69,7 @@ const EventDetailsSchedulingTab = ({ const checkingConflicts = useAppSelector(state => isCheckingConflicts(state)); const captureAgents = useAppSelector(state => getRecordings(state)); - // TODO: Get rid of the wrappers when modernizing redux is done - const checkConflictsWrapper = (eventId: any, startDate: any, endDate: any, deviceId: any) => { + const checkConflictsWrapper = (eventId: string, startDate: Date, endDate: Date, deviceId: string) => { dispatch(checkConflicts({eventId, startDate, endDate, deviceId})); } @@ -120,8 +120,7 @@ const EventDetailsSchedulingTab = ({ }; // changes the inputs in the formik -// @ts-expect-error TS(7006): Parameter 'deviceId' implicitly has an 'any' type. - const changeInputs = (deviceId: Recording["id"], setFieldValue) => { + const changeInputs = (deviceId: Recording["id"], setFieldValue: (field: string, value: any) => Promise>) => { setFieldValue("captureAgent", deviceId); setFieldValue("inputs", []); }; @@ -130,8 +129,7 @@ const EventDetailsSchedulingTab = ({ }; // checks validity of the formik form -// @ts-expect-error TS(7006): Parameter 'formik' implicitly has an 'any' type. - const checkValidity = (formik) => { + const checkValidity = (formik: FormikProps) => { if ( formik.dirty && formik.isValid && @@ -158,8 +156,7 @@ const EventDetailsSchedulingTab = ({ }; // submits the formik form -// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type. - const submitForm = async (values) => { + const submitForm = async (values: SchedulingInfo) => { dispatch(removeNotificationWizardForm()); const startDate = makeDate( values.scheduleStartDate, @@ -198,12 +195,12 @@ const EventDetailsSchedulingTab = ({ : []; return { - scheduleStartDate: startDate.setHours(0, 0, 0), + scheduleStartDate: startDate.setHours(0, 0, 0).toString(), scheduleStartHour: source.start.hour != null ? makeTwoDigits(source.start.hour) : "", scheduleStartMinute: source.start.minute != null ? makeTwoDigits(source.start.minute) : "", scheduleDurationHours: source.duration.hour != null ? makeTwoDigits(source.duration.hour) : "", scheduleDurationMinutes: source.duration.minute != null ? makeTwoDigits(source.duration.minute): "", - scheduleEndDate: endDate.setHours(0, 0, 0), + scheduleEndDate: endDate.setHours(0, 0, 0).toString(), scheduleEndHour: source.end.hour != null ? makeTwoDigits(source.end.hour): "", scheduleEndMinute: source.end.minute != null ? makeTwoDigits(source.end.minute): "", captureAgent: source.device.name, @@ -304,8 +301,7 @@ const EventDetailsSchedulingTab = ({ ) : ( <> {sourceStartDate.toLocaleDateString( -// @ts-expect-error TS(2532): Object is possibly 'undefined'. - currentLanguage.dateLocale.code + currentLanguage ? currentLanguage.dateLocale.code : undefined )} )} @@ -536,8 +532,7 @@ const EventDetailsSchedulingTab = ({ {new Date( formik.values.scheduleEndDate ).toLocaleDateString( -// @ts-expect-error TS(2532): Object is possibly 'undefined'. - currentLanguage.dateLocale.code + currentLanguage ? currentLanguage.dateLocale.code : undefined )} )} @@ -553,8 +548,7 @@ const EventDetailsSchedulingTab = ({ {new Date( formik.values.scheduleEndDate ).toLocaleDateString( -// @ts-expect-error TS(2532): Object is possibly 'undefined'. - currentLanguage.dateLocale.code + currentLanguage ? currentLanguage.dateLocale.code : undefined )} )} diff --git a/src/components/events/partials/ModalTabsAndPages/EventDetailsStatisticsTab.tsx b/src/components/events/partials/ModalTabsAndPages/EventDetailsStatisticsTab.tsx index eb400fa50d..2329e7ccce 100644 --- a/src/components/events/partials/ModalTabsAndPages/EventDetailsStatisticsTab.tsx +++ b/src/components/events/partials/ModalTabsAndPages/EventDetailsStatisticsTab.tsx @@ -30,8 +30,7 @@ const EventDetailsStatisticsTab = ({ } /* generates file name for download-link for a statistic */ -// @ts-expect-error TS(7006): Parameter 'statsTitle' implicitly has an 'any' typ... Remove this comment to see the full error message - const statisticsCsvFileName = (statsTitle) => { + const statisticsCsvFileName = (statsTitle: string) => { const sanitizedStatsTitle = statsTitle .replace(/[^0-9a-z]/gi, "_") .toLowerCase(); @@ -61,7 +60,6 @@ const EventDetailsStatisticsTab = ({ /* visualization of statistic for time series data */
= ({ +const EventDetailsTabHierarchyNavigation = ({ openSubTab, hierarchyDepth, translationKey0 = "", @@ -27,6 +18,15 @@ const EventDetailsTabHierarchyNavigation : React.FC<{ subTabArgument1, translationKey2 = "", subTabArgument2, +}: { + openSubTab: (tabType: T) => void, + hierarchyDepth: number, + translationKey0: string, + subTabArgument0: T, + translationKey1?: string, + subTabArgument1?: T, + translationKey2?: string, + subTabArgument2?: T, }) => { const { t } = useTranslation(); @@ -47,7 +47,7 @@ const EventDetailsTabHierarchyNavigation : React.FC<{ )} - {hierarchyDepth > 0 && ( + {hierarchyDepth > 0 && subTabArgument1 && (