From 62162b9fd3ae892695e61ef80e7ebba3df1f82f4 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Thu, 5 May 2022 20:54:02 +0300 Subject: [PATCH 1/9] hw2 --- src/App.js | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 65b81b4..8c78aa9 100644 --- a/src/App.js +++ b/src/App.js @@ -1,13 +1,43 @@ import './App.css'; -import Message from './Message'; +import React, {useEffect} from "react"; +import {useState} from "react"; function App() { - const myText = "Tasks from Lesson 1 complete"; + const[messageList, setMessageList] = useState([]); + const[author, setAuthor] = useState(""); + const[message, setMessage] = useState(""); +//comment + let idCounter = messageList.length; + + useEffect(() => { + if(messageList.length > 0) + setTimeout(() => alert("Message send"), 1500) + }, [messageList]); + return ( -
- +
+ <> + setAuthor(e.target.value)}/> +
+ setMessage(e.target.value)}/> +
+ + + {messageList.map((item) => +

Author: {item.author}
Say: {item.text}

+ )} + +
+ ); + } -export default App; \ No newline at end of file +export default App; From 9268e0f8d788a7811864ae5db5b77ad4cc531802 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Tue, 10 May 2022 02:13:07 +0300 Subject: [PATCH 2/9] last update --- .idea/.gitignore | 5 +++++ .idea/inspectionProfiles/Project_Default.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/myfirstapp.iml | 12 ++++++++++++ .idea/vcs.xml | 6 ++++++ src/App.js | 6 +----- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/myfirstapp.iml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..03d9549 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5a53714 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/myfirstapp.iml b/.idea/myfirstapp.iml new file mode 100644 index 0000000..0c8867d --- /dev/null +++ b/.idea/myfirstapp.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/App.js b/src/App.js index 8c78aa9..b2ddd70 100644 --- a/src/App.js +++ b/src/App.js @@ -1,12 +1,10 @@ import './App.css'; -import React, {useEffect} from "react"; -import {useState} from "react"; +import React, {useEffect, useState} from "react"; function App() { const[messageList, setMessageList] = useState([]); const[author, setAuthor] = useState(""); const[message, setMessage] = useState(""); -//comment let idCounter = messageList.length; useEffect(() => { @@ -35,9 +33,7 @@ function App() {
- ); - } export default App; From 5c4b84077f7ddc682ba43087f1c853bc841cdc31 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Wed, 11 May 2022 01:20:02 +0300 Subject: [PATCH 3/9] hw3 --- package-lock.json | 803 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 6 + src/App.js | 81 +++-- src/MessageList.js | 35 ++ src/index.js | 1 + 5 files changed, 897 insertions(+), 29 deletions(-) create mode 100644 src/MessageList.js diff --git a/package-lock.json b/package-lock.json index ae660b6..bf33fee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,12 @@ "name": "myfirstapp", "version": "0.1.0", "dependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/base": "^5.0.0-alpha.79", + "@mui/icons-material": "^5.6.2", + "@mui/material": "^5.6.4", + "@mui/system": "^5.6.4", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^13.5.0", @@ -1972,6 +1978,185 @@ "postcss": "^8.3" } }, + "node_modules/@emotion/babel-plugin": { + "version": "11.9.2", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.9.2.tgz", + "integrity": "sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw==", + "dependencies": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/runtime": "^7.13.10", + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.5", + "@emotion/serialize": "^1.0.2", + "babel-plugin-macros": "^2.6.1", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.0.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/babel-plugin-macros": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "dependencies": { + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, + "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": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.7.1.tgz", + "integrity": "sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A==", + "dependencies": { + "@emotion/memoize": "^0.7.4", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "stylis": "4.0.13" + } + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.2.tgz", + "integrity": "sha512-3QnhqeL+WW88YjYbQL5gUIkthuMw7a0NGbZ7wfFVk2kg/CK5w8w5FFa0RzWjyY1+sujN0NWbtSHH6OJmWHtJpQ==", + "dependencies": { + "@emotion/memoize": "^0.7.4" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" + }, + "node_modules/@emotion/react": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.9.0.tgz", + "integrity": "sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.7.1", + "@emotion/cache": "^11.7.1", + "@emotion/serialize": "^1.0.3", + "@emotion/utils": "^1.1.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.3.tgz", + "integrity": "sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA==", + "dependencies": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" + }, + "node_modules/@emotion/styled": { + "version": "11.8.1", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.8.1.tgz", + "integrity": "sha512-OghEVAYBZMpEquHZwuelXcRjRJQOVayvbmNR0zr174NHdmMgrNkLC6TljKC5h9lZLkN5WGrdUcrKlOJ4phhoTQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.7.1", + "@emotion/is-prop-valid": "^1.1.2", + "@emotion/serialize": "^1.0.2", + "@emotion/utils": "^1.1.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "node_modules/@emotion/utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.1.0.tgz", + "integrity": "sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" + }, "node_modules/@eslint/eslintrc": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", @@ -2760,6 +2945,237 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz", "integrity": "sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg==" }, + "node_modules/@mui/base": { + "version": "5.0.0-alpha.79", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.79.tgz", + "integrity": "sha512-/lZLF027BkiEjM8MIYoeS/FEhTKf+41ePU9SOijMGrCin1Y0Igucw+IHa1fF8HXD7wDbFKqHuso3J1jMG8wyNw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@emotion/is-prop-valid": "^1.1.2", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "@popperjs/core": "^2.11.5", + "clsx": "^1.1.1", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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/icons-material": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.6.2.tgz", + "integrity": "sha512-9QdI7axKuBAyaGz4mtdi7Uy1j73/thqFmEuxpJHxNC7O8ADEK1Da3t2veK2tgmsXsUlAHcAG63gg+GvWWeQNqQ==", + "dependencies": { + "@babel/runtime": "^7.17.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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.6.4", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.6.4.tgz", + "integrity": "sha512-7TD+u/SExZK2a55w6reX56oPk37gKr/M/XGt156X+m0d9LhzOsW864nkErIX/H8oSkX/6kCimxu1FDsO+gjiVw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@mui/base": "5.0.0-alpha.79", + "@mui/system": "^5.6.4", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "@types/react-transition-group": "^4.4.4", + "clsx": "^1.1.1", + "csstype": "^3.0.11", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.7.2", + "react-is": "^17.0.2", + "react-transition-group": "^4.4.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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.6.2", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.6.2.tgz", + "integrity": "sha512-IbrSfFXfiZdyhRMC2bgGTFtb16RBQ5mccmjeh3MtAERWuepiCK7gkW5D9WhEsfTu6iez+TEjeUKSgmMHlsM2mg==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@mui/utils": "^5.6.1", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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.6.1", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.6.1.tgz", + "integrity": "sha512-jEhH6TBY8jc9S8yVncXmoTYTbATjEu44RMFXj6sIYfKr5NArVwTwRo3JexLL0t3BOAiYM4xsFLgfKEIvB9SAeQ==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@emotion/cache": "^11.7.1", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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.6.4", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.6.4.tgz", + "integrity": "sha512-7rsWED1wMFMePySJobsBerFZNu7ga580QSi3Zd6sJR8nVj12qD3yIdfvxA70/PxJ/805KbIT0GX7edKI+hpyhA==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@mui/private-theming": "^5.6.2", + "@mui/styled-engine": "^5.6.1", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "clsx": "^1.1.1", + "csstype": "^3.0.11", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "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.1.3", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.3.tgz", + "integrity": "sha512-DDF0UhMBo4Uezlk+6QxrlDbchF79XG6Zs0zIewlR4c0Dt6GKVFfUtzPtHCH1tTbcSlq/L2bGEdiaoHBJ9Y1gSA==", + "peerDependencies": { + "@types/react": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.6.1.tgz", + "integrity": "sha512-CPrzrkiBusCZBLWu0Sg5MJvR3fKJyK3gKecLVX012LULyqg2U64Oz04BKhfkbtBrPBbSQxM+DWW9B1c9hmV9nQ==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "@types/prop-types": "^15.7.4", + "@types/react-is": "^16.7.1 || ^17.0.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2841,6 +3257,15 @@ } } }, + "node_modules/@popperjs/core": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", + "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -3626,6 +4051,22 @@ "@types/react": "*" } }, + "node_modules/@types/react-is": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz", + "integrity": "sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", + "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -5168,6 +5609,14 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clsx": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", + "integrity": "sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -6118,6 +6567,15 @@ "utila": "~0.4" } }, + "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==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -7427,6 +7885,11 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, + "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", @@ -7994,6 +8457,19 @@ "he": "bin/he" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -13495,6 +13971,21 @@ } } }, + "node_modules/react-transition-group": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "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/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -14588,6 +15079,11 @@ "postcss": "^8.2.15" } }, + "node_modules/stylis": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz", + "integrity": "sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==" + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -17520,6 +18016,147 @@ "postcss-value-parser": "^4.2.0" } }, + "@emotion/babel-plugin": { + "version": "11.9.2", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.9.2.tgz", + "integrity": "sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw==", + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/runtime": "^7.13.10", + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.5", + "@emotion/serialize": "^1.0.2", + "babel-plugin-macros": "^2.6.1", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.0.13" + }, + "dependencies": { + "babel-plugin-macros": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "requires": { + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + } + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "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==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@emotion/cache": { + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.7.1.tgz", + "integrity": "sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A==", + "requires": { + "@emotion/memoize": "^0.7.4", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "stylis": "4.0.13" + } + }, + "@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "@emotion/is-prop-valid": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.2.tgz", + "integrity": "sha512-3QnhqeL+WW88YjYbQL5gUIkthuMw7a0NGbZ7wfFVk2kg/CK5w8w5FFa0RzWjyY1+sujN0NWbtSHH6OJmWHtJpQ==", + "requires": { + "@emotion/memoize": "^0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" + }, + "@emotion/react": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.9.0.tgz", + "integrity": "sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.7.1", + "@emotion/cache": "^11.7.1", + "@emotion/serialize": "^1.0.3", + "@emotion/utils": "^1.1.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + } + }, + "@emotion/serialize": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.3.tgz", + "integrity": "sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA==", + "requires": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + } + }, + "@emotion/sheet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" + }, + "@emotion/styled": { + "version": "11.8.1", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.8.1.tgz", + "integrity": "sha512-OghEVAYBZMpEquHZwuelXcRjRJQOVayvbmNR0zr174NHdmMgrNkLC6TljKC5h9lZLkN5WGrdUcrKlOJ4phhoTQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.7.1", + "@emotion/is-prop-valid": "^1.1.2", + "@emotion/serialize": "^1.0.2", + "@emotion/utils": "^1.1.0" + } + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "@emotion/utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.1.0.tgz", + "integrity": "sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ==" + }, + "@emotion/weak-memoize": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" + }, "@eslint/eslintrc": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", @@ -18104,6 +18741,101 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz", "integrity": "sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg==" }, + "@mui/base": { + "version": "5.0.0-alpha.79", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.79.tgz", + "integrity": "sha512-/lZLF027BkiEjM8MIYoeS/FEhTKf+41ePU9SOijMGrCin1Y0Igucw+IHa1fF8HXD7wDbFKqHuso3J1jMG8wyNw==", + "requires": { + "@babel/runtime": "^7.17.2", + "@emotion/is-prop-valid": "^1.1.2", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "@popperjs/core": "^2.11.5", + "clsx": "^1.1.1", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + } + }, + "@mui/icons-material": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.6.2.tgz", + "integrity": "sha512-9QdI7axKuBAyaGz4mtdi7Uy1j73/thqFmEuxpJHxNC7O8ADEK1Da3t2veK2tgmsXsUlAHcAG63gg+GvWWeQNqQ==", + "requires": { + "@babel/runtime": "^7.17.2" + } + }, + "@mui/material": { + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.6.4.tgz", + "integrity": "sha512-7TD+u/SExZK2a55w6reX56oPk37gKr/M/XGt156X+m0d9LhzOsW864nkErIX/H8oSkX/6kCimxu1FDsO+gjiVw==", + "requires": { + "@babel/runtime": "^7.17.2", + "@mui/base": "5.0.0-alpha.79", + "@mui/system": "^5.6.4", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "@types/react-transition-group": "^4.4.4", + "clsx": "^1.1.1", + "csstype": "^3.0.11", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.7.2", + "react-is": "^17.0.2", + "react-transition-group": "^4.4.2" + } + }, + "@mui/private-theming": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.6.2.tgz", + "integrity": "sha512-IbrSfFXfiZdyhRMC2bgGTFtb16RBQ5mccmjeh3MtAERWuepiCK7gkW5D9WhEsfTu6iez+TEjeUKSgmMHlsM2mg==", + "requires": { + "@babel/runtime": "^7.17.2", + "@mui/utils": "^5.6.1", + "prop-types": "^15.7.2" + } + }, + "@mui/styled-engine": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.6.1.tgz", + "integrity": "sha512-jEhH6TBY8jc9S8yVncXmoTYTbATjEu44RMFXj6sIYfKr5NArVwTwRo3JexLL0t3BOAiYM4xsFLgfKEIvB9SAeQ==", + "requires": { + "@babel/runtime": "^7.17.2", + "@emotion/cache": "^11.7.1", + "prop-types": "^15.7.2" + } + }, + "@mui/system": { + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.6.4.tgz", + "integrity": "sha512-7rsWED1wMFMePySJobsBerFZNu7ga580QSi3Zd6sJR8nVj12qD3yIdfvxA70/PxJ/805KbIT0GX7edKI+hpyhA==", + "requires": { + "@babel/runtime": "^7.17.2", + "@mui/private-theming": "^5.6.2", + "@mui/styled-engine": "^5.6.1", + "@mui/types": "^7.1.3", + "@mui/utils": "^5.6.1", + "clsx": "^1.1.1", + "csstype": "^3.0.11", + "prop-types": "^15.7.2" + } + }, + "@mui/types": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.1.3.tgz", + "integrity": "sha512-DDF0UhMBo4Uezlk+6QxrlDbchF79XG6Zs0zIewlR4c0Dt6GKVFfUtzPtHCH1tTbcSlq/L2bGEdiaoHBJ9Y1gSA==", + "requires": {} + }, + "@mui/utils": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.6.1.tgz", + "integrity": "sha512-CPrzrkiBusCZBLWu0Sg5MJvR3fKJyK3gKecLVX012LULyqg2U64Oz04BKhfkbtBrPBbSQxM+DWW9B1c9hmV9nQ==", + "requires": { + "@babel/runtime": "^7.17.2", + "@types/prop-types": "^15.7.4", + "@types/react-is": "^16.7.1 || ^17.0.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -18143,6 +18875,11 @@ "source-map": "^0.7.3" } }, + "@popperjs/core": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", + "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==" + }, "@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -18735,6 +19472,22 @@ "@types/react": "*" } }, + "@types/react-is": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.3.tgz", + "integrity": "sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==", + "requires": { + "@types/react": "*" + } + }, + "@types/react-transition-group": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", + "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", + "requires": { + "@types/react": "*" + } + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -19880,6 +20633,11 @@ "wrap-ansi": "^7.0.0" } }, + "clsx": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz", + "integrity": "sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==" + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -20564,6 +21322,15 @@ "utila": "~0.4" } }, + "dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "requires": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -21535,6 +22302,11 @@ "pkg-dir": "^4.1.0" } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -21915,6 +22687,21 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -25761,6 +26548,17 @@ "workbox-webpack-plugin": "^6.4.1" } }, + "react-transition-group": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -26566,6 +27364,11 @@ "postcss-selector-parser": "^6.0.4" } }, + "stylis": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz", + "integrity": "sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index 1a8b649..3c39c72 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,12 @@ "version": "0.1.0", "private": true, "dependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/base": "^5.0.0-alpha.79", + "@mui/icons-material": "^5.6.2", + "@mui/material": "^5.6.4", + "@mui/system": "^5.6.4", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^13.5.0", diff --git a/src/App.js b/src/App.js index b2ddd70..ca85afa 100644 --- a/src/App.js +++ b/src/App.js @@ -1,39 +1,62 @@ import './App.css'; -import React, {useEffect, useState} from "react"; +import React, {useEffect, useRef, useState} from "react"; +import {Button, TextField} from "@mui/material"; +import SendIcon from '@mui/icons-material/Send'; +import BasicList from "./MessageList"; function App() { - const[messageList, setMessageList] = useState([]); - const[author, setAuthor] = useState(""); - const[message, setMessage] = useState(""); - let idCounter = messageList.length; + const [messageList, setMessageList] = useState([]); + const [author, setAuthor] = useState(""); + const [message, setMessage] = useState(""); + const [chatArray, setChatArray] = useState([]); //массив чатов - useEffect(() => { - if(messageList.length > 0) - setTimeout(() => alert("Message send"), 1500) - }, [messageList]); + let idCounter = messageList.length; + const textfieldRef = useRef(null); - return ( -
- <> - setAuthor(e.target.value)}/> -
- setMessage(e.target.value)}/> -
- + useEffect(() => { + textfieldRef.current?.focus(); + if (messageList.length > 0) + setTimeout(() => alert("Message send"), 1500) + }, [messageList]); - {messageList.map((item) => -

Author: {item.author}
Say: {item.text}

- )} + return ( +
+ + setAuthor(e.target.value)} + inputRef={textfieldRef}/> + setMessage(e.target.value)}/> + - -
- ); + {messageList.map((item) => +

Author: {item.author}
Say: {item.text}

+ )} +
+ ); } export default App; diff --git a/src/MessageList.js b/src/MessageList.js new file mode 100644 index 0000000..5391e92 --- /dev/null +++ b/src/MessageList.js @@ -0,0 +1,35 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import ListItemButton from '@mui/material/ListItemButton'; +import ListItemIcon from '@mui/material/ListItemIcon'; +import ListItemText from '@mui/material/ListItemText'; +import Divider from '@mui/material/Divider'; +import DraftsIcon from '@mui/icons-material/Drafts'; + +export default function BasicList() { + return ( + + + + + + + + + + + + + + + + + + + + + + ); +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index 008d8b9..7f35e74 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; + // const myName = "Sergey"; const root = ReactDOM.createRoot(document.getElementById('root')); From da0d6df6deb84961d5d1dcf1cea249ea92ad05d1 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Mon, 23 May 2022 02:05:21 +0300 Subject: [PATCH 4/9] hw4 --- package-lock.json | 58 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/App.js | 28 +++++++++++++++++++--- src/Chats.js | 48 ++++++++++++++++++++++++++++++++++++++ src/Home.js | 11 +++++++++ src/Message.js | 1 - src/MessageList.js | 35 ---------------------------- src/NotFound.js | 11 +++++++++ src/Profile.js | 11 +++++++++ src/index.js | 12 +++++----- 10 files changed, 171 insertions(+), 45 deletions(-) create mode 100644 src/Chats.js create mode 100644 src/Home.js delete mode 100644 src/MessageList.js create mode 100644 src/NotFound.js create mode 100644 src/Profile.js diff --git a/package-lock.json b/package-lock.json index bf33fee..216b776 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" } @@ -8457,6 +8458,14 @@ "he": "bin/he" } }, + "node_modules/history": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", + "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", + "dependencies": { + "@babel/runtime": "^7.7.6" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -13899,6 +13908,30 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", + "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", + "dependencies": { + "history": "^5.2.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", + "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", + "dependencies": { + "history": "^5.2.0", + "react-router": "6.3.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -22687,6 +22720,14 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, + "history": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", + "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", + "requires": { + "@babel/runtime": "^7.7.6" + } + }, "hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -26493,6 +26534,23 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" }, + "react-router": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", + "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", + "requires": { + "history": "^5.2.0" + } + }, + "react-router-dom": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", + "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", + "requires": { + "history": "^5.2.0", + "react-router": "6.3.0" + } + }, "react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 3c39c72..f646131 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, diff --git a/src/App.js b/src/App.js index ca85afa..f63859b 100644 --- a/src/App.js +++ b/src/App.js @@ -2,7 +2,11 @@ import './App.css'; import React, {useEffect, useRef, useState} from "react"; import {Button, TextField} from "@mui/material"; import SendIcon from '@mui/icons-material/Send'; -import BasicList from "./MessageList"; +import {Link, Route, Routes} from "react-router-dom"; +import Profile from "./Profile"; +import Home from './Home'; +import Chats from './Chats'; +import NotFound from "./NotFound"; function App() { const [messageList, setMessageList] = useState([]); @@ -21,7 +25,19 @@ function App() { return (
- +
+
    +
  • + Home +
  • +
  • + Chats +
  • +
  • + Profile +
  • +
+
Send - {messageList.map((item) =>

Author: {item.author}
Say: {item.text}

)} + + }/> + }/> + }/> + }/> + }/> +
); } diff --git a/src/Chats.js b/src/Chats.js new file mode 100644 index 0000000..348221a --- /dev/null +++ b/src/Chats.js @@ -0,0 +1,48 @@ +import React from 'react'; +import {useParams} from "react-router-dom"; +import Box from "@mui/material/Box"; +import List from "@mui/material/List"; +import ListItem from "@mui/material/ListItem"; +import ListItemIcon from "@mui/material/ListItemIcon"; +import DraftsIcon from "@mui/icons-material/Drafts"; +import ListItemText from "@mui/material/ListItemText"; +import Divider from "@mui/material/Divider"; + +const initialChats = [ + { + name: "Chat1", + messages: { text: "FirstMessage", author: "me" }, + }, + { + name: "Chat2", + messages: { text: "FirstMessageHereToo!", author: "not me" }, + } +]; + +const Chats = (chatsList) => { + const {chatId} = useParams(); + if(!chatId) { + return null; + } + return ( + + + + + + + + + + + + + + + + + + ); +}; + +export default Chats; \ No newline at end of file diff --git a/src/Home.js b/src/Home.js new file mode 100644 index 0000000..54ba806 --- /dev/null +++ b/src/Home.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const Home = () => { + return ( +
+ Home +
+ ); +}; + +export default Home; \ No newline at end of file diff --git a/src/Message.js b/src/Message.js index 92b3da9..175c947 100644 --- a/src/Message.js +++ b/src/Message.js @@ -1,5 +1,4 @@ function Message(props) { return (

{props.text}

); } -//export component export default Message; \ No newline at end of file diff --git a/src/MessageList.js b/src/MessageList.js deleted file mode 100644 index 5391e92..0000000 --- a/src/MessageList.js +++ /dev/null @@ -1,35 +0,0 @@ -import * as React from 'react'; -import Box from '@mui/material/Box'; -import List from '@mui/material/List'; -import ListItem from '@mui/material/ListItem'; -import ListItemButton from '@mui/material/ListItemButton'; -import ListItemIcon from '@mui/material/ListItemIcon'; -import ListItemText from '@mui/material/ListItemText'; -import Divider from '@mui/material/Divider'; -import DraftsIcon from '@mui/icons-material/Drafts'; - -export default function BasicList() { - return ( - - - - - - - - - - - - - - - - - - - - - - ); -} \ No newline at end of file diff --git a/src/NotFound.js b/src/NotFound.js new file mode 100644 index 0000000..be367f9 --- /dev/null +++ b/src/NotFound.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const NotFound = () => { + return ( +
+

