Updated to v1.12.1 of SPFx Framework

This commit is contained in:
Nick Brown 2021-07-13 18:25:35 +01:00
parent c36eb4a788
commit d17f187abb
11 changed files with 11328 additions and 7539 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

@ -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,7 +1,7 @@
{ {
"$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,18 +105,20 @@ 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 => {
const reader = new FileReader(); f.downloadFileContent().then((file) => {
reader.readAsArrayBuffer(file); const reader = new FileReader();
reader.onloadend = ((ev) => { reader.readAsArrayBuffer(file);
let decodedString = new TextDecoder('utf-8').decode(new DataView(reader.result as ArrayBuffer)); reader.onloadend = ((ev) => {
const csv = readString(decodedString, { header: true, skipEmptyLines: true }); let decodedString = new TextDecoder('utf-8').decode(new DataView(reader.result as ArrayBuffer));
var h = csv.meta.fields; const csv = readString(decodedString, { header: true, skipEmptyLines: true });
this._data = csv.data; var h = csv.meta.fields;
this._datacolumns = h.map(r => { return { key: r.replace(' ', ''), name: r, fieldName: r, isResizable: true }; }); this._data = csv.data;
this.setState({ ...this.state, csvcolumns: this._datacolumns, csvdata: this._data, csvItems: h.map(r => { return { key: r.replace(' ', ''), text: r }; }), logs: [], errors: [], logurl: null }); 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 => { return { key: r.replace(' ', ''), text: r }; }), logs: [], errors: [], logurl: null });
});
}); });
}); });
}); });

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,
@ -27,4 +27,4 @@
"variable-name": false, "variable-name": false,
"whitespace": false "whitespace": false
} }
} }