diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..f8edba2 --- /dev/null +++ b/.env.sample @@ -0,0 +1,4 @@ +REACT_APP_AUTH_DOMAIN= +REACT_APP_AUTH_CLIENT_ID= + +REACT_APP_AUTH_REDIRECT_URI= \ No newline at end of file diff --git a/README.md b/README.md index ff4ac5f..fe3c328 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # **The Tech Prospective Survey** +[Team Collaboration Agreement](https://docs.google.com/document/d/1Ei7RcvOaHzeyUDbDCYfNEVa91ktPXAih2gQk4I0Fmmc/edit#heading=h.y52avp42q2jv) ## **Survey URL** @@ -6,13 +7,11 @@ ## **The vision** -![Survey](./public/assets/survey.png) - - The vision compiling diversity data and using it as a teaching tool to bring to light internal biases and ways to be more conscious with regard to inclusivity and diversity . ## **The Problem Domain** -- This project will revolutionize the existing survey data, making it more user friendly and potentially caching historical data. +- This project will revolutionize the existing survey data, making it more user friendly and caching historical data. ## **The Importance** @@ -31,216 +30,58 @@ - View data on a stylized graph. - Compare data by multiple students in one class. - See how many students participate in the survey. +- Have multiple active surveys each being for an individual class -#### *Out of Scope* - -- Data from other schools and students will not be visible. -- New students' data from other schools cannot be added. - -### Minimum Viable Product - -![Survey Questions](./public/assets/surveyquestion.png) - -- **What will your MVP functionality be?** - - Access and complete the survey. - - Store immediate survey data in the DB. - - Render a stylized graph of the immediate data. - -### Stretch Goals - -- **What are your stretch goals?** - - Cache historical data. - - Develop a graph modeling historical data. - - Allow the user to access historical data and trends. -- **What stretch goals are you going to aim for?** - - The ability to store historical data. - -## **Software Requirements** - -### **Functional Requirements** - -- User will be able to complete the survey and submit data. -- User will be able to access a stylized graph of the immediate data. -- User will be able to secure data and login information. - -### **Non-Functional Requirements** - -- **Security** - - Our app will use Auth0 to make sure we have authorized users - - This will allow us to track and personalize to our users - - Our backend will validate requests to make sure it is coming from our front end - - Managing the uses of our api and databases so only our users are able to access those resources - -- **Database** - - Each item belongs to a single location - - The two databases will be a Student database and a Class database - - There will be a identifier in the DB associated with the class - - Each student will have a single class - -### **Data Flow** - -![Data flow for the survey](./public/assets/surveydata.png) - -### DataBase Schemas - -```js - -ClassSurvey = { - ClassNumber : Number, - Identifier : String, - ClassCount : Number, - Instructor : String, - thumbnail : String, //url - note: String //optional -} -``` ## How To Use **The Tech Perspective Survey** - ## Step One +Be sure you are in the directory in which you want these repos to live before you clone. -- begin by running: -- `git clone` then copy and paste `git@github.com:Meltingpot-Data/techperspective-front.git` +Begin by running: +`git clone https://github.com/teamRed-d85/techperspective-front.git` -- Do the same for the backend repo: -- `git clone` then copy and paste `git@github.com:Meltingpot-Data/techperspective-back.git` +Do the same for the backend repo: +`git clone https://github.com/teamRed-d85/techperspective-back.git` ## Step Two -- run: `cd techperspective-front` -- then (installs node modules): `npm install` -- then (installs dependencies): `npm i express bootstrap nodemon cors dotenv mongoose jwt bcrypt base-64 supertest sqlite3 jsonwebtoken` -- repeat **step two** for 'back' - -## Step Three - -- Your are going to need to create a `.env` in order to use the server, follow the guide in the provided `.sample.env` file. - -## How to Use - -- Click on the provided link here: [Survey Admin Portal](https://tech-perspective-survey.netlify.app/admin) - -## To start server - -- run: `npm start` -*To test the server* - -- run: `npm run test` -*To run the tests* - -## **Team Meltingpot-Data** - -![MPD](./public/assets/MeltingpotData.jpg) - -## Our Cooperation Plan +In your terminal and inside of the root directory of the project `cd techperspective-front` +- then `npm install` +- then `npm install` -### Team Key Strengths? +- repeat **step two** for 'techperspective-back' -**Erik** Program Management, React, JavaScript, teamwork, bootstrap-react -**Joey** Front-end Design, creative, communication, leadership, team building, all-around BA -**Emily** Front-end design, layout and CSS -**Ryan** Cool bird Dad, testing/bug hunting, Master of parrot gifs -**Michael** Backend creation, Javascript development and problem solving - -**How are we going to utilize these strengths?** - -- **Emily** and **Joey** will take point on the creative styling and UI. -- **Ryan** and **Michael** will tackle the backend development. -- **Joey** and **Erik** will co-lead the team and ensure all docs and details are submitted and taken care of. - -### Team Professional Competencies - -1. **Joey** wants to work on leadership and project management. -2. **Erik** wants to work on communication and making his presentations sound more natural. -3. **Emily** would like to refine her teamwork skills. -4. **Michael** Would like to improve his communication and public speaking. -5. **Ryan** endeavors to hone his technical skills. - -### Day to day work schedule - -- 9:00am to 6:00pm 12pm-2pm lunch designed but open to interpretation. -- Morning standup to go over what is planned. -- Afternoon (~5:00PM) will be bringing all the code together and planning for the next day/ - -## Conflict Plan - -- **Conflict Resolution** - - One-on-one discussion, - - Mediation with another group member, - - Group discussion, - - Elevate to the next level as necessary. - -## Communication Plan - -### **Availability** - -- **Joey** 12AM cutoff (but is an insomniac - available for friends at all times) -- **Erik** 12AM -- **Emily** 12AM (EST) -- **Michael** 12AM -- **Ryan** 12AM but also available whenever - -### **Communication Platforms?** - -- Slack -- Remo -- Zoom/Discord - -### Breaks an off hours - -- As needed but will have planned lunch -- If we start to fall behind? - - Reevaluate what is MVP for us -- *Communication on off hours* - - Slack - - text (for urgent needs) - -### Making sure to hear all voices - -- Everyone will be sharing at stand up and stand down. -- Frame responses with mutual respect. - -## Diversity Equity and Inclusion Plan - -- **Joey** is going to do his best to check his internal biases and assumptions of others. -- **Erik** speak up in challenging situations and bravery. -- **Emily** wants to work on not being so mean to men and take action to reduce stressful situations. -- **Michael** wants to ensure all voices are heard. -- **Ryan** wants to work on examining his assumptions. - -## Work Plan - -### **Tools for collaboration and workflow** - -- We will be creating a task list to manage things from our Trello board. -- LiveShare on VS code. - -### **Git Process** - -- Frontend and backend will live on the GitHub -- Making an organization -- Working on own branches -- Push to staging and test -- Otherwise push as needed - -### **PR Processes** - -- Two other reviews for main -- One for staging -- Merging hopeful once a day but as necessary +## Step Three -### **Credit and Co-Conspirators** +- Your are going to need to create a `.env` file in your frontend and backend root directories. Below are the env variables you will need. -- This amazing final project was thoughtfully created and masterfully crafted by the master-minds of **Erik Savage**, **Michael Metcalf**, **Joey Hernandez**, **Emily Landers**, and **Ryan Lee**! +FRONT END! +``` +REACT_APP_AUTH_DOMAIN= +REACT_APP_AUTH_CLIENT_ID= +REACT_APP_AUTH_REDIRECT_URI= +REACT_APP_SERVER_URL= +``` -### **Contact the Team** +BACK END! +``` +MONGO_DB=mongodb+srv://:@cluster0.uj68i.mongodb.net/?retryWrites=true&w=majority +JOTFORM_API= +JOTFORM_TEMPLATE=212435934626054 +JWKS_URI= +``` -[Follow Joey on LinkedIn](https://www.linkedin.com/in/jmhernandez2six/) +You can obtain your JotForm API key from [JotForm](https://www.jotform.com/) +1. Make an account +2. Log in +3. Click on profile icon picture in the top right and select `Settings` +4. In the left column click `API` and then click the `Create New Key` button to generate an API key -[Follow Erik on LinkedIn](https://www.linkedin.com/in/erikksavage/) -[Follow Emily on LinkedIn](https://www.linkedin.com/in/emily-landers-/) +## To start server -[Follow Michael on LinkedIn](https://www.linkedin.com/in/mt-metcalf/) +- Within your backend root directory type `npm start` or `nodemon` if you have that installed globally +This will start the backend services. -[Follow Ryan on LinkedIn](https://www.linkedin.com/in/ryanyinlee/) +- Within your frontend root directory type `npm run` +This will start up your frontend React project files diff --git a/package-lock.json b/package-lock.json index eab0296..bb9ee53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,11 +22,13 @@ "react": "^17.0.2", "react-bootstrap": "^2.0.4", "react-chartjs-2": "^4.0.0", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^17.0.2", "react-iframe": "^1.8.0", "react-router-dom": "^6.2.1", "react-scripts": "5.0.0", - "web-vitals": "^2.1.2" + "web-vitals": "^2.1.2", + "with-router": "^1.0.1" }, "devDependencies": { "postcss": "^8.4.5", @@ -1918,6 +1920,21 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1948,6 +1965,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", @@ -4064,13 +4086,13 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -4094,34 +4116,6 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", @@ -4506,6 +4500,34 @@ "webpack": ">=2" } }, + "node_modules/babel-loader/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/babel-loader/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/babel-loader/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/babel-loader/node_modules/json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -5369,6 +5391,14 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "node_modules/copy-to-clipboard": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz", + "integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, "node_modules/core-js": { "version": "3.20.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.0.tgz", @@ -5581,21 +5611,6 @@ } } }, - "node_modules/css-minimizer-webpack-plugin/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/css-minimizer-webpack-plugin/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -5607,11 +5622,6 @@ "ajv": "^8.8.2" } }, - "node_modules/css-minimizer-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/css-minimizer-webpack-plugin/node_modules/schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -7016,6 +7026,21 @@ "webpack": "^5.0.0" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -7110,6 +7135,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7622,6 +7652,29 @@ } } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -7704,6 +7757,11 @@ "node": ">=8" } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -10831,9 +10889,9 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -11262,21 +11320,6 @@ "webpack": "^5.0.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -11288,11 +11331,6 @@ "ajv": "^8.8.2" } }, - "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -13430,13 +13468,13 @@ } }, "node_modules/prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", - "react-is": "^16.8.1" + "react-is": "^16.13.1" } }, "node_modules/prop-types-extra": { @@ -13653,6 +13691,18 @@ "react": "^16.8.0 || ^17.0.0" } }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/react-dev-utils": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.0.tgz", @@ -14604,6 +14654,34 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -15583,6 +15661,11 @@ "node": ">=8.0" } }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI=" + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -15727,6 +15810,19 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -16069,21 +16165,6 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -16095,11 +16176,6 @@ "ajv": "^8.8.2" } }, - "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/webpack-dev-middleware/node_modules/schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -16164,21 +16240,6 @@ } } }, - "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/webpack-dev-server/node_modules/ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -16201,11 +16262,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/webpack-dev-server/node_modules/schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -16402,6 +16458,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/with-router": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/with-router/-/with-router-1.0.1.tgz", + "integrity": "sha512-Jc/rG+uhJ9iqRWJjQAB9kKQiwk+L35p9OsXqDJU/n/BoFEsgEQLcXzYZ/MS4jsnXsjYs07C/hQhsSZSUir85NA==" + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -16475,21 +16536,6 @@ "node": ">=10.0.0" } }, - "node_modules/workbox-build/node_modules/ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/workbox-build/node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -16504,11 +16550,6 @@ "node": ">=10" } }, - "node_modules/workbox-build/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "node_modules/workbox-build/node_modules/source-map": { "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", @@ -18125,6 +18166,17 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -18145,6 +18197,11 @@ "requires": { "argparse": "^2.0.1" } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" } } }, @@ -19706,13 +19763,13 @@ } }, "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, @@ -19722,32 +19779,8 @@ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "requires": { "ajv": "^8.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - } } }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "requires": {} - }, "alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", @@ -20014,6 +20047,28 @@ "schema-utils": "^2.6.5" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -20695,6 +20750,14 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "copy-to-clipboard": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz", + "integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==", + "requires": { + "toggle-selection": "^1.0.6" + } + }, "core-js": { "version": "3.20.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.0.tgz", @@ -20831,17 +20894,6 @@ "source-map": "^0.6.1" }, "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -20850,11 +20902,6 @@ "fast-deep-equal": "^3.1.3" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -21618,6 +21665,17 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -21679,6 +21737,11 @@ "argparse": "^2.0.1" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -22344,6 +22407,23 @@ "tapable": "^1.0.0" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -22402,6 +22482,11 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -24647,9 +24732,9 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -24969,17 +25054,6 @@ "schema-utils": "^4.0.0" }, "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -24988,11 +25062,6 @@ "fast-deep-equal": "^3.1.3" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -26386,13 +26455,13 @@ } }, "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", - "react-is": "^16.8.1" + "react-is": "^16.13.1" } }, "prop-types-extra": { @@ -26545,6 +26614,15 @@ "integrity": "sha512-0kx41EVO6wIoeU6zvdwovX9kKcdrs7O62DGTSNmwAXZeLGJ3U+n4XijO1kxcMmAi4I6PQJWGD5oRwxVixHSp6g==", "requires": {} }, + "react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "requires": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + } + }, "react-dev-utils": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.0.tgz", @@ -27230,6 +27308,30 @@ "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + } } }, "select-hose": { @@ -27980,6 +28082,11 @@ "is-number": "^7.0.0" } }, + "toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI=" + }, "toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -28089,6 +28196,12 @@ "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", + "peer": true + }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -28368,17 +28481,6 @@ "schema-utils": "^4.0.0" }, "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -28387,11 +28489,6 @@ "fast-deep-equal": "^3.1.3" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -28437,17 +28534,6 @@ "ws": "^8.1.0" }, "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", @@ -28461,11 +28547,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", @@ -28586,6 +28667,11 @@ "is-symbol": "^1.0.3" } }, + "with-router": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/with-router/-/with-router-1.0.1.tgz", + "integrity": "sha512-Jc/rG+uhJ9iqRWJjQAB9kKQiwk+L35p9OsXqDJU/n/BoFEsgEQLcXzYZ/MS4jsnXsjYs07C/hQhsSZSUir85NA==" + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -28653,17 +28739,6 @@ "workbox-window": "6.4.2" }, "dependencies": { - "ajv": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", - "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -28675,11 +28750,6 @@ "universalify": "^2.0.0" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, "source-map": { "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", diff --git a/package.json b/package.json index acf48a1..b82187a 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,13 @@ "react": "^17.0.2", "react-bootstrap": "^2.0.4", "react-chartjs-2": "^4.0.0", + "react-copy-to-clipboard": "^5.1.0", "react-dom": "^17.0.2", "react-iframe": "^1.8.0", "react-router-dom": "^6.2.1", "react-scripts": "5.0.0", - "web-vitals": "^2.1.2" + "web-vitals": "^2.1.2", + "with-router": "^1.0.1" }, "scripts": { "start": "react-scripts start", diff --git a/public/assets/MeltingpotData.jpg b/public/assets/MeltingpotData.jpg deleted file mode 100644 index c8a03ec..0000000 Binary files a/public/assets/MeltingpotData.jpg and /dev/null differ diff --git a/public/assets/cody.png b/public/assets/cody.png new file mode 100644 index 0000000..960336e Binary files /dev/null and b/public/assets/cody.png differ diff --git a/public/assets/dana.jpg b/public/assets/dana.jpg new file mode 100644 index 0000000..8df4794 Binary files /dev/null and b/public/assets/dana.jpg differ diff --git a/public/assets/katharine.jpg b/public/assets/katharine.jpg new file mode 100644 index 0000000..2527304 Binary files /dev/null and b/public/assets/katharine.jpg differ diff --git a/public/assets/stanley.jpg b/public/assets/stanley.jpg new file mode 100644 index 0000000..499d215 Binary files /dev/null and b/public/assets/stanley.jpg differ diff --git a/public/assets/survey.png b/public/assets/survey.png deleted file mode 100644 index a269cca..0000000 Binary files a/public/assets/survey.png and /dev/null differ diff --git a/public/assets/surveyadmin.png b/public/assets/surveyadmin.png deleted file mode 100644 index 380b5bf..0000000 Binary files a/public/assets/surveyadmin.png and /dev/null differ diff --git a/public/assets/surveydata.png b/public/assets/surveydata.png deleted file mode 100644 index 973e4c5..0000000 Binary files a/public/assets/surveydata.png and /dev/null differ diff --git a/public/assets/surveyquestion.png b/public/assets/surveyquestion.png deleted file mode 100644 index ba3d732..0000000 Binary files a/public/assets/surveyquestion.png and /dev/null differ diff --git a/src/App.js b/src/App.js index 663a035..7014812 100644 --- a/src/App.js +++ b/src/App.js @@ -4,13 +4,14 @@ import Survey from './components/Survey'; import Admin from './components/Admin'; import Results from './components/Results'; import AboutUs from './components/AboutUs'; +import Welcome from './components/Welcome'; import { withAuth0 } from '@auth0/auth0-react'; import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; -import axios from "axios"; +import axios from "axios"; class App extends Component { @@ -21,12 +22,16 @@ class App extends Component { surveyData: [], surveyId: null, error: false, - surveyToGraph: [] + surveyToGraph: [] } } - graphResults = (obj) =>{ - this.setState({surveyToGraph: obj}) + + /* API call to Jotform submissions */ + graphResults = async (id) => { + const obj = await axios.get(`${process.env.REACT_APP_SERVER_URL}/results/${id}`); + this.setState({ surveyToGraph: obj.data }); } + /* Grab survey data from server, which grabs from db */ getSavedSurvey = async () => { if (this.props.auth0.isAuthenticated) { @@ -77,92 +82,79 @@ class App extends Component { } /* Ping server to create a new survey ID to enter into the survey Iframe*/ - createNewSurvey = async () => { - console.log('new survey button works'); - let url = `${process.env.REACT_APP_SERVER_URL}/jotform` + createNewSurvey = async (name) => { + let url = `${process.env.REACT_APP_SERVER_URL}/jotform/${name}` try { const newSurveyObj = await axios.post(url); - this.setState({ activeSurvey: newSurveyObj.data }); + + this.setState({ activeSurvey: [newSurveyObj.data, ...this.state.activeSurvey] }); } catch (error) { console.log(error, 'could not create new survey'); } } - /* Ping Jotform to clone a survey for the next class */ + /* Ping Jotform to clone a survey */ getActiveSurvey = async () => { - // if (this.props.auth0.isAuthenticated) { - // const tokenResponse = await this.props.auth0.getIdTokenClaims(); - // const jwt = tokenResponse.__raw; - // } - const axiosRequestConfig = { - method: 'get', - baseURL: process.env.REACT_APP_SERVER_URL, - url: `/active`, - // headers: { "Authorization": `Bearer ${jwt}` } - } - // const url = `${process.env.REACT_APP_SERVER_URL}/active` - try { - const activeSurvey = await axios(axiosRequestConfig); - this.setState({ activeSurvey: activeSurvey.data }); - } catch (error) { - console.log(error, 'No Active Survey'); - } - + + const axiosRequestConfig = { + method: 'get', + baseURL: process.env.REACT_APP_SERVER_URL, + url: `/active`, + } + try { + const activeSurvey = await axios(axiosRequestConfig); + this.setState({ activeSurvey: activeSurvey.data }); + + } catch (error) { + console.log(error, 'No Active Survey'); + } + } /* Archive the survey */ - putActiveSurvey = async () => { + putActiveSurvey = async (survey) => { if (this.props.auth0.isAuthenticated) { const tokenResponse = await this.props.auth0.getIdTokenClaims(); const jwt = tokenResponse.__raw; - console.log(this.state.activeSurvey); - this.state.activeSurvey.active = false; - console.log(this.state.activeSurvey); + survey.active = false; const axiosRequestConfig = { method: 'post', baseURL: process.env.REACT_APP_SERVER_URL, url: `/survey`, - data: this.state.activeSurvey, + data: survey, headers: { "Authorization": `Bearer ${jwt}` } - + } try { - - await axios(axiosRequestConfig); - this.getActiveSurvey(); + + await axios(axiosRequestConfig); + this.getActiveSurvey(); } catch (error) { - console.log(error, 'could not archive survey'); + console.log(error, 'could not archive survey'); } } window.location.reload(); } - - - -//Adds Auth0 Integration + //Adds Auth0 Integration getConfig = async () => { if (this.props.auth0.isAuthenticated) { const res = await this.props.auth0.getIdTokenClaims(); const jwt = res.__raw; - console.log(res); - console.log(jwt); const config = { - headers: { "Authorization": `Bearer ${jwt}`}, + headers: { "Authorization": `Bearer ${jwt}` }, } - console.log(config); return config; } } componentDidMount() { - this.getActiveSurvey(); } @@ -173,10 +165,14 @@ class App extends Component {
+ {/* route to admin panel */} } /> - } /> - } /> + {/* route to results graph */} + } /> + {/* route to individual surveys */} + } /> } /> + } /> diff --git a/src/components/AboutUs.js b/src/components/AboutUs.js index 7e3fe48..04fba07 100644 --- a/src/components/AboutUs.js +++ b/src/components/AboutUs.js @@ -3,7 +3,6 @@ import Container from 'react-bootstrap/Container'; import Row from 'react-bootstrap/Row'; import bios from './aboutUs.json'; import BioCard from './BioCard' -// import '../css/aboutUs.css'; export default class AboutUs extends Component { @@ -12,7 +11,7 @@ export default class AboutUs extends Component { return ( <> -