Page not found

+
+ ); +}; + +export default NotFound; \ No newline at end of file diff --git a/src/Profile.js b/src/Profile.js new file mode 100644 index 0000000..48c7fed --- /dev/null +++ b/src/Profile.js @@ -0,0 +1,11 @@ +import React from 'react'; + +const Profile = () => { + return ( +
+

Hi there!

+
+ ); +}; + +export default Profile; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 7f35e74..5fe5ddf 100644 --- a/src/index.js +++ b/src/index.js @@ -3,17 +3,17 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; +import {BrowserRouter} from "react-router-dom"; -// const myName = "Sergey"; - const root = ReactDOM.createRoot(document.getElementById('root')); root.render( - - - + + + + + ); - // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals From 938e79bf57b8ab6e25eac926310eeb39581ba81a Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Mon, 30 May 2022 03:03:55 +0300 Subject: [PATCH 5/9] homework5 --- package-lock.json | 123 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 + src/App.js | 43 +++++++++++----- src/Chats.js | 50 +++---------------- src/Home.js | 2 +- src/Profile.js | 4 +- src/counter.js | 26 ++++++++++ src/index.js | 42 +++++++++++++--- 8 files changed, 230 insertions(+), 62 deletions(-) create mode 100644 src/counter.js diff --git a/package-lock.json b/package-lock.json index 216b776..3d68a69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,10 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-redux": "^8.0.2", "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", + "redux": "^4.2.0", "web-vitals": "^2.1.4" } }, @@ -3941,6 +3943,15 @@ "@types/node": "*" } }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -4129,6 +4140,11 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, "node_modules/@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", @@ -13900,6 +13916,49 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "node_modules/react-redux": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.2.tgz", + "integrity": "sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA==", + "dependencies": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^16.8 || ^17.0 || ^18.0", + "@types/react-dom": "^16.8 || ^17.0 || ^18.0", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0", + "react-native": ">=0.59", + "redux": "^4" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/react-redux/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==" + }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -14077,6 +14136,14 @@ "node": ">=8" } }, + "node_modules/redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -15772,6 +15839,14 @@ "punycode": "^2.1.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -19394,6 +19469,15 @@ "@types/node": "*" } }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "@types/html-minifier-terser": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", @@ -19582,6 +19666,11 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, + "@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, "@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", @@ -26529,6 +26618,26 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "react-redux": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.0.2.tgz", + "integrity": "sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA==", + "requires": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "dependencies": { + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==" + } + } + }, "react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -26662,6 +26771,14 @@ "strip-indent": "^3.0.0" } }, + "redux": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "requires": { + "@babel/runtime": "^7.9.2" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -27921,6 +28038,12 @@ "punycode": "^2.1.0" } }, + "use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index f646131..224838f 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "@testing-library/user-event": "^13.5.0", "react": "^18.1.0", "react-dom": "^18.1.0", + "react-redux": "^8.0.2", "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", + "redux": "^4.2.0", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/App.js b/src/App.js index f63859b..f93d43f 100644 --- a/src/App.js +++ b/src/App.js @@ -7,6 +7,12 @@ import Profile from "./Profile"; import Home from './Home'; import Chats from './Chats'; import NotFound from "./NotFound"; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import ListItemButton from '@mui/material/ListItemButton'; +import ListItemText from '@mui/material/ListItemText'; +import Divider from '@mui/material/Divider'; +import FolderIcon from '@mui/icons-material/Folder'; function App() { const [messageList, setMessageList] = useState([]); @@ -25,19 +31,12 @@ function App() { return (
-
-
    -
  • +
  • -
  • Chats -
  • -
  • Profile -
  • -
