Merge pull request #1959 from techienickb/master

This commit is contained in:
Hugo Bernier 2021-07-14 12:00:36 -04:00 committed by GitHub
commit 6058dfd283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 11333 additions and 7543 deletions

View File

@ -31,3 +31,4 @@ obj
# Styles Generated Code # Styles Generated Code
*.scss.ts *.scss.ts
release

View File

@ -2,7 +2,7 @@
"@microsoft/generator-sharepoint": { "@microsoft/generator-sharepoint": {
"isCreatingSolution": true, "isCreatingSolution": true,
"environment": "spo", "environment": "spo",
"version": "1.11.0", "version": "1.12.1",
"libraryName": "teams-membership-updater", "libraryName": "teams-membership-updater",
"libraryId": "5da816cf-c693-4b88-b9bd-a9da3587f05c", "libraryId": "5da816cf-c693-4b88-b9bd-a9da3587f05c",
"packageManager": "npm", "packageManager": "npm",

View File

@ -12,8 +12,8 @@ Used to update the membership of a team based on the contents of a CSV file, can
## Compatibility ## Compatibility
![SPFx 1.11](https://img.shields.io/badge/SPFx-1.11.0-green.svg) ![SPFx 1.12.1](https://img.shields.io/badge/SPFx-1.12.1-green.svg)
![Node.js LTS 10.x](https://img.shields.io/badge/Node.js-LTS%2010.x-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)
![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg) ![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg)
![Teams Yes: Designed for Microsoft Teams](https://img.shields.io/badge/Teams-Yes-green.svg "Designed for Microsoft Teams") ![Teams Yes: Designed for Microsoft Teams](https://img.shields.io/badge/Teams-Yes-green.svg "Designed for Microsoft Teams")
![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench") ![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench")
@ -45,6 +45,7 @@ Version|Date|Comments
1.0.4|June 3, 2020|Switched to using Graph Batching 1.0.4|June 3, 2020|Switched to using Graph Batching
1.0.7|April 20, 2021|Switched to using PnP's file picker and option to log to a configuration list 1.0.7|April 20, 2021|Switched to using PnP's file picker and option to log to a configuration list
1.0.8|April 22, 2021|Added support for paging on the team member list get 1.0.8|April 22, 2021|Added support for paging on the team member list get
1.1.0|July 13, 2021|Upgraded to v1.12.1 of SPFx and v3 of pnp controls
## Minimal Path to Awesome ## Minimal Path to Awesome

View File

@ -9,7 +9,7 @@
"Used to update the membership of a team based on the contents of a CSV file, can be hosted in a SharePoint site where a list can be defined for logging purposes or run inside teams as a personal app." "Used to update the membership of a team based on the contents of a CSV file, can be hosted in a SharePoint site where a list can be defined for logging purposes or run inside teams as a personal app."
], ],
"creationDateTime": "2020-04-27", "creationDateTime": "2020-04-27",
"updateDateTime": "2021-04-22", "updateDateTime": "2021-07-13",
"products": [ "products": [
"SharePoint", "SharePoint",
"Office" "Office"
@ -21,7 +21,7 @@
}, },
{ {
"key": "SPFX-VERSION", "key": "SPFX-VERSION",
"value": "1.11.0" "value": "1.12.1"
} }
], ],
"thumbnails": [ "thumbnails": [

View File

@ -1,4 +1,4 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json", "$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", "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/", "workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->", "account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "teams-membership-updater", "container": "teams-membership-updater",
"accessKey": "<!-- ACCESS KEY -->" "accessKey": "<!-- ACCESS KEY -->"

View File

@ -12,7 +12,7 @@
"websiteUrl": "https://nbdev.uk", "websiteUrl": "https://nbdev.uk",
"mpnId": "000000" "mpnId": "000000"
}, },
"version": "1.0.0.8", "version": "1.0.1.0",
"includeClientSideAssets": true, "includeClientSideAssets": true,
"isDomainIsolated": false, "isDomainIsolated": false,
"webApiPermissionRequests": [ "webApiPermissionRequests": [

View File

@ -4,4 +4,14 @@ 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.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')); build.initialize(require('gulp'));

File diff suppressed because it is too large Load Diff

View File

@ -3,41 +3,38 @@
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"main": "lib/index.js", "main": "lib/index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": { "scripts": {
"build": "gulp bundle", "build": "gulp bundle",
"clean": "gulp clean", "clean": "gulp clean",
"test": "gulp test" "test": "gulp test"
}, },
"dependencies": { "dependencies": {
"@microsoft/sp-core-library": "1.11.0", "@microsoft/sp-core-library": "1.12.1",
"@microsoft/sp-http": "1.11.0", "@microsoft/sp-http": "1.12.1",
"@microsoft/sp-lodash-subset": "1.11.0", "@microsoft/sp-lodash-subset": "1.12.1",
"@microsoft/sp-office-ui-fabric-core": "1.11.0", "@microsoft/sp-office-ui-fabric-core": "1.12.1",
"@microsoft/sp-property-pane": "1.11.0", "@microsoft/sp-property-pane": "1.12.1",
"@microsoft/sp-webpart-base": "1.11.0", "@microsoft/sp-webpart-base": "1.12.1",
"@pnp/spfx-controls-react": "^2.6.0", "@pnp/spfx-controls-react": "^3.2.1",
"@pnp/spfx-property-controls": "2.5.0", "@pnp/spfx-property-controls": "^3.2.0",
"office-ui-fabric-react": "^7.168.0", "office-ui-fabric-react": "7.173.0",
"react": "16.8.5", "react": "16.9.0",
"react-dom": "16.8.5", "react-dom": "16.9.0",
"react-papaparse": "^3.12.1" "react-papaparse": "^3.16.1"
}, },
"resolutions": { "resolutions": {
"@types/react": "16.8.8" "@types/react": "16.8.8"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/microsoft-graph-types": "^1.35.0", "@microsoft/rush-stack-compiler-3.7": "0.2.3",
"@microsoft/rush-stack-compiler-3.3": "0.3.5", "@microsoft/sp-build-web": "1.12.1",
"@microsoft/sp-build-web": "1.11.0", "@microsoft/sp-module-interfaces": "1.12.1",
"@microsoft/sp-module-interfaces": "1.11.0", "@microsoft/sp-tslint-rules": "1.12.1",
"@microsoft/sp-tslint-rules": "1.11.0", "@microsoft/sp-webpart-workbench": "1.12.1",
"@microsoft/sp-webpart-workbench": "1.11.0", "@types/react": "^17.0.13",
"@types/chai": "3.4.34", "@types/react-dom": "^17.0.8",
"@types/mocha": "2.2.38", "@types/webpack-env": "^1.16.2",
"ajv": "~5.2.2", "ajv": "~5.2.2",
"gulp": "~3.9.1" "gulp": "~4.0.2"
} }
} }

View File

@ -105,9 +105,10 @@ export default class TeamsMembershipUpdater extends React.Component<ITeamsMember
this.setState({ ...this.state, csvdata: null }); this.setState({ ...this.state, csvdata: null });
} }
private fileChange = (filePickerResult: IFilePickerResult) => { private fileChange = (filePickerResult: IFilePickerResult[]) => {
this.props.context.msGraphClientFactory.getClient().then((client: MSGraphClient): void => { this.props.context.msGraphClientFactory.getClient().then((client: MSGraphClient): void => {
filePickerResult.downloadFileContent().then((file) => { filePickerResult.forEach(f => {
f.downloadFileContent().then((file) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsArrayBuffer(file); reader.readAsArrayBuffer(file);
reader.onloadend = ((ev) => { reader.onloadend = ((ev) => {
@ -120,6 +121,7 @@ export default class TeamsMembershipUpdater extends React.Component<ITeamsMember
}); });
}); });
}); });
});
} }
public onChange = (event: React.FormEvent<HTMLDivElement>, item: IDropdownOption): void => { public onChange = (event: React.FormEvent<HTMLDivElement>, item: IDropdownOption): void => {

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": { "compilerOptions": {
"target": "es5", "target": "es5",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
@ -31,9 +31,5 @@
"include": [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.tsx" "src/**/*.tsx"
],
"exclude": [
"node_modules",
"lib"
] ]
} }

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": { "rules": {
"class-name": false, "class-name": false,
"export-name": false, "export-name": false,