Merge pull request #2074 from aakashbhardwaj619/reactSaveAttachmentsUpgrade

react-save-attachments upgraded to SPFx 1.13.0-beta.15
This commit is contained in:
Hugo Bernier 2021-10-31 03:29:07 -04:00 committed by GitHub
commit e0355c5159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 12627 additions and 6828 deletions

View File

@ -0,0 +1,16 @@
!dist
config
gulpfile.js
release
src
temp
tsconfig.json
tslint.json
*.log
.yo-rc.json
.vscode

View File

@ -8,16 +8,23 @@ This SPFx Outlook Add-In lets users save any email attachments to a OneDrive fol
![Save Attachments in Action](./assets/react-save-attachments-2.gif)
## Used SharePoint Framework Version
## Compatibility
![SPFx 1.13.0](https://img.shields.io/badge/SPFx-1.13.0-green.svg)
![Node.js LTS v14 | LTS v12 | LTS v10](https://img.shields.io/badge/Node.js-LTS%20v14%20%7C%20LTS%20v12%20%7C%20LTS%20v10-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-yellow.svg "Designed to work in Outlook, but will display sample attachments while in workbench")
![SPFx 1.10](https://img.shields.io/badge/version-1.10.0-green.svg)
## Features
This web part illustrates the below features for creating Outlook Add-Ins using SPFx.
* Select Office context and attributes of currently selected mail
* Requesting **Mail.Read** and **Files.ReadWrite** permission scopes for Microsoft Graph through the `webApiPermissionRequests` property in `package-solution.json`
* Requesting `Mail.Read` and `Files.ReadWrite` permission scopes for Microsoft Graph through the `webApiPermissionRequests` property in `package-solution.json`
* Use Microsoft Graph to retrieve folders and sub-folders for OneDrive
* Use Microsoft Graph to retrieve complete mail `mimestream` by given `ID`
* Use Microsoft Graph to save normal or big files (in size bigger 4MB) with different concepts
@ -26,7 +33,7 @@ This web part illustrates the below features for creating Outlook Add-Ins using
Solution|Author(s)
--------|---------
react-save-attachments | [Aakash Bhardwaj](https://twitter.com/aakash_316)
react-save-attachments | [Aakash Bhardwaj](https://github.com/aakashbhardwaj619) ([@aakash_316](https://twitter.com/aakash_316))
## Version history
@ -34,6 +41,7 @@ react-save-attachments | [Aakash Bhardwaj](https://twitter.com/aakash_316)
Version|Date|Comments
-------|----|--------
1.0|October 4, 2020|Initial release
1.1|October 19, 2021|Upgraded to SPFx 1.13.0
## Minimal Path to Awesome
@ -55,9 +63,19 @@ Version|Date|Comments
* Go to the **API Management** section in the new SharePoint Admin Center (*https://{tenantname}-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement*)
* **Approve** the permission request for **Mail.ReadWrite** and **Files.ReadWrite** to **Microsoft Graph**
## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
---
## Help
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=react-save-attachments&authors=@aakashbhardwaj619&title=react-save-attachments%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=react-save-attachments&authors=@aakashbhardwaj619&title=react-save-attachments%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=react-save-attachments&authors=@aakashbhardwaj619&title=react-save-attachments%20-%20).
<img src="https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-save-attachments" />

View File

@ -9,7 +9,7 @@
"This SPFx Outlook Add-In lets users save any email attachments to a OneDrive folder."
],
"creationDateTime": "2020-10-04",
"updateDateTime": "2020-10-04",
"updateDateTime": "2020-10-19",
"products": [
"SharePoint",
"Office"
@ -21,7 +21,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.10.0"
"value": "1.13.0"
},
{
"key": "SPFX-OUTLOOKADDIN",

View File

@ -1,4 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
"deployCdnPath": "temp/deploy"
"deployCdnPath": "./release/assets/"
}

View File

@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/",
"workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "react-save-attachments",
"accessKey": "<!-- ACCESS KEY -->"

View File

@ -1,9 +1,16 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"developer": {
"name": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"websiteUrl": "",
"mpnId": ""
},
"name": "react-save-attachments-client-side-solution",
"id": "b0a9dfa8-9221-472c-88d7-a1542bf21d8d",
"version": "1.0.0.0",
"version": "1.1.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,

View File

@ -2,9 +2,5 @@
"$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/"
}
"initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx"
}

View File

@ -4,4 +4,13 @@ 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.`);
var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);
result.set('serve', result.get('serve-deprecated'));
return result;
};
build.initialize(require('gulp'));

View File

@ -5,7 +5,7 @@
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<Id>04634d50-d72c-45ec-81d0-7b1f803800da</Id>
<Version>1.0.0.0</Version>
<Version>1.1.0.0</Version>
<ProviderName>SPFx Provider</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Save Attachments"/>

File diff suppressed because it is too large Load Diff

View File

@ -3,41 +3,36 @@
"version": "0.0.1",
"private": true,
"main": "lib/index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"react": "16.8.5",
"react-dom": "16.8.5",
"@types/react": "16.8.8",
"@types/react-dom": "16.8.3",
"office-ui-fabric-react": "6.189.2",
"@microsoft/sp-core-library": "1.10.0-plusbeta",
"@microsoft/sp-property-pane": "1.10.0-plusbeta",
"@microsoft/sp-webpart-base": "1.10.0-plusbeta",
"@microsoft/sp-lodash-subset": "1.10.0-plusbeta",
"@microsoft/sp-office-ui-fabric-core": "1.10.0-plusbeta",
"@types/webpack-env": "1.13.1",
"@types/es6-promise": "0.0.33"
"@microsoft/sp-core-library": "1.13.0-beta.15",
"@microsoft/sp-lodash-subset": "1.13.0-beta.15",
"@microsoft/sp-office-ui-fabric-core": "1.13.0-beta.15",
"@microsoft/sp-property-pane": "1.13.0-beta.15",
"@microsoft/sp-webpart-base": "1.13.0-beta.15",
"office-ui-fabric-react": "7.156.0",
"react": "16.9.0",
"react-dom": "16.9.0"
},
"resolutions": {
"@types/react": "16.8.8"
},
"devDependencies": {
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
"@microsoft/sp-build-web": "1.10.0-plusbeta",
"@microsoft/sp-module-interfaces": "1.10.0-plusbeta",
"@microsoft/sp-tslint-rules": "1.10.0-plusbeta",
"@microsoft/sp-webpart-workbench": "1.10.0-plusbeta",
"@types/chai": "3.4.34",
"@types/mocha": "2.2.38",
"@microsoft/rush-stack-compiler-3.7": "0.2.3",
"@microsoft/sp-build-web": "1.13.0-beta.15",
"@microsoft/sp-module-interfaces": "1.13.0-beta.15",
"@microsoft/sp-tslint-rules": "1.13.0-beta.15",
"@types/es6-promise": "0.0.33",
"@types/office-js": "^1.0.123",
"@types/react": "16.9.36",
"@types/react-dom": "16.9.8",
"@types/webpack-env": "1.13.1",
"ajv": "~5.2.2",
"gulp": "~3.9.1"
"gulp": "4.0.2"
}
}

View File

@ -1,5 +1,5 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
@ -19,20 +19,18 @@
"./node_modules/@microsoft"
],
"types": [
"es6-promise",
"webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection"
"es2015.collection",
"es2015.promise"
]
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"src/**/*.tsx"
],
"exclude": [
"node_modules",
"lib"
]
"exclude": []
}

View File

@ -1,5 +1,5 @@
{
"extends": "@microsoft/sp-tslint-rules/base-tslint.json",
"extends": "./node_modules/@microsoft/sp-tslint-rules/base-tslint.json",
"rules": {
"class-name": false,
"export-name": false,