From 6e617febadc820387c0c6fcb42a21e7ca8ae0b4f Mon Sep 17 00:00:00 2001 From: Dennis Hadzialic <25294013+D3nnis38@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:30:42 +0100 Subject: [PATCH 1/2] Add new dependencies for Material-UI icons --- package-lock.json | 572 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 5 +- 2 files changed, 528 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8428103..0b1716a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,11 @@ "name": "boilerplate-vite", "version": "0.0.0", "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.0", "@googlemaps/js-api-loader": "^1.15.1", "@googlemaps/markerclusterer": "^2.0.15", + "@mui/icons-material": "^5.15.13", "@react-google-maps/api": "^2.19.2", "@turf/boolean-point-in-polygon": "^6.5.0", "@turf/center-of-mass": "^6.5.0", @@ -1910,12 +1913,11 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz", - "integrity": "sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==", - "dev": true, + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -1998,6 +2000,60 @@ "node": ">=10.0.0" } }, + "node_modules/@emotion/babel-plugin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", + "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/serialize": "^1.1.2", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", @@ -2011,6 +2067,73 @@ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, + "node_modules/@emotion/react": { + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.3.tgz", + "integrity": "sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==", + "dependencies": { + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/unitless": "^0.8.1", + "@emotion/utils": "^1.2.1", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/serialize/node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, + "node_modules/@emotion/sheet": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + }, + "node_modules/@emotion/styled": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", + "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@emotion/stylis": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", @@ -2025,11 +2148,20 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", - "dev": true, "peerDependencies": { "react": ">=16.8.0" } }, + "node_modules/@emotion/utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + }, "node_modules/@esbuild/android-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", @@ -2489,6 +2621,44 @@ "integrity": "sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==", "dev": true }, + "node_modules/@floating-ui/core": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", + "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", + "peer": true, + "dependencies": { + "@floating-ui/utils": "^0.2.1" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", + "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", + "peer": true, + "dependencies": { + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", + "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", + "peer": true, + "dependencies": { + "@floating-ui/dom": "^1.6.1" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==", + "peer": true + }, "node_modules/@googlemaps/js-api-loader": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/@googlemaps/js-api-loader/-/js-api-loader-1.16.2.tgz", @@ -3389,6 +3559,259 @@ "react": ">=16" } }, + "node_modules/@mui/base": { + "version": "5.0.0-beta.39", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.39.tgz", + "integrity": "sha512-puyUptF7VJ+9/dMIRLF+DLR21cWfvejsA6OnatfJfqFp8aMhya7xQtvYLEfCch6ahvFZvNC9FFEGGR+qkgFjUg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.13", + "@popperjs/core": "^2.11.8", + "clsx": "^2.1.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.13.tgz", + "integrity": "sha512-ERsk9EWpiitSiKnmUdFJGshtFk647l4p7r+mjRWe/F1l5kT1NTTKkaeDLcK3/lsy0udXjMgcG0bNwzbYBdDdhQ==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.13.tgz", + "integrity": "sha512-I7CioMQKBPaKyGgcE9i8+1dgzAmox5a/0wZ0E9sIxm7PzG5KJZRRJkdK4oDT4HfYRGv61KjcHEeqH48pht1dvQ==", + "dependencies": { + "@babel/runtime": "^7.23.9" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.13.tgz", + "integrity": "sha512-E+QisOJcIzTTyeJ0o3lgYMcyrmCydb2S4cn9vTtGpIB9uR6fQ6La3dIGsXgYEGyeOB9YkWzQbNzYzvyODGEWKA==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.39", + "@mui/core-downloads-tracker": "^5.15.13", + "@mui/system": "^5.15.13", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.13", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^18.2.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.13.tgz", + "integrity": "sha512-j5Z2pRi6talCunIRIzpQERSaHwLd5EPdHMwIKDVCszro1RAzRZl7WmH68IMCgQmJMeglr+FalqNuq048qptGAg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.13", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", + "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.13.tgz", + "integrity": "sha512-eHaX3sniZXNWkxX0lmcLxROhQ5La0HkOuF7zxbSdAoHUOk07gboQYmF6hSJ/VBFx/GLanIw67FMTn88vc8niLg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.13", + "@mui/styled-engine": "^5.15.11", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.13", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.13", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.13.tgz", + "integrity": "sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g==", + "peer": true, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.15.13", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.13.tgz", + "integrity": "sha512-qNlR9FLEhORC4zVZ3fzF48213EhP/92N71AcFbhHN73lPJjAbq9lUv+71P7uEdRHdrrOlm8+1zE8/OBy6MUqdg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@ndelangen/get-tarball": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/@ndelangen/get-tarball/-/get-tarball-3.0.7.tgz", @@ -3435,6 +3858,16 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@react-google-maps/api": { "version": "2.19.2", "resolved": "https://registry.npmjs.org/@react-google-maps/api/-/api-2.19.2.tgz", @@ -5513,8 +5946,7 @@ "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, "node_modules/@types/prettier": { "version": "2.7.2", @@ -5529,10 +5961,9 @@ "dev": true }, "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/qs": { "version": "6.9.7", @@ -5550,7 +5981,6 @@ "version": "18.2.6", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.6.tgz", "integrity": "sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==", - "dev": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5566,11 +5996,19 @@ "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "peer": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", - "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", - "dev": true + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" }, "node_modules/@types/semver": { "version": "7.5.0", @@ -6516,6 +6954,20 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", @@ -7113,7 +7565,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -7408,6 +7859,15 @@ "node": ">=0.10.0" } }, + "node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -7647,8 +8107,7 @@ "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "node_modules/cookie": { "version": "0.5.0", @@ -7688,7 +8147,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -7742,10 +8200,9 @@ } }, "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", - "dev": true + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -8013,6 +8470,16 @@ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -8176,7 +8643,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -9430,6 +9896,11 @@ "node": ">=8" } }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9619,8 +10090,7 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -10007,7 +10477,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -10224,7 +10693,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -10240,7 +10708,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -10450,8 +10917,7 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, "node_modules/is-bigint": { "version": "1.0.4", @@ -10509,7 +10975,6 @@ "version": "2.12.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, "dependencies": { "has": "^1.0.3" }, @@ -13783,8 +14248,7 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -13921,8 +14385,7 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/lint-staged": { "version": "13.2.2", @@ -15066,7 +15529,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -15078,7 +15540,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -15131,8 +15592,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { "version": "0.1.7", @@ -15144,7 +15604,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -15812,6 +16271,22 @@ "react-dom": ">=16.8" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -15999,10 +16474,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regenerator-transform": { "version": "0.15.1", @@ -16113,7 +16587,6 @@ "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -16958,6 +17431,11 @@ "react-is": ">= 16.8.0" } }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + }, "node_modules/supercluster": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", @@ -16981,7 +17459,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -18160,7 +18637,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, "engines": { "node": ">= 6" } diff --git a/package.json b/package.json index 2c212cd..38517b2 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,11 @@ ] }, "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.0", "@googlemaps/js-api-loader": "^1.15.1", "@googlemaps/markerclusterer": "^2.0.15", + "@mui/icons-material": "^5.15.13", "@react-google-maps/api": "^2.19.2", "@turf/boolean-point-in-polygon": "^6.5.0", "@turf/center-of-mass": "^6.5.0", @@ -88,4 +91,4 @@ "typescript": "^5.0.2", "vite": "^4.3.0" } -} +} \ No newline at end of file From 5aef62097cbff68ef80d1459e67667dbf2f748b3 Mon Sep 17 00:00:00 2001 From: Dennis Hadzialic <25294013+D3nnis38@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:31:54 +0100 Subject: [PATCH 2/2] Add new session route for grouping events --- src/api/event/event.ts | 1 + src/components/Menu/Menu.tsx | 5 +- src/hooks/useEventApi.ts | 4 +- src/modules/Delivery/Delivery.tsx | 16 ++- .../components/DeliveryList/DeliveryList.tsx | 27 +++-- .../DeliveryList/ListContent/ListContent.tsx | 98 ------------------- .../components/EventRow/EventRow.tsx | 74 ++++++++++++++ .../DeliveryList/components/EventRow/index.ts | 1 + .../EventRow}/styled.ts | 15 --- .../FilterList/AreaFilter/AreaFilter.tsx | 0 .../FilterList/AreaFilter/index.ts | 0 .../DistributorFilter/DistributorFilter.tsx | 0 .../FilterList/DistributorFilter/index.ts | 0 .../FilterList/FilterList.tsx | 10 +- .../FilterList/NameFilter/NameFilter.tsx | 0 .../FilterList/NameFilter/index.ts | 0 .../OrganisationFilter/OrganisationFilter.tsx | 0 .../FilterList/OrganisationFilter/index.ts | 0 .../WeekdayFilter/WeekdayFilter.tsx | 0 .../FilterList/WeekdayFilter/index.ts | 0 .../FilterList/filter.styled.ts | 0 .../{ => components}/FilterList/index.ts | 0 .../{ => components}/FilterList/styled.ts | 0 .../GroupOfEvents/GroupOfEvents.tsx | 28 ++++++ .../components/GroupOfEvents/index.ts | 1 + .../components/GroupOfEvents/styled.ts | 22 +++++ .../components/ListContent/ListContent.tsx | 42 ++++++++ .../{ => components}/ListContent/index.ts | 0 .../components/ListContent/styled.ts | 23 +++++ .../ListHeader/ListHeader.tsx | 0 .../{ => components}/ListHeader/index.ts | 0 .../{ => components}/ListHeader/styled.ts | 0 .../DeliveryList/components/index.ts | 5 + .../useGetEventFilters/useGetEventFilters.ts | 7 +- .../hooks/useGetEvents/useGetEvents.ts | 41 +++++--- src/modules/Router.tsx | 5 +- 36 files changed, 280 insertions(+), 145 deletions(-) delete mode 100644 src/modules/Delivery/components/DeliveryList/ListContent/ListContent.tsx create mode 100644 src/modules/Delivery/components/DeliveryList/components/EventRow/EventRow.tsx create mode 100644 src/modules/Delivery/components/DeliveryList/components/EventRow/index.ts rename src/modules/Delivery/components/DeliveryList/{ListContent => components/EventRow}/styled.ts (85%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/AreaFilter/AreaFilter.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/AreaFilter/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/DistributorFilter/DistributorFilter.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/DistributorFilter/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/FilterList.tsx (94%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/NameFilter/NameFilter.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/NameFilter/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/OrganisationFilter/OrganisationFilter.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/OrganisationFilter/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/WeekdayFilter/WeekdayFilter.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/WeekdayFilter/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/filter.styled.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/FilterList/styled.ts (100%) create mode 100644 src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/GroupOfEvents.tsx create mode 100644 src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/index.ts create mode 100644 src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/styled.ts create mode 100644 src/modules/Delivery/components/DeliveryList/components/ListContent/ListContent.tsx rename src/modules/Delivery/components/DeliveryList/{ => components}/ListContent/index.ts (100%) create mode 100644 src/modules/Delivery/components/DeliveryList/components/ListContent/styled.ts rename src/modules/Delivery/components/DeliveryList/{ => components}/ListHeader/ListHeader.tsx (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/ListHeader/index.ts (100%) rename src/modules/Delivery/components/DeliveryList/{ => components}/ListHeader/styled.ts (100%) create mode 100644 src/modules/Delivery/components/DeliveryList/components/index.ts diff --git a/src/api/event/event.ts b/src/api/event/event.ts index fb30028..877e0f3 100644 --- a/src/api/event/event.ts +++ b/src/api/event/event.ts @@ -2,6 +2,7 @@ import { Event } from 'types/event'; import { client } from '../baseAxios'; export const getEvents = (filter?: string) => client.get(`/zones/events${filter !== '' ? `?${filter}` : ''}`); +export const getGroupedEvents = (filter?: string) => client.get(`/zones/events/grouped${filter !== '' ? `?${filter}` : ''}`); export const exportEvents = (filter?: string) => client.get( `/zones/events/export${filter !== '' ? `?${filter}` : ''}`, { diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx index daff70c..a8059a6 100644 --- a/src/components/Menu/Menu.tsx +++ b/src/components/Menu/Menu.tsx @@ -32,12 +32,13 @@ export const Menu = () => { { - navigate('/'); + navigate('/events'); setIsOpen(false); }} > - Lista + Leveranser + navigate('/events/grouped')}>Turer navigate('/map')}>Karta diff --git a/src/hooks/useEventApi.ts b/src/hooks/useEventApi.ts index 99b6df0..5f5e11f 100644 --- a/src/hooks/useEventApi.ts +++ b/src/hooks/useEventApi.ts @@ -1,11 +1,13 @@ -import { getEvents, exportEvents } from 'api/event'; +import { getEvents, exportEvents, getGroupedEvents } from 'api/event'; export const useEventApi = () => { const getAllEvents = (filter?: string) => getEvents(filter); const exportAllEvents = (filter?: string) => exportEvents(filter); + const getAllGroupedEvents = (filter?: string) => getGroupedEvents(filter); return { getAllEvents, exportAllEvents, + getAllGroupedEvents, }; }; diff --git a/src/modules/Delivery/Delivery.tsx b/src/modules/Delivery/Delivery.tsx index 8215b1a..da25d99 100644 --- a/src/modules/Delivery/Delivery.tsx +++ b/src/modules/Delivery/Delivery.tsx @@ -1,5 +1,5 @@ import { useAuth } from 'hooks/useAuth'; -import { useEffect } from 'react'; +import { FC, useEffect } from 'react'; import { DeliveryLayout } from 'layouts/DeliveryLayout'; import { useNavigate } from 'react-router-dom'; import MapIcon from 'assets/map_icon.svg'; @@ -7,7 +7,11 @@ import { Button } from 'components/Button'; import * as Styled from './styled'; import { DeliveryList } from './components'; -export const Delivery = () => { +type Props = { + grouped?: boolean; +}; + +export const Delivery: FC = ({ grouped }) => { const { hasToken } = useAuth(); const isAuthenticated = hasToken(); const navigate = useNavigate(); @@ -28,8 +32,8 @@ export const Delivery = () => { return ( - Leveranser - + {grouped ? 'Turer' : 'Leveranser'} + + )} + ); }; diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/NameFilter/NameFilter.tsx b/src/modules/Delivery/components/DeliveryList/components/FilterList/NameFilter/NameFilter.tsx similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/NameFilter/NameFilter.tsx rename to src/modules/Delivery/components/DeliveryList/components/FilterList/NameFilter/NameFilter.tsx diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/NameFilter/index.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/NameFilter/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/NameFilter/index.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/NameFilter/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/OrganisationFilter/OrganisationFilter.tsx b/src/modules/Delivery/components/DeliveryList/components/FilterList/OrganisationFilter/OrganisationFilter.tsx similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/OrganisationFilter/OrganisationFilter.tsx rename to src/modules/Delivery/components/DeliveryList/components/FilterList/OrganisationFilter/OrganisationFilter.tsx diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/OrganisationFilter/index.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/OrganisationFilter/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/OrganisationFilter/index.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/OrganisationFilter/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/WeekdayFilter/WeekdayFilter.tsx b/src/modules/Delivery/components/DeliveryList/components/FilterList/WeekdayFilter/WeekdayFilter.tsx similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/WeekdayFilter/WeekdayFilter.tsx rename to src/modules/Delivery/components/DeliveryList/components/FilterList/WeekdayFilter/WeekdayFilter.tsx diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/WeekdayFilter/index.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/WeekdayFilter/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/WeekdayFilter/index.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/WeekdayFilter/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/filter.styled.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/filter.styled.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/filter.styled.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/filter.styled.ts diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/index.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/index.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/FilterList/styled.ts b/src/modules/Delivery/components/DeliveryList/components/FilterList/styled.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/FilterList/styled.ts rename to src/modules/Delivery/components/DeliveryList/components/FilterList/styled.ts diff --git a/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/GroupOfEvents.tsx b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/GroupOfEvents.tsx new file mode 100644 index 0000000..b17e01e --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/GroupOfEvents.tsx @@ -0,0 +1,28 @@ +import { KeyboardArrowUp, KeyboardArrowDown } from '@mui/icons-material'; +import { FC, useState } from 'react'; +import { Event } from 'types/event'; +import * as Styled from './styled'; +import { EventRow } from '../EventRow'; + +type Props = { + events: Event[]; +}; + +export const GroupOfEvents: FC = ({ + events, +}) => { + const [isOpen, setIsOpen] = useState(false); + + return ( + + setIsOpen(!isOpen)}> + {isOpen ? : } + {`${events[0].organisation.name}`} + + {isOpen + && events.map((event) => ( + + ))} + + ); +}; diff --git a/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/index.ts b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/index.ts new file mode 100644 index 0000000..c587c83 --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/index.ts @@ -0,0 +1 @@ +export * from './GroupOfEvents'; diff --git a/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/styled.ts b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/styled.ts new file mode 100644 index 0000000..213910e --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/GroupOfEvents/styled.ts @@ -0,0 +1,22 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + display: flex; + flex-direction: column; + gap: var(--spacing-xxs); +`; + +export const GroupTitle = styled.h3` + font-size: var(--font-size-heading-xxs); + font-weight: var(--font-weight-500); + align-self: center; +`; + +export const GroupBar = styled.div` + border-radius: 8px; + padding: var(--spacing-xxs); + background-color: var(--color-gray-1); + display: flex; + gap: var(--spacing-xs); + cursor: pointer; +`; diff --git a/src/modules/Delivery/components/DeliveryList/components/ListContent/ListContent.tsx b/src/modules/Delivery/components/DeliveryList/components/ListContent/ListContent.tsx new file mode 100644 index 0000000..e122554 --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/ListContent/ListContent.tsx @@ -0,0 +1,42 @@ +import { FC } from 'react'; +import { Event } from 'types/event'; +import * as Styled from './styled'; +import { EventRow } from '../EventRow'; +import { GroupOfEvents } from '../GroupOfEvents'; + +type ListContentProps = { + events?: Event[]; + groupedEvents?: Event[][]; + resetFilters: () => void; +}; + +export const ListContent: FC = ({ events, groupedEvents, resetFilters }) => { + if ((!events || events.length <= 0) && (!groupedEvents || groupedEvents.length <= 0)) { + return ( + + Inga resultat. Begränsa filtrering och försök igen. + {' '} + resetFilters()}> + Rensa alla filter + + + ); + } + + return ( +
+ {events ? events.map((event) => ( + + )) : groupedEvents?.map((eventList) => ( + + + + ))} +
+ ); +}; + +ListContent.defaultProps = { + events: undefined, + groupedEvents: undefined, +}; diff --git a/src/modules/Delivery/components/DeliveryList/ListContent/index.ts b/src/modules/Delivery/components/DeliveryList/components/ListContent/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/ListContent/index.ts rename to src/modules/Delivery/components/DeliveryList/components/ListContent/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/components/ListContent/styled.ts b/src/modules/Delivery/components/DeliveryList/components/ListContent/styled.ts new file mode 100644 index 0000000..40393c9 --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/ListContent/styled.ts @@ -0,0 +1,23 @@ +import styled from 'styled-components'; + +export const NoResultText = styled.p` + font-size: var(--font-size-body-xs); + font-weight: var(--font-weight-600); + line-height: var(--line-height-xxxs); + padding-top: 18px; +`; + +export const RefreshLink = styled.span` + font-size: var(--font-size-body-xs); + font-weight: var(--font-weight-600); + line-height: var(--line-height-xxxs); + text-decoration: underline; + cursor: pointer; +`; + +export const GroupedEventsContainer = styled.div` + display: flex; + flex-direction: column; + gap: var(--spacing-xxs); + margin-top: var(--spacing-xxs); +`; diff --git a/src/modules/Delivery/components/DeliveryList/ListHeader/ListHeader.tsx b/src/modules/Delivery/components/DeliveryList/components/ListHeader/ListHeader.tsx similarity index 100% rename from src/modules/Delivery/components/DeliveryList/ListHeader/ListHeader.tsx rename to src/modules/Delivery/components/DeliveryList/components/ListHeader/ListHeader.tsx diff --git a/src/modules/Delivery/components/DeliveryList/ListHeader/index.ts b/src/modules/Delivery/components/DeliveryList/components/ListHeader/index.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/ListHeader/index.ts rename to src/modules/Delivery/components/DeliveryList/components/ListHeader/index.ts diff --git a/src/modules/Delivery/components/DeliveryList/ListHeader/styled.ts b/src/modules/Delivery/components/DeliveryList/components/ListHeader/styled.ts similarity index 100% rename from src/modules/Delivery/components/DeliveryList/ListHeader/styled.ts rename to src/modules/Delivery/components/DeliveryList/components/ListHeader/styled.ts diff --git a/src/modules/Delivery/components/DeliveryList/components/index.ts b/src/modules/Delivery/components/DeliveryList/components/index.ts new file mode 100644 index 0000000..f6f35ac --- /dev/null +++ b/src/modules/Delivery/components/DeliveryList/components/index.ts @@ -0,0 +1,5 @@ +export * from './ListContent'; +export * from './ListHeader'; +export * from './EventRow'; +export * from './FilterList'; +export * from './GroupOfEvents'; diff --git a/src/modules/Delivery/hooks/useGetEventFilters/useGetEventFilters.ts b/src/modules/Delivery/hooks/useGetEventFilters/useGetEventFilters.ts index 46add3e..c7dbce8 100644 --- a/src/modules/Delivery/hooks/useGetEventFilters/useGetEventFilters.ts +++ b/src/modules/Delivery/hooks/useGetEventFilters/useGetEventFilters.ts @@ -8,9 +8,10 @@ import { useGetFilterValues } from '../useGetFilterValues'; type HookProps = { fetchEvents: (filter?: string) => void; exportEvents: (filter?: string) => void; + grouped: boolean; }; -export const useGetEventFilters = ({ fetchEvents, exportEvents }: HookProps) => { +export const useGetEventFilters = ({ fetchEvents, exportEvents, grouped }: HookProps) => { const { allWeekdays, dates, timeInterval } = useGetFilterValues(); const { getFiltersForEvent } = useFilterApi(); const [filterOptions, setFilterOptions] = useState(); @@ -213,6 +214,10 @@ export const useGetEventFilters = ({ fetchEvents, exportEvents }: HookProps) => const exportEventsToExcel = () => exportEvents(filterState); + useEffect(() => { + triggerReload(); + }, [grouped]); + return { filterOptions, activeFilters, diff --git a/src/modules/Delivery/hooks/useGetEvents/useGetEvents.ts b/src/modules/Delivery/hooks/useGetEvents/useGetEvents.ts index 56b8dc7..83cc938 100644 --- a/src/modules/Delivery/hooks/useGetEvents/useGetEvents.ts +++ b/src/modules/Delivery/hooks/useGetEvents/useGetEvents.ts @@ -4,21 +4,38 @@ import { useEventApi } from 'hooks/useEventApi'; import { downloadBlobAsFile } from 'utils/downloadFile'; export const useGetEvents = () => { - const { getAllEvents, exportAllEvents } = useEventApi(); + const { getAllEvents, exportAllEvents, getAllGroupedEvents } = useEventApi(); const [events, setEvents] = useState(); + const [groupedEvents, setGroupedEvents] = useState(); const [error, setError] = useState(false); - const [isLoading, setIsLoading] = useState(false); + const [isLoading, setIsLoading] = useState(true); - const fetchEvents = (filter?: string) => { - setError(false); - setIsLoading(true); - getAllEvents(filter) - .then(({ data }) => { - setEvents(data); - }) - .catch(() => setError(true)); + const fetchEvents = async (filter?: string) => { + try { + setError(false); + setIsLoading(true); + setGroupedEvents(undefined); + const { data } = await getAllEvents(filter); + setEvents(data); + } catch (e) { + setError(true); + } finally { + setIsLoading(false); + } + }; - setIsLoading(false); + const fetchGroupedEvents = async (filter?: string) => { + try { + setError(false); + setIsLoading(true); + setEvents(undefined); + const { data } = await getAllGroupedEvents(filter); + setGroupedEvents(data); + } catch (e) { + setError(true); + } finally { + setIsLoading(false); + } }; const exportEvents = async (filter?: string) => { @@ -37,8 +54,10 @@ export const useGetEvents = () => { return { events, + groupedEvents, fetchEvents, exportEvents, + fetchGroupedEvents, error, isLoading, }; diff --git a/src/modules/Router.tsx b/src/modules/Router.tsx index 28dd9a8..1d49910 100644 --- a/src/modules/Router.tsx +++ b/src/modules/Router.tsx @@ -14,11 +14,12 @@ export const Router = () => ( - } /> + } /> + } /> } /> } /> } /> - } /> + } />