Merge pull request #2810 from a1mery/react-graph-app-secret-expiration-upgrade-to-SPFx-v1.15

React graph app secret expiration upgrade to sp fx v1.15
This commit is contained in:
Hugo Bernier 2022-07-27 19:50:08 -07:00 committed by GitHub
commit 8750a9f2fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 7007 additions and 3103 deletions

View File

@ -1,7 +1,7 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{
"name": "SPFx 1.14.0",
"image": "docker.io/m365pnp/spfx:1.14.0",
"name": "SPFx 1.15.0",
"image": "docker.io/m365pnp/spfx:1.15.0",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.

View File

@ -0,0 +1,5 @@
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
parserOptions: { tsconfigRootDir: __dirname }
};

View File

@ -35,3 +35,5 @@ obj
*.cer
# .PEM Certificates
*.pem
.heft

View File

@ -2,7 +2,7 @@
"@microsoft/generator-sharepoint": {
"isCreatingSolution": true,
"environment": "spo",
"version": "1.14.0",
"version": "1.15.0",
"libraryName": "react-graph-app-secret-expiration",
"libraryId": "b25d85a4-7310-408a-a263-25959b0a5b1b",
"packageManager": "npm",

View File

@ -9,7 +9,7 @@ I got the idea from this great article [Use Power Automate to Notify of Upcoming
## Compatibility
![SPFx 1.14](https://img.shields.io/badge/SPFx-1.14-green.svg)
![SPFx 1.15](https://img.shields.io/badge/SPFx-1.15-green.svg)
![Node.js v14 | v12](https://img.shields.io/badge/Node.js-v14%20%7C%20v12-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")
@ -38,6 +38,7 @@ Version|Date|Comments
1.1|October 10, 2021|Add pagination
1.2|November 04, 2021|Add group views
1.3|March 14, 2022|Upgrade to SPFx v1.14.0
1.4|July 07, 2022|Upgrade to SPFx v1.15.0
## Minimal path to awesome

View File

@ -9,7 +9,7 @@
"This sample web part shows the list of your applications registered in Azure AD along with their associated client secret/certificate expiration date."
],
"creationDateTime": "2021-09-17",
"updateDateTime": "2022-03-14",
"updateDateTime": "2022-07-07",
"products": [
"SharePoint"
],
@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.14.0"
"value": "1.15.0"
},
{
"key": "PNPCONTROLS",

View File

@ -17,12 +17,12 @@
"title": "react-graph-app-secret-expiration Feature",
"description": "The feature that activates elements of the react-graph-app-secret-expiration solution.",
"id": "ca58f355-9872-4025-8ad5-763ad6076034",
"version": "1.3.0.0"
"version": "1.4.0.0"
}
],
"name": "react-graph-app-secret-expiration-client-side-solution",
"id": "b25d85a4-7310-408a-a263-25959b0a5b1b",
"version": "1.3.0.0",
"version": "1.4.0.0",
"includeClientSideAssets": true,
"isDomainIsolated": false,
"skipFeatureDeployment": true,

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "react-graph-app-secret-expiration",
"version": "1.3.0",
"version": "1.4.0",
"private": true,
"main": "lib/index.js",
"scripts": {
@ -11,28 +11,34 @@
"dependencies": {
"@fluentui/react": "^8.61.0",
"@microsoft/rush-stack-compiler-3.8": "^0.4.47",
"@microsoft/sp-core-library": "1.14.0",
"@microsoft/sp-http": "^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",
"@microsoft/sp-core-library": "1.15.0",
"@microsoft/sp-http": "1.15.0",
"@microsoft/sp-lodash-subset": "1.15.0",
"@microsoft/sp-office-ui-fabric-core": "1.15.0",
"@microsoft/sp-property-pane": "1.15.0",
"@microsoft/sp-webpart-base": "1.15.0",
"@pnp/spfx-controls-react": "3.3.0",
"moment": "^2.29.1",
"office-ui-fabric-react": "7.174.1",
"office-ui-fabric-react": "7.185.7",
"react": "16.13.1",
"react-dom": "16.13.1"
"react-dom": "16.13.1",
"tslib": "2.3.1"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.15.0",
"@microsoft/eslint-plugin-spfx": "1.15.0",
"@microsoft/rush-stack-compiler-3.7": "0.2.3",
"@microsoft/rush-stack-compiler-3.9": "0.4.47",
"@microsoft/sp-build-web": "1.14.0",
"@microsoft/sp-module-interfaces": "1.14.0",
"@microsoft/sp-tslint-rules": "1.14.0",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.15.0",
"@microsoft/sp-module-interfaces": "1.15.0",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "16.9.51",
"@types/react-dom": "16.9.8",
"@types/webpack-env": "1.13.1",
"ajv": "~5.2.2",
"@types/webpack-env": "1.15.2",
"ajv": "6.12.5",
"eslint": "8.7.0",
"eslint-plugin-react-hooks": "4.3.0",
"gulp": "~4.0.2"
}
}

View File

@ -12,7 +12,7 @@ import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';
import * as strings from 'GraphAppSecretExpirationWebPartStrings';
import GraphAppSecretExpiration from './components/GraphAppSecretExpiration';
import { IGraphAppSecretExpirationProps } from './components/IGraphAppSecretExpirationProps';
import { MSGraphClient } from '@microsoft/sp-http';
import { MSGraphClientV3 } from '@microsoft/sp-http';
export interface IGraphAppSecretExpirationWebPartProps {
groupByColumn: string;
@ -22,7 +22,7 @@ export interface IGraphAppSecretExpirationWebPartProps {
}
export default class GraphAppSecretExpirationWebPart extends BaseClientSideWebPart<IGraphAppSecretExpirationWebPartProps> {
private graphClient: MSGraphClient;
private graphClient: MSGraphClientV3;
private dropdownOptions: IPropertyPaneDropdownOption[] = [
{ key: "none", text: "None" },
{ key: "applicationId", text: "Application ID" },
@ -31,8 +31,8 @@ export default class GraphAppSecretExpirationWebPart extends BaseClientSideWebPa
public onInit(): Promise<void> {
return new Promise<void>((resolve: () => void, reject: (error: any) => void): void => {
this.context.msGraphClientFactory
.getClient()
.then((client: MSGraphClient): void => {
.getClient("3")
.then((client: MSGraphClientV3): void => {
this.graphClient = client;
resolve();
}, err => reject(err));

View File

@ -1,7 +1,7 @@
import { MSGraphClient } from "@microsoft/sp-http";
import { MSGraphClientV3 } from "@microsoft/sp-http";
export interface IGraphAppSecretExpirationProps {
graphClient: MSGraphClient;
graphClient: MSGraphClientV3;
groupByColumn: string;
expiringSoon: boolean;
displaySampleData: boolean;

View File

@ -1,5 +1,5 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json",
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.5/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,

View File

@ -1,29 +0,0 @@
{
"extends": "./node_modules/@microsoft/sp-tslint-rules/base-tslint.json",
"rules": {
"class-name": false,
"export-name": false,
"forin": false,
"label-position": false,
"member-access": true,
"no-arg": false,
"no-console": false,
"no-construct": false,
"no-duplicate-variable": true,
"no-eval": false,
"no-function-expression": true,
"no-internal-module": true,
"no-shadowed-variable": true,
"no-switch-case-fall-through": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-with-statement": true,
"semicolon": true,
"trailing-comma": false,
"typedef": false,
"typedef-whitespace": false,
"use-named-parameter": true,
"variable-name": false,
"whitespace": false
}
}