We Are Melting-Pot Data

+

We Are Team Red

{ + this.setState({ + show: !this.state.show, + target: event.target + }) + + } render() { return ( - - Active Survey + + {this.props.activeSurvey.surveyName} + - + + {/* Copies individual survey link */} + + + + + {/* confirms copy w/ tooltip */} + + {(props) => ( + + Copied! + + )} + - {this.props.activeSurvey.createdOn} Survey ID: {this.props.activeSurvey.surveyID} - - Submission Count: {this.props.activeSurvey.submissionCount} - - - + + + diff --git a/src/components/ActiveSurveyContainer.js b/src/components/ActiveSurveyContainer.js index 97132c5..7514312 100644 --- a/src/components/ActiveSurveyContainer.js +++ b/src/components/ActiveSurveyContainer.js @@ -1,6 +1,5 @@ import { Component } from "react"; -import NewSurveyButton from "./NewSurveyButton"; -import ActiveSurvey from "./ActiveSurvey"; +import ActiveSurvey from "./ActiveSurvey" class ActiveSurveyContainer extends Component { componentDidMount() { @@ -9,14 +8,20 @@ class ActiveSurveyContainer extends Component { render() { return ( <> -

-
- - {this.props.activeSurvey === null && } - {this.props.activeSurvey && } - -
-

+

+ +
+ + {this.props.activeSurvey && this.props.activeSurvey.map((survey, idx) => { + return ( + + + + ) + })} + +
+

) } diff --git a/src/components/Admin.js b/src/components/Admin.js index 6cc21d9..1a36153 100644 --- a/src/components/Admin.js +++ b/src/components/Admin.js @@ -3,8 +3,8 @@ import SurveySummaryList from './SurveySummaryList'; import ActiveSurveyContainer from './ActiveSurveyContainer'; import ConfirmModal from './ConfirmModal'; import { withAuth0 } from '@auth0/auth0-react'; -import LoginButton from './LoginButton'; -import Row from 'react-bootstrap/Row'; +import NewSurveyButton from './NewSurveyButton'; +import NewSurveyModal from './NewSurveyModal'; class Admin extends Component { @@ -12,36 +12,58 @@ class Admin extends Component { super(props); this.state = { showModal: false, + selectedSurvey: null, + showNewSurveyModal: false + } } + // for ConfirmModal.js closeModal = () => { this.setState({ showModal: false }) } - openModal = () => { - this.setState({ showModal: true }) + openModal = (selectedSurvey) => { + this.setState({ + showModal: true, + selectedSurvey: selectedSurvey + }) + } + + // for NewSurveyModal.js + closeNewSurveyModal = () => { + this.setState({ showNewSurveyModal: false }) } + openNewSurveyModal = () => { + this.setState({ + showNewSurveyModal: true, + + }) + } + componentDidMount() { - console.log(this.props.auth0.isAuthenticated); this.props.getActiveSurvey(); } render() { - console.log("we are looking at Admin.js", this.props.auth0.isAuthenticated); return (
- - {this.props.auth0.isAuthenticated ? + + + + + {this.props.auth0.isAuthenticated && <> - - + + {/* Future task: add update API Button*/} + +

Active Surveys

+ {this.props.activeSurvey && } + +

Archived Surveys

- : - - - } + }
) } diff --git a/src/components/ConfirmModal.js b/src/components/ConfirmModal.js index c4805f7..6ec64a1 100644 --- a/src/components/ConfirmModal.js +++ b/src/components/ConfirmModal.js @@ -3,8 +3,8 @@ import Modal from 'react-bootstrap/Modal'; import Button from 'react-bootstrap/Button'; class ConfirmModal extends Component { - handleConfirm = () => { - this.props.putActiveSurvey(); + handleConfirm = (survey) => { + this.props.putActiveSurvey(survey); this.props.closeModal(); } @@ -22,7 +22,7 @@ class ConfirmModal extends Component { - diff --git a/src/components/DeleteButton.js b/src/components/DeleteButton.js index 4838d2a..7557baa 100644 --- a/src/components/DeleteButton.js +++ b/src/components/DeleteButton.js @@ -8,7 +8,7 @@ export default class DeleteButton extends Component { render() { return ( - + ) } } diff --git a/src/components/Footer.js b/src/components/Footer.js index fb18a20..ddc2fe3 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -5,7 +5,7 @@ class Footer extends Component { render(){ return( - ©Codefellows and Melting-Pot Data + ©Codefellows and Team Red ) } diff --git a/src/components/Header.js b/src/components/Header.js index a5190d8..ee25928 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -3,55 +3,46 @@ import { Link } from "react-router-dom"; import { withAuth0 } from '@auth0/auth0-react' import Button from "react-bootstrap/Button"; import Image from "react-bootstrap/Image"; -import Row from "react-bootstrap/Row"; -import Col from "react-bootstrap/Col"; +import LoginButton from './LoginButton' -class Header extends Component { - handleLoginClick = () => { - console.log("Yay! You logged in"); - }; +import { Navbar, Container, Nav } from 'react-bootstrap' +import LogoutButton from "./LogOutButton"; - handleLogOutClick = () => { - console.log("See ya! You logged out"); - }; +class Header extends Component { render() { return ( - <> - - - - - - - {this.props.auth0.isAuthenticated ? - -
- - - - - - - -

- - - - - - - - -

-
- - : <>} -
- + <> + + + + + + + {this.props.auth0.isAuthenticated ? + <> + + + + + + + + + + + : + } + + ); } diff --git a/src/components/LogOutButton.js b/src/components/LogOutButton.js index ae8ba15..5dae4d0 100644 --- a/src/components/LogOutButton.js +++ b/src/components/LogOutButton.js @@ -1,14 +1,14 @@ -//import React, { Component } from 'react' -import { useAuth0 } from '@auth0/auth0-react'; +import Button from "react-bootstrap/Button"; +import { useAuth0 } from "@auth0/auth0-react"; const LogoutButton = () => { - const { logout } = useAuth0(); + const { logout } = useAuth0(); - return ( - - ) + return ( + + ) } export default LogoutButton; diff --git a/src/components/LoginButton.js b/src/components/LoginButton.js index 922be2d..bf50d7a 100644 --- a/src/components/LoginButton.js +++ b/src/components/LoginButton.js @@ -5,9 +5,8 @@ import Button from 'react-bootstrap/Button'; class LoginButton extends Component { render() { - console.log("class component login", this.props.auth0.isAuthenticated) return ( - + ) } } diff --git a/src/components/Metcalf_pic.jpg b/src/components/Metcalf_pic.jpg deleted file mode 100644 index 3d46522..0000000 Binary files a/src/components/Metcalf_pic.jpg and /dev/null differ diff --git a/src/components/NewSurveyButton.js b/src/components/NewSurveyButton.js index 105c74b..7e78ee9 100644 --- a/src/components/NewSurveyButton.js +++ b/src/components/NewSurveyButton.js @@ -4,7 +4,7 @@ import Button from 'react-bootstrap/Button'; class NewSurveyButton extends Component { render() { return ( - + ) } } diff --git a/src/components/NewSurveyModal.js b/src/components/NewSurveyModal.js new file mode 100644 index 0000000..71d12b3 --- /dev/null +++ b/src/components/NewSurveyModal.js @@ -0,0 +1,55 @@ +import { Component } from 'react'; +import Modal from 'react-bootstrap/Modal'; +import Button from 'react-bootstrap/Button'; +import Form from 'react-bootstrap/Form'; + +class NewSurveyModal extends Component { + constructor(props) { + super(props); + this.state = { + name: '' + } + } + + surveyName = (e) => { + this.setState({ + name: e.target.value + }) + } + + handleConfirm = (e) => { + e.preventDefault(); + this.props.closeNewSurveyModal(); + this.props.createNewSurvey(this.state.name); + + } + render() { + return ( + <> + +
+ + Add New Survey + + + + New Survey + + + + + + + +
+
+ + ) + } +} + +export default NewSurveyModal; \ No newline at end of file diff --git a/src/components/Results.js b/src/components/Results.js index 4400db3..f77ffdc 100644 --- a/src/components/Results.js +++ b/src/components/Results.js @@ -4,13 +4,14 @@ import ResultsGraph from './ResultsGraph'; class Results extends Component { - + render() { return ( - <> + <> -
- +
+
) diff --git a/src/components/ResultsButton.js b/src/components/ResultsButton.js index b6c0e6b..37b6277 100644 --- a/src/components/ResultsButton.js +++ b/src/components/ResultsButton.js @@ -1,19 +1,16 @@ import React, { Component } from 'react'; import Button from 'react-bootstrap/Button'; import { Link } from 'react-router-dom'; -// import ResultsGraph from './ResultsGraph'; export default class ResultsButton extends Component { - handleClick = () => { - this.props.graphResults(this.props.surveyData) - } render() { return ( <> - + diff --git a/src/components/ResultsGraph.js b/src/components/ResultsGraph.js index 3b1e252..2a36615 100644 --- a/src/components/ResultsGraph.js +++ b/src/components/ResultsGraph.js @@ -10,7 +10,6 @@ import { } from 'chart.js'; import { Bar } from 'react-chartjs-2'; - ChartJS.register( CategoryScale, LinearScale, @@ -19,31 +18,34 @@ ChartJS.register( Tooltip, Legend ); - export const options = { responsive: true, + scales: { + y: { + ticks: { + callback: function(value) {if (value % 1 === 0) return value}, + } + } + }, plugins: { legend: { - position: 'top', + position: 'bottom', }, title: { display: true, - text: 'Chart.js Bar Chart', + text: 'Number of People who took the survey', + position: 'left' }, }, }; -export default function ResultsGraph(props) { -const labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"] -if (!props.surveyToGraph){ + export default function ResultsGraph(props) { + + const labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"] + if (!props.surveyToGraph) { return null } -console.log(props.surveyToGraph) - - - - const data = { labels, datasets: [ @@ -55,9 +57,10 @@ const data = { ], }; - - return ; + options={options} +/>; } diff --git a/src/components/ResultsHeader.js b/src/components/ResultsHeader.js index 29c5b93..ada60ba 100644 --- a/src/components/ResultsHeader.js +++ b/src/components/ResultsHeader.js @@ -8,7 +8,6 @@ class ResultsHeader extends Component { <>

Survey Results

-
) diff --git a/src/components/Survey.js b/src/components/Survey.js index b73afe0..0d3e232 100644 --- a/src/components/Survey.js +++ b/src/components/Survey.js @@ -1,8 +1,10 @@ import React, { Component } from 'react'; import SurveyIframe from './SurveyIframe'; + export default class Survey extends Component { render() { + const id = window.location.pathname.slice(1); return (


@@ -12,8 +14,10 @@ export default class Survey extends Component {

Be sure to hit "SUBMIT" after answering the last question.



- {this.props.activeSurvey ? :

No active survey available.

} +
) } } + + diff --git a/src/components/SurveyIframe.js b/src/components/SurveyIframe.js index 00e074d..183667f 100644 --- a/src/components/SurveyIframe.js +++ b/src/components/SurveyIframe.js @@ -3,26 +3,20 @@ import Card from "react-bootstrap/Card"; import Iframe from "react-iframe"; // Iframe docs here: https://www.npmjs.com/package/react-iframe -// import JotformEmbed from 'react-jotform-embed'; -// 213535497610053 current -// 211237450605043 old survey ID - -// Figure out why this does not link to the process.env -// ${process.env.REACT_APP_JOTFORM_SURVEY_ID} export default class SurveyIframe extends Component { + render() { return (
- {this.props.activeSurvey &&