-
+ }/> - }/> - }/> + }> + }/> + }/> }/> + + Chats List} style={{maxWidth: '360px', backgroundColor:'greenyellow'}}> + {chatArray.map((item) => { + return( + <> + + + + + №{chatArray.indexOf(item)} Name: {item.name}

} + secondary={

Chat Id: {item.id}

}/> +
+
+ + + + ) + }) +}
); } diff --git a/src/Chats.js b/src/Chats.js index 348221a..3a6c4d7 100644 --- a/src/Chats.js +++ b/src/Chats.js @@ -1,48 +1,14 @@ import React from 'react'; import {useParams} from "react-router-dom"; -import Box from "@mui/material/Box"; -import List from "@mui/material/List"; -import ListItem from "@mui/material/ListItem"; -import ListItemIcon from "@mui/material/ListItemIcon"; -import DraftsIcon from "@mui/icons-material/Drafts"; -import ListItemText from "@mui/material/ListItemText"; -import Divider from "@mui/material/Divider"; -const initialChats = [ - { - name: "Chat1", - messages: { text: "FirstMessage", author: "me" }, - }, - { - name: "Chat2", - messages: { text: "FirstMessageHereToo!", author: "not me" }, - } -]; - -const Chats = (chatsList) => { - const {chatId} = useParams(); - if(!chatId) { - return null; - } - return ( - - - - - - - - - - - - - - - - - - ); +const Chats = ({messages}) => { + const params = useParams(); + const prodId = params.id; + const chatMessage = messages.find(p => p.id == prodId); + if(chatMessage === undefined) + return

Messages List is empty

; + else + return

{chatMessage.text}

; }; export default Chats; \ No newline at end of file diff --git a/src/Home.js b/src/Home.js index 54ba806..92d7aee 100644 --- a/src/Home.js +++ b/src/Home.js @@ -3,7 +3,7 @@ import React from 'react'; const Home = () => { return (
- Home +

Welcome

); }; diff --git a/src/Profile.js b/src/Profile.js index 48c7fed..ae03ebf 100644 --- a/src/Profile.js +++ b/src/Profile.js @@ -1,9 +1,11 @@ import React from 'react'; +import Counter from "./counter"; const Profile = () => { return (
-

Hi there!

+

Hi there!

+
); }; diff --git a/src/counter.js b/src/counter.js new file mode 100644 index 0000000..7f5676f --- /dev/null +++ b/src/counter.js @@ -0,0 +1,26 @@ +import React from 'react'; +import {useDispatch, useSelector} from 'react-redux'; + +const Counter = () => { + const counter = useSelector(state => state.count); + const dispatch = useDispatch(); + const increase = () => { + dispatch({type: 'increase'}); + }; + const decrease = () => { + dispatch({type: 'decrease'}); + }; + const reset = () => { + dispatch({type: 'reset'}) + }; + return ( +
+

{counter}

+ + + +
+ ); +}; + +export default Counter; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 5fe5ddf..8a5ae3a 100644 --- a/src/index.js +++ b/src/index.js @@ -4,15 +4,45 @@ import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; import {BrowserRouter} from "react-router-dom"; - +import {createStore} from 'redux'; +import {Provider} from "react-redux"; const root = ReactDOM.createRoot(document.getElementById('root')); +const initialState = { + count: 0 +}; +const reducer = (state = initialState, action) => { + switch (action.type) { + case 'increase': + return { + ...state, + count: state.count + 1 + }; + case 'decrease': + return { + ...state, + count: state.count - 1 + }; + case 'reset': + return { + ...state, + count: state.count = 0 + }; + default: + return state; + } +}; + +const store = createStore(reducer); root.render( - - - - - + + + + + + + + ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) From 8b421e7aab0a5ef9c906a16c16c31fd74d6ee867 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Fri, 3 Jun 2022 02:41:33 +0300 Subject: [PATCH 6/9] hw 6 not complete --- src/App.test.js | 8 --- src/Chats.js | 14 ----- src/Message.js | 4 -- src/NotFound.js | 11 ---- src/Profile.js | 13 ----- src/components/App.jsx | 30 ++++++++++ src/components/Chats.jsx | 30 ++++++++++ src/{Home.js => components/Home.jsx} | 6 +- src/components/Messages.jsx | 57 +++++++++++++++++++ src/components/NotFound.jsx | 9 +++ src/components/Profile.jsx | 9 +++ src/{App.js => components/yhde.ks} | 34 +---------- src/counter.js | 26 --------- src/{ => css}/App.css | 0 src/{ => css}/index.css | 0 src/index.js | 37 ++---------- src/logo.svg | 1 - src/redux/actions/actionTypes.js | 5 ++ src/redux/configureStore.js | 9 +++ .../reducers/chatsReducer/chatsReducer.js | 31 ++++++++++ src/redux/reducers/chatsReducer/selectors.js | 1 + .../messagesReducer/messagesReducer.js | 46 +++++++++++++++ .../reducers/messagesReducer/selectors.js | 1 + src/reportWebVitals.js | 13 ----- src/setupTests.js | 5 -- 25 files changed, 237 insertions(+), 163 deletions(-) delete mode 100644 src/App.test.js delete mode 100644 src/Chats.js delete mode 100644 src/Message.js delete mode 100644 src/NotFound.js delete mode 100644 src/Profile.js create mode 100644 src/components/App.jsx create mode 100644 src/components/Chats.jsx rename src/{Home.js => components/Home.jsx} (70%) create mode 100644 src/components/Messages.jsx create mode 100644 src/components/NotFound.jsx create mode 100644 src/components/Profile.jsx rename src/{App.js => components/yhde.ks} (72%) delete mode 100644 src/counter.js rename src/{ => css}/App.css (100%) rename src/{ => css}/index.css (100%) delete mode 100644 src/logo.svg create mode 100644 src/redux/actions/actionTypes.js create mode 100644 src/redux/configureStore.js create mode 100644 src/redux/reducers/chatsReducer/chatsReducer.js create mode 100644 src/redux/reducers/chatsReducer/selectors.js create mode 100644 src/redux/reducers/messagesReducer/messagesReducer.js create mode 100644 src/redux/reducers/messagesReducer/selectors.js delete mode 100644 src/reportWebVitals.js delete mode 100644 src/setupTests.js diff --git a/src/App.test.js b/src/App.test.js deleted file mode 100644 index 1f03afe..0000000 --- a/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/Chats.js b/src/Chats.js deleted file mode 100644 index 3a6c4d7..0000000 --- a/src/Chats.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import {useParams} from "react-router-dom"; - -const Chats = ({messages}) => { - const params = useParams(); - const prodId = params.id; - const chatMessage = messages.find(p => p.id == prodId); - if(chatMessage === undefined) - return

Messages List is empty

; - else - return

{chatMessage.text}

; -}; - -export default Chats; \ No newline at end of file diff --git a/src/Message.js b/src/Message.js deleted file mode 100644 index 175c947..0000000 --- a/src/Message.js +++ /dev/null @@ -1,4 +0,0 @@ -function Message(props) { - return (

{props.text}

); -} -export default Message; \ No newline at end of file diff --git a/src/NotFound.js b/src/NotFound.js deleted file mode 100644 index be367f9..0000000 --- a/src/NotFound.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -const NotFound = () => { - return ( -
-

Page not found

-
- ); -}; - -export default NotFound; \ No newline at end of file diff --git a/src/Profile.js b/src/Profile.js deleted file mode 100644 index ae03ebf..0000000 --- a/src/Profile.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import Counter from "./counter"; - -const Profile = () => { - return ( -
-

Hi there!

- -
- ); -}; - -export default Profile; \ No newline at end of file diff --git a/src/components/App.jsx b/src/components/App.jsx new file mode 100644 index 0000000..7cac468 --- /dev/null +++ b/src/components/App.jsx @@ -0,0 +1,30 @@ +import '../css/App.css'; +import React from "react"; +import {Link, Route, Routes} from "react-router-dom"; +import {Chats} from './Chats'; +import {Messages} from "./Messages"; +import {Profile} from "./Profile"; +import {NotFound} from "./NotFound"; +import {Home} from "./Home"; + +export default function App() { + + return ( +
+ + + }/> + }/> + }/> + }/> + }/> + +
+ ); +} diff --git a/src/components/Chats.jsx b/src/components/Chats.jsx new file mode 100644 index 0000000..6e73de4 --- /dev/null +++ b/src/components/Chats.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import {Link} from "react-router-dom"; +import {useDispatch, useSelector} from "react-redux"; +import {chatsSelector} from "../redux/reducers/chatsReducer/selectors"; +import {DELETE_CHAT, DELETE_MESSAGE_WITH_CHAT} from "../redux/actions/actionTypes"; + +export const Chats = () => { + const chats = useSelector(chatsSelector); + const dispatch = useDispatch(); + const deleteChat = (id) => { + dispatch({type: DELETE_CHAT, payload: id}) + dispatch({type: DELETE_MESSAGE_WITH_CHAT, payload: id}) + }; + + return ( +
+ {chats.map((item) => { + return ( +
+ + ID {item.id} NAME {item.name} + + +
+ ) + }) + } +
+ ) +}; \ No newline at end of file diff --git a/src/Home.js b/src/components/Home.jsx similarity index 70% rename from src/Home.js rename to src/components/Home.jsx index 92d7aee..50d342d 100644 --- a/src/Home.js +++ b/src/components/Home.jsx @@ -1,11 +1,9 @@ import React from 'react'; -const Home = () => { +export const Home = () => { return (

Welcome

); -}; - -export default Home; \ No newline at end of file +}; \ No newline at end of file diff --git a/src/components/Messages.jsx b/src/components/Messages.jsx new file mode 100644 index 0000000..b5e566e --- /dev/null +++ b/src/components/Messages.jsx @@ -0,0 +1,57 @@ +import React, {useState} from 'react'; +import {useDispatch, useSelector} from "react-redux"; +import {messagesSelector} from "../redux/reducers/messagesReducer/selectors"; +import {useParams} from "react-router-dom"; +import {ADD_CHAT, ADD_MESSAGE, DELETE_MESSAGE} from "../redux/actions/actionTypes"; + +export const Messages = () => { + const {chatIds} = useParams(); + const dispatch = useDispatch(); + const messages = useSelector(messagesSelector); + const [inputAuthor, setInputAuthor] = useState(''); + const [inputMessage, setInputMessage] = useState(''); + const message = messages.filter(() => { + if(!chatIds) + return true; + return message.chatId ===+chatIds; + }); + const deleteMessage = (id) => { + dispatch({type: DELETE_MESSAGE, payload: id}) + }; + const addMessage = () => { + const random = Math.random(); + const mess = { + id: random, + chatId: chatIds, + author: inputAuthor, + say: inputMessage + }; + const chatAdd = { + id: messages.length, + name: inputAuthor + }; + console.log(chatIds); + dispatch({type: ADD_MESSAGE, payload: mess}); + dispatch({type: ADD_CHAT, payload: chatAdd}) + }; + return ( +
+ setInputAuthor(e.target.value)}/> + setInputMessage(e.target.value)}/> + + { + message.map((item) => { + return ( +
+

{item.id}

+

{item.chatId}

+

{item.author}

+

{item.say}

+ +
+ ) + }) + } +
+ ); +} diff --git a/src/components/NotFound.jsx b/src/components/NotFound.jsx new file mode 100644 index 0000000..2cd97de --- /dev/null +++ b/src/components/NotFound.jsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export const NotFound = () => { + return ( +
+

Page not found

+
+ ); +}; \ No newline at end of file diff --git a/src/components/Profile.jsx b/src/components/Profile.jsx new file mode 100644 index 0000000..76bd762 --- /dev/null +++ b/src/components/Profile.jsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export const Profile = () => { + return ( +
+

This is Profile page

+
+ ); +}; \ No newline at end of file diff --git a/src/App.js b/src/components/yhde.ks similarity index 72% rename from src/App.js rename to src/components/yhde.ks index f93d43f..94e9616 100644 --- a/src/App.js +++ b/src/components/yhde.ks @@ -1,20 +1,4 @@ -import './App.css'; -import React, {useEffect, useRef, useState} from "react"; -import {Button, TextField} from "@mui/material"; -import SendIcon from '@mui/icons-material/Send'; -import {Link, Route, Routes} from "react-router-dom"; -import Profile from "./Profile"; -import Home from './Home'; -import Chats from './Chats'; -import NotFound from "./NotFound"; -import List from '@mui/material/List'; -import ListItem from '@mui/material/ListItem'; -import ListItemButton from '@mui/material/ListItemButton'; -import ListItemText from '@mui/material/ListItemText'; -import Divider from '@mui/material/Divider'; -import FolderIcon from '@mui/icons-material/Folder'; - -function App() { +const messages = useSelector(state => state.id); const [messageList, setMessageList] = useState([]); const [author, setAuthor] = useState(""); const [message, setMessage] = useState(""); @@ -29,14 +13,7 @@ function App() { setTimeout(() => alert("Message send"), 1500) }, [messageList]); - return ( -
- + ) }) -} -
- ); -} - -export default App; +} \ No newline at end of file diff --git a/src/counter.js b/src/counter.js deleted file mode 100644 index 7f5676f..0000000 --- a/src/counter.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import {useDispatch, useSelector} from 'react-redux'; - -const Counter = () => { - const counter = useSelector(state => state.count); - const dispatch = useDispatch(); - const increase = () => { - dispatch({type: 'increase'}); - }; - const decrease = () => { - dispatch({type: 'decrease'}); - }; - const reset = () => { - dispatch({type: 'reset'}) - }; - return ( -
-

{counter}

- - - -
- ); -}; - -export default Counter; \ No newline at end of file diff --git a/src/App.css b/src/css/App.css similarity index 100% rename from src/App.css rename to src/css/App.css diff --git a/src/index.css b/src/css/index.css similarity index 100% rename from src/index.css rename to src/css/index.css diff --git a/src/index.js b/src/index.js index 8a5ae3a..1a5a1bb 100644 --- a/src/index.js +++ b/src/index.js @@ -1,39 +1,13 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import './css/index.css'; +import App from './components/App'; import {BrowserRouter} from "react-router-dom"; -import {createStore} from 'redux'; import {Provider} from "react-redux"; +import {store} from "./redux/configureStore"; const root = ReactDOM.createRoot(document.getElementById('root')); -const initialState = { - count: 0 -}; -const reducer = (state = initialState, action) => { - switch (action.type) { - case 'increase': - return { - ...state, - count: state.count + 1 - }; - case 'decrease': - return { - ...state, - count: state.count - 1 - }; - case 'reset': - return { - ...state, - count: state.count = 0 - }; - default: - return state; - } -}; -const store = createStore(reducer); root.render( @@ -44,7 +18,4 @@ root.render( ); -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); + diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/redux/actions/actionTypes.js b/src/redux/actions/actionTypes.js new file mode 100644 index 0000000..490cd50 --- /dev/null +++ b/src/redux/actions/actionTypes.js @@ -0,0 +1,5 @@ +export const ADD_MESSAGE = "ADD_MESSAGE"; +export const DELETE_MESSAGE = "DELETE_MESSAGE"; +export const DELETE_MESSAGE_WITH_CHAT = "DELETE_MESSAGE_WITH_CHAT"; +export const DELETE_CHAT = "DELETE_CHAT"; +export const ADD_CHAT = "ADD_CHAT"; \ No newline at end of file diff --git a/src/redux/configureStore.js b/src/redux/configureStore.js new file mode 100644 index 0000000..b8126ad --- /dev/null +++ b/src/redux/configureStore.js @@ -0,0 +1,9 @@ +import {combineReducers, createStore} from "redux"; +import {chatsReducer} from "./reducers/chatsReducer/chatsReducer"; +import {messagesReducer} from "./reducers/messagesReducer/messagesReducer"; + +export const store = createStore(combineReducers({ + chats: chatsReducer, + messages: messagesReducer} + ) +); \ No newline at end of file diff --git a/src/redux/reducers/chatsReducer/chatsReducer.js b/src/redux/reducers/chatsReducer/chatsReducer.js new file mode 100644 index 0000000..31dbf80 --- /dev/null +++ b/src/redux/reducers/chatsReducer/chatsReducer.js @@ -0,0 +1,31 @@ +import {DELETE_CHAT, ADD_CHAT} from "../../actions/actionTypes"; + +const initialState = { + chats: [ + { + id: 0, + name: 'Ivan' + }, + { + id: 1, + name: 'Fedor' + } + ] +}; + +export const chatsReducer = (state = initialState, action) => { + switch (action.type) { + case DELETE_CHAT: + return { + ...state, + chats: state.chats.filter(item => item.id !== action.payload) + }; + case ADD_CHAT: + return { + ...state, + chats: [...state.chats, action.payload] + }; + default: + return state; + } +} \ No newline at end of file diff --git a/src/redux/reducers/chatsReducer/selectors.js b/src/redux/reducers/chatsReducer/selectors.js new file mode 100644 index 0000000..806d0a8 --- /dev/null +++ b/src/redux/reducers/chatsReducer/selectors.js @@ -0,0 +1 @@ +export const chatsSelector = state => state.chats.chats; \ No newline at end of file diff --git a/src/redux/reducers/messagesReducer/messagesReducer.js b/src/redux/reducers/messagesReducer/messagesReducer.js new file mode 100644 index 0000000..dc278ff --- /dev/null +++ b/src/redux/reducers/messagesReducer/messagesReducer.js @@ -0,0 +1,46 @@ +import {ADD_MESSAGE, DELETE_MESSAGE, DELETE_MESSAGE_WITH_CHAT} from "../../actions/actionTypes"; + +const initialState = { + messages: [ + { + id: 0, + chatId: 0, + author: "Ivan", + say: "Hi" + }, + { + id: 1, + chatId: 1, + author: "Fedor", + say: "Good morning" + }, + { + id: 2, + chatId: 0, + author: "Andrey", + say: "Hello" + } + ] +}; + +export const messagesReducer = (state = initialState, action) => { + switch (action.type) { + case ADD_MESSAGE: + return { + ...state, + messages: [...state.messages, action.payload] + }; + case DELETE_MESSAGE: + return { + ...state, + messages: state.messages.filter(item => item.id !== action.payload) + }; + case DELETE_MESSAGE_WITH_CHAT: + return { + ...state, + messages: state.messages.filter(item => item.chatId !== action.payload) + }; + default: + return state; + } +} \ No newline at end of file diff --git a/src/redux/reducers/messagesReducer/selectors.js b/src/redux/reducers/messagesReducer/selectors.js new file mode 100644 index 0000000..e134b33 --- /dev/null +++ b/src/redux/reducers/messagesReducer/selectors.js @@ -0,0 +1 @@ +export const messagesSelector = state => state.messages.messages; \ No newline at end of file diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js deleted file mode 100644 index 5253d3a..0000000 --- a/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/src/setupTests.js b/src/setupTests.js deleted file mode 100644 index 8f2609b..0000000 --- a/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; From d08d0f853d0acb6324b95b4e56c138f4db10fc47 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Sun, 5 Jun 2022 03:46:04 +0300 Subject: [PATCH 7/9] hw7 --- package-lock.json | 27 +++++++++++++ package.json | 1 + src/components/Chats.jsx | 6 +-- src/components/Messages.jsx | 11 +++--- src/components/yhde.ks | 75 ------------------------------------ src/redux/actions/actions.js | 24 ++++++++++++ src/redux/configureStore.js | 24 +++++++++++- 7 files changed, 82 insertions(+), 86 deletions(-) delete mode 100644 src/components/yhde.ks create mode 100644 src/redux/actions/actions.js diff --git a/package-lock.json b/package-lock.json index 3d68a69..71c2df7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "redux": "^4.2.0", + "redux-logger": "^3.0.6", "web-vitals": "^2.1.4" } }, @@ -6380,6 +6381,11 @@ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" }, + "node_modules/deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha512-yVn6RZmHiGnxRKR9sJb3iVV2XTF1Ghh2DiWRZ3dMnGc43yUdWWF/kX6lQyk3+P84iprfWKU/8zFTrlkvtFm1ug==" + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -14144,6 +14150,14 @@ "@babel/runtime": "^7.9.2" } }, + "node_modules/redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "dependencies": { + "deep-diff": "^0.3.5" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -21291,6 +21305,11 @@ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" }, + "deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha512-yVn6RZmHiGnxRKR9sJb3iVV2XTF1Ghh2DiWRZ3dMnGc43yUdWWF/kX6lQyk3+P84iprfWKU/8zFTrlkvtFm1ug==" + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -26779,6 +26798,14 @@ "@babel/runtime": "^7.9.2" } }, + "redux-logger": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha1-91VZZvMJjzyIYExEnPC69XeCdL8=", + "requires": { + "deep-diff": "^0.3.5" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", diff --git a/package.json b/package.json index 224838f..37e2368 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "redux": "^4.2.0", + "redux-logger": "^3.0.6", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/components/Chats.jsx b/src/components/Chats.jsx index 6e73de4..2258f6b 100644 --- a/src/components/Chats.jsx +++ b/src/components/Chats.jsx @@ -2,14 +2,14 @@ import React from 'react'; import {Link} from "react-router-dom"; import {useDispatch, useSelector} from "react-redux"; import {chatsSelector} from "../redux/reducers/chatsReducer/selectors"; -import {DELETE_CHAT, DELETE_MESSAGE_WITH_CHAT} from "../redux/actions/actionTypes"; +import {deleteChats, deleteChatsWithMessages} from "../redux/actions/actions"; export const Chats = () => { const chats = useSelector(chatsSelector); const dispatch = useDispatch(); const deleteChat = (id) => { - dispatch({type: DELETE_CHAT, payload: id}) - dispatch({type: DELETE_MESSAGE_WITH_CHAT, payload: id}) + dispatch(deleteChats(id)); + dispatch(deleteChatsWithMessages(id)) }; return ( diff --git a/src/components/Messages.jsx b/src/components/Messages.jsx index b5e566e..d74fb59 100644 --- a/src/components/Messages.jsx +++ b/src/components/Messages.jsx @@ -2,7 +2,7 @@ import React, {useState} from 'react'; import {useDispatch, useSelector} from "react-redux"; import {messagesSelector} from "../redux/reducers/messagesReducer/selectors"; import {useParams} from "react-router-dom"; -import {ADD_CHAT, ADD_MESSAGE, DELETE_MESSAGE} from "../redux/actions/actionTypes"; +import {addChats, addMessages, deleteMessages} from "../redux/actions/actions"; export const Messages = () => { const {chatIds} = useParams(); @@ -10,13 +10,13 @@ export const Messages = () => { const messages = useSelector(messagesSelector); const [inputAuthor, setInputAuthor] = useState(''); const [inputMessage, setInputMessage] = useState(''); - const message = messages.filter(() => { + const message = messages.filter((message) => { if(!chatIds) return true; return message.chatId ===+chatIds; }); const deleteMessage = (id) => { - dispatch({type: DELETE_MESSAGE, payload: id}) + dispatch(deleteMessages(id)) }; const addMessage = () => { const random = Math.random(); @@ -30,9 +30,8 @@ export const Messages = () => { id: messages.length, name: inputAuthor }; - console.log(chatIds); - dispatch({type: ADD_MESSAGE, payload: mess}); - dispatch({type: ADD_CHAT, payload: chatAdd}) + dispatch(addMessages(mess)); + dispatch(addChats(chatAdd)) }; return (
diff --git a/src/components/yhde.ks b/src/components/yhde.ks deleted file mode 100644 index 94e9616..0000000 --- a/src/components/yhde.ks +++ /dev/null @@ -1,75 +0,0 @@ -const messages = useSelector(state => state.id); - const [messageList, setMessageList] = useState([]); - const [author, setAuthor] = useState(""); - const [message, setMessage] = useState(""); - const [chatArray, setChatArray] = useState([]); //массив чатов - - let idCounter = messageList.length; - const textfieldRef = useRef(null); - - useEffect(() => { - textfieldRef.current?.focus(); - if (messageList.length > 0) - setTimeout(() => alert("Message send"), 1500) - }, [messageList]); - - - setAuthor(e.target.value)} - inputRef={textfieldRef}/> - setMessage(e.target.value)}/> - - {messageList.map((item) => -

Author: {item.author}
Say: {item.text}

- )} - - }/> - }> - }/> - - }/> - }/> - - - Chats List} style={{maxWidth: '360px', backgroundColor:'greenyellow'}}> - {chatArray.map((item) => { - return( - <> - - - - - №{chatArray.indexOf(item)} Name: {item.name}

} - secondary={

Chat Id: {item.id}

}/> -
-
- - - - ) - }) -}
\ No newline at end of file diff --git a/src/redux/actions/actions.js b/src/redux/actions/actions.js new file mode 100644 index 0000000..509b123 --- /dev/null +++ b/src/redux/actions/actions.js @@ -0,0 +1,24 @@ +import {ADD_CHAT, ADD_MESSAGE, DELETE_CHAT, DELETE_MESSAGE, DELETE_MESSAGE_WITH_CHAT} from "./actionTypes"; + +export const deleteMessages = (id) => ({ + type: DELETE_MESSAGE, payload: id, meta: { + delay: 1500 + } +}); + +export const addMessages = (mess) => ({ + type: ADD_MESSAGE, payload: mess +}); + + +export const addChats = (chat) => ({ + type: ADD_CHAT, payload: chat +}); + +export const deleteChats = (chatId) => ({ + type: DELETE_CHAT, payload: chatId +}); + +export const deleteChatsWithMessages = (chatId) => ({ + type: DELETE_MESSAGE_WITH_CHAT, payload: chatId +}); \ No newline at end of file diff --git a/src/redux/configureStore.js b/src/redux/configureStore.js index b8126ad..e065db2 100644 --- a/src/redux/configureStore.js +++ b/src/redux/configureStore.js @@ -1,9 +1,29 @@ -import {combineReducers, createStore} from "redux"; +import {applyMiddleware, combineReducers, createStore} from "redux"; import {chatsReducer} from "./reducers/chatsReducer/chatsReducer"; import {messagesReducer} from "./reducers/messagesReducer/messagesReducer"; +import {createLogger} from "redux-logger/src"; + +const confirmDeleteMessage = store => next => action => { + const delay = action?.meta?.delay; + if(!delay) { + return next(action); + } + + const timeOut = setTimeout(() => { + next(action); + window.confirm("Are you really want to delete this message?") + }, delay); + + return () => clearTimeout(timeOut); +} + +const logger = createLogger({ + diff: true, + collapsed: true +}) export const store = createStore(combineReducers({ chats: chatsReducer, messages: messagesReducer} - ) + ), applyMiddleware(confirmDeleteMessage, logger) ); \ No newline at end of file From faaa5bfdf1ecb2d32ac07049fbdaa7e6a42ec45f Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Wed, 8 Jun 2022 03:30:55 +0300 Subject: [PATCH 8/9] hw8 --- package-lock.json | 15 ++++++ package.json | 1 + src/components/Home.jsx | 38 ++++++++++++++- src/redux/actions/actionTypes.js | 5 +- src/redux/actions/actions.js | 22 ++++++++- src/redux/configureStore.js | 11 +++-- src/redux/reducers/userReducer/selectors.js | 3 ++ src/redux/reducers/userReducer/userReducer.js | 47 +++++++++++++++++++ 8 files changed, 135 insertions(+), 7 deletions(-) create mode 100644 src/redux/reducers/userReducer/selectors.js create mode 100644 src/redux/reducers/userReducer/userReducer.js diff --git a/package-lock.json b/package-lock.json index 71c2df7..7ffb878 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "react-scripts": "5.0.1", "redux": "^4.2.0", "redux-logger": "^3.0.6", + "redux-thunk": "^2.4.1", "web-vitals": "^2.1.4" } }, @@ -14158,6 +14159,14 @@ "deep-diff": "^0.3.5" } }, + "node_modules/redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "peerDependencies": { + "redux": "^4" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -26806,6 +26815,12 @@ "deep-diff": "^0.3.5" } }, + "redux-thunk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.1.tgz", + "integrity": "sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q==", + "requires": {} + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", diff --git a/package.json b/package.json index 37e2368..e51bdec 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "react-scripts": "5.0.1", "redux": "^4.2.0", "redux-logger": "^3.0.6", + "redux-thunk": "^2.4.1", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/components/Home.jsx b/src/components/Home.jsx index 50d342d..fe6c85b 100644 --- a/src/components/Home.jsx +++ b/src/components/Home.jsx @@ -1,9 +1,45 @@ -import React from 'react'; +import React, {useEffect} from 'react'; +import {useDispatch, useSelector} from "react-redux"; +import {errorSelector, loadingSelector, usersSelector} from "../redux/reducers/userReducer/selectors"; +import {loadUsers} from "../redux/reducers/userReducer/userReducer"; export const Home = () => { + const users = useSelector(usersSelector); + const loading = useSelector(loadingSelector); + const error = useSelector(errorSelector); + const dispatch = useDispatch(); + + useEffect(() => { + dispatch(loadUsers()) + }, []); + + const errorHandler = () => { + dispatch(loadUsers()) + }; + + if(loading) { + return ( +

Loading, please wait...

+ ) + } + + if(error) { + return ( +
+

Ouch, we take error, repeat?

+ +
+ ) + } + return (

Welcome

+ {users.map((user) => +
+ {user.name} +
+ )}
); }; \ No newline at end of file diff --git a/src/redux/actions/actionTypes.js b/src/redux/actions/actionTypes.js index 490cd50..17bed41 100644 --- a/src/redux/actions/actionTypes.js +++ b/src/redux/actions/actionTypes.js @@ -2,4 +2,7 @@ export const ADD_MESSAGE = "ADD_MESSAGE"; export const DELETE_MESSAGE = "DELETE_MESSAGE"; export const DELETE_MESSAGE_WITH_CHAT = "DELETE_MESSAGE_WITH_CHAT"; export const DELETE_CHAT = "DELETE_CHAT"; -export const ADD_CHAT = "ADD_CHAT"; \ No newline at end of file +export const ADD_CHAT = "ADD_CHAT"; +export const LOAD_USERS = "LOAD_USERS"; +export const LOADING = "LOADING"; +export const ERROR = "ERROR"; \ No newline at end of file diff --git a/src/redux/actions/actions.js b/src/redux/actions/actions.js index 509b123..57d5801 100644 --- a/src/redux/actions/actions.js +++ b/src/redux/actions/actions.js @@ -1,4 +1,12 @@ -import {ADD_CHAT, ADD_MESSAGE, DELETE_CHAT, DELETE_MESSAGE, DELETE_MESSAGE_WITH_CHAT} from "./actionTypes"; +import { + ADD_CHAT, + ADD_MESSAGE, + DELETE_CHAT, + DELETE_MESSAGE, + DELETE_MESSAGE_WITH_CHAT, + ERROR, + LOAD_USERS, LOADING +} from "./actionTypes"; export const deleteMessages = (id) => ({ type: DELETE_MESSAGE, payload: id, meta: { @@ -21,4 +29,16 @@ export const deleteChats = (chatId) => ({ export const deleteChatsWithMessages = (chatId) => ({ type: DELETE_MESSAGE_WITH_CHAT, payload: chatId +}); + +export const loadUsersAction = (data) => ({ + type: LOAD_USERS, payload: data +}); + +export const loadingAction = () => ({ + type: LOADING +}); + +export const errorAction = (e) => ({ + type: ERROR, payload: e }); \ No newline at end of file diff --git a/src/redux/configureStore.js b/src/redux/configureStore.js index e065db2..1ca8eb2 100644 --- a/src/redux/configureStore.js +++ b/src/redux/configureStore.js @@ -2,6 +2,8 @@ import {applyMiddleware, combineReducers, createStore} from "redux"; import {chatsReducer} from "./reducers/chatsReducer/chatsReducer"; import {messagesReducer} from "./reducers/messagesReducer/messagesReducer"; import {createLogger} from "redux-logger/src"; +import {userReducer} from "./reducers/userReducer/userReducer"; +import thunk from "redux-thunk"; const confirmDeleteMessage = store => next => action => { const delay = action?.meta?.delay; @@ -15,15 +17,16 @@ const confirmDeleteMessage = store => next => action => { }, delay); return () => clearTimeout(timeOut); -} +}; const logger = createLogger({ diff: true, collapsed: true -}) +}); export const store = createStore(combineReducers({ chats: chatsReducer, - messages: messagesReducer} - ), applyMiddleware(confirmDeleteMessage, logger) + messages: messagesReducer, + users: userReducer} + ), applyMiddleware(thunk, confirmDeleteMessage, logger) ); \ No newline at end of file diff --git a/src/redux/reducers/userReducer/selectors.js b/src/redux/reducers/userReducer/selectors.js new file mode 100644 index 0000000..50e4ce1 --- /dev/null +++ b/src/redux/reducers/userReducer/selectors.js @@ -0,0 +1,3 @@ +export const usersSelector = state => state.users.users; +export const loadingSelector = state => state.users.loading; +export const errorSelector = state => state.users.error; \ No newline at end of file diff --git a/src/redux/reducers/userReducer/userReducer.js b/src/redux/reducers/userReducer/userReducer.js new file mode 100644 index 0000000..adf4e86 --- /dev/null +++ b/src/redux/reducers/userReducer/userReducer.js @@ -0,0 +1,47 @@ +import {ERROR, LOAD_USERS, LOADING} from "../../actions/actionTypes"; +import {errorAction, loadingAction, loadUsersAction} from "../../actions/actions"; + +const initialState = { + users: [], + loading: false, + error: null +}; + +export const userReducer = (state = initialState, action) => { + switch (action.type) { + case LOADING: + return { + ...state, + loading: true + }; + + case LOAD_USERS: + return { + ...state, + users: action.payload, + loading: false + }; + case ERROR: + return { + ...state, + loading: false, + error: action.payload + } + + default: + return state; + } +} + +export const loadUsers = () => { + return async dispatch => { + dispatch(loadingAction()); + try{ + const response = await fetch("https://jsonplaceholder.typicode.com/users"); + const data = await response.json(); + dispatch (loadUsersAction(data)) + } catch (e) { + dispatch(errorAction(e)); + } + } +} \ No newline at end of file From 8ef13b727dd0fb6601a29a4d6d1888fecce14a78 Mon Sep 17 00:00:00 2001 From: Sergey Lebedev Date: Tue, 21 Jun 2022 03:01:13 +0300 Subject: [PATCH 9/9] hw9 --- package-lock.json | 1479 ++++++++++++++++- package.json | 1 + src/components/App.jsx | 38 +- src/components/Chats.jsx | 30 - src/components/Home.jsx | 53 +- src/components/Login.jsx | 40 + src/components/Messages.jsx | 56 - src/components/NotFound.jsx | 9 - src/components/Profile.jsx | 9 - src/components/Register.jsx | 56 + src/css/App.css | 38 - src/css/index.css | 13 - src/firebase.js | 17 + src/index.js | 9 +- src/redux/actions/actionTypes.js | 19 +- src/redux/actions/actions.js | 90 +- src/redux/configureStore.js | 31 +- .../reducers/chatsReducer/chatsReducer.js | 31 - src/redux/reducers/chatsReducer/selectors.js | 1 - .../messagesReducer/messagesReducer.js | 46 - .../reducers/messagesReducer/selectors.js | 1 - src/redux/reducers/userReducer/selectors.js | 2 +- src/redux/reducers/userReducer/userReducer.js | 49 +- 23 files changed, 1719 insertions(+), 399 deletions(-) delete mode 100644 src/components/Chats.jsx create mode 100644 src/components/Login.jsx delete mode 100644 src/components/Messages.jsx delete mode 100644 src/components/NotFound.jsx delete mode 100644 src/components/Profile.jsx create mode 100644 src/components/Register.jsx delete mode 100644 src/css/App.css delete mode 100644 src/css/index.css create mode 100644 src/firebase.js delete mode 100644 src/redux/reducers/chatsReducer/chatsReducer.js delete mode 100644 src/redux/reducers/chatsReducer/selectors.js delete mode 100644 src/redux/reducers/messagesReducer/messagesReducer.js delete mode 100644 src/redux/reducers/messagesReducer/selectors.js diff --git a/package-lock.json b/package-lock.json index 7ffb878..f3cfcaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^13.5.0", + "firebase": "^9.8.3", "react": "^18.1.0", "react-dom": "^18.1.0", "react-redux": "^8.0.2", @@ -2222,6 +2223,537 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@firebase/analytics": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.10.tgz", + "integrity": "sha512-efZ9jdzTW1/COE5gVdJVdplsltooKPH7M3XpSi/kDyegR1sC05C5NQaiBIYcaTyX2yf1OVcCfsWEcZFhhPTPGw==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/analytics-compat": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.11.tgz", + "integrity": "sha512-Jx5iXM3nlMa6utqGWNDtmdIztFhLCqMx2Iw809BbynhTSa3esF4e5RevCRk+5oDDfW11uLHckLpe6MhmINKIkA==", + "dependencies": { + "@firebase/analytics": "0.7.10", + "@firebase/analytics-types": "0.7.0", + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/analytics-types": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.7.0.tgz", + "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" + }, + "node_modules/@firebase/app": { + "version": "0.7.26", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.26.tgz", + "integrity": "sha512-FmJ4uaUyazmOZZWJO9OviKfnw+lrwMPQbWBMutymSQT8Gx783Ddnhs5IdmfV0NeLrlGy4ZwfP6/+RJyy2wGDXw==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/app-check": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.9.tgz", + "integrity": "sha512-IxOSpw4cL6fQD2AGLhXHxsdCjzQEYGyRwvS2vtguMxTYhRQ/EWXvej+P42cXf373vDrmAMKrnIUgC4P1yMPLSA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/app-check-compat": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.9.tgz", + "integrity": "sha512-DgHCcUR3vC3KrAQccs+cggTjNusF/oxPJmw1397H0jw5vWVu0oTtmIduyKB2GE0KDo0q0bHNPPR8GEVugjeFPg==", + "dependencies": { + "@firebase/app-check": "0.5.9", + "@firebase/app-check-types": "0.4.0", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/app-check-interop-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.1.0.tgz", + "integrity": "sha512-uZfn9s4uuRsaX5Lwx+gFP3B6YsyOKUE+Rqa6z9ojT4VSRAsZFko9FRn6OxQUA1z5t5d08fY4pf+/+Dkd5wbdbA==" + }, + "node_modules/@firebase/app-check-types": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.4.0.tgz", + "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" + }, + "node_modules/@firebase/app-compat": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.27.tgz", + "integrity": "sha512-0A5ENP/KK0Eev94qPuxaclfOE0oA6hyCVQTdi0ox1bPm+VzGGD/jXP6Bzw+IUmy33ChjP/639bm6Myh8AG4PwA==", + "dependencies": { + "@firebase/app": "0.7.26", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/app-types": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.7.0.tgz", + "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" + }, + "node_modules/@firebase/app/node_modules/idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + }, + "node_modules/@firebase/auth": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.3.tgz", + "integrity": "sha512-iElaZvVxxW2WAAmmqwTkdPBdixdI2TpURACwNn0G4XpuxlNeF3hYK1nDla2Oa/r39QGtlb9FChTTBby4Uu/Flw==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "selenium-webdriver": "4.1.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/auth-compat": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.16.tgz", + "integrity": "sha512-wwyuBwtCXwygr1Vyr7M4v8iD1eGRUEGM0XNGG2BQkFnlF7rkwpGsmgiiSkaA8kFYibNSTx2TkdBNfvJXzYPL6A==", + "dependencies": { + "@firebase/auth": "0.20.3", + "@firebase/auth-types": "0.11.0", + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "selenium-webdriver": "4.1.2", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/auth-interop-types": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz", + "integrity": "sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/auth-types": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.11.0.tgz", + "integrity": "sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/component": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.15.tgz", + "integrity": "sha512-VRnZxmvtJmXupTPg37LxM0zdyMN54EXkmsFD4x5Bm4eZUay9VGnhfiGnE3m9Af/2hnURA2idIBN/23L6982iPQ==", + "dependencies": { + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.1.tgz", + "integrity": "sha512-k6PeAzf9x9DG3AJtA6SkJsTD1ivOWvrV71VPOYabBch05QDB0HOYs1EauGhzqa6GOcYz+ncb4pNEkgFDvcnEfQ==", + "dependencies": { + "@firebase/auth-interop-types": "0.1.6", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-compat": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.1.tgz", + "integrity": "sha512-xpru5ZtO7um2FmfIw4gCAbkWpyOEwxzamU/5phuwze3ZihMdh+UrDrwrhvfqzQ/KIKXsK76Uyx5F3NCAS8+5eg==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/database": "0.13.1", + "@firebase/database-types": "0.9.9", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/database-types": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.9.tgz", + "integrity": "sha512-Zp86fHzQFZKYVM7yDWVAgVTeOJ39g2wT0ijeiN0jpHAHceeoV013q3jPIIGuooV2HMwWOTIBZGqh+DxrHMFyUw==", + "dependencies": { + "@firebase/app-types": "0.7.0", + "@firebase/util": "1.6.1" + } + }, + "node_modules/@firebase/firestore": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.10.tgz", + "integrity": "sha512-QUW9B7U8G0zbontuEPCJaoD320AZPOM4skV+Jd+WJIUUrmg/pLCW68Tt9ycg6zQ+1WdJtzaOU35NPJS7VIP8Ug==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "@firebase/webchannel-wrapper": "0.6.2", + "@grpc/grpc-js": "^1.3.2", + "@grpc/proto-loader": "^0.6.0", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10.10.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/firestore-compat": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.19.tgz", + "integrity": "sha512-fE3anYxNvX50zILPdGZaJBFcK3NPOHzZR7lLupFBsmd0YFtFT4E89p0QQ3A/oZK9/74jNuvjZoJ8hamknPkZHQ==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/firestore": "3.4.10", + "@firebase/firestore-types": "2.5.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/firestore-types": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.0.tgz", + "integrity": "sha512-I6c2m1zUhZ5SH0cWPmINabDyH5w0PPFHk2UHsjBpKdZllzJZ2TwTkXbDtpHUZNmnc/zAa0WNMNMvcvbb/xJLKA==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/functions": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.2.tgz", + "integrity": "sha512-w2ng6vodOYj7Xo/J3h0SN6NfpRzId00DOKZDvGylH+LoQPFBshHJmv2mpM5ljEntxWvtv3aGrjD6YvgKr9JUJA==", + "dependencies": { + "@firebase/app-check-interop-types": "0.1.0", + "@firebase/auth-interop-types": "0.1.6", + "@firebase/component": "0.5.15", + "@firebase/messaging-interop-types": "0.1.0", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/functions-compat": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.2.tgz", + "integrity": "sha512-CeAoQDVrrqjc6q0prgyO3mEDDQM84vSH09sNRRMxd9kTjZtKZD4DXf+BKfULSvMAK9mgmL70LBz8RsrcXs6YXg==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/functions": "0.8.2", + "@firebase/functions-types": "0.5.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/functions-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.5.0.tgz", + "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" + }, + "node_modules/@firebase/installations": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.10.tgz", + "integrity": "sha512-lTnYmtGPXwLqjiqvS4KH/V9a3vtZYWBU3Lsx+iOndFkzEyEANQ4qwUgZsP94qWRFd1WumcgDqhFmoVeYkDQCew==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/installations/node_modules/idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + }, + "node_modules/@firebase/logger": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.3.tgz", + "integrity": "sha512-POTJl07jOKTOevLXrTvJD/VZ0M6PnJXflbAh5J9VGkmtXPXNG6MdZ9fmRgqYhXKTaDId6AQenQ262uwgpdtO0Q==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/messaging": { + "version": "0.9.14", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.14.tgz", + "integrity": "sha512-TrSDdZT/wI94m+kay4ibYDUsBiSkijU71zWhSXPJRGSUNuq8EP0ecs2eu01Kipb6ghl5YUiFFL/uY5Y6WK/I5A==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/messaging-interop-types": "0.1.0", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/messaging-compat": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.14.tgz", + "integrity": "sha512-XNF5+TxhbFa5nAmkf/PbbNFfmiTcyBfjIl322Me6ZYK4leC8+O9beR7w0wWei8+GhUSIHn3D69ZZRewUUkXukA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/messaging": "0.9.14", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/messaging-interop-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.1.0.tgz", + "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" + }, + "node_modules/@firebase/messaging/node_modules/idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + }, + "node_modules/@firebase/performance": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.10.tgz", + "integrity": "sha512-rX+OsVMc6IIkrZqFmIjvEfRuRJ84ftPJDDpnqZ134pqTPr3MQgRzU/gPgLio8EdUN5YCthWyA8nB8NrEzBysSA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/performance-compat": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.10.tgz", + "integrity": "sha512-WhY2pjpXHiyRfnk9t3/BKGK/C0u4pC61mEYh8t8MLayz8KwuiavJj1wuCN2nG2R0y8CXZAsifFLQs1h0K3XzDA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/performance": "0.5.10", + "@firebase/performance-types": "0.1.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/performance-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.1.0.tgz", + "integrity": "sha512-6p1HxrH0mpx+622Ql6fcxFxfkYSBpE3LSuwM7iTtYU2nw91Hj6THC8Bc8z4nboIq7WvgsT/kOTYVVZzCSlXl8w==" + }, + "node_modules/@firebase/polyfill": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.36.tgz", + "integrity": "sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg==", + "dependencies": { + "core-js": "3.6.5", + "promise-polyfill": "8.1.3", + "whatwg-fetch": "2.0.4" + } + }, + "node_modules/@firebase/polyfill/node_modules/core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/@firebase/polyfill/node_modules/whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + }, + "node_modules/@firebase/remote-config": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.9.tgz", + "integrity": "sha512-SQ7tArNyI3sPlbmyAB3X2rS8lHcVlPWIQPRLCmgpKjPKM6Jsv7onCUK+M23DW95iEjK4vEVU5QkxUP3fUXWkxg==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/remote-config-compat": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.10.tgz", + "integrity": "sha512-FSZg9JqgnYIDV78J74W6JUANGjrzCgTRKHioBifONo3e2CdEqQKrvIuGCXEE9+9vYyuqNEtmv5DUIPC4n6XYCQ==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/remote-config": "0.3.9", + "@firebase/remote-config-types": "0.2.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/remote-config-types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.2.0.tgz", + "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" + }, + "node_modules/@firebase/storage": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.7.tgz", + "integrity": "sha512-0unWzgx5bceyO3SX/ilHaxwwHidN5sXZGakFLjAn8cbpjVpmybcKaLOduBxlMXeDCdUFfO8FcvEajFkV+0t2hA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app": "0.x" + } + }, + "node_modules/@firebase/storage-compat": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.15.tgz", + "integrity": "sha512-XjqAYIc8oJv6OAeeLdCUC3KF0wXAzRoBGktRhPMc9umSxVE7Dnr960kF6qtdAbLFGi/uhj478AdpKSQgZ75rQA==", + "dependencies": { + "@firebase/component": "0.5.15", + "@firebase/storage": "0.9.7", + "@firebase/storage-types": "0.6.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "@firebase/app-compat": "0.x" + } + }, + "node_modules/@firebase/storage-types": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.6.0.tgz", + "integrity": "sha512-1LpWhcCb1ftpkP/akhzjzeFxgVefs6eMD2QeKiJJUGH1qOiows2w5o0sKCUSQrvrRQS1lz3SFGvNR1Ck/gqxeA==", + "peerDependencies": { + "@firebase/app-types": "0.x", + "@firebase/util": "1.x" + } + }, + "node_modules/@firebase/util": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.1.tgz", + "integrity": "sha512-+eDE6uG5GgvXYHbAzfP1mpJUX1VDBD+A8CjBeBoNAKAVAApMSDxDODqRcOq7NW7kFJXSUkMzDJWhnUIifX2R8w==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@firebase/webchannel-wrapper": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.2.tgz", + "integrity": "sha512-zThUKcqIU6utWzM93uEvhlh8qj8A5LMPFJPvk/ODb+8GSSif19xM2Lw1M2ijyBy8+6skSkQBbavPzOU5Oh/8tQ==" + }, + "node_modules/@grpc/grpc-js": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.7.tgz", + "integrity": "sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==", + "dependencies": { + "@grpc/proto-loader": "^0.6.4", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", + "dependencies": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.11.3", + "yargs": "^16.2.0" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -3271,6 +3803,60 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -4007,6 +4593,11 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -7929,6 +8520,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/firebase": { + "version": "9.8.3", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.3.tgz", + "integrity": "sha512-PCThy5cFXnbiUtFPJ9vVdcG7wKibOKNR+iuNXf+54xMGJzYb+rM2P8GUqtr2fhVQkfs42uJ6gGKG4soNGkP64w==", + "dependencies": { + "@firebase/analytics": "0.7.10", + "@firebase/analytics-compat": "0.1.11", + "@firebase/app": "0.7.26", + "@firebase/app-check": "0.5.9", + "@firebase/app-check-compat": "0.2.9", + "@firebase/app-compat": "0.1.27", + "@firebase/app-types": "0.7.0", + "@firebase/auth": "0.20.3", + "@firebase/auth-compat": "0.2.16", + "@firebase/database": "0.13.1", + "@firebase/database-compat": "0.2.1", + "@firebase/firestore": "3.4.10", + "@firebase/firestore-compat": "0.1.19", + "@firebase/functions": "0.8.2", + "@firebase/functions-compat": "0.2.2", + "@firebase/installations": "0.5.10", + "@firebase/messaging": "0.9.14", + "@firebase/messaging-compat": "0.1.14", + "@firebase/performance": "0.5.10", + "@firebase/performance-compat": "0.1.10", + "@firebase/polyfill": "0.3.36", + "@firebase/remote-config": "0.3.9", + "@firebase/remote-config-compat": "0.1.10", + "@firebase/storage": "0.9.7", + "@firebase/storage-compat": "0.1.15", + "@firebase/util": "1.6.1" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -8764,6 +9388,11 @@ "node": ">= 4" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "node_modules/immer": { "version": "9.0.12", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", @@ -11376,6 +12005,39 @@ "node": ">=4.0" } }, + "node_modules/jszip": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.0.tgz", + "integrity": "sha512-LDfVtOLtOxb9RXkYOwPyNBTQDL4eUbqahtoY6x07GiDJHwSYvn8sHHIw8wINImV3MqbMNve2gSuM1DDqEKk09Q==", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/jszip/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11433,6 +12095,14 @@ "node": ">= 0.8.0" } }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -11486,6 +12156,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -11511,6 +12186,11 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -11840,13 +12520,51 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/node-forge": { @@ -12169,6 +12887,11 @@ "node": ">=6" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -13587,6 +14310,11 @@ "asap": "~2.0.6" } }, + "node_modules/promise-polyfill": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", + "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==" + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -13614,6 +14342,31 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -14627,6 +15380,19 @@ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, + "node_modules/selenium-webdriver": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.1.2.tgz", + "integrity": "sha512-e4Ap8vQvhipgBB8Ry9zBiKGkU6kHKyNnWiavGGLKkrdW81Zv7NVMtFOL/j3yX0G8QScM7XIXijKssNd4EUxSOw==", + "dependencies": { + "jszip": "^3.6.0", + "tmp": "^0.2.1", + "ws": ">=7.4.6" + }, + "engines": { + "node": ">= 10.15.0" + } + }, "node_modules/selfsigned": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz", @@ -14785,6 +15551,11 @@ "node": ">= 0.8.0" } }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -15577,6 +16348,17 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -18332,6 +19114,459 @@ } } }, + "@firebase/analytics": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.10.tgz", + "integrity": "sha512-efZ9jdzTW1/COE5gVdJVdplsltooKPH7M3XpSi/kDyegR1sC05C5NQaiBIYcaTyX2yf1OVcCfsWEcZFhhPTPGw==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/analytics-compat": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.11.tgz", + "integrity": "sha512-Jx5iXM3nlMa6utqGWNDtmdIztFhLCqMx2Iw809BbynhTSa3esF4e5RevCRk+5oDDfW11uLHckLpe6MhmINKIkA==", + "requires": { + "@firebase/analytics": "0.7.10", + "@firebase/analytics-types": "0.7.0", + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/analytics-types": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/analytics-types/-/analytics-types-0.7.0.tgz", + "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" + }, + "@firebase/app": { + "version": "0.7.26", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.26.tgz", + "integrity": "sha512-FmJ4uaUyazmOZZWJO9OviKfnw+lrwMPQbWBMutymSQT8Gx783Ddnhs5IdmfV0NeLrlGy4ZwfP6/+RJyy2wGDXw==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "dependencies": { + "idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + } + } + }, + "@firebase/app-check": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.9.tgz", + "integrity": "sha512-IxOSpw4cL6fQD2AGLhXHxsdCjzQEYGyRwvS2vtguMxTYhRQ/EWXvej+P42cXf373vDrmAMKrnIUgC4P1yMPLSA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/app-check-compat": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.9.tgz", + "integrity": "sha512-DgHCcUR3vC3KrAQccs+cggTjNusF/oxPJmw1397H0jw5vWVu0oTtmIduyKB2GE0KDo0q0bHNPPR8GEVugjeFPg==", + "requires": { + "@firebase/app-check": "0.5.9", + "@firebase/app-check-types": "0.4.0", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/app-check-interop-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-interop-types/-/app-check-interop-types-0.1.0.tgz", + "integrity": "sha512-uZfn9s4uuRsaX5Lwx+gFP3B6YsyOKUE+Rqa6z9ojT4VSRAsZFko9FRn6OxQUA1z5t5d08fY4pf+/+Dkd5wbdbA==" + }, + "@firebase/app-check-types": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/app-check-types/-/app-check-types-0.4.0.tgz", + "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" + }, + "@firebase/app-compat": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.27.tgz", + "integrity": "sha512-0A5ENP/KK0Eev94qPuxaclfOE0oA6hyCVQTdi0ox1bPm+VzGGD/jXP6Bzw+IUmy33ChjP/639bm6Myh8AG4PwA==", + "requires": { + "@firebase/app": "0.7.26", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/app-types": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.7.0.tgz", + "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" + }, + "@firebase/auth": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.3.tgz", + "integrity": "sha512-iElaZvVxxW2WAAmmqwTkdPBdixdI2TpURACwNn0G4XpuxlNeF3hYK1nDla2Oa/r39QGtlb9FChTTBby4Uu/Flw==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "selenium-webdriver": "4.1.2", + "tslib": "^2.1.0" + } + }, + "@firebase/auth-compat": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.16.tgz", + "integrity": "sha512-wwyuBwtCXwygr1Vyr7M4v8iD1eGRUEGM0XNGG2BQkFnlF7rkwpGsmgiiSkaA8kFYibNSTx2TkdBNfvJXzYPL6A==", + "requires": { + "@firebase/auth": "0.20.3", + "@firebase/auth-types": "0.11.0", + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "selenium-webdriver": "4.1.2", + "tslib": "^2.1.0" + } + }, + "@firebase/auth-interop-types": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz", + "integrity": "sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==", + "requires": {} + }, + "@firebase/auth-types": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.11.0.tgz", + "integrity": "sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw==", + "requires": {} + }, + "@firebase/component": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.15.tgz", + "integrity": "sha512-VRnZxmvtJmXupTPg37LxM0zdyMN54EXkmsFD4x5Bm4eZUay9VGnhfiGnE3m9Af/2hnURA2idIBN/23L6982iPQ==", + "requires": { + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/database": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.1.tgz", + "integrity": "sha512-k6PeAzf9x9DG3AJtA6SkJsTD1ivOWvrV71VPOYabBch05QDB0HOYs1EauGhzqa6GOcYz+ncb4pNEkgFDvcnEfQ==", + "requires": { + "@firebase/auth-interop-types": "0.1.6", + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "faye-websocket": "0.11.4", + "tslib": "^2.1.0" + } + }, + "@firebase/database-compat": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.1.tgz", + "integrity": "sha512-xpru5ZtO7um2FmfIw4gCAbkWpyOEwxzamU/5phuwze3ZihMdh+UrDrwrhvfqzQ/KIKXsK76Uyx5F3NCAS8+5eg==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/database": "0.13.1", + "@firebase/database-types": "0.9.9", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/database-types": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.9.tgz", + "integrity": "sha512-Zp86fHzQFZKYVM7yDWVAgVTeOJ39g2wT0ijeiN0jpHAHceeoV013q3jPIIGuooV2HMwWOTIBZGqh+DxrHMFyUw==", + "requires": { + "@firebase/app-types": "0.7.0", + "@firebase/util": "1.6.1" + } + }, + "@firebase/firestore": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.10.tgz", + "integrity": "sha512-QUW9B7U8G0zbontuEPCJaoD320AZPOM4skV+Jd+WJIUUrmg/pLCW68Tt9ycg6zQ+1WdJtzaOU35NPJS7VIP8Ug==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "@firebase/webchannel-wrapper": "0.6.2", + "@grpc/grpc-js": "^1.3.2", + "@grpc/proto-loader": "^0.6.0", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + } + }, + "@firebase/firestore-compat": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.19.tgz", + "integrity": "sha512-fE3anYxNvX50zILPdGZaJBFcK3NPOHzZR7lLupFBsmd0YFtFT4E89p0QQ3A/oZK9/74jNuvjZoJ8hamknPkZHQ==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/firestore": "3.4.10", + "@firebase/firestore-types": "2.5.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/firestore-types": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@firebase/firestore-types/-/firestore-types-2.5.0.tgz", + "integrity": "sha512-I6c2m1zUhZ5SH0cWPmINabDyH5w0PPFHk2UHsjBpKdZllzJZ2TwTkXbDtpHUZNmnc/zAa0WNMNMvcvbb/xJLKA==", + "requires": {} + }, + "@firebase/functions": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.2.tgz", + "integrity": "sha512-w2ng6vodOYj7Xo/J3h0SN6NfpRzId00DOKZDvGylH+LoQPFBshHJmv2mpM5ljEntxWvtv3aGrjD6YvgKr9JUJA==", + "requires": { + "@firebase/app-check-interop-types": "0.1.0", + "@firebase/auth-interop-types": "0.1.6", + "@firebase/component": "0.5.15", + "@firebase/messaging-interop-types": "0.1.0", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + } + }, + "@firebase/functions-compat": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.2.tgz", + "integrity": "sha512-CeAoQDVrrqjc6q0prgyO3mEDDQM84vSH09sNRRMxd9kTjZtKZD4DXf+BKfULSvMAK9mgmL70LBz8RsrcXs6YXg==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/functions": "0.8.2", + "@firebase/functions-types": "0.5.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/functions-types": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.5.0.tgz", + "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" + }, + "@firebase/installations": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.10.tgz", + "integrity": "sha512-lTnYmtGPXwLqjiqvS4KH/V9a3vtZYWBU3Lsx+iOndFkzEyEANQ4qwUgZsP94qWRFd1WumcgDqhFmoVeYkDQCew==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "dependencies": { + "idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + } + } + }, + "@firebase/logger": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.3.tgz", + "integrity": "sha512-POTJl07jOKTOevLXrTvJD/VZ0M6PnJXflbAh5J9VGkmtXPXNG6MdZ9fmRgqYhXKTaDId6AQenQ262uwgpdtO0Q==", + "requires": { + "tslib": "^2.1.0" + } + }, + "@firebase/messaging": { + "version": "0.9.14", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.14.tgz", + "integrity": "sha512-TrSDdZT/wI94m+kay4ibYDUsBiSkijU71zWhSXPJRGSUNuq8EP0ecs2eu01Kipb6ghl5YUiFFL/uY5Y6WK/I5A==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/messaging-interop-types": "0.1.0", + "@firebase/util": "1.6.1", + "idb": "7.0.1", + "tslib": "^2.1.0" + }, + "dependencies": { + "idb": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz", + "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==" + } + } + }, + "@firebase/messaging-compat": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.14.tgz", + "integrity": "sha512-XNF5+TxhbFa5nAmkf/PbbNFfmiTcyBfjIl322Me6ZYK4leC8+O9beR7w0wWei8+GhUSIHn3D69ZZRewUUkXukA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/messaging": "0.9.14", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/messaging-interop-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.1.0.tgz", + "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" + }, + "@firebase/performance": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.10.tgz", + "integrity": "sha512-rX+OsVMc6IIkrZqFmIjvEfRuRJ84ftPJDDpnqZ134pqTPr3MQgRzU/gPgLio8EdUN5YCthWyA8nB8NrEzBysSA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/performance-compat": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.10.tgz", + "integrity": "sha512-WhY2pjpXHiyRfnk9t3/BKGK/C0u4pC61mEYh8t8MLayz8KwuiavJj1wuCN2nG2R0y8CXZAsifFLQs1h0K3XzDA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/performance": "0.5.10", + "@firebase/performance-types": "0.1.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/performance-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@firebase/performance-types/-/performance-types-0.1.0.tgz", + "integrity": "sha512-6p1HxrH0mpx+622Ql6fcxFxfkYSBpE3LSuwM7iTtYU2nw91Hj6THC8Bc8z4nboIq7WvgsT/kOTYVVZzCSlXl8w==" + }, + "@firebase/polyfill": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@firebase/polyfill/-/polyfill-0.3.36.tgz", + "integrity": "sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg==", + "requires": { + "core-js": "3.6.5", + "promise-polyfill": "8.1.3", + "whatwg-fetch": "2.0.4" + }, + "dependencies": { + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" + }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + } + } + }, + "@firebase/remote-config": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.9.tgz", + "integrity": "sha512-SQ7tArNyI3sPlbmyAB3X2rS8lHcVlPWIQPRLCmgpKjPKM6Jsv7onCUK+M23DW95iEjK4vEVU5QkxUP3fUXWkxg==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/installations": "0.5.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/remote-config-compat": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.10.tgz", + "integrity": "sha512-FSZg9JqgnYIDV78J74W6JUANGjrzCgTRKHioBifONo3e2CdEqQKrvIuGCXEE9+9vYyuqNEtmv5DUIPC4n6XYCQ==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/logger": "0.3.3", + "@firebase/remote-config": "0.3.9", + "@firebase/remote-config-types": "0.2.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/remote-config-types": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.2.0.tgz", + "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" + }, + "@firebase/storage": { + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.7.tgz", + "integrity": "sha512-0unWzgx5bceyO3SX/ilHaxwwHidN5sXZGakFLjAn8cbpjVpmybcKaLOduBxlMXeDCdUFfO8FcvEajFkV+0t2hA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/util": "1.6.1", + "node-fetch": "2.6.7", + "tslib": "^2.1.0" + } + }, + "@firebase/storage-compat": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.15.tgz", + "integrity": "sha512-XjqAYIc8oJv6OAeeLdCUC3KF0wXAzRoBGktRhPMc9umSxVE7Dnr960kF6qtdAbLFGi/uhj478AdpKSQgZ75rQA==", + "requires": { + "@firebase/component": "0.5.15", + "@firebase/storage": "0.9.7", + "@firebase/storage-types": "0.6.0", + "@firebase/util": "1.6.1", + "tslib": "^2.1.0" + } + }, + "@firebase/storage-types": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/storage-types/-/storage-types-0.6.0.tgz", + "integrity": "sha512-1LpWhcCb1ftpkP/akhzjzeFxgVefs6eMD2QeKiJJUGH1qOiows2w5o0sKCUSQrvrRQS1lz3SFGvNR1Ck/gqxeA==", + "requires": {} + }, + "@firebase/util": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.1.tgz", + "integrity": "sha512-+eDE6uG5GgvXYHbAzfP1mpJUX1VDBD+A8CjBeBoNAKAVAApMSDxDODqRcOq7NW7kFJXSUkMzDJWhnUIifX2R8w==", + "requires": { + "tslib": "^2.1.0" + } + }, + "@firebase/webchannel-wrapper": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.2.tgz", + "integrity": "sha512-zThUKcqIU6utWzM93uEvhlh8qj8A5LMPFJPvk/ODb+8GSSif19xM2Lw1M2ijyBy8+6skSkQBbavPzOU5Oh/8tQ==" + }, + "@grpc/grpc-js": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.7.tgz", + "integrity": "sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==", + "requires": { + "@grpc/proto-loader": "^0.6.4", + "@types/node": ">=12.12.47" + } + }, + "@grpc/proto-loader": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", + "requires": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.11.3", + "yargs": "^16.2.0" + } + }, "@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -19011,6 +20246,60 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz", "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==" }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -19554,6 +20843,11 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, + "@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, "@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -22466,6 +23760,39 @@ "path-exists": "^4.0.0" } }, + "firebase": { + "version": "9.8.3", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.3.tgz", + "integrity": "sha512-PCThy5cFXnbiUtFPJ9vVdcG7wKibOKNR+iuNXf+54xMGJzYb+rM2P8GUqtr2fhVQkfs42uJ6gGKG4soNGkP64w==", + "requires": { + "@firebase/analytics": "0.7.10", + "@firebase/analytics-compat": "0.1.11", + "@firebase/app": "0.7.26", + "@firebase/app-check": "0.5.9", + "@firebase/app-check-compat": "0.2.9", + "@firebase/app-compat": "0.1.27", + "@firebase/app-types": "0.7.0", + "@firebase/auth": "0.20.3", + "@firebase/auth-compat": "0.2.16", + "@firebase/database": "0.13.1", + "@firebase/database-compat": "0.2.1", + "@firebase/firestore": "3.4.10", + "@firebase/firestore-compat": "0.1.19", + "@firebase/functions": "0.8.2", + "@firebase/functions-compat": "0.2.2", + "@firebase/installations": "0.5.10", + "@firebase/messaging": "0.9.14", + "@firebase/messaging-compat": "0.1.14", + "@firebase/performance": "0.5.10", + "@firebase/performance-compat": "0.1.10", + "@firebase/polyfill": "0.3.36", + "@firebase/remote-config": "0.3.9", + "@firebase/remote-config-compat": "0.1.10", + "@firebase/storage": "0.9.7", + "@firebase/storage-compat": "0.1.15", + "@firebase/util": "1.6.1" + } + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -23055,6 +24382,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "immer": { "version": "9.0.12", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz", @@ -24938,6 +26270,41 @@ "object.assign": "^4.1.2" } }, + "jszip": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.0.tgz", + "integrity": "sha512-LDfVtOLtOxb9RXkYOwPyNBTQDL4eUbqahtoY6x07GiDJHwSYvn8sHHIw8wINImV3MqbMNve2gSuM1DDqEKk09Q==", + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -24980,6 +26347,14 @@ "type-check": "~0.4.0" } }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, "lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -25018,6 +26393,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -25043,6 +26423,11 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -25292,6 +26677,35 @@ "tslib": "^2.0.3" } }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } + }, "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -25510,6 +26924,11 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -26398,6 +27817,11 @@ "asap": "~2.0.6" } }, + "promise-polyfill": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", + "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==" + }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -26424,6 +27848,26 @@ } } }, + "protobufjs": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", + "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + } + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -27131,6 +28575,16 @@ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" }, + "selenium-webdriver": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.1.2.tgz", + "integrity": "sha512-e4Ap8vQvhipgBB8Ry9zBiKGkU6kHKyNnWiavGGLKkrdW81Zv7NVMtFOL/j3yX0G8QScM7XIXijKssNd4EUxSOw==", + "requires": { + "jszip": "^3.6.0", + "tmp": "^0.2.1", + "ws": ">=7.4.6" + } + }, "selfsigned": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz", @@ -27268,6 +28722,11 @@ "send": "0.18.0" } }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -27869,6 +29328,14 @@ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "requires": { + "rimraf": "^3.0.0" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", diff --git a/package.json b/package.json index e51bdec..fe01a26 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/user-event": "^13.5.0", + "firebase": "^9.8.3", "react": "^18.1.0", "react-dom": "^18.1.0", "react-redux": "^8.0.2", diff --git a/src/components/App.jsx b/src/components/App.jsx index 7cac468..fa00f52 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -1,30 +1,14 @@ -import '../css/App.css'; -import React from "react"; -import {Link, Route, Routes} from "react-router-dom"; -import {Chats} from './Chats'; -import {Messages} from "./Messages"; -import {Profile} from "./Profile"; -import {NotFound} from "./NotFound"; -import {Home} from "./Home"; - -export default function App() { - +import {Routes, Route} from "react-router-dom"; +import Register from "./Register"; +import Login from "./Login"; +import Home from "./Home"; +function App() { return ( -
- - - }/> - }/> - }/> - }/> - }/> - -
+ + } /> + } /> + }/> + ); } +export default App; diff --git a/src/components/Chats.jsx b/src/components/Chats.jsx deleted file mode 100644 index 2258f6b..0000000 --- a/src/components/Chats.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import {Link} from "react-router-dom"; -import {useDispatch, useSelector} from "react-redux"; -import {chatsSelector} from "../redux/reducers/chatsReducer/selectors"; -import {deleteChats, deleteChatsWithMessages} from "../redux/actions/actions"; - -export const Chats = () => { - const chats = useSelector(chatsSelector); - const dispatch = useDispatch(); - const deleteChat = (id) => { - dispatch(deleteChats(id)); - dispatch(deleteChatsWithMessages(id)) - }; - - return ( -
- {chats.map((item) => { - return ( -
- - ID {item.id} NAME {item.name} - - -
- ) - }) - } -
- ) -}; \ No newline at end of file diff --git a/src/components/Home.jsx b/src/components/Home.jsx index fe6c85b..74558f5 100644 --- a/src/components/Home.jsx +++ b/src/components/Home.jsx @@ -1,45 +1,30 @@ -import React, {useEffect} from 'react'; +import React from 'react'; import {useDispatch, useSelector} from "react-redux"; -import {errorSelector, loadingSelector, usersSelector} from "../redux/reducers/userReducer/selectors"; -import {loadUsers} from "../redux/reducers/userReducer/userReducer"; +import {userSelector} from "../redux/reducers/userReducer/selectors"; +import {logoutInitiate} from "../redux/actions/actions"; +import {useNavigate} from "react-router-dom"; -export const Home = () => { - const users = useSelector(usersSelector); - const loading = useSelector(loadingSelector); - const error = useSelector(errorSelector); +const Home = () => { const dispatch = useDispatch(); + const user = useSelector(userSelector); + const navigate = useNavigate(); - useEffect(() => { - dispatch(loadUsers()) - }, []); - const errorHandler = () => { - dispatch(loadUsers()) - }; - if(loading) { - return ( -

Loading, please wait...

- ) + const handleAuth = () => { + if(user) { + dispatch(logoutInitiate()) + } + setTimeout(() => { + navigate('/login') + }, 3000) } - - if(error) { - return ( -
-

Ouch, we take error, repeat?

- -
- ) - } - return (
-

Welcome

- {users.map((user) => -
- {user.name} -
- )} +

Home

+
); -}; \ No newline at end of file +}; + +export default Home; \ No newline at end of file diff --git a/src/components/Login.jsx b/src/components/Login.jsx new file mode 100644 index 0000000..68438c2 --- /dev/null +++ b/src/components/Login.jsx @@ -0,0 +1,40 @@ +import React, {useEffect, useState} from 'react'; +import {useDispatch, useSelector} from "react-redux"; +import {userSelector} from "../redux/reducers/userReducer/selectors"; +import {useNavigate} from "react-router-dom"; +import {loginInitiate} from "../redux/actions/actions"; + +const Login = () => { + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const dispatch = useDispatch(); + const user = useSelector(userSelector); + const navigate = useNavigate(); + + useEffect(() => { + if(user) { + navigate('/') + } + }, [navigate, user]); + + const handleSubmit = (e) => { + e.preventDefault(); + if(!email || !password) { + return; + } + dispatch(loginInitiate(email, password)) + } + + return ( +
+

Login

+
+ setEmail(e.target.value)}/> + setPassword(e.target.value)}/> + +
+
+ ); +}; + +export default Login; \ No newline at end of file diff --git a/src/components/Messages.jsx b/src/components/Messages.jsx deleted file mode 100644 index d74fb59..0000000 --- a/src/components/Messages.jsx +++ /dev/null @@ -1,56 +0,0 @@ -import React, {useState} from 'react'; -import {useDispatch, useSelector} from "react-redux"; -import {messagesSelector} from "../redux/reducers/messagesReducer/selectors"; -import {useParams} from "react-router-dom"; -import {addChats, addMessages, deleteMessages} from "../redux/actions/actions"; - -export const Messages = () => { - const {chatIds} = useParams(); - const dispatch = useDispatch(); - const messages = useSelector(messagesSelector); - const [inputAuthor, setInputAuthor] = useState(''); - const [inputMessage, setInputMessage] = useState(''); - const message = messages.filter((message) => { - if(!chatIds) - return true; - return message.chatId ===+chatIds; - }); - const deleteMessage = (id) => { - dispatch(deleteMessages(id)) - }; - const addMessage = () => { - const random = Math.random(); - const mess = { - id: random, - chatId: chatIds, - author: inputAuthor, - say: inputMessage - }; - const chatAdd = { - id: messages.length, - name: inputAuthor - }; - dispatch(addMessages(mess)); - dispatch(addChats(chatAdd)) - }; - return ( -
- setInputAuthor(e.target.value)}/> - setInputMessage(e.target.value)}/> - - { - message.map((item) => { - return ( -
-

{item.id}

-

{item.chatId}

-

{item.author}

-

{item.say}

- -
- ) - }) - } -
- ); -} diff --git a/src/components/NotFound.jsx b/src/components/NotFound.jsx deleted file mode 100644 index 2cd97de..0000000 --- a/src/components/NotFound.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -export const NotFound = () => { - return ( -
-

Page not found

-
- ); -}; \ No newline at end of file diff --git a/src/components/Profile.jsx b/src/components/Profile.jsx deleted file mode 100644 index 76bd762..0000000 --- a/src/components/Profile.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -export const Profile = () => { - return ( -
-

This is Profile page

-
- ); -}; \ No newline at end of file diff --git a/src/components/Register.jsx b/src/components/Register.jsx new file mode 100644 index 0000000..d517d3e --- /dev/null +++ b/src/components/Register.jsx @@ -0,0 +1,56 @@ +import React, {useEffect, useState} from 'react'; +import {NavLink} from "react-router-dom"; +import {useDispatch, useSelector} from "react-redux"; +import {userSelector} from "../redux/reducers/userReducer/selectors"; +import {registerInitiate} from "../redux/actions/actions"; + +const Register = () => { + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [passwordConfirm, setPasswordConfirm] = useState(''); + const [userName, setUserName] = useState(''); + const dispatch = useDispatch(); + const user = useSelector(userSelector); + const navigate = useNavigate(); + + useEffect(() => { + if(user) { + navigate('/') + } + }, [user, navigate]) + + const handleSubmit = (e) => { + e.preventDefault(); + if(password !== passwordConfirm) { + return; + } + dispatch(registerInitiate(email, password, userName)) + } + + return ( +
+
+ Enter +

Register

+
+ { + setUserName(e.target.value) + }}/> + { + setEmail(e.target.value) + }}/> + { + setPassword(e.target.value) + }}/> + { + setPasswordConfirm(e.target.value) + }}/> + +
+ +
+
+ ); +}; + +export default Register; \ No newline at end of file diff --git a/src/css/App.css b/src/css/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/src/css/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/css/index.css b/src/css/index.css deleted file mode 100644 index ec2585e..0000000 --- a/src/css/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/firebase.js b/src/firebase.js new file mode 100644 index 0000000..d36e11a --- /dev/null +++ b/src/firebase.js @@ -0,0 +1,17 @@ +import firebase from "firebase/compat/app"; +import "firebase/compat/database"; +import "firebase/compat/auth"; + +const firebaseConfig = { + apiKey: "AIzaSyAe1JGnHLdFSkLBj7DEzh4w9LaqlzrIYvo", + authDomain: "lesson9app.firebaseapp.com", + databaseURL: "https://lesson9app-default-rtdb.firebaseio.com", + projectId: "lesson9app", + storageBucket: "lesson9app.appspot.com", + messagingSenderId: "485460623690", + appId: "1:485460623690:web:692fde1c5e3dda697081b3" +}; + +const fb = firebase.initializeApp(firebaseConfig); +export const db = fb.database().ref(); +export const auth = firebase.auth; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 1a5a1bb..23d0807 100644 --- a/src/index.js +++ b/src/index.js @@ -9,13 +9,12 @@ import {store} from "./redux/configureStore"; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( + - - + - - - + + ); diff --git a/src/redux/actions/actionTypes.js b/src/redux/actions/actionTypes.js index 17bed41..ec6a325 100644 --- a/src/redux/actions/actionTypes.js +++ b/src/redux/actions/actionTypes.js @@ -1,8 +1,11 @@ -export const ADD_MESSAGE = "ADD_MESSAGE"; -export const DELETE_MESSAGE = "DELETE_MESSAGE"; -export const DELETE_MESSAGE_WITH_CHAT = "DELETE_MESSAGE_WITH_CHAT"; -export const DELETE_CHAT = "DELETE_CHAT"; -export const ADD_CHAT = "ADD_CHAT"; -export const LOAD_USERS = "LOAD_USERS"; -export const LOADING = "LOADING"; -export const ERROR = "ERROR"; \ No newline at end of file +export const REGISTER_START = "REGISTER_START"; +export const REGISTER_SUCCESS = "REGISTER_SUCCESS"; +export const REGISTER_ERROR = "REGISTER_ERROR"; + +export const LOGIN_START = "LOGIN_START"; +export const LOGIN_SUCCESS = "LOGIN_SUCCESS"; +export const LOGIN_ERROR = "LOGIN_ERROR"; + +export const LOGOUT_START = "LOGOUT_START"; +export const LOGOUT_SUCCESS = "LOGOUT_SUCCESS"; +export const LOGOUT_ERROR = "LOGOUT_ERROR"; \ No newline at end of file diff --git a/src/redux/actions/actions.js b/src/redux/actions/actions.js index 57d5801..0905dc4 100644 --- a/src/redux/actions/actions.js +++ b/src/redux/actions/actions.js @@ -1,44 +1,78 @@ -import { - ADD_CHAT, - ADD_MESSAGE, - DELETE_CHAT, - DELETE_MESSAGE, - DELETE_MESSAGE_WITH_CHAT, - ERROR, - LOAD_USERS, LOADING -} from "./actionTypes"; +import * as types from "./actionTypes"; +import {auth} from "../../firebase"; -export const deleteMessages = (id) => ({ - type: DELETE_MESSAGE, payload: id, meta: { - delay: 1500 - } +export const registerStart = () => ({ + type: types.REGISTER_START }); -export const addMessages = (mess) => ({ - type: ADD_MESSAGE, payload: mess +export const registerSuccess = (user) => ({ + type: types.REGISTER_SUCCESS, + payload: user }); +export const registerError = (e) => ({ + type: types.REGISTER_ERROR, + payload: e +}); + +export const loginStart = () => ({ + type: types.LOGIN_START +}); -export const addChats = (chat) => ({ - type: ADD_CHAT, payload: chat +export const loginSuccess = (user) => ({ + type: types.LOGIN_SUCCESS, + payload: user }); -export const deleteChats = (chatId) => ({ - type: DELETE_CHAT, payload: chatId +export const loginError = (e) => ({ + type: types.LOGIN_ERROR, + payload: e }); -export const deleteChatsWithMessages = (chatId) => ({ - type: DELETE_MESSAGE_WITH_CHAT, payload: chatId +export const logoutStart = () => ({ + type: types.LOGOUT_START }); -export const loadUsersAction = (data) => ({ - type: LOAD_USERS, payload: data +export const logoutSuccess = () => ({ + type: types.LOGOUT_SUCCESS }); -export const loadingAction = () => ({ - type: LOADING +export const logoutError = () => ({ + type: types.LOGOUT_ERROR }); -export const errorAction = (e) => ({ - type: ERROR, payload: e -}); \ No newline at end of file +export const registerInitiate = (email, password, userName) => { + return(dispatch) => { + dispatch(registerStart()); + auth + .createUserWithEmailAndPassword(email, password) + .then(({ user }) => { + user.updateProfile({ + userName + }) + dispatch(registerSuccess(user)) + }) + .catch((err) => dispatch(registerError(err.message))) + } +} +export const loginInitiate = (email, password) => { + return(dispatch) => { + dispatch(loginStart()) + auth + .signInWithEmailAndPassword(email, password) + .then(({ user }) => { + dispatch(loginSuccess(user)) + }) + .catch((e) => dispatch(loginError(e.message))) + } +} +export const logoutInitiate = () => { + return(dispatch) => { + dispatch(logoutStart()) + auth + .signOut() + .then((resp) => dispatch(logoutSuccess())) + .catch((e) => dispatch(logoutError(e.message))) + } +} + diff --git a/src/redux/configureStore.js b/src/redux/configureStore.js index 1ca8eb2..1150519 100644 --- a/src/redux/configureStore.js +++ b/src/redux/configureStore.js @@ -1,32 +1,5 @@ -import {applyMiddleware, combineReducers, createStore} from "redux"; -import {chatsReducer} from "./reducers/chatsReducer/chatsReducer"; -import {messagesReducer} from "./reducers/messagesReducer/messagesReducer"; -import {createLogger} from "redux-logger/src"; +import {applyMiddleware, createStore} from "redux"; import {userReducer} from "./reducers/userReducer/userReducer"; import thunk from "redux-thunk"; -const confirmDeleteMessage = store => next => action => { - const delay = action?.meta?.delay; - if(!delay) { - return next(action); - } - - const timeOut = setTimeout(() => { - next(action); - window.confirm("Are you really want to delete this message?") - }, delay); - - return () => clearTimeout(timeOut); -}; - -const logger = createLogger({ - diff: true, - collapsed: true -}); - -export const store = createStore(combineReducers({ - chats: chatsReducer, - messages: messagesReducer, - users: userReducer} - ), applyMiddleware(thunk, confirmDeleteMessage, logger) -); \ No newline at end of file +export const store = createStore(userReducer, applyMiddleware(thunk)) \ No newline at end of file diff --git a/src/redux/reducers/chatsReducer/chatsReducer.js b/src/redux/reducers/chatsReducer/chatsReducer.js deleted file mode 100644 index 31dbf80..0000000 --- a/src/redux/reducers/chatsReducer/chatsReducer.js +++ /dev/null @@ -1,31 +0,0 @@ -import {DELETE_CHAT, ADD_CHAT} from "../../actions/actionTypes"; - -const initialState = { - chats: [ - { - id: 0, - name: 'Ivan' - }, - { - id: 1, - name: 'Fedor' - } - ] -}; - -export const chatsReducer = (state = initialState, action) => { - switch (action.type) { - case DELETE_CHAT: - return { - ...state, - chats: state.chats.filter(item => item.id !== action.payload) - }; - case ADD_CHAT: - return { - ...state, - chats: [...state.chats, action.payload] - }; - default: - return state; - } -} \ No newline at end of file diff --git a/src/redux/reducers/chatsReducer/selectors.js b/src/redux/reducers/chatsReducer/selectors.js deleted file mode 100644 index 806d0a8..0000000 --- a/src/redux/reducers/chatsReducer/selectors.js +++ /dev/null @@ -1 +0,0 @@ -export const chatsSelector = state => state.chats.chats; \ No newline at end of file diff --git a/src/redux/reducers/messagesReducer/messagesReducer.js b/src/redux/reducers/messagesReducer/messagesReducer.js deleted file mode 100644 index dc278ff..0000000 --- a/src/redux/reducers/messagesReducer/messagesReducer.js +++ /dev/null @@ -1,46 +0,0 @@ -import {ADD_MESSAGE, DELETE_MESSAGE, DELETE_MESSAGE_WITH_CHAT} from "../../actions/actionTypes"; - -const initialState = { - messages: [ - { - id: 0, - chatId: 0, - author: "Ivan", - say: "Hi" - }, - { - id: 1, - chatId: 1, - author: "Fedor", - say: "Good morning" - }, - { - id: 2, - chatId: 0, - author: "Andrey", - say: "Hello" - } - ] -}; - -export const messagesReducer = (state = initialState, action) => { - switch (action.type) { - case ADD_MESSAGE: - return { - ...state, - messages: [...state.messages, action.payload] - }; - case DELETE_MESSAGE: - return { - ...state, - messages: state.messages.filter(item => item.id !== action.payload) - }; - case DELETE_MESSAGE_WITH_CHAT: - return { - ...state, - messages: state.messages.filter(item => item.chatId !== action.payload) - }; - default: - return state; - } -} \ No newline at end of file diff --git a/src/redux/reducers/messagesReducer/selectors.js b/src/redux/reducers/messagesReducer/selectors.js deleted file mode 100644 index e134b33..0000000 --- a/src/redux/reducers/messagesReducer/selectors.js +++ /dev/null @@ -1 +0,0 @@ -export const messagesSelector = state => state.messages.messages; \ No newline at end of file diff --git a/src/redux/reducers/userReducer/selectors.js b/src/redux/reducers/userReducer/selectors.js index 50e4ce1..6d6eadd 100644 --- a/src/redux/reducers/userReducer/selectors.js +++ b/src/redux/reducers/userReducer/selectors.js @@ -1,3 +1,3 @@ -export const usersSelector = state => state.users.users; +export const userSelector = state => state.users.currentUser; export const loadingSelector = state => state.users.loading; export const errorSelector = state => state.users.error; \ No newline at end of file diff --git a/src/redux/reducers/userReducer/userReducer.js b/src/redux/reducers/userReducer/userReducer.js index adf4e86..797061e 100644 --- a/src/redux/reducers/userReducer/userReducer.js +++ b/src/redux/reducers/userReducer/userReducer.js @@ -1,47 +1,42 @@ -import {ERROR, LOAD_USERS, LOADING} from "../../actions/actionTypes"; -import {errorAction, loadingAction, loadUsersAction} from "../../actions/actions"; +import * as types from "redux/actions/actionTypes"; + const initialState = { - users: [], + currentUser: null, loading: false, error: null }; export const userReducer = (state = initialState, action) => { switch (action.type) { - case LOADING: + case types.REGISTER_START: + case types.LOGOUT_START: + case types.LOGIN_START: return { ...state, loading: true - }; - - case LOAD_USERS: + } + case types.LOGOUT_SUCCESS: + return { + ...state, + currentUser: null + } + case types.REGISTER_SUCCESS: + case types.LOGIN_SUCCESS: return { ...state, - users: action.payload, + currentUser: action.payload, loading: false - }; - case ERROR: + } + case types.REGISTER_ERROR: + case types.LOGIN_ERROR: + case types.LOGOUT_ERROR: return { ...state, - loading: false, - error: action.payload + error: action.payload, + loading: false } - default: - return state; - } -} - -export const loadUsers = () => { - return async dispatch => { - dispatch(loadingAction()); - try{ - const response = await fetch("https://jsonplaceholder.typicode.com/users"); - const data = await response.json(); - dispatch (loadUsersAction(data)) - } catch (e) { - dispatch(errorAction(e)); - } + return state } } \ No newline at end of file