diff --git a/package-lock.json b/package-lock.json index 9ec33ed..1bb376d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "aray", "version": "0.1.0", "dependencies": { "@aws-amplify/ui-components": "^1.3.0", @@ -32,11 +33,12 @@ "prop-types": "^15.7.2", "query-string": "^4.3.4", "react": "^17.0.2", - "react-avatar-edit": "^1.0.0", + "react-avatar-editor": "^12.0.0", "react-big-calendar": "^0.33.5", "react-calendar-heatmap": "^1.8.1", "react-document-title": "^2.0.3", "react-dom": "^17.0.2", + "react-dropzone": "^11.3.4", "react-i18next": "^11.8.15", "react-image-file-resizer": "^0.4.4", "react-number-format": "^4.5.5", @@ -3608,7 +3610,6 @@ "version": "7.14.2", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.2.tgz", "integrity": "sha512-LyA2AiPkaYzI7G5e2YI4NCasTfFe7mZvlupNprDOB7CdNUHb2DQC4uV6oeZ0396gOcicUzUCh0MShL6wiUgk+Q==", - "peer": true, "dependencies": { "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", @@ -7748,6 +7749,14 @@ "node": ">= 4.5.0" } }, + "node_modules/attr-accept": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", + "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", + "engines": { + "node": ">=4" + } + }, "node_modules/autoprefixer": { "version": "9.7.4", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", @@ -9504,11 +9513,6 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "license": "MIT" }, - "node_modules/blueimp-load-image": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-5.14.0.tgz", - "integrity": "sha512-g5l+4dCOESBG8HkPLdGnBx8dhEwpQHaOZ0en623sl54o3bGhGMLYGc54L5cWfGmPvfKUjbsY7LOAmcW/xlkBSA==" - }, "node_modules/bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -14579,11 +14583,6 @@ "node": ">=0.10.0" } }, - "node_modules/exif-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/exif-js/-/exif-js-2.3.0.tgz", - "integrity": "sha1-nRCBm/Vx+HOBPnZAJBJVq5zhqBQ=" - }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -15008,6 +15007,22 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/file-selector": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.2.4.tgz", + "integrity": "sha512-ZDsQNbrv6qRi1YTDOEWzf5J2KjZ9KMI1Q2SGeTkCJmNNW25Jg4TW4UMcmoqcg4WrAyKRcpBXdbWRxkfrOzVRbA==", + "dependencies": { + "tslib": "^2.0.3" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/file-selector/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -19762,11 +19777,6 @@ "node": ">= 8" } }, - "node_modules/konva": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/konva/-/konva-2.6.0.tgz", - "integrity": "sha512-LCOoavICTD9PYoAqtWo8sbxYtCiXdgEeY7vj/Sq8b2bwFmrQr9Ak0RkD4/jxAf5fcUQRL5e1zPLyfRpVndp20A==" - }, "node_modules/language-subtag-registry": { "version": "0.3.21", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", @@ -24488,17 +24498,18 @@ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "license": "MIT" }, - "node_modules/react-avatar-edit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/react-avatar-edit/-/react-avatar-edit-1.0.0.tgz", - "integrity": "sha512-4ouAnDQe7WEeRD/mAxgdZR8dqpazWKOQXdIRwojnNvWGkqdrNRf/5oQN2LXZWHVUQjuI0C8GeES0bp760Zkgsw==", + "node_modules/react-avatar-editor": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/react-avatar-editor/-/react-avatar-editor-12.0.0.tgz", + "integrity": "sha512-l7NrN8CXlUXbMhnbkuduAtR3+AlDz+DzYWlYBNr7q+rNeJMZlv26ap3Dk/D1WK/MPlnoS33iITlhLkuDsYQpug==", "dependencies": { - "blueimp-load-image": "^5.14.0", - "exif-js": "^2.3.0", - "konva": "^2.5.1" + "@babel/plugin-transform-runtime": "^7.12.1", + "@babel/runtime": "^7.12.5", + "prop-types": "^15.7.2" }, "peerDependencies": { - "react": "16.x" + "react": "^0.14.0 || ^17.0.0", + "react-dom": ">=0.14.0" } }, "node_modules/react-big-calendar": { @@ -24762,6 +24773,22 @@ "react": "17.0.2" } }, + "node_modules/react-dropzone": { + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.3.4.tgz", + "integrity": "sha512-B1nzNRZ4F1cnrfEC0T6KXeBN1mCPinu4JCoTrp7NjB+442KSPxqfDrw41QIA2kAwlYs1+wj/0BTedeM5hc2+xw==", + "dependencies": { + "attr-accept": "^2.2.1", + "file-selector": "^0.2.2", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "react": ">= 16.8" + } + }, "node_modules/react-error-overlay": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", @@ -33824,7 +33851,6 @@ "version": "7.14.2", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.2.tgz", "integrity": "sha512-LyA2AiPkaYzI7G5e2YI4NCasTfFe7mZvlupNprDOB7CdNUHb2DQC4uV6oeZ0396gOcicUzUCh0MShL6wiUgk+Q==", - "peer": true, "requires": { "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", @@ -36915,6 +36941,11 @@ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, + "attr-accept": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", + "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==" + }, "autoprefixer": { "version": "9.7.4", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", @@ -38252,11 +38283,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, - "blueimp-load-image": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/blueimp-load-image/-/blueimp-load-image-5.14.0.tgz", - "integrity": "sha512-g5l+4dCOESBG8HkPLdGnBx8dhEwpQHaOZ0en623sl54o3bGhGMLYGc54L5cWfGmPvfKUjbsY7LOAmcW/xlkBSA==" - }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -41924,11 +41950,6 @@ } } }, - "exif-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/exif-js/-/exif-js-2.3.0.tgz", - "integrity": "sha1-nRCBm/Vx+HOBPnZAJBJVq5zhqBQ=" - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -42266,6 +42287,21 @@ } } }, + "file-selector": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.2.4.tgz", + "integrity": "sha512-ZDsQNbrv6qRi1YTDOEWzf5J2KjZ9KMI1Q2SGeTkCJmNNW25Jg4TW4UMcmoqcg4WrAyKRcpBXdbWRxkfrOzVRbA==", + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -45837,11 +45873,6 @@ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==" }, - "konva": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/konva/-/konva-2.6.0.tgz", - "integrity": "sha512-LCOoavICTD9PYoAqtWo8sbxYtCiXdgEeY7vj/Sq8b2bwFmrQr9Ak0RkD4/jxAf5fcUQRL5e1zPLyfRpVndp20A==" - }, "language-subtag-registry": { "version": "0.3.21", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", @@ -49377,14 +49408,14 @@ } } }, - "react-avatar-edit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/react-avatar-edit/-/react-avatar-edit-1.0.0.tgz", - "integrity": "sha512-4ouAnDQe7WEeRD/mAxgdZR8dqpazWKOQXdIRwojnNvWGkqdrNRf/5oQN2LXZWHVUQjuI0C8GeES0bp760Zkgsw==", + "react-avatar-editor": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/react-avatar-editor/-/react-avatar-editor-12.0.0.tgz", + "integrity": "sha512-l7NrN8CXlUXbMhnbkuduAtR3+AlDz+DzYWlYBNr7q+rNeJMZlv26ap3Dk/D1WK/MPlnoS33iITlhLkuDsYQpug==", "requires": { - "blueimp-load-image": "^5.14.0", - "exif-js": "^2.3.0", - "konva": "^2.5.1" + "@babel/plugin-transform-runtime": "^7.12.1", + "@babel/runtime": "^7.12.5", + "prop-types": "^15.7.2" } }, "react-big-calendar": { @@ -49581,6 +49612,16 @@ "scheduler": "^0.20.2" } }, + "react-dropzone": { + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.3.4.tgz", + "integrity": "sha512-B1nzNRZ4F1cnrfEC0T6KXeBN1mCPinu4JCoTrp7NjB+442KSPxqfDrw41QIA2kAwlYs1+wj/0BTedeM5hc2+xw==", + "requires": { + "attr-accept": "^2.2.1", + "file-selector": "^0.2.2", + "prop-types": "^15.7.2" + } + }, "react-error-overlay": { "version": "6.0.9", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", diff --git a/package.json b/package.json index c3d561a..89812ca 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,12 @@ "prop-types": "^15.7.2", "query-string": "^4.3.4", "react": "^17.0.2", - "react-avatar-edit": "^1.0.0", + "react-avatar-editor": "^12.0.0", "react-big-calendar": "^0.33.5", "react-calendar-heatmap": "^1.8.1", "react-document-title": "^2.0.3", "react-dom": "^17.0.2", + "react-dropzone": "^11.3.4", "react-i18next": "^11.8.15", "react-image-file-resizer": "^0.4.4", "react-number-format": "^4.5.5", diff --git a/src/components/Avatar.js b/src/components/Avatar.js index fd443a7..b1b9423 100644 --- a/src/components/Avatar.js +++ b/src/components/Avatar.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import Avatar from '@material-ui/core/Avatar'; import { makeStyles } from '@material-ui/core/styles'; -import AvatarEditor from 'components//AvatarEditor'; +import AvatarEditor from 'components/AvatarEditor'; import Colors from 'constants/Colors'; const useStyles = makeStyles((theme) => ({ @@ -65,6 +65,7 @@ export default function CustomAvatar({ {showEditor && canEdit &&