Update react-teams-membership-updater to spfx 1.14

This commit is contained in:
Nick Brown 2022-03-24 16:12:57 +00:00
parent 884e0375b2
commit 89611797cc
8 changed files with 4658 additions and 3364 deletions

View File

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

View File

@ -12,7 +12,7 @@ Used to update the membership of a team based on the contents of a CSV file, can
## Compatibility
![SPFx 1.12.1](https://img.shields.io/badge/SPFx-1.12.1-green.svg)
![SPFx 1.14.0](https://img.shields.io/badge/SPFx-1.14.0-green.svg)
![Node.js v14 | v12 | v10](https://img.shields.io/badge/Node.js-v14%20%7C%20v12%20%7C%20v10-green.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")
@ -49,6 +49,7 @@ Version|Date|Comments
1.1.0|July 13, 2021|Upgraded to v1.12.1 of SPFx and v3 of pnp controls
1.2.0|August 17, 2021|Added support for populating private channels inside of a team, added support for paged list of teams from Graph, added sorting to the Team list
1.2.1|September 21, 2021| Missing '/members' in the private channel membership url
1.2.2|March, 24, 2022|Upgraded to SPFx v1.14 and v4 of react-papaparse
## Minimal Path to Awesome

View File

@ -12,7 +12,7 @@
"websiteUrl": "https://nbdev.uk",
"mpnId": "000000"
},
"version": "1.0.2.1",
"version": "1.0.2.2",
"includeClientSideAssets": true,
"isDomainIsolated": false,
"webApiPermissionRequests": [
@ -32,6 +32,25 @@
"resource": "Microsoft Graph",
"scope": "ChannelMember.ReadWrite.All"
}
],
"metadata": {
"shortDescription": {
"default": "Populate a Team or Channel Membership from a CSV file"
},
"longDescription": {
"default": "Populate or update a Team or Channel Membership from a CSV file"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "Channe/Team Membership Updating",
"description": "Updates/Populates a Team based on the values in a CSV file",
"id": "c7e4099a-153e-444f-a52f-c3bd3c137760",
"version": "1.0.2.1"
}
]
},
"paths": {

File diff suppressed because it is too large Load Diff

View File

@ -9,32 +9,30 @@
"test": "gulp test"
},
"dependencies": {
"@microsoft/sp-core-library": "1.12.1",
"@microsoft/sp-http": "1.12.1",
"@microsoft/sp-lodash-subset": "1.12.1",
"@microsoft/sp-office-ui-fabric-core": "1.12.1",
"@microsoft/sp-property-pane": "1.12.1",
"@microsoft/sp-webpart-base": "1.12.1",
"@pnp/spfx-controls-react": "^3.3.0",
"@pnp/spfx-property-controls": "^3.2.0",
"office-ui-fabric-react": "^7.176.1",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-papaparse": "^3.17.2"
"@microsoft/sp-core-library": "1.14.0",
"@microsoft/sp-lodash-subset": "1.14.0",
"@microsoft/sp-office-ui-fabric-core": "1.14.0",
"@microsoft/sp-property-pane": "1.14.0",
"@microsoft/sp-webpart-base": "1.14.0",
"@pnp/spfx-controls-react": "3.7.2",
"@pnp/spfx-property-controls": "3.6.0",
"office-ui-fabric-react": "^7.174.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-papaparse": "^4.0.2"
},
"resolutions": {
"@types/react": "16.8.8"
},
"devDependencies": {
"@microsoft/rush-stack-compiler-3.7": "0.2.3",
"@microsoft/sp-build-web": "1.12.1",
"@microsoft/sp-module-interfaces": "1.12.1",
"@microsoft/sp-tslint-rules": "1.12.1",
"@microsoft/sp-webpart-workbench": "1.12.1",
"@types/react": "^17.0.22",
"@types/react-dom": "^17.0.8",
"@microsoft/rush-stack-compiler-3.9": "^0.4.48",
"@microsoft/sp-build-web": "1.14.0",
"@microsoft/sp-module-interfaces": "1.14.0",
"@microsoft/sp-tslint-rules": "1.14.0",
"@types/react": "^16.9.51",
"@types/react-dom": "^16.9.8",
"@types/webpack-env": "^1.16.2",
"ajv": "~5.2.2",
"ajv": "~6.9.1",
"gulp": "~4.0.2"
}
}

View File

@ -3,7 +3,7 @@ import styles from './TeamsMembershipUpdater.module.scss';
import { ITeamsMembershipUpdaterProps } from './ITeamsMembershipUpdaterProps';
import { DetailsList, DetailsListLayoutMode, IColumn, SelectionMode, ProgressIndicator, Separator, PrimaryButton, MessageBar, MessageBarType, Link, Toggle, List, Dropdown, IDropdownOption, Text, TeachingBubble, Icon, Callout, mergeStyleSets, FontWeights } from 'office-ui-fabric-react';
import { ITeamsMembershipUpdaterWebPartProps } from '../TeamsMembershipUpdaterWebPart';
import { readString } from 'react-papaparse';
import { usePapaParse } from 'react-papaparse';
import { MSGraphClient, SPHttpClient, SPHttpClientResponse } from '@microsoft/sp-http';
import * as MicrosoftGraph from "@microsoft/microsoft-graph-types";
import { FilePicker, IFilePickerResult } from '@pnp/spfx-controls-react';
@ -117,11 +117,13 @@ export default class TeamsMembershipUpdater extends React.Component<ITeamsMember
reader.readAsArrayBuffer(file);
reader.onloadend = ((ev) => {
let decodedString = new TextDecoder('utf-8').decode(new DataView(reader.result as ArrayBuffer));
const csv = readString(decodedString, { header: true, skipEmptyLines: true });
var h = csv.meta.fields;
this._data = csv.data;
this._datacolumns = h.map(r => { return { key: r.replace(' ', ''), name: r, fieldName: r, isResizable: true }; });
this.setState({ ...this.state, csvcolumns: this._datacolumns, csvdata: this._data, csvItems: h.map(r => ({ key: r.replace(' ', ''), text: r })), logs: [], errors: [], logurl: null });
const { readString } = usePapaParse();
readString(decodedString, { header: true, skipEmptyLines: true, worker: true, complete: (results) => {
var h = results.meta.fields;
this._data = results.data;
this._datacolumns = h.map(r => { return { key: r.replace(' ', ''), name: r, fieldName: r, isResizable: true, minWidth: 100 }; });
this.setState({ ...this.state, csvcolumns: this._datacolumns, csvdata: this._data, csvItems: h.map(r => ({ key: r.replace(' ', ''), text: r })), logs: [], errors: [], logurl: null });
} });
});
});
});

View File

@ -1,5 +1,5 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json",
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
@ -19,7 +19,6 @@
"./node_modules/@microsoft"
],
"types": [
"es6-promise",
"webpack-env"
],
"lib": [

View File

@ -17,7 +17,6 @@
"no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-with-statement": true,
"semicolon": true,
"trailing-comma": false,