From fac9d2b87b4ab566e7a020e278ecf623a740cc99 Mon Sep 17 00:00:00 2001 From: Harsha Vardhini Date: Mon, 11 May 2020 18:36:16 +0530 Subject: [PATCH 01/13] Initial commit of Save Email to SharePoint outlook add in --- .../.editorconfig | 25 +++ .../.gitignore | 32 ++++ .../.yo-rc.json | 12 ++ .../README.md | 26 +++ .../config/config.json | 18 ++ .../config/copy-assets.json | 4 + .../config/deploy-azure-storage.json | 7 + .../config/package-solution.json | 24 +++ .../config/serve.json | 10 ++ .../config/write-manifests.json | 4 + .../gulpfile.js | 7 + ...4430-a877-22cbc6251d21_outlookManifest.xml | 91 ++++++++++ .../package.json | 44 +++++ .../src/index.ts | 1 + ...SaveEmailToSharePointWebPart.manifest.json | 27 +++ .../SaveEmailToSharePointWebPart.ts | 64 +++++++ .../components/ISaveEmailToSharePointProps.ts | 6 + .../components/SPPreset.ts | 7 + .../SaveEmailToSharePoint.module.scss | 84 +++++++++ .../components/SaveEmailToSharePoint.tsx | 166 ++++++++++++++++++ .../components/Services/Services.ts | 40 +++++ .../components/email.png | Bin 0 -> 527 bytes .../saveEmailToSharePoint/loc/en-us.js | 13 ++ .../saveEmailToSharePoint/loc/mystrings.d.ts | 16 ++ ...3c02-3280-4430-a877-22cbc6251d21_color.png | Bin 0 -> 3023 bytes ...02-3280-4430-a877-22cbc6251d21_outline.png | Bin 0 -> 1429 bytes .../tsconfig.json | 38 ++++ .../tslint.json | 30 ++++ 28 files changed, 796 insertions(+) create mode 100644 samples/save-email-to-sharepoint-office-add-in/.editorconfig create mode 100644 samples/save-email-to-sharepoint-office-add-in/.gitignore create mode 100644 samples/save-email-to-sharepoint-office-add-in/.yo-rc.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/README.md create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/config.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/copy-assets.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/deploy-azure-storage.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/package-solution.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/serve.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/config/write-manifests.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/gulpfile.js create mode 100644 samples/save-email-to-sharepoint-office-add-in/officeAddin/e6083c02-3280-4430-a877-22cbc6251d21_outlookManifest.xml create mode 100644 samples/save-email-to-sharepoint-office-add-in/package.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/index.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/SaveEmailToSharePointWebPart.manifest.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/SaveEmailToSharePointWebPart.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/ISaveEmailToSharePointProps.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/SPPreset.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/SaveEmailToSharePoint.module.scss create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/SaveEmailToSharePoint.tsx create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/Services/Services.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/components/email.png create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/loc/en-us.js create mode 100644 samples/save-email-to-sharepoint-office-add-in/src/webparts/saveEmailToSharePoint/loc/mystrings.d.ts create mode 100644 samples/save-email-to-sharepoint-office-add-in/teams/e6083c02-3280-4430-a877-22cbc6251d21_color.png create mode 100644 samples/save-email-to-sharepoint-office-add-in/teams/e6083c02-3280-4430-a877-22cbc6251d21_outline.png create mode 100644 samples/save-email-to-sharepoint-office-add-in/tsconfig.json create mode 100644 samples/save-email-to-sharepoint-office-add-in/tslint.json diff --git a/samples/save-email-to-sharepoint-office-add-in/.editorconfig b/samples/save-email-to-sharepoint-office-add-in/.editorconfig new file mode 100644 index 000000000..8ffcdc4ec --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/.editorconfig @@ -0,0 +1,25 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] + +# change these settings to your own preference +indent_style = space +indent_size = 2 + +# we recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[{package,bower}.json] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/samples/save-email-to-sharepoint-office-add-in/.gitignore b/samples/save-email-to-sharepoint-office-add-in/.gitignore new file mode 100644 index 000000000..b19bbe123 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/.gitignore @@ -0,0 +1,32 @@ +# Logs +logs +*.log +npm-debug.log* + +# Dependency directories +node_modules + +# Build generated files +dist +lib +solution +temp +*.sppkg + +# Coverage directory used by tools like istanbul +coverage + +# OSX +.DS_Store + +# Visual Studio files +.ntvs_analysis.dat +.vs +bin +obj + +# Resx Generated Code +*.resx.ts + +# Styles Generated Code +*.scss.ts diff --git a/samples/save-email-to-sharepoint-office-add-in/.yo-rc.json b/samples/save-email-to-sharepoint-office-add-in/.yo-rc.json new file mode 100644 index 000000000..7631a3945 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/.yo-rc.json @@ -0,0 +1,12 @@ +{ + "@microsoft/generator-sharepoint": { + "version": "1.10.0", + "libraryName": "save-email-to-sharepoint", + "libraryId": "a1464bb8-773a-438c-a425-b5fc2a5a86a4", + "environment": "spo", + "packageManager": "npm", + "isCreatingSolution": true, + "isDomainIsolated": false, + "componentType": "webpart" + } +} \ No newline at end of file diff --git a/samples/save-email-to-sharepoint-office-add-in/README.md b/samples/save-email-to-sharepoint-office-add-in/README.md new file mode 100644 index 000000000..f89c4a8b9 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/README.md @@ -0,0 +1,26 @@ +## save-email-to-sharepoint + +This is where you include your WebPart documentation. + +### Building the code + +```bash +git clone the repo +npm i +npm i -g gulp +gulp +``` + +This package produces the following: + +* lib/* - intermediate-stage commonjs build artifacts +* dist/* - the bundled script, along with other resources +* deploy/* - all resources which should be uploaded to a CDN. + +### Build options + +gulp clean - TODO +gulp test - TODO +gulp serve - TODO +gulp bundle - TODO +gulp package-solution - TODO diff --git a/samples/save-email-to-sharepoint-office-add-in/config/config.json b/samples/save-email-to-sharepoint-office-add-in/config/config.json new file mode 100644 index 000000000..e34e55529 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/config.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", + "version": "2.0", + "bundles": { + "save-email-to-share-point-web-part": { + "components": [ + { + "entrypoint": "./lib/webparts/saveEmailToSharePoint/SaveEmailToSharePointWebPart.js", + "manifest": "./src/webparts/saveEmailToSharePoint/SaveEmailToSharePointWebPart.manifest.json" + } + ] + } + }, + "externals": {}, + "localizedResources": { + "SaveEmailToSharePointWebPartStrings": "lib/webparts/saveEmailToSharePoint/loc/{locale}.js" + } +} diff --git a/samples/save-email-to-sharepoint-office-add-in/config/copy-assets.json b/samples/save-email-to-sharepoint-office-add-in/config/copy-assets.json new file mode 100644 index 000000000..3771fd04a --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/copy-assets.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json", + "deployCdnPath": "temp/deploy" +} diff --git a/samples/save-email-to-sharepoint-office-add-in/config/deploy-azure-storage.json b/samples/save-email-to-sharepoint-office-add-in/config/deploy-azure-storage.json new file mode 100644 index 000000000..cf090e04d --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/deploy-azure-storage.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", + "workingDir": "./temp/deploy/", + "account": "", + "container": "save-email-to-sharepoint", + "accessKey": "" +} \ No newline at end of file diff --git a/samples/save-email-to-sharepoint-office-add-in/config/package-solution.json b/samples/save-email-to-sharepoint-office-add-in/config/package-solution.json new file mode 100644 index 000000000..902fe6170 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/package-solution.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", + "solution": { + "name": "save-email-to-sharepoint-client-side-solution", + "id": "a1464bb8-773a-438c-a425-b5fc2a5a86a4", + "version": "1.0.0.0", + "includeClientSideAssets": true, + "skipFeatureDeployment": true, + "isDomainIsolated": false, + "webApiPermissionRequests": [ + { + "resource": "Microsoft Graph", + "scope": "Mail.ReadBasic" + }, + { + "resource": "Microsoft Graph", + "scope": "Mail.Read" + } + ] + }, + "paths": { + "zippedPackage": "solution/save-email-to-sharepoint.sppkg" + } +} diff --git a/samples/save-email-to-sharepoint-office-add-in/config/serve.json b/samples/save-email-to-sharepoint-office-add-in/config/serve.json new file mode 100644 index 000000000..090cfe9e6 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/serve.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json", + "port": 4321, + "https": true, + "initialPage": "https://localhost:5432/workbench", + "api": { + "port": 5432, + "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/" + } +} diff --git a/samples/save-email-to-sharepoint-office-add-in/config/write-manifests.json b/samples/save-email-to-sharepoint-office-add-in/config/write-manifests.json new file mode 100644 index 000000000..bad352605 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/config/write-manifests.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json", + "cdnBasePath": "" +} \ No newline at end of file diff --git a/samples/save-email-to-sharepoint-office-add-in/gulpfile.js b/samples/save-email-to-sharepoint-office-add-in/gulpfile.js new file mode 100644 index 000000000..cafe79916 --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/gulpfile.js @@ -0,0 +1,7 @@ +'use strict'; + +const build = require('@microsoft/sp-build-web'); + +build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`); + +build.initialize(require('gulp')); diff --git a/samples/save-email-to-sharepoint-office-add-in/officeAddin/e6083c02-3280-4430-a877-22cbc6251d21_outlookManifest.xml b/samples/save-email-to-sharepoint-office-add-in/officeAddin/e6083c02-3280-4430-a877-22cbc6251d21_outlookManifest.xml new file mode 100644 index 000000000..a341c944c --- /dev/null +++ b/samples/save-email-to-sharepoint-office-add-in/officeAddin/e6083c02-3280-4430-a877-22cbc6251d21_outlookManifest.xml @@ -0,0 +1,91 @@ + + + e6083c02-3280-4430-a877-22cbc6251d21 + 1.0.0.0 + Save Email Provider + en-US + + + + + + + https://login.microsoftonline.com + https://login.windows.net + + + + + + + + + + + +
+ + + 250 + +
+
+ ReadWriteMailbox + + + + false + + + + + + + + +