Skip to content

Commit 458a51f

Browse files
committed
updated web project with readme and updated mgt
1 parent da075bd commit 458a51f

File tree

4 files changed

+53
-74
lines changed

4 files changed

+53
-74
lines changed

ContosoNotesWeb/README.md

+14-35
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,25 @@
1-
# Getting Started with Create React App
1+
# Contoso Notes Web
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
This is a companion web app for the Contoso Notes app.
44

5-
## Available Scripts
5+
It is only capable of reading the notes, but not writing back to OneDrive.
66

7-
In the project directory, you can run:
7+
## Get started
88

9-
### `yarn start`
9+
Install all dependencies
1010

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11+
```bash
12+
> npm i -g yarn # if you don't have it already
1313

14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
14+
> yarn
15+
```
1616

17-
### `yarn test`
17+
Run the project
1818

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21-
22-
### `yarn build`
23-
24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
26-
27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
29-
30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31-
32-
### `yarn eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35-
36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
19+
```bash
20+
> yarn start
21+
```
4122

4223
## Learn More
4324

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
25+
This app was built with the [Microsoft Graph Toolkit](https://aka.ms/mgt) for auth and Microsoft Graph access

ContosoNotesWeb/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@microsoft/mgt-element": "^2.2.0-preview.9f2ad63",
7-
"@microsoft/mgt-msal2-provider": "^2.2.0-preview.9f2ad63",
8-
"@microsoft/mgt-react": "^2.2.0-preview.9f2ad63",
6+
"@microsoft/mgt-element": "^2.2.0",
7+
"@microsoft/mgt-msal2-provider": "^2.2.0",
8+
"@microsoft/mgt-react": "^2.2.0",
99
"@testing-library/jest-dom": "^5.11.4",
1010
"@testing-library/react": "^11.1.0",
1111
"@testing-library/user-event": "^12.1.10",

ContosoNotesWeb/src/App.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function Note(props: any) {
8484
const {noteItems, title} = props;
8585

8686
return <div className="notes-container">
87-
<h1 className="note-title" contentEditable>
87+
<h1 className="note-title">
8888
{title}
8989
</h1>
9090
{noteItems.map((note: any, index: number) => (
@@ -100,7 +100,7 @@ function NoteItem(props: any) {
100100
return <TodoNoteItem note={note}/>
101101
}
102102

103-
return <div className="notes-item" contentEditable dangerouslySetInnerHTML={getHtmlFromText(note.Text)}></div>
103+
return <div className="notes-item" dangerouslySetInnerHTML={getHtmlFromText(note.Text)}></div>
104104
}
105105

106106
function TodoNoteItem(props: any) {
@@ -143,7 +143,7 @@ function TodoNoteItem(props: any) {
143143

144144
return <div className="notes-item task-item">
145145
<input disabled={loading} type="checkbox" checked={state.IsCompleted} onChange={onCompletedChanged} />
146-
<span contentEditable>{state.Text}</span>
146+
<span>{state.Text}</span>
147147
</div>
148148
}
149149

ContosoNotesWeb/yarn.lock

+33-33
Original file line numberDiff line numberDiff line change
@@ -1410,45 +1410,45 @@
14101410
"@types/yargs" "^15.0.0"
14111411
chalk "^4.0.0"
14121412

1413-
"@microsoft/[email protected]-preview.9f2ad63":
1414-
version "2.2.0-preview.9f2ad63"
1415-
resolved "https://registry.yarnpkg.com/@microsoft/mgt-components/-/mgt-components-2.2.0-preview.9f2ad63.tgz#10462f691d2ef84d06a9e77b582bc921d69c8e2a"
1416-
integrity sha512-Z0z/df3UmLYY/lZyyMQRMgEROugioAizGp9dnC5TSjPOMP/Haev+BIlDi/oC6/urn4dthmy5EW4ElaxYluDKTw==
1413+
"@microsoft/[email protected]":
1414+
version "2.2.0"
1415+
resolved "https://registry.yarnpkg.com/@microsoft/mgt-components/-/mgt-components-2.2.0.tgz#27de54b1068e32d8df4cf5226526393077f134a5"
1416+
integrity sha512-X5jk9iIYvGCZwuLxT1WnXr8hPkR7ddgvxe+TtFBO/y0YyjiyqXQc5/cDdQrYNMypJGgM8paJ5hjP1VRXDJ8jCQ==
14171417
dependencies:
1418-
"@microsoft/mgt-element" "2.2.0-preview.9f2ad63"
1418+
"@microsoft/mgt-element" "2.2.0"
14191419
"@microsoft/microsoft-graph-client" "^2.2.1"
14201420
"@microsoft/microsoft-graph-types" "^1.36.0"
1421-
"@microsoft/microsoft-graph-types-beta" "^0.4.0-preview"
1421+
"@microsoft/microsoft-graph-types-beta" "^0.7.0-preview"
14221422
office-ui-fabric-core "11.0.0"
14231423

1424-
"@microsoft/[email protected]-preview.9f2ad63", "@microsoft/mgt-element@^2.2.0-preview.9f2ad63":
1425-
version "2.2.0-preview.9f2ad63"
1426-
resolved "https://registry.yarnpkg.com/@microsoft/mgt-element/-/mgt-element-2.2.0-preview.9f2ad63.tgz#f442413e5f1a9fbb64cdec8c1fbfed751145d852"
1427-
integrity sha512-nl8lm6tbSzh0qzt+K+Esw5dfKPSTfPp+8io2gbpulMrFZY2exWNdLQz3M6xLJSscEsvYwQfDmzQZ6DKK/pqmhA==
1424+
"@microsoft/[email protected]", "@microsoft/mgt-element@^2.2.0":
1425+
version "2.2.0"
1426+
resolved "https://registry.yarnpkg.com/@microsoft/mgt-element/-/mgt-element-2.2.0.tgz#859fa5b9e2467931e201934f19632e58af421b39"
1427+
integrity sha512-tlh9t3g0odKTGBVz681FgiI6Ti49g2VDuun3+9uYs8pNTDvOXdbuqcZJvbqnlGMLOfHFkMI6UNG/rymx8hQ4lQ==
14281428
dependencies:
14291429
"@microsoft/microsoft-graph-client" "^2.2.1"
1430-
idb "^6.0.0"
1430+
idb "6.0.0"
14311431
lit-element "^2.4.0"
14321432

1433-
"@microsoft/mgt-msal2-provider@^2.2.0-preview.9f2ad63":
1434-
version "2.2.0-preview.9f2ad63"
1435-
resolved "https://registry.yarnpkg.com/@microsoft/mgt-msal2-provider/-/mgt-msal2-provider-2.2.0-preview.9f2ad63.tgz#0cee625e91522a11d8ba7ba9612984c0594e728d"
1436-
integrity sha512-8XQhY2BCgJPySq75bTCR3oBZyzqI7Inyl4YrFoUeoCAvdV2v2IV+fgFJEn2AKh1ZbqMPNrjBA/5CUOXtOo65QQ==
1433+
"@microsoft/mgt-msal2-provider@^2.2.0":
1434+
version "2.2.0"
1435+
resolved "https://registry.yarnpkg.com/@microsoft/mgt-msal2-provider/-/mgt-msal2-provider-2.2.0.tgz#cd629c4b3072d97b15419c379c204495ef22f209"
1436+
integrity sha512-7XftnJFdMWlV6LzLiPCEmZZNvGojzs3+yRNHR6tfUAscfEwiEa4OscVPCs/M2qoDFBht2kDL0F5SRbWkZf64Pg==
14371437
dependencies:
14381438
"@azure/msal-browser" "^2.14.1"
1439-
"@microsoft/mgt-element" "2.2.0-preview.9f2ad63"
1439+
"@microsoft/mgt-element" "2.2.0"
14401440
"@microsoft/microsoft-graph-client" "^2.2.1"
14411441

1442-
"@microsoft/mgt-react@^2.2.0-preview.9f2ad63":
1443-
version "2.2.0-preview.9f2ad63"
1444-
resolved "https://registry.yarnpkg.com/@microsoft/mgt-react/-/mgt-react-2.2.0-preview.9f2ad63.tgz#c03d7c7cdf0c62cc581032af34a893b4ed60740b"
1445-
integrity sha512-Rqc9Hw1u9bA7wdXSt5j5OCFfRNZMelOTs4wiqc3j2+9DoVRjVu/Pmb8iDxrxcRoZT2jfW0nyAx82mzpap/lQRA==
1442+
"@microsoft/mgt-react@^2.2.0":
1443+
version "2.2.0"
1444+
resolved "https://registry.yarnpkg.com/@microsoft/mgt-react/-/mgt-react-2.2.0.tgz#18c6cab49e01d201cd362f6b1d6223bef2c93849"
1445+
integrity sha512-Xpdy/69rW0iLIpyBW5nlyQnLI/GOiH40nRFU4jHRGXJaEfKKjZ33WO2fozoSD9J+6nYGAw4NbCiMnCugpQgb5A==
14461446
dependencies:
1447-
"@microsoft/mgt-components" "2.2.0-preview.9f2ad63"
1448-
"@microsoft/mgt-element" "2.2.0-preview.9f2ad63"
1447+
"@microsoft/mgt-components" "2.2.0"
1448+
"@microsoft/mgt-element" "2.2.0"
14491449
"@microsoft/microsoft-graph-types" "^1.36.0"
1450-
"@microsoft/microsoft-graph-types-beta" "^0.4.0-preview"
1451-
wc-react "^0.4.0"
1450+
"@microsoft/microsoft-graph-types-beta" "^0.7.0-preview"
1451+
wc-react "^0.5.0"
14521452

14531453
"@microsoft/microsoft-graph-client@^2.2.1":
14541454
version "2.2.1"
@@ -1459,10 +1459,10 @@
14591459
msal "^1.4.4"
14601460
tslib "^1.9.3"
14611461

1462-
"@microsoft/microsoft-graph-types-beta@^0.4.0-preview":
1463-
version "0.4.0-preview"
1464-
resolved "https://registry.yarnpkg.com/@microsoft/microsoft-graph-types-beta/-/microsoft-graph-types-beta-0.4.0-preview.tgz#d801b7d4ff42a21eb073f8ced263bc87f1eb4cd1"
1465-
integrity sha512-nj8cdv+HqnZ2a6fsgKoo/FEPKfSc/+Ug58LbqEy04dzH/Qxn61EcN9RX/CW9yNAY4Rl5oteVOTCmbM9aj1vY/Q==
1462+
"@microsoft/microsoft-graph-types-beta@^0.7.0-preview":
1463+
version "0.7.0-preview"
1464+
resolved "https://registry.yarnpkg.com/@microsoft/microsoft-graph-types-beta/-/microsoft-graph-types-beta-0.7.0-preview.tgz#d3b2a004b69738cc35941d5d1f1532a88a5d707c"
1465+
integrity sha512-yGsFq91LoLelDv4EMABnd4PeMZAsMKm5FieRf2OejOMlXEcemky8oQyIzo90SvH2xq62+PJgn41l/6NxerFY/w==
14661466

14671467
"@microsoft/microsoft-graph-types@^1.36.0":
14681468
version "1.36.0"
@@ -5698,7 +5698,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1:
56985698
dependencies:
56995699
postcss "^7.0.14"
57005700

5701-
idb@^6.0.0:
5701+
57025702
version "6.0.0"
57035703
resolved "https://registry.yarnpkg.com/idb/-/idb-6.0.0.tgz#00d6092b948138cf9bebc9dcddc4df8bf60bf0ac"
57045704
integrity sha512-+M367poGtpzAylX4pwcrZIa7cFQLfNkAOlMMLN2kw/2jGfJP6h+TB/unQNSVYwNtP8XqkLYrfuiVnxLQNP1tjA==
@@ -11063,10 +11063,10 @@ wbuf@^1.1.0, wbuf@^1.7.3:
1106311063
dependencies:
1106411064
minimalistic-assert "^1.0.0"
1106511065

11066-
wc-react@^0.4.0:
11067-
version "0.4.0"
11068-
resolved "https://registry.yarnpkg.com/wc-react/-/wc-react-0.4.0.tgz#0150290aab5c94f20c39f30967ccf095a013d43b"
11069-
integrity sha512-zPOC1fo3aITWBT8GG9W0FCK+uv6O7BkRWSozee+/hVi1pHDEazrZUv6SEbZ6KDC9hJdxOd5OB0BO+kEt9PQ2wA==
11066+
wc-react@^0.5.0:
11067+
version "0.5.0"
11068+
resolved "https://registry.yarnpkg.com/wc-react/-/wc-react-0.5.0.tgz#6a6fc1883819d10bcc556b8ecfe0c9f8e6e13ea6"
11069+
integrity sha512-3c4KzBArlfCqCYqY8hoJAIvxmzpWvoQqsOmy9OiwbnopSTE270i3R+LVD7NjE00UJkjXq7kmhobnx0qhi/eOrA==
1107011070

1107111071
web-vitals@^1.0.1:
1107211072
version "1.1.1"

0 commit comments

Comments
 (0)